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
/! \brief Execute this plugin Handle actions/events, locking, snapshots, dialogs, tabs,...
function execute() { // Ensure that html posts and gets are kept even if we see a 'Entry islocked' dialog. $vars = array('/^act$/','/^listing/','/^PID$/','/^FILTER_PID$/'); session::set('LOCK_VARS_TO_USE', $vars); /* Display the copy & paste dialog, if it is currently open */ $ret = $this->copyPasteHandler("", array()); if ($ret) { return $this->getHeader().$ret; } // Update filter $filter = $this->getFilter(); if ($filter) { $filter->update(); session::global_set(get_class($this)."_filter", $filter); session::set('autocomplete', $filter); if (!$filter->isValid()) { msg_dialog::display(_("Filter error"), _("The filter is incomplete!"), ERROR_DIALOG); } } // Handle actions (POSTs and GETs) $str = $this->handleActions($this->detectPostActions()); if ($str) { return $this->getHeader().$str; } // Open single dialog objects if (is_object($this->dialogObject)) { if (method_exists($this->dialogObject, 'execute')) { /* There is currently a subdialog open, display this dialog */ $add = ""; if (isset($this->dialogObject->krb_host_key) && $this->dialogObject->krb_host_key instanceof krbHostKeys) { $add = $this->dialogObject->krb_host_key->save_object_by_prefix($this->dialogObject->krb_service_prefix); $add = $this->dialogObject->krb_host_key->execute_by_prefix($this->dialogObject->krb_service_prefix, TRUE); } $display = $add.$this->dialogObject->execute(); $display .= $this->_getTabFooter(); return $this->getHeader().$display; } } // Display tab object. if ($this->tabObject instanceOf simpleTabs) { $display = $this->tabObject->execute(); $display .= $this->_getTabFooter(); return $this->getHeader().$display; } // Display list session::set('ServerService', $this->plugins); return $this->renderList(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run () {\n\t\trequire_once $this->pluginFile;\n\t}", "protected function executeAction() {}", "protected function executeAction() {}", "protected function executeAction() {}", "protected function executeAction() {}", "public function Execute()\n {\n // i.e. --> $this->OBJ_TOUCHPOINTS->AddScript();\n \n // === Load tabs into window\n echo \"<div style='width:800px;'></div>\";\n $this->LoadTabs();\n }", "public function executeAction() {\r\n\t\t\r\n\t}", "protected function doExecute()\n\t{\n\t\t// Your application routines go here.\n\t}", "protected function executeAction() {\n \n }", "function execute() {\r\n\t\t\r\n\t\tswitch( $this->mAction ) {\r\n\t\t\tcase 'help':\r\n\t\t\t\t$this->Help();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 'compute':\r\n\t\t\t\t$this->Compute();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 'liste':\r\n\t\t\t\t$this->Liste();\r\n\t\t\t\t$this->mOutput->display();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 'open':\r\n\t\t\t\t$this->Open();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 'save':\r\n\t\t\t\t$this->Save();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 'delete':\r\n\t\t\t\t$this->Delete();\r\n\t\t\t\t$this->mOutput->display();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 'install':\r\n\t\t\t\t$this->Install();\r\n\t\t\t\t$this->mOutput->display();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\t$this->mOutput->start( $this->mDB->isOK(), $this->mLang, $this->mText, array(), '', $this->mCountRegexes, $this->mRegexes );\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "public function execute() {\n if ( $this->mInternalMode ) {\n $this->executeAction();\n } else {\n $this->executeActionWithErrorHandling();\n }\n }", "public function onRun()\n {\n try {\n $api = new PluginApi($this->secret, $this->dataFolder);\n $this->setResult($api->basicGet(\"/information\"));\n } catch (\\Exception $e) {\n $this->setResult($e);\n }\n }", "protected function executeAction()\n {\n $this->triggerEvent( __FUNCTION__ . '.pre');\n if ($this->flowEvaluator->executeActionInFlow()) {\n $this->triggerEvent(__FUNCTION__ . '.success');\n $this->manageExecutedAction();\n } else {\n $this->triggerEvent(__FUNCTION__ . '.fail');\n }\n $this->triggerEvent( __FUNCTION__ . '.post');\n }", "function hmbkp_actions() {\n\n\t$plugin_data = get_plugin_data( __FILE__ );\n\n\tdefine( 'HMBKP_VERSION', $plugin_data['Version'] );\n\n\t// Fire the update action\n\tif ( HMBKP_VERSION > get_option( 'hmbkp_plugin_version' ) )\n\t\thmbkp_update();\n\n\trequire_once( HMBKP_PLUGIN_PATH . '/admin.actions.php' );\n\trequire_once( HMBKP_PLUGIN_PATH . '/everbox/everbox.actions.php' );\n\n\t// Load admin css and js\n\tif ( isset( $_GET['page'] ) && $_GET['page'] == HMBKP_PLUGIN_SLUG ) :\n\t\twp_enqueue_script( 'hmbkp', HMBKP_PLUGIN_URL . '/assets/hmbkp.js' );\n\t\twp_enqueue_style( 'hmbkp', HMBKP_PLUGIN_URL . '/assets/hmbkp.css' );\n\tendif;\n\n\t// Handle any advanced option changes\n\thmbkp_constant_changes();\n\n}", "public function handle()\n {\n if (parent::handle() === false) {\n return;\n } \n\n $this->addIndex();\n\n $this->call('extension:composer', [\n 'type'=> 'plugin',\n 'name' => $this->getNameInput(),\n ]); \n }", "function execute() {\n\t\t$blockVars = array('blockSelectLeft', 'blockUnselected', 'blockSelectRight');\n\t\tforeach ($blockVars as $varName) {\n\t\t\t$$varName = array_map('urldecode', preg_split('~ ~', Request::getUserVar($varName)));\n\t\t}\n\n\t\t$plugins =& PluginRegistry::loadCategory('blocks');\n\t\tforeach ($plugins as $key => $junk) {\n\t\t\t$plugin =& $plugins[$key]; // Ref hack\n\t\t\t$plugin->setEnabled(!in_array($plugin->getName(), $blockUnselected));\n\t\t\tif (in_array($plugin->getName(), $blockSelectLeft)) {\n\t\t\t\t$plugin->setBlockContext(BLOCK_CONTEXT_LEFT_SIDEBAR);\n\t\t\t\t$plugin->setSeq(array_search($key, $blockSelectLeft));\n\t\t\t}\n\t\t\telse if (in_array($plugin->getName(), $blockSelectRight)) {\n\t\t\t\t$plugin->setBlockContext(BLOCK_CONTEXT_RIGHT_SIDEBAR);\n\t\t\t\t$plugin->setSeq(array_search($key, $blockSelectRight));\n\t\t\t}\n\t\t\tunset($plugin);\n\t\t}\n\n\t\treturn parent::execute();\n\t}", "public function execute() {\n\n\t\tif (!Utils::getGet('action')) {\n\t\t\t$_GET['action'] = 'show';\n\t\t}\n\n\t\tif ($_GET['action'] == 'show') {\n\t\t\t$this->show();\n\t\t}\n\n\t\tif ($_GET['action'] == 'modification') {\n\t\t\tif (Utils::getGet('id')) {\n\t\t\t\t$id = Utils::getGet('id');\n\t\t\t\t$id = intval($_GET['id']);\n\t\t\t\t$this->modification($id);\n\t\t\t} else {\n\t\t\t\t$this->modificationAll();\n\t\t\t}\n\t\t}\n\n\t\tif ($_GET['action'] == 'cree') {\n\t\t\t$this->creePage();\n\t\t}\n\n\t\tif ($_GET['action'] == 'supprimer') {\n\t\t\tif (Utils::getGet('id')) {\n\t\t\t\t$id = Utils::getGet('id');\n\t\t\t\t$id = intval($_GET['id']);\n\t\t\t\t$this->souprimePage($id);\n\t\t\t} else {\n\t\t\t\t$this->modificationAll();\n\t\t\t}\n\t\t}\n\n\t}", "public function run()\n {\n // Attach CSS and JS files of the plugin to chat window.\n $dispatcher = EventDispatcher::getInstance();\n $dispatcher->attachListener(Events::PAGE_ADD_CSS, $this, 'attachCssFiles');\n $dispatcher->attachListener(Events::PAGE_ADD_JS, $this, 'attachJsFiles');\n $dispatcher->attachListener(Events::PAGE_ADD_JS_PLUGIN_OPTIONS, $this, 'attachPluginOptions');\n }", "private function executeHandle() {\n // call hook function\n is_callable(config('hooks.onExecute')) && call_user_func(config('hooks.onExecute'), $this);\n // execute controller\n $this->router->executeController();\n }", "public static function execute() {\n if ( defined( 'DPC_EXECUTED' ) ) {\n return false;\n } else {\n define( 'DPC_EXECUTED', true );\n }\n load_textdomain( 'dustpress-components', dirname( __FILE__ ) . '/languages/' . get_locale() . '.mo' );\n add_action( 'init', __NAMESPACE__ . '\\Components::add_options_page', 1, 1 );\n add_action( 'init', __NAMESPACE__ . '\\Components::hook', 20, 1 );\n add_action( 'dustpress/partials', __NAMESPACE__ . '\\Components::add_partial_path', 1, 1 );\n add_action( 'activated_plugin', __NAMESPACE__ . '\\Components::load_first', 1, 1 );\n add_filter( 'acf/format_value/type=group', __NAMESPACE__ . '\\Components::add_layout_static', 150, 3 );\n add_filter( 'acf/format_value/type=group', __NAMESPACE__ . '\\Data::component_handle', 200, 3 );\n add_filter( 'acf/format_value/type=flexible_content', __NAMESPACE__ . '\\Data::component_handle', 200, 3 );\n }", "function execute()\n\t{\t\n\t\t// Check for requested action\n\t\t$app_action = isset($_REQUEST['ax']) ? $_REQUEST['ax'] : 'startup_view';\n\t\t\n\t\tif(method_exists($this,$app_action))\n\t\t{\n\t\t\t// Call requested action\n\t\t\t$this->$app_action();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->default_action($app_action);\n\t\t}\n\t}", "public function execute()\n\t{\n\t\t$this->output = $this->output->getHelpOutput();\n\t\t$this->help();\n\t\t$this->output->render();\n\t}", "function run(){\r\n\t\t $this->arg('auth-block', $this->authBlock());\r\n\t\t $this->arg('menu', $this->getMenu(4));\r\n\t\t $this->arg('left-menu', $this->leftMenu(171,false));\r\n\t\t $this->arg('menu-footer1', $this->getMenuFooter(200, false,false,\"w-220\"));\r\n\t\t $this->arg('menu-footer2', $this->getMenuFooter(201, false,false,\"w-220\"));\r\n\t\t $this->arg('menu-footer3', $this->getMenuFooter(202, false,false,\"w-160\"));\r\n\t\t $this->arg('menu-footer4', $this->getMenuFooter(203, false,false,\"w-120\"));\r\n\t\t $this->arg('menu-footer5', $this->getMenuFooter(204, false,false,\"w-160\"));\r\n\r\n\t\t $this->arg('news-list', $this->newsList(9, 8));\r\n//\t\t $this->arg('banners-list-1', $this->bannersList(2, 6, 7));\r\n\t\t $this->arg('banners-list-1', $this->getTopBanner());\r\n\t\t $this->arg('banners-list-2', $this->bannersList(22, 6, 7));\r\n\t\t $this->arg('voting-block', $this->votingBlock(12));\r\n\t\t $this->arg('langs', $this->getLangs());\r\n\t\t $this->arg('search', $this->search());\r\n\t }", "public function action()\n {\n foreach ($this->actions as $action) {\n $action->run();\n }\n }", "public function run() {\n\t\t// include other classes\n\t\trequire_once plugin_dir_path ( __FILE__ ) . 'class-top-ratter-render.php';\n\t\trequire_once plugin_dir_path ( __FILE__ ) . 'class-top-ratter-sso.php';\n\t\t\n\t\t// enque styles for this plugin\n\t\tadd_action ( 'wp_enqueue_scripts', array (\n\t\t\t\t$this,\n\t\t\t\t'register_plugin_styles' \n\t\t) );\n\t\t// enque jquery scripts for this plugin\n\t\tadd_action ( 'wp_enqueue_scripts', array (\n\t\t\t\t$this,\n\t\t\t\t'register_plugin_script' \n\t\t) );\n\t\t// add submit action form to redirect and catch from admin.php\n\t\tadd_action ( 'admin_post_tr_action', array (\n\t\t\t\t$this,\n\t\t\t\t'prefix_admin_tr_action' \n\t\t) );\n\t\t\n\t\t// check if plugin tables exist\n\t\t$this->table_check ();\n\t\t\n\t\t// instantiate the render class for shortcodes to work\n\t\t$shortcodes = new Top_Ratter_Render ();\n\t}", "public function execute()\n {\n $this->_authorize();\n $this->_authorize('entry');\n $this->_authorize('comment');\n\n $this->registerTask('new', 'edit');\n $this->registerTask('login', 'login');\n\n $this->registerTask('groups', 'groups');\n $this->registerTask('locations', 'locations');\n $this->registerTask('projects', 'projects');\n $this->registerTask('users', 'users');\n\n parent::execute();\n }", "protected function executeAction() {\r\n\t\t$this->objectAction->validateAction();\r\n\t\t$this->objectAction->executeAction();\r\n\t\t\r\n\t\t$this->handleResult();\r\n\t}", "public function execute() {\n\t\t$controller = $this->manager->get($this->getController());\n\t\t$reflection = new \\ReflectionClass($controller);\n\t\t$controller->run( $this->getAction($reflection) );\n\t}", "public function execute()\n {\n $path=$this->getPath();\n try\n {\n Log::info('Trying module '.$this->module);\n \t$this->page = $this->moduleInstance($this->module,$path,$this->params);\n\n \ttry\n \t{\n Log::info('Trying action '.$this->action);\n \t\t $this->page->executeAction($this->action);\n \t}\n catch (SecurityException $e) {\n $this->handleSecurity();\n }\n catch (Error404Exception $e) {\n $this->returnActionNotFound();\n }\n catch (Exception $e)\n {\n Log::info('Action '.$this->action.' rejected for module '.$this->module.', trying index instead ');\n Log::info('Reason : '.$e->getMessage());\n $this->page->handleException($e);\n }\n\n }\n catch (Error404Exception $e) {\n\n $this->returnModuleNotFound();\n }\n catch (SecurityException $e) {\n $this->handleSecurity();\n }\n catch (Exception $e)\n {\n\n Log::info('Error module '.$this->module.'. Revealing as 404');\n \t $this->page = $this->moduleInstance('error',$path);\n $this->page->executeAction('404');\n }\n Log::info($this->module.'/'.$this->action.' executed successfully');\n }", "public function exec () {\r\n\t\t$a = isset($_GET['action']) ? $_GET['action'] : 'capa';\r\n\t\tswitch ($a) {\r\n\t\t\tcase 'capa':\r\n\t\t\t\t$this->capa();\r\n\t\t\tbreak;\r\n\t\t\tcase 'adicionar':\r\n\t\t\t\t$this->adicionar();\r\n\t\t\tbreak;\r\n\t\t\tcase 'alterar':\r\n\t\t\t\t$this->alterar();\r\n\t\t\tbreak;\r\n\t\t\tcase 'detalhar':\r\n\t\t\t\t$this->detalhar();\r\n\t\t\tbreak;\r\n\t\t\tcase 'excluir':\r\n\t\t\t\t$this->excluir();\r\n\t\t\tbreak;\r\n\t\t\tcase 'sair':\r\n\t\t\t\t$this->sair();\r\n\t\t\tbreak;\r\n\t\t} \r\n\t}", "public function execute() {\n\t\t// Get absolute path of extension directory\n\t\t$extPath = t3lib_extMgm::extPath(tx_passwordmgr_module1::extKey);\n\n\t\t$actionKey = $GLOBALS['moduleData']['action'];\n\t\tif ( $actionKey && class_exists('tx_passwordmgr_action_'.$actionKey) && is_file($extPath.'controller/class.tx_passwordmgr_action_'.strtolower($actionKey).'.php') ) {\n\t\t\t$action = t3lib_div::makeInstance('tx_passwordmgr_action_'.$actionKey);\n\t\t\t$action->execute();\n\t\t} else {\n\t\t\t$action = t3lib_div::makeInstance('tx_passwordmgr_action_default');\n\t\t\t$action->execute();\n\t\t}\n\t\t$action->printContent();\n\t}", "function Doku_Event_Handler() {\n\n // load action plugins\n $plugin = NULL;\n $pluginlist = plugin_list('action');\n\n foreach ($pluginlist as $plugin_name) {\n $plugin =& plugin_load('action',$plugin_name);\n\n if ($plugin !== NULL) $plugin->register($this);\n }\n }", "protected function executeSpecificStep() {}", "public function executeAction()\n {\n //Is the page cached?\n if ($this->isCached)\n {\n //Nothing to execute\n return;\n }\n parent::executeAction();\n }", "function handle() {\r\r\n new asp_updates_manager(ASP_PLUGIN_NAME, ASP_PLUGIN_SLUG, wd_asp()->updates);\r\r\n }", "public function execute() {\n global $CFG;\n\n require_once($CFG->dirroot . '/course/lib.php');\n\n // Specific list of plugins that need to be refreshed. If not set, then all mod plugins will be refreshed.\n $pluginstorefresh = null;\n if (isset($this->get_custom_data()->plugins)) {\n $pluginstorefresh = $this->get_custom_data()->plugins;\n }\n\n // Is course id set?\n if (isset($this->get_custom_data()->courseid)) {\n $courseid = $this->get_custom_data()->courseid;\n } else {\n $courseid = 0;\n }\n\n $pluginmanager = core_plugin_manager::instance();\n $modplugins = $pluginmanager->get_plugins_of_type('mod');\n foreach ($modplugins as $plugin) {\n // Check if a specific list of plugins is defined and check if it contains the plugin that is currently being evaluated.\n if (!empty($pluginstorefresh) && !in_array($plugin->name, $pluginstorefresh)) {\n // This plugin is not in the list, move on to the next one.\n continue;\n }\n // Refresh events.\n mtrace('Refreshing events for ' . $plugin->name);\n course_module_bulk_update_calendar_events($plugin->name, $courseid);\n }\n }", "public function handle()\n {\n if ($this->option('action') === 'popularity') {\n $this->handlePopularity();\n } else {\n $this->handleUpdate();\n }\n }", "function execute()\r\n\t{\r\n\t\t\r\n\t}", "public function\n\t\tdo_actions()\n\t{\n\t}", "public function execute()\n\t{\n\t\t$this->run();\n\t}", "function ldaACFBlocks_run_plugin() {\n\t$plugin = new ldaACFBlocks();\n\t$plugin->run();\n}", "function execute()\n {\n plugin::execute();\n\n /* Load templating engine */\n $smarty= get_smarty();\n $smarty->assign(\"scalixGroup\", set_post($this->scalixGroup));\n $display= \"\";\n\n /* Do we need to flip is_account state? */\n if (isset($_POST['modify_state'])){\n $this->is_account= !$this->is_account;\n }\n\n /* Show main page */\n $mailboxClasses = array(\"&nbsp;\", \"LIMITED\", \"FULL\");\n $serverLanguages= array(\"&nbsp;\", \"GERMAN\", \"ENGLISH\");\n\n /* Do we represent a valid account? */\n if (!$this->is_account && $this->parent === NULL){\n $display= \"<img alt=\\\"\\\" src=\\\"images/small-error.png\\\" align=\\\"middle\\\">&nbsp;<b>\".\n _(\"This account has no SCALIX extensions.\").\"</b>\";\n\n $display.= back_to_main();\n return ($display);\n }\n\n /* Show tab dialog headers */\n if ($this->parent !== NULL){\n if ($this->is_account){\n $display= $this->show_disable_header(_(\"Remove SCALIX account\"),\n _(\"This account has SCALIX synchronization enabled. You can disable it by clicking below.\"));\n } else {\n $display= $this->show_enable_header(_(\"Create SCALIX account\"), _(\"This account has SCALIX synchronization disabled. You can enable it by clicking below.\"));\n return ($display);\n }\n }\n\n /* Trigger forward add dialog? */\n if (isset($_POST['add_local_forwarder'])){\n $this->forward_dialog= TRUE;\n $this->dialog= TRUE;\n }\n\n /* Cancel forward add dialog? */\n if (isset($_POST['add_locals_cancel'])){\n $this->forward_dialog= FALSE;\n $this->dialog= FALSE;\n }\n\n\n $smarty->assign(\"mailboxClasses\", $mailboxClasses);\n $smarty->assign(\"serverLanguages\", $serverLanguages);\n foreach(array(\"perms\", \"scalixScalixObject\", \"scalixMailnode\", \"scalixAdministrator\", \"scalixMailboxAdministrator\",\n \"scalixServerLanguage\", \"scalixLimitMailboxSize\", \"scalixLimitOutboundMail\", \"scalixEmailAddress\",\n \"scalixLimitInboundMail\", \"scalixLimitNotifyUser\", \"scalixHideUserEntry\", \"scalixMailboxClass\") as $val){\n\n $smarty->assign(\"$val\", set_post($this->$val));\n }\n\n $tmp = $this->plInfo();\n foreach($tmp['plProvidedAcls'] as $name => $desc){\n $smarty->assign($name.\"ACL\", $this->getacl($name));\n }\n\n /* Fill checkboxes */\n if ($this->scalixAdministrator) {\n $smarty->assign(\"scalixAdministrator\", \"checked\");\n } else {\n $smarty->assign(\"scalixAdministrator\", \"\");\n }\n if ($this->scalixMailboxAdministrator) {\n $smarty->assign(\"scalixMailboxAdministrator\", \"checked\");\n } else {\n $smarty->assign(\"scalixMailboxAdministrator\", \"\");\n }\n if ($this->scalixLimitOutboundMail) {\n $smarty->assign(\"scalixLimitOutboundMail\", \"checked\");\n } else {\n $smarty->assign(\"scalixLimitOutboundMail\", \"\");\n }\n if ($this->scalixLimitInboundMail) {\n $smarty->assign(\"scalixLimitInboundMail\", \"checked\");\n } else {\n $smarty->assign(\"scalixLimitInboundMail\", \"\");\n }\n if ($this->scalixLimitNotifyUser) {\n $smarty->assign(\"scalixLimitNotifyUser\", \"checked\");\n } else {\n $smarty->assign(\"scalixLimitNotifyUser\", \"\");\n }\n if ($this->scalixHideUserEntry) {\n $smarty->assign(\"scalixHideUserEntry\", \"checked\");\n } else {\n $smarty->assign(\"scalixHideUserEntry\", \"\");\n }\n\n $display.= $smarty->fetch (get_template_path('generic.tpl', TRUE, dirname(__FILE__)));\n return ($display);\n }", "function Execute()\n\t\t{\n\t\t\t$controller = new $this->CONTROLLER();\n\t\t\t$controller->Initialise($this->get, $this->post, $this->files);\n\t\t\t$controller->StartFilters();\n\t\t\t$controller->{$this->ACTION}();\n\t\t\t$controller->StopFilters();\n\t\t}", "public function execute()\n {\n $this->run();\n }", "function plugin_action_handler( $plugin='' ) {\n\t\t$this->add_ping( 'plugins', array( 'name' => $plugin ) );\n\t}", "public function execute() {\n $currentClassID = $this->id();\n add_action( 'admin_notices', $f = create_function( '',\n '$currentClassID = \\'' . $currentClassID . '\\';'.\n 'echo \\'<div id=\"message\" class=\"error\">\\';' .\n 'echo \\'<h3>DEFLECTOR TEMPLATE RULE EXECUTION!</h3>\\';' .\n 'echo \\'<p>I am executing from class id \\' . $currentClassID . \\' but I do nothing. Deactivate Deflector extension template plugin or deactivate any template rule if you don\\\\\\'t want to see this message anymore!</p>\\';'.\n 'echo \\'</div>\\';' ) );\n }", "public function execute()\n\t{\n\t\tif (!User::authorise('core.admin', $this->_option))\n\t\t{\n\t\t\tNotify::warning(Lang::txt('Not authorized'));\n\n\t\t\tApp::redirect(\n\t\t\t\tRoute::url('index.php?option=com_members', false)\n\t\t\t);\n\t\t}\n\n\t\tLang::load($this->_option . '.import', dirname(__DIR__));\n\n\t\tparent::execute();\n\t}", "abstract protected function activate_plugin();", "function plugin_action($Server_ID, $Plugin_ID, $Plugin_Action_ID) {\n\n\t$Box_ID = getBOX($Server_ID);\n\n\tif ($Plugin_Action_ID == 1) {\n\t\tif (!function_exists(\"ssh2_connect\")) {\n\t\t\t$return = false;\n\t\t}\n\n\t\tif(!($ssh_conn = ssh2_connect(server_ip($Server_ID), box_ssh($Box_ID)))) {\n\t\t $return = false;\n\t\t} else {\n\t\t\tif(!ssh2_auth_password($ssh_conn, server_username($Server_ID), server_password($Server_ID))) {\n\t\t \t$return = false;\n\t\t } else {\n\t\t \t\t$stream = ssh2_shell($ssh_conn, 'xterm');\n\n\t\t \t\tfwrite($stream, 'cd cstrike/addons/amxmodx/plugins/'.PHP_EOL);\n\t\t\t\tsleep(1);\n\n\t\t\t\tfwrite($stream, 'wget http://gb-hoster.me/assets/plugin/'.plugin_amxx($Plugin_ID).PHP_EOL);\n\t\t\t\tsleep(2);\n\n\t\t\t\t$add_to_pl_list = add_to_plugin_list($Server_ID, $Plugin_ID);\n\t\t\t\tif (!$add_to_pl_list) {\n\t\t\t\t\t$return = false;\n\t\t\t\t} else {\n\t\t\t\t\t$return = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else if ($Plugin_Action_ID == 2) {\n\t\tif (!function_exists(\"ssh2_connect\")) {\n\t\t\t$return = false;\n\t\t}\n\n\t\tif(!($ssh_conn = ssh2_connect(server_ip($Server_ID), box_ssh($Box_ID)))) {\n\t\t $return = false;\n\t\t} else {\n\t\t\tif(!ssh2_auth_password($ssh_conn, server_username($Server_ID), server_password($Server_ID))) {\n\t\t \t$return = false;\n\t\t } else {\n\t\t \t\t$stream = ssh2_shell($ssh_conn, 'xterm');\n\n\t\t \t\tfwrite($stream, 'cd cstrike/addons/amxmodx/plugins/'.PHP_EOL);\n\t\t\t\tsleep(1);\n\n\t\t\t\tfwrite($stream, 'rm '.plugin_amxx($Plugin_ID).PHP_EOL);\n\t\t\t\tsleep(2);\n\n\t\t\t\t$add_to_pl_list = delete_p_line_plugin_list($Server_ID, $Plugin_ID);\n\t\t\t\tif (!$add_to_pl_list) {\n\t\t\t\t\t$return = false;\n\t\t\t\t} else {\n\t\t\t\t\t$return = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $return;\n}", "function execute()\n {\n }", "public function paroleAction() {\n\t\t \t\t\t\t\n\t\t\n\t}", "public static function run () {\n if( ! defined('ICL_SITEPRESS_VERSION') ) return;\n\n // init our plugin on the p2p_init action hook\n if(isset($_REQUEST['icl_ajx_action']) && function_exists('_p2p_init') ){\n add_action('init', array(__CLASS__, 'early_init') );\n }\n else {\n add_action('p2p_init', array(__CLASS__, 'init'), 14 );\n }\n\n // shows admin notices\n add_action('admin_notices', array(__CLASS__,'admin_notices') );\n\n }", "public function execute() {\n\t}", "function go() {\r\n $this->basic_handler();\r\n\r\n }", "public function take_action()\n {\n }", "public function take_action()\n {\n }", "public function executeModelAction(): void\n {\n $this->action = $this->executeModelActionLoad($this->action);\n\n $this->vp->set(function () {\n $this->jsSetButtonsState($this->loader, $this->step);\n $this->jsSetListState($this->loader, $this->step);\n $this->runSteps();\n });\n }", "public function pluginTask()\n\t{\n\t\t// Incoming\n\t\t$trigger = trim(Request::getString('trigger', ''));\n\n\t\t// Ensure we have a trigger\n\t\tif (!$trigger)\n\t\t{\n\t\t\techo '<p class=\"error\">' . Lang::txt('COM_PUBLICATIONS_NO_TRIGGER_FOUND') . '</p>';\n\t\t\treturn;\n\t\t}\n\n\t\t// Call the trigger\n\t\t$results = Event::trigger('publications.' . $trigger, array($this->_option));\n\t\tif (is_array($results))\n\t\t{\n\t\t\t$html = $results[0]['html'];\n\t\t}\n\n\t\t// Output HTML\n\t\techo $html;\n\t}", "function auto_run()\n\t{\n\t\t$this->html = $this->ipsclass->acp_load_template('cp_skin_tools');\n\n\t\tswitch($this->ipsclass->input['code'])\n\t\t{\n\t\t\tcase 'master_xml_export':\n\t\t\t\t$this->master_xml_export();\n\t\t\t\tbreak;\n\n\t\t\tcase 'manage':\n\t\t\t\t$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );\n\t\t\t\t$this->components_list();\n\t\t\t\tbreak;\n\n\t\t\tcase 'component_add':\n\t\t\t\t$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' );\n\t\t\t\t$this->components_form('add');\n\t\t\t\tbreak;\n\t\t\tcase 'component_add_do':\n\t\t\t\t$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' );\n\t\t\t\t$this->components_save('add');\n\t\t\t\tbreak;\n\n\t\t\tcase 'component_edit':\n\t\t\t\t$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );\n\t\t\t\t$this->components_form('edit');\n\t\t\t\tbreak;\n\t\t\tcase 'component_edit_do':\n\t\t\t\t$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );\n\t\t\t\t$this->components_save('edit');\n\t\t\t\tbreak;\n\n\t\t\tcase 'component_delete':\n\t\t\t\t$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );\n\t\t\t\t$this->components_delete();\n\t\t\t\tbreak;\n\n\t\t\tcase 'component_export':\n\t\t\t\t$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':export' );\n\t\t\t\t$this->components_export('single');\n\t\t\t\tbreak;\n\t\t\tcase 'component_import':\n\t\t\t\t$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':import' );\n\t\t\t\t$this->components_import();\n\t\t\t\tbreak;\n\n\t\t\tcase 'component_uninstall':\n\t\t\t\t$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );\n\t\t\t\t$this->components_uninstall();\n\t\t\t\tbreak;\n\n\t\t\tcase 'component_move':\n\t\t\t\t$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );\n\t\t\t\t$this->components_move();\n\t\t\t\tbreak;\n\t\t\tcase 'component_toggle_enabled':\n\t\t\t\t$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );\n\t\t\t\t$this->components_toggle_enabled();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );\n\t\t\t\t$this->components_list();\n\t\t\t\tbreak;\n\t\t}\n\t}", "function go() {\r\n $this->basic_handler();\r\n }", "private function actions()\n {\n }", "function execute() {\n\t\tif (empty($this->args)) {\n\t\t\t$this->__interactive();\n\t\t}\n\n\t\tif (count($this->args) == 1) {\n\t\t\t$this->__interactive($this->args[0]);\n\t\t}\n\n\t\tif (count($this->args) > 1) {\n\t\t\t$type = Inflector::underscore($this->args[0]);\n\t\t\tif ($this->bake($type, $this->args[1])) {\n\t\t\t\t$this->out('done');\n\t\t\t}\n\t\t}\n\t}", "public function execute ()\n\t{\n\t\tparent::execute();\n\t\t\n\t\t// set our template\n\t\t$this->setTemplate(\"ServerExplorerSuccess.php\");\n\n\t\t// set the title\n\t\t$this->setTitle(\"Server Explorer\");\n\t}", "public function execute(): void\n {\n parent::execute();\n\n // Zip extension is required for theme upload\n if (!extension_loaded('zlib')) {\n $this->template->assign('zlibIsMissing', true);\n }\n\n if (!$this->isWritable()) {\n // we need write rights to upload files\n $this->template->assign('notWritable', true);\n } else {\n // everything allright, we can upload\n $this->buildForm();\n $this->validateForm();\n $this->parse();\n }\n\n // display the page\n $this->display();\n }", "protected function helloWorld() {\n // SamplePlugin Core Actions\n }", "public function doAction() : void {\n $this->doJob();\n }", "public function executeComponent()\n\t{\n\t\tif($this->checkRequiredModules() && $this->checkPermissions() && $this->checkParameters())\n\t\t{\n\t\t\t$this->performAction();\n\t\t\t$this->obtainData();\n\t\t}\n\n\t\t$this->formatResult();\n\n\t\t$this->includeComponentTemplate();\n\t}", "function Plugin()\n\t{\n\t\t$this->Plugin_Base();\n\t}", "private function run_actions() {\n\t\tadd_action( 'admin_menu', [ $this, 'register' ] );\n\t\tadd_action( 'admin_enqueue_scripts', [ $this, 'enqueue' ] );\n\t\tadd_action( 'init', array( $this, 'register_settings' ) );\n\t}", "public function run()\n\t{\n\t\t$method = $this->method;\n\t\t\n\t\tif(!$this->extension_ran)\n\t\t{\n\t\t\t$this->$method();\n\t\t}\n\t\t\n\t\tif ($this->EE->extensions->active_hook('export_it_api_end') === TRUE)\n\t\t{\n\t\t\t$this->EE->extensions->call('export_it_api_end', $this);\n\t\t\tif ($this->EE->extensions->end_script === TRUE) return;\n\t\t}\t\t\n\t\texit;\n\t}", "protected function _exec()\n {\n }", "public function executeCommands()\n {\n $isVhostCreated = $this->createVirtualHostFile();\n if (!$isVhostCreated) {\n showInfo('Something went wrong' . printNextLine());\n showInfo('Exiting the wizard.' . printNextLine());\n printNextLine();\n exit();\n }\n $this->addNewHostToHostsFile();\n showInfo(' [ ' . $this->name . $this->extension . ' ] >>> Virtual host file is created successfully' . printNextLine());\n showInfo(' [ ' . $this->name . ' ] >>> Added to the HOSTS file successfully' . printNextLine());\n $this->enableNewVirtualHost();\n printNextLine();\n showInfo(' New host ready to rock Goto >>>> http://' . $this->name);\n printNextLine();\n printNextLine();\n }", "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 _doAction();", "public function invoke() {\r\n $this->action = Util::getAction($this->action);\r\n \r\n switch ($this->action) {\r\n case 'customer_login':\r\n $this->processCustomerLogin();\r\n break;\r\n case 'get_customer':\r\n $this->processGetCustomer();\r\n break;\r\n case 'show_registration':\r\n $this->processShowRegistration();\r\n break;\r\n case 'register_product':\r\n $this->processRegisterProduct();\r\n break;\r\n case 'logout':\r\n $this->processLogout();\r\n break;\r\n default:\r\n $this->processCustomerLogin();\r\n break;\r\n }\r\n }", "protected abstract function onExecute();", "public function executeModule()\n {\n }", "public function run() {\n\n // Render the admin page view / menus\n add_action( \n 'admin_menu', \n array( $this, 'add_settings_page' ) );\n\n if ( ! empty ( $GLOBALS['pagenow'] ) && ( \n 'options-general.php' === $GLOBALS['pagenow'] || 'options.php' === $GLOBALS['pagenow']\n ))\n {\n // Register the settings and render the fields\n add_action( \n 'admin_init', \n array( $this, 'register_settings' ) );\n }\n\n }", "public function run(){\n parent::run();\n //Do stuff...\n }", "public function executeComponent()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$this->checkRequiredModules();\n\t\t\t$this->checkAuthorized();\n\t\t\t$this->setTitle();\n\t\t\t$this->getOptions();\n\t\t\t$this->processRequest();\n\n\t\t\t$this->performActions();\n\n\t\t\t$this->obtainData();\n\t\t\t$this->formatResult();\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t$this->errorsFatal[htmlspecialcharsEx($e->getCode())] = htmlspecialcharsEx($e->getMessage());\n\t\t}\n\n\t\t$this->formatResultErrors();\n\n\t\t$this->includeComponentTemplate();\n\t}", "function auto_run()\n\t{\n\t\t//-----------------------------------------\n\t\t// Load some more caches\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->init_load_cache( array( 'components', 'languages' ) );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Init the nav\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, '(FSY23) Universal Mod Installer' );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Load the XML class\n\t\t//-----------------------------------------\n\t\t\n\t\trequire_once( KERNEL_PATH.\"class_xml.php\" );\n\t\t$this->ipsclass->xml = new class_xml();\n\t\t\n\t\t//-----------------------------------------\n\t\t// Init the settings\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->settings_init();\n\t\t\n\t\t//-----------------------------------------\n\t\t// Init ACP Help\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->acp_help_init();\n\t\t\n\t\t//-----------------------------------------\n\t\t// Get our installed mods\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->installed_mods_init();\n\t\t\n\t\t//-----------------------------------------\n\t\t// Init the mod\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->mod_init();\n\t\t\n\t\t//-----------------------------------------\n\t\t// What are we doing?\n\t\t//-----------------------------------------\n\t\t\n\t\tswitch ( $this->ipsclass->input['code'] )\n\t\t{\n\t\t\tcase 'settings':\n\t\t\t\t$this->view_settings();\n\t\t\t\tbreak;\n\t\t\tcase 'view':\n\t\t\t\t$this->view_mods();\n\t\t\t\tbreak;\n\t\t\tcase 'install':\n\t\t\t\t$this->pre_install();\n\t\t\t\tbreak;\n\t\t\tcase 'work':\n\t\t\t\t$this->runme();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->view_mods();\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function handle()\n {\n #Comentei pq o supervisor fica subindo toda hora e o arquivo fica gigante\n #como já testei e vi que fucniona tá tranquilo\n// do {\n// \\Log::info(\"Command --- initial\");\n// } while (true);\n }", "function pasAction() {\n\t\t$this -> vue -> pasAction();\n\t}", "public static function handle() {\n die(call_user_func([new self::$_class, self::$_action]));\n }", "public function mainAction():void{\n\n }", "protected function executeAdminCommand() {}", "protected function executeAdminCommand() {}", "protected function executeAdminCommand() {}", "public function execute()\n {\n /** @var \\Magento\\Framework\\App\\Request\\Http $request */\n $request = $this->getRequest();\n\n /** @var \\Zend\\Http\\Headers $header */\n $header = $request->getHeaders();\n\n /** @var bool $result */\n $result = false;\n $msg = \"\";\n\n if ($this->authenticate($header)) {\n $content = $request->getContent();\n\n $data = $this->logitrail->getApi()->processWebhookData($content);\n\n $this->logger->debug(json_encode($data, JSON_UNESCAPED_UNICODE));\n\n switch ($data[\"event_type\"]) {\n case \"product.inventory.change\":\n $result = $this->handleInventoryChange($data);\n $msg = \"success\";\n break;\n case \"order.shipped\":\n $result = $this->handleOrderShipped($data);\n $msg = \"success\";\n break;\n default:\n $result = true;\n $msg = \"Handling for event type {$data[\"event_type\"]} not implemented\";\n break;\n }\n }\n\n if ($result) {\n header('HTTP/1.1 200 OK');\n echo($msg);\n } else {\n header('HTTP/1.0 400 Bad Request');\n echo('fail');\n }\n exit;\n }", "public function execute()\n\t{\n\t\t// Check for request forgeries.\n\t\tif (!JSession::checkToken())\n\t\t{\n\t\t\t$this->app->enqueueMessage(JText::_('JINVALID_TOKEN'));\n\t\t\t$this->app->redirect('index.php');\n\t\t}\n\n\t\tif (empty($this->context))\n\t\t{\n\t\t\t$this->context = $this->option . '.edit' . $this->context;\n\t\t}\n\n\t\t// Redirect.\n\t\t$this->app->setUserState($this->context . '.data', null);\n\n\t\tif (!empty($this->redirect))\n\t\t{\n\t\t\t$this->app->redirect($this->redirect);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tparent::execute();\n\t\t}\n\t}", "public function execute()\n {\n $this->cleanHistory();\n $this->log();\n $this->instanceManager->update($this->instance);\n }", "public function actions() {\n\t\trequire_once( WPEX_FRAMEWORK_DIR .'hooks/hooks.php' );\n\t\trequire_once( WPEX_FRAMEWORK_DIR .'hooks/actions.php' );\n\t\trequire_once( WPEX_FRAMEWORK_DIR .'hooks/partials.php' );\n\t}", "function activator()\n{\n require_once plugin_dir_path( __FILE__ ) . 'includes/Activator.php';\n\tActivator::activate();\n}", "public function handle()\n {\n $base = new Base();\n foreach ($base as $item) {\n foreach ($base->current as $value) {\n $result = $base->active($value);\n if (is_array($result)) {\n // 更新全新\n $this->info($result['table'].'模块'.$result['action'].'权限'.$result['name'].'成功');\n }\n }\n }\n $this->info('更新完成');\n }", "public abstract function afterExec();", "function doPlugin()\r\n\t{\r\n\t\t$cid\t= JRequest::getVar( 'cid', array(0), 'method', 'array' );\r\n\t\tif(is_array($cid)){$cid = $cid[0];}\r\n\t\t$model\t= &$this->getModel( 'table' );\r\n\t\t$model->setId( JRequest::getInt( 'tableid', $cid) );\r\n\t\t$msg = $model->processPlugin();\r\n\t\tif (JRequest::getVar('format') == 'raw') {\r\n\t\t\tJRequest::setVar( 'view', 'table' );\r\n\t\t\t$this->display();\r\n\t\t} else {\r\n\t\t\t$this->setRedirect( 'index.php?'.JRequest::getVar( 'pageURL' ) );\r\n\t\t\t$this->setMessage( $msg );\r\n\t\t}\r\n\t}", "public function run($aArgs){\n\t\n\t\t/*include common library*/\n\t\t$this->library(\"common\");\n\t\t/*check if session start*/\n\t\t$this->library(\"checkLogin\");\n\t\t\n\t\t/*tinymce*/\n\t\t$this->library('tinymce');\n\t\tTinymce::init();\n\t\t/*send message*/\n\t\t$this->importJS('message/message');\n\t\t\n\t\t/*to import javascripts*/\n\t\t$this->importJS(\"tablesorter\");\n\t\t\n\t\t/*for the exec functions*/\n\t\t$sAction = Common::getParam('action');\n\t\t$sAction = $sAction != \"\" ? \"exec\" . ucwords($sAction) : \"_display\";\n\t\t$this->$sAction($aArgs);\n\t\t\n\t\t\n\t}", "public function execute()\n\t{\n\t\t// Set configs\n\t\t//$this->_setConfigs();\n\t\t// Logging\n\t\t$this->_logging = $this->config->get('enable_logs', 1);\n\n\t\t// Are we allowing contributions\n\t\t$this->_contributable = Plugin::isEnabled('projects', 'publications') ? true : false;\n\n\t\t// Incoming\n\t\t//$this->_incoming();\n\t\t$this->_id = Request::getInt('id', 0);\n\t\t$this->_alias = Request::getString('alias', '');\n\t\t$this->_version = Request::getString('v', 'default');\n\n\t\t$this->_identifier = $this->_alias ? $this->_alias : $this->_id;\n\n\t\t$pointer = $this->_id ? '&id=' . $this->_id : '&alias=' . $this->_alias;\n\n\t\t$this->_route = 'index.php?option=' . $this->_option;\n\t\t$this->_route .= $this->_identifier ? $pointer : '';\n\t\tif ($active = Request::getWord('active'))\n\t\t{\n\t\t\t$this->_route .= '&active=' . $active;\n\t\t}\n\n\t\t// Resource map\n\t\tif (strrpos(strtolower($this->_alias), '.rdf') > 0)\n\t\t{\n\t\t\treturn $this->_resourceMap();\n\t\t}\n\n\t\t// Set the default task\n\t\t$this->registerTask('__default', 'intro');\n\n\t\t// Register tasks\n\t\t$this->registerTask('view', 'page');\n\t\t$this->registerTask('watch', 'page');\n\t\t$this->registerTask('download', 'serve');\n\t\t$this->registerTask('video', 'serve');\n\t\t$this->registerTask('play', 'serve');\n\n\t\t$this->registerTask('wiki', 'wikipage');\n\t\t$this->registerTask('submit', 'contribute');\n\t\t$this->registerTask('edit', 'contribute');\n\t\t$this->registerTask('start', 'contribute');\n\t\t$this->registerTask('publication', 'contribute');\n\n\t\t$this->_task = trim(Request::getCmd('task', ''));\n\t\tif (($this->_id || $this->_alias) && !$this->_task)\n\t\t{\n\t\t\t$this->_task = 'page';\n\t\t}\n\t\telseif (!$this->_task)\n\t\t{\n\t\t\t$this->_task = 'intro';\n\t\t}\n\n\t\tif (!$this->_id && !$this->_alias && in_array($this->_task, array('view', 'page')))\n\t\t{\n\t\t\tRequest::setVar('task', 'intro');\n\t\t\t$this->_task = 'intro';\n\t\t}\n\n\t\tparent::execute();\n\t}", "public function execute() {}", "public function execute() {}" ]
[ "0.67240405", "0.67088425", "0.67083955", "0.67083955", "0.67083955", "0.66942465", "0.6625088", "0.65973353", "0.65973264", "0.6595552", "0.64382774", "0.63943684", "0.63827866", "0.636502", "0.634073", "0.63294053", "0.6286043", "0.62841654", "0.6246228", "0.6240354", "0.623103", "0.62298006", "0.62020874", "0.61857843", "0.6158187", "0.6151027", "0.61374635", "0.6131121", "0.61305255", "0.6130427", "0.6126107", "0.6125782", "0.6122341", "0.6113098", "0.6088579", "0.6070668", "0.60564476", "0.60561943", "0.60420966", "0.6030823", "0.6015365", "0.6010996", "0.5981192", "0.5979549", "0.5972753", "0.5955189", "0.5912603", "0.5911399", "0.5901425", "0.5897702", "0.5878772", "0.58771497", "0.58619565", "0.5859838", "0.5852511", "0.5852511", "0.5850427", "0.5847723", "0.58431745", "0.58377564", "0.5816155", "0.57997274", "0.57918876", "0.57886916", "0.57739407", "0.576968", "0.5768485", "0.5766088", "0.5757701", "0.575736", "0.5754665", "0.5753017", "0.5746234", "0.5742856", "0.5737667", "0.57291275", "0.5728175", "0.57222867", "0.5710115", "0.5709768", "0.5701253", "0.5699294", "0.5684187", "0.5673792", "0.56719434", "0.56494933", "0.56494933", "0.56494933", "0.56484556", "0.56462157", "0.56442416", "0.56411755", "0.5635366", "0.5633527", "0.5623581", "0.5622269", "0.5619149", "0.5615955", "0.5615178", "0.5615178" ]
0.6267962
18
/! \brief Updates the status for a list of services.
function updateServiceStatus($action, $target, $all) { /* Skip if this is a new server */ if ($this->dn == "new") { msg_dialog::display(_("Information"), _("Cannot update service status until it has been saved!"), INFO_DIALOG); return; } /* Is this an existing action */ if (!isset(self::$actionStatus[$action])) { msg_dialog::display(_("Error"), _("Unknown action $action"), ERROR_DIALOG); return; } /* Handle state changes for services */ foreach ($target as $service) { $this->updateSingleServiceStatus($action, $service); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateStatus(array $jobs);", "function update_status()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\tif(!empty($data['t']) && !empty($data['list'])) $result = $this->_bid->update_status($data['t'], explode('--',$data['list']));\n\t\t\n\t\t$data['msg'] = !empty($result['boolean']) && $result['boolean']? 'The bid status has been changed.': 'ERROR: The bid status could not be changed.';\n\t\t\n\t\t$data['area'] = 'refresh_list_msg';\n\t\t$this->load->view('addons/basic_addons', $data);\n\t}", "public function updateStatuses()\n {\n $affected = DB::update('UPDATE los_orders SET status_code=1 WHERE status_code=0 AND order_date IN (SELECT provide_date FROM los_lunchdates WHERE orders_placed IS NOT NULL)');\n $affected = DB::update('UPDATE los_orders SET status_code=0 WHERE status_code=1 AND order_date IN (SELECT provide_date FROM los_lunchdates WHERE orders_placed IS NULL)');\n }", "function update_status()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\t\n\t\tif(!empty($data['t']) && !empty($data['list'])) $response = $this->_tender->update_status($data['t'], explode('--',$data['list']));\n\t\t\n\t\t# all good\n\t\tif(!empty($response) && $response['boolean']){\n\t\t\t$data['msg'] = 'The Invitation for Bids/Quotations status has been updated.';\n\t\t\t$data['area'] = 'refresh_list_msg';\n\t\t} \n\t\t# there was an error\n\t\telse {\n\t\t\t$data['msg'] = (!empty($data['t']) && !empty($data['list']))? 'ERROR: There was an error updating the Invitation for Bids/Quotations status.': 'ERROR: This action can not be resolved';\n\t\t\t$data['area'] = 'basic_msg';\n\t\t}\n\t\t\n\t\t$this->load->view('addons/basic_addons', $data);\n\t}", "function changeServiceStatus ($pid_arr)\n{\n global $_TABLES;\n\n // first, disable all\n DB_query (\"UPDATE {$_TABLES['pingservice']} SET is_enabled = '0'\");\n if (isset($pid_arr)) {\n foreach ($pid_arr as $pid) { //enable those listed\n $pid = addslashes (COM_applyFilter ($pid, true));\n if (!empty ($pid)) {\n DB_query (\"UPDATE {$_TABLES['pingservice']} SET is_enabled = '1' WHERE pid = '$pid'\");\n }\n }\n }\n}", "public function update_status();", "public function update(Request $request, ServiceList $serviceList) {\n $action = $request->get(\"action\");\n $id = $request->get(\"id\");\n switch ($action) {\n \n case \"update\":\n $items = $this->saveItemList(Auth::id(), $request->get('items'));\n $arr = array(\n \"ser_cat_id\" => decrypt($request->get('service_id')),\n \"ser_pro_name\" => trim($request->get('provider_name')),\n \"user_ser_exp\" => trim($request->get('ser_exp')),\n \"ser_dec\" => trim($request->get('dec_msg')),\n\n \"ser_phone\" => trim($request->get('ser_phone')),\n \"ser_email\" => trim($request->get('ser_email')),\n \"ser_web\" => trim($request->get('ser_website')),\n \"ser_fb\" => trim($request->get('ser_fblink')),\n \"ser_tw\" => trim($request->get('ser_twlink')),\n \"ser_linkedin\" => trim($request->get('ser_ldlink')),\n\n \"ser_photo\" => $request->get('ser_img'),\n \"doc_no\" => trim($request->get('ser_doc_no')),\n \"doc_image\" => $request->get('doc_img'),\n\n \"ser_state\" => Crypt::decryptString(trim($request->get('ser_state'))),\n \"ser_city\" => Crypt::decryptString(trim($request->get('ser_city'))),\n \"ser_address\" => trim($request->get('ser_address')),\n \"pin_no\" => trim($request->get('ser_pin_no')),\n\n \"ser_days\" => $request->get('days'),\n \"ser_time\" => $request->get('time'),\n \"ser_item_id\" => $items\n );\n ServiceList::where(\"ser_id\", decrypt($id))->update($arr);\n break;\n\n case \"status\":\n $status = decrypt($request->get('status'));\n $arr = array();\n if ( $status == \"Active\" ) { $arr['ser_status'] = \"Inactive\"; }\n else if ( $status == \"Inactive\" ) { $arr['ser_status'] = \"Active\"; }\n else { break; }\n ServiceList::where(\"ser_id\", decrypt($id))->update($arr);\n return encrypt($arr['ser_status']);\n break;\n }\n return true; \n }", "function update_status(){\n $service_id=$this->uri->segment(4);\n $status=$this->uri->segment(5);\n $this->services->update_service_status($service_id,$status);\n $this->session->set_flashdata(\"success_msg\",\"Service status has been updated successfully.\");\n redirect(site_url(\"admin/services\"));\n }", "public function listsServicesPut($service_id)\r\n {\r\n $input = Request::all();\r\n $service = Services::findOrFail($service_id);\r\n $service->update(['name' => $input['name']]);\r\n if($service->save()){\r\n return response()->json(['msg' => 'Updated service']);\r\n }else{\r\n return response('Oops, it seems like somthing went wrong while trying to update the servie');\r\n }\r\n }", "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 }", "public function update(Request $request, Services $services)\n {\n //\n }", "public function update(Request $request, Services $services)\n {\n //\n }", "private function updateSingleServiceStatus($action, $service)\n {\n if ($this->plugins[$service]->is_account) {\n $this->updateServicesVars($service);\n\n $s_daemon = new supportDaemon();\n if ($s_daemon->is_error()) {\n msg_dialog::display(\n sprintf(_(\"Could not get execute action %s on service %s.\"), $action, $service),\n msgPool::siError($s_daemon->get_error()), ERROR_DIALOG\n );\n } else {\n $target = array($this->parent->getBaseObject()->netConfigDNS->macAddress);\n if ($action == 'status') {\n $res = $s_daemon->append_call(\"Service.is_running\", $target, array(\"args\" => array($service)));\n if ($s_daemon->is_error()) {\n msg_dialog::display(\n sprintf(_(\"Could not get execute action %s on service %s.\"), $action, $service),\n msgPool::siError($s_daemon->get_error()), ERROR_DIALOG\n );\n } else {\n $this->plugins[$service]->setStatus($res == \"yes\"?\"running\":\"stopped\");\n }\n } else {\n $res = $s_daemon->append_call(\"Service.manage\", $target, array(\"args\" => array($service, $action)));\n\n if ($s_daemon->is_error()) {\n msg_dialog::display(\n sprintf(_(\"Could not get execute action %s on service %s.\"), $action, $service),\n msgPool::siError($s_daemon->get_error()), ERROR_DIALOG\n );\n } elseif (preg_match(\"/^done/\", $res)) {\n $this->plugins[$service]->setStatus(self::$actionStatus[$action]);\n }\n }\n }\n }\n }", "public function updating(Service $Service)\n {\n //code...\n }", "function PKG_changeClientJobsStatus($packageIDList,$status)\n{\n\tCHECK_FW(CC_jobstatus, $status);\n\tPKG_executeOnClientJobs(\"UPDATE `clientjobs` SET `status` = '$status' WHERE \",$packageIDList);\n}", "public function updateStatus($params)\r\n {\r\n }", "public function updated(Service $service)\n {\n //\n }", "public function updateStatus() {\n try {\n if (!($this->toDoList instanceof Base_Model_ObtorLib_App_Core_Crm_Entity_ToDoList)) {\n throw new Base_Model_ObtorLib_App_Core_Crm_Exception(\" ToDoList Entity not intialized\");\n } else {\n $objToDoList = new Base_Model_ObtorLib_App_Core_Crm_Dao_ToDoList();\n $objToDoList->toDoList = $this->toDoList;\n return $objToDoList->updateStatus();\n }\n } catch (Exception $ex) {\n throw new Base_Model_ObtorLib_App_Core_Crm_Exception($ex);\n }\n }", "public function updateStatus(Request $request)\n\t{\n\t\t$status;\n\t\tif ($request->status === 'true') {\n\t\t\t$status = 1;\n\t\t} elseif ($request->status === 'false') {\n\t\t\t$status = 0;\n\t\t}\n\t\tDB::table('list_items')\n\t\t\t->where('id', $request->id)\n\t\t\t->update(['status' => $status]);\n\t}", "public function update(Request $request, Services $services)\n {\n //\n $service_update = Services::find($request->id_update);\n $kind = $request->kind_update;\n $service_update->service = $request->service_update;\n $service_update->price = $request->price_update;\n $service_update->unit = $request->unit_update;\n $service_update->save(); \n return redirect('admin/services?kind='.$kind);\n }", "public function updated(Service $Service)\n {\n //code...\n }", "private function manageStatus()\n {\n $this->updateStatus();\n $this->checkStatus();\n }", "function changeStatus() {\n\n $newStatus = $_GET['newstatus'];\n\n foreach ($_POST['status'] as $key => $val) {\n \n DB::update(CFG::$tblPrefix . \"ticket\", array(\"status\" => $newStatus), \" id=%d \", $key);\n \n }\n }", "public function update_about_us_services_info($data){\r\n $query = \"UPDATE tbl_aboutus_service SET service_icon='$data[service_icon]', service_title='$data[service_title]', service_desc='$data[service_desc]', \r\n publication_status='$data[publication_status]' WHERE service_id='$data[service_id]'\";\r\n if (mysqli_query($this->db_connect, $query)) {\r\n session_start();\r\n $_SESSION['message'] = \"About Us Services Updated Successfully!\";\r\n header('Location: manage_services.php');\r\n } else {\r\n die(\"Query Problem! \" . mysqli_error($this->db_connect));\r\n }\r\n\r\n }", "public function requestStatus(Request $request) {\n\t\t$services = Service::findOrFail($request -> submit);\n\n\t\t$services -> update(['status' => $request -> status]);\n\n\t\t$user = User::where('id', '=', $services -> user_id) -> get() -> first();\n\n\t\tif (isset($services -> status)) {\n\n\t\t\tMail::send('auth/emails.statusChange', ['services' => $services], function($m) use ($services, $user) {\n\n\t\t\t\t$m -> from('[email protected]', 'Team AfterCares');\n\n\t\t\t\t$m -> to($user -> email, $user -> name) -> subject('Change in status of request');\n\t\t\t});\n\n\t\t\treturn back() -> withInput();\n\t\t}\n\n\t}", "public function listsstatusput($status_id)\r\n {\r\n $input = Request::all();\r\n $status = Status::findOrFail($status_id);\r\n $status->update(['name' => $input['name']]);\r\n if($status->save()){\r\n return response()->json(['msg' => 'Update status']);\r\n }else{\r\n return response('Oops, it seems like there was a problem updating the status');\r\n }\r\n }", "public function testUpdateServiceData()\n {\n\n }", "function listServices()\n{\n global $LANG_ADMIN, $LANG_TRB, $_CONF, $_IMAGE_TYPE, $_TABLES;\n\n require_once $_CONF['path_system'] . 'lib-admin.php';\n\n $retval = '';\n\n $header_arr = array( # display 'text' and use table field 'field'\n array('text' => $LANG_ADMIN['edit'], 'field' => 'edit', 'sort' => false),\n array('text' => $LANG_TRB['service'], 'field' => 'name', 'sort' => true),\n array('text' => $LANG_TRB['ping_method'], 'field' => 'method', 'sort' => true),\n array('text' => $LANG_TRB['service_ping_url'], 'field' => 'ping_url', 'sort' => true),\n array('text' => $LANG_ADMIN['enabled'], 'field' => 'is_enabled', 'sort' => false)\n );\n\n $defsort_arr = array('field' => 'name', 'direction' => 'asc');\n\n $menu_arr = array (\n array('url' => $_CONF['site_admin_url'] . '/trackback.php?mode=editservice',\n 'text' => $LANG_ADMIN['create_new']),\n array('url' => $_CONF['site_admin_url'],\n 'text' => $LANG_ADMIN['admin_home']));\n\n $retval .= COM_startBlock($LANG_TRB['services_headline'], '',\n COM_getBlockTemplate('_admin_block', 'header'));\n\n $retval .= ADMIN_createMenu(\n $menu_arr,\n $LANG_TRB['service_explain'],\n $_CONF['layout_url'] . '/images/icons/trackback.' . $_IMAGE_TYPE\n );\n\n $text_arr = array(\n 'has_extras' => true,\n 'form_url' => $_CONF['site_admin_url'] . '/trackback.php',\n 'help_url' => getHelpUrl() . '#ping'\n );\n\n $query_arr = array(\n 'table' => 'pingservice',\n 'sql' => \"SELECT * FROM {$_TABLES['pingservice']} WHERE 1=1\",\n 'query_fields' => array('name', 'ping_url'),\n 'default_filter' => \"\",\n 'no_data' => $LANG_TRB['no_services']\n );\n\n // this is a dummy variable so we know the form has been used if all services\n // should be disabled in order to disable the last one.\n $form_arr = array('bottom' => '<input type=\"hidden\" name=\"serviceChanger\" value=\"true\"' . XHTML . '>');\n\n $retval .= ADMIN_list('pingservice', 'ADMIN_getListField_trackback',\n $header_arr, $text_arr, $query_arr, $defsort_arr,\n '', SEC_createToken(), '', $form_arr);\n $retval .= COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer'));\n\n if ($_CONF['trackback_enabled']) {\n $retval .= freshTrackback ();\n }\n if ($_CONF['pingback_enabled']) {\n $retval .= freshPingback ();\n }\n\n return $retval;\n}", "public function update(){\n $service_category = new OsServiceCategoryModel($this->params['service_category']['id']);\n $service_category->set_data($this->params['service_category']);\n if($service_category->save()){\n $response_html = __('Service Category Updated. ID: ', 'latepoint') . $service_category->id;\n $status = LATEPOINT_STATUS_SUCCESS;\n }else{\n $response_html = $service_category->get_error_messages();\n $status = LATEPOINT_STATUS_ERROR;\n }\n if($this->get_return_format() == 'json'){\n $this->send_json(array('status' => $status, 'message' => $response_html));\n }\n }", "public function testUpdateService()\n {\n\n }", "public function updatedStateService($serviceId){\n $this->state['employee'] = '';\n if(!$serviceId){\n $this->employees = collect();\n return;\n }\n $this->clearTime(); \n $this->employees = $this->selectedService->employees;\n\n }", "public static function updateStatusByIDs($ids,$status = self::STATUS_COMMON){\n $numberOfUpdate = static::updateAll(['status'=>$status],['id'=>$ids]);\n return $numberOfUpdate == count($ids);\n }", "private function UpdateServices($_database, $_data) {\n return $this->CallDatabase($_database, $_data, function($_pdo, $_parameters) {\n $set = \"id_services = ?, prices = ?, actives = ?\";\n //Create Query\n $_query = $_pdo->prepare(\"UPDATE `PartnerServices`\n\t\t\t\t\t\tSET \" . $set . \"\n\t\t\t\t\t\tWHERE id_partner = ?\n\t\t\t\t\t\");\n //Execute Query\n $_query->execute($_parameters);\n //Tratamento da resposta\n if (is_null($_query->errorInfo())) {\n $this->_response[\"status\"] = false;\n $this->_response[\"error\"] = $_query->errorInfo();\n } else {\n $this->_response[\"status\"] = true;\n }\n return $this->_response;\n }\n );\n }", "public function waitservicelistAction()\n {\n\n $uid = $this->_USER_ID;\n $floorId = $this->getParam('CF_floorid');\n\n $mbllApi = new Mbll_Tower_ServiceApi($uid);\n $aryRst = $mbllApi->getWaitServiceList($floorId);\n\n if (!$aryRst || !$aryRst['result']) {\n $errParam = '-1';\n if (!empty($aryRst['errno'])) {\n $errParam = $aryRst['errno'];\n }\n return $this->_redirectErrorMsg($errParam);\n }\n\n //service list info\n $waitServiceList = $aryRst['result']['list'];\n\n foreach ($waitServiceList as $key => $value) {\n $guest = Mbll_Tower_GuestTpl::getGuestDescription($value['tp']);\n //guest name\n $guestName = explode(\"|\", $guest['des']);\n $waitServiceList[$key]['name'] = $guestName[0];\n //need item\n $needItem = Mbll_Tower_ItemTpl::getItemDescription($value['ac']);\n $waitServiceList[$key]['ac_name'] = $needItem['name'];\n //mood picture\n $waitServiceList[$key]['moodPic'] = round($value['ha']/10)*10;\n\n $waitServiceList[$key]['ha_emoj'] = Mbll_Tower_Common::getMoodDesc($value['ha']);\n //leave time\n $waitServiceList[$key]['remain_hour'] = floor(($value['ot'] - $value['ct'])/3600);\n $waitServiceList[$key]['remain_minute'] = strftime('%M', $value['ot'] - $value['ct']);\n }\n\n $this->view->waitServiceList = $waitServiceList;\n $this->view->countService = count($waitServiceList);\n $this->view->floorid = $floorId;\n $this->render();\n }", "public function testUpdateService()\n {\n\n $this->browse(function (Browser $browser) {\n $user = User::factory()->create();\n $service = Service::factory()->create();\n $serviceUpdate = Service::factory()->make();\n $browser->visit('/login')\n ->pause(3000)\n ->type('email', $user->email)\n ->type('password', 'password')\n ->press('Login')\n ->pause(2000)\n ->assertPathIs('/service')\n ->visit('/service/update/'.$service->id)\n ->pause(1000)\n ->type('descricao', $serviceUpdate->descricao)\n ->type('valor', $serviceUpdate->valor)\n ->press('Editar')\n ->pause(1000)\n ->assertSee(Constantes::SUCESSO_UPDATE_SERVICE)\n ->press('OK')\n ->pause(1000);\n\n });\n }", "protected function listUpdates() {}", "public function UpdateServices(UpdateServices $parameters)\n {\n return $this->__soapCall('UpdateServices', array($parameters));\n }", "public function updateStatus(): void\n {\n $data = json_encode($this->getStatus(), JSON_PRETTY_PRINT);\n File::put(public_path(self::STATUS_FILE_NAME), $data);\n }", "private function reload_services( $services ) {\n\t\t$reload_command = [\n\t\t\t'nginx' => 'nginx sh -c \\'nginx -t && service openresty reload\\'',\n\t\t\t'php' => 'php kill -USR2 1'\n\t\t];\n\n\t\tforeach( $services as $service ) {\n\t\t\t$this->run_compose_command( 'exec', $reload_command[ $service ], 'reload', $service );\n\t\t}\n\t}", "public function updated(SaleService $saleService)\n {\n //\n }", "public function updateInviteeStatusList(Classes\\UpdateInviteeStatusListRequest $arg) {\n\t\treturn $this->makeSoapCall(\"updateInviteeStatusList\", $arg);\n\t}", "public function updateBaseServiceStatus($userid, $service, $action)\n {\n $sql = \"update subscriber_services ss\n inner join services se\n on ss.service_id = se.service_id\n set provisioned_state = ?\n where ss.subs_id = ?\n and se.service_desc = ?\";\n\n return $this->connection->executeUpdate($sql, [$action, $userid, $service ]);\n }", "private function _handleSofortStatusUpdate(array $statusData)\n {\n \n $allowedStates = array(\n 'loss' => array('not_credited'), \n 'pending' => array('not_credited_yet'), \n 'received' => array('credited'), \n 'refunded' => array('refunded'), \n 'untraceable' => array('sofort_bank_account_needed')\n );\n \n if (array_key_exists($statusData['status'], $allowedStates) \n && in_array($statusData['reason'], $allowedStates[$statusData['status']])) {\n \n if ($statusData['status'] === 'untraceable' && $statusData['reason'] === 'sofort_bank_account_needed') {\n $statusData['status'] = 'pending';\n $statusData['reason'] = 'not_credited_yet';\n }\n \n $status = $statusData['status'];\n $reason = $statusData['reason'];\n \n $selectedStatus = Mage::getStoreConfig(\n 'payment/paymentnetwork_pnsofortueberweisung/order_status_' . $status . '_' . $reason, \n Mage::app()->getStore()->getStoreId()\n );\n \n if (!empty($selectedStatus)) {\n $this->_handleMagentoStatusUpdate($statusData, $selectedStatus);\n } else {\n $this->_getOrder()->addStatusHistoryComment($this->_getHistoryComment($statusData))->save();\n }\n \n $this->_handleDocumentCreation($statusData);\n } else {\n $this->_getOrder()->addStatusHistoryComment($this->_getHistoryComment($statusData))->save();\n }\n }", "public function actionajaxServiceTypeStatus()\n {\n \t //echo \"<pre>\";print_r($_REQUEST);die;\n \t $id=$_REQUEST['id'];\n \t $rec=ServiceTypes::model()->findByPk($id);\n \t $status=$rec->status;\n \n if($status==0)\n {\n \t $rec->status=1;\n \t $rec->save(false);\n\n }\t\n else\n {\n \t $rec->status=0;\n \t $rec->save();\n\n }\n\n\n }", "public function getServiceStatus($requestParameters = array());", "public function updateBookingStatus($booking_ids) {\n\t\tforeach($booking_ids as $booking_id){\n\t\t\t$this->Booking->query(\"\t\n\t\t\t\t\tUPDATE \tbookings\n\t\t\t\t\tSET \tbookings.current_status='Payment Completed', \n\t\t\t\t\t\t\tbookings.status_history=concat(bookings.status_history, ',Payment Completed'),\n\t\t\t\t\t\t\tbookings.status='1'\n\t\t\t\t\tWHERE\tbookings.id='\".($booking_id).\"'\n\t\t\t\t\tAND\t(SELECT SUM(payments.amount_paid) FROM payments WHERE payments.booking_id='\".($booking_id).\"')>=bookings.amount\");\n\t\t}\n\t}", "public function setStatus($array);", "public function actionUpdate()\n {\n $model = new UpdateService();\n\n $serviceId = BaseRequest::getParamOnUrl('id');\n $service = $this->viewOne('service');\n\n if($this->update($model,$service)){\n $this->setFlash('update_service','Service content update success');\n return $this->goHome();\n }\n return $this->render('update',['model' => $model,'service' => $service]);\n }", "public function updateUrgencyStatuses() {\n\n\n $deadlineOverdue = date('Y-m-d H:i:s', strtotime('-' . Configure::read('TICKET.OVERDUE_DAYS') . ' days'));\n $overdueTickets = $this->getPendingTicketsByAge($deadlineOverdue);\n\n foreach ($overdueTickets as $i => $overdueTicket) {\n\n $this->id = $overdueTicket['Ticket']['ticket_id'];\n $overdueTicket['Ticket']['status'] = 'Overdue';\n $this->save($overdueTicket, array('validate' => false, 'modified' => false, 'callbacks' => false));\n }\n\n\n $deadlineUrgend = date('Y-m-d H:i:s', strtotime('-' . Configure::read('TICKET.URGEND_DAYS') . ' days'));\n $urgendTickets = $this->getPendingTicketsByAge($deadlineUrgend, array('New', 'Requested'));\n\n foreach ($urgendTickets as $i => $urgendTicket) {\n\n $this->id = $urgendTicket['Ticket']['ticket_id'];\n $urgendTicket['Ticket']['status'] = 'Urgend';\n $this->save($urgendTicket, array('validate' => false, 'modified' => false, 'callbacks' => false));\n }\n\n }", "public function updateStatusFinish()\n {\n $this->resetStatuses();\n }", "public static function getListServices () {\n return self::findByStatus(self::STATUS_ACTIVE);\n }", "public function edit(Services $services)\n {\n //\n }", "public function edit(Services $services)\n {\n //\n }", "public function edit(Services $services)\n {\n //\n }", "public function update(Request $request, $id)\n {\n \n\n $data = $request->all();\n\n $item = Service::findOrFail($id);\n\n\n $item->update($data);\n\n $UserFamilies = UserFamilies::where('id', $item->user_families_id);\n\n if ($item->service_status === 'ACCEPTED') {\n $UserFamilies->update(['userfamily_status' => 'NON ACTIVE']);\n } else {\n if ($item->service_status === 'PROCESS') {\n $UserFamilies->update(['userfamily_status' => 'PENDING']);\n } else {\n if ($item->service_status === 'CANCEL') {\n $UserFamilies->update(['userfamily_status' => 'ACTIVE']);\n }\n }\n }\n\n\n return redirect()->route('service.index')->with('success','Data berhasil diubah');\n }", "public function update(ServicesFormRequest $request)\n {\n $id = $request->input('id');\n $service = \\App\\Services::find($id);\n $service->title = $request->input('title');\n $service->summary = $request->get('summary');\n $service->description = $request->get('description');\n $service->price = $request->get('price');\n $service->display_order = $request->get('display_order');\n $service->is_active = $request->has('is_active') ? 1 : 0;\n $service->save();\n @$message .= 'Service updated.<br/>';\n $fileprefix = 'service-';\n $filepath = 'pictures/';\n $filename = str_replace('tmp/', '', $request->input('tmp_img_path_main'));\n if (is_file('tmp/' . $filename)) {\n \\File::move('tmp/' . $filename, $filepath . $fileprefix . $filename);\n $service->image = $filepath . $fileprefix . $filename;\n $service->save();\n @$message .= 'Picture saved.<br/>';\n } //is_file('tmp/' . $filename)\n return redirect('/admin/services/edit/' . $id)->withMessage($message);\n }", "public function check_list_id_service(){\n $response = array();\n $response['success'] = false;\n $response['connected'] = false;\n\n if( ! $this->is_valid_nonce( 'xbox_ajax_nonce' ) ){\n die();\n }\n\n if( ! isset( $_POST['service'] ) || ! isset( $_POST['list_id'] ) ){\n wp_send_json( $response );\n }\n\n $services = $this->plugin->options_manager->get_integrated_services( true, true );\n\n if( empty( $services ) ){\n wp_send_json( $response );\n }\n\n $service = Services::get_instance( $_POST['service'], array(\n 'api_key' => $services[$_POST['service']]['service-api-key'],\n 'token' => $services[$_POST['service']]['service-token'],\n 'url' => $services[$_POST['service']]['service-url'],\n 'email' => $services[$_POST['service']]['service-email'],\n 'password' => $services[$_POST['service']]['service-password'],\n ) );\n\n if( is_object( $service ) ){\n $all_services = Services::get_all();\n $allow_get_lists = $all_services[$_POST['service']]['allow']['get_lists'];\n if( $allow_get_lists ){\n if( $service->is_connect() ){\n $response['connected'] = true;\n if( $service->set_list_id( $_POST['list_id'] ) ){\n $response['success'] = true;\n }\n }\n } else{\n $response['connected'] = true;\n $response['success'] = true;\n }\n }\n wp_send_json( $response );\n }", "public function setServices($services) {\n $this->services = $services;\n }", "public function massStatusAction()\n {\n $kstitemIds = $this->getRequest()->getParam('kstitem');\n if (!is_array($kstitemIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_kst')->__('Please select items.')\n );\n } else {\n try {\n foreach ($kstitemIds as $kstitemId) {\n $kstitem = Mage::getSingleton('bs_kst/kstitem')->load($kstitemId)\n ->setStatus($this->getRequest()->getParam('status'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d items were successfully updated.', count($kstitemIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_kst')->__('There was an error updating items.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }", "protected function bulkStatus($value, array $ids) {\r\n if(!in_array($value, array_keys(Schedule::getStatusArray()))) {\r\n return false;\r\n }\r\n\r\n $schedules = Schedule::find()->where([\r\n \"user_id\"=>Yii::$app->user->id,\r\n \"id\"=>$ids,\r\n ])->all();\r\n\r\n $html = '';\r\n\r\n foreach($schedules as $schedule) {\r\n $schedule->setUser(Yii::$app->getUser()->getIdentity());\r\n $schedule->status = $value;\r\n if($schedule->save()) {\r\n if($value == Schedule::STATUS_ENABLED) {\r\n $msg = Yii::t(\"app\", \"Cron job (ID: {id}) has been enabled.\", [\"id\"=>$schedule->id]);\r\n } else {\r\n $msg = Yii::t(\"app\", \"Cron job (ID: {id}) has been disabled.\", [\"id\"=>$schedule->id]);\r\n }\r\n $html .= '<div class=\"alert alert-success margin-r-20\">'.$msg.'</div>';\r\n } else {\r\n $html .= '<div class=\"alert alert-danger margin-r-20\">'.Html::errorSummary($schedule, [\r\n \"header\"=>Yii::t(\"app\", \"Error\") . \" | \" . Html::encode($schedule->title)\r\n ]).'</div>';\r\n }\r\n }\r\n\r\n Yii::$app->getSession()->setFlash(\"neutral\", $html);\r\n return $this->refresh();\r\n }", "function updateStatus(){\n\t\t$this->setPost();\n\n\t\t$postData = $_POST;\n\n\t\tif($postData->status_id == 1){\n\t\t\t$updateData = array('status_id' => 2);\n\t\t}else{\n\t\t\t$updateData = array('status_id' => 1);\n\t\t}\n\n\t\t$where = array('id' => $postData->id);\n\n\t\t$result = $this->base_model->updateCommon($this->primaryTable, $updateData, $where);\n\n\t\t$response = array('status' => TRUE, 'message' => 'Document status updated successfully.');\n\n\t\techo json_encode($response);\n\t}", "public function setServices($services)\n {\n $this->services = $services;\n }", "public function update_status(Request $request, $id)\n {\n $status_options = [\n 'pending',\n 'in review',\n 'processing',\n 'completed',\n 'cancelled',\n 'refound',\n 'failed',\n ];\n if($request->has('status') && in_array($request->get('status'), $status_options)){\n $this->model->find($id)->update(['status' => $request->get('status')]);\n return redirect()->back()->with('success', 'Order status has been updated to <strong class=\"text-uppercase\">'.$request->get('status').'</strong>!');\n }\n }", "public function setStatus(?array $status): void\n {\n $this->status['value'] = $status;\n }", "public function updateStatus() {\n $ref = ORM::forTable('referrals')\n ->findOne($this->data['id']);\n if ($this->data['status'] == 'Assigned' && $this->data['route_id']) {\n $route = ORM::forTable('estimate_routes')\n ->findOne($this->data['route_id']);\n $assignedReferralsCount = ORM::forTable('referrals')\n ->select('id')\n ->where('route_id', $route->id)\n ->count();\n $ref->route_id = $this->data['route_id'];\n $ref->status = 'Assigned';\n $ref->route_order = $assignedReferralsCount;\n\n } elseif ($this->data['status'] == 'Pending') {\n $ref->status = 'Pending';\n $ref->route_order = 0;\n $ref->route_id = NULL;\n } else {\n $ref->status = $this->data['status'];\n }\n if ($ref->save()) {\n $this->renderJson([\n 'success' => true,\n 'message' => 'Job request status updated successfully'\n ]);\n } else {\n $this->renderJson([\n 'success' => false,\n 'message' => 'An error has occurred while saving job request'\n ]);\n }\n }", "function createServiceStatus(){\n\t\t\t$serviceStatusRepo = new serviceStatusRepository;\t\t\t\n\t\t\t$serviceStatusRepo->createServiceStatus($_POST['ServiceID'], $_POST['ServiceOwnerID'], $_POST['RequesterUserID']);\n\t\t}", "public function updateStatusOnNewDay() {\n // Update advs\n UIAdv::where('last_update_time', '<', Carbon::now()->subDays(1))->where('status', '=', 1)->update([\n 'last_update_time' => Carbon::now(),\n 'status' => 0\n ]);\n\n // Update advgroups\n UIAdvGroup::where('last_update_time', '<', Carbon::now()->subDays(1))->where('status', '=', 1)->update([\n 'last_update_time' => Carbon::now(),\n 'status' => 0\n ]);\n\n // Update campaign\n UICampaign::where('last_update_time', '<', Carbon::now()->subDays(1))->where('status', '=', 1)->update([\n 'last_update_time' => Carbon::now(),\n 'status' => 0\n ]);\n\n // Update project\n UIProject::where('last_update_time', '<', Carbon::now()->subDays(1))->where('status', '=', 1)->update([\n 'last_update_time' => Carbon::now(),\n 'status' => 0\n ]);\n }", "public function massStatusAction()\n {\n $traineecertIds = $this->getRequest()->getParam('traineecert');\n if (!is_array($traineecertIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_traineecert')->__('Please select trainee certificates.')\n );\n } else {\n try {\n foreach ($traineecertIds as $traineecertId) {\n $traineecert = Mage::getSingleton('bs_traineecert/traineecert')->load($traineecertId)\n ->setStatus($this->getRequest()->getParam('status'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d trainee certificates were successfully updated.', count($traineecertIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_traineecert')->__('There was an error updating trainee certificates.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }", "public function updateStatus()\n {\n $this->Invoice->updateInvoiceStatus($this->input->post('id'));\n }", "public function update(Service $request, Services $services, $id)\n {\n \n \n $service = Services::find($id);\n \n if($request->hasFile('image')){\n $image = $request->image;\n $image_new_name = time().$image->getClientOriginalName();\n $image->move('admin/img/', $image_new_name);\n $service->image = 'admin/img/'. $image_new_name; \n }\n $service->name = $request->name;\n \n $service->order = $request->order;\n $service->save();\n \n return redirect()->route('Service.index');\n \n }", "public function update(Request $request, $id) {\n\t\t\n\t\t$services = Service::findOrFail($request->submit);\n\n\t\t$services -> update(['technician' => $request -> technician, 'status' => 'Working' ]);\n\n\t\t$user = User::where('id', '=', $services -> user_id) -> get() -> first();\n\n\t\tif (isset($services -> technician) && ($services -> status == \"Working\")) {\n\n\t\t\tMail::send('auth/emails.statusWorking', ['services' => $services], function($m) use ($user) {\n\n\t\t\t\t$m -> from('[email protected]', 'Team AfterCares');\n\n\t\t\t\t$m -> to($user -> email, $user -> name) -> subject('We are working on your request now');\n\t\t\t});\n\n\t\t\treturn back() -> withInput();\n\t\t}\n\n\t}", "public function massStatusAction()\n {\n $scheduleIds = $this->getRequest()->getParam('schedule');\n if (!is_array($scheduleIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_schedule')->__('Please select schedule.')\n );\n } else {\n try {\n foreach ($scheduleIds as $scheduleId) {\n $schedule = Mage::getSingleton('bs_schedule/schedule')->load($scheduleId)\n ->setStatus($this->getRequest()->getParam('status'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d schedule were successfully updated.', count($scheduleIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_schedule')->__('There was an error updating schedule.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }", "function update_status($status) {\n\tglobal $pkg_interface;\n\n\tif ($pkg_interface == \"console\") {\n\t\tprint (\"{$status}\");\n\t}\n\n\t/* ensure that contents are written out */\n\tob_flush();\n}", "function user_services_update($data,$id)\n\t{\n\t\t$this->db->trans_start();\n\t\t\t\n\t\t$this->db->where('user_services_id', $id);\n\t\t$this->db->update('user_services', $data);\n\t\t\n\t\t$this->db->trans_complete();\n\t\t\n\t\tif ($this->db->trans_status() === FALSE)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn 1;\n\t\t}\n\t\n\t}", "private function _getServiceList()\n {\n Modules_CustomServices_DataLayer::init();\n $configs = Modules_CustomServices_DataLayer::loadServiceConfigurations();\n\n // Configs are objects, but the list view needs associative arrays.\n $config_to_array = function($config) {\n return [\n 'name' => '<a href=\"' . htmlspecialchars(pm_Context::getActionUrl('index', 'view') . '/id/' . urlencode($config->unique_id)) . '\">' . htmlspecialchars($config->display_name) . '</a>',\n 'type' => self::_configTypeName($config->config_type),\n 'plesk_service_id' => '<code>' . htmlspecialchars('ext-' . pm_Context::getModuleId() . '-' . $config->unique_id) . '</code>',\n 'run_as_user' => $config->run_as_user\n ];\n };\n $data = array_map($config_to_array, $configs);\n\n // Prepare the list for presentation.\n $list = new pm_View_List_Simple($this->view, $this->_request);\n $list->setData($data);\n $list->setColumns([\n 'name' => [\n 'title' => 'Name',\n 'noEscape' => TRUE,\n 'searchable' => TRUE,\n 'sortable' => TRUE\n ],\n 'type' => [\n 'title' => 'Type',\n 'noEscape' => FALSE,\n 'searchable' => FALSE,\n 'sortable' => FALSE\n ],\n 'plesk_service_id' => [\n 'title' => 'Service ID',\n 'noEscape' => TRUE,\n 'searchable' => TRUE,\n 'sortable' => FALSE\n ],\n 'run_as_user' => [\n 'title' => 'System user',\n 'noEscape' => FALSE,\n 'searchable' => TRUE,\n 'sortable' => TRUE\n ]\n ]);\n $list->setDataUrl(['action' => 'list-data']);\n $list->setTools([\n [\n 'title' => 'Add service (simple)',\n 'description' => 'Add a new service that wraps a process',\n 'class' => 'sb-add-new',\n 'link' => pm_Context::getActionUrl('index', 'add') . '/type/process'\n ],\n [\n 'title' => 'Add service (manual)',\n 'description' => 'Add a new manually controlled service',\n 'class' => 'sb-add-new',\n 'link' => pm_Context::getActionUrl('index', 'add') . '/type/manual'\n ]\n ]);\n return $list;\n }", "public function status()\t{\n\t\t\t$this->veiculo->update($this->input->post('id'), array('veiculo_status' => $this->input->post('status')));\n\t\t}", "public function massStatusAction()\n {\n $curriculumdocIds = $this->getRequest()->getParam('curriculumdoc');\n if (!is_array($curriculumdocIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_curriculumdoc')->__('Please select curriculum docs.')\n );\n } else {\n try {\n foreach ($curriculumdocIds as $curriculumdocId) {\n $curriculumdoc = Mage::getSingleton('bs_curriculumdoc/curriculumdoc')->load($curriculumdocId)\n ->setStatus($this->getRequest()->getParam('status'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d curriculum docs were successfully updated.', count($curriculumdocIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_curriculumdoc')->__('There was an error updating curriculum docs.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }", "public function run()\n {\n Status::insert($this->statusLists);\n }", "protected function renderServicesList() {}", "public function updateServices()\n {\n $array = [\n 'service_id' => request()->input('serviceId'),\n 'serviceName' => request()->input('serviceName'),\n 'servicePrice' => request()->input('servicePrice'),\n 'serviceVisits' => request()->input('serviceVisits'),\n 'serviceDesc' => request()->input('serviceDesc'),\n 'serviceBenefit' => request()->input('serviceBenefit')\n ];\n\n DB::table('tbl_services')->where('service_id',$array['service_id'])->update([\n 'service_name'=>$array['serviceName'],\n 'service_price'=>$array['servicePrice'],\n 'service_visits'=>$array['serviceVisits'],\n 'service_desc'=>$array['serviceDesc'],\n 'service_benefit'=>$array['serviceBenefit']\n ]);\n // dd($dump);\n return redirect('cms/'.$array['service_id']);\n }", "public function updateComponentStatus() {\n $component = Component::updateComponentStatus();\n return \\Response::json($component);\n }", "private function updateStatus()\n {\n $this->setStatus(\n socket_get_status(pfsockopen($this->uri, $this->port))\n );\n }", "function updates($list_item, $params)\n {\n foreach ($list_item as $value) {\n $this->update($params, $value);\n }\n }", "public function getServiceStatus($request);", "public function setStatus(Status $status);", "public function updateStatus(int $projectId);", "public function UpdateStatusFromBookings()\n\t{\tif ($this->id)\n\t\t{\t$this->UpdateStatus(count($this->GetBookings()) >= $this->details['tqty'] ? 'sold_out' : 'in_stock');\n\t\t}\n\t}", "public function setStatuses(&$var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::ENUM, \\Salesorders\\V1\\Status::class);\n $this->statuses = $arr;\n }", "public function massUpdateStatus($answerIds, $status)\n {\n foreach ($answerIds as $answerId) {\n $this->load((int) $answerId)->setAnswerStatusId((int) $status)->save();\n }\n }", "private function changeOperationStatus(\n \\Magento\\AsynchronousOperations\\Api\\Data\\OperationListInterface $operationList,\n array $failedOperations,\n array $uncompletedOperations,\n array $operationSkus\n ) {\n foreach ($operationList->getItems() as $index => $operation) {\n if (isset($failedOperations[$operationSkus[$index]])) {\n $operation->setStatus(OperationInterface::STATUS_TYPE_NOT_RETRIABLY_FAILED);\n $operation->setResultMessage($failedOperations[$operationSkus[$index]]);\n } elseif (!empty($uncompletedOperations)) {\n $operation->setStatus($uncompletedOperations['status']);\n $operation->setErrorCode($uncompletedOperations['error_code']);\n $operation->setResultMessage($uncompletedOperations['message']);\n } else {\n $operation->setStatus(OperationInterface::STATUS_TYPE_COMPLETE);\n $operation->setResultMessage(null);\n }\n }\n $this->entityManager->save($operationList);\n }", "public function update_active()\n\t{\t\n\t\t$change_status=$this->input->post('status_value');\n\t\t$status_record = array('status' => $this->input->post('status_record'));\n\t\t\n\t\tif ($status_record['status'] == 0) {\n\t\t\t$status_record['status'] = 1;\n\t\t}\n\n\t\tforeach ($change_status as $status) {\n\t\t\t\t\t$this->AboutModel->update_status($status , $status_record);\n\t\t\t\t}\n\t\t $this->session->set_flashdata('msg', 'Status Changed Successfully ');\n\t}", "public function update_business_services_slots() {\n\n $logged_in_user_details = $this->session->userdata('logged_in_user_data');\n if ($logged_in_user_details->is_logged_in == 1) {\n\n $data['logged_in_user_details'] = $logged_in_user_details;\n $post_data = $this->input->post();\n $update = $this->Cs_vendor->update_service_slots($post_data);\n $data['title'] = \"Zinguplife Customer Support|Business Services\";\n $this->session->set_flashdata('service_slot_success_message', 'Information Updated Successfully');\n redirect('/cs/business_service_edit/' . $post_data['service_id']);\n } else {\n $this->session->set_flashdata('login_required_message', 'Please login to continue !!!.');\n redirect(\"/admin\");\n }\n }", "public function setStatus(string $status): void;", "protected function index() {\n\t\t$service = new Model_Service();\n\t\t//$service->set('active',true);\n\t\t$this->payload->services = $service->find();\n\t}", "public function massStatusAction()\n {\n $offerIds = $this->getRequest()->getParam('offer');\n if (!is_array($offerIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('mfb_myflyingbox')->__('Please select offers.')\n );\n } else {\n try {\n foreach ($offerIds as $offerId) {\n $offer = Mage::getSingleton('mfb_myflyingbox/offer')->load($offerId)\n ->setStatus($this->getRequest()->getParam('status'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d offers were successfully updated.', count($offerIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('mfb_myflyingbox')->__('There was an error updating offers.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }", "public function massStatusAction()\n {\n $traineedocIds = $this->getRequest()->getParam('traineedoc');\n if (!is_array($traineedocIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_traineedoc')->__('Please select trainee document.')\n );\n } else {\n try {\n foreach ($traineedocIds as $traineedocId) {\n $traineedoc = Mage::getSingleton('bs_traineedoc/traineedoc')->load($traineedocId)\n ->setStatus($this->getRequest()->getParam('status'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d trainee document were successfully updated.', count($traineedocIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_traineedoc')->__('There was an error updating trainee document.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }", "public function toggle_statuses(Request $request)\n {\n\t\tif(!count($request->ids))\n\t\treturn response()->json(['status' => 'SUCCESS','message' => __('admin.nothing_selected')]);\n\t\t$tokens = Token::findMany($request->ids);\n\t\t// foreach ($tokens as $token ){\n\t\t// \t$this->authorize('update', $token);\n\t\t// }\n Token::where('active','!=', 3)->whereIn('id', $request->ids)->update(['active'=>$request->status]);\n\t\t$action= $request->status == 1 ? __('admin.Activated'): __('admin.Deactivated');\n\t\treturn response()->json(['status' => 'SUCCESS','message' => __('admin.action_ok',['item'=>__('tokens.Token'),'action'=> $action ])]);\n }", "public function update(Request $request, Service $service)\n {\n if (!$request->name) {\n $service->update([\n 'status' => $request->status,\n 'charge' => $request->charge\n ]);\n\n return back()->with('status', '¡Servicio cobrado con éxito!');\n }\n\n $service->update($request->all());\n\n return back()->with('status', '¡Servicio actualizado con éxito!');\n }", "public function updateStatus()\n {\n $this->status = Cart::CART_STATUS_ORDERED;\n $this->save();\n }", "public function updateToDoList(){\n\t\t$db = $this->db;\n\t\tif(count($this->errors)<1 && is_array($this->toDoList)){ //no error, to do list is an array\n\t\t\t\n\t\t\tforeach($this->toDoList as $item){\n\t\t\t\t$itemUUID = $item[\"itemUUID\"];\n\t\t\t\t$where = array();\n\t\t\t\t$where[] = \"itemUUID = '$itemUUID' \";\n\t\t\t\t$data = array('solr_indexed' => 1);\n\t\t\t\t$db->update('noid_bindings', $data, $where);\n\t\t\t}\n\t\t\t\n\t\t\t$this->totalIndexed = count($this->toDoList);\n\t\t}\n }" ]
[ "0.6621634", "0.6532585", "0.6461127", "0.64142805", "0.639287", "0.6369591", "0.63390523", "0.6298918", "0.62922907", "0.6215053", "0.619058", "0.619058", "0.6136992", "0.6097271", "0.6083418", "0.60473", "0.60130614", "0.5994864", "0.5939064", "0.59371185", "0.5877184", "0.58448094", "0.5774453", "0.5741484", "0.5739016", "0.5713284", "0.5700105", "0.56852365", "0.5613697", "0.5607399", "0.5601546", "0.560128", "0.55940354", "0.55742526", "0.5569385", "0.5562921", "0.55514485", "0.55253875", "0.5496257", "0.5487219", "0.54849637", "0.5480767", "0.5459925", "0.54532063", "0.54098517", "0.54028124", "0.5389202", "0.5385889", "0.5384031", "0.5376956", "0.5354532", "0.5349086", "0.5349086", "0.5349086", "0.53484046", "0.5347468", "0.53439814", "0.5336667", "0.5327508", "0.53221655", "0.5317094", "0.5311729", "0.5298379", "0.52961874", "0.52959013", "0.5295699", "0.5293269", "0.528821", "0.5282864", "0.5281937", "0.5276323", "0.52701205", "0.52688056", "0.52682215", "0.52652425", "0.52593696", "0.5259131", "0.5259126", "0.52539957", "0.5250079", "0.5247098", "0.524143", "0.5241301", "0.5240307", "0.52387637", "0.5233894", "0.52234477", "0.5223059", "0.5219619", "0.52165335", "0.5216163", "0.52091855", "0.5206446", "0.52045727", "0.51963687", "0.5196212", "0.5195857", "0.51906425", "0.5188144", "0.51820517" ]
0.7052105
0
/! \brief Updates the status of a service and calls an external hook if specified in fusiondirectory.conf
private function updateSingleServiceStatus($action, $service) { if ($this->plugins[$service]->is_account) { $this->updateServicesVars($service); $s_daemon = new supportDaemon(); if ($s_daemon->is_error()) { msg_dialog::display( sprintf(_("Could not get execute action %s on service %s."), $action, $service), msgPool::siError($s_daemon->get_error()), ERROR_DIALOG ); } else { $target = array($this->parent->getBaseObject()->netConfigDNS->macAddress); if ($action == 'status') { $res = $s_daemon->append_call("Service.is_running", $target, array("args" => array($service))); if ($s_daemon->is_error()) { msg_dialog::display( sprintf(_("Could not get execute action %s on service %s."), $action, $service), msgPool::siError($s_daemon->get_error()), ERROR_DIALOG ); } else { $this->plugins[$service]->setStatus($res == "yes"?"running":"stopped"); } } else { $res = $s_daemon->append_call("Service.manage", $target, array("args" => array($service, $action))); if ($s_daemon->is_error()) { msg_dialog::display( sprintf(_("Could not get execute action %s on service %s."), $action, $service), msgPool::siError($s_daemon->get_error()), ERROR_DIALOG ); } elseif (preg_match("/^done/", $res)) { $this->plugins[$service]->setStatus(self::$actionStatus[$action]); } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update_status();", "public function testUpdateService()\n {\n\n }", "public function hookUpdate(): void\n {\n $this->say(\"Executing the Plugin's update hook...\");\n $this->_exec(\"php ./src/hook_update.php\");\n }", "public function updating(Service $Service)\n {\n //code...\n }", "public function testUpdateServiceData()\n {\n\n }", "function update_status()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\t\n\t\tif(!empty($data['t']) && !empty($data['list'])) $response = $this->_tender->update_status($data['t'], explode('--',$data['list']));\n\t\t\n\t\t# all good\n\t\tif(!empty($response) && $response['boolean']){\n\t\t\t$data['msg'] = 'The Invitation for Bids/Quotations status has been updated.';\n\t\t\t$data['area'] = 'refresh_list_msg';\n\t\t} \n\t\t# there was an error\n\t\telse {\n\t\t\t$data['msg'] = (!empty($data['t']) && !empty($data['list']))? 'ERROR: There was an error updating the Invitation for Bids/Quotations status.': 'ERROR: This action can not be resolved';\n\t\t\t$data['area'] = 'basic_msg';\n\t\t}\n\t\t\n\t\t$this->load->view('addons/basic_addons', $data);\n\t}", "function updateServiceStatus($action, $target, $all)\n {\n /* Skip if this is a new server */\n if ($this->dn == \"new\") {\n msg_dialog::display(_(\"Information\"), _(\"Cannot update service status until it has been saved!\"), INFO_DIALOG);\n return;\n }\n\n /* Is this an existing action */\n if (!isset(self::$actionStatus[$action])) {\n msg_dialog::display(_(\"Error\"), _(\"Unknown action $action\"), ERROR_DIALOG);\n return;\n }\n\n /* Handle state changes for services */\n foreach ($target as $service) {\n $this->updateSingleServiceStatus($action, $service);\n }\n }", "function update_status($status) {\n\tglobal $pkg_interface;\n\n\tif ($pkg_interface == \"console\") {\n\t\tprint (\"{$status}\");\n\t}\n\n\t/* ensure that contents are written out */\n\tob_flush();\n}", "public function updated(Service $Service)\n {\n //code...\n }", "public function updated(Service $service)\n {\n //\n }", "function update_status()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\tif(!empty($data['t']) && !empty($data['list'])) $result = $this->_bid->update_status($data['t'], explode('--',$data['list']));\n\t\t\n\t\t$data['msg'] = !empty($result['boolean']) && $result['boolean']? 'The bid status has been changed.': 'ERROR: The bid status could not be changed.';\n\t\t\n\t\t$data['area'] = 'refresh_list_msg';\n\t\t$this->load->view('addons/basic_addons', $data);\n\t}", "public function run_service()\n\t{\n\t\t// Route the API task\n\t\t$this->_route_api_task();\n\t}", "public function updateBaseServiceStatus($userid, $service, $action)\n {\n $sql = \"update subscriber_services ss\n inner join services se\n on ss.service_id = se.service_id\n set provisioned_state = ?\n where ss.subs_id = ?\n and se.service_desc = ?\";\n\n return $this->connection->executeUpdate($sql, [$action, $userid, $service ]);\n }", "function changeServiceStatus ($pid_arr)\n{\n global $_TABLES;\n\n // first, disable all\n DB_query (\"UPDATE {$_TABLES['pingservice']} SET is_enabled = '0'\");\n if (isset($pid_arr)) {\n foreach ($pid_arr as $pid) { //enable those listed\n $pid = addslashes (COM_applyFilter ($pid, true));\n if (!empty ($pid)) {\n DB_query (\"UPDATE {$_TABLES['pingservice']} SET is_enabled = '1' WHERE pid = '$pid'\");\n }\n }\n }\n}", "public function changeFeaturedService($arrParam = null, $options = null) {\n\t\tif ($options['task'] == 'admin-service-change-featured-service') {\n\t\t\t$cid = $arrParam['cid'];\n\t\t\tif (count($cid) > 0) {\t\t\t\t//----- change lock status cho nhieu doi tuong\n\t\t\t\tswitch ($arrParam['type']) {\n\t\t\t\t\tcase 'active':\n\t\t\t\t\t\t$featured_service = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'inactive':\n\t\t\t\t\t\t$featured_service = 0;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t$strId = implode(',', $cid);\n\t\t\t\t$data = array('featured_service'=>$featured_service);\n\t\t\t\t$where = 'id IN (' .$strId .')';\n\t\t\t\t$this->update($data, $where);\n\t\t\t}\n\t\t\tif (isset($arrParam['id'])) {\t\t//----- change status cho mot doi tuong\n\t\t\t\t$id = $arrParam['id'];\n\t\t\t\tswitch ($arrParam['type']) {\n\t\t\t\t\tcase 'active':\n\t\t\t\t\t\t$featured_service = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'inactive':\n\t\t\t\t\t\t$featured_service = 0;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t$data = array('featured_service'=>$featured_service);\n\t\t\t\t$where = 'id = ' .$id;\n\t\t\t\t$this->update($data, $where);\n\t\t\t}\n\t\t}\n\t\n\t}", "public function testUpdateService()\n {\n\n $this->browse(function (Browser $browser) {\n $user = User::factory()->create();\n $service = Service::factory()->create();\n $serviceUpdate = Service::factory()->make();\n $browser->visit('/login')\n ->pause(3000)\n ->type('email', $user->email)\n ->type('password', 'password')\n ->press('Login')\n ->pause(2000)\n ->assertPathIs('/service')\n ->visit('/service/update/'.$service->id)\n ->pause(1000)\n ->type('descricao', $serviceUpdate->descricao)\n ->type('valor', $serviceUpdate->valor)\n ->press('Editar')\n ->pause(1000)\n ->assertSee(Constantes::SUCESSO_UPDATE_SERVICE)\n ->press('OK')\n ->pause(1000);\n\n });\n }", "public function run_service()\n\t{\n\t\t// Check the request is allowed\n\t\tif ($this->_is_api_request_allowed())\n\t\t{\n\t\t\t// Route the API task\n\t\t\t$this->_route_api_task();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Set the response to \"ACCESS DENIED\"\n\t\t\t$this->set_response($this->get_error_msg(006));\n\n\t\t\t// Terminate execution\n\t\t\treturn;\n\t\t}\n\t}", "protected function callService ()\n\t{\n\t\t$this->protocol->callService( $this->data ) ;\n\t}", "function update_status(){\n $service_id=$this->uri->segment(4);\n $status=$this->uri->segment(5);\n $this->services->update_service_status($service_id,$status);\n $this->session->set_flashdata(\"success_msg\",\"Service status has been updated successfully.\");\n redirect(site_url(\"admin/services\"));\n }", "function saveService ($pid, $name, $site_url, $ping_url, $method, $enabled)\n{\n global $_CONF, $_TABLES, $LANG_TRB;\n\n $enabled = ($enabled == 'on' ? 1 : 0);\n if ($method == 'extended') {\n $method = 'weblogUpdates.extendedPing';\n } else {\n $method = 'weblogUpdates.ping';\n }\n\n $name = strip_tags (COM_stripslashes ($name));\n $site_url = strip_tags (COM_stripslashes ($site_url));\n $ping_url = strip_tags (COM_stripslashes ($ping_url));\n\n $errormsg = '';\n if (empty ($name)) {\n $errormsg = $LANG_TRB['error_site_name'];\n } else {\n // all URLs must start with http: or https:\n $parts = explode (':', $site_url);\n if (($parts[0] != 'http') && ($parts[0] != 'https')) {\n $errormsg = $LANG_TRB['error_site_url'];\n } else {\n $parts = explode (':', $ping_url);\n if (($parts[0] != 'http') && ($parts[0] != 'https')) {\n $errormsg = $LANG_TRB['error_ping_url'];\n }\n }\n }\n\n if (!empty ($errormsg)) {\n return editServiceForm ($pid, $errormsg, $name, $site_url, $ping_url,\n $method, $enabled);\n }\n\n $name = addslashes ($name);\n $site_url = addslashes ($site_url);\n $ping_url = addslashes ($ping_url);\n\n if ($pid > 0) {\n DB_save ($_TABLES['pingservice'],\n 'pid,name,site_url,ping_url,method,is_enabled',\n \"'$pid','$name','$site_url','$ping_url','$method','$enabled'\");\n } else {\n DB_save ($_TABLES['pingservice'],\n 'name,site_url,ping_url,method,is_enabled',\n \"'$name','$site_url','$ping_url','$method','$enabled'\");\n }\n\n return COM_refresh ($_CONF['site_admin_url']\n . '/trackback.php?mode=listservice&amp;msg=65');\n}", "public function update(){\n $service_category = new OsServiceCategoryModel($this->params['service_category']['id']);\n $service_category->set_data($this->params['service_category']);\n if($service_category->save()){\n $response_html = __('Service Category Updated. ID: ', 'latepoint') . $service_category->id;\n $status = LATEPOINT_STATUS_SUCCESS;\n }else{\n $response_html = $service_category->get_error_messages();\n $status = LATEPOINT_STATUS_ERROR;\n }\n if($this->get_return_format() == 'json'){\n $this->send_json(array('status' => $status, 'message' => $response_html));\n }\n }", "public function hook();", "public function do_service() {\n $this->params_wrapper->check();\n $this->params_wrapper->wrap();\n $xml_content = XMLBuilder::buildXML($this->params_wrapper->getWrappedParameters());\n $sympa_client = new SympaPLClient();\n $main_robot_name = strtolower($this->params_wrapper->getWrappedParameter(SympaRemoteConstants::INPUT_RNE)).\".\".$this->config->sympa_main_domain;\n\n\t\t$operation = $this->params_wrapper->getWrappedParameter(SympaRemoteConstants::INPUT_OPERATION);\n\t\t$this->log->LogDebug(\"Operation : \" . $operation);\n\t\tswitch ($operation) {\n\t\t\tcase \"CREATE\":\n\t\t\t\t$sympa_client->createListWithXML($xml_content, $this->params_wrapper->getWrappedParameter(SympaPLClient::ARGUMENT_FAMILLE), $main_robot_name);\n\t\t\t\tbreak;\n\t\t\tcase \"UPDATE\":\n\t\t\t\t$sympa_client->updateListWithXML($xml_content, $this->params_wrapper->getWrappedParameter(SympaPLClient::ARGUMENT_FAMILLE), $main_robot_name);\n\t\t\t\tbreak;\n\t\t\tcase \"CLOSE\":\n\t\t\t\t$listname = $this->params_wrapper->getWrappedParameter(SympaRemoteConstants::INPUT_LIST_NAME_TO_CLOSE);\n\t\t\t\t$sympa_client->closeList($listname);\n\t\t\t\tbreak;\n\t\t}\n }", "public function markServiceComplete()\n {\n $id = (int) $_POST['id'];\n if (empty($id))\n return json_encode(array(\n 'success' => false,\n 'error' => array('message' => 'Invalid service id')\n ));\n\n $uid = (int) $_POST['uid'];\n $companyService = new CompanyService();\n $success = $companyService->markServiceComplete($id);\n if ($success) {\n $notificationService = new NotificationService();\n $notificationService->registerEvent(\n \"project_service_delivered\",\n $id,\n $uid\n );\n\n $notificationService->registerEvent(\n \"project_service_expert_review_requested\",\n $id,\n $uid\n );\n }\n\n return json_encode(array(\n 'success' => $success\n ));\n }", "function editServiceForm ($pid, $msg = '', $new_name = '', $new_site_url = '', $new_ping_url = '', $new_method = '', $new_enabled = -1)\n{\n global $_CONF, $_TABLES, $LANG_TRB, $LANG_ADMIN, $MESSAGE;\n\n $retval = '';\n\n if ($pid > 0) {\n $result = DB_query (\"SELECT * FROM {$_TABLES['pingservice']} WHERE pid = '$pid'\");\n $A = DB_fetchArray ($result);\n } else {\n $A['is_enabled'] = 1;\n $A['method'] = 'weblogUpdates.ping';\n }\n\n if (!empty ($new_name)) {\n $A['name'] = $new_name;\n }\n if (!empty ($new_site_url)) {\n $A['site_url'] = $new_site_url;\n }\n if (!empty ($new_ping_url)) {\n $A['ping_url'] = $new_ping_url;\n }\n if (!empty ($new_method)) {\n $A['method'] = $new_method;\n }\n if ($new_enabled >= 0) {\n $A['is_enabled'] = $new_enabled;\n }\n\n $retval .= COM_siteHeader ('menu', $LANG_TRB['edit_service']);\n\n if (!empty ($msg)) {\n $retval .= showTrackbackMessage ('Error', $msg);\n }\n\n $token = SEC_createToken();\n\n $retval .= COM_startBlock($LANG_TRB['edit_service'], getHelpUrl() . '#ping',\n COM_getBlockTemplate('_admin_block', 'header'));\n $retval .= SEC_getTokenExpiryNotice($token);\n\n $template = new Template ($_CONF['path_layout'] . 'admin/trackback');\n $template->set_file (array ('editor' => 'serviceeditor.thtml'));\n $template->set_var('xhtml', XHTML);\n $template->set_var('site_url', $_CONF['site_url']);\n $template->set_var('site_admin_url', $_CONF['site_admin_url']);\n $template->set_var('layout_url', $_CONF['layout_url']);\n $template->set_var('max_url_length', 255);\n $template->set_var('method_ping', 'weblogUpdates.ping');\n $template->set_var('method_ping_extended', 'weblogUpdates.extendedPing');\n\n $template->set_var('lang_name', $LANG_TRB['service']);\n $template->set_var('lang_site_url', $LANG_TRB['service_website']);\n $template->set_var('lang_ping_url', $LANG_TRB['service_ping_url']);\n $template->set_var('lang_enabled', $LANG_ADMIN['enabled']);\n $template->set_var('lang_method', $LANG_TRB['ping_method']);\n $template->set_var('lang_method_standard', $LANG_TRB['ping_standard']);\n $template->set_var('lang_method_extended', $LANG_TRB['ping_extended']);\n $template->set_var('lang_save', $LANG_ADMIN['save']);\n $template->set_var('lang_cancel', $LANG_ADMIN['cancel']);\n\n if ($pid > 0) {\n $delbutton = '<input type=\"submit\" value=\"' . $LANG_ADMIN['delete']\n . '\" name=\"servicemode[2]\"%s' . XHTML . '>';\n $jsconfirm = ' onclick=\"return confirm(\\'' . $MESSAGE[76] . '\\');\"';\n $template->set_var('delete_option',\n sprintf ($delbutton, $jsconfirm));\n $template->set_var('delete_option_no_confirmation',\n sprintf ($delbutton, ''));\n } else {\n $template->set_var('delete_option', '');\n }\n\n if (isset ($A['pid'])) {\n $template->set_var('service_id', $A['pid']);\n } else {\n $template->set_var('service_id', '');\n }\n if (isset ($A['name'])) {\n $template->set_var('service_name', $A['name']);\n } else {\n $template->set_var('service_name', '');\n }\n if (isset ($A['site_url'])) {\n $template->set_var('service_site_url', $A['site_url']);\n } else {\n $template->set_var('service_site_url', '');\n }\n if (isset ($A['ping_url'])) {\n $template->set_var('service_ping_url', $A['ping_url']);\n } else {\n $template->set_var('service_ping_url', '');\n }\n if ($A['is_enabled'] == 1) {\n $template->set_var('is_enabled', 'checked=\"checked\"');\n } else {\n $template->set_var('is_enabled', '');\n }\n if ($A['method'] == 'weblogUpdates.ping') {\n $template->set_var('standard_is_checked', 'checked=\"checked\"');\n $template->set_var('extended_is_checked', '');\n } else {\n $template->set_var('standard_is_checked', '');\n $template->set_var('extended_is_checked', 'checked=\"checked\"');\n }\n $template->set_var('gltoken_name', CSRF_TOKEN);\n $template->set_var('gltoken', $token);\n\n $template->parse ('output', 'editor');\n $retval .= $template->finish ($template->get_var ('output'));\n\n $retval .= COM_endBlock (COM_getBlockTemplate ('_admin_block', 'footer'));\n $retval .= COM_siteFooter ();\n\n return $retval;\n}", "public function callGetServiceStatus() {\n\t\t$requestArray = $this->signArray();\n\t\treturn $this->getServiceStatus($requestArray);\n\t}", "function startService()\n {\n\n $this->service_link = $this->_openService($this->url . '/' . $this->service_name . $this->wsdl);\n\n }", "private function updateService(Site $siteService){\n #This case requires the serviceService\n $this->checkServiceServiceSet();\n\n #Identify the service\n try {\n $service = $this->serviceService->getService($this->entityID);\n } catch (\\Exception $e) {\n $this->exceptionWithResponseCode(404,\"A service with the specified id could not be found\");\n }\n\n #Authorisation\n $this->checkAuthorisation ($siteService, $service->getParentSite(), $this->userIdentifier, $this->userIdentifierType);\n\n switch($this->entityProperty) {\n case 'extensionproperties':{\n $this->updateServiceExtensionProperties($service);\n break;\n }\n default: {\n $this->exceptionWithResponseCode(501,$this->genericExceptionMessages[\"entityTypePropertyCombo\"]);\n }\n }\n }", "public function changeStatus()\n {\n }", "public function updateStatus(): void\n {\n $data = json_encode($this->getStatus(), JSON_PRETTY_PRINT);\n File::put(public_path(self::STATUS_FILE_NAME), $data);\n }", "function _wsdl_docs_service_update($name, $data) {\n $service_id = _wsdl_docs_get_service_id($name);\n if (is_numeric($service_id)) {\n // Create DOMDocument object if XML validates.\n $wsdl = file_get_contents($data['url']);\n $DOMDocument = _wsdl_docs_validate_xml($wsdl);\n if (!$DOMDocument) {\n return 'Invalid XML.';\n }\n // Load existing WSDL service.\n $service = entity_load_single('wsclient_service', $service_id);\n // Update existing WSDL service's URL.\n $service->url = $data['url'];\n $service->save();\n // update WSDL service's operation nodes\n if ($DOMDocument) {\n wsdl_docs_update_wsclient_service($service, $DOMDocument);\n }\n return \"UPDATE SERVICE: $name, ID: $service_id\";\n }\n return 'WSDL Doc not updated. No WSDL Doc matching the name and resource url was found.';\n}", "function manualUpdate($state, $status){\n\t\t\t$credentials = getUserCredentials();\n\t\t\t\n\t\t\t$this->tHandle = new Twitter( getAppCredentials(), getUSerCredentials() );\n\t\t\t$this->tHandle->postStatus( $state, urldecode($status) );\n\t\t}", "function createServiceStatus(){\n\t\t\t$serviceStatusRepo = new serviceStatusRepository;\t\t\t\n\t\t\t$serviceStatusRepo->createServiceStatus($_POST['ServiceID'], $_POST['ServiceOwnerID'], $_POST['RequesterUserID']);\n\t\t}", "function update_user_status($id, $pref, $value, $deprecated = \\null)\n {\n }", "function user_services_update($data,$id)\n\t{\n\t\t$this->db->trans_start();\n\t\t\t\n\t\t$this->db->where('user_services_id', $id);\n\t\t$this->db->update('user_services', $data);\n\t\t\n\t\t$this->db->trans_complete();\n\t\t\n\t\tif ($this->db->trans_status() === FALSE)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn 1;\n\t\t}\n\t\n\t}", "private function manageStatus()\n {\n $this->updateStatus();\n $this->checkStatus();\n }", "public function testcall(){\n self::updateUserStatus(2,2);\n }", "public function updateStatus($params)\r\n {\r\n }", "public function hooks() {\n $service = new Service($this->license_base);\n add_action('admin_menu', array($this, 'register_license_page'));\n add_action('admin_enqueue_scripts', array($this, 'admin_scripts'), 10);\n // Validate service\n add_action('wp_ajax_validate_service', array($service, 'validate_service'), 10);\n }", "public function actionajaxServiceTypeStatus()\n {\n \t //echo \"<pre>\";print_r($_REQUEST);die;\n \t $id=$_REQUEST['id'];\n \t $rec=ServiceTypes::model()->findByPk($id);\n \t $status=$rec->status;\n \n if($status==0)\n {\n \t $rec->status=1;\n \t $rec->save(false);\n\n }\t\n else\n {\n \t $rec->status=0;\n \t $rec->save();\n\n }\n\n\n }", "function training_services_callback() {\n $server = url($GLOBALS['base_url'] . '/xmlrpc.php', array('external' => TRUE));\n $options = array(\n 'training_services.test' => array(\n 1,\n '2',\n ),\n );\n $results = xmlrpc($server, $options);\n\n return array(\n array(\n '#type' => 'markup',\n '#markup' => $results,\n ),\n );\n}", "public static function updateStatus() {\n $status = lC_Products_Admin::updateStatus($_GET['pid'], $_GET['val']);\n \n if ($status) {\n lC_Cache::clear('category_tree');\n $result['rpcStatus'] = RPC_STATUS_SUCCESS;\n } \n\n echo json_encode($result);\n }", "function iis_get_service_state($service_id)\n{\n}", "public function apiUpdate()\n {\n // Update only if account key existe and Account status is active\n $apiKey = Mage::getStoreConfig('steerfox_plugins/account/api_key');\n $accountStatus = Mage::getStoreConfig('steerfox_plugins/account/status');\n\n if (!empty($apiKey) && 1 == $accountStatus) {\n $coreHelper = Mage::helper('steerfox_plugins/core_data');\n $steerfoxContainer = $coreHelper->getSteerfoxContainer();\n $steerfoxApi = $steerfoxContainer->get('api');\n $steerfoxApi instanceof SteerfoxApiService;\n $result = $steerfoxApi->updateAccount();\n\n if (!$result) {\n Mage::getSingleton('core/session')->addError('Steerfox update account : Error occurred.');\n }\n\n Mage::app()->getStore()->resetConfig();\n }\n }", "public function monitorApiService()\n {\n $this->monitorLastPage();\n $this->monitorOrderList();\n $this->monitorOrderDetails();\n $this->monitorChangeStatus();\n }", "public function updateStatusStart()\n {\n $this->resetStatuses();\n $this->pubDirectory->touch($this->getRelativeFilePath(self::IMPORT_STATUS_BUSY));\n }", "public function add_hooks()\n {\n }", "public function add_hooks()\n {\n }", "public function checkForUpdates()\n\t{\n\t\tif (!is_numeric(BUILD))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// HOOK: proxy module\n\t\tif (Config::get('useProxy')) {\n\t\t\t$objRequest = new \\ProxyRequest();\n\t\t} else {\n\t\t\t$objRequest = new \\Request();\n\t\t}\n\n\t\t$objRequest->send(\\Config::get('liveUpdateBase') . (LONG_TERM_SUPPORT ? 'lts-version.txt' : 'version.txt'));\n\n\t\tif (!$objRequest->hasError())\n\t\t{\n\t\t\t\\Config::set('latestVersion', $objRequest->response);\n\t\t\t\\Config::persist('latestVersion', $objRequest->response);\n\t\t}\n\n\t\t// Add a log entry\n\t\t$this->log('Checked for Contao updates', __METHOD__, TL_CRON);\n\t}", "function listServices()\n{\n global $LANG_ADMIN, $LANG_TRB, $_CONF, $_IMAGE_TYPE, $_TABLES;\n\n require_once $_CONF['path_system'] . 'lib-admin.php';\n\n $retval = '';\n\n $header_arr = array( # display 'text' and use table field 'field'\n array('text' => $LANG_ADMIN['edit'], 'field' => 'edit', 'sort' => false),\n array('text' => $LANG_TRB['service'], 'field' => 'name', 'sort' => true),\n array('text' => $LANG_TRB['ping_method'], 'field' => 'method', 'sort' => true),\n array('text' => $LANG_TRB['service_ping_url'], 'field' => 'ping_url', 'sort' => true),\n array('text' => $LANG_ADMIN['enabled'], 'field' => 'is_enabled', 'sort' => false)\n );\n\n $defsort_arr = array('field' => 'name', 'direction' => 'asc');\n\n $menu_arr = array (\n array('url' => $_CONF['site_admin_url'] . '/trackback.php?mode=editservice',\n 'text' => $LANG_ADMIN['create_new']),\n array('url' => $_CONF['site_admin_url'],\n 'text' => $LANG_ADMIN['admin_home']));\n\n $retval .= COM_startBlock($LANG_TRB['services_headline'], '',\n COM_getBlockTemplate('_admin_block', 'header'));\n\n $retval .= ADMIN_createMenu(\n $menu_arr,\n $LANG_TRB['service_explain'],\n $_CONF['layout_url'] . '/images/icons/trackback.' . $_IMAGE_TYPE\n );\n\n $text_arr = array(\n 'has_extras' => true,\n 'form_url' => $_CONF['site_admin_url'] . '/trackback.php',\n 'help_url' => getHelpUrl() . '#ping'\n );\n\n $query_arr = array(\n 'table' => 'pingservice',\n 'sql' => \"SELECT * FROM {$_TABLES['pingservice']} WHERE 1=1\",\n 'query_fields' => array('name', 'ping_url'),\n 'default_filter' => \"\",\n 'no_data' => $LANG_TRB['no_services']\n );\n\n // this is a dummy variable so we know the form has been used if all services\n // should be disabled in order to disable the last one.\n $form_arr = array('bottom' => '<input type=\"hidden\" name=\"serviceChanger\" value=\"true\"' . XHTML . '>');\n\n $retval .= ADMIN_list('pingservice', 'ADMIN_getListField_trackback',\n $header_arr, $text_arr, $query_arr, $defsort_arr,\n '', SEC_createToken(), '', $form_arr);\n $retval .= COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer'));\n\n if ($_CONF['trackback_enabled']) {\n $retval .= freshTrackback ();\n }\n if ($_CONF['pingback_enabled']) {\n $retval .= freshPingback ();\n }\n\n return $retval;\n}", "function getjellyfinstate()\n{\n # Get Jellyfin server state.\n $commamd = 'sudo service jellyfin status';\n # $? == 0 : Normal.\n # else : failed.\n exec($commamd, $return_array, $return_var);\n if ($return_var == 0) {\n echo 'enable';\n }\n else\n {\n echo 'failed';\n }\n}", "public function markServiceStarted()\n {\n $id = (int) $_POST['id'];\n if (empty($id))\n return json_encode(array(\n 'success' => false,\n 'error' => array('message' => 'Invalid service id')\n ));\n\n $companyService = new CompanyService();\n $success = $companyService->markServiceStarted($id);\n return json_encode(array(\n 'success' => $success\n ));\n }", "public function updateServiceExecutedFlag($member_session_record_id, $flag = 0)\n {\n $save = [];\n $member_session_record = new $this->memberSessionRecord;\n if ($flag == 0) {\n $memberData = ['service_executed' => 1];\n $save = $member_session_record->where('id', $member_session_record_id)->where('service_executed', '=', 0)->update($memberData);\n } else if ($flag == 2) {\n $memberData = ['service_executed' => 1];\n $save = $member_session_record->where('id', $member_session_record_id)->update($memberData);\n } else {\n $session_record_data = $this->getMemberSessionRecordData($member_session_record_id);\n if (!empty($session_record_data->service_execution_status)) {\n $service_execution_status = json_decode($session_record_data->service_execution_status, true);\n $service_status_code = array_column($service_execution_status, \"code\");\n foreach ($service_status_code as $service_status_code_key) {\n if ($service_status_code_key == 200) {\n $status = 3;\n } else {\n $status = 2;\n break;\n }\n }\n $memberData = ['service_executed' => $status];\n $save = $member_session_record->where('id', $member_session_record_id)->update($memberData);\n }\n }\n if ($save) {\n return 1;\n } else {\n return 0;\n }\n }", "function update_blog_status($blog_id, $pref, $value, $deprecated = \\null)\n {\n }", "private function updateStatus(): void\n {\n $shell = $this->getShell();\n $shell->exec(\"docker ps | grep traefik | awk '{print \\$1;}'\");\n if ($shell->getOutput() !== '') {\n $this->started = true;\n $this->containerId = $shell->getOutput();\n } else {\n $this->started = false;\n $this->containerId = null;\n }\n }", "private function callStatus() {\n try {\n $this->status = $this->client->request('GET', $this->url->full_url, [\n 'allow_redirects' => false\n ]);\n } catch (\\Exception $ex) {\n $this->status = $ex->getResponse();\n }\n }", "public function addCheckService($service_id, $service_method, array $applies_checks = [], $needs_incoming_request = FALSE);", "function reload_all() {\n\tsend_event(\"service reload all\");\n}", "public function update_command($service_name) {\n\n // $doctrine represents the database configuration\n $doctrine = $this->sm->get($service_name);\n // schema represents manipulations over tables (alter, drop, create)\n $schema = $doctrine->get_schema();\n\n if(!$doctrine) {\n $this->shell->write_line('Service \"' . $service_name . '\" not found.');\n return;\n }\n \n $schema->update(); // we get the sql (array)\n\n $this->output->write_line(\n $this->formater->set_color(\n 'Update done',\n 'green'\n )\n );\n }", "public function execute_uninstall_hooks() {\r\n\t\t\r\n }", "public function testOrgApacheFelixSystemreadyImplServicesCheck()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/org.apache.felix.systemready.impl.ServicesCheck';\n\n $crawler = $client->request('POST', $path);\n }", "protected static function set_status()\n {\n }", "function drush_pm_updatestatus() {\n // We don't provide for other options here, so we supply an explicit path.\n drush_include_engine('update_info', 'drupal', NULL, DRUSH_BASE_PATH . '/commands/pm/update_info');\n\n // Get specific requests.\n $requests = pm_parse_arguments(func_get_args(), FALSE);\n\n // Get installed extensions and projects.\n $extensions = drush_get_extensions();\n $projects = drush_get_projects($extensions);\n\n // Parse out project name and version.\n $requests = pm_parse_project_version($requests, $projects);\n\n $update_info = _pm_get_update_info($projects);\n\n foreach ($extensions as $name => $extension) {\n // Add an item to $update_info for each enabled extension which was obtained\n // from cvs or git and its project is unknown (because of cvs_deploy or\n // git_deploy is not enabled).\n if (!isset($extension->info['project'])) {\n if ((isset($extension->vcs)) && ($extension->status)) {\n $update_info[$name] = array(\n 'name' => $name,\n 'label' => $extension->label,\n 'existing_version' => 'Unknown',\n 'status' => DRUSH_PM_REQUESTED_PROJECT_NOT_PACKAGED,\n 'status_msg' => dt('Project was not packaged by drupal.org but obtained from !vcs. You need to enable !vcs_deploy module', array('!vcs' => $extension->vcs)),\n );\n // The user may have requested to update a project matching this\n // extension. If it was by coincidence or error we don't mind as we've\n // already added an item to $update_info. Just clean up $requests.\n if (isset($requests[$name])) {\n unset($requests[$name]);\n }\n }\n }\n // Additionally if the extension name is distinct to the project name and\n // the user asked to update the extension, fix the request.\n elseif ((isset($requests[$name])) && ($extension->name != $extension->info['project'])) {\n $requests[$extension->info['project']] = $requests[$name];\n unset($requests[$name]);\n }\n }\n // If specific project updates were requested then remove releases for all\n // others.\n $requested = func_get_args();\n if (!empty($requested)) {\n foreach ($update_info as $name => $project) {\n if (!isset($requests[$name])) {\n unset($update_info[$name]);\n }\n }\n }\n // Add an item to $update_info for each request not present in $update_info.\n foreach ($requests as $name => $request) {\n if (!isset($update_info[$name])) {\n // Disabled projects.\n if ((isset($projects[$name])) && ($projects[$name]['status'] == 0)) {\n $update_info[$name] = array(\n 'name' => $name,\n 'label' => $projects[$name]['label'],\n 'existing_version' => $projects[$name]['version'],\n 'status' => DRUSH_PM_REQUESTED_PROJECT_NOT_UPDATEABLE,\n );\n unset($requests[$name]);\n }\n // At this point we are unable to find matching installed project.\n // It does not exist at all or it is misspelled,...\n else {\n $update_info[$name] = array(\n 'name' => $name,\n 'label' => $name,\n 'existing_version' => 'Unknown',\n 'status'=> DRUSH_PM_REQUESTED_PROJECT_NOT_FOUND,\n );\n }\n }\n }\n\n // If specific versions were requested, match the requested release.\n foreach ($requests as $name => $request) {\n if (!empty($request['version'])) {\n $release = pm_get_release($request, $update_info[$name]);\n if (!$release) {\n $update_info[$name]['status'] = DRUSH_PM_REQUESTED_VERSION_NOT_FOUND;\n }\n else if ($release['version'] == $update_info[$name]['existing_version']) {\n $update_info[$name]['status'] = DRUSH_PM_REQUESTED_CURRENT;\n }\n else {\n $update_info[$name]['status'] = DRUSH_PM_REQUESTED_UPDATE;\n }\n // Set the candidate version to the requested release.\n $update_info[$name]['candidate_version'] = $release['version'];\n }\n }\n // Process locks specified on the command line.\n $locked_list = drush_pm_update_lock($update_info, drush_get_option_list('lock'), drush_get_option_list('unlock'), drush_get_option('lock-message'));\n\n // Build project updatable messages, set candidate version and mark\n // 'updatable' in the project.\n foreach ($update_info as $key => $project) {\n switch($project['status']) {\n case DRUSH_PM_REQUESTED_UPDATE:\n $status = dt('Specified version available');\n $project['updateable'] = TRUE;\n break;\n case DRUSH_PM_REQUESTED_CURRENT:\n $status = dt('Specified version already installed');\n break;\n case DRUSH_PM_REQUESTED_PROJECT_NOT_PACKAGED:\n $status = $project['status_msg'];\n break;\n case DRUSH_PM_REQUESTED_VERSION_NOT_FOUND:\n $status = dt('Specified version not found');\n break;\n case DRUSH_PM_REQUESTED_PROJECT_NOT_FOUND:\n $status = dt('Specified project not found');\n break;\n case DRUSH_PM_REQUESTED_PROJECT_NOT_UPDATEABLE:\n $status = dt('Project has no enabled extensions and can\\'t be updated');\n break;\n default:\n // This can set $project['updateable'] and $project['candidate_version']\n $status = pm_update_filter($project);\n break;\n }\n\n if (isset($project['locked'])) {\n $status = $project['locked'] . \" ($status)\";\n }\n // Persist candidate_version in $update_info (plural).\n if (empty($project['candidate_version'])) {\n $update_info[$key]['candidate_version'] = $project['existing_version']; // Default to no change\n }\n else {\n $update_info[$key]['candidate_version'] = $project['candidate_version'];\n }\n $update_info[$key]['status_msg'] = $status;\n if (isset($project['updateable'])) {\n $update_info[$key]['updateable'] = $project['updateable'];\n }\n }\n\n // Only list projects that have updates available. Use pm-list if you want more info.\n $updateable = pm_project_filter($update_info, drush_get_option('security-only'));\n return $updateable;\n}", "private function updateStatus()\n {\n $this->setStatus(\n socket_get_status(pfsockopen($this->uri, $this->port))\n );\n }", "abstract public function service();", "function switchFavoriteSensorStatus()\n{\n if ($_GET[\"sensor_status\"] == \"OFF\")\n {\n sensorStatusUpdate($_GET[\"id_sensor\"], \"ON\");\n }\n \n else\n {\n sensorStatusUpdate($_GET[\"id_sensor\"], \"OFF\");\n }\n \n seeHomePage();\n}", "function _updateStatus($a_obj_id, $a_usr_id, $a_obj = null, $a_percentage = false, $a_no_raise = false, $a_force_raise = false)\n\t{\n//global $ilLog;\n//$ilLog->write(\"ilLPStatus-_updateStatus-\");\n\n\t\t$status = $this->determineStatus($a_obj_id, $a_usr_id, $a_obj);\n\t\t$percentage = $this->determinePercentage($a_obj_id, $a_usr_id, $a_obj);\n\t\t$changed = self::writeStatus($a_obj_id, $a_usr_id, $status, $percentage);\n\t\t\n\t\tif(!$a_no_raise && \n\t\t\t($changed || $a_force_raise)) // #15529\n\t\t{\n\t\t\tself::raiseEvent($a_obj_id, $a_usr_id, $status, $percentage);\t\t\t\n\t\t}\t\t\t\n\t}", "function status($id)\n{\n $result = _cmd($id, 'query');\n\t$status = null; // service busy by default\n\t\n\tif ( (Config::$Linux && strstr($result, 'Active: active')) // linux\n\t\t|| (!Config::$Linux && strstr($result, 'RUNNING')) ) // windows\n\t\t$status = true;\n\tif ( (Config::$Linux && (strstr($result, 'Active: inactive') || strstr($result, 'Active: failed')) ) // linux\n\t\t|| (!Config::$Linux && strstr($result, 'STOPPED')) ) // windows\n\t\t$status = false;\n\t\t\n\treturn $status;\n}", "function before_update() {}", "public function getServiceStatus($request);", "public function actionUpdate()\n {\n $model = new UpdateService();\n\n $serviceId = BaseRequest::getParamOnUrl('id');\n $service = $this->viewOne('service');\n\n if($this->update($model,$service)){\n $this->setFlash('update_service','Service content update success');\n return $this->goHome();\n }\n return $this->render('update',['model' => $model,'service' => $service]);\n }", "function acf_updates()\n{\n}", "function status();", "function publisher_inject_location_set_status( $location = false ) {\n\n\t\tglobal $publisher_injection_location_status;\n\n\t\t$publisher_injection_location_status = $location;\n\t}", "public function loadCheck($service_id);", "public function checkSDKStatus($force = false) {\n\t\t\n\t\t//call the API at most only once every 5 minutes, not sooner\n\t\tif(!$force && (time()-$this->getConfigValue('api_last_check')) < 5*60) \n\t\t\treturn;\n\t\t\n\t\t//set the latest check time\n\t\t$this->setConfigValue('api_last_check',time());\n\t\t\n\t\t//get an update from the API\n\t\t$message = '';\n\t\tif(is_array($result = $this->getSDKStatus($this->getSecretKey(), $this->getClientId(), $this->getAppKey(), $message)))\n\t\t{\n\t\t \n\t\t\t//save the data\n\t\t\t$this->setConfigValue('api_version', @$result['api_version']);\n\t\t\t$this->setConfigValue('latest_version', @$result['plugin_latest_version']);\n\t\t\t$this->setConfigValue('download_url', @$result['plugin_download_url']);\n\t\t\t$this->setConfigValue('debug', @$result['debug']);\n\t\t\t\n\t\t\t//set the current language the SDK should be displayed in\n\t\t\tif(isset($result['lang'])){\n\t\t\t\t$this->setConfigValue('lang', $result['lang']);\n\t\t\t\tSyC::setLanguage($result['lang']);\n\t\t\t\n\t\t\t\t//check if there is a new translation available for this language\n\t\t\t\tif(!empty($result['lang_checksum']) && $result['lang_checksum'] != SyC::getLanguageChecksum()){\n\t\t\t\t\n\t\t\t\t\t//download the translation\n\t\t\t\t\t$messages = $this->getSDKTranslation(SyC::getLanguage());\n\t\t\t\t\n\t\t\t\t\t//save the translation\n\t\t\t\t\t$this->setConfigValue('messages', $messages);\n\t\t\t\t\t\n\t\t\t\t\t//reset the loaded messages so that the new ones are being used\n\t\t\t\t\tSyC::reloadLanguage();\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\t//simply log the error, for now!\n\t\t\terror_log(print_r($message,true));\n\t\t}\t\n\t}", "public function set_service($service_url)\n\t{\n\t\t$this->api_service = $service_url;\n\t}", "function processStartupCallFusion($request) {\n\t//$logFusion =& LoggerManager::getLogger('fusion');\n\t//$logFusion->debug(\"PBX processStartupCallFusion callstatus=\".$request->get('callstatus').\" uuid=\".$request->get('uuid').\" CallUUID=\".$request->get('callUUID'));\n\t$connector = $this->getConnector();\n\t$connector->handleStartupCallFusion($request);\t\n }", "public static function onUpdateStatusConnector(\\Bitrix\\Main\\Event $event)\n\t{\n\t\t$parameters = $event->getParameters();\n\n\t\tif (($parameters['fields']['ACTIVE'] == 'Y' &&\n\t\t\t$parameters['fields']['CONNECTION'] == 'Y' &&\n\t\t\t$parameters['fields']['REGISTER'] == 'Y' &&\n\t\t\t$parameters['fields']['ERROR'] == 'N') ||\n\t\t\t($parameters['fields']['ERROR'] == 'Y' &&\n\t\t\t$parameters['fields']['ACTIVE'] == 'Y'))\n\t\t{\n\t\t\tself::addSingleLineUpdateAgent($parameters['line']);\n\t\t}\n\t}", "function handle() {\r\r\n new asp_updates_manager(ASP_PLUGIN_NAME, ASP_PLUGIN_SLUG, wd_asp()->updates);\r\r\n }", "public static function SfwUpdate_DoFinisnAction()\n {\n // EXAMPLE\n // global $apbct;\n // $apbct->data['last_firewall_updated'] = current_time('timestamp');\n // $apbct->save('data');\n // $apbct->stats['sfw']['entries'] = $wpdb->get_var('SELECT COUNT(*) FROM ' . APBCT_TBL_FIREWALL_DATA );\n // $apbct->stats['sfw']['last_update_time'] = time();\n // $apbct->save('stats');\n }", "function api_status()\n{\n $result;\n return _do_api_call('GET', '/api/v1/status', null, $result);\n}", "public function __call($service, $params) {\r\n if ($service == \"dispatch\") {\r\n $factory = ZendExt_Component_Factory::getInstance();\r\n $reflection = new ReflectionClass($this->who);\r\n $direccion = $reflection->getFileName();\r\n $claimantBundle = $factory::searchClaimantBundle($direccion);\r\n foreach ($claimantBundle->getListaSourceEvent() as $source) {\r\n if ($source->getId() == $params[0]) {\r\n unset($params[0]);\r\n $source->NotifyChange($params);\r\n break;\r\n }\r\n }\r\n }\r\n }", "function switchSensorStatus()\n{\n if ($_GET[\"sensor_status\"] == \"OFF\")\n {\n sensorStatusUpdate($_GET[\"id_sensor\"], \"ON\");\n }\n \n else\n {\n sensorStatusUpdate($_GET[\"id_sensor\"], \"OFF\");\n }\n \n seeSensors();\n}", "public function status() {\n\t\t// Setup\n\t\t$options = array(\n\t\t\t'appName' => 'cakedaemon',\n\t\t\t'logLocation' => TMP . \"logs\" . DS . 'cakedaemon.log'\n\t\t);\n\t\tSystem_Daemon::setOptions($options);\n\n\t\tif (System_Daemon::isRunning() == true) {\n\t\t\t$this->out('Daemon is running');\n\t\t\texit(0);\n\t\t} else {\n\t\t\t$this->out('Daemon is not running');\n\t\t\texit(1);\n\t\t}\n\t}", "public function hookEnable(): void\n {\n $this->say(\"Executing the Plugin's enable hook...\");\n $this->_exec(\"php ./src/hook_enable.php\");\n }", "static function update_tracing_data($lead_id, $status){\n\t\t$table = self::get_offline_table();\n\t\tglobal $wpdb;\n\t\t$wpdb->update($table, array('crm_status'=>(int)$status), array('lead_id'=>(int)$lead_id), array('%d'), array('%d'));\n\t\t\n\t}", "function check_update( $_, $assoc_args ) {\n\t\tself::run( 'core check-update', $_, $assoc_args );\n\t}", "public static function onChangeStatusConnector(\\Bitrix\\Main\\Event $event)\n\t{\n\t\t$parameters = $event->getParameters();\n\t\tself::addSingleLineUpdateAgent($parameters['line']);\n\t}", "private function processStatus(){\n\t\t$this->facilityData = $this->getFacilityStatus();\n\n\t\t/** Set the date if it's not set for the proved facility */\n\t\t$this->setFacilityStatus();\n\t}", "public function index($arguments=false, $master=false)\n\t{\n\t\t# variables to the calling controller\n\t\t$this->master_obj = $master;\n\n\t\t# fetch widget view path\n\t\t$view_path = $this->view_path('view');\n\n\t\tif (is_object($arguments[0])) {\n\t\t\t$current_status = $arguments[0];\n\t\t\tarray_shift($arguments);\n\t\t} else {\n\t\t\t$current_status = new Current_status_Model();\n\t\t}\n\n\t\tif (!$current_status->data_present()) {\n\t\t\t$current_status->analyze_status_data();\n\t\t}\n\n\t\t# translation\n\t\t$widget_id = $this->widgetname;\n\t\t$refresh_rate = 60;\n\t\tif (isset($arguments['refresh_interval'])) {\n\t\t\t$refresh_rate = $arguments['refresh_interval'];\n\t\t}\n\n\t\t$title = $this->translate->_('Monitoring Features');\n\t\tif (isset($arguments['widget_title'])) {\n\t\t\t$title = $arguments['widget_title'];\n\t\t}\n\n\t\t# let view template know if wrapping div should be hidden or not\n\t\t$ajax_call = request::is_ajax() ? true : false;\n\n\t\t$flap_detect_header_label = $this->translate->_('Flap Detection');\n\t\t$notifications_header_label = $this->translate->_('Notifications');\n\t\t$eventhandler_header_label = $this->translate->_('Event Handlers');\n\t\t$activechecks_header_label = $this->translate->_('Active Checks');\n\t\t$passivechecks_header_label = $this->translate->_('Passive Checks');\n\t\t$lable_enabled = $this->translate->_('Enabled');\n\t\t$lable_disabled = $this->translate->_('Disabled');\n\t\t$lable_flapping = $this->translate->_('Flapping');\n\n\t\t$lable_all_services = $this->translate->_('All Services');\n\t\t$lable_no_services = $this->translate->_('No Services');\n\t\t$lable_service_singular = $this->translate->_('Service');\n\t\t$lable_service_plural = $this->translate->_('Services');\n\n\t\t$lable_all_hosts = $this->translate->_('All Hosts');\n\t\t$lable_no_hosts = $this->translate->_('No Hosts');\n\t\t$lable_host_singular = $this->translate->_('Host');\n\t\t$lable_host_plural = $this->translate->_('Hosts');\n\t\t$na_str = $this->translate->_('N/A');\n\n\t\t# fetch global nagios config data\n\t\t# try with the database first but we may use the nagios.cfg file as fallback\n\t\t$status_res = Program_status_Model::get_local();\n\t\tif (!empty($status_res) && count($status_res) > 0) {\n\t\t\t$status = $status_res->current();\n\t\t\t$enable_notifications = $status->notifications_enabled;\n\t\t\t$enable_flap_detection = $status->flap_detection_enabled;\n\t\t\t$enable_event_handlers = $status->event_handlers_enabled;\n\t\t\t$execute_service_checks = $status->active_service_checks_enabled;\n\t\t\t$accept_passive_service_checks = $status->passive_service_checks_enabled;\n\t\t} else {\n\t\t\t$nagios_config = System_Model::parse_config_file('nagios.cfg');\n\t\t\t$enable_notifications = isset($nagios_config['enable_notifications']) ? $nagios_config['enable_notifications'] : false;\n\t\t\t$enable_flap_detection = isset($nagios_config['enable_flap_detection']) ? $nagios_config['enable_flap_detection'] : false;\n\t\t\t$enable_event_handlers = isset($nagios_config['enable_event_handlers']) ? $nagios_config['enable_event_handlers'] : false;\n\t\t\t$execute_service_checks = isset($nagios_config['execute_service_checks']) ? $nagios_config['execute_service_checks'] : false;\n\t\t\t$accept_passive_service_checks = isset($nagios_config['accept_passive_service_checks']) ? $nagios_config['accept_passive_service_checks'] : false;\n\t\t}\n\n\t\t$flap_disabled_services = $current_status->flap_disabled_services;\n\t\t$flapping_services = $current_status->flapping_services;\n\t\t$flap_disabled_hosts = $current_status->flap_disabled_hosts;\n\t\t$flapping_hosts = $current_status->flapping_hosts;\n\n\t\t$notification_disabled_services = $current_status->notification_disabled_services;\n\t\t$notification_disabled_hosts = $current_status->notification_disabled_hosts;\n\n\t\t$event_handler_disabled_svcs = $current_status->event_handler_disabled_svcs;\n\t\t$event_handler_disabled_hosts = $current_status->event_handler_disabled_hosts;\n\n\t\t$active_checks_disabled_svcs = $current_status->active_checks_disabled_svcs;\n\t\t$active_checks_disabled_hosts = $current_status->active_checks_disabled_hosts;\n\n\t\t$passive_checks_disabled_svcs = $current_status->passive_checks_disabled_svcs;\n\t\t$passive_checks_disabled_hosts = $current_status->passive_checks_disabled_hosts;\n\n\t\t$cmd_flap_status = ($enable_flap_detection ? 'enabled' : 'disabled').'_monfeat';\n\t\t$cmd_notification_status = ($enable_notifications ? 'enabled' : 'disabled').'_monfeat';\n\t\t$cmd_event_status = ($enable_event_handlers ? 'enabled' : 'disabled').'_monfeat';\n\t\t$cmd_activecheck_status = ($execute_service_checks ? 'enabled' : 'disabled').'_monfeat';\n\t\t$cmd_passivecheck_status = ($accept_passive_service_checks ? 'enabled' : 'disabled').'_monfeat';\n\n\t\t$cmd_flap_link = url::site('command/submit?cmd_typ='.($enable_flap_detection ? 'DIS' : 'EN').'ABLE_FLAP_DETECTION');\n\t\t$cmd_notification_link = url::site('command/submit?cmd_typ='.($enable_notifications ? 'DIS' : 'EN') . 'ABLE_NOTIFICATIONS');\n\t\t$cmd_event_link = url::site('command/submit?cmd_typ='.($enable_event_handlers ? 'DIS' : 'EN') . 'ABLE_EVENT_HANDLERS');\n\t\t$cmd_activecheck_link = url::site('extinfo/');\n\t\t$cmd_passivecheck_link = url::site('extinfo/');\n\n\t\t# <a href='extinfo.cgi?type=0'><img src='/monitor/images/tacenabled.png' border='0' alt='Active Checks Enabled' title='Active Checks Enabled'></a>\n\n\t\t# fetch widget content\n\t\trequire_once($view_path);\n\n\t\tif(request::is_ajax()) {\n\t\t\t# output widget content\n\t\t\techo json::encode( $this->output());\n\t\t} else {\n\n\t\t\t# set required extra resources\n\t\t\t$this->js = array('/js/tac_monfeat');\n\n\t\t\t# call parent helper to assign all\n\t\t\t# variables to master controller\n\t\t\treturn $this->fetch();\n\t\t}\n\t}", "function getStatus() ;", "function getStatus() ;", "function getStatus() ;", "protected function ProcessStepSuccessHook()\n {\n }", "static public function status()\n {\n $GLOBALS['notification']->notify(array('listeners' => array('status', 'audio')));\n }", "public function process() {\n\t\t$service = $this->getService();\n\t\t$service->hsts = HTTP_Helper::retrievePost( 'hsts_preload' );\n\t\t$service->include_subdomain = HTTP_Helper::retrievePost( 'include_subdomain' );\n\t\t$service->hsts_cache_duration = HTTP_Helper::retrievePost( 'hsts_cache_duration' );\n\t\t$service->scenario = HTTP_Helper::retrievePost( 'scenario' );\n\t\t$ret = $service->process();\n\t\tif ( is_wp_error( $ret ) ) {\n\t\t\twp_send_json_error( [\n\t\t\t\t'message' => $ret->get_error_message()\n\t\t\t] );\n\t\t} else {\n\t\t\tSettings::instance()->addToResolved( Sh_Strict_Transport::$slug );\n\t\t}\n\t}", "function updateStatus(){\n $serv_ID=$this->uri->segment(3);\n $status=$this->input->post('status');\n if ($this->deliveryAndPickupModel->updateCustService($serv_ID, $status)) {\n echo \"<script>alert('Successfully Updated');window.location.href='\".site_url('deliveryAndPickupController/acceptServRequest/'.$serv_ID.'').\"';</script>\";\n }\n else\n {\n echo \"<script>alert('Something when wrong');window.location.href='\".site_url('deliveryAndPickupController/acceptServRequest/'.$serv_ID.'').\"';</script>\";\n }\n }", "public function getServiceStatus($requestParameters = array());", "function getStatus();" ]
[ "0.61929244", "0.60010886", "0.5959199", "0.58522296", "0.5827563", "0.57852453", "0.5784981", "0.57613826", "0.575801", "0.5755635", "0.57478446", "0.57388586", "0.5688334", "0.5596721", "0.55025566", "0.54468364", "0.54137474", "0.5390216", "0.5358307", "0.5326208", "0.53254384", "0.5301706", "0.5287143", "0.52701944", "0.52655816", "0.52338165", "0.5198308", "0.51939434", "0.5180322", "0.5165904", "0.5140476", "0.5140028", "0.51390594", "0.5135139", "0.5131908", "0.51250595", "0.5123699", "0.512331", "0.5105901", "0.51023847", "0.5088518", "0.5079373", "0.50760335", "0.506907", "0.5067003", "0.5054471", "0.50451297", "0.50451297", "0.50374526", "0.5035736", "0.50269675", "0.5025098", "0.50203395", "0.5014465", "0.5010725", "0.50074893", "0.5003351", "0.49968722", "0.4978282", "0.49730814", "0.4965276", "0.4964585", "0.49640045", "0.49639463", "0.49600384", "0.4941609", "0.49402717", "0.4936371", "0.493543", "0.4925205", "0.491634", "0.4913561", "0.4912078", "0.49090278", "0.49047577", "0.49023986", "0.48904338", "0.4886078", "0.48858488", "0.4885542", "0.48818418", "0.48783308", "0.48729518", "0.48694593", "0.48605797", "0.48585096", "0.48584455", "0.4851374", "0.48509535", "0.48415375", "0.48399484", "0.48366603", "0.48354813", "0.48354813", "0.48297742", "0.48200127", "0.4818536", "0.48183203", "0.48182055", "0.48160392" ]
0.66479594
0
/! \brief Returns a list of all used services CLASSNAME => _($this>plugins[]>DisplayName);
function getAllUsedServices() { $ret = array(); foreach ($this->plugins as $name => $obj) { if ($obj->is_account) { if (isset($obj->DisplayName)) { $ret[$name] = $obj->DisplayName; } else { $ret[$name] = $name; } } } return $ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function get_services() {\n\t\treturn [\n\t\t\tServices\\Language_Loader::class,\n\t\t\tServices\\Setup_Database::class,\n\t\t\tServices\\Scripts_And_Templates::class,\n\t\t\tServices\\Admin_Pages::class,\n\t\t\tServices\\Setup_Settings_Page::class,\n\t\t\tServices\\Loggers_Loader::class,\n\t\t\tServices\\Dropins_Loader::class,\n\t\t\tServices\\Setup_Log_Filters::class,\n\t\t\tServices\\Setup_Pause_Resume_Actions::class,\n\t\t\tServices\\Setup_Purge_DB_Cron::class,\n\t\t\tServices\\API::class,\n\t\t\tServices\\Dashboard_Widget::class,\n\t\t\tServices\\Network_Menu_Items::class,\n\t\t\tServices\\Plugin_List_Link::class,\n\t\t];\n\t}", "function getAllUnusedServices()\n {\n $tmp = $this->getAllUsedServices();\n $pool_of_ocs = array();\n foreach ($tmp as $name => $value) {\n $pool_of_ocs[] = get_class($this->plugins[$name]);\n if (isset($this->plugins[$name]->conflicts)) {\n $pool_of_ocs = array_merge($pool_of_ocs, $this->plugins[$name]->conflicts);\n }\n }\n\n $ret = array();\n foreach ($this->plugins as $name => $obj) {\n if (!$obj->acl_is_createable()) {\n continue;\n }\n\n /* Skip all pluigns that will lead into conflicts */\n $conflicts = array();\n if (isset($obj->conflicts)) {\n $conflicts = $obj->conflicts;\n }\n $conflicts[] = get_class($obj);\n if (count(array_uintersect($conflicts, $pool_of_ocs, \"strcasecmp\"))) {\n continue;\n }\n\n if (isset($obj->DisplayName)) {\n $ret[$name] = $obj->DisplayName;\n } else {\n $ret[$name] = $name;\n }\n }\n return $ret;\n }", "public static function get_services() {\n return [ \n Pages\\Admin::class,\n Base\\Enqueue::class,\n Base\\SettingsLinks::class,\n Base\\JsObjectsManager::class,\n Base\\ShortCodesManager::class\n ];\n }", "public static function get_services()\n {\n return [\n Pages\\Admin::class,\n Base\\Enqueue::class,\n Base\\CustomPostType::class,\n Base\\CustomMetaBox::class,\n Base\\Shortcode::class,\n Base\\Cron::class,\n ];\n }", "public function getServices();", "public function getServices(): array;", "public function getServices() {\n $serviceNames = $this->getServiceNames($this->serviceFolderPaths);\n $ret = $ret1 = array();\n// require_once AMFPHP_ROOTPATH.'Plugins/AmfphpDiscovery/CReflection.php';\n foreach ($serviceNames as $serviceName) {\n/* $methods = array();\n $objC = new CReflection(APP_PATH.'/app/controllers/'.$serviceName.'.php');\n $objComment = $objC->getDocComment();\n $arrMethod = $objC->getMethods();\n foreach ($arrMethod as $objMethods)\n {\n $methodComment = $objMethods->getDocComment();\n $parsedMethodComment = $this->parseMethodComment($methodComment);\n $arrParamenter = $objMethods->getParameters();\n foreach ($arrParamenter as $Paramenter)\n {\n $parameterInfo = new AmfphpDiscovery_ParameterDescriptor($Paramenter, '');\n $parameters[] = $parameterInfo;\n }\n $methods[$objMethods->_name] = new AmfphpDiscovery_MethodDescriptor($objMethods->_name, $parameters, $methodComment, $parsedMethodComment['return']);\n }\n\n $ret[$serviceName] = new AmfphpDiscovery_ServiceDescriptor($serviceName, $methods, $objComment); */\n $ret1[] = array('label'=>$serviceName,'date'=>'');\n }\n// var_dump($ret);exit();\n //note : filtering must be done at the end, as for example excluding a Vo class needed by another creates issues\n foreach ($ret as $serviceName => $serviceObj) {\n foreach (self::$excludePaths as $excludePath) {\n if (strpos($serviceName, $excludePath) !== false) {\n unset($ret[$serviceName]);\n break;\n }\n }\n }\n return $ret1;\n }", "public function findServices(): array;", "public function listPlugin()\n\t{\n\t\t\n\t}", "public static function get_services()\n {\n return [\n Pages\\Dashboard::class,\n Base\\Enqueue::class,\n Base\\SettingsLink::class,\n Base\\CustomPostTypeController::class,\n ];\n }", "public static function get_services()\n {\n\n //підключаємо всі необхідні класи для активації через масив\n return [\n Pages\\Admin::class,\n Base\\Enqueue::class,\n Base\\SettingsLinks::class\n ];\n }", "public static function getListServices () {\n return self::findByStatus(self::STATUS_ACTIVE);\n }", "public static function get_services(): array\n {\n return [\n Base\\SettingsLinks::class,\n Pages\\Admin::class,\n Base\\Enqueue::class,\n CPT\\EmailCpt::class,\n ];\n }", "public function getServices()\n\t{\n\t\treturn ['card', 'topup_mobile', 'topup_mobile_post', 'topup_game'];\n\t}", "public function getPlugins()\n {\n return $this->getService('plugins');\n }", "function get_recommender_services_list() {\n global $CFG;\n\n static $services = array();\n\n // see if we have run it already\n if (!empty($services)) {\n return $services;\n }\n\n $servicesdir = $CFG->dirroot.'/blocks/recommender/services/';\n\n $plugins = get_list_of_plugins('', '', $servicesdir);\n\n foreach ($plugins as $plugin) {\n $servicefile = $servicesdir . $plugin. '/lib.php';\n if (is_readable($servicefile)) {\n include_once($servicefile);\n $serviceclass = 'block_recommender_service_' . $plugin;\n if (class_exists($serviceclass)) {\n $services[] = $plugin;\n } else {\n throw new block_recommender_exception(get_string('errorcallingservice',\n 'block_recommender', $plugin));\n }\n } else {\n throw new block_recommender_exception(get_string('errornosuchservice',\n 'block_recommender', $plugin));\n }\n }\n\n return $services;\n}", "public function services(): array\n {\n return \\array_merge(\n \\array_keys($this->_services),\n \\array_keys($this->aliases)\n );\n }", "private function plugins(){\n $all_plugins = explode(',', json_decode(file_get_contents($this->pluginsJson))->all->names);\n debug($all_plugins);\n die;\n }", "function _getPluginControllerNames() {\n \t\tApp::import('Core', 'File', 'Folder');\n \t\t$paths = Configure::getInstance();\n \t\t$folder =& new Folder();\n \t\t$folder->cd(APP . 'plugins');\n\n \t\t// Get the list of plugins\n \t\t$Plugins = $folder->read();\n \t\t$Plugins = $Plugins[0];\n \t\t$arr = array();\n\n \t\t// Loop through the plugins\n \t\tforeach($Plugins as $pluginName) {\n \t\t\t// Change directory to the plugin\n \t\t\t$didCD = $folder->cd(APP . 'plugins'. DS . $pluginName . DS . 'controllers');\n \t\t\t// Get a list of the files that have a file name that ends\n \t\t\t// with controller.php\n \t\t\t$files = $folder->findRecursive('.*_controller\\.php');\n\n \t\t\t// Loop through the controllers we found in the plugins directory\n \t\t\tforeach($files as $fileName) {\n \t\t\t\t// Get the base file name\n \t\t\t\t$file = basename($fileName);\n\n \t\t\t\t// Get the controller name\n \t\t\t\t$file = Inflector::camelize(substr($file, 0, strlen($file)-strlen('_controller.php')));\n \t\t\t\tif (!preg_match('/^'. Inflector::humanize($pluginName). 'App/', $file)) {\n \t\t\t\t\tif (!App::import('Controller', $pluginName.'.'.$file)) {\n \t\t\t\t\t\tdebug('Error importing '.$file.' for plugin '.$pluginName);\n \t\t\t\t\t} else {\n \t\t\t\t\t\t/// Now prepend the Plugin name ...\n \t\t\t\t\t\t// This is required to allow us to fetch the method names.\n \t\t\t\t\t\t$arr[] = Inflector::humanize($pluginName) . \"/\" . $file;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\treturn $arr;\n \t}", "public function listAllAvailableServices()\n {\n\t\t$data = $this->call(array(), \"GET\", \"sensors/services/available.json\");\n\t\t$data = $data->{'services'};\n\t\t$serviceArray = new ArrayObject();\n\t\tfor($i = 0; $i<count($data);$i++){\n\t\t\t$serviceArray->append(new Service($data[$i], $this));\n\t\t}\n\t\treturn $serviceArray;\n }", "protected function get_service_classes(): array {\n\t\treturn [];\n\t}", "public function getAvailableServices();", "public static function getServices(): array\n {\n return static::$services;\n }", "public function getLoadedPluginsName()\n\t{\n\t\t$oPlugins = $this->getLoadedPlugins();\n\t\t$pluginNames = array_map('get_class',$oPlugins);\n\t\treturn $pluginNames;\n\t}", "public function getServices()\n {\n return $this->pantonoServices;\n }", "public function getPluginNames() : array\n {\n $names = array();\n \n if( count( $this->plugins ) > 0 )\n {\n foreach( $this->plugins as $plugin )\n {\n $names[] = $plugin->getName();\n }\n }\n return $names;\n }", "static function getServiceList()\n {\n return session::get('ServerService');\n }", "function get_all_plugin_names(array $types) {\n $pluginman = core_plugin_manager::instance();\n $returnarray = array();\n foreach ($types as $type) {\n // Get all plugins of a given type.\n $pluginarray = $pluginman->get_plugins_of_type($type);\n // Plugins will be returned as objects so get the name of each and push it into a new array.\n foreach ($pluginarray as $plugin) {\n array_push($returnarray, $plugin->name);\n }\n }\n return $returnarray;\n}", "function _getPluginControllerNames() {\n\t\tApp::import('Core', 'File', 'Folder');\n\t\t$paths = Configure::getInstance();\n\t\t$folder =& new Folder();\n\t\t$folder->cd(APP . 'plugins');\n\t\t// Get the list of plugins\n\t\t$Plugins = $folder->read();\n\t\t$Plugins = $Plugins[0];\n\t\t$arr = array();\n\t\t// Loop through the plugins\n\t\tforeach($Plugins as $pluginName) {\n\t\t\t// Change directory to the plugin\n\t\t\t$didCD = $folder->cd(APP . 'plugins'. DS . $pluginName . DS . 'controllers');\n\t\t\t// Get a list of the files that have a file name that ends\n\t\t\t// with controller.php\n\t\t\t$files = $folder->findRecursive('.*_controller\\.php');\n\t\t\t// Loop through the controllers we found in the plugins directory\n\t\t\tforeach($files as $fileName) {\n\t\t\t\t// Get the base file name\n\t\t\t\t$file = basename($fileName);\n\t\t\t\t// Get the controller name\n\t\t\t\t$file = Inflector::camelize(substr($file, 0, strlen($file)-strlen('_controller.php')));\n\t\t\t\tif (!preg_match('/^'. Inflector::humanize($pluginName). 'App/', $file)) {\n\t\t\t\t\tif (!App::import('Controller', $pluginName.'.'.$file)) {\n\t\t\t\t\t\tdebug('Error importing '.$file.' for plugin '.$pluginName);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t/// Now prepend the Plugin name ...\n\t\t\t\t\t\t// This is required to allow us to fetch the method names.\n\t\t\t\t\t\t$arr[] = Inflector::humanize($pluginName) . \"/\" . $file;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $arr;\n\t}", "public function getServices()\n {\n return $this->services;\n }", "public function getServices()\n {\n return $this->services;\n }", "public function getServices()\n {\n return $this->services;\n }", "protected function getInstalledServices() {}", "public function list_plugins($plugin = null) {\n\t\tApp::uses('CroogoPlugin','Extensions.Lib');\n\t\t$all = $this->params['all'];\n\t\t$plugins = $plugin == null ? App::objects('plugins') : array($plugin);\n\t\t$loaded = CakePlugin::loaded();\n\t\t$CroogoPlugin = new CroogoPlugin();\n\t\t$this->out(__('Plugins:'), 2);\n\t\t$this->out(__('%-20s%-50s%s', __('Plugin'), __('Author'), __('Status')));\n\t\t$this->out(str_repeat('-', 80));\n\t\tforeach ($plugins as $plugin) {\n\t\t\t$status = '<info>inactive</info>';\n\t\t\tif ($active = in_array($plugin, $loaded)) {\n\t\t\t\t$status = '<success>active</success>';\n\t\t\t}\n\t\t\tif (!$active && !$all) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$data = $CroogoPlugin->getPluginData($plugin);\n\t\t\t$author = isset($data['author']) ? $data['author'] : '';\n\t\t\t$this->out(__('%-20s%-50s%s', $plugin, $author, $status));\n\t\t}\n\t}", "public function getDeclaredServices(): array\n {\n return [\n // Service id, optional class name, tag\n ['best_it_contentful.markdown.twig_extension', MarkdownExtension::class, 'twig.extension'],\n ['best_it_contentful.contentful.twig_extension', ContentfulExtension::class, 'twig.extension'],\n ['best_it_contentful.delivery.cache.reset_service', CacheResetService::class],\n ['best_it_contentful.delivery.client', ClientDecorator::class],\n ['best_it_contentful.markdown.parser', MarkdownParser::class],\n ['best_it_contentful.delivery.response_parser.default', SimpleResponseParser::class]\n ];\n }", "public function getServices() {\n return $this->services;\n }", "public function getServices() {\n return $this->services;\n }", "protected function getServices() {\n\t\treturn [\n\t\t\tMessagesService::class,\n\t\t];\n\t}", "public function getActivePluginsList()\n\t{\n\t\techo \"Active plugins:\\n\";\n\t\tforeach (get_plugins() as $plugin_name => $plugin_details)\n\t\t{\n\t\t\tif (is_plugin_active($plugin_name) === true)\n\t\t\t{\n\t\t\t\tforeach ($plugin_details as $details_key => $details_value)\n\t\t\t\t{\n\t\t\t\t\tif (in_array($details_key, array('Name', 'Version', 'PluginURI')))\n\t\t\t\t\t{\n\t\t\t\t\t\techo $details_key . \" : \" . $details_value . \"\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\techo \"Path : \" . $plugin_name . \"\\n\";\n\t\t\t}\n\t\t}\n\t}", "public function providerGetComponentName()\n {\n return array(\n array('components/jquery', array(), 'jquery'),\n array('components/jquery', array('name' => 'myownjquery'), 'myownjquery'),\n array('jquery', array(), 'jquery'),\n );\n }", "public function &getServices(): array {\n return $this->services;\n }", "public function getAvailableServices()\n {\n return array_keys($this->_servicesConfig);\n }", "public function servicesArray()\n {\n return [\n self::PAINTING,\n self::TIRE,\n self::BODY_WORK,\n self::TO,\n self::WASHING,\n ];\n }", "protected function getServices()\n {\n return $this->services;\n }", "public function getServices() {\n\n return $this->services;\n\n }", "function getServices() {\n\t\t$results = \"\";\n\t\t$sql = 'SELECT * FROM Service';\n\n\t\t$results = queryDB($sql);\n\n\t\treturn $results;\n\t}", "protected function getServicesList()\n {\n $servicesList = [];\n $services = $this->getInstalledServices();\n foreach ($services as $serviceType => $installedServices) {\n $servicesList[] = $this->getServiceTypeList($serviceType, $installedServices);\n }\n return $servicesList;\n }", "public function get_plugins() {\n\t\treturn get_plugins();\n\t}", "public function services()\n {\n return $this->belongstomany(Service::class);\n }", "public static function getAllServiceTypes() {\n return id(new PhutilClassMapQuery())\n ->setAncestorClass(__CLASS__)\n ->setUniqueMethod('getServiceTypeConstant')\n ->setSortMethod('getServiceTypeName')\n ->execute();\n }", "public function getPluginLabels() {}", "public function provides()\n {\n AchieveLogger::info(\"Deferred true and I am here in provides()\");\n return['App\\Services\\Utility\\AchieveLoggerService'];\n }", "function get_service_list() {\n\t\tglobal $wpdb;\n\t\t\n\t\t$services = $wpdb->get_results( \n\t\t\t\"\n\t\t\tSELECT ID, Title\n\t\t\tFROM cp_Categories\n\t\t\tWHERE 1\n\t\t\t\",\n\t\t\tARRAY_A\n\t\t);\n\t\t\n\t\treturn $services;\n\t}", "public function getServiceDefinitions(): array;", "protected function get_installed_plugins()\n {\n }", "public function getPluginsList()\n {\n $plugins = [];\n // @codingStandardsIgnoreStart\n $reflection = new \\ReflectionClass($this->pluginList);\n // @codingStandardsIgnoreEnd\n\n $processed = $reflection->getProperty('_processed');\n $processed->setAccessible(true);\n $processed = $processed->getValue($this->pluginList);\n\n $inherited = $reflection->getProperty('_inherited');\n $inherited->setAccessible(true);\n $inherited = $inherited->getValue($this->pluginList);\n\n $types = [\n DefinitionInterface::LISTENER_BEFORE => 'before',\n DefinitionInterface::LISTENER_AROUND => 'around',\n DefinitionInterface::LISTENER_AFTER => 'after'\n ];\n\n /**\n * @see: Magento/Framework/Interception/PluginList/PluginList::_inheritPlugins($type)\n */\n foreach ($processed as $currentKey => $processDef) {\n if (preg_match('/^(.*)_(.*)___self$/', $currentKey, $matches) ||\n preg_match('/^(.*?)_(.*?)_(.*)$/', $currentKey, $matches)\n ) {\n $type = $matches[1];\n $method = $matches[2];\n\n if (!empty($inherited[$type])) {\n foreach ($processDef as $keyType => $pluginsNames) {\n if (!is_array($pluginsNames)) {\n $pluginsNames = [$pluginsNames];\n }\n\n $classMethod = $type . '::' . $method;\n // @codingStandardsIgnoreStart\n $key = md5($classMethod);\n // @codingStandardsIgnoreEnd\n\n if (!isset($plugins[$key])) {\n $fileName = $this->config->getPhpClassFile($type);\n\n $plugins[$key] = [\n 'class_method' => $classMethod,\n 'file' => $fileName,\n 'phpstorm_url' => $this->config->getPhpStormUrl($fileName),\n 'plugins' => [],\n 'phpstorm_links' => [],\n ];\n\n if ($this->config->isPhpStormEnabled()) {\n $plugins[$key]['phpstorm_links'] = [\n [\n 'key' => 'Original Class',\n 'file' => $fileName,\n 'link' => $this->config->getPhpStormUrl($fileName),\n ],\n ];\n }\n }\n\n foreach ($pluginsNames as $pluginName) {\n if (!empty($inherited[$type][$pluginName])) {\n $sortOrder = (int) $inherited[$type][$pluginName]['sortOrder'];\n\n $fileName = $this->config->getPhpClassFile(\n $inherited[$type][$pluginName]['instance']\n );\n\n $plugins[$key]['plugins'][$pluginName] = [\n 'order' => $sortOrder,\n 'plugin' => $inherited[$type][$pluginName]['instance'],\n 'method' => $types[$keyType] . ucfirst($method),\n 'file' => $fileName,\n ];\n if ($this->config->isPhpStormEnabled()) {\n $plugins[$key]['phpstorm_links'][] = [\n 'key' => 'Plugin \"' . $pluginName . '\"',\n 'file' => $fileName,\n 'link' => $this->config->getPhpStormUrl($fileName),\n ];\n }\n }\n }\n }\n }\n }\n }\n\n return $plugins;\n }", "function getPlugins();", "public function get_registered_services() {\n\t\t$data = [];\n\t\t$res = self::$dbo->query( 'SELECT storage_service FROM snapshot_storage_credentials' );\n\t\twhile ( $row = $res->fetchArray() ) {\n\t\t\t$data[] = $row['storage_service'];\n\t\t}\n\n\t\treturn $data;\n\t}", "public function pluginDetails()\n {\n return [\n 'name' => 'Service Me',\n 'description' => 'Service Me Components',\n 'author' => 'Darren Miller',\n 'icon' => 'icon-leaf'\n ];\n }", "public static function getSubscribedServices()\r\n {\r\n return [\r\n MDHelper::class,\r\n LoggerInterface::class\r\n ];\r\n }", "public static function getPluginList () {\n\t\treturn self::$pInfo[1];\n\t\t$glob = glob(TH_ROOT.TH_PLUGINS.'*/plugin.php');\n\t\tforeach($glob as $plugin) {\n\t\t\t// $plugin is a full path, we don't want that.\n\t\t\t$plugin = explode(TH_ROOT.TH_PLUGINS, $plugin, 2);\n\t\t\t$plugin = explode('/plugin.php', $plugin[1]);\n\t\t\t$r[] = $plugin[0];\n\t\t}\n\t\treturn $r;\n\t}", "public function getProviderNames();", "public static function get_service_providers(): array {\n\t\treturn self::$service_providers;\n\t}", "public function getServices()\r\n {\r\n if (is_null($this->_services)) {\r\n if ($this->getConfig('auto')) {\r\n $this->_services = array();\r\n $config = Mage::app()->getConfig();\r\n foreach (array('cache', 'full_page_cache', 'fpc') as $cacheType) {\r\n $node = $config->getXpath('global/' . $cacheType . '[1]');\r\n if (isset($node[0]->backend) && in_array((string)$node[0]->backend, array(\r\n 'Cm_Cache_Backend_Redis',\r\n 'Mage_Cache_Backend_Redis'\r\n ))) {\r\n $this->_services[] = $this->_buildServiceArray(\r\n $this->__(str_replace('_', ' ', uc_words($cacheType))),\r\n $node[0]->backend_options->server,\r\n $node[0]->backend_options->port,\r\n $node[0]->backend_options->password,\r\n $node[0]->backend_options->database\r\n );\r\n }\r\n }\r\n // get session\r\n $node = $config->getXpath('global/redis_session');\r\n if ($node) {\r\n $this->_services[] = $this->_buildServiceArray(\r\n $this->__('Session'),\r\n $node[0]->host,\r\n $node[0]->port,\r\n $node[0]->password,\r\n $node[0]->db\r\n );\r\n }\r\n } else {\r\n $this->_services = unserialize($this->getConfig('manual'));\r\n }\r\n }\r\n return $this->_services;\r\n }", "public function search_plugins() {\n\n\t\trequire_once( ABSPATH . \"wp-admin\" . '/includes/plugin-install.php' );\n\n $request = array(\n 'per_page' => 24,\n 'search' => $_POST['search'],\n 'fields' => $this->get_api_fields()\n );\n\n $results = plugins_api( 'query_plugins', $request );\n\t\t$data = array();\n\t\t$plugins = array();\n\n foreach( $results->plugins as $plugin ) {\n\t\t\t$plugins[] = $this->prepare_data( $plugin );\n\t\t}\n\t\t\n\t\t$data['info'] = $results->info;\n\t\t$data['plugins'] = $plugins;\n\n echo json_encode($data);\n\n die();\n }", "public function get_all()\n {\n $plugins = $this->get_plugins();\n\n $pluginControllers = array();\n\n foreach($plugins as $plugin){\n foreach($plugin as $controller => $actions){\n $pluginControllers[$controller] = $plugin[$controller];\n }\n }\n\n return array_merge($this->get(), $pluginControllers);\n }", "function AllServices(){\n return $this->db->get($this->service)->result();\n }", "function getPlugins() {\n return $this->plugins;\n }", "static public function all_subplugin_names() {\n $pluginnames = [];\n $contextplugins = \\core_component::get_plugin_list('metadatacontext');\n foreach ($contextplugins as $contextname => $contextlocation) {\n $pluginnames[] = $contextname;\n }\n return $pluginnames;\n }", "public function services($ignore_cache = false) {\n if ($this->services === null || $ignore_cache) {\n $this->services = StatusBoard_Service::allForSite($this);\n }\n \n return $this->services;\n }", "public function services()\n {\n $sahulatServices=$this->_service->getServices(\"Sahulat\");\n $vendorServices=$this->_service->getServices(\"Vendor\");\n return view('frontend.service.services')->with(compact('sahulatServices','vendorServices'));;\n }", "private function get_service_classes() {\n\t\treturn [\n\t\t\tAuthentication\\JavaScriptWebToken::class,\n\t\t\tAuthorisation\\IdeaManagerRole::class,\n\t\t\tAuthorisation\\AdminAccess::class,\n\t\t\tCustomPostType\\Idea::class,\n\t\t\tMetabox\\Reminder::class,\n\t\t];\n\t}", "private function pageGetPlugins() {\n\t\techo \"<reply action=\\\"ok\\\">\\n\";\r\n\t\t\r\n\t\t//To get the status of all plugins, they must all be started first.\n\t\t//As a safety measure, check that it's not running at boot.\n\t\t$this->framework->startAllPlugins ( false );\r\n\t\t\r\n\t\t//Print each plugin\n\t\tforeach ( $this->data as $plugin ) {\r\n\t\t\t$plugin_object = $this->framework->getPlugin ( ( string ) $plugin ['name'] );\r\n\t\t\t$status = \"\";\r\n\t\t\tif (isset ( $plugin_object )) {\r\n\t\t\t\t$status = $plugin_object->getStatus ();\r\n\t\t\t} else if (( string ) $plugin ['enabled'] == \"true\") {\r\n\t\t\t\tthrow new Exception('The module '.$plugin['name'].' could not be retrieved');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\techo \"<plugin status=\\\"{$status}\\\" \";\r\n\t\t\t//also print all other attributes the plugin has.\n\t\t\tforeach ( $plugin->attributes () as $name => $value ) {\r\n\t\t\t\techo \" $name = \\\"$value\\\"\";\r\n\t\t\t}\r\n\t\t\techo \"/>\\n\"; //Closing tag of plugin\n\t\t}\r\n\t\techo \"</reply>\";\r\n\t}", "public static function plugins() {\n\t\t\treturn self::$plugins;\n\t\t}", "private function get_taxonomy_services()\n {\n return [\n Taxonomy\\Example::class\n ];\n }", "protected function getRegisteredClasses() {}", "public function get_services() {\n return $this->linkemperor_exec(null, null,\"/api/v2/customers/services.json\");\n }", "public function getPlugins()\n {\n $this->getPlugin('base');\n }", "private function getUserInstalledPlugins()\n {\n $query = $this->container->get('dbal_connection')->createQueryBuilder();\n $query->select(['plugin.name', 'plugin.label', 'plugin.version'])\n ->from('s_core_plugins', 'plugin')\n ->where('plugin.name NOT IN (:names)')\n ->andWhere('plugin.source != :source')\n ->setParameter(':source', 'Default')\n ->setParameter(':names', ['PluginManager', 'StoreApi'], Connection::PARAM_STR_ARRAY);\n\n /** @var \\PDOStatement $statement */\n $statement = $query->execute();\n\n return $statement->fetchAll(\\PDO::FETCH_ASSOC);\n }", "protected function getServiceNames(array $serviceFolderPaths) {\n $ret = array();\n foreach ($serviceFolderPaths as $serviceFolderPath) {\n $ret = array_merge($ret, $this->searchFolderForServices($serviceFolderPath, ''));\n }\n\n/* foreach ($serviceNames2ClassFindInfo as $key => $value) {\n if (strpos($key,'mfphp') === false)\n {\n $ret[] = $key;\n }\n } */\n return $ret;\n }", "public function getNames() {}", "public function getNames() {}", "public function getNames() {}", "function wpc_installed_plugins(): array\n {\n $plugins = get_plugins();\n\n $plugin_slugs = [];\n\n foreach ( $plugins as $key => $plugin ) {\n $slug = explode( '/', $key );\n\n $plugin_slugs[] = '\"wpackagist-plugin/' . $slug[0] . '\": \"*\",';\n // Add the slug to the array\n }\n\n return $plugin_slugs;\n }", "function getPlugins() {\n\n return $this->plugins;\n\n }", "protected function getInstalledPlugins()\n\t{\n\t\tif(!class_exists('Zend_Registry'))\n\t\t{\n\t\t\tthrow new Exception(\"Not possible to list installed plugins (case LogStats module)\");\n\t\t}\n\t\tif(!is_null(Zend_Registry::get('config')->PluginsInstalled->PluginsInstalled))\n\t\t{\n\t\t\treturn Zend_Registry::get('config')->PluginsInstalled->PluginsInstalled->toArray();\n\t\t}\n\t\telseif(is_array(Zend_Registry::get('config')->PluginsInstalled))\n\t\t{\n\t\t\treturn Zend_Registry::get('config')->PluginsInstalled;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn Zend_Registry::get('config')->PluginsInstalled->toArray();\n\t\t}\n\t}", "public function getAllNames() {}", "public function getRegisteredPlugins()\n {\n return $this->registeredPlugins;\n }", "public function services()\n {\n return $this->getAngularLocation($this->service_path);\n }", "public function getPlugins()\n\t{\n\t\treturn $this->plugins;\n\t}", "public static function getInstalledPlugins($withClassName = false){\n\n\t\t$plugins = glob(app_path().\"/kblis/plugins/*.php\");\n\t\t$dummyIP = \"10.10.10.1\";\n\t\t$plugs = array();\n\n\t\tforeach ($plugins as $plugin) {\n\t\t\t$className = \"\\\\KBLIS\\\\Plugins\\\\\".head(explode(\".\", last(explode(\"/\", $plugin))));\n\n\t\t\t// Check if its a valid plugin file\n\t\t\tif(class_exists($className)){\n\n\t\t\t\t$instrument = new $className($dummyIP);\n\n\t\t\t\tif(is_subclass_of($instrument, '\\\\KBLIS\\\\Instrumentation\\\\AbstractInstrumentor')){\n\n\t\t\t\t\t$code = $instrument->getEquipmentInfo()['code'];\n\t\t\t\t\t$name = $instrument->getEquipmentInfo()['name'];\n\n\t\t\t\t\tif ($withClassName) {\n\t\t\t\t\t\t$plugs[$code] = array('name' => $name, 'class' => $className);\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$plugs[$code] = $name;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tLog::error(\"invalid-driver-file: \" . $className);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $plugs;\n\t}", "public function getLoggerNames() {}", "public function getServiceschemes()\n\t{\n\t\t$arrContests = $this->Database->prepare(\"SELECT id, name FROM tl_addthis_servicescheme\")->execute();\n\n\t\tif ($arrContests->numRows < 1)\n\t\t{\n\t\t\treturn array();\n\t\t}\n\n\t\t$return = array();\n\n\t\twhile ($arrContests->next())\n\t\t{\n\t\t\t$return[$arrContests->id] = $arrContests->name;\n\t\t}\n\n\t\treturn $return;\n\t}", "public function getActiveServiceProviderList()\n {\n return array_keys($this->activeProviders);\n }", "public static function get_services()\n {\n $ServicesObj = new Services();\n $Services = array();\n try {\n $stmt = $ServicesObj->read();\n $count = $stmt->rowCount();\n if ($count > 0) {\n while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n extract($row);\n $p = (object) array(\n \"ServiceID\" => (int) $ServiceID,\n \"ServiceName\" => $ServiceName,\n );\n\n array_push($Services, $p);\n }\n }\n return $Services;\n } catch (Exception $e) {\n throw $e;\n }\n }", "public function getServiceCallableName()\n {\n return [];\n }", "private static function search()\r\n\t{\r\n\t\t$dir = 'plugins';\r\n\t\t// search for plugin modules in the plugins directory\t\t \r\n\t\t$modules = model_Utils_ModuleHelper::searchDirectoryForModules($dir);\r\n\t\tforeach ($modules as $module)\r\n\t\t{\r\n\t\t\t// save found module paths to the db so we can auto-load them in the future\r\n\t\t\tmodel_Utils_ModuleHelper::saveModule($module);\r\n\t\t\t// add matching paths to Kohana's module paths\t\t\r\n\t\t\tmodel_Utils_ModuleHelper::addModulePath($module);\r\n\t\t}\r\n\t\treturn Model_Admin_EventsAdmin::searchForListeners($dir,'Interface_iPCPPlugin');\t\r\n\t}", "function listPlugins( ) {\n\t\t$list = array();\n\n\t\t$pathname = $GLOBALS['mosConfig_absolute_path'].'/administrator/components/com_joomap/plugins/';\n\t\tif ( is_dir($pathname) ) {\n\t\t\t$dir_handle = opendir($pathname);\n\t\t\tif( $dir_handle ) {\n\t\t\t\twhile (($filename = readdir($dir_handle)) !== false) {\n\t\t\t\t\tif( substr( $filename, -11 ) == '.plugin.php' ) {\n\t\t\t\t\t\t$list[] = $filename;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tclosedir($dir_handle);\n\t\t\t}\n\t\t}\n\t\treturn $list;\n\t}", "public function getPlugins()\n {\n return $this->plugins;\n }", "public function getPlugins()\n {\n return $this->plugins;\n }" ]
[ "0.7040355", "0.6973125", "0.6946765", "0.6926431", "0.691777", "0.6877789", "0.6796921", "0.67913777", "0.6765748", "0.6726817", "0.6630286", "0.6595965", "0.6578168", "0.6510909", "0.6510546", "0.6507702", "0.64790314", "0.64664596", "0.6432358", "0.6424015", "0.6406699", "0.6380597", "0.6376083", "0.63524693", "0.63413525", "0.63306975", "0.6329073", "0.6327995", "0.63012683", "0.62927073", "0.62927073", "0.62927073", "0.62866247", "0.62443674", "0.62371135", "0.6233996", "0.6233996", "0.62278754", "0.62231565", "0.6222106", "0.62139624", "0.6203133", "0.61831754", "0.61822814", "0.61691886", "0.6161586", "0.6153255", "0.6151289", "0.6140564", "0.6129015", "0.6117982", "0.60900307", "0.6084237", "0.6067623", "0.6054285", "0.60378987", "0.60300547", "0.60257405", "0.60205424", "0.60117555", "0.59717995", "0.59500086", "0.59461623", "0.5927607", "0.5906208", "0.59018034", "0.5901235", "0.5901157", "0.5890446", "0.58868456", "0.58792776", "0.58694845", "0.5869046", "0.5863565", "0.5858367", "0.58471954", "0.5844146", "0.58440083", "0.5823483", "0.5823048", "0.58170205", "0.58170205", "0.5816997", "0.58138835", "0.5808116", "0.580104", "0.5788176", "0.578658", "0.5783575", "0.5773913", "0.57691234", "0.57673174", "0.57638985", "0.57564354", "0.5753713", "0.57518184", "0.5748336", "0.57480174", "0.5746335", "0.5746335" ]
0.83596385
0
/! \brief Returns a list of all unused services.
function getAllUnusedServices() { $tmp = $this->getAllUsedServices(); $pool_of_ocs = array(); foreach ($tmp as $name => $value) { $pool_of_ocs[] = get_class($this->plugins[$name]); if (isset($this->plugins[$name]->conflicts)) { $pool_of_ocs = array_merge($pool_of_ocs, $this->plugins[$name]->conflicts); } } $ret = array(); foreach ($this->plugins as $name => $obj) { if (!$obj->acl_is_createable()) { continue; } /* Skip all pluigns that will lead into conflicts */ $conflicts = array(); if (isset($obj->conflicts)) { $conflicts = $obj->conflicts; } $conflicts[] = get_class($obj); if (count(array_uintersect($conflicts, $pool_of_ocs, "strcasecmp"))) { continue; } if (isset($obj->DisplayName)) { $ret[$name] = $obj->DisplayName; } else { $ret[$name] = $name; } } return $ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listAllAvailableServices()\n {\n\t\t$data = $this->call(array(), \"GET\", \"sensors/services/available.json\");\n\t\t$data = $data->{'services'};\n\t\t$serviceArray = new ArrayObject();\n\t\tfor($i = 0; $i<count($data);$i++){\n\t\t\t$serviceArray->append(new Service($data[$i], $this));\n\t\t}\n\t\treturn $serviceArray;\n }", "public function getAvailableServices();", "function getAllUsedServices()\n {\n $ret = array();\n foreach ($this->plugins as $name => $obj) {\n if ($obj->is_account) {\n if (isset($obj->DisplayName)) {\n $ret[$name] = $obj->DisplayName;\n } else {\n $ret[$name] = $name;\n }\n }\n }\n return $ret;\n }", "public function getAvailableServices()\n {\n return array_keys($this->_servicesConfig);\n }", "public static function getListServices () {\n return self::findByStatus(self::STATUS_ACTIVE);\n }", "protected function getInstalledServices() {}", "public function getServices();", "protected function getInstalledServices()\n {\n $filteredServices = [];\n foreach ($GLOBALS['T3_SERVICES'] as $serviceType => $serviceList) {\n // If the (first) key of the service list is not the same as the service type,\n // it's a \"true\" service type. Keep it and sort it.\n if (key($serviceList) !== $serviceType) {\n uasort($serviceList, [$this, 'sortServices']);\n $filteredServices[$serviceType] = $serviceList;\n }\n }\n return $filteredServices;\n }", "static function getServiceList()\n {\n return session::get('ServerService');\n }", "function getServices() {\n\t\t$results = \"\";\n\t\t$sql = 'SELECT * FROM Service';\n\n\t\t$results = queryDB($sql);\n\n\t\treturn $results;\n\t}", "public function getRemainingServicesByName() {\n $term = Request::input('term', '');\n $ids = Request::input('ids', '');\n $services_id = ($ids ? array_map('intval', explode(',', $ids)) : []);\n\n $results = array();\n $queries = Service::where('name', 'LIKE', '%'.$term.'%')\n ->whereNotIn('id', $services_id)\n ->take(10)->get();\n foreach ($queries as $query)\n $results[] = ['id' => $query->id,\n 'value' => $query->name,\n 'price' => $query->price];\n return response()->json($results);\n }", "public function getServices()\n {\n return $this->services;\n }", "public function getServices()\n {\n return $this->services;\n }", "public function getServices()\n {\n return $this->services;\n }", "public function services($ignore_cache = false) {\n if ($this->services === null || $ignore_cache) {\n $this->services = StatusBoard_Service::allForSite($this);\n }\n \n return $this->services;\n }", "protected function getServices()\n {\n return $this->services;\n }", "public function getServices(): array;", "public function getServices() {\n return $this->services;\n }", "public function getServices() {\n return $this->services;\n }", "public function &getServices(): array {\n return $this->services;\n }", "public function getServices()\n {\n return $this->pantonoServices;\n }", "public function getServices() {\n\n return $this->services;\n\n }", "private function get_services() {\n\t\treturn [\n\t\t\tServices\\Language_Loader::class,\n\t\t\tServices\\Setup_Database::class,\n\t\t\tServices\\Scripts_And_Templates::class,\n\t\t\tServices\\Admin_Pages::class,\n\t\t\tServices\\Setup_Settings_Page::class,\n\t\t\tServices\\Loggers_Loader::class,\n\t\t\tServices\\Dropins_Loader::class,\n\t\t\tServices\\Setup_Log_Filters::class,\n\t\t\tServices\\Setup_Pause_Resume_Actions::class,\n\t\t\tServices\\Setup_Purge_DB_Cron::class,\n\t\t\tServices\\API::class,\n\t\t\tServices\\Dashboard_Widget::class,\n\t\t\tServices\\Network_Menu_Items::class,\n\t\t\tServices\\Plugin_List_Link::class,\n\t\t];\n\t}", "public function getServices()\n\t{\n\t\treturn ['card', 'topup_mobile', 'topup_mobile_post', 'topup_game'];\n\t}", "function get_service_list() {\n\t\tglobal $wpdb;\n\t\t\n\t\t$services = $wpdb->get_results( \n\t\t\t\"\n\t\t\tSELECT ID, Title\n\t\t\tFROM cp_Categories\n\t\t\tWHERE 1\n\t\t\t\",\n\t\t\tARRAY_A\n\t\t);\n\t\t\n\t\treturn $services;\n\t}", "protected function getServicesList()\n {\n $servicesList = [];\n $services = $this->getInstalledServices();\n foreach ($services as $serviceType => $installedServices) {\n $servicesList[] = $this->getServiceTypeList($serviceType, $installedServices);\n }\n return $servicesList;\n }", "public function getRequestedServices();", "public static function getServices(): array\n {\n return static::$services;\n }", "public function findServices(): array;", "function AllServices(){\n return $this->db->get($this->service)->result();\n }", "public function index()\n {\n return ServicesApi::collection($this->services->whereNull('deleted_at')->get());\n\n }", "function getServices() {\n $sql = 'SELECT * FROM services';\n\n $results = mysqli_query($GLOBALS['con'], $sql);\n\n if (mysqli_num_rows($results) > 0) {\n return $results;\n }\n }", "public function services()\n {\n return $this->belongstomany(Service::class);\n }", "public function get_safe_services() {\n return $this->linkemperor_exec(null, null,\"/api/v2/customers/services/safe.json\");\n }", "public function getAllServiceItems()\n {\n $qbo = $this->container->get(\"numa.quickbooks\")->init();\n\n $ItemService = new \\QuickBooks_IPP_Service_Item();\n\n $qbItems = $ItemService->query($qbo->getContext(), $qbo->getRealm(), \"SELECT * FROM Item WHERE type='service' ORDER BY name \");\n $r = array();\n foreach ($qbItems as $item) {\n $r[$item->getName()] = $item->getName();\n }\n\n return $r;\n }", "public function shareService ()\n {\n \n $list = $this->services->findAll();\n return $list;\n }", "public function getAllowedServices()\n {\n return $this->allowed_services;\n }", "public function getServices() {\n $serviceNames = $this->getServiceNames($this->serviceFolderPaths);\n $ret = $ret1 = array();\n// require_once AMFPHP_ROOTPATH.'Plugins/AmfphpDiscovery/CReflection.php';\n foreach ($serviceNames as $serviceName) {\n/* $methods = array();\n $objC = new CReflection(APP_PATH.'/app/controllers/'.$serviceName.'.php');\n $objComment = $objC->getDocComment();\n $arrMethod = $objC->getMethods();\n foreach ($arrMethod as $objMethods)\n {\n $methodComment = $objMethods->getDocComment();\n $parsedMethodComment = $this->parseMethodComment($methodComment);\n $arrParamenter = $objMethods->getParameters();\n foreach ($arrParamenter as $Paramenter)\n {\n $parameterInfo = new AmfphpDiscovery_ParameterDescriptor($Paramenter, '');\n $parameters[] = $parameterInfo;\n }\n $methods[$objMethods->_name] = new AmfphpDiscovery_MethodDescriptor($objMethods->_name, $parameters, $methodComment, $parsedMethodComment['return']);\n }\n\n $ret[$serviceName] = new AmfphpDiscovery_ServiceDescriptor($serviceName, $methods, $objComment); */\n $ret1[] = array('label'=>$serviceName,'date'=>'');\n }\n// var_dump($ret);exit();\n //note : filtering must be done at the end, as for example excluding a Vo class needed by another creates issues\n foreach ($ret as $serviceName => $serviceObj) {\n foreach (self::$excludePaths as $excludePath) {\n if (strpos($serviceName, $excludePath) !== false) {\n unset($ret[$serviceName]);\n break;\n }\n }\n }\n return $ret1;\n }", "public function servicesArray()\n {\n return [\n self::PAINTING,\n self::TIRE,\n self::BODY_WORK,\n self::TO,\n self::WASHING,\n ];\n }", "public function getList()\n {\n return $this->call('GET', \"/shipping/services.json\");\n }", "public function get_registered_services() {\n\t\t$data = [];\n\t\t$res = self::$dbo->query( 'SELECT storage_service FROM snapshot_storage_credentials' );\n\t\twhile ( $row = $res->fetchArray() ) {\n\t\t\t$data[] = $row['storage_service'];\n\t\t}\n\n\t\treturn $data;\n\t}", "public function getRequiredServices();", "public function displayAllServices() {\n $services = $this->userServiceManager->getServices(null, true);\n $this->addCss(['search.css', 'forms.css']);\n $this->showView('service/allServices', [\n 'services' => $services,\n ]);\n }", "public static function get_services()\n {\n $ServicesObj = new Services();\n $Services = array();\n try {\n $stmt = $ServicesObj->read();\n $count = $stmt->rowCount();\n if ($count > 0) {\n while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n extract($row);\n $p = (object) array(\n \"ServiceID\" => (int) $ServiceID,\n \"ServiceName\" => $ServiceName,\n );\n\n array_push($Services, $p);\n }\n }\n return $Services;\n } catch (Exception $e) {\n throw $e;\n }\n }", "public function client_all_services(){\n $service = Service::where('user_id',Auth::user()->id)->where('status', 0)->get();\n //dd($service);\n return view('admin.pages.client_services.all_services', compact('service'));\n }", "public static function get_services()\n {\n return [\n Pages\\Admin::class,\n Base\\Enqueue::class,\n Base\\CustomPostType::class,\n Base\\CustomMetaBox::class,\n Base\\Shortcode::class,\n Base\\Cron::class,\n ];\n }", "public function getDeferredServices(): array\n {\n return $this->deferredServices;\n }", "public function listsServicesGet()\r\n {\r\n $response = Services::with('regimen')->get();\r\n return response()->json($response,200);\r\n }", "public static function get_services() {\n return [ \n Pages\\Admin::class,\n Base\\Enqueue::class,\n Base\\SettingsLinks::class,\n Base\\JsObjectsManager::class,\n Base\\ShortCodesManager::class\n ];\n }", "public function getServicesCount()\n {\n return $this->count(self::services);\n }", "public function get_services() {\n return $this->linkemperor_exec(null, null,\"/api/v2/customers/services.json\");\n }", "public function findServicesDowntimesForNonAdminUser(): array;", "public function services(): array\n {\n return \\array_merge(\n \\array_keys($this->_services),\n \\array_keys($this->aliases)\n );\n }", "public function getAllServices_crm() {\r\n\t\t$billingServicesObj = new billing_SERVICES();\r\n $services = $billingServicesObj->getAllServiceDataForActiveServices();\r\n foreach ($services as $key=>$val) {\r\n if (strpos($val[\"SERVICEID\"], 'M') && $val[\"SERVICEID\"] != 'M3' && $val[\"SERVICEID\"] != 'M') {\r\n \tunset($services[$key]);\r\n }\r\n }\r\n return $services;\r\n }", "protected function get_service_classes(): array {\n\t\treturn [];\n\t}", "public function serviceInstances() {\n return StatusBoard_SiteService::allForSite($this); \n }", "public function getServices()\n {\n $services = OurService::select('id','title','slug','description','image')\n ->where('status','=',\\DB::raw(1))\n ->take(4)\n ->get();\n if($services->count()) {\n return $services;\n }\n\n return false;\n }", "public static function get_services()\n {\n return [\n Pages\\Dashboard::class,\n Base\\Enqueue::class,\n Base\\SettingsLink::class,\n Base\\CustomPostTypeController::class,\n ];\n }", "public function index()\n {\n return $this->service->list();\n }", "public static function get_services()\n {\n\n //підключаємо всі необхідні класи для активації через масив\n return [\n Pages\\Admin::class,\n Base\\Enqueue::class,\n Base\\SettingsLinks::class\n ];\n }", "public function listAvailableServices( $sensorID)\n {\n\t\t$data = $this->call(array(), \"GET\", \"sensors/\".$sensorID.\"/services/available.json\");\n\t\t$data = $data->{'services'};\n\t\t$serviceArray = new ArrayObject();\n\t\tfor($i = 0; $i<count($data);$i++){\n\t\t\t$serviceArray->append(new Service($data[$i], $this));\n\t\t}\n\t\treturn $serviceArray;\n }", "public static function get_services(): array\n {\n return [\n Base\\SettingsLinks::class,\n Pages\\Admin::class,\n Base\\Enqueue::class,\n CPT\\EmailCpt::class,\n ];\n }", "public function index()\n {\n return Service::all();\n }", "public static function getAllServiceTypes() {\n return id(new PhutilClassMapQuery())\n ->setAncestorClass(__CLASS__)\n ->setUniqueMethod('getServiceTypeConstant')\n ->setSortMethod('getServiceTypeName')\n ->execute();\n }", "public function getList()\n {\n $query = (new Query());\n $query->select(['services.id as id, services.name as name, COUNT(orders.id) as count'])\n ->from('services')\n ->rightJoin('orders', '`orders`.`service_id` = `services`.`id`');\n\n $this->filter($query);\n\n return $query->groupBy('orders.service_id')\n ->all();\n }", "function listServices()\n{\n global $LANG_ADMIN, $LANG_TRB, $_CONF, $_IMAGE_TYPE, $_TABLES;\n\n require_once $_CONF['path_system'] . 'lib-admin.php';\n\n $retval = '';\n\n $header_arr = array( # display 'text' and use table field 'field'\n array('text' => $LANG_ADMIN['edit'], 'field' => 'edit', 'sort' => false),\n array('text' => $LANG_TRB['service'], 'field' => 'name', 'sort' => true),\n array('text' => $LANG_TRB['ping_method'], 'field' => 'method', 'sort' => true),\n array('text' => $LANG_TRB['service_ping_url'], 'field' => 'ping_url', 'sort' => true),\n array('text' => $LANG_ADMIN['enabled'], 'field' => 'is_enabled', 'sort' => false)\n );\n\n $defsort_arr = array('field' => 'name', 'direction' => 'asc');\n\n $menu_arr = array (\n array('url' => $_CONF['site_admin_url'] . '/trackback.php?mode=editservice',\n 'text' => $LANG_ADMIN['create_new']),\n array('url' => $_CONF['site_admin_url'],\n 'text' => $LANG_ADMIN['admin_home']));\n\n $retval .= COM_startBlock($LANG_TRB['services_headline'], '',\n COM_getBlockTemplate('_admin_block', 'header'));\n\n $retval .= ADMIN_createMenu(\n $menu_arr,\n $LANG_TRB['service_explain'],\n $_CONF['layout_url'] . '/images/icons/trackback.' . $_IMAGE_TYPE\n );\n\n $text_arr = array(\n 'has_extras' => true,\n 'form_url' => $_CONF['site_admin_url'] . '/trackback.php',\n 'help_url' => getHelpUrl() . '#ping'\n );\n\n $query_arr = array(\n 'table' => 'pingservice',\n 'sql' => \"SELECT * FROM {$_TABLES['pingservice']} WHERE 1=1\",\n 'query_fields' => array('name', 'ping_url'),\n 'default_filter' => \"\",\n 'no_data' => $LANG_TRB['no_services']\n );\n\n // this is a dummy variable so we know the form has been used if all services\n // should be disabled in order to disable the last one.\n $form_arr = array('bottom' => '<input type=\"hidden\" name=\"serviceChanger\" value=\"true\"' . XHTML . '>');\n\n $retval .= ADMIN_list('pingservice', 'ADMIN_getListField_trackback',\n $header_arr, $text_arr, $query_arr, $defsort_arr,\n '', SEC_createToken(), '', $form_arr);\n $retval .= COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer'));\n\n if ($_CONF['trackback_enabled']) {\n $retval .= freshTrackback ();\n }\n if ($_CONF['pingback_enabled']) {\n $retval .= freshPingback ();\n }\n\n return $retval;\n}", "public function getDeclaredServices(): array\n {\n return [\n // Service id, optional class name, tag\n ['best_it_contentful.markdown.twig_extension', MarkdownExtension::class, 'twig.extension'],\n ['best_it_contentful.contentful.twig_extension', ContentfulExtension::class, 'twig.extension'],\n ['best_it_contentful.delivery.cache.reset_service', CacheResetService::class],\n ['best_it_contentful.delivery.client', ClientDecorator::class],\n ['best_it_contentful.markdown.parser', MarkdownParser::class],\n ['best_it_contentful.delivery.response_parser.default', SimpleResponseParser::class]\n ];\n }", "protected function getServices() {\n\t\treturn [\n\t\t\tMessagesService::class,\n\t\t];\n\t}", "public function getServiceDefinitions(): array;", "public function getServices()\r\n {\r\n if (is_null($this->_services)) {\r\n if ($this->getConfig('auto')) {\r\n $this->_services = array();\r\n $config = Mage::app()->getConfig();\r\n foreach (array('cache', 'full_page_cache', 'fpc') as $cacheType) {\r\n $node = $config->getXpath('global/' . $cacheType . '[1]');\r\n if (isset($node[0]->backend) && in_array((string)$node[0]->backend, array(\r\n 'Cm_Cache_Backend_Redis',\r\n 'Mage_Cache_Backend_Redis'\r\n ))) {\r\n $this->_services[] = $this->_buildServiceArray(\r\n $this->__(str_replace('_', ' ', uc_words($cacheType))),\r\n $node[0]->backend_options->server,\r\n $node[0]->backend_options->port,\r\n $node[0]->backend_options->password,\r\n $node[0]->backend_options->database\r\n );\r\n }\r\n }\r\n // get session\r\n $node = $config->getXpath('global/redis_session');\r\n if ($node) {\r\n $this->_services[] = $this->_buildServiceArray(\r\n $this->__('Session'),\r\n $node[0]->host,\r\n $node[0]->port,\r\n $node[0]->password,\r\n $node[0]->db\r\n );\r\n }\r\n } else {\r\n $this->_services = unserialize($this->getConfig('manual'));\r\n }\r\n }\r\n return $this->_services;\r\n }", "public static function select_all_our_services()\n {\n $query = new Query;\n $services = $query->select(['core_products.*','core_product_categories.category_name','core_product_sub_categories.sub_category_name', 'core_product_models.model_name','core_product_categories.metric AS metric','core_product_images.*'])\n ->from('core_products')\n ->leftJoin('core_product_categories', 'core_product_categories.category_id=core_products.category_id')\n ->leftJoin('core_product_sub_categories', 'core_product_sub_categories.sub_category_id=core_products.sub_category_id')\n ->leftJoin('core_product_models', 'core_product_models.model_id=core_products.model_id')\n ->innerJoin('core_product_images', 'core_product_images.product_id=core_products.product_id')\n ->orderBy(['core_products.product_id' => SORT_DESC])\n ->groupBy('core_products.product_id')\n ->where(\"core_products.product_status = 1\")\n ->andWhere(['>=','core_products.product_expires_on',date(\"Y-m-d H:i:s\")])\n ->all();\n return $services;\n }", "public function listHostedServices()\n {\n \t$response = $this->_performRequest(self::OP_HOSTED_SERVICES);\n\n \tif ($response->isSuccessful()) {\n\t\t\t$result = $this->_parseResponse($response);\n\n \t\tif (!$result->HostedService) {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t if (count($result->HostedService) > 1) {\n \t\t $xmlServices = $result->HostedService;\n \t\t} else {\n \t\t $xmlServices = [$result->HostedService];\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_HostedServiceInstance(\n\t\t\t\t\t (string)$xmlServices[$i]->Url,\n\t\t\t\t\t (string)$xmlServices[$i]->ServiceName\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 }", "public function getServices()\n {\n $services = InvoiceService::where('office_id', request('office_id'))->where('name', 'like', '%' . request('q') . '%')->get();\n\n return $services;\n }", "public function getList()\n {\n $service = list_services::all();\n return view('page.services',compact('service'));\n }", "private function loadServices()\n {\n # Receive list of available service binary's\n exec(\"php composer.phar exec --list\", $services);\n $services = array_filter($services, function ($row) {\n return (substr($row, 0, 1) === '-' && strpos($row, 'service-')) &&\n (!strpos($row, 'service-manager')) &&\n (!strpos($row, 'service-socket'));\n });\n\n array_unshift($services, \"service-socket\");\n foreach ($services as $service) {\n $service = str_replace(\"- \", \"\", $service);\n $this->loadService($service);\n }\n }", "public function index()\n {\n $services = Service::\n orderBy('status', 'asc')->\n orderBy('created_at', 'desc')->\n paginate(10);\n\n return view('services.services', compact('services'));\n }", "public function get_services($settings = FALSE)\n\t{\t\n\t\treturn parent::get_objects(array(\n\t\t\t'settings' => $settings\n\t\t));\n\t}", "public static function getDeferredServices(){\n return \\Illuminate\\Foundation\\Application::getDeferredServices();\n }", "protected function renderServicesList() {}", "public function getServices()\n\t\t{\n\n\t\t\t$service_id = $this->input->get('service_id') ;\n\t\t\techo json_encode($this->mdl_services->all()->result() ) ;\n\t\t}", "public function listServiceOfferings() {\n\t\t$data = array (\n\t\t\t\t\"apiKey\" => $this->apiKey,\n\t\t\t\t\"command\" => \"listServiceOfferings\",\n\t\t\t\t\"response\" => \"json\"\n\t\t);\n\t\t$url = $this->getSignatureUrl ( $data );\n\t\treturn $this->curlGet ( $url );\n\t}", "public static function getServices($user=null) {\n\t\tif ($user!=null)\t$portlist=$user->getRol()->getServices();\n\t\telse \t\t\t\t\t$portlist=$this->getDoctrine()->getRepository(Service::class)->findAll();\n\t\t$data=array(\"total\"=>count($portlist),\"rows\"=>array());\n\t\tforeach($portlist as $port) {\n\t\t\t$row=array(\"id\"=>$port->getId(), \"port\"=>$port->getPort(), \"name\"=>$port->getName());\n\t\t\t$data[\"rows\"][]=$row;\n\t\t}\n\t\treturn $data;\n\t}", "public function getActiveServiceProviderList()\n {\n return array_keys($this->activeProviders);\n }", "public function serviceSelectAll(){\n $data = $this->getDataAccessObject()->daoSelectAll();\n return $data;\n }", "public function index()\n {\n return $this->service->all();\n }", "public function findServicesDowntimesForAdminUser(): array;", "public function services()\n {\n $sahulatServices=$this->_service->getServices(\"Sahulat\");\n $vendorServices=$this->_service->getServices(\"Vendor\");\n return view('frontend.service.services')->with(compact('sahulatServices','vendorServices'));;\n }", "public function index(){\n $this->vars['page_header'] = OsMenuHelper::get_menu_items_by_id('services');\n $service_categories = new OsServiceCategoryModel();\n $service_categories = $service_categories->get_results_as_models();\n $this->vars['service_categories'] = $service_categories;\n\n $services = new OsServiceModel();\n $this->vars['uncategorized_services'] = $services->where(array('category_id' => ['OR' => [0, 'IS NULL']]))->order_by('order_number asc')->get_results_as_models();\n\n $this->format_render(__FUNCTION__);\n }", "public function findServicesByHostWithoutRequestParameters(int $hostId): array;", "public static function get_services($intState = 2) {\n\n\t\t$chrQuery = \"\n\t\t\tSELECT NagiosValue.idNagiosService AS idService\n\t\t\tFROM NagiosValue\n\t\t\tLEFT JOIN NagiosField ON NagiosValue.idNagiosField = NagiosField.idNagiosField\n\t\t\tWHERE NagiosField.chrName = ?\n\t\t\tAND NagiosValue.chrValue = ?\n\t\t\n\t\t\tORDER BY \n\t\t\t\t(SELECT NagiosValue.chrValue \n\t\t\t\tFROM NagiosValue\n\t\t\t\tLEFT JOIN NagiosField ON NagiosValue.idNagiosField = NagiosField.idNagiosField \n\t\t\t\tWHERE NagiosValue.idNagiosService = idService\n\t\t\t\tAND NagiosField.chrName = ?) DESC\n\t\t\";\n\t\t\n\t\t$objQuery = DB::prepare($chrQuery);\n\t\t\n\t\t$objQuery->execute(\n\t\t\tarray(\n\t\t\t\t'last_hard_state',\n\t\t\t\t$intState,\n\t\t\t\t'last_hard_state_change',\n\t\t\t)\n\t\t);\n\t\t\n\t\t$arrServices = array();\n\t\tforeach($objQuery->fetchAll() as $intCount => $arrResult){\n\t\t\t\n\t\t\t$objService = new NagiosService($arrResult['idService']);\n\t\t\n\t\t\tif($objService->getField('problem_has_been_acknowledged') != 0){\n\t\t\t\t# Problem has been acknowledged - skip it\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t$arrServices[] = $arrResult['idService'];\n\t\t\t\n\t\t}\n\t\n\t\treturn $arrServices;\n\t\t\t\n\t}", "public function index()\n {\n $services = $this->serviceRepositories->getServices();\n\n return view('backend.services.list', compact('services'));\n }", "public function index()\n {\n $services = Services::OrderBy('sequence')->get();\n\n return view('services.list', ['services' => $services]);\n }", "public function our_services(){\n $all_services = Service::all();\n return view('front_end.pages_frontend.our_services',compact('all_services'));\n }", "public function findOnDemandServiceMacros(int $serviceId, bool $isUsingInheritance = false): array;", "public function findServicesByHost(Host $host): array;", "public function index()\n {\n \n $all_servive = Services::all();\n return view('all_service')->with('services', $all_servive);\n }", "public function getAllServicesByUser($userId) {\n $services = self::find()->where(['created_by' => $userId])->all();\n\n return $services;\n }", "public static function getStatusList()\n {\n return BaseServiceDelivery::getStatusList();\n }", "public function index()\n {\n $title = 'Services';\n $modulo = 'services';\n $models = Service::all();\n $total = Service::all()->count();\n $fields = [\n 'id',\n 'name',\n 'description',\n 'created_at',\n 'updated_at'\n ];\n return view('list', compact('title', 'models', 'total', 'fields', 'modulo'));\n }", "public function index()\n {\n\n return view('smmpro::services.index', [\n 'services' => Service::orderBy('created_at', 'desc')->get()\n ]);\n }" ]
[ "0.73377377", "0.722843", "0.69160146", "0.6892129", "0.6772187", "0.66971886", "0.65814096", "0.63706046", "0.63466865", "0.633627", "0.6324876", "0.63051397", "0.63051397", "0.63051397", "0.630276", "0.6280854", "0.6279807", "0.62582827", "0.62582827", "0.6201976", "0.6189653", "0.618466", "0.6181692", "0.6155454", "0.61208725", "0.61176497", "0.6102509", "0.60744953", "0.6062851", "0.6045852", "0.60341865", "0.60304713", "0.60149133", "0.6014543", "0.59856105", "0.59740615", "0.59487325", "0.59410125", "0.59149945", "0.5908567", "0.590659", "0.590239", "0.5891028", "0.5878004", "0.5870902", "0.5862939", "0.5848983", "0.58413553", "0.58191526", "0.5797645", "0.57919925", "0.5764063", "0.57514334", "0.5729647", "0.5707327", "0.568661", "0.5683807", "0.5675665", "0.56753534", "0.5655103", "0.56550795", "0.564956", "0.5644851", "0.56423956", "0.56340325", "0.562901", "0.5557152", "0.55528045", "0.5548912", "0.5547427", "0.5544671", "0.5535835", "0.5501201", "0.54952705", "0.5493367", "0.5489571", "0.5489187", "0.54842484", "0.546138", "0.5461326", "0.54499286", "0.5432243", "0.54306364", "0.5423973", "0.5423185", "0.5422243", "0.54111797", "0.54031366", "0.538976", "0.5378457", "0.5370334", "0.5363499", "0.536121", "0.5360218", "0.53585374", "0.5337189", "0.53195405", "0.5316335", "0.52914214", "0.52849245" ]
0.77746826
0
/! \brief No checks here.
function check() { return array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _i() {\n }", "private function __() {\n }", "public function oops () {\n }", "public static function dummy() {}", "final private function __construct() {}", "final private function __construct() {}", "public function helper()\n\t{\n\t\n\t}", "final private function __construct() { }", "final private function __construct() { }", "final private function __construct() { }", "private function __construct()\t{}", "public function nullberry(): void\n\t{\n\t}", "abstract protected function requiredOperations1(): void;", "public function _check()\n {\n }", "private function privateDummy()\n {\n }", "final private function __construct(){\r\r\n\t}", "private final function __construct() {}", "protected function __init__() { }", "private function static_things()\n\t{\n\n\t\t# code...\n\t}", "private function __construct( )\n {\n\t}", "private function method1()\n\t{\n\t}", "private function __construct () {}", "abstract protected function safetyCheck() : self;", "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() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "final private function __construct()\n\t{\n\t}", "protected function fixSelf() {}", "protected function fixSelf() {}", "protected function _refine() {\n\n\t}", "private function method2()\n\t{\n\t}", "private function __construct()\r\n {}", "abstract protected function external();", "protected final function __construct() {}", "abstract protected function doEvil();", "final function __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() { }" ]
[ "0.64917386", "0.6326657", "0.5959073", "0.5957188", "0.59195113", "0.59195113", "0.58917195", "0.58728105", "0.58728105", "0.58728105", "0.5841702", "0.5828926", "0.5774969", "0.576838", "0.574273", "0.5730248", "0.5722153", "0.57199574", "0.56975675", "0.5684486", "0.56797457", "0.5673947", "0.565692", "0.56521434", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5650892", "0.5648537", "0.5648537", "0.5642846", "0.56322783", "0.56322783", "0.5628804", "0.5603836", "0.56018484", "0.55934083", "0.55384946", "0.55384535", "0.5523114", "0.5519624", "0.5519624", "0.5519624", "0.5519624", "0.5519624", "0.5519624", "0.5519624", "0.5519624", "0.5519624" ]
0.0
-1
/! \brief Keep posted form values in opened dialogs
function save_object() { if ($this->dialog && is_object($this->dialogObject)) { if (method_exists($this->dialogObject, 'save_object')) { $this->dialogObject->save_object(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function valiteForm();", "public function GetFormPostedValues() {\n\t\t$req_fields=array(\"description\",\"date_open\",\"date_closed\");\n\n\t\tfor ($i=0;$i<count($req_fields);$i++) {\n\n\t\t\t//echo $_POST['application_id'];\n\t\t\tif (ISSET($_POST[$req_fields[$i]]) && !EMPTY($_POST[$req_fields[$i]])) {\n\t\t\t\t$this->SetVariable($req_fields[$i],EscapeData($_POST[$req_fields[$i]]));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//echo \"<br>\".$this->req_fields[$i].\"<br>\";\n\t\t\t\t$this->$req_fields[$i]=\"\";\n\t\t\t}\n\t\t}\n\t}", "abstract protected function _setNewForm();", "public function populateForm() {}", "private function restore()\n {\n if ($this->session->has('sergsxm_form_'.$this->formId)) {\n $this->parameters = $this->session->get('sergsxm_form_'.$this->formId);\n } else {\n $this->parameters = array();\n }\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}", "public function get_submitted_edit_form_data()\n\t{\n\t\t$this->credits = $_POST['credits'];\n\t\t$this->levelID = $_POST['level'];\t\n\t}", "public function getForm();", "abstract protected function getForm();", "public function setAlertForm();", "function pickup_submit()\n\t{\n\t\t$name = '_f_'.$this->name;\n\t\t$this->value = $GLOBALS[$name];\n\t}", "public function preferenceForm()\r\n\t{\r\n\t\treturn null;\r\n\t}", "function dumpFormItems()\r\n {\r\n // Overriden to avoid printing a hidden field to get the value of the component.\r\n }", "public static function getForm();", "private function resetFormData()\r\n {\r\n $_charset = $this->config->getModuleVar('common', 'charset');\r\n\r\n $this->viewVar['cauthor'] = htmlentities($this->strip($this->cauthor), ENT_COMPAT, $_charset);\r\n $this->viewVar['cemail'] = htmlentities($this->strip($this->cemail), ENT_COMPAT, $_charset);\r\n $this->viewVar['cbody'] = htmlentities($this->strip($this->cbody), ENT_COMPAT, $_charset);\r\n }", "abstract function getForm();", "function readForm() {\n\t\t$this->FiscaalGroepID = $this->formHelper(\"FiscaalGroepID\", 0);\n\t\t$this->FiscaalGroupType = $this->formHelper(\"FiscaalGroupType\", 0);\n\t\t$this->GewijzigdDoor = $this->formHelper(\"GewijzigdDoor\", 0);\n\t\t$this->GewijzigdOp = $this->formHelper(\"GewijzigdOp\", \"\");\n\t}", "function adminSetFormInSession($formName){\n\t\tforeach($this->post as $key => $value){\n\t\t\t$_SESSION[$formName][$key]=$value;\n\t\t}\n\t}", "function definition_after_data($newmsform) {\n $mform = $newmsform->_form;\n\t\t\n if ($mform->isSubmitted()) {\n $someelem = $mform->getElement('salt');\n $value = $someelem->getValue();\n\t\t\techo $value & 'Hello world';\n // Do whatever checking you need\n //$someelem->setValue($someothervalue);\n // etc.\n // add some new elements...\n }\n\t\n\t}", "abstract public function getForm() : void;", "private function saveData()\n { \n // Save form data in session\n if (count($this->post) > 0) {\n $_SESSION['gentlesource_voting_configuration'] = $this->post;\n $this->data = $this->post;\n $this->votingOptions = $this->post['votingOptions'];\n } else {\n if (isset($_SESSION['gentlesource_voting_configuration'])) {\n $this->data = $_SESSION['gentlesource_voting_configuration'];\n $this->votingOptions = $this->data['votingOptions'];\n }\n }\n }", "function vc_infusion_settings_form_submit($form, $form_state) {\n $v = &$form_state['values'];\n variable_set('vc_infusion_appkey', $v['appkey']);\n variable_set('vc_infusion_appname', $v['appname']);\n variable_set('vc_infusion_template_firstname', $v['firstname']);\n variable_set('vc_infusion_template_lastname', $v['lastname']);\n variable_set('vc_infusion_template_email', $v['email']);\n}", "private function store()\n {\n $this->session->set('sergsxm_form_'.$this->formId, $this->parameters);\n }", "function getForm($form, &$form_state, $disabled, $myvalues)\n {\n $form[\"data_entry_area1\"] = array(\n '#prefix' => \"\\n<section class='protocollib-admin raptor-dialog-table'>\\n\",\n '#suffix' => \"\\n</section>\\n\",\n );\n $form[\"data_entry_area1\"]['table_container'] = array(\n '#type' => 'item', \n '#prefix' => '<div class=\"raptor-dialog-table-container\">',\n '#suffix' => '</div>', \n '#tree' => TRUE,\n );\n\n\tglobal $base_url;\n $language_infer = new \\raptor_formulas\\LanguageInference();\n\t\t\n $showDeleteOption = $this->m_oUserInfo->hasPrivilege('REP1');\n $showAddOption = $this->m_oUserInfo->hasPrivilege('UNP1');\n \n $rows = \"\\n\";\n $result = db_select('raptor_protocol_lib', 'p')\n ->fields('p')\n ->orderBy('protocol_shortname')\n ->execute();\n foreach($result as $item) \n {\n $protocol_shortname = $item->protocol_shortname;\n if($item->original_file_upload_dt == NULL)\n {\n $docuploadedmarkup = 'No';\n } else {\n $docuploadedmarkup = '<span class=\"hovertips\" title=\"uploaded '\n .$item->original_filename\n .' on '\n .$item->original_file_upload_dt.'\">Yes</span>';\n }\n $keywords = $this->getFormattedKeywordsForTable($protocol_shortname);\n $active_markup = $item->active_yn == 1 ? '<b>Yes</b>' : 'No';\n $declaredHasContrast = $item->contrast_yn == 1 ? TRUE : FALSE;\n $hasSedation = $item->sedation_yn == 1 ? '<b>Yes</b>' : 'No';\n $hasRadioisotope = $item->sedation_yn == 1 ? '<b>Yes</b>' : 'No';\n $fullname = $item->name;\n $infered_hasContrast = $language_infer->inferContrastFromPhrase($fullname);\n $hasContrastMarkup = $declaredHasContrast ? '<b>Yes</b>' : 'No';\n if($infered_hasContrast !== NULL)\n {\n if(!(\n ($declaredHasContrast && $infered_hasContrast) || \n (!$declaredHasContrast && !$infered_hasContrast))\n )\n {\n if($infered_hasContrast)\n {\n $troublemsg = \"protocol long name implies YES contrast\";\n } else {\n $troublemsg = \"protocol long name implies NO contrast\";\n }\n $hasContrastMarkup = \"<span class='medical-health-warn' title='$troublemsg'>!!! $hasContrastMarkup !!!</span>\";\n }\n }\n if(!$showAddOption)\n {\n $addActionMarkup = '';\n $editActionMarkup = '';\n } else {\n $addActionMarkup = '<a href=\"'.$base_url.'/raptor/viewprotocollib?protocol_shortname='.$item->protocol_shortname.'\">View</a>';\n $editActionMarkup = '<a href=\"'.$base_url.'/raptor/editprotocollib?protocol_shortname='.$item->protocol_shortname.'\">Edit</a>';\n }\n if(!$showDeleteOption)\n {\n $deleteActionMarkup = '';\n } else {\n $deleteActionMarkup = '<a href=\"'.$base_url.'/raptor/deleteprotocollib?protocol_shortname='.$item->protocol_shortname.'\">Delete</a>';\n }\n $rows .= \"\\n\".'<tr>'\n . '<td>'.$protocol_shortname.'</td>'\n . '<td>'.$fullname.'</td>'\n . '<td>'.$active_markup.'</td>'\n . '<td>'.$hasContrastMarkup.'</td>'\n . '<td>'.$hasSedation.'</td>'\n . '<td>'.$hasRadioisotope.'</td>'\n . '<td>'.$item->modality_abbr.'</td>'\n . '<td>'.$item->version.'</td>'\n . '<td>'.$docuploadedmarkup.'</td>'\n . '<td>'.$keywords.'</td>'\n . \"<td>$addActionMarkup</td>\"\n . \"<td>$editActionMarkup</td>\"\n . \"<td>$deleteActionMarkup</td>\"\n . '</tr>';\n }\n\n $form[\"data_entry_area1\"]['table_container']['protocols'] = array('#type' => 'item',\n '#markup' => '<table id=\"my-raptor-dialog-table\" class=\"dataTable\">'\n . '<thead>'\n . '<tr>'\n . '<th title=\"System unique identifier for the protocol\">Short Name</th>'\n . '<th title=\"Full name of the protocol\">Long Name</th>'\n . '<th title=\"Only active protocols are available for use on new exams\">Is Active</th>'\n . '<th title=\"Has contrast\">C</th>'\n . '<th title=\"Has sedation\">S</th>'\n . '<th title=\"Has radioisotope\">R</th>'\n . '<th title=\"The equipment context for this protocol\">Modality</th>'\n . '<th title=\"Value increases with each saved edit\">Version</th>'\n . '<th title=\"The scanned document\">Doc Uploaded</th>'\n . '<th title=\"Keywords used for matching this protocol programatically\">Keywords</th>'\n . '<th title=\"Just view the protocol\">View</th>'\n . '<th title=\"Edit the protocol details\">Edit</th>'\n . '<th title=\"Remove this protocol from the library\">Delete</th>'\n . '</tr>'\n . '</thead>'\n . '<tbody>'\n . $rows\n . '</tbody>'\n . '</table>');\n \n $form['data_entry_area1']['action_buttons'] = array(\n '#type' => 'item', \n '#prefix' => '<div class=\"raptor-action-buttons\">',\n '#suffix' => '</div>', \n '#tree' => TRUE,\n );\n $form['data_entry_area1']['action_buttons']['createlink'] \n = array('#type' => 'item'\n , '#markup' => '<a class=\"button\" href=\"'\n .$base_url.'/raptor/addprotocollib\">Add Protocol</a>');\n\n $form['data_entry_area1']['action_buttons']['cancel'] = array('#type' => 'item'\n , '#markup' => '<input class=\"raptor-dialog-cancel\" type=\"button\" value=\"Exit\" />'); \n \n \n return $form;\n }", "function process_form()\n {\n }", "public function postSaveForm( $values )\n\t{\n\t}", "function wyz_ajax_business_form_builder_save_form() {\n\n\t$form_data = json_decode( stripslashes_deep( $_REQUEST['form_data'] ),true );\n\tif ( ! empty( $form_data ) && is_array( $form_data ) ) {\n\t\tforeach ( $form_data as $key => $value ) {\n\t\t\t$form_data[ $key ]['hidden'] = true;\n\t\t}\n\t}\n\tupdate_option( 'wyz_business_form_builder_data', $form_data );\n\twp_die();\n}", "function setFormInSession($formName,$receiver){\n\t\tforeach($this->post as $key => $value){\n\t\t\t$_SESSION[$formName][$key]=$value;//echo $key . \" \".$value.\"<br>\";\n\t\t}\n\t}", "function greetingSetFormInSession($formName){\n\t\tforeach($this->post as $key => $value){\n\t\t\t$_SESSION[$formName][$key]=$value;\n\t\t}\n\t}", "function gigya_share_bar_pane_edit_form_submit($form, &$form_state) {\n foreach (array_keys($form_state['plugin']['defaults']) as $key) {\n if (isset($form_state['values'][$key])) {\n $form_state['conf'][$key] = $form_state['values'][$key];\n }\n }\n}", "public static function\n\t\tprocess_frame_editor_form()\n\t{\n\t\t// NOT USED ANYMORE\n\t\t//\n\t\t//\n\n\t\t// echo 'print_r($_GET)' . \"\\n\";\n\t\t// print_r($_GET);\n\t\t// echo 'print_r($_POST)' . \"\\n\";\n\t\tprint_r($_POST);exit;\n\t\t//echo 'print_r($_SESSION)' . \"\\n\";\n\t\t//print_r($_SESSION);\n\t\t// echo '$_SESSION[\\'name\\']: ' . $_SESSION['name'] . \"\\n\";\n\t\t// echo '$_SESSION[\\'email\\']: ' . $_SESSION['email'] . \"\\n\";\n\t\t// \n\t\t// $return_to_url = self::get_frame_creator_page_url();\n\t\t$return_to_url = new HTMLTags_URL();\n\t\t$return_to_url->set_file('/');\n\t\t$return_to_url->set_get_variable('oo-page', 1);\n\t\t$return_to_url->set_get_variable('page-class', 'Oedipus_FrameCreatorPage');\n\n\t\t$return_to_url->set_get_variable('frame_values', 1);\n\n\t\tforeach ($_POST as $key=>$value)\n\t\t{\n\t\t\t$return_to_url->set_get_variable($key, $value);\n\t\t}\n\n\n\t\t// print_r($_POST);echo $return_to_url->get_as_string();exit;\n\t\t// \n\t\t// if (isset($_GET['add_person'])) {\n\t\t// $mysql_user_fcharactery = Database_MySQLUserFcharactery::get_instance();\n\t\t// $mysql_user = $mysql_user_fcharactery->get_for_this_project();\n\t\t// $database = $mysql_user->get_database();\n\t\t// \n\t\t// $people_frame = $database->get_frame('hpi_mailing_list_people');\n\t\t// \n\t\t// if (isset($_POST['name'])) {\n\t\t// $_SESSION['name'] = $_POST['name'];\n\t\t// }\n\t\t// \n\t\t// if (isset($_POST['email'])) {\n\t\t// $_SESSION['email'] = $_POST['email'];\n\t\t// }\n\t\t// \n\n\t\t// try {\n\t\t// $last_added_id = $oedipus_frames_frame->update_frame(\n\t\t// $_POST['name'],\n\t\t// $_POST['email'],\n\t\t// isset($_POST['force_email'])\n\t\t// );\n\t\t// \n\t\t// $return_to_url->set_get_variable('frame_updated');\n\n\t\t// \n\t\t// $_SESSION['last_added_id'] = $last_added_id;\n\t\t// \n\t\t// unset($_SESSION['name']);\n\t\t// unset($_SESSION['email']);\n\t\t// } catch (MailingList_NameAndEmailException $e) {\n\t\t// $return_to_url->set_get_variable('form_incomplete');\n\t\t// } catch (MailingList_NameTooLongException $e) {\n\t\t// $return_to_url->set_get_variable('name_too_long');\n\t\t// } catch (MailingList_EmailTooLongException $e) {\n\t\t// $return_to_url->set_get_variable('email_too_long');\n\t\t// } catch (MailingList_InvalidEmailException $e) {\n\t\t// $return_to_url->set_get_variable('email_incorrect');\n\t\t// } catch (Database_InvalidUserInputException $e) {\n\t\t// $return_to_url->set_get_variable('error_message', urlencode($e->getMessage()));\n\t\t// }\n\t\t// }\n\t\t// \n\t\t// print_r($return_to_url);\n\t\t#exit;\n\n\t\treturn $return_to_url;\n\t}", "abstract public function bindForm();", "abstract public function bindForm();", "function wyz_ajax_business_tabs_save_form() {\n\n\t$form_data = json_decode( stripslashes_deep( $_REQUEST['form_data'] ),true );\n\tif ( ! empty( $form_data ) && is_array( $form_data ) ) {\n\t\tforeach ( $form_data as $key => $value ) {\n\t\t\t$form_data[ $key ]['hidden'] = true;\n\t\t}\n\t}\n\tupdate_option( 'wyz_business_tabs_order_data', $form_data );\n\twp_die();\n}", "function bare_pages_form_submit($form, &$form_state) {\n if (!empty($GLOBALS['bare_pages_close_modal'])) {\n // Hacky, but I don't see how to circumvent the \"?destination=path\" in any other way\n unset($_GET['destination']);\n $form_state['redirect'] = FALSE;// This seems to fail (on its own ?) -> using 'rebuild' as well\n $form_state['rebuild'] = TRUE;\n }\n}", "function saveForm(){\t\n\t\t$this->saveFormBase();\n\t\t$this->saveFormGeoCoverage();\n\t\t$this->saveVaFormResolution();\n\t\tif ($this->dataset->nbModForm >0) $this->saveModForm();\n\t\tif ($this->dataset->nbSatForm >0) $this->saveSatForm();\n\t\tif ($this->dataset->nbInstruForm >0) $this->saveInstruForm();\n\t\t$this->saveFormGrid();\n\t\t//Parameter\n\t\t$this->saveFormVariables($this->dataset->nbVars);\n\t\t//REQ DATA_FORMAT\n\t\t$this->dataset->required_data_formats = array();\n\t\t$this->dataset->required_data_formats[0] = new data_format;\n\t\t$this->dataset->required_data_formats[0]->data_format_id = $this->exportValue('required_data_format');\n\t}", "private function resetInputFields(){\n $this->title = '';\n $this->body = '';\n $this->page_id = '';\n }", "public function gui2()\n {\n require_code('form_templates');\n\n $submit_name = do_lang_tempcode('PROCEED');\n $post_url = build_url(array('page' => '_SELF', 'type' => 'actual'), '_SELF');\n\n $fields = new Tempcode();\n $hidden = new Tempcode();\n $already = array();\n $email_counter = 0;\n foreach ($_POST as $key => $input_value) {\n if (get_magic_quotes_gpc()) {\n $input_value = stripslashes($input_value);\n }\n\n if (substr($key, 0, 14) == 'email_address_') {\n $already[] = $input_value; //email address\n $email_counter++;\n $hidden->attach(form_input_hidden($key, $input_value));\n } else {\n // Add hidden field to the form\n if ($key != 'upload') {\n $hidden->attach(form_input_hidden($key, $input_value));\n }\n }\n }\n\n $hidden->attach(form_input_hidden('select_contacts_page', '1'));\n\n $text = do_lang_tempcode('RECOMMEND_SITE_TEXT_CHOOSE_CONTACTS', escape_html(get_site_name()));\n\n $page_title = get_param_string('page_title', null, true);\n if (is_null(get_param_string('from', null, true))) {\n $hidden->attach(form_input_hidden('wrap_message', '1'));\n }\n\n $success_read = false;\n\n // Start processing CSV file\n if ((get_option('enable_csv_recommend') == '1') && (!is_guest())) {\n if (array_key_exists('upload', $_FILES)) { // NB: We disabled plupload for this form so don't need to consider it\n if (is_uploaded_file($_FILES['upload']['tmp_name']) && preg_match('#\\.csv#', $_FILES['upload']['name']) != 0) {\n $possible_email_fields = array('E-mail', 'Email', 'E-mail address', 'Email address', 'Primary Email');\n $possible_name_fields = array('Name', 'Forename', 'First Name', 'Display Name', 'First');\n\n $fixed_contents = unixify_line_format(file_get_contents($_FILES['upload']['tmp_name']));\n require_code('files');\n cms_file_put_contents_safe($_FILES['upload']['tmp_name'], $fixed_contents, FILE_WRITE_FAILURE_SILENT);\n\n safe_ini_set('auto_detect_line_endings', '1');\n $myfile = fopen($_FILES['upload']['tmp_name'], 'rt');\n\n $del = ',';\n\n $csv_header_line_fields = fgetcsv($myfile, 10240, $del);\n if ((count($csv_header_line_fields) == 1) && (strpos($csv_header_line_fields[0], ';') !== false)) {\n $del = ';';\n rewind($myfile);\n $csv_header_line_fields = fgetcsv($myfile, 10240, $del);\n }\n\n $skip_next_process = false;\n\n if (function_exists('mb_convert_encoding')) {\n if ((function_exists('mb_detect_encoding')) && (strlen(mb_detect_encoding($csv_header_line_fields[0], \"ASCII,UTF-8,UTF-16,UTF16\")) == 0)) { // Apple mail weirdness\n // Test string just for Apple mail detection\n $test_unicode = utf8_decode(mb_convert_encoding($csv_header_line_fields[0], \"UTF-8\", \"UTF-16\"));\n if (preg_match('#\\?\\?ame#u', $test_unicode) != 0) {\n foreach ($csv_header_line_fields as $key => $value) {\n $csv_header_line_fields[$key] = utf8_decode(mb_convert_encoding($csv_header_line_fields[$key], \"UTF-8\", \"UTF-16\"));\n\n $found_email_address = '';\n $found_name = '';\n\n $first_row_exploded = explode(';', $csv_header_line_fields[0]);\n\n $email_index = 1; // by default\n $name_index = 0; // by default\n\n foreach ($csv_header_line_fields as $key2 => $value2) {\n if (preg_match('#\\?\\?ame#', $value2) != 0) {\n $name_index = $key2; // Windows mail\n }\n if (preg_match('#E\\-mail#', $value2) != 0) {\n $email_index = $key2; // both\n }\n }\n\n while (($csv_line = fgetcsv($myfile, 10240, $del)) !== false) { // Reading a CSV record\n foreach ($csv_line as $key2 => $value2) {\n $csv_line[$key2] = utf8_decode(mb_convert_encoding($value2, \"UTF-8\", \"UTF-16\"));\n }\n\n $found_email_address = (array_key_exists($email_index, $csv_line) && strlen($csv_line[$email_index]) > 0) ? $csv_line[$email_index] : '';\n $found_email_address = (preg_match('#.*\\@.*\\..*#', $found_email_address) != 0) ? preg_replace(\"#\\\"#\", '', $found_email_address) : '';\n $found_name = $found_email_address;\n\n if (strlen($found_email_address) > 0) {\n $skip_next_process = true;\n // Add to the list what we've found\n $fields->attach(form_input_tick($found_name, $found_email_address, 'use_details_' . strval($email_counter), true));\n $hidden->attach(form_input_hidden('details_email_' . strval($email_counter), $found_email_address));\n $hidden->attach(form_input_hidden('details_name_' . strval($email_counter), $found_name));\n $email_counter++;\n $success_read = true;\n }\n }\n }\n }\n }\n }\n\n if (!$skip_next_process) {\n // There is a strange symbol that appears at start of the Windows Mail file, so we need to convert the first file line to catch these\n if ((function_exists('mb_check_encoding')) && (mb_check_encoding($csv_header_line_fields[0], 'UTF-8'))) {\n $csv_header_line_fields[0] = utf8_decode($csv_header_line_fields[0]);\n }\n\n // This means that we need to import from Windows mail (also for Outlook Express) export file, which is different from others csv export formats\n if (array_key_exists(0, $csv_header_line_fields) && (preg_match('#\\?Name#', $csv_header_line_fields[0]) != 0 || preg_match('#Name\\;E\\-mail\\sAddress#', $csv_header_line_fields[0]) != 0)) {\n $found_email_address = '';\n $found_name = '';\n\n $first_row_exploded = explode(';', $csv_header_line_fields[0]);\n\n $email_index = 1; // by default\n $name_index = 0; // by default\n\n foreach ($first_row_exploded as $key => $value) {\n if (preg_match('#\\?Name#', $value) != 0) {\n $name_index = $key; // Windows mail\n }\n if (preg_match('#^Name$#', $value) != 0) {\n $name_index = $key; // Outlook Express\n }\n if (preg_match('#E\\-mail\\sAddress#', $value) != 0) {\n $email_index = $key; // both\n }\n }\n\n while (($csv_line = fgetcsv($myfile, 10240, $del)) !== false) { // Reading a CSV record\n $row_exploded = (array_key_exists(0, $csv_line) && strlen($csv_line['0']) > 0) ? explode(';', $csv_line[0]) : array('', '');\n\n $found_email_address = (strlen($row_exploded[$email_index]) > 0) ? $row_exploded[$email_index] : '';\n $found_name = (strlen($row_exploded[$name_index]) > 0) ? $row_exploded[$name_index] : '';\n\n if (strlen($found_email_address) > 0) {\n // Add to the list what we've found\n $fields->attach(form_input_tick($found_name, do_lang_tempcode('RECOMMENDING_TO_LINE', escape_html($found_name), escape_html($found_email_address)), 'use_details_' . strval($email_counter), true));\n $hidden->attach(form_input_hidden('details_email_' . strval($email_counter), $found_email_address));\n $hidden->attach(form_input_hidden('details_name_' . strval($email_counter), $found_name));\n $email_counter++;\n $success_read = true;\n }\n }\n } else {\n require_code('type_sanitisation');\n\n // Find e-mail\n $email_field_index = mixed();\n foreach ($possible_email_fields as $field) {\n foreach ($csv_header_line_fields as $i => $header_field) {\n if (strtolower($header_field) == strtolower($field)) {\n $email_field_index = $i;\n $success_read = true;\n break 2;\n }\n\n // No header\n if (is_email_address($header_field)) {\n $email_field_index = $i;\n $success_read = true;\n rewind($myfile);\n break 2;\n }\n }\n }\n\n if ($success_read) {\n // Find name\n $name_field_index = mixed();\n foreach ($possible_name_fields as $field) {\n foreach ($csv_header_line_fields as $i => $header_field) {\n if ((strtolower($header_field) == strtolower($field)) && ($i != $email_field_index)) {\n $name_field_index = $i;\n break 2;\n }\n }\n }\n // Hmm, first one that is not the email then\n if (is_null($name_field_index)) {\n foreach ($csv_header_line_fields as $i => $header_field) {\n if ($i != $email_field_index) {\n $name_field_index = $i;\n break;\n }\n }\n }\n\n // Go through all records\n while (($csv_line = fgetcsv($myfile, 10240, $del)) !== false) { // Reading a CSV record\n if (empty($csv_line[$email_field_index])) {\n continue;\n }\n if (empty($csv_line[$name_field_index])) {\n continue;\n }\n\n $found_email_address = $csv_line[$email_field_index];\n $found_name = ucwords($csv_line[$name_field_index]);\n\n if (is_email_address($found_email_address)) {\n // Add to the list what we've found\n $fields->attach(form_input_tick($found_name, do_lang_tempcode('RECOMMENDING_TO_LINE', escape_html($found_name), escape_html($found_email_address)), 'use_details_' . strval($email_counter), true));\n $hidden->attach(form_input_hidden('details_email_' . strval($email_counter), $found_email_address));\n $hidden->attach(form_input_hidden('details_name_' . strval($email_counter), $found_name));\n $email_counter++;\n }\n }\n }\n }\n }\n\n fclose($myfile);\n }\n }\n }\n\n if (!$success_read) {\n warn_exit(do_lang_tempcode('ERROR_NO_CONTACTS_SELECTED'));\n }\n\n return do_template('FORM_SCREEN', array('_GUID' => 'e3831cf87d76295c48cbce627bdd07e3', 'PREVIEW' => true, 'SKIP_WEBSTANDARDS' => true, 'TITLE' => $this->title, 'HIDDEN' => $hidden, 'FIELDS' => $fields, 'URL' => $post_url, 'SUBMIT_ICON' => 'menu__site_meta__recommend', 'SUBMIT_NAME' => $submit_name, 'TEXT' => $text));\n }", "function memberSetFormInSession($formName){\n\t\tforeach($this->post as $key => $value){\n\t\t\t$_SESSION[$formName][$key]=$value;\n\t\t}\n\t}", "function wyz_ajax_business_sidebar_save_form() {\n\n\t$form_data = json_decode( stripslashes_deep( $_REQUEST['form_data'] ),true );\n\tif ( ! empty( $form_data ) && is_array( $form_data ) ) {\n\t\tforeach ( $form_data as $key => $value ) {\n\t\t\t$form_data[ $key ]['hidden'] = true;\n\t\t}\n\t}\n\tupdate_option( 'wyz_business_sidebar_order_data', $form_data ); \n\twp_die();\n}", "public function saveForm()\n\t{\n\t\tif ($this->request->isPost() && !empty($this->request[$this->connector . '_form']))\n\t\t{\n\t\t\t//If the session actual\n\t\t\tif (check_bitrix_sessid())\n\t\t\t{\n\t\t\t\t//Activation\n\t\t\t\tif ($this->request[$this->connector . '_active'] && empty($this->arResult['ACTIVE_STATUS']))\n\t\t\t\t{\n\t\t\t\t\t$this->status->setActive(true);\n\t\t\t\t\t$this->arResult['ACTIVE_STATUS'] = true;\n\n\t\t\t\t\t//Reset cache\n\t\t\t\t\t$this->cleanCache();\n\t\t\t\t}\n\n\t\t\t\tif (!empty($this->arResult['ACTIVE_STATUS']))\n\t\t\t\t{\n\t\t\t\t\t//If you remove the reference to the user\n\t\t\t\t\tif ($this->request[$this->connector . '_del_user'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$delUser = $this->connectorOutput->delUserActive($this->request['user_id']);\n\n\t\t\t\t\t\tif ($delUser->isSuccess())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->setStatus(false);\n\n\t\t\t\t\t\t\t$this->messages[] = Loc::getMessage('IMCONNECTOR_COMPONENT_FACEBOOK_OK_DEL_USER');\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->error[] = Loc::getMessage('IMCONNECTOR_COMPONENT_FACEBOOK_NO_DEL_USER');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//Reset cache\n\t\t\t\t\t\t$this->cleanCache();\n\t\t\t\t\t}\n\n\t\t\t\t\t//If you remove the reference to the group\n\t\t\t\t\tif ($this->request[$this->connector . '_del_page'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$delPage = $this->connectorOutput->delPageActive($this->request['page_id']);\n\n\t\t\t\t\t\tif ($delPage->isSuccess())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->setStatus(false);\n\n\t\t\t\t\t\t\t$this->messages[] = Loc::getMessage('IMCONNECTOR_COMPONENT_FACEBOOK_OK_DEL_PAGE');\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->error[] = Loc::getMessage('IMCONNECTOR_COMPONENT_FACEBOOK_NO_DEL_PAGE');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//Reset cache\n\t\t\t\t\t\t$this->cleanCache();\n\t\t\t\t\t}\n\n\t\t\t\t\t//If you bind to the group\n\t\t\t\t\tif ($this->request[$this->connector . '_authorization_page'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$authorizationPage = $this->connectorOutput->authorizationPage($this->request['page_id']);\n\n\t\t\t\t\t\tif ($authorizationPage->isSuccess())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($this->request['human_agent'] === 'Y')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$data = ['HUMAN_AGENT' => true];\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$data = [];\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$this->setStatus(true, true, $data);\n\n\t\t\t\t\t\t\t$this->messages[] = Loc::getMessage('IMCONNECTOR_COMPONENT_FACEBOOK_OK_AUTHORIZATION_PAGE');\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->setStatus(false);\n\n\t\t\t\t\t\t\t$this->error[] = Loc::getMessage('IMCONNECTOR_COMPONENT_FACEBOOK_NO_AUTHORIZATION_PAGE');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//Reset cache\n\t\t\t\t\t\t$this->cleanCache();\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($this->request[$this->connector . '_del'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$rawDelete = $this->connectorOutput->deleteConnector();\n\n\t\t\t\t\t\tif ($rawDelete->isSuccess())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tStatus::delete($this->connector, (int)$this->arParams['LINE']);\n\t\t\t\t\t\t\t$this->arResult['STATUS'] = false;\n\t\t\t\t\t\t\t$this->arResult['ACTIVE_STATUS'] = false;\n\t\t\t\t\t\t\t$this->arResult['CONNECTION_STATUS'] = false;\n\t\t\t\t\t\t\t$this->arResult['REGISTER_STATUS'] = false;\n\t\t\t\t\t\t\t$this->arResult['ERROR_STATUS'] = false;\n\t\t\t\t\t\t\t$this->arResult['DATA_STATUS'] = [];\n\t\t\t\t\t\t\t$this->arResult['PAGE'] = '';\n\n\t\t\t\t\t\t\t//$this->messages[] = Loc::getMessage('IMCONNECTOR_COMPONENT_SETTINGS_OK_DISABLE');\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->error[] = Loc::getMessage('IMCONNECTOR_COMPONENT_SETTINGS_NO_DISABLE');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//Reset cache\n\t\t\t\t\t\t$this->cleanCache();\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$this->error[] = Loc::getMessage('IMCONNECTOR_COMPONENT_FACEBOOK_SESSION_HAS_EXPIRED');\n\t\t\t}\n\t\t}\n\t}", "public function storeFormValues( $params ) {\r\n \r\n // store the parameters\r\n $this->__construct( $params );\r\n \r\n }", "public function updateFromPOST() {\n if ($this->isSubmit()) {\n foreach (Tools::getValue($this->namebase(), array()) as $name => $value) {\n $key = $this->nameify($name);\n $this->input_values[$key] = $value;\n }\n Configuration::updateValue($this->key(), json_encode($this->input_values));\n }\n }", "function receive() {\n // Input type 1.\n if ($this->method == 'POST' && isset($_POST[$this->id . '-form_id']) && $_POST[$this->id . '-form_id'] == $this->id) {\n $this->request['raw_input'] = $_POST;\n }\n // Input types 2 and 3.\n else {\n $this->request['raw_input'] = $_GET;\n }\n }", "function handle_post($indata) {\n// showDebug('form_class POST:');\n// showArray($indata); \n return;\n }", "function wyz_ajax_registration_form_builder_save_form() {\n\n\t$form_data = json_decode( stripslashes_deep( $_REQUEST['form_data'] ),true );\n\tif ( ! empty( $form_data ) && is_array( $form_data ) ) {\n\t\tforeach ( $form_data as $key => $value ) {\n\t\t\t$form_data[ $key ]['hidden'] = true;\n\t\t}\n\t}\n\tupdate_option( 'wyz_registration_form_data', $form_data );\n\twp_die();\n}", "public function form()\n {\n $this->setData();\n }", "public function getEditForm();", "function copyFormData()\n {\n $SessionPost = modApiFunc(\"Session\", \"get\", \"SessionPost\");\n $this->ViewState = $SessionPost[\"ViewState\"];\n\n //Remove some data, that should not be sent to action one more time, from ViewState.\n if(isset($this->ViewState[\"ErrorsArray\"]) &&\n count($this->ViewState[\"ErrorsArray\"]) > 0)\n {\n $this->ErrorsArray = $this->ViewState[\"ErrorsArray\"];\n unset($this->ViewState[\"ErrorsArray\"]);\n }\n $this->POST =\n array(\n \"Id\" => isset($SessionPost[\"Id\"])? $SessionPost[\"Id\"]:\"\"\n ,\"CountryId\" => isset($SessionPost[\"CountryId\"])? $SessionPost[\"CountryId\"]:\"0\"\n ,\"StateId\" => isset($SessionPost[\"StateId\"])? $SessionPost[\"StateId\"]:\"-1\"\n ,\"ProductTaxClassId\" => isset($SessionPost[\"ProductTaxClassId\"])? $SessionPost[\"ProductTaxClassId\"]:\"1\"\n ,\"ProductTaxClassName\" => isset($SessionPost[\"ProductTaxClassName\"])? $SessionPost[\"ProductTaxClassName\"]:\"\"\n ,\"TaxNameId\" => isset($SessionPost[\"TaxNameId\"])? $SessionPost[\"TaxNameId\"]:\"1\"\n ,\"Rate\" => isset($SessionPost[\"Rate\"])? $SessionPost[\"Rate\"]:\"\"\n ,\"FormulaView\" => isset($SessionPost[\"FormulaView\"])? $SessionPost[\"FormulaView\"]:\"&nbsp;\"\n ,\"Formula\" => isset($SessionPost[\"Formula\"])? $SessionPost[\"Formula\"]:\"\"\n ,\"Applicable\" => isset($SessionPost[\"NotApplicable\"])? \"false\":\"true\"\n ,\"TaxRateByZipSet\" => isset($SessionPost[\"TaxRateByZipSet\"]) ? $SessionPost[\"TaxRateByZipSet\"] : 0\n );\n }", "function populate() {\n // @todo We inject client input directly into the form. What about\n // security issues?\n if (isset($this->form->request['raw_input'][$this->attributes['name']])) {\n // Disabled input elements do not accept new input.\n if (!$this->disabled) {\n $this->value = $this->form->request['raw_input'][$this->attributes['name']];\n }\n }\n }", "function form( $instance ) {\r\n\t\t// Do Nothing\r\n\t}", "function dumpFormItems()\r\n {\r\n }", "function dumpFormItems()\r\n {\r\n }", "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}", "public function transactionFormGetFormParms ();", "function dumpFormItems()\r\n {\r\n if($this->_onclick != null)\r\n {\r\n $hiddenwrapperfield = $this->readJSWrapperHiddenFieldName();\r\n echo \"<input type=\\\"hidden\\\" id=\\\"$hiddenwrapperfield\\\" name=\\\"$hiddenwrapperfield\\\" value=\\\"\\\" />\";\r\n }\r\n }", "function dumpFormItems()\r\n {\r\n if($this->_onclick != null)\r\n {\r\n $hiddenwrapperfield = $this->readJSWrapperHiddenFieldName();\r\n echo \"<input type=\\\"hidden\\\" id=\\\"$hiddenwrapperfield\\\" name=\\\"$hiddenwrapperfield\\\" value=\\\"\\\" />\";\r\n }\r\n }", "function form( $instance ) {\r\n\t}", "function form( $instance ) {\r\n\t}", "function process_form($form, &$preferences){\n return null;\n }", "function dlgModify() {\n global $database;\n\n if ((!$this->sql_getEntry($this->section_id,$this->page_id)) && ($database->is_error())) {\n // SQL Fehler\n $this->print_error(); }\n else {\n // sicherstellen, dass nur bei einem Reload die $_REQUEST Daten verwendet werden\n if ((isset($_REQUEST['action'])) && ($_REQUEST['action'] == 'request')) {\t$this->requestToRecord(); }\n $parser = new templateParser();\n $parser->add('h1',dl_backend_header);\n $parser->add('description',dl_backend_description);\n $parser->add('text_header',dl_backend_text_header);\n $parser->add('value_header',$this->record['header']);\n $parser->add('text_prefix',dl_backend_text_prefix);\n $parser->add('value_prefix',$this->record['prefix']);\n $parser->add('text_select',dl_backend_text_select);\n $parser->add('text_suffix',dl_backend_text_suffix);\n $parser->add('value_suffix',$this->record['suffix']);\n\n $parser->add('form_action', WB_URL.'/modules/dirlist/save.php');\n $parser->add('btn_submit',dl_backend_btn_submit);\n $parser->add('btn_abort',dl_backend_btn_abort);\n $parser->add('abort_location',ADMIN_URL. '/pages/index.php');\n $parser->add('page_id',$this->page_id);\n $parser->add('section_id',$this->section_id);\n\t\t\t// Medienverzeichnis auslesen\n $media_dirs = $this->getMediaDirectories();\n if (!empty($this->record['directory']) && (in_array($this->record['directory'],$media_dirs))) {\n $dummy = ''; }\n else {\n $dummy = ' selected=\"selected\"'; }\n $worker = sprintf('<select name=\"directory\"><option value=\"\"%s>%s</option>',$dummy,dl_backend_select_directory);\n while (list($key,$val) = each($media_dirs)) {\n \t$dummy = $key;\n if (!empty($val)) {\n ($val == $this->record['directory']) ? $dummy = ' selected=\"selected\"' : $dummy = '';\n $worker .= sprintf('<option value=\"%s\"%s>%s</option>',$val,$dummy,$val); }}\n $worker .= '</select>';\n $parser->add('directory',$worker);\n\n // Sortierreihenfolge\n $parser->add('text_sort',dl_backend_text_sort);\n $sortArray[1] \t= dl_backend_sortFilesAscending;\n $sortArray[2] \t= dl_backend_sortFilesDescending;\n $sortArray[4] \t= dl_backend_sortSizeAscending;\n\t $sortArray[8] \t= dl_backend_sortSizeDescending;\n $sortArray[16] \t= dl_backend_sortDateAscending;\n $sortArray[32] \t= dl_backend_sortDateDescending;\n\n $worker = '<select name=\"sort\">';\n for ($i=1; $i < 33; $i = $i*2) {\n \t($i == $this->record['sort']) ? $dummy = ' selected=\"selected\"' : $dummy = '';\n \t$worker .= sprintf('<option value=\"%d\"%s>%s</option>',$i,$dummy,$sortArray[$i]); }\n $worker .= '</select>';\n $parser->add('sort',$worker);\n\n $parser->add('text_preselect',dl_backend_text_preselect);\n if ($this->record['exclude'] == 0) {\n $dummy = ' selected=\"selected\"';\n $dummy2 = ''; }\n else {\n $dummy = '';\n $dummy2 = ' selected=\"selected\"'; }\n $worker = sprintf('<option value=\"0\"%s>%s</option>',$dummy,dl_backend_include);\n $worker .= sprintf('<option value=\"1\"%s>%s</option>',$dummy2,dl_backend_exclude);\n $parser->add('exclude_option',$worker);\n $parser->add('value_extensions',$this->record['extensions']);\n\n ($this->record['blank'] == 1) ? $checked = ' checked=\"checked\"' : $checked = '';\n $parser->add('blank_checked',$checked);\n $parser->add('text_blank', dl_backend_blank);\n\n $parser->add('value_header',$this->record['header']);\n $parser->add('value_prefix',$this->record['prefix']);\n $parser->add('value_suffix',$this->record['suffix']);\n\n $parser->parseTemplateFile(WB_PATH.'/modules/dirlist/htt/backend.htt');\n $parser->echoHTML();\n } // else\n\n }", "private function resetInputFields(){\n $this->title = '';\n $this->original_url = '';\n $this->platform_id = '';\n }", "abstract function setupform();", "function form( $instance ) {\n\t}", "function form( $instance ) {\n\t}", "function form( $instance ) {\n\t}", "function form( $instance ) {\n\t}", "function form( $instance ) {\n\t}", "function form( $instance ) {\n\t}", "function form( $instance ) {\n\t}", "function form( $instance ) {\n\t}", "function form( $instance ) {\n\t}", "function form( $instance ) {\n\t}", "protected function processForm(){\n if(Tools::isSubmit('saveBtn')){ // save data\n $settings = array(\n 'user' => Tools::getValue('user'),\n 'widget_id' => Tools::getValue('widget_id'),\n 'tweets_limit' => Tools::getValue('tweets_limit'),\n 'follow_btn' => Tools::getValue('follow_btn')\n );\n Configuration::updateValue($this->name.'_settings', serialize($settings));\n \n // display success message\n return $this->displayConfirmation($this->l('The settings have been successfully saved!'));\n }\n \n return '';\n }", "public function returnForm() {\r\n global $db;\r\n\r\n $this->status = PRESUBMITTED;\r\n\r\n $deanComments =\"\"; // we save the dean's comments before deleting the approval\r\n\r\n // delete all approvals from database.\r\n foreach($this->approvals AS $approval) {\r\n if($approval->type == COMMITMENTS || $approval->type == DEAN_REVIEW) {\r\n $deanComments = $approval->comments;\r\n }\r\n $approval->delete();\r\n }\r\n\r\n if(strlen($deanComments) > 0) {\r\n $sql = \"UPDATE forms_tracking SET `dean_comments`= '\" . $deanComments . \"' WHERE `form_tracking_id` = \" . $this->trackingFormId;\r\n $db->Execute($sql);\r\n }\r\n\r\n require_once('classes/tracking/notifications/Notifications.php');\r\n require_once('classes/tracking/notifications/ResearcherNotification.php');\r\n\r\n $subject = sprintf('[TID-%s] Tracking form returned for modifications', $this->trackingFormId);\r\n $emailBody = sprintf('A tracking form was returned for modifications from your Dean :\r\n\r\nTracking ID : %s\r\nTitle : \"%s\"\r\nComments : %s\r\n\r\nPlease make any required modifications and re-submit the form.\r\n\r\n', $this->trackingFormId, $this->projectTitle, html_entity_decode(strip_tags($deanComments)));\r\n\r\n $ResearcherNotification = new ResearcherNotification($subject, $emailBody, $this->submitter);\r\n try {\r\n $ResearcherNotification->send();\r\n } catch(Exception $e) {\r\n printf('Error: Unable to send email notification to Researcher : '. $e);\r\n }\r\n\r\n $this->saveMe();\r\n }", "function form_destroy() {\n $_SESSION['EKA_mode'] = 'stageOne';\n $_SESSION['EKA_submitToken'] = \"\";\n $_SESSION['EKA_scriptFileName'] = \"\";\n $_SESSION['EKA_scriptFileDir'] = \"\";\n $_SESSION['EKA_fstring'] = \"\";\n $_SESSION['EKA_beforeTheHTML'] = \"\";\n $_SESSION['EKA_theHTML'] = \"\";\n $_SESSION['EKA_afterTheHTML'] = \"\";\n $_SESSION['EKA_nodeID'] = NULL;\n $_SESSION['EKA_old_nodeID'] = NULL;\n $_SESSION['EKA_intendedFocusAfterL1Edit'] = \"\";\n $_SESSION['EKA_old_intendedFocusAfterL1Edit'] = \"\";\n\n return;\n}", "protected function Form_Run() {}", "function readform() {\n\t\t$this->ftpmirror->name = $_POST['name'];\n\t\t$this->ftpmirror->url = $_POST['url'];\n\t\t$this->ftpmirror->location = $_POST['location'];\n\t\t$this->ftpmirror->email = $_POST['email'];\n\t\t$this->ftpmirror->description = $_POST['description'];\n\t\t$this->ftpmirror->comments = $_POST['comments'];\n\t\t\n\t\t// Validate details\n\t\t$errors = $this->ftpmirror->validate();\n\n\t\treturn $errors;\n\t}", "function inputField($type, $name, $value=\"\", $attrs=NULL, $data=NULL, $help_text=NULL) {\n global $loc;\n $s = \"\";\n if (isset($_SESSION['postVars'])) {\n $postVars = $_SESSION['postVars'];\n } else {\n $postVars = array();\n }\n if (isset($postVars[$name])) {\n $value = $postVars[$name];\n }\n if (isset($_SESSION['pageErrors'])) {\n $pageErrors = $_SESSION['pageErrors'];\n } else {\n $pageErrors = array();\n }\n if (isset($pageErrors[$name])) {\n $s .= '<div id=\"myModal\" class=\"modal fade\" role=\"dialog\">\n <div class=\"modal-dialog\">\n\n <!-- Modal content-->\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <!--<button type=\"button\" class=\"close\" data-dismiss=\"modal\">&times;</button>-->\n <h4 class=\"modal-title\">Error</h4>\n </div>\n <div class=\"modal-body\">\n <h5 style=\"margin: 0px\">'.H($pageErrors[$name]).'</h5>\n </div>\n <div class=\"modal-footer\">\n <button id=\"close\" type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Cerrar</button>\n </div>\n </div>\n\n </div>\n </div>';\n }\n if (!$attrs) {\n $attrs = array();\n }\n if (!isset($attrs['onChange'])) {\n $attrs['onChange'] = 'modified=true';\n }\n switch ($type) {\n // TODO: radio\n case 'select':\n $s .= '<select class=\"form-control\" id=\"'.H($name).'\" name=\"'.H($name).'\" ';\n foreach ($attrs as $k => $v) {\n $s .= H($k).'=\"'.H($v).'\" ';\n }\n $s .= \">\\n\";\n foreach ($data as $val => $desc) {\n $s .= '<option value=\"'.H($val).'\" ';\n if (strtolower($value) == strtolower($val)) {\n $s .= \" selected\";\n }\n $s .= \">\".H($desc).\"</option>\\n\";\n }\n $s .= \"</select>\\n\";\n break;\n\n case 'textarea':\n $s .= '<textarea class=\"form-control\" name=\"'.H($name).'\" ';\n foreach ($attrs as $k => $v) {\n $s .= H($k).'=\"'.H($v).'\" ';\n }\n $s .= \">\".H($value).\"</textarea>\";\n break;\n\n case 'checkbox':\n $s .= '<input type=\"checkbox\" ';\n $s .= 'name=\"'.H($name).'\" ';\n $s .= 'value=\"'.H($data).'\" ';\n if ($value == $data) {\n $s .= \"checked \";\n }\n foreach ($attrs as $k => $v) {\n $s .= H($k).'=\"'.H($v).'\" ';\n }\n $s .= \"/>\";\n break;\n\n case 'date':\n $thisDate = explode(' ', date('d m Y'));\n $dateInputName = H($name);\n $s .= '<select class=\"form-control\" id=\"' . str_replace(array('[',']'),array(''), $dateInputName).'_day\" name=\"'.$dateInputName.'_day\">' . \"\\n\";\n for ($i = 1; $i <= 31; $i++) {\n $day = str_pad($i, 2, '0', STR_PAD_LEFT); \n $s .= ' <option value=\"' . $i . '\" ' . ($i == 0 + $thisDate[0] ? ' selected=\"selected\"':'') . '>' . $i . \"</option>\\n\";\n }\n $s .= \"</select><br>\\n\";\n $s .= '<select class=\"form-control\" id=\"' . str_replace(array('[',']'),array(''), $dateInputName).'_month\" name=\"'.$dateInputName.'_month\">' . \"\\n\";\n for ($i = 1; $i <= 12; $i++) {\n $mon = str_pad($i, 2, '0', STR_PAD_LEFT); \n $s .= ' <option value=\"' . $mon . '\"' . ($mon == $thisDate[1] ? ' selected=\"selected\"':'') . '>' . $loc->getText('reportDateMonth' . $mon) . \"</option>\\n\";\n }\n $s .= \"</select><br>\\n\";\n \n $s .= '<select class=\"form-control\" id=\"' . str_replace(array('[',']'),array(''), $dateInputName).'_year\" name=\"'.$dateInputName.'_year\">' . \"\\n\";\n \n for ($i = -20; $i <= 20; $i++) {\n $y = $thisDate[2] + $i;\n $s .= ' <option value=\"' . $y . '\" '. ($i == 0 ? 'selected=\"select\"' : '') . '>' . $y . \"</option>\\n\";\n }\n $s .= \"</select>\\n\";\n \n // Javascript code for collecting date\n $s .= '<input type=\"hidden\" id=\"' . $dateInputName . '\" name=\"' . $dateInputName . '\">\n <script>\n var updateDateInput_' . $dateInputName . ' = function() {\n document.getElementById(\"' . $dateInputName . '\").value = \n document.getElementById(\"' . $dateInputName . '_year\").value + \"-\" +\n document.getElementById(\"' . $dateInputName . '_month\").value + \"-\" +\n document.getElementById(\"' . $dateInputName . '_day\").value;\n \n console.log(day.value);\n };\n \n document.getElementById(\"' . $dateInputName . '_day\").onchange = updateDateInput_' . $dateInputName . ';\n document.getElementById(\"' . $dateInputName . '_month\").onchange = updateDateInput_' . $dateInputName . ';\n document.getElementById(\"' . $dateInputName . '_year\").onchange = updateDateInput_' . $dateInputName . ';\n </script>\n ';\n \n break;\n\n default:\n $s .= '<input class=\"form-control\" type=\"'.H($type).'\" ';\n $s .= 'id=\"' . str_replace(array('[',']'),array(''), H($name)).'\" name=\"'.H($name).'\" ';\n if ($value != \"\") {\n $s .= 'value=\"'.H($value).'\" ';\n }\n foreach ($attrs as $k => $v) {\n $s .= H($k).'=\"'.H($v).'\" ';\n }\n $s .= \"/>\";\n\n // Display a help text under the widget.\n // TODO: add this into another widgets.\n if (isset($help_text)) {\n $s .= \"<div>\". $help_text .\"</div>\";\n }\n\n break;\n\n }\n return $s;\n}", "function persisted($posted_key) {\n\n $form_data = Session::getFormData();\n if (isset($form_data[$posted_key])) {\n echo $form_data[$posted_key];\n }\n \n}", "function form( $instance )\n { \n }", "public function cleanseFields() {\n $this->dictionary->remove('nospam');\n $this->dictionary->remove('blank');\n $submitVar = $this->controller->getProperty('submitVar');\n if (!empty($submitVar)) {\n $this->dictionary->remove($submitVar);\n }\n }", "abstract function repopulate(Form $arg0);", "public function hookForm() {\n }", "function oa_widgets_add_content_edit_form_submit($form, &$form_state) {\n foreach (array_keys($form_state['values']) as $key) {\n if (isset($form_state['values'][$key])) {\n $form_state['conf'][$key] = $form_state['values'][$key];\n }\n }\n}", "function postToVar() {\n foreach ($this->fields() as $f) {\n if ($this->$f === false) $this->$f = $this->input->post($f);\n }\n }", "protected function loadFormData()\n\t\t{\n\t\t\t\t// Check the session for previously entered form data.\n\t\t\t\t$data = JFactory::getApplication()->getUserState('com_helloworld.edit.' . $this->context . '.data', array());\n\t\t\t\tif (empty($data))\n\t\t\t\t{\n\t\t\t\t\t\t$data = $this->getItem();\n\t\t\t\t}\n\t\t\t\treturn $data;\n\t\t}", "public function afterSubmit() {\n\t\t$this->setValue($this->serializeData($this->getValue()));\n\t}", "function build_settings_dialog($nagios_hosts, $unwanted_hosts) {\n // $unwanted_hosts is an array that is retrieved from a cookie set if the user has already selected some.\n $html = '<div id=\"settings_modal\" class=\"modal hide fade\" tabindex=\"-1\" role=\"dialog\" aria-hidden=\"true\">';\n $html .= '<div class=\"modal-header\">';\n $html .= ' <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\">&times;</a></button>';\n $html .= ' <h3>Nagdash Settings</h3>';\n $html .= '</div>';\n $html .= '<div class=\"modal-body\">';\n $html .= '<form id=\"settings-form\" action=\"do_settings.php\" method=\"post\"><fieldset>';\n $html .= '<legend>Instances to show</legend>';\n foreach ($nagios_hosts as $host) {\n $checked = (!in_array($host['tag'], $unwanted_hosts)) ? \"checked\" : \"\";\n $html .= '<label class=\"checkbox inline tag_label tag_' . $host['tag'] . '\">';\n $html .= '<input type=\"checkbox\" name=\"' . $host['tag'] . '\" value=\"' . $host['tag'] . '\"' . $checked . '>' . $host['tag'];\n $html .= '</label>';\n }\n $html .= '</fieldset></form>';\n $html .= '</div>';\n $html .= '<div class=\"modal-footer\">';\n $html .= ' <button class=\"btn\" data-dismiss=\"modal\" aria-hidden=\"true\">Close</button>';\n $html .= ' <button class=\"btn btn-primary\" onClick=\"$(\\'#settings-form\\').submit();\">Save changes</button>';\n $html .= '</div>';\n $html .= \"</div>\";\n\n return $html;\n}", "function buildSettingsForm() {}", "public function process()\n\t{\n\t\tif(isset($_POST[$this->input_name()])) {\n\t\t\t$this->value = $_POST[$this->input_name()];\n\t\t}\n\t\telse {\n\t\t\t$this->value = false;\n\t\t}\n\t}", "protected function buildForm()\n\t{\t\n\t\t$mid = $this->Form->newInput( 'hidden' );\n\t\t$mid->set( 'name', 'mid' );\n\t\t$mid->set( 'id', 'mid' );\n\t\t$mid->set( 'value', $this->data['id'] );\n\t\t\n\t\t$submit = $this->Form->newInput( 'submit' );\n\t\t$submit->set( 'name', 'submit' );\n\t\t$submit->set( 'id', 'submit' );\n\t\t$submit->set( 'value', 'Restore' );\n\t}", "function chat_prepare_message_form_vars($message = NULL) {\n\t// input names => defaults\n\t$values = array(\n\t\t'description' => NULL,\n\t\t'access_id' => ACCESS_LOGGED_IN,\n\t\t'container_guid' => NULL,\n\t\t'guid' => NULL,\n\t);\n\n\tif ($message) {\n\t\tforeach (array_keys($values) as $field) {\n\t\t\tif (isset($message->$field)) {\n\t\t\t\t$values[$field] = $message->$field;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (elgg_is_sticky_form('chat_message')) {\n\t\t$sticky_values = elgg_get_sticky_values('chat_message');\n\t\tforeach ($sticky_values as $key => $value) {\n\t\t\t$values[$key] = $value;\n\t\t}\n\t}\n\n\telgg_clear_sticky_form('chat_message');\n\n\treturn $values;\n}", "public static function GetFormValues(){\n self::$KeyValue = isset($_REQUEST[\"KeyValue\"]) ? $_REQUEST[\"KeyValue\"] : \"\"; \n \n if (self::$KeyValue == \"\"){\n\t self::$KeyValue = \"new zealand\"; \n\t }\n\t \n\t \n\t self::$KeyValue = urlencode(self::$KeyValue);\n\t \n\t self::$MapLattitude = isset($_REQUEST[\"MapLattitude\"]) ? $_REQUEST[\"MapLattitude\"] : \"\"; \n\t self::$MapLongtitude= isset($_REQUEST[\"MapLongtitude\"]) ? $_REQUEST[\"MapLongtitude\"] : \"\"; \n\t \n }", "function &returnForm()\n\t{\n\t\treturn $this->form;\n\t}", "function wyz_ajax_claim_save_form() {\n\n\t$form_data = json_decode( stripslashes_deep( $_REQUEST['form_data'] ),true );\n\tif ( ! empty( $form_data ) && is_array( $form_data ) ) {\n\t\tforeach ( $form_data as $key => $value ) {\n\t\t\t$form_data[ $key ]['hidden'] = true;\n\t\t}\n\t}\n\n\tupdate_option( 'wyz_claim_registration_form_data', $form_data );\n\twp_die();\n}", "function getForm($form, &$form_state, $disabled, $myvalues)\n {\n $oPS = new \\raptor\\ProtocolSettings();\n $metainfo = $oPS->getProtocolMetaInformation($this->m_protocol_shortname);\n $usedcount = count($metainfo['usedbyinfo']);\n if($usedcount > 0)\n {\n $tickets = array();\n foreach($metainfo['usedbyinfo'] as $key=>$details)\n {\n $tickets[] = $key;\n }\n $userinfomsg = \"Cannot delete this protocol because already in use by the following $usedcount tickets: \" \n . implode(', ', $tickets);\n drupal_set_message($userinfomsg, 'warning');\n $disabled = TRUE;\n }\n \n $form = $this->m_oPageHelper->getForm('D',$form, $form_state, TRUE, $myvalues, 'protocol_container_styles');\n \n $form['data_entry_area1']['toppart']['protocol_shortname'] = array(\n '#type' => 'textfield', \n '#title' => t('Short Name'), \n '#value' => $this->m_protocol_shortname, \n '#size' => 20, \n '#maxlength' => 20, \n '#required' => TRUE,\n '#description' => t('The unique short name for this protocol'),\n '#disabled' => TRUE,\n ); \n \n \n //Replace the buttons\n $form[\"data_entry_area1\"]['create'] = array('#type' => 'submit'\n , '#attributes' => array('class' => array('admin-action-button'))\n , '#value' => t('Delete Protocol From System')\n , '#disabled' => $disabled\n );\n\n global $base_url;\n $goback = $this->getGobacktoFullURL();\n /*\n $form['data_entry_area1']['action_buttons']['cancel'] = array('#type' => 'item'\n , '#markup' => '<input class=\"admin-cancel-button\" id=\"user-cancel\"'\n . ' type=\"button\" value=\"Cancel\"'\n . ' data-redirect=\"'.$goback.'\">');\n */\n $form['data_entry_area1']['action_buttons']['cancel'] = $this->getExitButtonMarkup($goback);\n return $form;\n }", "protected function loadFormData() {\r\n\t\t// Check the session for previously entered form data.\r\n\t\t$data = JFactory::getApplication()->getUserState('com_flexicontent.edit.'.$this->getName().'.data', array());\r\n\r\n\t\tif (empty($data)) {\r\n\t\t\t$data = $this->getItem();\r\n\t\t}\r\n\r\n\t\treturn $data;\r\n\t}", "protected function setFormContent()\n {\n\t\t$content = $this->getTitle();\n\t\t\n\t\t$content .= '<p>Your meditation time on <b>';\n\t\t$content .= $this->data['long_date'];\n\t\t$content .= '</b> has been deleted. Would you like to restore it?</p>';\n\t\t\n\t\t$this->Form = new Form;\n\t\t$this->buildForm();\n\t\t$content .= $this->Form->getHtml();\n\t\t\n\t\t// Add the cancel link\n\t\t$content .= $this->cancelLink();\n\t\t\n\t\t$this->content = $content;\n }", "protected function saveData()\n {\n // TODO: データ保存\n\n // 一次データ削除\n $this->deleteStore();\n\n drupal_set_message($this->t('The form has been saved.'));\n }", "function saveJavascript() {\n\n?>\n\n<script type='text/javascript'>\n<!--\n\nfunction saveElements(form1choice, form2choice, lid) {\n\tfor (var i=0; i < form1choice.options.length; i++) {\n\t\tif(form1choice.options[i].selected) {\n\t\t\twindow.opener.document.updateframe.common1choice.value = form1choice.options[i].value;\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor (var i=0; i < form2choice.options.length; i++) {\n\t\tif(form2choice.options[i].selected) {\n\t\t\twindow.opener.document.updateframe.common2choice.value = form2choice.options[i].value;\n\t\t\tbreak;\n\t\t}\n\t}\n\twindow.opener.document.updateframe.common_fl_id.value = lid;\n\twindow.opener.document.updateframe.submit();\n\twindow.self.close();\n}\n\n-->\n</script>\n\n<?php\n\n}" ]
[ "0.662641", "0.6396938", "0.62347704", "0.6100368", "0.6001398", "0.59531176", "0.5949333", "0.5880548", "0.5866881", "0.58403265", "0.5780932", "0.5736477", "0.57327163", "0.5690857", "0.5679435", "0.5676651", "0.56687355", "0.5662438", "0.5661249", "0.56457907", "0.5645011", "0.5644028", "0.56356645", "0.56331307", "0.562046", "0.56026405", "0.55928934", "0.559186", "0.5567128", "0.55336535", "0.5530838", "0.55272186", "0.55272186", "0.5525252", "0.5520212", "0.55042994", "0.55034345", "0.5502165", "0.54884225", "0.54882854", "0.54881483", "0.54834604", "0.5468986", "0.54665834", "0.5464217", "0.5457622", "0.5436762", "0.5433243", "0.54230106", "0.5417284", "0.5396581", "0.5392378", "0.5392378", "0.53916967", "0.5387921", "0.5385612", "0.5385612", "0.53806376", "0.53806376", "0.5366918", "0.53638494", "0.5360383", "0.53552437", "0.5354677", "0.5354677", "0.5354677", "0.5354677", "0.5354677", "0.5354677", "0.5354677", "0.5354677", "0.5354677", "0.5354677", "0.5352041", "0.5349818", "0.53478116", "0.5345073", "0.533902", "0.53356224", "0.5331483", "0.5327235", "0.5324197", "0.53148615", "0.5312639", "0.53110623", "0.53036124", "0.5300251", "0.5299934", "0.52897495", "0.52847564", "0.5278562", "0.52703476", "0.5269955", "0.52626956", "0.5256246", "0.52548504", "0.52533704", "0.5251194", "0.5248009", "0.524781", "0.5246377" ]
0.0
-1
/! \brief Remove all active services
function remove_from_parent() { foreach ($this->plugins as $name => $obj) { $this->updateServicesVars($name); if ($this->plugins[$name]->initially_was_account) { if (isset($this->plugins[$name]->krb_host_key) && $this->plugins[$name]->krb_host_key instanceof krbHostKeys) { $this->plugins[$name]->krb_host_key->remove_from_parent_by_prefix($this->plugins[$name]->krb_service_prefix); } $this->plugins[$name]->remove_from_parent(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function removeServices(Host $host): void;", "public function destroy(Services $services)\n {\n //\n }", "public function destroy(Services $services)\n {\n //\n }", "public final function destroy_all()\n {\n }", "public function deactivateService() {}", "public function getAllServices_crm() {\r\n\t\t$billingServicesObj = new billing_SERVICES();\r\n $services = $billingServicesObj->getAllServiceDataForActiveServices();\r\n foreach ($services as $key=>$val) {\r\n if (strpos($val[\"SERVICEID\"], 'M') && $val[\"SERVICEID\"] != 'M3' && $val[\"SERVICEID\"] != 'M') {\r\n \tunset($services[$key]);\r\n }\r\n }\r\n return $services;\r\n }", "public function clearAll() {}", "public function clearAllDevices(){\n\t\t$db = Db::getInstance();\n\n\t\t$req = $db->prepare('DELETE FROM Devices');\n\t\t$req->execute();\n\t\t\n\n\n\t}", "public function clearAll();", "public function clearAll();", "public static function remove_all_stores()\n {\n }", "public function deleteAll(): void;", "public function deleteAll();", "public function deleteAll();", "public function deleteAll();", "public function deleteAll(): void\n {\n $this->client->delete($this->baseUri);\n }", "public function deleteAll() {\n\n $this->start();\n $_SESSION = array();\n\n }", "public function removeAll() {}", "public function removeAll() {}", "public function removeAll() {}", "public function removeAll() {}", "public function removeAll() {}", "public function removeAll() {}", "public function destroy(Services $service)\n {\n $service->delete();\n }", "public function delete_all() {\n\t\t$this->_cache = array();\n\t\t$this->_collections = array();\n\t}", "public function deleteAllResources() {\n\t\t$this->resources = array();\n\t}", "public static function purgeInstances() {}", "public static function purgeInstances() {}", "public function destroy(ServiceList $serviceList) {\n //\n }", "public function checkAllSystems() {\n\t\techo \"Systems have already been cleared.<br>\";\n\t}", "public function checkAllSystems() {\n\t\techo \"Systems have already been cleared.<br>\";\n\t}", "public function checkAllSystems() {\n\t\techo \"Systems have already been cleared.<br>\";\n\t}", "public function delall()\n {\n }", "public function cleanup(){\n\t\t$accountBookings = Billing_Controller_AccountBooking::getInstance()->getByBookingId($this->getId());\n\t\t\n\t\tforeach($accountBookings as $accountBooking){\n\t\t\tBilling_Controller_AccountBooking::getInstance()->delete(array($accountBooking->getId()));\n\t\t}\n\t}", "public function destroy(Service $service)\n {\n //\n }", "public function clearAll(){\n\n }", "public static final function destroy_all_for_all_users()\n {\n }", "function shutdown() {\n\t\tif ( !$this->hasShutdown ) {\n\t\t\t$this->hasShutdown = true;\n\t\t\t$services = array_reverse( array_keys( $this->services ) );\n\t\t\tforeach ( $services as $srv ) {\n\t\t\t\tif ( method_exists( $this->services[$srv], 'xoShutdown' ) ) {\n\t\t\t\t\t$this->services[$srv]->xoShutdown();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function clearAll()\n {\n }", "public function delete_all()\n {\n }", "public function clearAllPlugins()\n {\n $this->collAllPlugins = null; // important to set this to NULL since that means it is uninitialized\n }", "public function clearPending();", "protected function removeService($action = \"\", $target = array(), $all = array())\n {\n foreach ($target as $s_entry) {\n $new_obj = new $s_entry($this->dn, $this);\n $new_obj->set_acl_base($this->acl_base);\n $new_obj->set_acl_category(preg_replace(\"/\\/$/\", \"\", $this->acl_category));\n $tmp = $new_obj->getListEntry();\n\n /* Check if we are allowed to remove this service\n */\n if ($tmp['AllowRemove']) {\n $str = $this->plugins[$s_entry]->allow_remove();\n if (empty($str)) {\n $this->plugins[$s_entry] = $new_obj;\n $this->plugins[$s_entry]->is_account = FALSE;\n } else {\n msg_dialog::display(_(\"Error\"), $str, ERROR_DIALOG);\n }\n }\n }\n }", "public function clear_all()\n {\n }", "public function cleanup()\n {\n foreach ($this->processes as $process) {\n $process->cleanup();\n }\n }", "public static function getListServices () {\n return self::findByStatus(self::STATUS_ACTIVE);\n }", "public static function resetAll(): void\n {\n static::getFacadeRoot()->resetAll();\n }", "public function getServices();", "public function removeAll(): void;", "public function destroySingletons ();", "abstract public function deleteAll();", "public function destroyAll()\n {\n if ( ! Input::has('users')) return;\n\n $ids = [];\n\n foreach(Input::get('users') as $k => $user) {\n $ids[] = $user['id'];\n }\n\n if ($deleted = User::destroy($ids)) {\n return response(trans('app.deleted', ['number' => $deleted]));\n }\n }", "public function clearAllCommand()\n {\n $this->eventRepository->removeAll();\n $this->eventSourceRepository->removeAll();\n }", "public function listAllAvailableServices()\n {\n\t\t$data = $this->call(array(), \"GET\", \"sensors/services/available.json\");\n\t\t$data = $data->{'services'};\n\t\t$serviceArray = new ArrayObject();\n\t\tfor($i = 0; $i<count($data);$i++){\n\t\t\t$serviceArray->append(new Service($data[$i], $this));\n\t\t}\n\t\treturn $serviceArray;\n }", "public function deleteAllDependents() {\n\t\t$this->dependents = array();\n\t}", "public function delete() {\n // Deleting microarticles.\n $microarticles = $this->getMicroarticles();\n if (!empty($microarticles)) {\n foreach ($microarticles as $microarticle) {\n $microarticle->delete();\n }\n }\n\n // Deleting selfservices.\n $selfServices = $this->getSelfservices();\n if (!empty($selfServices)) {\n foreach ($selfServices as $selfService) {\n $selfService->delete();\n }\n }\n\n parent::delete();\n }", "public function deleteAll()\n {\n \\Core\\File\\System::rrmdir($this->_getPath(), false, true);\n }", "public function actionClearWorkers()\n {\n $count = WorkerRecord::deleteAll();\n $this->stdout(\"$count records deleted.\\n\");\n }", "protected function clear()\n {\n static::destroyApplication();\n }", "public function clearProviders();", "public function removeAllSolr()\n {\n try {\n $this->solrController->delete_all_music_client();\n return \"All records are deleted\";\n } catch (Exception $exception) {\n Log::error(\"solr remove all error \" . $exception->getMessage());\n }\n // $this->solrController->;\n }", "public function deleting(Service $Service)\n {\n //code...\n }", "public static function deleteAll($options=array())\n {\n\n $solr = self::connect($options);\n\n $solr->deleteByQuery('*:*');\n $solr->commit();\n $solr->optimize();\n\n }", "public function listsServicesDelete($service_id)\r\n {\r\n $serive = Services::destroy($service_id);\r\n if($serive){\r\n return response()->json(['msg' => 'Deleted the servie']);\r\n }else{\r\n return response('Oops, seems like something went wrong while deleting the service');\r\n }\r\n }", "function destroySystem() {\n $this->available();\n $this->runAction(\"uninstall\");\n }", "public function removeAll();", "public function removeAll();", "public function purgeAllQueues()\n {\n $this->cleanup();\n }", "public function clearDiscovery();", "public function __construct()\n {\n $this->services = [];\n }", "public function clear()\n {\n foreach ($this->backends as $b) {\n $b->clear();\n }\n }", "public function clearCCs()\n {\n foreach ($this->cc as $cc) {\n unset($this->all_recipients[strtolower($cc[0])]);\n }\n $this->cc = array();\n $this->clearQueuedAddresses('cc');\n }", "public function getAvailableServices();", "public static function clearInstancePool()\n\t{\n\t\tself::$instances = array();\n\t}", "public static function clearInstancePool()\n\t{\n\t\tself::$instances = array();\n\t}", "public static function clearInstancePool()\n\t{\n\t\tself::$instances = array();\n\t}", "public static function clearInstancePool()\n\t{\n\t\tself::$instances = array();\n\t}", "public static function clearInstancePool()\n\t{\n\t\tself::$instances = array();\n\t}", "public function deleteAll(){\n if(APPLICATION_ENV == 'production'){\n throw new Exception(\"Not Allowed\");\n }\n $this->getMapper()->deleteAll();\n }", "function reload_all() {\n\tsend_event(\"service reload all\");\n}", "public function clear()\n\t{\n\t\tforeach($this->all() as $ip)\n\t\t{\n\t\t\t$this->delete($ip['ip_address']);\n\t\t}\n\t}", "protected function destroy_all_sessions()\n {\n }", "protected function _delete()\n {\n $this->_deleteRows( $this->getServiceTurnaroundTimes() );\n $this->_deleteRows( $this->getServicePriceModifiers() );\n $this->_deleteRows( $this->getServiceSpeakerNumbers() );\n\n $clientServiceModel = new Application_Model_ClientService();\n $clientServiceModel->delete( 'service_id = ' . $this->id );\n\n $serviceGroupModel = new Application_Model_ServiceGroupService();\n $serviceGroupModel->delete( 'service_id = ' . $this->id );\n }", "public function clearRIssuesAllplugins()\n {\n $this->collRIssuesAllplugins = null; // important to set this to NULL since that means it is uninitialized\n }", "public static function deactivateAll()\n {\n foreach (self::$_activeFilters as $target => $filter) {\n $filter->deactivate();\n }\n }", "public function unsetAll() {\n\t\tparent::unsetAll();\n\t}", "public function detachAll() {}", "public function getServices(): array;", "private function loadServices()\n {\n # Receive list of available service binary's\n exec(\"php composer.phar exec --list\", $services);\n $services = array_filter($services, function ($row) {\n return (substr($row, 0, 1) === '-' && strpos($row, 'service-')) &&\n (!strpos($row, 'service-manager')) &&\n (!strpos($row, 'service-socket'));\n });\n\n array_unshift($services, \"service-socket\");\n foreach ($services as $service) {\n $service = str_replace(\"- \", \"\", $service);\n $this->loadService($service);\n }\n }", "public static function purgeAll(array $opts = [])\n {\n static::getCollection()->deleteMany(['_deleted' => true]);\n }", "public function removeAllTasks() {\n\t\t$this->tasks = new Tx_Extbase_Persistence_ObjectStorage();\n\t}", "public function deleteAll()\n {\n $this->ensureModels();\n foreach ($this->_models as $model) {\n $model->delete();\n }\n }", "public static function destroyAll($options = array()) {\n foreach (self::findAll($options) as $record) {\n $record->destroy();\n }\n }", "public function cleanAll()\n {\n $this->filesystem->remove(self::getFilesList());\n }", "function removeAll() ;", "function removeAll() ;", "public function clear()\r\n\t{\r\n\t\tparent::clear();\r\n\r\n\t\t// Clear from the service.\r\n\t\tif (XBOXAPP_OFFLINE !== true) {\r\n\t\t\tServiceApi::clearGames();\r\n\t\t}\r\n\t}", "public function index()\n {\n return ServicesApi::collection($this->services->whereNull('deleted_at')->get());\n\n }", "function terminarServSoc()\n {\n }", "public function removeAll()\n {\n echo $this->_em->createQueryBuilder()->delete('Tdms\\Entity\\Product', 'p')->getQuery()->execute();\n }", "public function services()\n {\n return $this->belongstomany(Service::class);\n }" ]
[ "0.7102608", "0.69645053", "0.69645053", "0.6340352", "0.6281512", "0.624305", "0.61352575", "0.60993737", "0.6058023", "0.6058023", "0.6008888", "0.5959794", "0.5914593", "0.5914593", "0.5914593", "0.5904464", "0.58808064", "0.5869994", "0.5869994", "0.5869994", "0.5869994", "0.58698606", "0.58698606", "0.5869566", "0.58493066", "0.582405", "0.5812256", "0.5812256", "0.5811515", "0.57913977", "0.57913977", "0.57913977", "0.57864434", "0.57793206", "0.57613826", "0.57584053", "0.5748309", "0.57454425", "0.5720927", "0.57010347", "0.5690935", "0.5674319", "0.56687397", "0.5656652", "0.5649994", "0.5649658", "0.5641403", "0.5630675", "0.5628227", "0.55951226", "0.5584313", "0.55807245", "0.55799705", "0.55642545", "0.5558457", "0.55456257", "0.5534589", "0.55295426", "0.55085236", "0.5485428", "0.5473436", "0.5471266", "0.54668844", "0.5455481", "0.54552853", "0.54507524", "0.54507524", "0.54483384", "0.5437467", "0.5433575", "0.5424082", "0.5420998", "0.5410504", "0.54064065", "0.54064065", "0.54064065", "0.54064065", "0.54064065", "0.5403874", "0.5402679", "0.5399065", "0.539305", "0.53811556", "0.5358289", "0.5352102", "0.53505385", "0.5345387", "0.53410333", "0.53396106", "0.5336698", "0.5329868", "0.5320795", "0.53022873", "0.5300886", "0.5300846", "0.5300846", "0.53000313", "0.52962744", "0.5293177", "0.5289303", "0.5285365" ]
0.0
-1
/! \brief Save all active services
function save() { foreach ($this->plugins as $name => $obj) { $this->updateServicesVars($name); if ($this->plugins[$name]->is_account) { $this->plugins[$name]->save(); } elseif ($this->plugins[$name]->initially_was_account) { $this->plugins[$name]->remove_from_parent(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\r\n {\r\n $services = App\\service::all();\r\n\r\n foreach ($services as $service)\r\n {\r\n $service->stylists()->save(\\App\\service::find(1));\r\n $service->stylists()->save(\\App\\service::find(2));\r\n $service->stylists()->save(\\App\\service::find(3));\r\n }\r\n\r\n }", "public function save_all() {\n\t\t$this->save_api();\n\t\t$this->save_field_map();\n\t\t$this->save_import();\n\t\t$this->save_requirement_set();\n\t}", "public function saving(Service $Service)\n {\n //code...\n }", "function saveService()\n {\n $this->dialogObject->save_object();\n $msgs = $this->dialogObject->check();\n if (count($msgs)) {\n foreach ($msgs as $msg) {\n msg_dialog::display(_(\"Error\"), $msg, ERROR_DIALOG);\n }\n } else {\n $this->plugins[$this->current] = $this->dialogObject;\n $tmp = get_object_vars($this->dialogObject);\n foreach ($tmp as $name => $value) {\n $this->plugins[$this->current]->$name = $value;\n }\n $this->closeDialogs();\n $this->backup = NULL;\n $this->updateActionMenu();\n }\n }", "public function saved(Service $Service)\n {\n //code...\n }", "public function persistAll() {}", "public static function storeAll()\n {\n foreach (self::$_activeFilters as $target => $filter) {\n $filter->store();\n }\n }", "function persistAll() ;", "public function saveAll() {\n if (isset($this::$has)) {\n foreach ($this::$has as $key => $value) {\n if(isset($this->$key)) {\n foreach ($this->$key as $item) {\n $item->saveAll();\n }\n }\n }\n }\n $this->save();\n }", "public function run()\n {\n $services = [\n [\"type\" =>'wifi'],\n [\"type\" =>'posto auto'],\n [\"type\" =>'piscina'],\n [\"type\" =>'sauna'],\n [\"type\" =>'vista mare'],\n [\"type\" =>'reception']\n ];\n \n foreach($services as $service){\n $newService = new Service;\n $newService -> fill($service) -> save();\n }\n }", "function save() {\r\n foreach ($this->_data as $v)\r\n $v -> save();\r\n }", "public function save()\n {\n $this->save_meta_value('_sim_service_price', $this->service_price);\n $this->save_meta_value('_sim_service_price_registered', $this->service_price_registered);\n $this->save_meta_value('_sim_service_hide_price', $this->service_hide_price);\n }", "public function saveServices(Services $service, $request)\n {\n $image = $request->has('banner') ? $request->file('banner') : null;\n $service->storeImage($image, ['width' => 230 , 'height' => 230]);\n $service->name = $request->input('name');\n $service->slug = str_slug($request->input('name'));\n $service->category_type_id = $request->input('category_type');\n $service->description = $request->input('description');\n $service->sequence = $service->sequence ?? Services::count() + 1;\n $service->save();\n return $service;\n }", "public function insert_multiple_service() {\r\n if (USER_ROLE == ROLE_ONE) {\r\n $inserts = json_decode($this->input->post('services'));\r\n $vouchers_ids = \",\";\r\n $flag = false;\r\n foreach ($inserts as $item) {\r\n $data['service_name'] = $item[0];\r\n $data['provided_by'] = $item[1];\r\n $data['billing_id'] = $item[2];\r\n $data['notes'] = $item[3];\r\n $data['cost'] = $item[4];\r\n $data['currency_type'] = $item[5];\r\n $data['received_date'] = $item[6];\r\n $data['insert_number'] = $item[7];\r\n $data['quantity'] = $item[8];\r\n $result = $this->service_model->add_service($data);\r\n if ($result != -1) {\r\n $vouchers_ids .= $result . \",\";\r\n $flag = true;\r\n } else if ($result == -1) {\r\n $flag = false;\r\n $result2 = $this->service_model->delete_many_services($vouchers_ids);\r\n }\r\n if ($flag != true)\r\n break;\r\n }\r\n if ($flag) {\r\n echo json_encode(array('status' => true, 'msg' => $result.\"تم إدخال البيانات بنجاح\"));\r\n } else {\r\n echo json_encode(array('status' => false, 'msg' => $result2.\"لم يتم إدخال البيانات هناك خطأ في البيانات المدخلة\"));\r\n }\r\n }\r\n }", "public function store()\n\t{\n\t\t//Creamos un nuevo servicio\n\t\t$service = new Service();\n\n\t\t//Colocamos el titulo, la descripcion corta, descción larga y si es premium\n\t\t$service->name = Input::get('name');\n\t\t$service->value = Input::get('value');\n\t\t$service->description = Input::get('description');\n\t\t$service->status = Input::get('status');\n\n\t\t//Guardamos y retornamos a la lista de servicios\n\t\t$service->save();\n\t\t\n\t\t//Redireccionamos\n\t\treturn Redirect::to('services');\n\t}", "public function run()\n {\n $service = [\n [\n 'id' => 1,\n 'name' => 'Import XML',\n 'description' => 'Le service Import XML ',\n 'is_active' => true,\n 'status_message' => 'Le service Import XML est activé.',\n\n ],\n [\n 'id' => 2,\n 'name' => 'PTL',\n 'description' => 'Le service PTL ',\n 'is_active' => true,\n 'status_message' => 'Le service PTL est activé.',\n\n ],\n [\n 'id' => 3,\n 'name' => 'Tarif CSV',\n 'description' => 'Le service de génération du fichier Tarif CSV (VIALTO) ',\n 'is_active' => true,\n 'status_message' => 'Le service Tarif CSV est activé.',\n\n ],\n [\n 'id' => 4,\n 'name' => 'Plan. Doc',\n 'description' => 'Le service de documents XLS plannifiés. ',\n 'is_active' => true,\n 'status_message' => 'Le service de documents XLS plannifiés est activé.',\n\n ],\n\n ];\n\n Service::insert($service);\n }", "public function store(Request $request)\n {\n $service = new Services;\n $tags= $request->input('service_tag');\n $service->title = $request->input('title');\n $service->sub_title = $request->input('sub_title');\n $description = $request->input('description');\n $service->description = $description;\n $service->price = $request->input('price');\n $name = Str::slug($request->input('title'));\n $service_exist = services::where('slug', $name)->first();\n if ($service_exist) {\n $last_record = services::find(\\DB::table('services')->max('id'));\n $incremented_id = $last_record->id + 1;\n $slug = $name . '-' . $incremented_id;\n } else {\n $slug = $name;\n }\n $service->slug = $slug;\n\n $service->image = $request->input('service_image');\n \n \n $service->save();\n foreach($tags as $tag){\n \n $servicetag = new Servicetags;\n $servicetag->service_id= $service->id;\n $servicetag->name=$tag;\n $servicetag->save();\n\n }\n return redirect()->route('services.index')->with('success', 'Service added successfully.');\n }", "public static function register_services(): void\n {\n foreach (self::get_services() as $class) {\n $service = self::instantiate($class);\n if (method_exists($class, 'register')) {\n $service->register();\n }\n }\n }", "public function run()\n {\n\n $services = [\n 'Wi-fi',\n 'Posto macchina',\n 'Piscina',\n 'Animali',\n 'Vista mare',\n 'Sauna',\n 'Portineria',\n 'Cucina',\n 'Possibilità di fumare',\n 'Ascensore',\n 'Cassaforte',\n 'Tv',\n 'Aria condizionata',\n 'Kit di pronto-soccorso',\n 'Lavatrice'\n\n ];\n\n foreach ($services as $service) {\n \n $new_service = new Service();\n\n $new_service->name = $service;\n\n $new_service->save();\n\n }\n }", "public static function register_services()\n {\n foreach (self::get_services() as $class) {\n $service = self::instantiate($class);\n if (method_exists($service, 'register')) {\n $service->register();\n }\n }\n }", "public function store()\n {\n $service = new Service;\n $service->name = Input::get('name');\n $service->icon = Input::get('icon');\n $service->description = Input::get('description');\n $service->long_desc = Input::get('long_desc');\n $service->img_detail = Input::get('img_detail');\n $service->save();\n\n return Redirect::to('/admin/services');\n }", "protected function index() {\n\t\t$service = new Model_Service();\n\t\t//$service->set('active',true);\n\t\t$this->payload->services = $service->find();\n\t}", "public function registerServices() {\n\t\t$services = $this->getServices();\n\t\t$services = array_map( [ $this, 'instantiateServices' ], $services );\n\t\t\n\t\tarray_walk( $services, function ( Service $service ) {\n\t\t\t$service->register();\n\t\t} );\n\t}", "public static function register_services()\n {\n foreach ( self::get_services() as $class ) {\n $service = self::instantiate( $class );\n if ( method_exists( $service, 'register' ) ) {\n $service->register();\n }\n }\n }", "public function saveContainers()\n {\n $this->toContainer->saveBook();\n $this->fromContainer->saveBook();\n }", "public function run()\n {\n $data = file_get_contents(\"database/Queries/services.json\");\n $services = json_decode($data, true);\n foreach ($services as $value) {\n Service::create([\n 'title' => $value['title'],\n 'description' => $value['description'],\n 'state' => $value['state']\n ]);\n }\n }", "public static function register_services()\n {\n foreach ( self::get_services() as $class )\n {\n $service = self::instantiate( $class );\n if( method_exists( $service, 'register' ) )\n $service->register();\n }\n }", "public function shareService ()\n {\n \n $list = $this->services->findAll();\n return $list;\n }", "public function save()\n {\n // Save each initialised region\n foreach ($this->regions as $key => $region) {\n $region->save();\n unset($this->regions[$key]);\n }\n }", "public function run()\n {\n $service = array (\n array(\n \t'serviceId' => 'SERV0001',\n\t\t\t\t'serviceName' => 'Change Oil and Oil Filter',\n\t\t\t\t'serviceDesc' => '',\n\t\t\t\t'serviceCategoryId' => 'SC001',\n\t\t\t\t'servicePrice' => 500.00,\n 'serviceSize' => 1,\n\t\t\t\t'serviceIsActive' => 1,\n ),\n array(\n 'serviceId' => 'SERV0002',\n 'serviceName' => 'Change Oil, Oil Filter and Spark Plugs (4pcs)',\n 'serviceDesc' => '',\n 'serviceCategoryId' => 'SC001',\n 'servicePrice' => 300.25,\n 'serviceSize' => 1,\n 'serviceIsActive' => 1,\n ),\n array(\n \t'serviceId' => 'SERV0003',\n\t\t\t\t'serviceName' => 'Change Oil and Oil Filter',\n\t\t\t\t'serviceDesc' => '',\n\t\t\t\t'serviceCategoryId' => 'SC001',\n\t\t\t\t'servicePrice' => 1000.00,\n 'serviceSize' => 2,\n\t\t\t\t'serviceIsActive' => 1,\n ),\n array(\n 'serviceId' => 'SERV0004',\n 'serviceName' => 'Change Oil, Oil Filter and Spark Plugs (4pcs)',\n 'serviceDesc' => '',\n 'serviceCategoryId' => 'SC001',\n 'servicePrice' => 600.50,\n 'serviceSize' => 2,\n 'serviceIsActive' => 1,\n ),\n );\n DB::table('service')->insert($service);\n }", "public function listsServicesPost()\r\n {\r\n $input = Request::all();\r\n $new_serivce = Services::create($input);\r\n if($new_serivce){\r\n return response()->json(['msg'=> 'Created a new service'],200);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to create a new service');\r\n }\r\n }", "public function save()\n\t{\n\t\t$this->container->save($this);\n\t}", "public function registerServices() {\n\t\t$services = Config::inst()->get('FakeManager', 'services');\n\t\tif($services) {\n\t\t\tforeach($services as $origName => $fakeName) {\n\t\t\t\t$fakeObj = Injector::inst()->create($fakeName);\n\t\t\t\tif($this->db && $fakeObj instanceof FakeDatabaseConsumerInterface) {\n\t\t\t\t\t$fakeObj->setDb($this->db);\n\t\t\t\t}\n\t\t\t\t$this->services[$origName] = $fakeObj;\n\t\t\t\tInjector::inst()->registerService($fakeObj, $origName);\n\t\t\t}\n\t\t}\n\t}", "public function run()\n {\n // ซาลอน type id : 1\n\n\n // Service id 1\n $service = new Service();\n $service->type_id = 1;\n $service->name = \"สระผม\";\n $service->description = \"บริการสระผมแบบพรีเมียมด้วยน้ำนมวัวนำเข้าจากนิวซีแลนด์ และบำรุงเส้นผมด้วยผลิตภัณฑ์ออแกนิก\";\n $service->service_image_url = \"image_upload/hair-washhair.jpg\";\n $service->save();\n\n\n // Service id 2\n $service = new Service();\n $service->type_id = 1;\n $service->name = \"ตัดผม\";\n $service->description = \"บริการตัดผมโดยช่างมือ 1 ของตำบลบ้านยาง การันตีฝีมือการตัดโดยรางวัลประกวดตัดผมประจำตำบล 4 ปีซ้อน\";\n $service->service_image_url = \"image_upload/hair-haircut.jpg\";\n $service->save();\n\n // Service id 3\n $service = new Service();\n $service->type_id = 1;\n $service->name = \"ย้อมสีผม\";\n $service->description = \"บริการย้อมผม โดยใช้ยาย้อมผมที่อ่อนโยนต่อหนังศรีษะและเส้นผม ผมจะไม่แห้งและไม่เสียถึง 99.99%\";\n $service->service_image_url = \"image_upload/hair-dyehair.jpg\";\n $service->save();\n\n // Service id 4\n $service = new Service();\n $service->type_id = 1;\n $service->name = \"ดัดผม\";\n $service->description = \"บริการดัดผม ใช้เครื่องลอนผมนำเข้าจากสหรัฐอเมริกา ผมจะไม่ชี้ ไม่ฟู และไม่ดีด พร้อมทั้งทำทรีทเมนต์นมแกะและสามารถกำหนดความลอนของผมได้ตามที่ต้องการ\";\n $service->service_image_url = \"image_upload/hair-curlhair.png\";\n $service->save();\n\n\n // Service id 5\n $service = new Service();\n $service->type_id = 1;\n $service->name = \"ยืดผม\";\n $service->description = \"ยืดผมถาวรอยู่ได้นานถึง 1 ปี โดยใช้น้ำยาออแกนิกสูตรพิเศษจากทางร้าน ทำให้ผมของท่านตรงและเงางามได้ตลอดทั้งปี\";\n $service->service_image_url = \"image_upload/hair-straighten.jpg\";\n $service->save();\n\n // บริการนวด type id : 2\n // Service id 6\n $service = new Service();\n $service->type_id = 2;\n $service->name = \"บริการนวดไทย\";\n $service->description = \"นวดแผนไทยโดยหมอนวดเฉพาะทาง จบหลักสูตรการนวดแผนไทยจากวัดโพธิ์โดยตรง สามารถนวดกดจุดช่วยบรรเทาอาการปวดตามบริเวณต่างๆได้อย่างแม่นยำ\";\n $service->service_image_url = \"image_upload/massage-thai.jpg\";\n $service->save();\n\n // Service id 7\n $service = new Service();\n $service->type_id = 2;\n $service->name = \"บริการนวดอโรม่า\";\n $service->description = \"นวดอโรม่าด้วยน้ำมันหอมระเหย Aromatherapy จากแบรนด์ Jo Malone ช่วยบรรเทาอาการเหนื่อย และทำให้ผ่อนคลายมากขึ้น ลดอาการอ่อนล้า อ่อนเพลียของกล้ามเนื้อได้ดีเยี่ยม\";\n $service->service_image_url = \"image_upload/massage-aroma.jpg\";\n $service->save();\n\n // ทำเล็บ type id 3\n\n // Service id 8\n $service = new Service();\n $service->type_id = 3;\n $service->name = \"ทาเล็บเจล\";\n $service->description = \"บริการทาเล็บเจลสามารถเลือกสีได้ไม่จำกัดด้วยผลิตภัณฑ์คุณภาพที่ได้รับการรับรอง โดยมีสีให้เลือกมากกว่า 100 สี และสามารถเพ้นต์เล็บได้มากกว่า 500 รูปแบบ\";\n $service->service_image_url = \"image_upload/nail-gel.jpg\";\n $service->save();\n\n // Service id 9\n $service = new Service();\n $service->type_id = 3;\n $service->name = \"ตัดแต่งเล็บ\";\n $service->description = \"บริการตัดแต่งเล็บด้วยช่างมากฝีมือและชำนาญการ ช่วยดีไซน์ตัดแต่งทั้งเล็บมือและเล็บเท้าให้เข้ากับบุคลิก เสริมสร้างภาพลักษณ์ที่ดี\";\n $service->service_image_url = \"image_upload/nail-cut.jpg\";\n $service->save();\n\n // Service id 10\n $service = new Service();\n $service->type_id = 3;\n $service->name = \"ต่อเล็บ\";\n $service->description = \"บริการต่อเล็บทุกประเภทไม่ว่าจะเป็น PVC, สำเร็จรูป, อะคริลิคหรือแบบเจล โดยสามารถเลือกความยาวเล็บได้ตามใจชอบ ไม่จำกัดความยาวและรูปทรงของเล็บ\";\n $service->service_image_url = \"image_upload/nail-extension.jpg\";\n $service->save();\n\n\n // บริการเสริมความงาม (botox, meso fat, filler) type id 4\n // Service id 11\n $service = new Service();\n $service->type_id = 4;\n $service->name = \"โบท็อกซ์\";\n $service->description = \"โบท็อกซ์นำเข้าจากเกาหลี เกรดพรีเมียมได้รับการรับรองมาตราฐานจากสหรัฐอเมริกา เห็นผลตั้งแต่ครั้งแรกที่ฉีด ช่วยลดรอยย่นต่างๆได้อย่างเป็นธรรมชาติ\";\n $service->service_image_url = \"image_upload/botox-botox.jpg\";\n $service->save();\n\n // Service id 12\n $service = new Service();\n $service->type_id = 4;\n $service->name = \"เมโสแฟต\";\n $service->description = \"สลายไขมันด้วยเมโสคุณภาพตัวยานำเข้าจากประเทศเกาหลี ได้รับการรับรองจากอย. ปลอดภัย 100% เห็นผลภายใน 5 วัน\";\n $service->service_image_url = \"image_upload/botox-fat.jpg\";\n $service->save();\n\n // Service id 13\n $service = new Service();\n $service->type_id = 4;\n $service->name = \"ฟีลเลอร์\";\n $service->description = \"บริการฉีดฟีลเลอร์ ช่วยเติมเต็มส่วนที่มีริ้วรอยให้กลับมากระชับเป็นธรรมชาติ โดยทีมแพทย์เฉพาะทางมือหนึ่งของตำบลบ้านยาง\";\n $service->service_image_url = \"image_upload/botox-filler.jpg\";\n $service->save();\n\n // Service id 14\n $service = new Service();\n $service->type_id = 4;\n $service->name = \"ร้อยไหม\";\n $service->description = \"บริการร้อยไหม โดยใช้ไหมละลายนำเข้า เกรดพรีเมียม ยกกระชับผิวที่เหี่ยวย่น ให้กลับมาเต่งตึงเหมือนสาวแรกแย้ม\";\n $service->service_image_url = \"image_upload/botox-lifting.jpg\";\n $service->save();\n\n // Waxing type id 5\n // Service id 15\n $service = new Service();\n $service->type_id = 5;\n $service->name = \"แว็กซ์ขนแขน ขา\";\n $service->description = \"แว็กซ์ขนแขน ขาด้วยตัวแว็กซ์เกรดพรีเมียม ไม่ระคายเคืองผิวหนัง ไม่เป็นขนคุดพร้อมทั้งประคบเย็นและทาเจลว่านหางจระเข้ให้หลังบริการเพื่อลดอาการระคายเคือง\";\n $service->service_image_url = \"image_upload/wax-waxing.jpg\";\n $service->save();\n\n // Service id 16\n $service = new Service();\n $service->type_id = 5;\n $service->name = \"แว็กซ์จุดซ่อนเร้น\";\n $service->description = \"แว็กซ์จุดซ่อนเร้นด้วยแว็กซ์น้ำผึ้งเดือน 5 แท้จากป่าอะเมซอน ช่วยลดการอักเสบ ไม่ระคายเคือง อ่อนโยนต่อจุดซ่อนเร้น พร้อมทั้งบริการประคบเย็นและทาว่านหางจระเข้ฟรี\";\n $service->service_image_url = \"image_upload/wax-bikiniwax.jpg\";\n $service->save();\n\n // Treatment type id 6\n // Service id 17\n $service = new Service();\n $service->type_id = 6;\n $service->name = \"บริการมาร์ก\";\n $service->description = \"บริการมาร์กหน้าด้วยโคลนภูเขาไฟจากตำบลบ้านยางคุณภาพเทียบเท่ากับโคลนจากเทือกเขาไฟเกาหลี ช่วยฟื้นฟูผิวหนังให้สม่ำเสมอและกระจ่างใส ทำให้ผิวดูอ่อนเยาว์เหมือนเด็กแรกเกิด\";\n $service->service_image_url = \"image_upload/treatment-mask.jpg\";\n $service->save();\n\n // Service id 18\n $service = new Service();\n $service->type_id = 6;\n $service->name = \"บริการนวดใบหน้า\";\n $service->description = \"บริการนวดใบหน้าด้วยหินกัวซาจากแบรนด์ดัง ทำให้หน้าเรียว ยกกระชับเต่งตึง ทำให้ระบบหมุนเวียนเลือดดีขึ้นและทำให้ลูกค้ารู้สึกผ่อนคลาย\";\n $service->service_image_url = \"image_upload/treatment-massageface.jpeg\";\n $service->save();\n\n // ศัลยกรรม type id 7\n // Service id 19\n $service = new Service();\n $service->type_id = 7;\n $service->name = \"เสริมจมูก\";\n $service->description = \"เสริมจมูกโดยศัลยแพทย์ชั้นนำมือ 1 ของตำบล การันตีการเสริมจมูกกว่า 100 แท่ง คุณหมอเหลาซิลิโคนเองทุกเคสเพื่อให้เข้ากับรูปหน้าแต่ละคน เนียนเหมือนธรรมชาติ\";\n $service->service_image_url = \"image_upload/surgery-nose.jpg\";\n $service->save();\n\n // Service id 20\n $service = new Service();\n $service->type_id = 7;\n $service->name = \"เสริมคาง\";\n $service->description = \"เสริมคางปรับแก้โหวงเฮ้งให้เข้ากับรูปหน้าและช่วยเสริมดวง โดยคุณหมอจะวิเคราะห์หาทรงคางที่ดีที่สุดที่เสริมโหวงเฮ้งใบหน้า ดูดีพร้อมกับดวงดีหาได้ที่นี่เท่านั้น\";\n $service->service_image_url = \"image_upload/surgery-chin.jpg\";\n $service->save();\n\n\n // Service id 21\n $service = new Service();\n $service->type_id = 7;\n $service->name = \"ทำตาสองชั้น\";\n $service->description = \"ทำตาสองชั้น ช่วยเพิ่มความมั่นใจให้กับลูกค้าทุกท่าน ไม่ว่าจะเป็นสองชั้นธรรมดาหรือตาทรง Foxy eyes ก็สามารถทำได้เนียนอย่างเป็นธรรมชาติ ปรับเปลี่ยนให้ดูดียิ่งขึ้นเหมือนแม่ให้มา\";\n $service->service_image_url = \"image_upload/surgery-chin.jpg\";\n $service->save();\n }", "public function serviceInstances() {\n return StatusBoard_SiteService::allForSite($this); \n }", "public function store()\r\n\t{\r\n\t\t// validate\r\n\t\t// read more on validation at http://laravel.com/docs/validation\r\n\t\t$rules = array (\r\n\t\t\t'name' => 'required|unique:services,name',\r\n\t\t\t'estimated_days' => 'required|numeric|min:1'\r\n\t\t);\r\n\r\n\t\t$validator = Validator::make(Input::all(), $rules);\r\n\r\n\t\t//process\r\n\t\tif ($validator->fails()) {\r\n\t\t\treturn Redirect::to('services/create')\r\n\t\t\t\t->withErrors($validator)\r\n\t\t\t\t->withInput();\r\n\t\t} else {\r\n\t\t\t// store service\r\n\t\t\t$service = new Service();\r\n\t\t\t$service->name \t \t= Input::get('name');\r\n\t\t\t$service->estimated_days\t= Input::get('estimated_days');\r\n\t\t\t$service->organization_id = Auth::user()->organization_id;\r\n\t\t\t$service->is_active = 1;\r\n\t\t\t$service->database = Input::get('database');\r\n\t\t\t$service->tabel = Input::get('tabel');\r\n\t\t\t$service->save();\r\n\r\n\r\n\t\t\t// redirect\r\n\t\t\tSession::flash('message', 'Successfully created service');\r\n\t\t\treturn Redirect::to('services/'.$service->id);\r\n\t\t}\r\n\t}", "public function register_services() {\n\t\t// Bail early so we don't instantiate services twice.\n\t\tif ( ! empty( $this->services ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$classes = $this->get_service_classes();\n\n\t\t$this->services = array_map(\n\t\t\t[ $this, 'instantiate_service' ],\n\t\t\t$classes\n\t\t);\n\n\t\tarray_walk( $this->services, function ( Service $service ) {\n\t\t\t$service->register();\n\t\t} );\n\t}", "public function registerServices()\n {\n /**\n * @var $container Container\n */\n $container = $this->getContainer();\n\n $services = $container->settings['services'];\n\n if (is_array($services) && !empty($services)) {\n foreach ($services as $service) {\n /**\n * @var $instance ServiceInterface\n */\n $instance = new $service();\n\n $container[$instance->name()] = $instance->register();\n\n unset($instance);\n }\n }\n\n unset($container, $services, $service);\n }", "public function setServices($services) {\n $this->services = $services;\n }", "public static function loadPersistentServices()\n {\n $handlers = ModUtil::getVar(self::HANDLERS, 'definitions', array());\n if (!$handlers) {\n return;\n }\n\n foreach ($handlers as $id => $handler) {\n self::$serviceManager->registerService(new Zikula_ServiceManager_Service($id, $handler['definition'], $handler['shared']));\n }\n }", "public function getServices();", "public function save()\n {\n $entities = $this->entities;\n Database::getInstance()->doTransaction(\n function() use ($entities)\n {\n foreach ($entities as $entity)\n {\n if ($entity->getMarkedAsDeleted())\n {\n $entity->delete();\n } \n else if ($entity->getMarkedAsUpdated())\n {\n $entity->saveWithDetails();\n }\n }\n }\n );\n }", "public function setServices($services)\n {\n $this->services = $services;\n }", "private function saveItems()\n {\n $this->storage->save($this->items);\n }", "public function getServices()\n\t\t{\n\n\t\t\t$service_id = $this->input->get('service_id') ;\n\t\t\techo json_encode($this->mdl_services->all()->result() ) ;\n\t\t}", "private function save(): void\n {\n foreach ($this->dataToSave as $file => $data) {\n $this->langFilesManager->fillKeys($file, $data);\n }\n }", "public function saveAllPlayers(): void;", "private function registerServices() {\n // Modules\n $this->addService('modules', 'MyTravel\\Core\\Service\\Modules::setService');\n // Routing\n $this->addService('routing', 'MyTravel\\Core\\Service\\Routing::setService');\n // Event dispatcher\n $this->serviceContainer\n ->register('events', 'Symfony\\Component\\EventDispatcher\\EventDispatcher');\n // Database\n $this->addService('db', 'MyTravel\\Core\\Service\\Db::setService');\n // Access\n $this->addService('access', 'MyTravel\\Core\\Service\\Access::setService');\n }", "public static function getListServices () {\n return self::findByStatus(self::STATUS_ACTIVE);\n }", "protected function services()\n {\n if ($this->servicesDb === null)\n $this->servicesDb = new ServiceModel($this->db);\n return $this->servicesDb;\n }", "public function store(ServicesFormRequest $request)\n {\n $service = new \\App\\Services();\n $service->title = $request->get('title');\n $service->summary = $request->get('summary');\n $service->description = $request->get('description');\n $service->price = $request->get('price');\n $service->display_order = $request->get('display_order');\n $service->is_active = $request->has('is_active') ? 1 : 0;\n $service->save();\n @$message .= 'Service added.<br/>';\n $fileprefix = 'service-';\n $filepath = 'pictures/';\n $filename = str_replace('tmp/', '', $request->input('tmp_img_path_main'));\n if (is_file('tmp/' . $filename)) {\n \\File::move('tmp/' . $filename, $filepath . $fileprefix . $filename);\n $service->image = $filepath . $fileprefix . $filename;\n $service->save();\n @$message .= 'Picture saved.<br/>';\n } //is_file('tmp/' . $filename)\n return redirect('admin/services/edit/' . $service->id)->withMessage($message);\n }", "private static function loadServices() {\n\n Application::$services = array();\n\n $config = Application::getConfig();\n\n if ($handle = opendir($config[\"system\"][\"service-folder\"])) {\n\n /* Das ist der korrekte Weg, ein Verzeichnis zu durchlaufen. */\n while (false !== ($entry = readdir($handle))) {\n if ($entry != \".\" && $entry != \"..\") {\n require $config[\"system\"][\"service-folder\"] . \"/\" . $entry;\n $className = $config[\"system\"][\"namespace\"] . \"\\\\services\\\\\" . basename($entry,\".php\");\n $testClass = new \\ReflectionClass($className);\n if (!$testClass->isAbstract()) {\n Application::$services[basename($entry,\".php\")] = new $className();\n }\n\n }\n }\n closedir($handle);\n }\n }", "public function getServices(): array;", "public static function get_services()\n {\n\n //підключаємо всі необхідні класи для активації через масив\n return [\n Pages\\Admin::class,\n Base\\Enqueue::class,\n Base\\SettingsLinks::class\n ];\n }", "function saveService ($pid, $name, $site_url, $ping_url, $method, $enabled)\n{\n global $_CONF, $_TABLES, $LANG_TRB;\n\n $enabled = ($enabled == 'on' ? 1 : 0);\n if ($method == 'extended') {\n $method = 'weblogUpdates.extendedPing';\n } else {\n $method = 'weblogUpdates.ping';\n }\n\n $name = strip_tags (COM_stripslashes ($name));\n $site_url = strip_tags (COM_stripslashes ($site_url));\n $ping_url = strip_tags (COM_stripslashes ($ping_url));\n\n $errormsg = '';\n if (empty ($name)) {\n $errormsg = $LANG_TRB['error_site_name'];\n } else {\n // all URLs must start with http: or https:\n $parts = explode (':', $site_url);\n if (($parts[0] != 'http') && ($parts[0] != 'https')) {\n $errormsg = $LANG_TRB['error_site_url'];\n } else {\n $parts = explode (':', $ping_url);\n if (($parts[0] != 'http') && ($parts[0] != 'https')) {\n $errormsg = $LANG_TRB['error_ping_url'];\n }\n }\n }\n\n if (!empty ($errormsg)) {\n return editServiceForm ($pid, $errormsg, $name, $site_url, $ping_url,\n $method, $enabled);\n }\n\n $name = addslashes ($name);\n $site_url = addslashes ($site_url);\n $ping_url = addslashes ($ping_url);\n\n if ($pid > 0) {\n DB_save ($_TABLES['pingservice'],\n 'pid,name,site_url,ping_url,method,is_enabled',\n \"'$pid','$name','$site_url','$ping_url','$method','$enabled'\");\n } else {\n DB_save ($_TABLES['pingservice'],\n 'name,site_url,ping_url,method,is_enabled',\n \"'$name','$site_url','$ping_url','$method','$enabled'\");\n }\n\n return COM_refresh ($_CONF['site_admin_url']\n . '/trackback.php?mode=listservice&amp;msg=65');\n}", "public function run()\n {\n $services = [\n 'Hospital',\n 'Police',\n 'Water services',\n 'Public bus station',\n 'Market',\n 'Shops',\n 'Electrical supply',\n 'Primary school',\n 'Secondary school'\n ];\n\n for($i = 0; $i < count($services); $i++){\n $service = [\n 'name' => $services[$i],\n ];\n Utility::create($service);\n }\n }", "public static function get_services() {\n return [ \n Pages\\Admin::class,\n Base\\Enqueue::class,\n Base\\SettingsLinks::class,\n Base\\JsObjectsManager::class,\n Base\\ShortCodesManager::class\n ];\n }", "public function save() \r\n\t{\r\n\t\t$this->saveNewProducts();\r\n\t\t$this->saveUpdateProducts();\r\n\t\t$this->saveRemoveProducts();\t\t\t\r\n\t\t$this->destroyCache(); \r\n\t}", "protected function save()\n\t{\n\t\t$this->saveItems();\n\t\t//$this->saveAssignments();\n\t\t//$this->saveRules();\n\t}", "public function store()\n\t{\n\t\t$input = Input::all();\n\t\t$validation = Validator::make($input, Service::$rules);\n\n\t\tif ($validation->passes())\n\t\t{\n\t\t\t$this->service->create($input);\n\n\t\t\treturn Redirect::route('services.index');\n\t\t}\n\n\t\treturn Redirect::route('services.create')\n\t\t\t->withInput()\n\t\t\t->withErrors($validation)\n\t\t\t->with('message', 'There were validation errors.');\n\t}", "public function save(){\n\t\t// get posted data\n\t\t\n\t\n\t $datas = $_POST;\n\t\tunset($datas['save']);\t\n\t\t\n\t\t\n\t\t\t\t// insert into vendor\n\t\t$result = dbFactory::recordInsert($datas,VSERVICETYPE);\n\t\tif($result == 1){\n\t\t\t$this->flag = 1;\t\t// success\n\t\t\treturn message::setMsg(\"A New Service Type Added Successfully\");\n\t\t}else{\n\t\t\t$this->flag = 2;\t\t// fail\n\t\t\treturn message::setMsg(\"Service Type Creation Failed\",\"0\");\n\t\t}\n\t\t\n\t\t}", "public static function setServiceCredentials()\n {\n // Get all bound services\n $allBoundServices = collect(json_decode(getenv('VCAP_SERVICES'), true));\n\n collect(self::$services)->each(function ($service) use ($allBoundServices) {\n\n // Determine whether we have the specific service key\n // among all bound services.\n if ($allBoundServices->has($service['service_key'])) {\n\n // Collect from bound services under this service key\n $services = collect($allBoundServices->get($service['service_key']));\n\n // Get the specific bound service\n $boundService = collect($services->where('name', $service['service_name'])->first());\n\n // Save each credentials in .env file\n collect($service['env_mapping'])->each(function ($envKey, $credentialKey) use ($boundService) {\n self::saveValueToEnv(\n $envKey,\n collect($boundService->get('credentials'))->get($credentialKey)\n );\n });\n }\n });\n }", "public function saveAll() {\n\t\t$originalCaret = $this->caret;\n\t\tforeach($this as $key => $row) {\n\t\t\t$this->save();\n\t\t}\n\t\t$this->caret = $originalCaret;\n\t}", "public function store(Request $request)\n {\n //validate the user form data \n $request->validate([\n 'Title'=>'required', \n 'type'=>'required',\n 'date'=> 'required',\n 'venue'=> 'required',\n 'address'=>'required', \n 'preacher'=>'required',\n 'sermon_title'=>'required', \n 'bible_references'=>'required',\n 'givings'=> 'required',\n 'attendees'=> 'required',\n 'sermon_notes'=> 'required',\n 'first_timers'=>'required|nullable',\n ]);\n\n \n\n\n\n\n //inserting data into the database \n $services = new Service();\n $services->Title = $request->input('Title');\n $services->type = $request->input('type');\n $services->date = $request->input('date');\n\n $services->venue = $request->input('venue');\n $services->address = $request->input('address');\n\n $services->preacher = $request->input('preacher');\n \n $services->sermon_title = $request->input('sermon_title');\n \n $services->bible_references = $request->input('bible_references');\n \n $services->sermon_notes = $request->input('sermon_notes');\n $services->attendees = $request->input('attendees');\n $services->first_timers= $request->input('first_timers');\n $services->givings = $request->input('givings');\n \n \n \n\n \n $services->save();\n\n //redirecting to the user dashboard after creating a new service\n return redirect('/admin');\n }", "private function calculateService()\n {\n $service = new Service();\n $serviceList = array();\n foreach ($this->services as $value) {\n $result = $service->getById($value['name'])[0];\n $result['hours']= $service->calculateHours($value);\n $result['data'] = $value;\n $result['total'] = $result['hours'] * $result['price_per_hour'];\n $this->subtotal += $result['total'];\n $serviceList[] = $result;\n }\n $this->services = $serviceList;\n\n }", "function submitServices($conn, $planID, $serviceArray){\n\t$sql = \"INSERT INTO planservice (PlanId, ServiceName, Comment) VALUES (:planID, :serviceName, :comment)\";\n\tdeleteServices($conn, $planID);\n\t\n\tforeach($serviceArray as $service){\n\t\t$sth = $conn->prepare($sql);\n\n\t\t$sth->bindParam(':planID', $planID, PDO::PARAM_INT, 11);\n\t\t$sth->bindParam(':serviceName', $service['serviceName'], PDO::PARAM_STR);\t\t\t\t\n\t\t$sth->bindParam(':comment', $service['serviceValue'], PDO::PARAM_STR);\t\t\t\t\n\t\t$sth->execute();\n\t\t\n\t\t$sth->closeCursor();\n\t}\n\t\n\t$return = ['message' => 'Successfully added the service'];\n\treturn $return;\n}", "public function saveAvailability($productID, $data)\r\n\t{\r\n\t\t$this->deleteAll(array('product_id' => $productID));\r\n\t\t\r\n\t\tforeach ($data as $serviceID => $available)\r\n\t\t{\r\n\t\t\t$this->create();\r\n\t\t\t$this->save(array('ProductShippingCarrierService' => array(\r\n\t\t\t\t'product_id' => $productID,\r\n\t\t\t\t'shipping_carrier_service_id' => $serviceID,\r\n\t\t\t\t'available' => $available\r\n\t\t\t)));\r\n\t\t}\t\t\r\n\t}", "function AllServices(){\n return $this->db->get($this->service)->result();\n }", "public static function getServices(): array\n {\n return static::$services;\n }", "public function save() {\r\n /** probably we should add a timestamp, Item ID and stuff */\r\n $stored_data = json_encode(array($this->name, $this->status), JSON_UNESCAPED_UNICODE);\r\n $this->db_write(\"objects\", \"Item_s11n\", $stored_data);\r\n print ($stored_data);\r\n }", "public function startServices()\n\t{\n\t\t/** store service connections for use, as needed, by the application */\n\t\t$this->service_connection = array();\n\n\t\t/** store connection messages */\n\t\t$this->message = array();\n\n\t\t/** start services in this sequence */\n\t\t$services = simplexml_load_file(CONFIGURATION_FOLDER . '/Application/services.xml');\n\n\t\tforeach ($services->service as $item) {\n\t\t\t$connectionSucceeded = true;\n\t\t\t$connection = '';\n\n\t\t\t/** class name */\n\t\t\t$entry = (string)$item . 'Service';\n\t\t\t$folder = (string)$item;\n\t\t\t$serviceClass = 'Molajo\\\\Service\\\\Services\\\\' . $folder . '\\\\' . $entry;\n\n\t\t\t/** method name */\n\t\t\t$serviceMethod = 'getInstance';\n\n\t\t\t/** trap errors for missing class or method */\n\t\t\tif (class_exists($serviceClass)) {\n\t\t\t\tif (method_exists($serviceClass, $serviceMethod)) {\n\n\t\t\t\t} else {\n\t\t\t\t\t$connectionSucceeded = false;\n\t\t\t\t\t$connection = $serviceClass . '::' . $serviceMethod . ' Class Method does not exist';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$connectionSucceeded = false;\n\t\t\t\t$connection = $serviceClass . ' Class does not exist';\n\t\t\t}\n\n\t\t\t/** make service connection */\n\t\t\tif ($connectionSucceeded == true) {\n\t\t\t\ttry {\n\t\t\t\t\t$connection = $serviceClass::$serviceMethod();\n\n\t\t\t\t} catch (\\Exception $e) {\n\t\t\t\t\t$connectionSucceeded = false;\n\t\t\t\t\t$connection = 'Fatal Error: ' . $e->getMessage();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/** store connection or error message */\n\t\t\tif ($connectionSucceeded == false) {\n\t\t\t\techo 'service failed for ' . $entry . '<br />';\n\t\t\t}\n\t\t\t$this->set($entry, $connection, $connectionSucceeded);\n\n\t\t}\n\n\t\tforeach ($this->message as $message) {\n\t\t\tServices::Profiler()->set($message, LOG_OUTPUT_SERVICES, VERBOSE);\n\t\t}\n\n\t\treturn true;\n\t}", "public function getServices() {\n $services = Service::active()->get()->toArray();\n $outputArray = array();\n if ($services) {\n foreach ($services as $key => $value) {\n $begin = new DateTime($value['start_date']);\n $end = new DateTime($value['end_date']);\n if ($value['service_type'] == 'daily') {\n\n $interval = DateInterval::createFromDateString('1 day');\n $period = new DatePeriod($begin, $interval, $end);\n\n foreach ($period as $key => $dt) {\n $timestamp = strtotime($dt->format(\"Y-m-d\"));\n $myobj = new \\stdClass();\n $myobj->title = $value['title'];\n $myobj->start = $dt->format(\"Y-m-d\");\n \n $scheduleArray = $this->getScheduleService($value['id'], $timestamp);\n \n if (date(\"Y-m-d\") <= $dt->format(\"Y-m-d\") && !empty($scheduleArray['availability'])) {\n $myobj->color = \"#605ca8\";\n $myobj->url = url(\"/reservation/\" . $value['id'] . '/' . $timestamp);\n } else {\n $myobj->color = \"gray\";\n }\n array_push($outputArray, $myobj);\n }\n }\n if ($value['service_type'] == 'weekly') {\n\n $schedule = Schedule::where('service_id', $value['id'])->get()->toArray();\n\n $weekNumber = array();\n for ($i = 0; $i < count($schedule); $i++) {\n $weekNumber[] = $schedule[$i]['week_number'];\n }\n\n $interval = DateInterval::createFromDateString('1 day');\n $period = new DatePeriod($begin, $interval, $end);\n\n foreach ($period as $key => $dt) {\n $timestamp = strtotime($dt->format(\"Y-m-d\"));\n if (in_array($dt->format(\"w\"), $weekNumber)) {\n $myobj = new \\stdClass();\n $myobj->title = $value['title'];\n $myobj->start = $dt->format(\"Y-m-d\");\n \n $scheduleArray = $this->getScheduleService($value['id'], $timestamp);\n \n if (date(\"Y-m-d\") <= $dt->format(\"Y-m-d\") && !empty($scheduleArray['availability'])) {\n $myobj->color = \"#f012be\";\n $myobj->url = url(\"/reservation/\" . $value['id'] . '/' . $timestamp);\n } else {\n $myobj->color = \"gray\";\n }\n array_push($outputArray, $myobj);\n }\n }\n }\n\n if ($value['service_type'] == 'monthly') {\n $interval = DateInterval::createFromDateString('1 month');\n $period = new DatePeriod($begin, $interval, $end);\n\n foreach ($period as $key => $dt) {\n $timestamp = strtotime($dt->format(\"Y-m-d\"));\n $myobj = new \\stdClass();\n $myobj->title = $value['title'];\n $myobj->start = $dt->format(\"Y-m-d\");\n \n $scheduleArray = $this->getScheduleService($value['id'], $timestamp);\n \n if (date(\"Y-m-d\") <= $dt->format(\"Y-m-d\") && !empty($scheduleArray['availability'])) {\n $myobj->color = \"#00a65a\";\n $myobj->url = url(\"/reservation/\" . $value['id'] . '/' . $timestamp);\n } else {\n $myobj->color = \"gray\";\n }\n array_push($outputArray, $myobj);\n }\n }\n\n if ($value['service_type'] == 'yearly') {\n $interval = DateInterval::createFromDateString('1 year');\n $period = new DatePeriod($begin, $interval, $end);\n\n foreach ($period as $key => $dt) {\n $timestamp = strtotime($dt->format(\"Y-m-d\"));\n $myobj = new \\stdClass();\n $myobj->title = $value['title'];\n $myobj->start = $dt->format(\"Y-m-d\");\n \n $scheduleArray = $this->getScheduleService($value['id'], $timestamp);\n \n if (date(\"Y-m-d\") <= $dt->format(\"Y-m-d\") && !empty($scheduleArray['availability'])) {\n $myobj->color = \"orange\";\n $myobj->url = url(\"/reservation/\" . $value['id'] . '/' . $timestamp);\n } else {\n $myobj->color = \"gray\";\n }\n array_push($outputArray, $myobj);\n }\n }\n }\n }\n// echo \"<pre>\";\n// print_r($outputArray);\n// echo \"</pre>\";\n echo json_encode($outputArray);\n }", "public function save_service_info($data){\r\n $query = \"INSERT INTO tbl_aboutus_service (service_icon, service_title, service_desc, publication_status)\"\r\n . \"VALUES('$data[service_icon]', '$data[service_title]', '$data[service_desc]', '$data[publication_status]')\";\r\n\r\n if (mysqli_query($this->db_connect, $query)) {\r\n $message = \"Service Information Save Successfully!\";\r\n return $message;\r\n\r\n } else {\r\n die(\"Query Problem! \" . mysqli_error($this->db_connect));\r\n }\r\n }", "public static function get_services()\n {\n $ServicesObj = new Services();\n $Services = array();\n try {\n $stmt = $ServicesObj->read();\n $count = $stmt->rowCount();\n if ($count > 0) {\n while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n extract($row);\n $p = (object) array(\n \"ServiceID\" => (int) $ServiceID,\n \"ServiceName\" => $ServiceName,\n );\n\n array_push($Services, $p);\n }\n }\n return $Services;\n } catch (Exception $e) {\n throw $e;\n }\n }", "private function exportAllTypesForAllStores()\n {\n foreach (Mage::helper('factfinder/export')->getExportTypes() as $type => $model) {\n $files = $model->saveAll();\n foreach ($files as $file) {\n printf(\"Successfully generated %s export to: %s\\n\", $type, $file);\n }\n }\n }", "public function additionService()\n {\n global $dbh;\n $sql = $dbh->prepare(\"INSERT INTO `service`(`nservicea`, `nservicee`, `coast`, `deletserv`)VALUES('$this->nservicea' ,'$this->nservicee' ,'$this->coast' ,'$this->deletserv')\");\n $result = $sql->execute();\n $id = $dbh->lastInsertId();\n return array ($result,$id);\n }", "public function run()\n {\n DB::table('services')->delete();\n $data = [\n \t['title'=>'STRUCTURAL ENGINEERING','slug'=>str_slug('structural engineering'),'image'=>'','description'=>'','short_description'=>'','publish'=>'1'],\n \t['title'=>'MECHANICAL HVAC','slug'=>str_slug('mechanical hvac'),'image'=>'','description'=>'','short_description'=>'','publish'=>'1'],\n \t['title'=>'ELECTRICAL','slug'=>str_slug('electrical'),'image'=>'','description'=>'','short_description'=>'','publish'=>'1'],\n ['title'=>'PLUMBING ENGINEERING','slug'=>str_slug('plumbing engineering'),'image'=>'','description'=>'','short_description'=>'','publish'=>'1'],\n ['title'=>'POOL ENGINEERING','slug'=>str_slug('pool engineering'),'image'=>'','description'=>'','short_description'=>'','publish'=>'1'],\n ['title'=>'ARTITECTURAL DESIGN & DRAFTING','slug'=>str_slug('architectural design and drafting'),'image'=>'','description'=>'','short_description'=>'','publish'=>'1'],\n\n \n \t];\n \\App\\Models\\Service::insert($data);\n }", "private function load_services() {\n\t\tforeach ( $this->get_services() as $service_classname ) {\n\t\t\t$this->load_service( $service_classname );\n\t\t}\n\t}", "public final function save() {\n }", "public function run()\n {\n $service = [\n [\n 'name_service' => 'Dịch Vụ Mặt',\n 'icon' => 'face.jpg'\n ],\n [\n 'name_service' => 'Dịch Vụ Móng',\n 'icon' => 'nail.jpg'\n ],\n [\n 'name_service' => 'Dịch Vụ Body',\n 'icon' => 'body.jpg'\n ]\n ];\n\n DB::table('services')->insert($service);\n }", "public function unitStore()\n\t{\n\t\t$workload = Input::get('input');\n\t\tforeach($workload as $unit)\n\t\t{\n\t\t\t$this->unit->create($unit);\n\t\t}\n\t\t$service_id = $workload[\"1\"][\"service_id\"];\n\t\treturn Redirect::route('services.show', array(\"id\" => $service_id));\n\t}", "public function createServiceObjects() \n {\n var_dump('jj', Ini::$serviceConnections);\n //if (!empty(Ini::$serviceConnections)) \n //{\n foreach (Ini::$serviceConnections as $connectionName => $connectionDetail) \n {\n Ini::loadModule(Sysutils::Ucase($connectionDetail->type) . 'Service', 'Services', '\\Sys');\n $fqClassname = '\\\\Sys\\\\'. Sysutils::Ucase($connectionDetail->type) . 'Service';\n $this->autoLoadedServices[$connectionName] = array('url' => $connectionDetail->url, 'type' => $connectionDetail->type);\n $this->{$connectionName} = new $fqClassname($connectionDetail->url);\n }\n \n //}\n }", "public function listAllAvailableServices()\n {\n\t\t$data = $this->call(array(), \"GET\", \"sensors/services/available.json\");\n\t\t$data = $data->{'services'};\n\t\t$serviceArray = new ArrayObject();\n\t\tfor($i = 0; $i<count($data);$i++){\n\t\t\t$serviceArray->append(new Service($data[$i], $this));\n\t\t}\n\t\treturn $serviceArray;\n }", "public static function get_services(): array\n {\n return [\n Base\\SettingsLinks::class,\n Pages\\Admin::class,\n Base\\Enqueue::class,\n CPT\\EmailCpt::class,\n ];\n }", "public function getServices()\n {\n return $this->services;\n }", "public function getServices()\n {\n return $this->services;\n }", "public function getServices()\n {\n return $this->services;\n }", "public function saveSettings()\n {\n $this->store->save($this->data);\n }", "public function save()\n {\n if($this->changed) {\n Item::saveNewValues($this->id, $this->name, $this->status);\n } else {\n echo 'Nothing changed!';\n }\n }", "public function save_dates() {\n\t\t// Nothing to do here.\n\t}", "public function &getServices(): array {\n return $this->services;\n }", "public function getServices()\n\t{\n\t\t$senddata= array();\n\t\t$finalsenddata= array();\n\t\t$services = Contactuspage::get()->toArray();\n\t\tforeach($services as $key=>$service)\n\t\t{\n\t\t\t$senddata['id'] \t\t\t= $service['id'];\n\t\t\t$senddata['title'] \t\t\t= $service['title'];\n\t\t\t$senddata['content'] \t\t= $service['content'];\n\t\t\tarray_push($finalsenddata,$senddata);\n\t\t}\n\t\t$siteSettings = SiteSettings::find(1)->toArray();\n\t\t$data['status'] = 1;\n\t\t$data['msg'] = 'Successfull.';\n\t\t$data['heading_text'] = $siteSettings['service_header'];\n\t\t$data['data'] = $finalsenddata;\n\t\techo json_encode($data);\n\t}", "private function loadServices()\n {\n # Receive list of available service binary's\n exec(\"php composer.phar exec --list\", $services);\n $services = array_filter($services, function ($row) {\n return (substr($row, 0, 1) === '-' && strpos($row, 'service-')) &&\n (!strpos($row, 'service-manager')) &&\n (!strpos($row, 'service-socket'));\n });\n\n array_unshift($services, \"service-socket\");\n foreach ($services as $service) {\n $service = str_replace(\"- \", \"\", $service);\n $this->loadService($service);\n }\n }", "public function getServices()\n {\n return $this->pantonoServices;\n }", "public function services()\n {\n return $this->belongstomany(Service::class);\n }", "public function getServices() {\n return $this->services;\n }", "public function getServices() {\n return $this->services;\n }", "public static function get_services()\n {\n return [\n Pages\\Admin::class,\n Base\\Enqueue::class,\n Base\\CustomPostType::class,\n Base\\CustomMetaBox::class,\n Base\\Shortcode::class,\n Base\\Cron::class,\n ];\n }", "public function store(Request $request)\n {\n $service = new Services();\n\t\t$service->name = $request->input('name');\n\t\t$service->subname = $request->input('subname');\n\t\t$service->description = $request->input('description');\n\t\t$service->price = $request->input('price');\n\t\t$service->disponibility = $request->input('disponibility');\n\t\t$service->image = $request->input('image');\n\t\t$service->save();\n }", "public function save(iterable $toSave): void;" ]
[ "0.67092216", "0.66469413", "0.6508124", "0.64762366", "0.642712", "0.61602926", "0.60592383", "0.6048486", "0.59927267", "0.59487385", "0.5923953", "0.58666855", "0.5776853", "0.5774722", "0.57502913", "0.5748942", "0.57358444", "0.57256705", "0.5714027", "0.5699974", "0.5690524", "0.5677829", "0.5653866", "0.56323135", "0.5626029", "0.56052274", "0.5597842", "0.55814064", "0.55804044", "0.5553654", "0.5552239", "0.5486154", "0.54796976", "0.54710764", "0.54618925", "0.5453826", "0.5449708", "0.5437481", "0.54014516", "0.5392151", "0.53919816", "0.53660595", "0.5349753", "0.5326698", "0.53238213", "0.5322192", "0.53176457", "0.5315635", "0.5314477", "0.53124756", "0.53056186", "0.52994674", "0.5297746", "0.52971363", "0.5293068", "0.5291253", "0.52783215", "0.52586824", "0.52581674", "0.5255421", "0.5254861", "0.5238647", "0.52378386", "0.5232415", "0.5229645", "0.5221837", "0.5218377", "0.5216671", "0.521587", "0.5213219", "0.5209226", "0.51997834", "0.5198404", "0.51980543", "0.51966834", "0.51848996", "0.5183743", "0.51810414", "0.518064", "0.51793146", "0.5175178", "0.51570654", "0.5149666", "0.51482326", "0.51467943", "0.51467943", "0.51467943", "0.5137953", "0.5132828", "0.5129594", "0.51247174", "0.5120705", "0.51156527", "0.51121557", "0.5107616", "0.51067257", "0.51067257", "0.51062196", "0.5106164", "0.5104731" ]
0.65923405
2
/! \brief Prepare active services to be copied.
function resetCopyInfos() { $this->dn = 'new'; foreach ($this->plugins as &$plugin) { $plugin->resetCopyInfos(); } unset($plugin); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function initializeServices()\n {\n $this->emailManager = $this->getService('mycp.service.email_manager');\n $this->translatorService = $this->getService('translator');\n $this->securityService = $this->getService('Secure');\n $this->router = $this->getService('router');\n }", "public function prepare_deployment() {\n if ( wpsho_fr()->is__premium_only() ) {\n\n $this->clear_file_list();\n\n $this->create_s3_deployment_list(\n $this->_archiveName,\n $this->_archiveName,\n $this->_remotePath\n );\n\n echo 'SUCCESS';\n }\n }", "protected function prepareContainer()\n {\n $this -> container\n -> set('app', new InstanceService($this))\n -> set('config', new InstanceService($this -> config));\n }", "private function loadServices()\n {\n # Receive list of available service binary's\n exec(\"php composer.phar exec --list\", $services);\n $services = array_filter($services, function ($row) {\n return (substr($row, 0, 1) === '-' && strpos($row, 'service-')) &&\n (!strpos($row, 'service-manager')) &&\n (!strpos($row, 'service-socket'));\n });\n\n array_unshift($services, \"service-socket\");\n foreach ($services as $service) {\n $service = str_replace(\"- \", \"\", $service);\n $this->loadService($service);\n }\n }", "public function createServiceObjects() \n {\n var_dump('jj', Ini::$serviceConnections);\n //if (!empty(Ini::$serviceConnections)) \n //{\n foreach (Ini::$serviceConnections as $connectionName => $connectionDetail) \n {\n Ini::loadModule(Sysutils::Ucase($connectionDetail->type) . 'Service', 'Services', '\\Sys');\n $fqClassname = '\\\\Sys\\\\'. Sysutils::Ucase($connectionDetail->type) . 'Service';\n $this->autoLoadedServices[$connectionName] = array('url' => $connectionDetail->url, 'type' => $connectionDetail->type);\n $this->{$connectionName} = new $fqClassname($connectionDetail->url);\n }\n \n //}\n }", "public function __construct()\n {\n $this->services = [];\n }", "public function initialiseComponentsAndServices()\n {\n $this->imager;\n $this->imageOptimize;\n $this->staticCache;\n $this->csrfInjection;\n $this->assetsPlatform;\n $this->cpAlerts;\n $this->redisDebug;\n $this->localDev;\n $this->feedMe;\n $this->blitz;\n }", "public function copyFiles() {\n\n $customAction = File::get(__DIR__.'/../Services/stub/config/customAction.php.stub');\n\n $dbexporter = File::get(__DIR__.'/../Services/stub/config/dbexporter.php.stub');\n\n $pathCustom = config_path().'/customAction.php';\n\n $pathDbExporter = config_path().'/dbexporter.php';\n\n $this->createFile($pathCustom,$customAction);\n\n $this->createFile($pathDbExporter,$dbexporter);\n\n }", "private function bindServices()\n {\n // $this->app->singleton('package-blueprint-service', function ($app) {\n // return new FooService();\n // });\n }", "private function load_services() {\n\t\tforeach ( $this->get_services() as $service_classname ) {\n\t\t\t$this->load_service( $service_classname );\n\t\t}\n\t}", "function prepare() {\n\t\t\tcopy( \\Rum::config()->fixtures . '/Address Book.csv', __ROOT__ . '/app/data/Address Book.csv' );\n\t\t}", "function prepareForCopy() {\n\t\t$this->id = null;\n\t}", "public function buildingServices()\n {\n $this->template->set('global_setting', $this->global_setting);\n $this->template->set('page', 'building_services');\n $this->template->set_theme('default_theme');\n $this->template->set_layout('landing_page') \n ->set_partial('header', 'partials/lp_header')\n ->set_partial('footer', 'partials/lp_footer') \n ->title($this->global_setting['site_title'] . ' | Building Services');\n $this->template->build('frontpages/building_services');\n \n }", "private function copyStubsDirectory()\n {\n $path = $this->option('path');\n\n // if controller stub already exist\n if ($this->files->exists($path . DIRECTORY_SEPARATOR . 'controller.stub') && $this->option('force') === false) {\n $this->error(\"Stubs already exists! Run 'generate:publish-stubs --force' to override the stubs.\");\n die;\n }\n\n File::copyDirectory(__DIR__ . '/../../resources/stubs', $path);\n }", "private function appCopy()\n {\n global $boot;\n\n $boot->eol(1);\n $boot->echo('Adding Project: ' . $this->newName);\n\n foreach ($this->data as $n => $data) {\n $path = $this->rootDir . $data->generatePath;\n $boot->mkdir($path);\n $file = $this->rootDir . $data->generate;\n $content = '';\n\n if (!empty($data->templatePath)) {\n $content = file_get_contents($this->rootDir . $data->templatePath . $data->template);\n\n if (!empty($data->replace)) {\n $content = strtr($content, $data->replace);\n }\n file_put_contents($file, $content);\n }\n\n// $t = 1;\n\n if ($data->dirOnly && $data->sourceDir) {\n ZFileHelper::copyDirectory($this->rootDir . $data->sourceDir, $path);\n\n $source_path = ZFileHelper::findFiles($path);\n if (!empty($data->replace)) {\n foreach ($source_path as $inner_path) {\n $content = file_get_contents($inner_path);\n $content = strtr($content, $data->replace);\n file_put_contents($inner_path, $content);\n }\n }\n\n /*if (!$data->affectFileToo)\n continue;*/\n\n\n }\n\n }\n }", "function PKG_copyWait4accPackagesToClient($to,$from)\n{\n\tPKG_copyPackagesToClient($to,$from,\"wait4acc\");\n}", "public function prepare(): void\n {\n $this->processRunner->runAndReport(\n sprintf(\n 'git clone %s --depth 1 --single-branch --branch %s project/sylius',\n $this->getGitRepository(),\n $this->getVersion()\n )\n );\n $this->processRunner->runAndReport('composer install --working-dir project/sylius --no-dev --no-interaction');\n }", "private function initialiseServiceContainer()\n {\n // the response generated when remote-building\n // stored in the service container, so it can be returned clean, without things like debugbar adding to it\n LaravelSupport::registerScoped(\n Settings::SERVICE_CONTAINER_REMOTE_BUILD_RESPONSE,\n function () {\n return $this->remoteBuildResponse;\n }\n );\n }", "public function addContainerServices()\n {\n $this->replaceParamsObject();\n\n $this->addCommonServices();\n\n if ( $this->container->platform->isBackend() )\n {\n $this->addAdminServices();\n }\n else\n {\n $this->addSiteServices();\n }\n }", "public function __construct()\n {\n $this->Seat_Service = new Seat();\n $this->Permission_Service = new Permission();\n $this->User_Service = new UserService();\n $this->Contace_Service = new ContactList(); \n $this->Assessment_Service = new Assessment(); \n $this->Report_Service = new Report(); \n $this->student_paravalue_repo = new StudentParaValue();\n $this->student_para_repo = new StudentParameter(); \n $this->Utils = new Utils();\n }", "public function useProductionSSDServices() {\n\t\t$this->loadProductionUrls();\n\t\t$this->ssdConnector = \n\t\t\tnew SSDConnector(\n\t\t\t\t$this->tmpDir,\n\t\t\t\t$this->clientCert,\n\t\t\t\t$this->privateKey,\n\t\t\t\t$this->privateKeyPassword,\n\t\t\t\t$this->trustedCaChain);\n\t\t$this->wsConnector = $this->ssdConnector->getWsClient($this->wsdlUrl); \n\t\t$this->wsdl = $this->ssdConnector->getWSDL();\n\t}", "public function registerServices() {\n\t\t$services = $this->getServices();\n\t\t$services = array_map( [ $this, 'instantiateServices' ], $services );\n\t\t\n\t\tarray_walk( $services, function ( Service $service ) {\n\t\t\t$service->register();\n\t\t} );\n\t}", "public function startServices()\n\t{\n\t\t/** store service connections for use, as needed, by the application */\n\t\t$this->service_connection = array();\n\n\t\t/** store connection messages */\n\t\t$this->message = array();\n\n\t\t/** start services in this sequence */\n\t\t$services = simplexml_load_file(CONFIGURATION_FOLDER . '/Application/services.xml');\n\n\t\tforeach ($services->service as $item) {\n\t\t\t$connectionSucceeded = true;\n\t\t\t$connection = '';\n\n\t\t\t/** class name */\n\t\t\t$entry = (string)$item . 'Service';\n\t\t\t$folder = (string)$item;\n\t\t\t$serviceClass = 'Molajo\\\\Service\\\\Services\\\\' . $folder . '\\\\' . $entry;\n\n\t\t\t/** method name */\n\t\t\t$serviceMethod = 'getInstance';\n\n\t\t\t/** trap errors for missing class or method */\n\t\t\tif (class_exists($serviceClass)) {\n\t\t\t\tif (method_exists($serviceClass, $serviceMethod)) {\n\n\t\t\t\t} else {\n\t\t\t\t\t$connectionSucceeded = false;\n\t\t\t\t\t$connection = $serviceClass . '::' . $serviceMethod . ' Class Method does not exist';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$connectionSucceeded = false;\n\t\t\t\t$connection = $serviceClass . ' Class does not exist';\n\t\t\t}\n\n\t\t\t/** make service connection */\n\t\t\tif ($connectionSucceeded == true) {\n\t\t\t\ttry {\n\t\t\t\t\t$connection = $serviceClass::$serviceMethod();\n\n\t\t\t\t} catch (\\Exception $e) {\n\t\t\t\t\t$connectionSucceeded = false;\n\t\t\t\t\t$connection = 'Fatal Error: ' . $e->getMessage();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/** store connection or error message */\n\t\t\tif ($connectionSucceeded == false) {\n\t\t\t\techo 'service failed for ' . $entry . '<br />';\n\t\t\t}\n\t\t\t$this->set($entry, $connection, $connectionSucceeded);\n\n\t\t}\n\n\t\tforeach ($this->message as $message) {\n\t\t\tServices::Profiler()->set($message, LOG_OUTPUT_SERVICES, VERBOSE);\n\t\t}\n\n\t\treturn true;\n\t}", "protected function preparePrep()\n {\n $this->prepList = [];\n $this->invalidList = [];\n $this->rewind();\n if (array_key_exists('SellerSKUList.Id.1', $this->options)) {\n $this->options['Action'] = 'GetPrepInstructionsForSKU';\n $this->resetASINs();\n } elseif (array_key_exists('ASINList.Id.1', $this->options)) {\n $this->options['Action'] = 'GetPrepInstructionsForASIN';\n $this->resetSKUs();\n }\n }", "private function registerServices() {\n // Modules\n $this->addService('modules', 'MyTravel\\Core\\Service\\Modules::setService');\n // Routing\n $this->addService('routing', 'MyTravel\\Core\\Service\\Routing::setService');\n // Event dispatcher\n $this->serviceContainer\n ->register('events', 'Symfony\\Component\\EventDispatcher\\EventDispatcher');\n // Database\n $this->addService('db', 'MyTravel\\Core\\Service\\Db::setService');\n // Access\n $this->addService('access', 'MyTravel\\Core\\Service\\Access::setService');\n }", "public function run()\n {\n $services = [\n 'Hospital',\n 'Police',\n 'Water services',\n 'Public bus station',\n 'Market',\n 'Shops',\n 'Electrical supply',\n 'Primary school',\n 'Secondary school'\n ];\n\n for($i = 0; $i < count($services); $i++){\n $service = [\n 'name' => $services[$i],\n ];\n Utility::create($service);\n }\n }", "public function run()\n {\n $services = [\n [\"type\" =>'wifi'],\n [\"type\" =>'posto auto'],\n [\"type\" =>'piscina'],\n [\"type\" =>'sauna'],\n [\"type\" =>'vista mare'],\n [\"type\" =>'reception']\n ];\n \n foreach($services as $service){\n $newService = new Service;\n $newService -> fill($service) -> save();\n }\n }", "public function applyServices(Host $host): void;", "public function register_services(): void {\n\t\t// Bail early so we don't instantiate services twice.\n\t\tif ( \\count( $this->service_container ) > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Add the injector as the very first service.\n\t\t$this->service_container->put(\n\t\t\tstatic::SERVICE_PREFIX . static::INJECTOR_ID,\n\t\t\t$this->injector\n\t\t);\n\n\t\t$services = $this->get_service_classes();\n\n\t\tif ( $this->enable_filters ) {\n\t\t\t/**\n\t\t\t * Filter the default services that make up this plugin.\n\t\t\t *\n\t\t\t * This can be used to add services to the service container for\n\t\t\t * this plugin.\n\t\t\t *\n\t\t\t * @param array<string, string> $services Associative array of identifier =>\n\t\t\t * class mappings. The provided\n\t\t\t * classes need to implement the\n\t\t\t * Service interface.\n\t\t\t */\n\t\t\t$filtered_services = apply_filters(\n\t\t\t\tstatic::HOOK_PREFIX . static::SERVICES_FILTER,\n\t\t\t\t$services\n\t\t\t);\n\n\t\t\t$services = $this->validate_services( $filtered_services );\n\t\t}\n\n\t\twhile ( null !== key( $services ) ) {\n\t\t\t$id = $this->maybe_resolve( key( $services ) );\n\n\t\t\t$class = $this->maybe_resolve( current( $services ) );\n\n\t\t\t// Delay registering the service until all requirements are met.\n\t\t\tif (\n\t\t\t\tis_a( $class, HasRequirements::class, true )\n\t\t\t) {\n\t\t\t\tif ( ! $this->requirements_are_met( $id, $class, $services ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->schedule_potential_service_registration( $id, $class );\n\n\t\t\tnext( $services );\n\t\t}\n\t}", "function createServiceStatus(){\n\t\t\t$serviceStatusRepo = new serviceStatusRepository;\t\t\t\n\t\t\t$serviceStatusRepo->createServiceStatus($_POST['ServiceID'], $_POST['ServiceOwnerID'], $_POST['RequesterUserID']);\n\t\t}", "protected function postProcessCopyFromTemplate()\n {\n }", "public function run()\n {\n $service = new Service;\n $service = [\n [\n 'name' => 'Building Construction',\n 'img' => 'img/service-1.jpg',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec pretium mi. Curabitur facilisis \n ornare velit non vulputate. Aliquam metus tortor, auctor id gravida condimentum, viverra quis sem.',\n 'delay' => '0.1s'\n ],\n [\n 'name' => 'House Renovation',\n 'img' => 'img/service-2.jpg',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec pretium mi. Curabitur facilisis \n ornare velit non vulputate. Aliquam metus tortor, auctor id gravida condimentum, viverra quis sem.',\n 'delay' => '0.2s'\n ],\n [\n 'name' => 'Architecture Design',\n 'img' => 'img/service-3.jpg',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec pretium mi. Curabitur facilisis \n ornare velit non vulputate. Aliquam metus tortor, auctor id gravida condimentum, viverra quis sem.',\n 'delay' => '0.3s'\n ],\n [\n 'name' => 'Interior Design',\n 'img' => 'img/service-4.jpg',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec pretium mi. Curabitur facilisis \n ornare velit non vulputate. Aliquam metus tortor, auctor id gravida condimentum, viverra quis sem.',\n 'delay' => '0.4s'\n ],\n [\n 'name' => 'Fixing & Support',\n 'img' => 'img/service-5.jpg',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec pretium mi. Curabitur facilisis \n ornare velit non vulputate. Aliquam metus tortor, auctor id gravida condimentum, viverra quis sem.',\n 'delay' => '0.5s'\n ],\n [\n 'name' => 'Painting',\n 'img' => 'img/service-6.jpg',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec pretium mi. Curabitur facilisis \n ornare velit non vulputate. Aliquam metus tortor, auctor id gravida condimentum, viverra quis sem.',\n 'delay' => '0.6s'\n ],\n\n ];\n foreach ($service as $s) {\n Service::create($s);\n }\n }", "public function creating(Service $Service)\n {\n //code...\n }", "public function __construct()\r\n\t{\r\n\t\t// Services dont have constructors Apparently\r\n\t\t//parent::__construct();\r\n\t\t//\r\n\r\n\t}", "private static function loadServices() {\n\n Application::$services = array();\n\n $config = Application::getConfig();\n\n if ($handle = opendir($config[\"system\"][\"service-folder\"])) {\n\n /* Das ist der korrekte Weg, ein Verzeichnis zu durchlaufen. */\n while (false !== ($entry = readdir($handle))) {\n if ($entry != \".\" && $entry != \"..\") {\n require $config[\"system\"][\"service-folder\"] . \"/\" . $entry;\n $className = $config[\"system\"][\"namespace\"] . \"\\\\services\\\\\" . basename($entry,\".php\");\n $testClass = new \\ReflectionClass($className);\n if (!$testClass->isAbstract()) {\n Application::$services[basename($entry,\".php\")] = new $className();\n }\n\n }\n }\n closedir($handle);\n }\n }", "public function prepare()\n\t{\n\t\tcreateToken('admin-ssc');\n\t\t$this->adapter->prepare();\n\t}", "protected function executePreparation(InputInterface $input, OutputInterface $output)\n {\n /** @var ProjectorRegistry $projectorRegistry */\n $projectorRegistry = $this->getContainer()->get('sim.projector.registry');\n\n $projectorsToHandle = $this->generateProjectorList(\n $input->getArgument('projector'),\n $projectorRegistry\n );\n\n $output->writeln(\"\\n<info>Deleting old projections</info>\");\n $this->prepareProjectorsForRebuilding($projectorRegistry, $projectorsToHandle);\n $output->writeln(\"--------------------------------------------------------------------------------------------------------------------------------------------\");\n }", "public function registerServices()\n {\n /**\n * @var $container Container\n */\n $container = $this->getContainer();\n\n $services = $container->settings['services'];\n\n if (is_array($services) && !empty($services)) {\n foreach ($services as $service) {\n /**\n * @var $instance ServiceInterface\n */\n $instance = new $service();\n\n $container[$instance->name()] = $instance->register();\n\n unset($instance);\n }\n }\n\n unset($container, $services, $service);\n }", "public function restoreOriginalService(): void;", "public function __construct()\n {\n parent::__construct();\n\n $this->namespace = 'App\\Services\\\\';\n\n $this->scrappers = collect([\n 'Scrappers\\\\MangaStreamScrapper',\n 'Scrappers\\\\MangaPandaScrapper',\n 'Scrappers\\\\MangaFoxScrapper',\n 'Scrappers\\\\LeoMangaScrapper',\n 'Scrappers\\\\RawSenMangaScrapper',\n 'ApiScrappers\\\\TuMangaOnlineScrapper',\n ]);\n }", "public static function setServiceCredentials()\n {\n // Get all bound services\n $allBoundServices = collect(json_decode(getenv('VCAP_SERVICES'), true));\n\n collect(self::$services)->each(function ($service) use ($allBoundServices) {\n\n // Determine whether we have the specific service key\n // among all bound services.\n if ($allBoundServices->has($service['service_key'])) {\n\n // Collect from bound services under this service key\n $services = collect($allBoundServices->get($service['service_key']));\n\n // Get the specific bound service\n $boundService = collect($services->where('name', $service['service_name'])->first());\n\n // Save each credentials in .env file\n collect($service['env_mapping'])->each(function ($envKey, $credentialKey) use ($boundService) {\n self::saveValueToEnv(\n $envKey,\n collect($boundService->get('credentials'))->get($credentialKey)\n );\n });\n }\n });\n }", "public function run()\n {\n CarService::Create([\n 'name' => 'Oil change',\n ]);\n\n CarService::Create([\n 'name' => 'Tyres',\n ]);\n\n CarService::Create([\n 'name' => 'Suspension',\n ]);\n\n }", "public function __prepare()\n {\n $this->objectManager->create('Mage\\CatalogRule\\Test\\TestStep\\DeleteAllCatalogRulesStep')->run();\n }", "public function renderServices()\n {\n $this->template->services = $this->projectManager->getServices();\n }", "public function clone()\n {\n Az::debug($this->newName, 'cloning directories');\n $this->load(self::mode['clone']);\n\n $this->appCopy();\n\n // updating /service/ALL/App.php and\n // launch norms\n Az::$app->smart->service->serviceAdd($this->newName);\n\n Az::debug($this->newName, 'cloning DB & tables');\n $this->createDb();\n\n Az::debug($this->newName, 'excuting insert apply cmd');\n $this->insertCreateFunc();\n $this->insertCloneFolder();\n $this->insertApplyFunc();\n $this->fillDb();\n\n Az::debug($this->newName, 'excuting page run cmd');\n $this->callPageRunCmd();\n\n Az::debug($this->newName, 'adding domain name into hosts');\n $this->addDomainNameIntoHosts();\n\n Az::debug($this->newName, 'updating nginx');\n $this->updateNgnix(false);\n }", "public function run()\n {\n Service::create([\n 'name'=>'consultation'\n ]);\n Service::create([\n 'name'=>'operation'\n ]);\n }", "public function __construct()\n {\n $this->Service = new ContactsService();\n $this->GroupService = new GroupService();\n }", "public final function prep(){\n\n //disable apache from append session ids to requests\n ini_set('session.use_trans_sid',0);\n //only allow sessions to be used with cookies\n ini_set('session.use_only_cookies',1);\n\n //base directory of application\n //$this->path = dirname($_SERVER['DOCUMENT_ROOT']);\n $this->path = dirname(dirname(dirname(dirname(dirname(__DIR__)))));\n \n //load the appropriate application production configuration \n //and override with any dev config.\n if(is_file($this->path.'/.config.php')){\n $this->config = require($this->path.'/.config.php');\n if($this->config['APP_MODE']!='PROD' && is_file($this->path.'/.dev.config.php')){\n $this->config = array_merge($this->config,require($this->path.'/.dev.config.php'));\n }//if\n }//if\n \n //if the COMPOSER PATH isn't set then resort to the default installer path \"vendor/\"\n if(!isset($this->config['COMPOSER_PATH'])){\n $this->config['COMPOSER_PATH'] = 'vendor';\n }//if\n\n }", "private function prepareServices($client) {\n\n $this->service = new Google_Service_ShoppingContent($client);\n // Fetch the standard rootUrl and basePath to set things up\n // for sandbox creation.\n $class = new ReflectionClass('Google_Service_Resource');\n $rootProperty = $class->getProperty('rootUrl');\n $rootProperty->setAccessible(true);\n $pathProperty = $class->getProperty('servicePath');\n $pathProperty->setAccessible(true);\n $rootUrl = $rootProperty->getValue($this->service->accounts);\n $basePath = $pathProperty->getValue($this->service->accounts);\n\n // Attempt to determine a sandbox endpoint from the given endpoint.\n // If we can't, then fall back to using the same endpoint for\n // sandbox methods.\n $pathParts = explode('/', rtrim($basePath, '/'));\n\n if ($pathParts[count($pathParts) - 1] === 'v2.1') {\n $pathParts = array_slice($pathParts, 0, -1);\n $pathParts[] = $this->mode == 'sandbox'?'v2sandbox':'v2';\n $basePath = implode('/', $pathParts) . '/';\n } else {\n print 'Using same endpoint for sandbox methods.';\n }\n $this->requestService = $this->getServiceWithEndpoint($client, $rootUrl, $basePath);\n }", "function copyMultipleNonContainer($a_sources)\n\t{\n\t\tglobal $ilAccess,$objDefinition,$rbacsystem,$ilUser,$ilCtrl,$rbacreview;\n\n\n\t\tinclude_once('./Services/Link/classes/class.ilLink.php');\n\t\tinclude_once('Services/CopyWizard/classes/class.ilCopyWizardOptions.php');\n\n\t\t// check permissions\n\t\tforeach ($a_sources as $source_ref_id)\n\t\t{\n\t\t\t$source_type = ilObject::_lookupType($source_ref_id, true);\n\n\t\t\t// Create permission\n\t\t\tif(!$rbacsystem->checkAccess('create', $this->getTarget(), $source_type))\n\t\t\t{\n\t\t\t\tilUtil::sendFailure($this->lng->txt('permission_denied'),true);\n\t\t\t\t$ilCtrl->returnToParent($this);\n\t\t\t}\n\n\t\t\t// Copy permission\n\t\t\tif(!$ilAccess->checkAccess('copy','',$source_ref_id))\n\t\t\t{\n\t\t\t\tilUtil::sendFailure($this->lng->txt('permission_denied'),true);\n\t\t\t\t$ilCtrl->returnToParent($this);\n\t\t\t}\n\n\t\t\t// check that these objects are really not containers\n\t\t\tif($objDefinition->isContainer($source_type))\n\t\t\t{\n\t\t\t\tilUtil::sendFailure($this->lng->txt('cntr_container_only_on_their_own'),true);\n\t\t\t\t$ilCtrl->returnToParent($this);\n\t\t\t}\n\t\t}\n\n\t\treset($a_sources);\n\n\t\t// clone\n\t\tforeach ($a_sources as $source_ref_id)\n\t\t{\n\t\t\t// Save wizard options\n\t\t\t$copy_id = ilCopyWizardOptions::_allocateCopyId();\n\t\t\t$wizard_options = ilCopyWizardOptions::_getInstance($copy_id);\n\t\t\t$wizard_options->saveOwner($ilUser->getId());\n\t\t\t$wizard_options->saveRoot((int) $source_ref_id);\n\n\t\t\t$wizard_options->read();\n\n\t\t\t$orig = ilObjectFactory::getInstanceByRefId((int) $source_ref_id);\n\t\t\t$new_obj = $orig->cloneObject($this->getTarget(),$copy_id);\n\n\t\t\t// Delete wizard options\n\t\t\t$wizard_options->deleteAll();\n\n\t\t\t// rbac log\n\t\t\tinclude_once \"Services/AccessControl/classes/class.ilRbacLog.php\";\n\t\t\tif(ilRbacLog::isActive())\n\t\t\t{\n\t\t\t\t$rbac_log_roles = $rbacreview->getParentRoleIds($new_obj->getRefId(), false);\n\t\t\t\t$rbac_log = ilRbacLog::gatherFaPa($new_obj->getRefId(), array_keys($rbac_log_roles), true);\n\t\t\t\tilRbacLog::add(ilRbacLog::COPY_OBJECT, $new_obj->getRefId(), $rbac_log, (int)$source_ref_id);\n\t\t\t}\n\t\t}\n\n\t\tunset($_SESSION[\"clipboard\"][\"ref_ids\"]);\n\t\tunset($_SESSION[\"clipboard\"][\"cmd\"]);\n\n\t\tif (count($a_sources) == 1)\n\t\t{\n\t\t\tilUtil::sendSuccess($this->lng->txt(\"object_duplicated\"),true);\n\t\t\tilUtil::redirect(ilLink::_getLink($new_obj->getRefId()));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tilUtil::sendSuccess($this->lng->txt(\"objects_duplicated\"),true);\n\t\t\tilUtil::redirect(ilLink::_getLink($this->getTarget()));\n\t\t}\n\n\t}", "public function run()\n {\n //\n SystemService::create([\n 'nombre' => 'La carta mozo'\n ]);\n SystemService::create([\n 'nombre' => 'Delivery'\n ]);\n SystemService::create([\n 'nombre' => 'Reservas'\n ]);\n SystemService::create([\n 'nombre' => 'Marketing'\n ]);\n }", "public function prepareDeployment() {\n\t\t$bean = $this->unbox();\n\t\tif ($bean->id === 0) {\n\t\t\tR::store($this);\n\t\t}\n\t\t$config = Zend_Registry::get('config');\n\t\t$workdir = $config->directories->deployment;\n\t\t$oldumask = umask(0); \n\t\tif (!is_dir($workdir)) {\n\t\t\tmkdir($workdir, 0777, true);\n\t\t}\n\t\t$this->deploymentDir = $workdir . $this->id;\n\t\tif ($bean->type === 'rollback') {\n\t\t\t$this->queueTarget('RollbackPilot');\n\t\t\t$this->queueTarget('Rollback');\n\n\t\t\t$bean->rollback = false;\n\t\t} elseif ($bean->type === 'upgrade') {\n\t\t\t$this->queueTarget('UpgradePilot');\n\t\t\t$this->queueTarget('Upgrade');\n\n\t\t\t$bean->rollback = true;\n\t\t} else {\n\t\t\t$this->queueTarget('Deploy');\n\n\t\t\t$bean->rollback = true;\n\t\t}\n\t\t\n\t\tif (!is_dir($workdir . $bean->id)) {\n\t\t\tmkdir($workdir . $bean->id, 0777, true);\n\t\t}\n\t\tumask($oldumask);\n\t\t$this->writePropertiesFile($workdir . $bean->id . '/build.properties');\n\t\tR::store($this);\n\t}", "public function run()\n {\n\n $services = [\n 'Wi-fi',\n 'Posto macchina',\n 'Piscina',\n 'Animali',\n 'Vista mare',\n 'Sauna',\n 'Portineria',\n 'Cucina',\n 'Possibilità di fumare',\n 'Ascensore',\n 'Cassaforte',\n 'Tv',\n 'Aria condizionata',\n 'Kit di pronto-soccorso',\n 'Lavatrice'\n\n ];\n\n foreach ($services as $service) {\n \n $new_service = new Service();\n\n $new_service->name = $service;\n\n $new_service->save();\n\n }\n }", "public function register_services() {\n\t\t// Bail early so we don't instantiate services twice.\n\t\tif ( ! empty( $this->services ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$classes = $this->get_service_classes();\n\n\t\t$this->services = array_map(\n\t\t\t[ $this, 'instantiate_service' ],\n\t\t\t$classes\n\t\t);\n\n\t\tarray_walk( $this->services, function ( Service $service ) {\n\t\t\t$service->register();\n\t\t} );\n\t}", "protected function taskCopy(): void\n {\n try {\n $directory = $this->getDirectory();\n if (!$directory) {\n throw new RuntimeException('Not Found', 404);\n }\n\n $object = $this->getObject();\n if (!$object || !$object->exists() || !is_callable([$object, 'createCopy'])) {\n throw new RuntimeException('Not Found', 404);\n }\n\n // Pages are a special case.\n $parent = $object instanceof PageInterface ? $object->parent() : $object;\n $authorized = $parent instanceof FlexAuthorizeInterface\n ? $parent->isAuthorized('create', 'admin', $this->user)\n : $directory->isAuthorized('create', 'admin', $this->user);\n\n if (!$authorized || !$parent) {\n throw new RuntimeException($this->admin::translate('PLUGIN_ADMIN.INSUFFICIENT_PERMISSIONS_FOR_TASK') . ' copy.',\n 403);\n }\n\n if ($object instanceof PageInterface && is_array($this->data)) {\n $data = $this->data;\n $blueprints = $this->admin->blueprints('admin/pages/move');\n $blueprints->validate($data);\n $data = $blueprints->filter($data, true, true);\n // Hack for pages\n $data['name'] = $data['name'] ?? $object->template();\n $data['ordering'] = (int)$object->order() > 0;\n $data['order'] = null;\n if (isset($data['title'])) {\n $data['header']['title'] = $data['title'];\n unset($data['title']);\n }\n\n $object->order(false);\n $object->update($data);\n }\n\n $object = $object->createCopy();\n\n $this->admin->setMessage($this->admin::translate('PLUGIN_FLEX_OBJECTS.CONTROLLER.TASK_COPY_SUCCESS'));\n\n $this->setRedirect($this->getFlex()->adminRoute($object));\n\n } catch (RuntimeException $e) {\n $this->admin->setMessage($this->admin::translate(['PLUGIN_FLEX_OBJECTS.CONTROLLER.TASK_COPY_FAILURE', $e->getMessage()]), 'error');\n $this->setRedirect($this->referrerRoute->toString(true), 302);\n }\n }", "public function run()\n {\n $service_1 = Service::create([\n 'service_title' => 'Road Construction',\n 'service_slug' => 'road-construction',\n 'service_image' => '',\n 'service_description' => 'Business many variations of passages of psum availablesuffhuof passages offery Lorem Ipsumavailabmajority consectetur adipisicing elit, sed do eiusmod deartyre teididunt deartyre.'\n ]);\n\n $service_2 = Service::create([\n 'service_title' => 'Home Construction',\n 'service_slug' => 'home-construction',\n 'service_image' => '',\n 'service_description' => 'Business many variations of passages of psum availablesuffhuof passages offery Lorem Ipsumavailabmajority consectetur adipisicing elit, sed do eiusmod deartyre teididunt deartyre.'\n ]);\n\n $service_3 = Service::create([\n 'service_title' => 'Renovation',\n 'service_slug' => 'renovation',\n 'service_image' => '',\n 'service_description' => 'Business many variations of passages of psum availablesuffhuof passages offery Lorem Ipsumavailabmajority consectetur adipisicing elit, sed do eiusmod deartyre teididunt deartyre.'\n ]);\n }", "public function configure()\n {\n $this->container = require __DIR__ . '/../../config/configure-services.php';\n $this->scratchSpace = vfsStream::setup('scratch')->url();\n }", "public function servicos() {\n $this->load_template('servicos');\n }", "protected function prepareResources()\n {\n // Publish config\n $config = realpath(__DIR__.'/../config/config.php');\n\n $this->mergeConfigFrom($config, 'cartalyst.extensions');\n\n $this->publishes([\n $config => config_path('cartalyst.extensions.php'),\n ], 'config');\n }", "public function addService($args)\n {\n // echo \"<pre>\"; print_r($args); echo \"</pre>\"; exit;\n $repo = $this->entityManager->getRepository('ZSELEX_Entity_Bundle');\n $user_id = UserUtil::getVar('uid');\n if ($args ['service_status'] != 2) { // demo\n $shop_id = $args [\"shop_id\"];\n $quantity = $args [\"quantity\"];\n $bundle_id = $args [\"bundle_id\"];\n $top_bundle = 1;\n $timer_days = $args [\"timer_days\"];\n $service_status = 1;\n // $paidRunning = $repo->getCount(null, 'ZSELEX_Entity_ServiceBundle', 'service_bundle_id', array('a.shop' => $shop_id, 'a.bundle_type' => 'main', 'a.service_status' => 2));\n } else { // paid\n // $user_id = UserUtil::getVar('uid');\n if (!$user_id) {\n $user_id = $args [\"user_id\"];\n }\n $shop_id = $args [\"shop_id\"];\n $quantity = $args [\"quantity\"];\n $bundle_id = $args [\"bundle_id\"];\n $top_bundle = 1;\n $timer_days = $args [\"timer_days\"];\n $service_status = 2;\n\n // $repo->deleteEntity(null, 'ZSELEX_Entity_ServiceBundle', array('a.shop' => $shop_id, 'a.service_status' => 1));\n // $repo->deleteEntity(null, 'ZSELEX_Entity_ServiceShop', array('a.shop' => $shop_id, 'a.service_status' => 1));\n }\n\n // echo \"<pre>\"; print_r($args); echo \"</pre>\"; exit;\n\n $ownerInfo = ModUtil::apiFunc('ZSELEX', 'admin', 'getOwnerInfo',\n $args = array(\n 'shop_id' => $shop_id\n ));\n\n $owner_id = $ownerInfo ['user_id'];\n // $source = FormUtil::getPassedValue(\"source\");\n // echo \"<pre>\"; print_r($_POST); echo \"</pre>\"; exit;\n\n $bundle_detail = $repo->get(array(\n 'entity' => 'ZSELEX_Entity_Bundle',\n 'where' => array(\n 'a.bundle_id' => $bundle_id\n )\n ));\n\n // echo \"<pre>\";print_r($bundle_detail); echo \"</pre>\"; exit;\n\n $servicePrice = $bundle_detail [\"bundle_price\"];\n $bundle_type = $bundle_detail [\"bundle_type\"];\n $bundle_name = $bundle_detail [\"bundle_name\"];\n\n // $date = date(\"Y-m-d\");\n // $date = $args[\"timer_date\"];\n // echo $count; exit;\n // echo \"<pre>\"; print_r($main_bundle); echo \"</pre>\"; exit;\n $main_bundle = $repo->get(array(\n 'entity' => 'ZSELEX_Entity_ServiceBundle',\n 'fields' => array(\n 'a.service_bundle_id',\n 'a.timer_date',\n 'a.timer_days',\n 'b.bundle_id'\n ),\n 'joins' => array(\n 'JOIN a.bundle b'\n ),\n 'where' => array(\n 'a.bundle_type' => 'main',\n 'a.shop' => $shop_id\n )\n ));\n if (!$main_bundle) {\n return;\n }\n // echo \"<pre>\"; print_r($main_bundle); echo \"</pre>\"; exit;\n // if ($bundle == 1) {\n $values = array(\n 'bundle' => 1,\n 'service_status' => $service_status,\n 'user_id' => $user_id,\n 'owner_id' => $owner_id,\n 'shop_id' => $shop_id,\n // 'main_bundle' => $main_bundle['bundle_id'],\n 'timer_date' => $main_bundle ['timer_date']\n );\n\n $bundleitems = $repo->getAll(array(\n 'entity' => 'ZSELEX_Entity_BundleItem',\n 'fields' => array(\n 'a.id',\n 'b.bundle_id',\n 'a.service_name',\n 'a.servicetype',\n 'c.plugin_id',\n 'a.price',\n 'a.qty',\n 'a.qty_based'\n ),\n 'joins' => array(\n 'JOIN a.bundle b',\n 'LEFT JOIN a.plugin c'\n ),\n 'where' => array(\n 'a.bundle' => $bundle_id\n ),\n 'groupby' => 'a.id'\n ));\n\n // echo \"<pre>\"; print_r($bundleitems); echo \"</pre>\"; exit;\n $values ['quantity'] = $quantity;\n $values ['bundleitems'] = $bundleitems;\n $values ['timer_days'] = $main_bundle ['timer_days'];\n $values ['bundle_type'] = $bundle_type;\n $values ['bundle_id'] = $bundle_id;\n // $values['bundle_id'] = $main_bundle['bundle_id'];\n $values ['shop_id'] = $shop_id;\n $values ['service_status'] = $service_status;\n\n // echo \"<pre>\"; print_r($values);exit;\n $approvebundlesitems = $this->insertBundleItemsRepair($values);\n // }\n\n if ($service_status == 1) {\n LogUtil::registerStatus($this->__('Service configured for demo'));\n } else {\n LogUtil::registerStatus($this->__('Paid Service configured successfully'));\n return true;\n }\n return true;\n }", "function newService($action = \"\")\n {\n $this->closeDialogs();\n $serv = preg_replace('/^new_/', '', $action);\n $this->plugins[$serv]->is_account = TRUE;\n $this->dialogObject = $this->plugins[$serv];\n $this->current = $serv;\n $this->dialog = TRUE;\n }", "public function acquiaPreparePreProd($uuid, $environmentFrom, $environmentTo)\n {\n if ($environmentTo->name == 'prod') {\n throw new \\Exception('Use the db:backup and files:copy commands for the production environment.');\n }\n\n $this->backupAndMoveDbs($uuid, $environmentFrom, $environmentTo);\n $this->backupFiles($uuid, $environmentFrom, $environmentTo);\n }", "protected static function updateBootstrapping()\n {\n copy(__DIR__ . '/angular-stubs/main.ts', resource_path('assets/js/main.ts'));\n copy(__DIR__ . '/angular-stubs/app.module.ts', resource_path('assets/js/app.module.ts'));\n copy(__DIR__ . '/angular-stubs/environment.ts', resource_path('assets/js/environment.ts'));\n copy(__DIR__ . '/angular-stubs/tsconfig.json', resource_path('assets/js/tsconfig.json'));\n }", "protected function prepareResources()\n {\n // Publish config\n $config = realpath(__DIR__.'/../config/config.php');\n\n $this->mergeConfigFrom($config, 'cartalyst.sentinel');\n\n $this->publishes([\n $config => config_path('cartalyst.sentinel.php'),\n ], 'config');\n\n // Publish migrations\n $migrations = realpath(__DIR__.'/../migrations');\n\n $this->publishes([\n $migrations => $this->app->databasePath().'/migrations',\n ], 'migrations');\n }", "protected function registerServices()\n {\n\n $di = new FactoryDefault();\n\n /**\n * Read services\n */\n include CORE_PATH . \"/config/services.php\";\n\n /**\n * Get config service for use in inline setup below\n */\n $config = $di->getConfig();\n\n\n include CORE_PATH . '/config/loader.php';\n\n \n\n $this->setDI($di);\n }", "function preparePool()\n\t{\n\t\tinclude(\"/m23/inc/i18n/\".$GLOBALS[\"m23_language\"].\"/m23base.php\");\n\n\t\t$this->checkForDistributionSpecificPackageFunction('PKG_preparePool', $I18N_distrHasNoFunctionForPreparingAPool);\n\t\n\t\t// Check, if there are errors (some can be generated by set functions)\n\t\tif (!$this->hasErrors())\n\t\t{\n\t\t\tPKG_preparePool($this->getPoolRelease(), $this->getPoolDistribution(), $this->getPoolArch(), $this->getPoolName(), $this->getPoolDir());\n\t\t\treturn(true);\n\t\t}\n\t\telse\n\t\t\treturn(false);\n\t}", "function _prepare() {}", "public static function setUpBeforeClass(){\n printf(\"*********** TESTING CREATE SWAPP SERVICE **********\");\n }", "public static function duplicate($service) {\n\n $serviceid = $service->id;\n\n // duplicate service\n $newservice = ORM::forTable('service')->create();\n Admin::duplicateRecord($service, $newservice);\n $newservice->code = \"CHANGE\";\n $newservice->date = date(\"Y-m-d\");\n $newservice->visible = 0;\n $newservice->save();\n $newserviceid = $newservice->id();\n\n // duplicate destinations\n // create a map of old to new ids\n $destmap = array();\n $destinations = ORM::forTable('destination')->where('serviceid', $serviceid)->findMany();\n if ($destinations) {\n foreach ($destinations as $destination) {\n $newdestination = ORM::forTable('destination')->create();\n Admin::duplicateRecord($destination, $newdestination);\n $newdestination->serviceid = $newserviceid;\n $newdestination->save();\n $destmap[$destination->id] = $newdestination->id();\n }\n }\n\n // duplicate pricebandgroup\n // create a map of old to new ids\n $pbmap = array();\n $pricebandgroups = ORM::forTable('pricebandgroup')->where('serviceid', $serviceid)->findMany();\n if ($pricebandgroups) {\n foreach ($pricebandgroups as $pricebandgroup) {\n $newpricebandgroup = ORM::forTable('pricebandgroup')->create();\n $newpricebandgroup->serviceid = $newserviceid;\n $newpricebandgroup->name = $pricebandgroup->name;\n $newpricebandgroup->save();\n $pbmap[$pricebandgroup->id] = $newpricebandgroup->id();\n }\n }\n\n // duplicate joining\n $joinings = ORM::forTable('joining')->where('serviceid', $serviceid)->findMany();\n if ($joinings) {\n foreach ($joinings as $joining) {\n $newjoining = ORM::forTable('joining')->create();\n Admin::duplicateRecord($joining, $newjoining);\n $newjoining->serviceid = $newserviceid;\n if (empty($pbmap[$joining->pricebandgroupid])) {\n throw new Exception('No pricebandgroup mapping exists for id = ' . $joining->pricebandgroupid);\n }\n $newjoining->pricebandgroupid = $pbmap[$joining->pricebandgroupid];\n $newjoining->save();\n }\n }\n\n // duplicate pricebands\n $pricebands = ORM::forTable('priceband')->where('serviceid', $serviceid)->findMany();\n if ($pricebands) {\n foreach ($pricebands as $priceband) {\n if (empty($pbmap[$priceband->pricebandgroupid])) {\n throw new Exception('No pricebandgroup mapping exists for id = ' . $priceband->pricebandgroupid);\n }\n $newpriceband = ORM::forTable('priceband')->create();\n Admin::duplicateRecord($priceband, $newpriceband);\n $newpriceband->serviceid = $newserviceid;\n if (empty($destmap[$priceband->destinationid])) {\n throw new Exception('No destination mapping exists for id = ' . $priceband->destinationid);\n }\n $newpriceband->destinationid = $destmap[$priceband->destinationid];\n if (empty($pbmap[$priceband->pricebandgroupid])) {\n throw new Exception('No pricebandgroup mapping exists for id = ' . $priceband->pricebandgroupid);\n }\n $newpriceband->pricebandgroupid = $pbmap[$priceband->pricebandgroupid];\n $newpriceband->save();\n }\n }\n\n // duplicate limits\n $limits = ORM::forTable('limits')->where('serviceid', $serviceid)->findOne();\n if ($limits) {\n $newlimits = ORM::forTable('limits')->create();\n Admin::duplicateRecord($limits, $newlimits);\n $newlimits->serviceid = $newserviceid;\n $newlimits->save();\n }\n\n return $newservice;\n }", "private function copyResources()\n {\n $sResourcesDirectory = $this->getViewRootDirectory();\n $sResourcesDirectory = substr($sResourcesDirectory, 0, strrpos($sResourcesDirectory, 'View'));\n $sResourcesDirectory .= 'Resources' . DIRECTORY_SEPARATOR;\n\n // copy css\n foreach (glob($sResourcesDirectory . 'css/*') as $sResourceFile) {\n $sCopyPath = WWW_PATH . substr($sResourceFile, strlen($sResourcesDirectory));\n Directory::create(dirname($sCopyPath));\n copy($sResourceFile, $sCopyPath);\n }\n\n // copy js\n foreach (glob($sResourcesDirectory . 'js/*') as $sResourceFile) {\n $sCopyPath = WWW_PATH . substr($sResourceFile, strlen($sResourcesDirectory));\n Directory::create(dirname($sCopyPath));\n copy($sResourceFile, $sCopyPath);\n }\n }", "public static function beforeDeploy()\n {\n self::$logger = new \\Monolog\\Logger('phpunit');\n\n $dbConn = self::requireEnv('SYMFONY_CLOUDSQL_CONNECTION_NAME');\n $dbName = self::requireEnv('SYMFONY_DB_DATABASE');\n $dbPass = self::requireEnv('SYMFONY_DB_PASSWORD');\n\n // Create the Symfony project in a temporary directory\n $symfonyDir = self::createSymfonyProject();\n self::updateKernelCacheAndLogDir($symfonyDir);\n\n // copy and set the proper env vars in app.yaml\n $appYaml = file_get_contents(__DIR__ . '/../app.yaml');\n $appYaml = str_replace('# DATABASE_URL', 'DATABASE_URL', $appYaml);\n $appYaml = str_replace('DB_PASSWORD', $dbPass, $appYaml);\n $appYaml = str_replace('INSTANCE_CONNECTION_NAME', $dbConn, $appYaml);\n $appYaml = str_replace('symfonydb', $dbName, $appYaml);\n\n file_put_contents($symfonyDir . '/app.yaml', $appYaml);\n }", "public function testCreateService()\n {\n\n }", "public function __construct() {\n $this->atom = \\Drupal::service('ngdata.atomic.atom');\n $this->molecule = \\Drupal::service('ngdata.atomic.molecule');\n $this->organism = \\Drupal::service('ngdata.atomic.organism');\n $this->template = \\Drupal::service('ngdata.atomic.template');\n\n // $this->entityService = \\Drupal::service('ngdata.entity');\n }", "protected function setupBuiltInServices() {\n // generic services\n ServiceProviderInstaller::setup(new CacheServiceProvider());\n ServiceProviderInstaller::setup(new ConfigServiceProvider());\n ServiceProviderInstaller::setup(new DatabaseServiceProvider());\n ServiceProviderInstaller::setup(new FilesystemServiceProvider());\n ServiceProviderInstaller::setup(new LoggerServiceProvider());\n ServiceProviderInstaller::setup(new MiddlewareQueueServiceProvider());\n ServiceProviderInstaller::setup(new ModulesServiceProvider());\n ServiceProviderInstaller::setup(new RouterServiceProvider());\n ServiceProviderInstaller::setup(new SessionServiceProvider());\n ServiceProviderInstaller::setup(new TranslatorServiceProvider());\n ServiceProviderInstaller::setup(new UrlServiceProvider());\n ServiceProviderInstaller::setup(new VersionUriServiceProvider());\n ServiceProviderInstaller::setup(new VoltServiceProvider());\n // listener services\n $this->di->setShared('dispatcher.listener', new DispatcherListener());\n $this->di->setShared('router.listener', new RouterListener());\n $this->di->setShared('view.listener', new ViewListener());\n $this->di->setShared('db.listener', new DatabaseListener());\n // defaults\n $this->di->setShared('application', new MvcApplication());\n $this->di->setShared('dispatcher', DispatcherFactory::factory(/* module */''));\n $this->di->setShared('view', Factory::html());\n }", "public function run()\n {\n $faker = Faker::create();\n\n //LCService\n $data = new Service;\n $data->name \t\t = 'English Proficiency Test (EPT) for diploma and undergraduate students (S1)';\n $data->quantity \t = 'Each Person/Test';\n $data->cost = 25000;\n $data->created_at = Carbon::now();\n $data->updated_at = Carbon::now();\n $data->save();\n\n $data = new Service;\n $data->name \t\t = 'English Proficiency Test (EPT) for graduate students (S2)';\n $data->quantity \t = 'Each Person/Test';\n $data->cost = 125000;\n $data->created_at = Carbon::now();\n $data->updated_at = Carbon::now();\n $data->save();\n\n $data = new Service;\n $data->name \t\t = 'Executive class English course for graduate students (S2) and public';\n $data->quantity \t = 'Each Person/Test';\n $data->cost = 500000;\n $data->created_at = Carbon::now();\n $data->updated_at = Carbon::now();\n $data->save();\n\n $data = new Service;\n $data->name \t\t = 'Regular class English course for diploma and undergraduate students (S1)';\n $data->quantity \t = 'Each Person/Test';\n $data->cost = 300000;\n $data->created_at = Carbon::now();\n $data->updated_at = Carbon::now();\n $data->save();\n\n $data = new Service;\n $data->name \t\t = 'EPT Certificate legalization';\n $data->quantity \t = 'Each Sheet';\n $data->cost = 1500;\n $data->created_at = Carbon::now();\n $data->updated_at = Carbon::now();\n $data->save();\n\n $data = new Service;\n $data->name \t\t = 'Document translation, From English to Bahasa Indonesia';\n $data->quantity \t = 'Each finished page';\n $data->cost = 125000;\n $data->created_at = Carbon::now();\n $data->updated_at = Carbon::now();\n $data->save();\n\n $data = new Service;\n $data->name \t\t = 'Document translation, From Japanese to Bahasa Indonesia';\n $data->quantity \t = 'Each finished page';\n $data->cost = 200000;\n $data->created_at = Carbon::now();\n $data->updated_at = Carbon::now();\n $data->save();\n\n $data = new Service;\n $data->name \t\t = 'Document translation, From Chinese to Bahasa Indonesia';\n $data->quantity \t = 'Each finished page';\n $data->cost = 200000;\n $data->created_at = Carbon::now();\n $data->updated_at = Carbon::now();\n $data->save();\n\n $data = new Service;\n $data->name \t\t = 'Document translation, From Dutch to Bahasa Indonesia';\n $data->quantity \t = 'Each finished page';\n $data->cost = 200000;\n $data->created_at = Carbon::now();\n $data->updated_at = Carbon::now();\n $data->save();\n\n $data = new Service;\n $data->name \t\t = 'Document translation, From French to Bahasa Indonesia';\n $data->quantity \t = 'Each finished page';\n $data->cost = 145000;\n $data->created_at = Carbon::now();\n $data->updated_at = Carbon::now();\n $data->save();\n\n $data = new Service;\n $data->name \t\t = 'Document translation, From German to Bahasa Indonesia';\n $data->quantity \t = 'Each finished page';\n $data->cost = 145000;\n $data->created_at = Carbon::now();\n $data->updated_at = Carbon::now();\n $data->save();\n\n $data = new Service;\n $data->name \t\t = 'Document translation, From Other Languages to Bahasa Indonesia';\n $data->quantity \t = 'Each finished page';\n $data->cost = 145000;\n $data->created_at = Carbon::now();\n $data->updated_at = Carbon::now();\n $data->save();\n\n $data = new Service;\n $data->name \t\t = 'Document translation, From Bahasa Indonesia to English';\n $data->quantity \t = 'Each finished page';\n $data->cost = 125000;\n $data->created_at = Carbon::now();\n $data->updated_at = Carbon::now();\n $data->save();\n\n $data = new Service;\n $data->name \t\t = 'Document translation, From Bahasa Indonesia to Japanese';\n $data->quantity \t = 'Each finished page';\n $data->cost = 200000;\n $data->created_at = Carbon::now();\n $data->updated_at = Carbon::now();\n $data->save();\n\n $data = new Service;\n $data->name \t\t = 'Document translation, From Bahasa Indonesia to Chinese';\n $data->quantity \t = 'Each finished page';\n $data->cost = 125000;\n $data->created_at = Carbon::now();\n $data->updated_at = Carbon::now();\n $data->save();\n\n $data = new Service;\n $data->name \t\t = 'Document translation, From Bahasa Indonesia to Dutch';\n $data->quantity \t = 'Each finished page';\n $data->cost = 200000;\n $data->created_at = Carbon::now();\n $data->updated_at = Carbon::now();\n $data->save();\n\n $data = new Service;\n $data->name \t\t = 'Document translation, From Bahasa Indonesia to French';\n $data->quantity \t = 'Each finished page';\n $data->cost = 145000;\n $data->created_at = Carbon::now();\n $data->updated_at = Carbon::now();\n $data->save();\n\n $data = new Service;\n $data->name \t\t = 'Document translation, From Bahasa Indonesia to German';\n $data->quantity \t = 'Each finished page';\n $data->cost = 145000;\n $data->created_at = Carbon::now();\n $data->updated_at = Carbon::now();\n $data->save();\n\n $data = new Service;\n $data->name \t\t = 'Document translation, From Bahasa Indonesia to Other Languages';\n $data->quantity \t = 'Each finished page';\n $data->cost = 145000;\n $data->created_at = Carbon::now();\n $data->updated_at = Carbon::now();\n $data->save();\n }", "public function copySource()\n {\n $src = $this->pathToPackageRoot . 'publishable';\n $this->info('Copying publishable files...');\n if (!file_exists($src)) {\n $this->error(' #ERR2 [SKIP] ' . $src . ' does not exists');\n }\n $res = $this->filesystem->copyDirectory($src, base_path());\n\n\n $this->info('Update app/Kernel.php');\n }", "public static function copyEnv()\n {\n // Get VCAP_APPLICATION\n $vcapsApplication = json_decode(getenv('VCAP_APPLICATION'), true);\n // Copy env of the appropriate space\n if (isset($vcapsApplication['space_name'])) {\n copy(\n '.env.' . strtolower($vcapsApplication['space_name']),\n '.env'\n );\n }\n }", "private function prepareStandardWpInstallation()\n {\n $this->runWpCliCommand(\n 'core',\n 'download',\n array_merge([\n 'path' => $this->siteConfig->path,\n 'version' => $this->siteConfig->wpVersion,\n 'force' => null,\n ], $this->siteConfig->wpLocale ? [ 'locale' => $this->siteConfig->wpLocale ] : [])\n );\n\n $this->createConfigFile();\n }", "public function transfer_service_bookings($params='')\n {\n $this->load->model('admin/admin_model');\n $this->gen_contents['page_heading'] = 'Transfer Service Bookings';\n $this->gen_contents['tour_bookings'] = $this->admin_model->get_ts_bookings();\n //p($this->gen_contents['tour_bookings']); exit;\n //rendering page \n $this->template->set_template('admin');\n $this->template->write_view('content', 'admin/transfer-service-booking', $this->gen_contents);\n $this->template->render();\n }", "public function __construct() {\n $this->atom = \\Drupal::service('ngdata.atomic.atom');\n $this->molecule = \\Drupal::service('ngdata.atomic.molecule');\n $this->organism = \\Drupal::service('ngdata.atomic.organism');\n $this->template = \\Drupal::service('ngdata.atomic.template');\n $this->block = \\Drupal::service('ngdata.atomic.block');\n $this->blockgroup = \\Drupal::service('ngdata.atomic.blockgroup');\n }", "private function initService() {\n\t\t/** check if config->service exists */\n\t\t$config = $this->_config->get('config');\n\t\tif (!property_exists($config, 'service')) {\n\t\t\tthrow new Exception('Configuration file requires \"service\" filed');\n\t\t}\n\n $services = $config->service->toArray();\n\n /** inject service into Di container */\n foreach ($services as $name => $options) {\n \t$bootstarp = $this;\n \t$shared = $options['shared'] ? : FALSE;\n\n \t$this->_di->set($name, function() use ($bootstarp, $options) {\n \t\tif (!class_exists($options['lib'])) {\n \t\t\tthrow new Exception('Class \"' . $options['lib'] .'\" is not found');\n \t\t}\n\n \t\t/** check if there is a specify config file */\n \t\t$config = NULL;\n \t\tif (!empty($options['config'])) {\n\t\t\t\t\t/** get config */\n\t\t\t\t\t$config = $bootstarp->_config->get($options['config'])->toArray();\n \t\t}\n\n \t\t/** check if the class implements with the interface iService */\n \t\t$instance = new $options['lib']();\n \t\tif (!$instance instanceof iService) {\n \t\t\tthrow new Exception('class ' . $options['lib'] . ' not implements with interface iService');\n \t\t}\n\n \t\t/** init service */\n \t\treturn $instance->init($config);\n \t}, $shared);\n }\n\t}", "function PKG_copyPackagesToClient($to,$from,$status)\n{\n\tCHECK_FW(CC_clientname, $from, CC_jobstatusOrEmpty, $status, CC_clientname, $to);\n\n\tif (!empty($status))\n\t\t$add = \" AND `status` = '$status'\";\n\telse\n\t\t$add = \"\";\n\n\t$sql=\"SELECT * FROM `clientjobs` WHERE client='$from' $add\";\n\n\t$res = DB_query($sql); //FW ok\n\n\twhile( $data = mysql_fetch_array($res))\n\t\t{\n\t\t\t$iSQL=\"INSERT INTO `clientjobs` (`client` , `package` , `priority` , `status` , `params` , `normalPackage` , `installedSize` ) VALUES (\n\t\t\t'$to', '$data[package]', '$data[priority]', '$data[status]', '$data[params]', '$data[normalPackage]', '$data[installedSize]')\";\n\n\t\t\tDB_query($iSQL); //FW ok\n\t\t};\n}", "public function run()\n {\n $service = [\n [\n 'id' => 1,\n 'name' => 'Import XML',\n 'description' => 'Le service Import XML ',\n 'is_active' => true,\n 'status_message' => 'Le service Import XML est activé.',\n\n ],\n [\n 'id' => 2,\n 'name' => 'PTL',\n 'description' => 'Le service PTL ',\n 'is_active' => true,\n 'status_message' => 'Le service PTL est activé.',\n\n ],\n [\n 'id' => 3,\n 'name' => 'Tarif CSV',\n 'description' => 'Le service de génération du fichier Tarif CSV (VIALTO) ',\n 'is_active' => true,\n 'status_message' => 'Le service Tarif CSV est activé.',\n\n ],\n [\n 'id' => 4,\n 'name' => 'Plan. Doc',\n 'description' => 'Le service de documents XLS plannifiés. ',\n 'is_active' => true,\n 'status_message' => 'Le service de documents XLS plannifiés est activé.',\n\n ],\n\n ];\n\n Service::insert($service);\n }", "function create_service_map($soap) {\n foreach ($this->services as $service) {\n require_once($service . '.php');\n if (class_exists($service)) {\n $c = (string) $service; \n $object = new $c();\n $soap->addObjectMap($object, 'urn:php-islandora-soapservice');\n }\n else {\n $this->log->lwrite(\"Could not load class $service, check the config files list \n of services to make sure they are correct\", 'SOAP_SERVER', NULL, NULL, 'ERROR');\n }\n }\n }", "protected function accountsSetUp(): void\n\t{\n\t\t// Load the Accounts factory if it isn't already\n\t\tif (self::$accounts == null)\n\t\t{\n\t\t\t// Use the service in case it has been mocked\n\t\t\tself::$accounts = \\Config\\Services::accounts();\n\t\t}\n\n\t\t// Load Faker if it isn't already\n\t\tif (self::$faker == null)\n\t\t{\n\t\t\tself::$faker = \\Faker\\Factory::create();\n\t\t}\n\n\t\t// Make sure the cache is clean\n\t\t$this->accountsCache = [];\n\t}", "public function __construct(Payroll1Service $payroll1Service){\r\n $this->payroll1Service = $payroll1Service;\r\n }", "public function registerServices(){\n }", "public function projectContractPrepared()\n\t{\n\n\t}", "public static function prepare()\n {\n // static::startChromeDriver();\n }", "public function SetUpServiceBodies()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n $this->_service_bodies = array();\n \n // Basic error checking.\n if ($this->_my_server instanceof c_comdef_server) {\n // Start by getting the service bodies aggregator object.\n $bodies = $this->_my_server->GetServiceBodyArray();\n if (is_array($bodies) && count($bodies)) {\n foreach ($bodies as $body) {\n $key = $body->GetID();\n $this->_service_bodies[$key] = 0;\n }\n }\n }\n }", "public function insert_services($id_service, $id_reserve, $qty, $price, $desc, $tax, $tipo, $unit){\n $query=\"INSERT INTO `\".DB_PREFIX.\"serv_reserv` (`id`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`id_service`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`id_reserve`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`qty`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`price`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`comment`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`tax`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`tipo`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`unit`)\n \t\t\t\t\tVALUES ( NULL ,'\".$this->link->myesc($id_service).\"',\n\t\t\t\t\t'\".$this->link->myesc($id_reserve).\"',\n\t\t\t\t\t'\".$this->link->myesc($qty).\"',\n\t\t\t\t\t'\".$this->link->myesc($price).\"',\n\t\t\t\t\t'\".$this->link->myesc($desc).\"',\n\t\t\t\t\t'\".$this->link->myesc($tax).\"',\n\t\t\t\t\t'\".$this->link->myesc($tipo).\"',\n\t\t\t\t\t'\".$this->link->myesc($unit).\"')\";\n $result = $this->link->execute($query);\n return $result;\n\t}", "public function handle()\n {\n $fileName=ucwords(strtolower($this->argument('name'))); \n $serviceFileName = \"${fileName}Service.php\";\n\n $content =\n'<?php\n\nnamespace App\\Services;\n\nclass '.$fileName.'Service extends MainService\n{\n public function __construct()\n {\n //\n }\n\n /**\n * fetch all records\n *\n * @return Array $rtn\n */\n public function all(): array\n {\n //\n }\n\n /**\n * get one record.\n *\n * @param Int|Null $id\n * @return Array $rtn\n */\n public function get(int $id = null): array\n {\n //\n }\n\n /**\n * store a record \n *\n * @return Bool|'.$fileName.' $rtn\n */\n public function store()\n {\n //\n }\n\n /**\n * update a record\n *\n * @param Int $id\n * @return Bool|'.$fileName.' $rtn\n */\n public function update(int $id)\n {\n //\n }\n\n /**\n * destroy a record \n *\n * @param Int $id\n * @return Bool\n */\n public function destroy($id)\n {\n //\n }\n\n}';\n\n if ($this->confirm('Do you wish to create '.$fileName.' Service file?')) {\n $path=app_path();\n // $repositoryFile = $path.\"/Services/$serviceFileName\";\n // $interfaceFile = $path.\"/Interfaces/$interfaceFileName\";\n // $RepositoryDir = $path.\"/Repositories\";\n // $InterfaceDir = $path.\"/Interfaces\";\n\n $serviceFile = $path.\"/Services/$serviceFileName\";\n $serviceDir = $path.\"/Services\";\n\n if ($this->files->isDirectory($serviceDir)) {\n if ($this->files->isFile($serviceFile)) {\n return $this->error($fileName.' File Already exists!');\n }\n \n if (!$this->files->put($serviceFile, $content)) {\n return $this->error('Something went wrong!');\n }\n $this->info(\"$fileName generated!\");\n } else {\n $this->files->makeDirectory($serviceDir, 0777, true, true);\n\n if (!$this->files->put($serviceFile, $content)) {\n return $this->error('Something went wrong!');\n }\n \n $this->info(\"$fileName generated!\");\n }\n\n }\n }", "private static function add_actions() {\r\n\r\n\t\tif ( ! current_user_can( 'access_cp_pro' ) ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tself::add_action( 'cppro_get_assets_data', 'ConvertPlugServices::get_assets_data' );\r\n\r\n\t\tself::add_action( 'cppro_render_service_settings', 'ConvertPlugServices::render_settings' );\r\n\t\tself::add_action( 'cppro_save_service_settings', 'ConvertPlugServices::save_settings' );\r\n\t\tself::add_action( 'cppro_render_service_fields', 'ConvertPlugServices::render_fields' );\r\n\t\tself::add_action( 'cppro_connect_service', 'ConvertPlugServices::connect_service' );\r\n\t\tself::add_action( 'cppro_delete_service_account', 'ConvertPlugServices::delete_account' );\r\n\t\tself::add_action( 'cppro_render_service_accounts', 'ConvertPlugServices::render_service_accounts' );\r\n\t\tself::add_action( 'cppro_save_meta_settings', 'ConvertPlugServices::save_meta' );\r\n\r\n\t\tself::add_action( 'cppro_test_connection', 'ConvertPlugServices::test_connection' );\r\n\r\n\t}", "protected function setRawServices(array $services) {\n foreach ($services as $name => $service) {\n $this->di->setShared($name, $service);\n }\n }", "private function resetContainer()\n {\n // Synthetic services\n $kernel = Shopware()->Container()->get('kernel');\n $connection = Shopware()->Container()->get('db_connection');\n $application = Shopware()->Container()->get('application');\n\n Shopware()->Container()->reset();\n\n Shopware()->Container()->set('kernel', $kernel);\n Shopware()->Container()->set('db_connection', $connection);\n Shopware()->Container()->set('application', $application);\n }", "public static function register_services(): void\n {\n foreach (self::get_services() as $class) {\n $service = self::instantiate($class);\n if (method_exists($class, 'register')) {\n $service->register();\n }\n }\n }", "public function creating(Service $service)\n {\n $service->slug = Str::slug($service->name);\n }", "public function run()\n {\n $data = file_get_contents(\"database/Queries/services.json\");\n $services = json_decode($data, true);\n foreach ($services as $value) {\n Service::create([\n 'title' => $value['title'],\n 'description' => $value['description'],\n 'state' => $value['state']\n ]);\n }\n }", "public function registerServices() {\n\t\t$services = Config::inst()->get('FakeManager', 'services');\n\t\tif($services) {\n\t\t\tforeach($services as $origName => $fakeName) {\n\t\t\t\t$fakeObj = Injector::inst()->create($fakeName);\n\t\t\t\tif($this->db && $fakeObj instanceof FakeDatabaseConsumerInterface) {\n\t\t\t\t\t$fakeObj->setDb($this->db);\n\t\t\t\t}\n\t\t\t\t$this->services[$origName] = $fakeObj;\n\t\t\t\tInjector::inst()->registerService($fakeObj, $origName);\n\t\t\t}\n\t\t}\n\t}", "private function __construct( array $config=[] )\n\t{\n\t\t$this->services = $config;\n\t}", "public function registerServices($di)\n {\n // echo \"admin module registerServices....\";\n\n require_once '../apps/admin/config/services.php';\n }" ]
[ "0.562213", "0.55845654", "0.5512528", "0.5482004", "0.5406627", "0.5299918", "0.52158177", "0.5196003", "0.51228446", "0.51192963", "0.5075538", "0.5050376", "0.50496876", "0.50335145", "0.5028224", "0.5025981", "0.50161135", "0.49657443", "0.49565414", "0.49474058", "0.4938053", "0.49145588", "0.49126828", "0.49068227", "0.49007395", "0.48934296", "0.487905", "0.48780483", "0.487289", "0.4861826", "0.48591417", "0.48589954", "0.4855845", "0.48466665", "0.4844724", "0.48364523", "0.48272878", "0.48262885", "0.48121375", "0.4805152", "0.47810343", "0.4780913", "0.476614", "0.47615057", "0.47579968", "0.4757738", "0.47434747", "0.47405812", "0.47294205", "0.47187144", "0.47177738", "0.47089544", "0.470448", "0.46949923", "0.4692124", "0.46911675", "0.46899602", "0.46822408", "0.46787584", "0.46730572", "0.46675122", "0.46615642", "0.46614924", "0.46607536", "0.46581534", "0.46558908", "0.46489948", "0.4639961", "0.46286827", "0.46206707", "0.46182144", "0.46117502", "0.459706", "0.4595674", "0.4588526", "0.4584797", "0.45846444", "0.45832703", "0.45786402", "0.45710462", "0.4568395", "0.4568202", "0.45652518", "0.4564141", "0.45631838", "0.45611253", "0.45576322", "0.4556932", "0.45560873", "0.4548222", "0.45478684", "0.45468727", "0.45449054", "0.45417833", "0.45379588", "0.453748", "0.45293707", "0.45224237", "0.45212615", "0.45211813", "0.45208088" ]
0.0
-1
/! \brief Prepare active services to be copied.
function postCopyHook() { foreach ($this->plugins as &$plugin) { $plugin->postCopyHook(); } unset($plugin); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function initializeServices()\n {\n $this->emailManager = $this->getService('mycp.service.email_manager');\n $this->translatorService = $this->getService('translator');\n $this->securityService = $this->getService('Secure');\n $this->router = $this->getService('router');\n }", "public function prepare_deployment() {\n if ( wpsho_fr()->is__premium_only() ) {\n\n $this->clear_file_list();\n\n $this->create_s3_deployment_list(\n $this->_archiveName,\n $this->_archiveName,\n $this->_remotePath\n );\n\n echo 'SUCCESS';\n }\n }", "protected function prepareContainer()\n {\n $this -> container\n -> set('app', new InstanceService($this))\n -> set('config', new InstanceService($this -> config));\n }", "private function loadServices()\n {\n # Receive list of available service binary's\n exec(\"php composer.phar exec --list\", $services);\n $services = array_filter($services, function ($row) {\n return (substr($row, 0, 1) === '-' && strpos($row, 'service-')) &&\n (!strpos($row, 'service-manager')) &&\n (!strpos($row, 'service-socket'));\n });\n\n array_unshift($services, \"service-socket\");\n foreach ($services as $service) {\n $service = str_replace(\"- \", \"\", $service);\n $this->loadService($service);\n }\n }", "public function createServiceObjects() \n {\n var_dump('jj', Ini::$serviceConnections);\n //if (!empty(Ini::$serviceConnections)) \n //{\n foreach (Ini::$serviceConnections as $connectionName => $connectionDetail) \n {\n Ini::loadModule(Sysutils::Ucase($connectionDetail->type) . 'Service', 'Services', '\\Sys');\n $fqClassname = '\\\\Sys\\\\'. Sysutils::Ucase($connectionDetail->type) . 'Service';\n $this->autoLoadedServices[$connectionName] = array('url' => $connectionDetail->url, 'type' => $connectionDetail->type);\n $this->{$connectionName} = new $fqClassname($connectionDetail->url);\n }\n \n //}\n }", "public function __construct()\n {\n $this->services = [];\n }", "public function initialiseComponentsAndServices()\n {\n $this->imager;\n $this->imageOptimize;\n $this->staticCache;\n $this->csrfInjection;\n $this->assetsPlatform;\n $this->cpAlerts;\n $this->redisDebug;\n $this->localDev;\n $this->feedMe;\n $this->blitz;\n }", "public function copyFiles() {\n\n $customAction = File::get(__DIR__.'/../Services/stub/config/customAction.php.stub');\n\n $dbexporter = File::get(__DIR__.'/../Services/stub/config/dbexporter.php.stub');\n\n $pathCustom = config_path().'/customAction.php';\n\n $pathDbExporter = config_path().'/dbexporter.php';\n\n $this->createFile($pathCustom,$customAction);\n\n $this->createFile($pathDbExporter,$dbexporter);\n\n }", "private function bindServices()\n {\n // $this->app->singleton('package-blueprint-service', function ($app) {\n // return new FooService();\n // });\n }", "private function load_services() {\n\t\tforeach ( $this->get_services() as $service_classname ) {\n\t\t\t$this->load_service( $service_classname );\n\t\t}\n\t}", "function prepare() {\n\t\t\tcopy( \\Rum::config()->fixtures . '/Address Book.csv', __ROOT__ . '/app/data/Address Book.csv' );\n\t\t}", "function prepareForCopy() {\n\t\t$this->id = null;\n\t}", "public function buildingServices()\n {\n $this->template->set('global_setting', $this->global_setting);\n $this->template->set('page', 'building_services');\n $this->template->set_theme('default_theme');\n $this->template->set_layout('landing_page') \n ->set_partial('header', 'partials/lp_header')\n ->set_partial('footer', 'partials/lp_footer') \n ->title($this->global_setting['site_title'] . ' | Building Services');\n $this->template->build('frontpages/building_services');\n \n }", "private function copyStubsDirectory()\n {\n $path = $this->option('path');\n\n // if controller stub already exist\n if ($this->files->exists($path . DIRECTORY_SEPARATOR . 'controller.stub') && $this->option('force') === false) {\n $this->error(\"Stubs already exists! Run 'generate:publish-stubs --force' to override the stubs.\");\n die;\n }\n\n File::copyDirectory(__DIR__ . '/../../resources/stubs', $path);\n }", "private function appCopy()\n {\n global $boot;\n\n $boot->eol(1);\n $boot->echo('Adding Project: ' . $this->newName);\n\n foreach ($this->data as $n => $data) {\n $path = $this->rootDir . $data->generatePath;\n $boot->mkdir($path);\n $file = $this->rootDir . $data->generate;\n $content = '';\n\n if (!empty($data->templatePath)) {\n $content = file_get_contents($this->rootDir . $data->templatePath . $data->template);\n\n if (!empty($data->replace)) {\n $content = strtr($content, $data->replace);\n }\n file_put_contents($file, $content);\n }\n\n// $t = 1;\n\n if ($data->dirOnly && $data->sourceDir) {\n ZFileHelper::copyDirectory($this->rootDir . $data->sourceDir, $path);\n\n $source_path = ZFileHelper::findFiles($path);\n if (!empty($data->replace)) {\n foreach ($source_path as $inner_path) {\n $content = file_get_contents($inner_path);\n $content = strtr($content, $data->replace);\n file_put_contents($inner_path, $content);\n }\n }\n\n /*if (!$data->affectFileToo)\n continue;*/\n\n\n }\n\n }\n }", "function PKG_copyWait4accPackagesToClient($to,$from)\n{\n\tPKG_copyPackagesToClient($to,$from,\"wait4acc\");\n}", "public function prepare(): void\n {\n $this->processRunner->runAndReport(\n sprintf(\n 'git clone %s --depth 1 --single-branch --branch %s project/sylius',\n $this->getGitRepository(),\n $this->getVersion()\n )\n );\n $this->processRunner->runAndReport('composer install --working-dir project/sylius --no-dev --no-interaction');\n }", "private function initialiseServiceContainer()\n {\n // the response generated when remote-building\n // stored in the service container, so it can be returned clean, without things like debugbar adding to it\n LaravelSupport::registerScoped(\n Settings::SERVICE_CONTAINER_REMOTE_BUILD_RESPONSE,\n function () {\n return $this->remoteBuildResponse;\n }\n );\n }", "public function addContainerServices()\n {\n $this->replaceParamsObject();\n\n $this->addCommonServices();\n\n if ( $this->container->platform->isBackend() )\n {\n $this->addAdminServices();\n }\n else\n {\n $this->addSiteServices();\n }\n }", "public function __construct()\n {\n $this->Seat_Service = new Seat();\n $this->Permission_Service = new Permission();\n $this->User_Service = new UserService();\n $this->Contace_Service = new ContactList(); \n $this->Assessment_Service = new Assessment(); \n $this->Report_Service = new Report(); \n $this->student_paravalue_repo = new StudentParaValue();\n $this->student_para_repo = new StudentParameter(); \n $this->Utils = new Utils();\n }", "public function useProductionSSDServices() {\n\t\t$this->loadProductionUrls();\n\t\t$this->ssdConnector = \n\t\t\tnew SSDConnector(\n\t\t\t\t$this->tmpDir,\n\t\t\t\t$this->clientCert,\n\t\t\t\t$this->privateKey,\n\t\t\t\t$this->privateKeyPassword,\n\t\t\t\t$this->trustedCaChain);\n\t\t$this->wsConnector = $this->ssdConnector->getWsClient($this->wsdlUrl); \n\t\t$this->wsdl = $this->ssdConnector->getWSDL();\n\t}", "public function registerServices() {\n\t\t$services = $this->getServices();\n\t\t$services = array_map( [ $this, 'instantiateServices' ], $services );\n\t\t\n\t\tarray_walk( $services, function ( Service $service ) {\n\t\t\t$service->register();\n\t\t} );\n\t}", "public function startServices()\n\t{\n\t\t/** store service connections for use, as needed, by the application */\n\t\t$this->service_connection = array();\n\n\t\t/** store connection messages */\n\t\t$this->message = array();\n\n\t\t/** start services in this sequence */\n\t\t$services = simplexml_load_file(CONFIGURATION_FOLDER . '/Application/services.xml');\n\n\t\tforeach ($services->service as $item) {\n\t\t\t$connectionSucceeded = true;\n\t\t\t$connection = '';\n\n\t\t\t/** class name */\n\t\t\t$entry = (string)$item . 'Service';\n\t\t\t$folder = (string)$item;\n\t\t\t$serviceClass = 'Molajo\\\\Service\\\\Services\\\\' . $folder . '\\\\' . $entry;\n\n\t\t\t/** method name */\n\t\t\t$serviceMethod = 'getInstance';\n\n\t\t\t/** trap errors for missing class or method */\n\t\t\tif (class_exists($serviceClass)) {\n\t\t\t\tif (method_exists($serviceClass, $serviceMethod)) {\n\n\t\t\t\t} else {\n\t\t\t\t\t$connectionSucceeded = false;\n\t\t\t\t\t$connection = $serviceClass . '::' . $serviceMethod . ' Class Method does not exist';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$connectionSucceeded = false;\n\t\t\t\t$connection = $serviceClass . ' Class does not exist';\n\t\t\t}\n\n\t\t\t/** make service connection */\n\t\t\tif ($connectionSucceeded == true) {\n\t\t\t\ttry {\n\t\t\t\t\t$connection = $serviceClass::$serviceMethod();\n\n\t\t\t\t} catch (\\Exception $e) {\n\t\t\t\t\t$connectionSucceeded = false;\n\t\t\t\t\t$connection = 'Fatal Error: ' . $e->getMessage();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/** store connection or error message */\n\t\t\tif ($connectionSucceeded == false) {\n\t\t\t\techo 'service failed for ' . $entry . '<br />';\n\t\t\t}\n\t\t\t$this->set($entry, $connection, $connectionSucceeded);\n\n\t\t}\n\n\t\tforeach ($this->message as $message) {\n\t\t\tServices::Profiler()->set($message, LOG_OUTPUT_SERVICES, VERBOSE);\n\t\t}\n\n\t\treturn true;\n\t}", "protected function preparePrep()\n {\n $this->prepList = [];\n $this->invalidList = [];\n $this->rewind();\n if (array_key_exists('SellerSKUList.Id.1', $this->options)) {\n $this->options['Action'] = 'GetPrepInstructionsForSKU';\n $this->resetASINs();\n } elseif (array_key_exists('ASINList.Id.1', $this->options)) {\n $this->options['Action'] = 'GetPrepInstructionsForASIN';\n $this->resetSKUs();\n }\n }", "private function registerServices() {\n // Modules\n $this->addService('modules', 'MyTravel\\Core\\Service\\Modules::setService');\n // Routing\n $this->addService('routing', 'MyTravel\\Core\\Service\\Routing::setService');\n // Event dispatcher\n $this->serviceContainer\n ->register('events', 'Symfony\\Component\\EventDispatcher\\EventDispatcher');\n // Database\n $this->addService('db', 'MyTravel\\Core\\Service\\Db::setService');\n // Access\n $this->addService('access', 'MyTravel\\Core\\Service\\Access::setService');\n }", "public function run()\n {\n $services = [\n 'Hospital',\n 'Police',\n 'Water services',\n 'Public bus station',\n 'Market',\n 'Shops',\n 'Electrical supply',\n 'Primary school',\n 'Secondary school'\n ];\n\n for($i = 0; $i < count($services); $i++){\n $service = [\n 'name' => $services[$i],\n ];\n Utility::create($service);\n }\n }", "public function run()\n {\n $services = [\n [\"type\" =>'wifi'],\n [\"type\" =>'posto auto'],\n [\"type\" =>'piscina'],\n [\"type\" =>'sauna'],\n [\"type\" =>'vista mare'],\n [\"type\" =>'reception']\n ];\n \n foreach($services as $service){\n $newService = new Service;\n $newService -> fill($service) -> save();\n }\n }", "public function applyServices(Host $host): void;", "public function register_services(): void {\n\t\t// Bail early so we don't instantiate services twice.\n\t\tif ( \\count( $this->service_container ) > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Add the injector as the very first service.\n\t\t$this->service_container->put(\n\t\t\tstatic::SERVICE_PREFIX . static::INJECTOR_ID,\n\t\t\t$this->injector\n\t\t);\n\n\t\t$services = $this->get_service_classes();\n\n\t\tif ( $this->enable_filters ) {\n\t\t\t/**\n\t\t\t * Filter the default services that make up this plugin.\n\t\t\t *\n\t\t\t * This can be used to add services to the service container for\n\t\t\t * this plugin.\n\t\t\t *\n\t\t\t * @param array<string, string> $services Associative array of identifier =>\n\t\t\t * class mappings. The provided\n\t\t\t * classes need to implement the\n\t\t\t * Service interface.\n\t\t\t */\n\t\t\t$filtered_services = apply_filters(\n\t\t\t\tstatic::HOOK_PREFIX . static::SERVICES_FILTER,\n\t\t\t\t$services\n\t\t\t);\n\n\t\t\t$services = $this->validate_services( $filtered_services );\n\t\t}\n\n\t\twhile ( null !== key( $services ) ) {\n\t\t\t$id = $this->maybe_resolve( key( $services ) );\n\n\t\t\t$class = $this->maybe_resolve( current( $services ) );\n\n\t\t\t// Delay registering the service until all requirements are met.\n\t\t\tif (\n\t\t\t\tis_a( $class, HasRequirements::class, true )\n\t\t\t) {\n\t\t\t\tif ( ! $this->requirements_are_met( $id, $class, $services ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->schedule_potential_service_registration( $id, $class );\n\n\t\t\tnext( $services );\n\t\t}\n\t}", "function createServiceStatus(){\n\t\t\t$serviceStatusRepo = new serviceStatusRepository;\t\t\t\n\t\t\t$serviceStatusRepo->createServiceStatus($_POST['ServiceID'], $_POST['ServiceOwnerID'], $_POST['RequesterUserID']);\n\t\t}", "protected function postProcessCopyFromTemplate()\n {\n }", "public function run()\n {\n $service = new Service;\n $service = [\n [\n 'name' => 'Building Construction',\n 'img' => 'img/service-1.jpg',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec pretium mi. Curabitur facilisis \n ornare velit non vulputate. Aliquam metus tortor, auctor id gravida condimentum, viverra quis sem.',\n 'delay' => '0.1s'\n ],\n [\n 'name' => 'House Renovation',\n 'img' => 'img/service-2.jpg',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec pretium mi. Curabitur facilisis \n ornare velit non vulputate. Aliquam metus tortor, auctor id gravida condimentum, viverra quis sem.',\n 'delay' => '0.2s'\n ],\n [\n 'name' => 'Architecture Design',\n 'img' => 'img/service-3.jpg',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec pretium mi. Curabitur facilisis \n ornare velit non vulputate. Aliquam metus tortor, auctor id gravida condimentum, viverra quis sem.',\n 'delay' => '0.3s'\n ],\n [\n 'name' => 'Interior Design',\n 'img' => 'img/service-4.jpg',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec pretium mi. Curabitur facilisis \n ornare velit non vulputate. Aliquam metus tortor, auctor id gravida condimentum, viverra quis sem.',\n 'delay' => '0.4s'\n ],\n [\n 'name' => 'Fixing & Support',\n 'img' => 'img/service-5.jpg',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec pretium mi. Curabitur facilisis \n ornare velit non vulputate. Aliquam metus tortor, auctor id gravida condimentum, viverra quis sem.',\n 'delay' => '0.5s'\n ],\n [\n 'name' => 'Painting',\n 'img' => 'img/service-6.jpg',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec pretium mi. Curabitur facilisis \n ornare velit non vulputate. Aliquam metus tortor, auctor id gravida condimentum, viverra quis sem.',\n 'delay' => '0.6s'\n ],\n\n ];\n foreach ($service as $s) {\n Service::create($s);\n }\n }", "public function creating(Service $Service)\n {\n //code...\n }", "public function __construct()\r\n\t{\r\n\t\t// Services dont have constructors Apparently\r\n\t\t//parent::__construct();\r\n\t\t//\r\n\r\n\t}", "private static function loadServices() {\n\n Application::$services = array();\n\n $config = Application::getConfig();\n\n if ($handle = opendir($config[\"system\"][\"service-folder\"])) {\n\n /* Das ist der korrekte Weg, ein Verzeichnis zu durchlaufen. */\n while (false !== ($entry = readdir($handle))) {\n if ($entry != \".\" && $entry != \"..\") {\n require $config[\"system\"][\"service-folder\"] . \"/\" . $entry;\n $className = $config[\"system\"][\"namespace\"] . \"\\\\services\\\\\" . basename($entry,\".php\");\n $testClass = new \\ReflectionClass($className);\n if (!$testClass->isAbstract()) {\n Application::$services[basename($entry,\".php\")] = new $className();\n }\n\n }\n }\n closedir($handle);\n }\n }", "public function prepare()\n\t{\n\t\tcreateToken('admin-ssc');\n\t\t$this->adapter->prepare();\n\t}", "protected function executePreparation(InputInterface $input, OutputInterface $output)\n {\n /** @var ProjectorRegistry $projectorRegistry */\n $projectorRegistry = $this->getContainer()->get('sim.projector.registry');\n\n $projectorsToHandle = $this->generateProjectorList(\n $input->getArgument('projector'),\n $projectorRegistry\n );\n\n $output->writeln(\"\\n<info>Deleting old projections</info>\");\n $this->prepareProjectorsForRebuilding($projectorRegistry, $projectorsToHandle);\n $output->writeln(\"--------------------------------------------------------------------------------------------------------------------------------------------\");\n }", "public function registerServices()\n {\n /**\n * @var $container Container\n */\n $container = $this->getContainer();\n\n $services = $container->settings['services'];\n\n if (is_array($services) && !empty($services)) {\n foreach ($services as $service) {\n /**\n * @var $instance ServiceInterface\n */\n $instance = new $service();\n\n $container[$instance->name()] = $instance->register();\n\n unset($instance);\n }\n }\n\n unset($container, $services, $service);\n }", "public function restoreOriginalService(): void;", "public function __construct()\n {\n parent::__construct();\n\n $this->namespace = 'App\\Services\\\\';\n\n $this->scrappers = collect([\n 'Scrappers\\\\MangaStreamScrapper',\n 'Scrappers\\\\MangaPandaScrapper',\n 'Scrappers\\\\MangaFoxScrapper',\n 'Scrappers\\\\LeoMangaScrapper',\n 'Scrappers\\\\RawSenMangaScrapper',\n 'ApiScrappers\\\\TuMangaOnlineScrapper',\n ]);\n }", "public static function setServiceCredentials()\n {\n // Get all bound services\n $allBoundServices = collect(json_decode(getenv('VCAP_SERVICES'), true));\n\n collect(self::$services)->each(function ($service) use ($allBoundServices) {\n\n // Determine whether we have the specific service key\n // among all bound services.\n if ($allBoundServices->has($service['service_key'])) {\n\n // Collect from bound services under this service key\n $services = collect($allBoundServices->get($service['service_key']));\n\n // Get the specific bound service\n $boundService = collect($services->where('name', $service['service_name'])->first());\n\n // Save each credentials in .env file\n collect($service['env_mapping'])->each(function ($envKey, $credentialKey) use ($boundService) {\n self::saveValueToEnv(\n $envKey,\n collect($boundService->get('credentials'))->get($credentialKey)\n );\n });\n }\n });\n }", "public function run()\n {\n CarService::Create([\n 'name' => 'Oil change',\n ]);\n\n CarService::Create([\n 'name' => 'Tyres',\n ]);\n\n CarService::Create([\n 'name' => 'Suspension',\n ]);\n\n }", "public function __prepare()\n {\n $this->objectManager->create('Mage\\CatalogRule\\Test\\TestStep\\DeleteAllCatalogRulesStep')->run();\n }", "public function renderServices()\n {\n $this->template->services = $this->projectManager->getServices();\n }", "public function clone()\n {\n Az::debug($this->newName, 'cloning directories');\n $this->load(self::mode['clone']);\n\n $this->appCopy();\n\n // updating /service/ALL/App.php and\n // launch norms\n Az::$app->smart->service->serviceAdd($this->newName);\n\n Az::debug($this->newName, 'cloning DB & tables');\n $this->createDb();\n\n Az::debug($this->newName, 'excuting insert apply cmd');\n $this->insertCreateFunc();\n $this->insertCloneFolder();\n $this->insertApplyFunc();\n $this->fillDb();\n\n Az::debug($this->newName, 'excuting page run cmd');\n $this->callPageRunCmd();\n\n Az::debug($this->newName, 'adding domain name into hosts');\n $this->addDomainNameIntoHosts();\n\n Az::debug($this->newName, 'updating nginx');\n $this->updateNgnix(false);\n }", "public function run()\n {\n Service::create([\n 'name'=>'consultation'\n ]);\n Service::create([\n 'name'=>'operation'\n ]);\n }", "public function __construct()\n {\n $this->Service = new ContactsService();\n $this->GroupService = new GroupService();\n }", "public final function prep(){\n\n //disable apache from append session ids to requests\n ini_set('session.use_trans_sid',0);\n //only allow sessions to be used with cookies\n ini_set('session.use_only_cookies',1);\n\n //base directory of application\n //$this->path = dirname($_SERVER['DOCUMENT_ROOT']);\n $this->path = dirname(dirname(dirname(dirname(dirname(__DIR__)))));\n \n //load the appropriate application production configuration \n //and override with any dev config.\n if(is_file($this->path.'/.config.php')){\n $this->config = require($this->path.'/.config.php');\n if($this->config['APP_MODE']!='PROD' && is_file($this->path.'/.dev.config.php')){\n $this->config = array_merge($this->config,require($this->path.'/.dev.config.php'));\n }//if\n }//if\n \n //if the COMPOSER PATH isn't set then resort to the default installer path \"vendor/\"\n if(!isset($this->config['COMPOSER_PATH'])){\n $this->config['COMPOSER_PATH'] = 'vendor';\n }//if\n\n }", "private function prepareServices($client) {\n\n $this->service = new Google_Service_ShoppingContent($client);\n // Fetch the standard rootUrl and basePath to set things up\n // for sandbox creation.\n $class = new ReflectionClass('Google_Service_Resource');\n $rootProperty = $class->getProperty('rootUrl');\n $rootProperty->setAccessible(true);\n $pathProperty = $class->getProperty('servicePath');\n $pathProperty->setAccessible(true);\n $rootUrl = $rootProperty->getValue($this->service->accounts);\n $basePath = $pathProperty->getValue($this->service->accounts);\n\n // Attempt to determine a sandbox endpoint from the given endpoint.\n // If we can't, then fall back to using the same endpoint for\n // sandbox methods.\n $pathParts = explode('/', rtrim($basePath, '/'));\n\n if ($pathParts[count($pathParts) - 1] === 'v2.1') {\n $pathParts = array_slice($pathParts, 0, -1);\n $pathParts[] = $this->mode == 'sandbox'?'v2sandbox':'v2';\n $basePath = implode('/', $pathParts) . '/';\n } else {\n print 'Using same endpoint for sandbox methods.';\n }\n $this->requestService = $this->getServiceWithEndpoint($client, $rootUrl, $basePath);\n }", "function copyMultipleNonContainer($a_sources)\n\t{\n\t\tglobal $ilAccess,$objDefinition,$rbacsystem,$ilUser,$ilCtrl,$rbacreview;\n\n\n\t\tinclude_once('./Services/Link/classes/class.ilLink.php');\n\t\tinclude_once('Services/CopyWizard/classes/class.ilCopyWizardOptions.php');\n\n\t\t// check permissions\n\t\tforeach ($a_sources as $source_ref_id)\n\t\t{\n\t\t\t$source_type = ilObject::_lookupType($source_ref_id, true);\n\n\t\t\t// Create permission\n\t\t\tif(!$rbacsystem->checkAccess('create', $this->getTarget(), $source_type))\n\t\t\t{\n\t\t\t\tilUtil::sendFailure($this->lng->txt('permission_denied'),true);\n\t\t\t\t$ilCtrl->returnToParent($this);\n\t\t\t}\n\n\t\t\t// Copy permission\n\t\t\tif(!$ilAccess->checkAccess('copy','',$source_ref_id))\n\t\t\t{\n\t\t\t\tilUtil::sendFailure($this->lng->txt('permission_denied'),true);\n\t\t\t\t$ilCtrl->returnToParent($this);\n\t\t\t}\n\n\t\t\t// check that these objects are really not containers\n\t\t\tif($objDefinition->isContainer($source_type))\n\t\t\t{\n\t\t\t\tilUtil::sendFailure($this->lng->txt('cntr_container_only_on_their_own'),true);\n\t\t\t\t$ilCtrl->returnToParent($this);\n\t\t\t}\n\t\t}\n\n\t\treset($a_sources);\n\n\t\t// clone\n\t\tforeach ($a_sources as $source_ref_id)\n\t\t{\n\t\t\t// Save wizard options\n\t\t\t$copy_id = ilCopyWizardOptions::_allocateCopyId();\n\t\t\t$wizard_options = ilCopyWizardOptions::_getInstance($copy_id);\n\t\t\t$wizard_options->saveOwner($ilUser->getId());\n\t\t\t$wizard_options->saveRoot((int) $source_ref_id);\n\n\t\t\t$wizard_options->read();\n\n\t\t\t$orig = ilObjectFactory::getInstanceByRefId((int) $source_ref_id);\n\t\t\t$new_obj = $orig->cloneObject($this->getTarget(),$copy_id);\n\n\t\t\t// Delete wizard options\n\t\t\t$wizard_options->deleteAll();\n\n\t\t\t// rbac log\n\t\t\tinclude_once \"Services/AccessControl/classes/class.ilRbacLog.php\";\n\t\t\tif(ilRbacLog::isActive())\n\t\t\t{\n\t\t\t\t$rbac_log_roles = $rbacreview->getParentRoleIds($new_obj->getRefId(), false);\n\t\t\t\t$rbac_log = ilRbacLog::gatherFaPa($new_obj->getRefId(), array_keys($rbac_log_roles), true);\n\t\t\t\tilRbacLog::add(ilRbacLog::COPY_OBJECT, $new_obj->getRefId(), $rbac_log, (int)$source_ref_id);\n\t\t\t}\n\t\t}\n\n\t\tunset($_SESSION[\"clipboard\"][\"ref_ids\"]);\n\t\tunset($_SESSION[\"clipboard\"][\"cmd\"]);\n\n\t\tif (count($a_sources) == 1)\n\t\t{\n\t\t\tilUtil::sendSuccess($this->lng->txt(\"object_duplicated\"),true);\n\t\t\tilUtil::redirect(ilLink::_getLink($new_obj->getRefId()));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tilUtil::sendSuccess($this->lng->txt(\"objects_duplicated\"),true);\n\t\t\tilUtil::redirect(ilLink::_getLink($this->getTarget()));\n\t\t}\n\n\t}", "public function run()\n {\n //\n SystemService::create([\n 'nombre' => 'La carta mozo'\n ]);\n SystemService::create([\n 'nombre' => 'Delivery'\n ]);\n SystemService::create([\n 'nombre' => 'Reservas'\n ]);\n SystemService::create([\n 'nombre' => 'Marketing'\n ]);\n }", "public function prepareDeployment() {\n\t\t$bean = $this->unbox();\n\t\tif ($bean->id === 0) {\n\t\t\tR::store($this);\n\t\t}\n\t\t$config = Zend_Registry::get('config');\n\t\t$workdir = $config->directories->deployment;\n\t\t$oldumask = umask(0); \n\t\tif (!is_dir($workdir)) {\n\t\t\tmkdir($workdir, 0777, true);\n\t\t}\n\t\t$this->deploymentDir = $workdir . $this->id;\n\t\tif ($bean->type === 'rollback') {\n\t\t\t$this->queueTarget('RollbackPilot');\n\t\t\t$this->queueTarget('Rollback');\n\n\t\t\t$bean->rollback = false;\n\t\t} elseif ($bean->type === 'upgrade') {\n\t\t\t$this->queueTarget('UpgradePilot');\n\t\t\t$this->queueTarget('Upgrade');\n\n\t\t\t$bean->rollback = true;\n\t\t} else {\n\t\t\t$this->queueTarget('Deploy');\n\n\t\t\t$bean->rollback = true;\n\t\t}\n\t\t\n\t\tif (!is_dir($workdir . $bean->id)) {\n\t\t\tmkdir($workdir . $bean->id, 0777, true);\n\t\t}\n\t\tumask($oldumask);\n\t\t$this->writePropertiesFile($workdir . $bean->id . '/build.properties');\n\t\tR::store($this);\n\t}", "public function run()\n {\n\n $services = [\n 'Wi-fi',\n 'Posto macchina',\n 'Piscina',\n 'Animali',\n 'Vista mare',\n 'Sauna',\n 'Portineria',\n 'Cucina',\n 'Possibilità di fumare',\n 'Ascensore',\n 'Cassaforte',\n 'Tv',\n 'Aria condizionata',\n 'Kit di pronto-soccorso',\n 'Lavatrice'\n\n ];\n\n foreach ($services as $service) {\n \n $new_service = new Service();\n\n $new_service->name = $service;\n\n $new_service->save();\n\n }\n }", "public function register_services() {\n\t\t// Bail early so we don't instantiate services twice.\n\t\tif ( ! empty( $this->services ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$classes = $this->get_service_classes();\n\n\t\t$this->services = array_map(\n\t\t\t[ $this, 'instantiate_service' ],\n\t\t\t$classes\n\t\t);\n\n\t\tarray_walk( $this->services, function ( Service $service ) {\n\t\t\t$service->register();\n\t\t} );\n\t}", "protected function taskCopy(): void\n {\n try {\n $directory = $this->getDirectory();\n if (!$directory) {\n throw new RuntimeException('Not Found', 404);\n }\n\n $object = $this->getObject();\n if (!$object || !$object->exists() || !is_callable([$object, 'createCopy'])) {\n throw new RuntimeException('Not Found', 404);\n }\n\n // Pages are a special case.\n $parent = $object instanceof PageInterface ? $object->parent() : $object;\n $authorized = $parent instanceof FlexAuthorizeInterface\n ? $parent->isAuthorized('create', 'admin', $this->user)\n : $directory->isAuthorized('create', 'admin', $this->user);\n\n if (!$authorized || !$parent) {\n throw new RuntimeException($this->admin::translate('PLUGIN_ADMIN.INSUFFICIENT_PERMISSIONS_FOR_TASK') . ' copy.',\n 403);\n }\n\n if ($object instanceof PageInterface && is_array($this->data)) {\n $data = $this->data;\n $blueprints = $this->admin->blueprints('admin/pages/move');\n $blueprints->validate($data);\n $data = $blueprints->filter($data, true, true);\n // Hack for pages\n $data['name'] = $data['name'] ?? $object->template();\n $data['ordering'] = (int)$object->order() > 0;\n $data['order'] = null;\n if (isset($data['title'])) {\n $data['header']['title'] = $data['title'];\n unset($data['title']);\n }\n\n $object->order(false);\n $object->update($data);\n }\n\n $object = $object->createCopy();\n\n $this->admin->setMessage($this->admin::translate('PLUGIN_FLEX_OBJECTS.CONTROLLER.TASK_COPY_SUCCESS'));\n\n $this->setRedirect($this->getFlex()->adminRoute($object));\n\n } catch (RuntimeException $e) {\n $this->admin->setMessage($this->admin::translate(['PLUGIN_FLEX_OBJECTS.CONTROLLER.TASK_COPY_FAILURE', $e->getMessage()]), 'error');\n $this->setRedirect($this->referrerRoute->toString(true), 302);\n }\n }", "public function run()\n {\n $service_1 = Service::create([\n 'service_title' => 'Road Construction',\n 'service_slug' => 'road-construction',\n 'service_image' => '',\n 'service_description' => 'Business many variations of passages of psum availablesuffhuof passages offery Lorem Ipsumavailabmajority consectetur adipisicing elit, sed do eiusmod deartyre teididunt deartyre.'\n ]);\n\n $service_2 = Service::create([\n 'service_title' => 'Home Construction',\n 'service_slug' => 'home-construction',\n 'service_image' => '',\n 'service_description' => 'Business many variations of passages of psum availablesuffhuof passages offery Lorem Ipsumavailabmajority consectetur adipisicing elit, sed do eiusmod deartyre teididunt deartyre.'\n ]);\n\n $service_3 = Service::create([\n 'service_title' => 'Renovation',\n 'service_slug' => 'renovation',\n 'service_image' => '',\n 'service_description' => 'Business many variations of passages of psum availablesuffhuof passages offery Lorem Ipsumavailabmajority consectetur adipisicing elit, sed do eiusmod deartyre teididunt deartyre.'\n ]);\n }", "public function configure()\n {\n $this->container = require __DIR__ . '/../../config/configure-services.php';\n $this->scratchSpace = vfsStream::setup('scratch')->url();\n }", "public function servicos() {\n $this->load_template('servicos');\n }", "protected function prepareResources()\n {\n // Publish config\n $config = realpath(__DIR__.'/../config/config.php');\n\n $this->mergeConfigFrom($config, 'cartalyst.extensions');\n\n $this->publishes([\n $config => config_path('cartalyst.extensions.php'),\n ], 'config');\n }", "public function addService($args)\n {\n // echo \"<pre>\"; print_r($args); echo \"</pre>\"; exit;\n $repo = $this->entityManager->getRepository('ZSELEX_Entity_Bundle');\n $user_id = UserUtil::getVar('uid');\n if ($args ['service_status'] != 2) { // demo\n $shop_id = $args [\"shop_id\"];\n $quantity = $args [\"quantity\"];\n $bundle_id = $args [\"bundle_id\"];\n $top_bundle = 1;\n $timer_days = $args [\"timer_days\"];\n $service_status = 1;\n // $paidRunning = $repo->getCount(null, 'ZSELEX_Entity_ServiceBundle', 'service_bundle_id', array('a.shop' => $shop_id, 'a.bundle_type' => 'main', 'a.service_status' => 2));\n } else { // paid\n // $user_id = UserUtil::getVar('uid');\n if (!$user_id) {\n $user_id = $args [\"user_id\"];\n }\n $shop_id = $args [\"shop_id\"];\n $quantity = $args [\"quantity\"];\n $bundle_id = $args [\"bundle_id\"];\n $top_bundle = 1;\n $timer_days = $args [\"timer_days\"];\n $service_status = 2;\n\n // $repo->deleteEntity(null, 'ZSELEX_Entity_ServiceBundle', array('a.shop' => $shop_id, 'a.service_status' => 1));\n // $repo->deleteEntity(null, 'ZSELEX_Entity_ServiceShop', array('a.shop' => $shop_id, 'a.service_status' => 1));\n }\n\n // echo \"<pre>\"; print_r($args); echo \"</pre>\"; exit;\n\n $ownerInfo = ModUtil::apiFunc('ZSELEX', 'admin', 'getOwnerInfo',\n $args = array(\n 'shop_id' => $shop_id\n ));\n\n $owner_id = $ownerInfo ['user_id'];\n // $source = FormUtil::getPassedValue(\"source\");\n // echo \"<pre>\"; print_r($_POST); echo \"</pre>\"; exit;\n\n $bundle_detail = $repo->get(array(\n 'entity' => 'ZSELEX_Entity_Bundle',\n 'where' => array(\n 'a.bundle_id' => $bundle_id\n )\n ));\n\n // echo \"<pre>\";print_r($bundle_detail); echo \"</pre>\"; exit;\n\n $servicePrice = $bundle_detail [\"bundle_price\"];\n $bundle_type = $bundle_detail [\"bundle_type\"];\n $bundle_name = $bundle_detail [\"bundle_name\"];\n\n // $date = date(\"Y-m-d\");\n // $date = $args[\"timer_date\"];\n // echo $count; exit;\n // echo \"<pre>\"; print_r($main_bundle); echo \"</pre>\"; exit;\n $main_bundle = $repo->get(array(\n 'entity' => 'ZSELEX_Entity_ServiceBundle',\n 'fields' => array(\n 'a.service_bundle_id',\n 'a.timer_date',\n 'a.timer_days',\n 'b.bundle_id'\n ),\n 'joins' => array(\n 'JOIN a.bundle b'\n ),\n 'where' => array(\n 'a.bundle_type' => 'main',\n 'a.shop' => $shop_id\n )\n ));\n if (!$main_bundle) {\n return;\n }\n // echo \"<pre>\"; print_r($main_bundle); echo \"</pre>\"; exit;\n // if ($bundle == 1) {\n $values = array(\n 'bundle' => 1,\n 'service_status' => $service_status,\n 'user_id' => $user_id,\n 'owner_id' => $owner_id,\n 'shop_id' => $shop_id,\n // 'main_bundle' => $main_bundle['bundle_id'],\n 'timer_date' => $main_bundle ['timer_date']\n );\n\n $bundleitems = $repo->getAll(array(\n 'entity' => 'ZSELEX_Entity_BundleItem',\n 'fields' => array(\n 'a.id',\n 'b.bundle_id',\n 'a.service_name',\n 'a.servicetype',\n 'c.plugin_id',\n 'a.price',\n 'a.qty',\n 'a.qty_based'\n ),\n 'joins' => array(\n 'JOIN a.bundle b',\n 'LEFT JOIN a.plugin c'\n ),\n 'where' => array(\n 'a.bundle' => $bundle_id\n ),\n 'groupby' => 'a.id'\n ));\n\n // echo \"<pre>\"; print_r($bundleitems); echo \"</pre>\"; exit;\n $values ['quantity'] = $quantity;\n $values ['bundleitems'] = $bundleitems;\n $values ['timer_days'] = $main_bundle ['timer_days'];\n $values ['bundle_type'] = $bundle_type;\n $values ['bundle_id'] = $bundle_id;\n // $values['bundle_id'] = $main_bundle['bundle_id'];\n $values ['shop_id'] = $shop_id;\n $values ['service_status'] = $service_status;\n\n // echo \"<pre>\"; print_r($values);exit;\n $approvebundlesitems = $this->insertBundleItemsRepair($values);\n // }\n\n if ($service_status == 1) {\n LogUtil::registerStatus($this->__('Service configured for demo'));\n } else {\n LogUtil::registerStatus($this->__('Paid Service configured successfully'));\n return true;\n }\n return true;\n }", "function newService($action = \"\")\n {\n $this->closeDialogs();\n $serv = preg_replace('/^new_/', '', $action);\n $this->plugins[$serv]->is_account = TRUE;\n $this->dialogObject = $this->plugins[$serv];\n $this->current = $serv;\n $this->dialog = TRUE;\n }", "public function acquiaPreparePreProd($uuid, $environmentFrom, $environmentTo)\n {\n if ($environmentTo->name == 'prod') {\n throw new \\Exception('Use the db:backup and files:copy commands for the production environment.');\n }\n\n $this->backupAndMoveDbs($uuid, $environmentFrom, $environmentTo);\n $this->backupFiles($uuid, $environmentFrom, $environmentTo);\n }", "protected static function updateBootstrapping()\n {\n copy(__DIR__ . '/angular-stubs/main.ts', resource_path('assets/js/main.ts'));\n copy(__DIR__ . '/angular-stubs/app.module.ts', resource_path('assets/js/app.module.ts'));\n copy(__DIR__ . '/angular-stubs/environment.ts', resource_path('assets/js/environment.ts'));\n copy(__DIR__ . '/angular-stubs/tsconfig.json', resource_path('assets/js/tsconfig.json'));\n }", "protected function prepareResources()\n {\n // Publish config\n $config = realpath(__DIR__.'/../config/config.php');\n\n $this->mergeConfigFrom($config, 'cartalyst.sentinel');\n\n $this->publishes([\n $config => config_path('cartalyst.sentinel.php'),\n ], 'config');\n\n // Publish migrations\n $migrations = realpath(__DIR__.'/../migrations');\n\n $this->publishes([\n $migrations => $this->app->databasePath().'/migrations',\n ], 'migrations');\n }", "protected function registerServices()\n {\n\n $di = new FactoryDefault();\n\n /**\n * Read services\n */\n include CORE_PATH . \"/config/services.php\";\n\n /**\n * Get config service for use in inline setup below\n */\n $config = $di->getConfig();\n\n\n include CORE_PATH . '/config/loader.php';\n\n \n\n $this->setDI($di);\n }", "function preparePool()\n\t{\n\t\tinclude(\"/m23/inc/i18n/\".$GLOBALS[\"m23_language\"].\"/m23base.php\");\n\n\t\t$this->checkForDistributionSpecificPackageFunction('PKG_preparePool', $I18N_distrHasNoFunctionForPreparingAPool);\n\t\n\t\t// Check, if there are errors (some can be generated by set functions)\n\t\tif (!$this->hasErrors())\n\t\t{\n\t\t\tPKG_preparePool($this->getPoolRelease(), $this->getPoolDistribution(), $this->getPoolArch(), $this->getPoolName(), $this->getPoolDir());\n\t\t\treturn(true);\n\t\t}\n\t\telse\n\t\t\treturn(false);\n\t}", "function _prepare() {}", "public static function setUpBeforeClass(){\n printf(\"*********** TESTING CREATE SWAPP SERVICE **********\");\n }", "public static function duplicate($service) {\n\n $serviceid = $service->id;\n\n // duplicate service\n $newservice = ORM::forTable('service')->create();\n Admin::duplicateRecord($service, $newservice);\n $newservice->code = \"CHANGE\";\n $newservice->date = date(\"Y-m-d\");\n $newservice->visible = 0;\n $newservice->save();\n $newserviceid = $newservice->id();\n\n // duplicate destinations\n // create a map of old to new ids\n $destmap = array();\n $destinations = ORM::forTable('destination')->where('serviceid', $serviceid)->findMany();\n if ($destinations) {\n foreach ($destinations as $destination) {\n $newdestination = ORM::forTable('destination')->create();\n Admin::duplicateRecord($destination, $newdestination);\n $newdestination->serviceid = $newserviceid;\n $newdestination->save();\n $destmap[$destination->id] = $newdestination->id();\n }\n }\n\n // duplicate pricebandgroup\n // create a map of old to new ids\n $pbmap = array();\n $pricebandgroups = ORM::forTable('pricebandgroup')->where('serviceid', $serviceid)->findMany();\n if ($pricebandgroups) {\n foreach ($pricebandgroups as $pricebandgroup) {\n $newpricebandgroup = ORM::forTable('pricebandgroup')->create();\n $newpricebandgroup->serviceid = $newserviceid;\n $newpricebandgroup->name = $pricebandgroup->name;\n $newpricebandgroup->save();\n $pbmap[$pricebandgroup->id] = $newpricebandgroup->id();\n }\n }\n\n // duplicate joining\n $joinings = ORM::forTable('joining')->where('serviceid', $serviceid)->findMany();\n if ($joinings) {\n foreach ($joinings as $joining) {\n $newjoining = ORM::forTable('joining')->create();\n Admin::duplicateRecord($joining, $newjoining);\n $newjoining->serviceid = $newserviceid;\n if (empty($pbmap[$joining->pricebandgroupid])) {\n throw new Exception('No pricebandgroup mapping exists for id = ' . $joining->pricebandgroupid);\n }\n $newjoining->pricebandgroupid = $pbmap[$joining->pricebandgroupid];\n $newjoining->save();\n }\n }\n\n // duplicate pricebands\n $pricebands = ORM::forTable('priceband')->where('serviceid', $serviceid)->findMany();\n if ($pricebands) {\n foreach ($pricebands as $priceband) {\n if (empty($pbmap[$priceband->pricebandgroupid])) {\n throw new Exception('No pricebandgroup mapping exists for id = ' . $priceband->pricebandgroupid);\n }\n $newpriceband = ORM::forTable('priceband')->create();\n Admin::duplicateRecord($priceband, $newpriceband);\n $newpriceband->serviceid = $newserviceid;\n if (empty($destmap[$priceband->destinationid])) {\n throw new Exception('No destination mapping exists for id = ' . $priceband->destinationid);\n }\n $newpriceband->destinationid = $destmap[$priceband->destinationid];\n if (empty($pbmap[$priceband->pricebandgroupid])) {\n throw new Exception('No pricebandgroup mapping exists for id = ' . $priceband->pricebandgroupid);\n }\n $newpriceband->pricebandgroupid = $pbmap[$priceband->pricebandgroupid];\n $newpriceband->save();\n }\n }\n\n // duplicate limits\n $limits = ORM::forTable('limits')->where('serviceid', $serviceid)->findOne();\n if ($limits) {\n $newlimits = ORM::forTable('limits')->create();\n Admin::duplicateRecord($limits, $newlimits);\n $newlimits->serviceid = $newserviceid;\n $newlimits->save();\n }\n\n return $newservice;\n }", "private function copyResources()\n {\n $sResourcesDirectory = $this->getViewRootDirectory();\n $sResourcesDirectory = substr($sResourcesDirectory, 0, strrpos($sResourcesDirectory, 'View'));\n $sResourcesDirectory .= 'Resources' . DIRECTORY_SEPARATOR;\n\n // copy css\n foreach (glob($sResourcesDirectory . 'css/*') as $sResourceFile) {\n $sCopyPath = WWW_PATH . substr($sResourceFile, strlen($sResourcesDirectory));\n Directory::create(dirname($sCopyPath));\n copy($sResourceFile, $sCopyPath);\n }\n\n // copy js\n foreach (glob($sResourcesDirectory . 'js/*') as $sResourceFile) {\n $sCopyPath = WWW_PATH . substr($sResourceFile, strlen($sResourcesDirectory));\n Directory::create(dirname($sCopyPath));\n copy($sResourceFile, $sCopyPath);\n }\n }", "public static function beforeDeploy()\n {\n self::$logger = new \\Monolog\\Logger('phpunit');\n\n $dbConn = self::requireEnv('SYMFONY_CLOUDSQL_CONNECTION_NAME');\n $dbName = self::requireEnv('SYMFONY_DB_DATABASE');\n $dbPass = self::requireEnv('SYMFONY_DB_PASSWORD');\n\n // Create the Symfony project in a temporary directory\n $symfonyDir = self::createSymfonyProject();\n self::updateKernelCacheAndLogDir($symfonyDir);\n\n // copy and set the proper env vars in app.yaml\n $appYaml = file_get_contents(__DIR__ . '/../app.yaml');\n $appYaml = str_replace('# DATABASE_URL', 'DATABASE_URL', $appYaml);\n $appYaml = str_replace('DB_PASSWORD', $dbPass, $appYaml);\n $appYaml = str_replace('INSTANCE_CONNECTION_NAME', $dbConn, $appYaml);\n $appYaml = str_replace('symfonydb', $dbName, $appYaml);\n\n file_put_contents($symfonyDir . '/app.yaml', $appYaml);\n }", "public function testCreateService()\n {\n\n }", "public function __construct() {\n $this->atom = \\Drupal::service('ngdata.atomic.atom');\n $this->molecule = \\Drupal::service('ngdata.atomic.molecule');\n $this->organism = \\Drupal::service('ngdata.atomic.organism');\n $this->template = \\Drupal::service('ngdata.atomic.template');\n\n // $this->entityService = \\Drupal::service('ngdata.entity');\n }", "protected function setupBuiltInServices() {\n // generic services\n ServiceProviderInstaller::setup(new CacheServiceProvider());\n ServiceProviderInstaller::setup(new ConfigServiceProvider());\n ServiceProviderInstaller::setup(new DatabaseServiceProvider());\n ServiceProviderInstaller::setup(new FilesystemServiceProvider());\n ServiceProviderInstaller::setup(new LoggerServiceProvider());\n ServiceProviderInstaller::setup(new MiddlewareQueueServiceProvider());\n ServiceProviderInstaller::setup(new ModulesServiceProvider());\n ServiceProviderInstaller::setup(new RouterServiceProvider());\n ServiceProviderInstaller::setup(new SessionServiceProvider());\n ServiceProviderInstaller::setup(new TranslatorServiceProvider());\n ServiceProviderInstaller::setup(new UrlServiceProvider());\n ServiceProviderInstaller::setup(new VersionUriServiceProvider());\n ServiceProviderInstaller::setup(new VoltServiceProvider());\n // listener services\n $this->di->setShared('dispatcher.listener', new DispatcherListener());\n $this->di->setShared('router.listener', new RouterListener());\n $this->di->setShared('view.listener', new ViewListener());\n $this->di->setShared('db.listener', new DatabaseListener());\n // defaults\n $this->di->setShared('application', new MvcApplication());\n $this->di->setShared('dispatcher', DispatcherFactory::factory(/* module */''));\n $this->di->setShared('view', Factory::html());\n }", "public function run()\n {\n $faker = Faker::create();\n\n //LCService\n $data = new Service;\n $data->name \t\t = 'English Proficiency Test (EPT) for diploma and undergraduate students (S1)';\n $data->quantity \t = 'Each Person/Test';\n $data->cost = 25000;\n $data->created_at = Carbon::now();\n $data->updated_at = Carbon::now();\n $data->save();\n\n $data = new Service;\n $data->name \t\t = 'English Proficiency Test (EPT) for graduate students (S2)';\n $data->quantity \t = 'Each Person/Test';\n $data->cost = 125000;\n $data->created_at = Carbon::now();\n $data->updated_at = Carbon::now();\n $data->save();\n\n $data = new Service;\n $data->name \t\t = 'Executive class English course for graduate students (S2) and public';\n $data->quantity \t = 'Each Person/Test';\n $data->cost = 500000;\n $data->created_at = Carbon::now();\n $data->updated_at = Carbon::now();\n $data->save();\n\n $data = new Service;\n $data->name \t\t = 'Regular class English course for diploma and undergraduate students (S1)';\n $data->quantity \t = 'Each Person/Test';\n $data->cost = 300000;\n $data->created_at = Carbon::now();\n $data->updated_at = Carbon::now();\n $data->save();\n\n $data = new Service;\n $data->name \t\t = 'EPT Certificate legalization';\n $data->quantity \t = 'Each Sheet';\n $data->cost = 1500;\n $data->created_at = Carbon::now();\n $data->updated_at = Carbon::now();\n $data->save();\n\n $data = new Service;\n $data->name \t\t = 'Document translation, From English to Bahasa Indonesia';\n $data->quantity \t = 'Each finished page';\n $data->cost = 125000;\n $data->created_at = Carbon::now();\n $data->updated_at = Carbon::now();\n $data->save();\n\n $data = new Service;\n $data->name \t\t = 'Document translation, From Japanese to Bahasa Indonesia';\n $data->quantity \t = 'Each finished page';\n $data->cost = 200000;\n $data->created_at = Carbon::now();\n $data->updated_at = Carbon::now();\n $data->save();\n\n $data = new Service;\n $data->name \t\t = 'Document translation, From Chinese to Bahasa Indonesia';\n $data->quantity \t = 'Each finished page';\n $data->cost = 200000;\n $data->created_at = Carbon::now();\n $data->updated_at = Carbon::now();\n $data->save();\n\n $data = new Service;\n $data->name \t\t = 'Document translation, From Dutch to Bahasa Indonesia';\n $data->quantity \t = 'Each finished page';\n $data->cost = 200000;\n $data->created_at = Carbon::now();\n $data->updated_at = Carbon::now();\n $data->save();\n\n $data = new Service;\n $data->name \t\t = 'Document translation, From French to Bahasa Indonesia';\n $data->quantity \t = 'Each finished page';\n $data->cost = 145000;\n $data->created_at = Carbon::now();\n $data->updated_at = Carbon::now();\n $data->save();\n\n $data = new Service;\n $data->name \t\t = 'Document translation, From German to Bahasa Indonesia';\n $data->quantity \t = 'Each finished page';\n $data->cost = 145000;\n $data->created_at = Carbon::now();\n $data->updated_at = Carbon::now();\n $data->save();\n\n $data = new Service;\n $data->name \t\t = 'Document translation, From Other Languages to Bahasa Indonesia';\n $data->quantity \t = 'Each finished page';\n $data->cost = 145000;\n $data->created_at = Carbon::now();\n $data->updated_at = Carbon::now();\n $data->save();\n\n $data = new Service;\n $data->name \t\t = 'Document translation, From Bahasa Indonesia to English';\n $data->quantity \t = 'Each finished page';\n $data->cost = 125000;\n $data->created_at = Carbon::now();\n $data->updated_at = Carbon::now();\n $data->save();\n\n $data = new Service;\n $data->name \t\t = 'Document translation, From Bahasa Indonesia to Japanese';\n $data->quantity \t = 'Each finished page';\n $data->cost = 200000;\n $data->created_at = Carbon::now();\n $data->updated_at = Carbon::now();\n $data->save();\n\n $data = new Service;\n $data->name \t\t = 'Document translation, From Bahasa Indonesia to Chinese';\n $data->quantity \t = 'Each finished page';\n $data->cost = 125000;\n $data->created_at = Carbon::now();\n $data->updated_at = Carbon::now();\n $data->save();\n\n $data = new Service;\n $data->name \t\t = 'Document translation, From Bahasa Indonesia to Dutch';\n $data->quantity \t = 'Each finished page';\n $data->cost = 200000;\n $data->created_at = Carbon::now();\n $data->updated_at = Carbon::now();\n $data->save();\n\n $data = new Service;\n $data->name \t\t = 'Document translation, From Bahasa Indonesia to French';\n $data->quantity \t = 'Each finished page';\n $data->cost = 145000;\n $data->created_at = Carbon::now();\n $data->updated_at = Carbon::now();\n $data->save();\n\n $data = new Service;\n $data->name \t\t = 'Document translation, From Bahasa Indonesia to German';\n $data->quantity \t = 'Each finished page';\n $data->cost = 145000;\n $data->created_at = Carbon::now();\n $data->updated_at = Carbon::now();\n $data->save();\n\n $data = new Service;\n $data->name \t\t = 'Document translation, From Bahasa Indonesia to Other Languages';\n $data->quantity \t = 'Each finished page';\n $data->cost = 145000;\n $data->created_at = Carbon::now();\n $data->updated_at = Carbon::now();\n $data->save();\n }", "public function copySource()\n {\n $src = $this->pathToPackageRoot . 'publishable';\n $this->info('Copying publishable files...');\n if (!file_exists($src)) {\n $this->error(' #ERR2 [SKIP] ' . $src . ' does not exists');\n }\n $res = $this->filesystem->copyDirectory($src, base_path());\n\n\n $this->info('Update app/Kernel.php');\n }", "public static function copyEnv()\n {\n // Get VCAP_APPLICATION\n $vcapsApplication = json_decode(getenv('VCAP_APPLICATION'), true);\n // Copy env of the appropriate space\n if (isset($vcapsApplication['space_name'])) {\n copy(\n '.env.' . strtolower($vcapsApplication['space_name']),\n '.env'\n );\n }\n }", "private function prepareStandardWpInstallation()\n {\n $this->runWpCliCommand(\n 'core',\n 'download',\n array_merge([\n 'path' => $this->siteConfig->path,\n 'version' => $this->siteConfig->wpVersion,\n 'force' => null,\n ], $this->siteConfig->wpLocale ? [ 'locale' => $this->siteConfig->wpLocale ] : [])\n );\n\n $this->createConfigFile();\n }", "public function transfer_service_bookings($params='')\n {\n $this->load->model('admin/admin_model');\n $this->gen_contents['page_heading'] = 'Transfer Service Bookings';\n $this->gen_contents['tour_bookings'] = $this->admin_model->get_ts_bookings();\n //p($this->gen_contents['tour_bookings']); exit;\n //rendering page \n $this->template->set_template('admin');\n $this->template->write_view('content', 'admin/transfer-service-booking', $this->gen_contents);\n $this->template->render();\n }", "public function __construct() {\n $this->atom = \\Drupal::service('ngdata.atomic.atom');\n $this->molecule = \\Drupal::service('ngdata.atomic.molecule');\n $this->organism = \\Drupal::service('ngdata.atomic.organism');\n $this->template = \\Drupal::service('ngdata.atomic.template');\n $this->block = \\Drupal::service('ngdata.atomic.block');\n $this->blockgroup = \\Drupal::service('ngdata.atomic.blockgroup');\n }", "private function initService() {\n\t\t/** check if config->service exists */\n\t\t$config = $this->_config->get('config');\n\t\tif (!property_exists($config, 'service')) {\n\t\t\tthrow new Exception('Configuration file requires \"service\" filed');\n\t\t}\n\n $services = $config->service->toArray();\n\n /** inject service into Di container */\n foreach ($services as $name => $options) {\n \t$bootstarp = $this;\n \t$shared = $options['shared'] ? : FALSE;\n\n \t$this->_di->set($name, function() use ($bootstarp, $options) {\n \t\tif (!class_exists($options['lib'])) {\n \t\t\tthrow new Exception('Class \"' . $options['lib'] .'\" is not found');\n \t\t}\n\n \t\t/** check if there is a specify config file */\n \t\t$config = NULL;\n \t\tif (!empty($options['config'])) {\n\t\t\t\t\t/** get config */\n\t\t\t\t\t$config = $bootstarp->_config->get($options['config'])->toArray();\n \t\t}\n\n \t\t/** check if the class implements with the interface iService */\n \t\t$instance = new $options['lib']();\n \t\tif (!$instance instanceof iService) {\n \t\t\tthrow new Exception('class ' . $options['lib'] . ' not implements with interface iService');\n \t\t}\n\n \t\t/** init service */\n \t\treturn $instance->init($config);\n \t}, $shared);\n }\n\t}", "function PKG_copyPackagesToClient($to,$from,$status)\n{\n\tCHECK_FW(CC_clientname, $from, CC_jobstatusOrEmpty, $status, CC_clientname, $to);\n\n\tif (!empty($status))\n\t\t$add = \" AND `status` = '$status'\";\n\telse\n\t\t$add = \"\";\n\n\t$sql=\"SELECT * FROM `clientjobs` WHERE client='$from' $add\";\n\n\t$res = DB_query($sql); //FW ok\n\n\twhile( $data = mysql_fetch_array($res))\n\t\t{\n\t\t\t$iSQL=\"INSERT INTO `clientjobs` (`client` , `package` , `priority` , `status` , `params` , `normalPackage` , `installedSize` ) VALUES (\n\t\t\t'$to', '$data[package]', '$data[priority]', '$data[status]', '$data[params]', '$data[normalPackage]', '$data[installedSize]')\";\n\n\t\t\tDB_query($iSQL); //FW ok\n\t\t};\n}", "public function run()\n {\n $service = [\n [\n 'id' => 1,\n 'name' => 'Import XML',\n 'description' => 'Le service Import XML ',\n 'is_active' => true,\n 'status_message' => 'Le service Import XML est activé.',\n\n ],\n [\n 'id' => 2,\n 'name' => 'PTL',\n 'description' => 'Le service PTL ',\n 'is_active' => true,\n 'status_message' => 'Le service PTL est activé.',\n\n ],\n [\n 'id' => 3,\n 'name' => 'Tarif CSV',\n 'description' => 'Le service de génération du fichier Tarif CSV (VIALTO) ',\n 'is_active' => true,\n 'status_message' => 'Le service Tarif CSV est activé.',\n\n ],\n [\n 'id' => 4,\n 'name' => 'Plan. Doc',\n 'description' => 'Le service de documents XLS plannifiés. ',\n 'is_active' => true,\n 'status_message' => 'Le service de documents XLS plannifiés est activé.',\n\n ],\n\n ];\n\n Service::insert($service);\n }", "function create_service_map($soap) {\n foreach ($this->services as $service) {\n require_once($service . '.php');\n if (class_exists($service)) {\n $c = (string) $service; \n $object = new $c();\n $soap->addObjectMap($object, 'urn:php-islandora-soapservice');\n }\n else {\n $this->log->lwrite(\"Could not load class $service, check the config files list \n of services to make sure they are correct\", 'SOAP_SERVER', NULL, NULL, 'ERROR');\n }\n }\n }", "protected function accountsSetUp(): void\n\t{\n\t\t// Load the Accounts factory if it isn't already\n\t\tif (self::$accounts == null)\n\t\t{\n\t\t\t// Use the service in case it has been mocked\n\t\t\tself::$accounts = \\Config\\Services::accounts();\n\t\t}\n\n\t\t// Load Faker if it isn't already\n\t\tif (self::$faker == null)\n\t\t{\n\t\t\tself::$faker = \\Faker\\Factory::create();\n\t\t}\n\n\t\t// Make sure the cache is clean\n\t\t$this->accountsCache = [];\n\t}", "public function __construct(Payroll1Service $payroll1Service){\r\n $this->payroll1Service = $payroll1Service;\r\n }", "public function registerServices(){\n }", "public function projectContractPrepared()\n\t{\n\n\t}", "public static function prepare()\n {\n // static::startChromeDriver();\n }", "public function SetUpServiceBodies()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n $this->_service_bodies = array();\n \n // Basic error checking.\n if ($this->_my_server instanceof c_comdef_server) {\n // Start by getting the service bodies aggregator object.\n $bodies = $this->_my_server->GetServiceBodyArray();\n if (is_array($bodies) && count($bodies)) {\n foreach ($bodies as $body) {\n $key = $body->GetID();\n $this->_service_bodies[$key] = 0;\n }\n }\n }\n }", "public function insert_services($id_service, $id_reserve, $qty, $price, $desc, $tax, $tipo, $unit){\n $query=\"INSERT INTO `\".DB_PREFIX.\"serv_reserv` (`id`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`id_service`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`id_reserve`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`qty`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`price`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`comment`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`tax`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`tipo`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`unit`)\n \t\t\t\t\tVALUES ( NULL ,'\".$this->link->myesc($id_service).\"',\n\t\t\t\t\t'\".$this->link->myesc($id_reserve).\"',\n\t\t\t\t\t'\".$this->link->myesc($qty).\"',\n\t\t\t\t\t'\".$this->link->myesc($price).\"',\n\t\t\t\t\t'\".$this->link->myesc($desc).\"',\n\t\t\t\t\t'\".$this->link->myesc($tax).\"',\n\t\t\t\t\t'\".$this->link->myesc($tipo).\"',\n\t\t\t\t\t'\".$this->link->myesc($unit).\"')\";\n $result = $this->link->execute($query);\n return $result;\n\t}", "public function handle()\n {\n $fileName=ucwords(strtolower($this->argument('name'))); \n $serviceFileName = \"${fileName}Service.php\";\n\n $content =\n'<?php\n\nnamespace App\\Services;\n\nclass '.$fileName.'Service extends MainService\n{\n public function __construct()\n {\n //\n }\n\n /**\n * fetch all records\n *\n * @return Array $rtn\n */\n public function all(): array\n {\n //\n }\n\n /**\n * get one record.\n *\n * @param Int|Null $id\n * @return Array $rtn\n */\n public function get(int $id = null): array\n {\n //\n }\n\n /**\n * store a record \n *\n * @return Bool|'.$fileName.' $rtn\n */\n public function store()\n {\n //\n }\n\n /**\n * update a record\n *\n * @param Int $id\n * @return Bool|'.$fileName.' $rtn\n */\n public function update(int $id)\n {\n //\n }\n\n /**\n * destroy a record \n *\n * @param Int $id\n * @return Bool\n */\n public function destroy($id)\n {\n //\n }\n\n}';\n\n if ($this->confirm('Do you wish to create '.$fileName.' Service file?')) {\n $path=app_path();\n // $repositoryFile = $path.\"/Services/$serviceFileName\";\n // $interfaceFile = $path.\"/Interfaces/$interfaceFileName\";\n // $RepositoryDir = $path.\"/Repositories\";\n // $InterfaceDir = $path.\"/Interfaces\";\n\n $serviceFile = $path.\"/Services/$serviceFileName\";\n $serviceDir = $path.\"/Services\";\n\n if ($this->files->isDirectory($serviceDir)) {\n if ($this->files->isFile($serviceFile)) {\n return $this->error($fileName.' File Already exists!');\n }\n \n if (!$this->files->put($serviceFile, $content)) {\n return $this->error('Something went wrong!');\n }\n $this->info(\"$fileName generated!\");\n } else {\n $this->files->makeDirectory($serviceDir, 0777, true, true);\n\n if (!$this->files->put($serviceFile, $content)) {\n return $this->error('Something went wrong!');\n }\n \n $this->info(\"$fileName generated!\");\n }\n\n }\n }", "private static function add_actions() {\r\n\r\n\t\tif ( ! current_user_can( 'access_cp_pro' ) ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tself::add_action( 'cppro_get_assets_data', 'ConvertPlugServices::get_assets_data' );\r\n\r\n\t\tself::add_action( 'cppro_render_service_settings', 'ConvertPlugServices::render_settings' );\r\n\t\tself::add_action( 'cppro_save_service_settings', 'ConvertPlugServices::save_settings' );\r\n\t\tself::add_action( 'cppro_render_service_fields', 'ConvertPlugServices::render_fields' );\r\n\t\tself::add_action( 'cppro_connect_service', 'ConvertPlugServices::connect_service' );\r\n\t\tself::add_action( 'cppro_delete_service_account', 'ConvertPlugServices::delete_account' );\r\n\t\tself::add_action( 'cppro_render_service_accounts', 'ConvertPlugServices::render_service_accounts' );\r\n\t\tself::add_action( 'cppro_save_meta_settings', 'ConvertPlugServices::save_meta' );\r\n\r\n\t\tself::add_action( 'cppro_test_connection', 'ConvertPlugServices::test_connection' );\r\n\r\n\t}", "protected function setRawServices(array $services) {\n foreach ($services as $name => $service) {\n $this->di->setShared($name, $service);\n }\n }", "private function resetContainer()\n {\n // Synthetic services\n $kernel = Shopware()->Container()->get('kernel');\n $connection = Shopware()->Container()->get('db_connection');\n $application = Shopware()->Container()->get('application');\n\n Shopware()->Container()->reset();\n\n Shopware()->Container()->set('kernel', $kernel);\n Shopware()->Container()->set('db_connection', $connection);\n Shopware()->Container()->set('application', $application);\n }", "public static function register_services(): void\n {\n foreach (self::get_services() as $class) {\n $service = self::instantiate($class);\n if (method_exists($class, 'register')) {\n $service->register();\n }\n }\n }", "public function creating(Service $service)\n {\n $service->slug = Str::slug($service->name);\n }", "public function run()\n {\n $data = file_get_contents(\"database/Queries/services.json\");\n $services = json_decode($data, true);\n foreach ($services as $value) {\n Service::create([\n 'title' => $value['title'],\n 'description' => $value['description'],\n 'state' => $value['state']\n ]);\n }\n }", "public function registerServices() {\n\t\t$services = Config::inst()->get('FakeManager', 'services');\n\t\tif($services) {\n\t\t\tforeach($services as $origName => $fakeName) {\n\t\t\t\t$fakeObj = Injector::inst()->create($fakeName);\n\t\t\t\tif($this->db && $fakeObj instanceof FakeDatabaseConsumerInterface) {\n\t\t\t\t\t$fakeObj->setDb($this->db);\n\t\t\t\t}\n\t\t\t\t$this->services[$origName] = $fakeObj;\n\t\t\t\tInjector::inst()->registerService($fakeObj, $origName);\n\t\t\t}\n\t\t}\n\t}", "private function __construct( array $config=[] )\n\t{\n\t\t$this->services = $config;\n\t}", "public function registerServices($di)\n {\n // echo \"admin module registerServices....\";\n\n require_once '../apps/admin/config/services.php';\n }" ]
[ "0.562213", "0.55845654", "0.5512528", "0.5482004", "0.5406627", "0.5299918", "0.52158177", "0.5196003", "0.51228446", "0.51192963", "0.5075538", "0.5050376", "0.50496876", "0.50335145", "0.5028224", "0.5025981", "0.50161135", "0.49657443", "0.49565414", "0.49474058", "0.4938053", "0.49145588", "0.49126828", "0.49068227", "0.49007395", "0.48934296", "0.487905", "0.48780483", "0.487289", "0.4861826", "0.48591417", "0.48589954", "0.4855845", "0.48466665", "0.4844724", "0.48364523", "0.48272878", "0.48262885", "0.48121375", "0.4805152", "0.47810343", "0.4780913", "0.476614", "0.47615057", "0.47579968", "0.4757738", "0.47434747", "0.47405812", "0.47294205", "0.47187144", "0.47177738", "0.47089544", "0.470448", "0.46949923", "0.4692124", "0.46911675", "0.46899602", "0.46822408", "0.46787584", "0.46730572", "0.46675122", "0.46615642", "0.46614924", "0.46607536", "0.46581534", "0.46558908", "0.46489948", "0.4639961", "0.46286827", "0.46206707", "0.46182144", "0.46117502", "0.459706", "0.4595674", "0.4588526", "0.4584797", "0.45846444", "0.45832703", "0.45786402", "0.45710462", "0.4568395", "0.4568202", "0.45652518", "0.4564141", "0.45631838", "0.45611253", "0.45576322", "0.4556932", "0.45560873", "0.4548222", "0.45478684", "0.45468727", "0.45449054", "0.45417833", "0.45379588", "0.453748", "0.45293707", "0.45224237", "0.45212615", "0.45211813", "0.45208088" ]
0.0
-1
/! \brief Check if there is an active service which prevents complete service removal.
function allow_remove() { foreach ($this->plugins as $obj) { $str = $obj->allow_remove(); if (!empty($str)) { return $str; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isService() {\r\n\t\treturn false;\r\n\t}", "public function isServiceContentDeactivationSuccessful(){\n \n $cmd =Yii::app()->db->createCommand();\n $result = $cmd->update('website_services',\n array(\n 'status'=>'inactive',\n \n ),\n (\"status='active'\"));\n \n if($result>0){\n return true;\n }else{\n return false;\n }\n }", "public function inactive_client_cache_services($service_name)\r\n\t{\r\n\t\t$inactive_cache = array('SEARCH', 'GETCALENDARFARE', 'FARERULE');\r\n\t\t//$inactive_cache = array();\r\n\t\tif(in_array(strtoupper($service_name), $inactive_cache) == true){\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public function isThereAnActivatedServiceContent(){\n $cmd =Yii::app()->db->createCommand();\n $cmd->select('COUNT(*)')\n ->from('website_services')\n ->where(\"status='active'\");\n $result = $cmd->queryScalar();\n \n if($result > 0){\n return true;\n }else{\n return false;\n }\n \n }", "function have_services(){\n\t$services = get_services();\n\treturn !empty($services) && is_array($services);\n}", "public function isService() {\n\t\treturn true;\n\t}", "private function checkServiceServiceSet () {\n if(is_null($this->serviceService)) {\n $this->exceptionWithResponseCode(500,\n \"Internal error: The service service has not been set. Please contact a GOCDB administrator and report this error.\"\n );\n }\n }", "public static function checkService(){\n $service = User::findOrFail(Auth::id());\n $service_user = $service->service()\n ->wherePivot('user_id',Auth::id())\n ->get(); // execute the query\n if($service_user->count() >0 ){\n $current_service = $service->service()\n ->wherePivot('user_id',Auth::id())\n ->wherePivot('is_active','1')\n ->first();\n }else{\n $current_service = false;\n }\n return $current_service;\n }", "private function _current_exist() {\n return D( 'Service' )->service_exist_verifition( array( 'usr_login_id_buyer' => ( get_session_id() ), 'service_status' => array( '2' ) ) );\n }", "function check_requirements()\n\t{\n\t\t$sql_obj\t\t= New sql_query;\n\t\t$sql_obj->string\t= \"SELECT id FROM services WHERE id='\". $this->id .\"' LIMIT 1\";\n\t\t$sql_obj->execute();\n\n\t\tif (!$sql_obj->num_rows())\n\t\t{\n\t\t\tlog_write(\"error\", \"page_output\", \"The requested service (\". $this->id .\") does not exist - possibly the service has been deleted.\");\n\t\t\treturn 0;\n\t\t}\n\n\t\tunset($sql_obj);\n\n\t\treturn 1;\n\t}", "public function deactivateService() {}", "public function inactiveCheck()\n\t\t{\n\t\t\t$schedule = $this->getSchedule();\n\t\t\tif ($schedule->getAnalyzer()->getBalance() <= 0)\n\t\t\t{\n\t\t\t\t$as = $_SESSION['current_app']; // App Status can be grabbed from here\n\n\t\t\t\tif ($as->level1 == 'external_collections')\n\t\t\t\t{\n\t\t\t\t\tUpdate_Status(NULL, $this->getId(), array(\"recovered\",\"external_collections\",\"*root\"));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tUpdate_Status(NULL, $this->getId(), array(\"paid\",\"customer\",\"*root\"));\n\t\t\t\t}\n\n\t\t\t\t$this->Affiliations->expireAll();\n\t\t\t\t$schedule->removeScheduledTransactions();\n\t\t\t\t$schedule->save();\n\n\t\t\t\t$queue_manager = ECash::getFactory()->getQueueManager();\n\t\t\t\t$queue_item = new ECash_Queues_BasicQueueItem($this->getId());\n\t\t\t\t$queue_manager->getQueueGroup('automated')->remove($queue_item);\n\n\t\t\t\treturn TRUE;\n\t\t\t}\n\n\t\t\treturn FALSE;\n\n\t\t}", "public function isTheExistingServiceContentStatusDeactivated(){\n \n if($this->isThereAnActivatedServiceContent()){\n if($this->isServiceContentDeactivationSuccessful()){\n return true;\n }else{\n return false;\n }\n \n }else{\n return true;\n }\n }", "public function hasService(string $id): bool\n {\n return isset($this->getServices()[$id]);\n }", "public function isService(string $serviceId): bool;", "public function isServiceEnabled(): bool\n {\n $enablingModule = $this->getEnablingModule();\n if ($enablingModule !== null && !$this->getModuleRegistry()->isModuleEnabled($enablingModule)) {\n return false;\n }\n\n return true;\n }", "final public function hasService($name)\n {\n $services = $this->getServices();\n return isset($services[$name]);\n }", "public function isOperational();", "public static function isSupport($service) {\n return in_array($service, self::$serviceSupport);\n }", "protected function isServiceAvailable()\n {\n return (boolean) $this->extConfig['providers'][strtolower($this->provider)]['enabled'];\n }", "public static function hasService($serviceKey) {\n\t\treturn (isset(self::$services[$serviceKey]));\n\t}", "protected function isServiceInternal(string $serviceId): bool\n {\n return isset(self::$services[$serviceId]);\n }", "protected function isServiceAvailable($service)\n {\n return in_array(\n strtolower($service), \n array_keys(config('awesio-auth.socialite.services'))\n );\n }", "public function serviceExists(string $serviceName): bool;", "abstract public function checkAvailability(VAPCartItem $item, array $service);", "function status($id)\n{\n $result = _cmd($id, 'query');\n\t$status = null; // service busy by default\n\t\n\tif ( (Config::$Linux && strstr($result, 'Active: active')) // linux\n\t\t|| (!Config::$Linux && strstr($result, 'RUNNING')) ) // windows\n\t\t$status = true;\n\tif ( (Config::$Linux && (strstr($result, 'Active: inactive') || strstr($result, 'Active: failed')) ) // linux\n\t\t|| (!Config::$Linux && strstr($result, 'STOPPED')) ) // windows\n\t\t$status = false;\n\t\t\n\treturn $status;\n}", "public function isStopped();", "function stop($id)\n{\n\t// if service is not running\n\tif ( status($id) !== true )\n\t\treturn false;\n\n $result = _cmd($id, 'stop');\n\n\t$status = Config::$Linux\n\t\t? !status($id) // FIXME: for linux just return current status\n\t\t: ( strstr($result, 'STOP_PENDING') || strstr($result, 'STOPPED') ) ? true : false;\n\n\t\n\treturn $status;\n}", "function isStopped();", "public function isServiceEnabled(): bool\n {\n return $this->getModuleRegistry()->isModuleEnabled(SchemaConfigurationFunctionalityModuleResolver::SCHEMA_CONFIGURATION);\n }", "public function exists($name)\n {\n return isset($this->services[$name]);\n }", "public function has_no_inactive_dependencies(): bool;", "public function isServiceLoaded(string $serviceName): bool;", "public function has_inactive_dependencies(): bool;", "public function deleteService(int $id):bool\n {\n $deleteService = $this->pdo->prepare('DELETE FROM services WHERE id = :id');\n\n return $deleteService->execute(array( ':id' => $id));\n\n }", "private function updateSingleServiceStatus($action, $service)\n {\n if ($this->plugins[$service]->is_account) {\n $this->updateServicesVars($service);\n\n $s_daemon = new supportDaemon();\n if ($s_daemon->is_error()) {\n msg_dialog::display(\n sprintf(_(\"Could not get execute action %s on service %s.\"), $action, $service),\n msgPool::siError($s_daemon->get_error()), ERROR_DIALOG\n );\n } else {\n $target = array($this->parent->getBaseObject()->netConfigDNS->macAddress);\n if ($action == 'status') {\n $res = $s_daemon->append_call(\"Service.is_running\", $target, array(\"args\" => array($service)));\n if ($s_daemon->is_error()) {\n msg_dialog::display(\n sprintf(_(\"Could not get execute action %s on service %s.\"), $action, $service),\n msgPool::siError($s_daemon->get_error()), ERROR_DIALOG\n );\n } else {\n $this->plugins[$service]->setStatus($res == \"yes\"?\"running\":\"stopped\");\n }\n } else {\n $res = $s_daemon->append_call(\"Service.manage\", $target, array(\"args\" => array($service, $action)));\n\n if ($s_daemon->is_error()) {\n msg_dialog::display(\n sprintf(_(\"Could not get execute action %s on service %s.\"), $action, $service),\n msgPool::siError($s_daemon->get_error()), ERROR_DIALOG\n );\n } elseif (preg_match(\"/^done/\", $res)) {\n $this->plugins[$service]->setStatus(self::$actionStatus[$action]);\n }\n }\n }\n }\n }", "public function is_active();", "private function carHasAlreadyStoppedCharging()\n {\n return in_array( $this -> charging_status, [ OrderStatusEnum :: CHARGED, OrderStatusEnum :: USED_UP ]);\n }", "public function quoteHasServiceProduct()\n {\n $quote = Mage::getSingleton('checkout/session')->getQuote();\n if (!$quote->hasData('has_service_product')) {\n $quote->setData('has_service_product', false);\n foreach ($quote->getAllVisibleItems() as $item) {\n if ($this->isQuoteItemServiceProduct($item)) {\n $quote->setData('has_service_product', true);\n break;\n }\n }\n }\n\n return $quote->getData('has_service_product');\n }", "public function cancelService()\n\t{\n\t\t$client = $this->getClient();\n\n\t\treturn $client->devices->cancelService($this);\n\t}", "public function isStopped(): bool;", "public function isTagalysActive()\n\t{\n\t\t//$status = $this->scopeConfig->getValue('tgs_search/default/status', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE);\n\t\t$status = $this->scopeConfig->getValue('tagalys_tglssearch/general/enable', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE);\n\n\t\tif ($status)\n\t\t{\n\n\t\t\t//$service = $this->tglssearchClientConnector;\n\t\t\t$service = $this->tglssearchClientConnector;\n\t\t $tagalys = $service->isRequestSuccess();\n\t\t if($tagalys)\n\t\t\t{\n\t\t\t\t//print_r('if');die;\n\t\t \treturn $service;\n\t\t }\n\t\t\telse\n\t\t\t{\n\t\t\t\t//print_r('else');die;\n\t\t \treturn false;\n\t\t }\n\n\t\t} else\n\t\t{\n\t\t\t//print_r('false');die;\n\t\t\treturn false;\n\t\t}\n\t\t//print_r('nthg');die;\n\t}", "public function isDeferredService($service): bool\n {\n return isset($this->deferredServices[$service]);\n }", "public static function isDeferredService($service){\n return \\Illuminate\\Foundation\\Application::isDeferredService($service);\n }", "public function disableShopServices()\n {\n return true;\n }", "public function check_list_id_service(){\n $response = array();\n $response['success'] = false;\n $response['connected'] = false;\n\n if( ! $this->is_valid_nonce( 'xbox_ajax_nonce' ) ){\n die();\n }\n\n if( ! isset( $_POST['service'] ) || ! isset( $_POST['list_id'] ) ){\n wp_send_json( $response );\n }\n\n $services = $this->plugin->options_manager->get_integrated_services( true, true );\n\n if( empty( $services ) ){\n wp_send_json( $response );\n }\n\n $service = Services::get_instance( $_POST['service'], array(\n 'api_key' => $services[$_POST['service']]['service-api-key'],\n 'token' => $services[$_POST['service']]['service-token'],\n 'url' => $services[$_POST['service']]['service-url'],\n 'email' => $services[$_POST['service']]['service-email'],\n 'password' => $services[$_POST['service']]['service-password'],\n ) );\n\n if( is_object( $service ) ){\n $all_services = Services::get_all();\n $allow_get_lists = $all_services[$_POST['service']]['allow']['get_lists'];\n if( $allow_get_lists ){\n if( $service->is_connect() ){\n $response['connected'] = true;\n if( $service->set_list_id( $_POST['list_id'] ) ){\n $response['success'] = true;\n }\n }\n } else{\n $response['connected'] = true;\n $response['success'] = true;\n }\n }\n wp_send_json( $response );\n }", "function changeServiceStatus ($pid_arr)\n{\n global $_TABLES;\n\n // first, disable all\n DB_query (\"UPDATE {$_TABLES['pingservice']} SET is_enabled = '0'\");\n if (isset($pid_arr)) {\n foreach ($pid_arr as $pid) { //enable those listed\n $pid = addslashes (COM_applyFilter ($pid, true));\n if (!empty ($pid)) {\n DB_query (\"UPDATE {$_TABLES['pingservice']} SET is_enabled = '1' WHERE pid = '$pid'\");\n }\n }\n }\n}", "public static function is_force_active() {\n\t\treturn false;\n\t}", "public function has(string $serviceId): bool;", "protected function shouldRegisterThisProcessWithResourcesCleaner(): bool\n {\n return self::isStatusCheck();\n }", "public function isPending(): bool;", "public function getAvailableServices();", "public function isServiceEligibleForChargeGeneration()\n\t{\n\t\tif ($this->service == null)\n\t\t{\n\t\t\tthrow new Exception_Assertion(\"RecurringCharge is not associated with a service, yet the 'isServiceEligibleForChargeGeneration' test was called\", \"RecurringCharge:\\n\". print_r($this, true));\n\t\t}\n\t\t\n\t\t// Get the most recent service object modelling this service on this account\n\t\t$objService = Service::getForId($this->service, false, true);\n\t\t\n\t\t// RecurringCharges only get generated if their associated service is active\n\t\tif ($objService->status == SERVICE_ACTIVE)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "protected function checkStatus()\n {\n $status = $this->autoTestController->checkStatus(Tools::getValue('queueItemId', 0));\n\n if ($status['finished']) {\n $this->autoTestController->stop(\n function () {\n return LoggerService::getInstance();\n }\n );\n }\n\n PacklinkPrestaShopUtility::dieJson($status);\n }", "public function getIsRunning();", "public function hasRunning()\n {\n return $this->running !== null;\n }", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function is_active(): bool;", "private function isFree(): bool {\n\t\treturn $this->memberIsEmpty('pid') && $this->memberIsEmpty('server');\n\t}", "function statusCheck($smsMessage, $service) {\n\t\t$subscribed = array();\n\t\t$waiting = array();\n\t\t$country = $smsMessage->getCountry();\t\n\t\t$sql = \"SELECT \\\"Service\\\", \\\"Number\\\", \\\"Status\\\" FROM \\\"Subscriptions\\\" WHERE \\\"Number\\\" = '\" . $smsMessage->getOriginator() . \"'\";\n\t\n\t\t$result = pg_query($this->dbConnection, $sql);\n\t\twhile ($rows = pg_fetch_array($result)) {\n\t\t\tswitch ($rows[\"Status\"]) {\n\t\t\t\tcase \"Subscribed\":\n\t\t\t\tif ($rows[\"Service\"] == $service || $service == \"all\") {\n\t\t\t\t\t$subscribed[] = $rows[\"Service\"];\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase \"Awaiting Confirmation\":\n\t\t\t\tif ($rows[\"Service\"] == $service || $service == \"all\") {\n\t\t\t\t\t$waiting[] = $rows[\"Service\"];\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\n\t\t$shortcode = $smsMessage->getRecipient();\t\t\n\t\t\n\t\tforeach ($subscribed as $service) {\n\t\t\t$serviceDetails = $this->getService($service);\n\t\t\t$message = \"You're subscribed to {$serviceDetails[\"Description\"]}. Text \\\"$service STOP\\\" to {$shortcode} to cancel\";\n\t\t\t$this->sendResponse($smsMessage, $message);\t\t\n\t\t}\n\t\t\n\t\tforeach ($waiting as $service) {\n\t\t\t$serviceDetails = $this->getService($service);\n \t\t$message = \"We are awaiting confirmation for your subscription to {$serviceDetails[\"Description\"]}. Text \\\"$service YES\\\" to {$shortcode} to confirm\";\n\t\t\t$this->sendResponse($smsMessage, $message);\t\t\n\t\t}\n\t}", "public function is_inactive(): bool;", "private function get_is_running(): bool\n\t{\n\t\treturn $this->status === self::STATUS_RUNNING;\n\t}", "public function checkTranslationServiceFailure() {\n\t\t$service = $this->service;\n\t\t$key = wfMemckey( \"translate-service-$service\" );\n\t\t$value = wfGetCache( CACHE_ANYTHING )->get( $key );\n\t\tif ( !is_string( $value ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tlist( $count, $failed ) = explode( '|', $value, 2 );\n\n\t\tif ( $failed + ( 2 * $this->serviceFailurePeriod ) < wfTimestamp() ) {\n\t\t\tif ( $count >= $this->serviceFailureCount ) {\n\t\t\t\twfDebugLog( 'translationservices', \"Translation service $service (was) restored\" );\n\t\t\t}\n\t\t\twfGetCache( CACHE_ANYTHING )->delete( $key );\n\n\t\t\treturn false;\n\t\t} elseif ( $failed + $this->serviceFailurePeriod < wfTimestamp() ) {\n\t\t\t/* We are in suspicious mode and one failure is enough to update\n\t\t\t * failed timestamp. If the service works however, let's use it.\n\t\t\t * Previous failures are forgotten after another failure period\n\t\t\t * has passed */\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check the failure count against the limit\n\t\treturn $count >= $this->serviceFailureCount;\n\t}", "public function isMaintenancePeriodActive() : bool\n {\n return $this->getMessage() !== null;\n }", "public function isRunning(): bool;", "public function testConsumeService(): void\n {\n // It might be possible to create a test that ask for a cancellation that require authorization\n // but this is simply unpractical for *this* test suite because\n // it takes around 16 minutes to have a CFDI with status \"cancelable con autorizacion\"\n $settings = $this->createSettingsFromEnvironment();\n $command = new GetPendingCommand('EKU9003173C9');\n $service = new GetPendingService($settings);\n $result = $service->obtainPending($command);\n\n $this->assertTrue(is_array($result->uuids()));\n $this->assertSame('', $result->error());\n }", "function iis_get_service_state($service_id)\n{\n}", "public function has_no_active_dependencies(): bool;", "public function isSingleton(string $serviceId): bool;", "public function check_activation_status () {\n $licenses_link = get_option( $this->token . '-url', '' );\n //echo \"<pre>\"; print_r( $this ); echo \"</pre>\"; die();\n $products = $this->get_detected_products();\n //echo \"<pre>\"; print_r( $products ); echo \"</pre>\"; die();\n $messages = array();\n if ( 0 < count( $products ) ) {\n foreach ( $products as $k => $v ) {\n if ( isset( $v['product_status'] ) && 'inactive' == $v['product_status'] ) {\n if( !empty( $licenses_link ) ) {\n $message = sprintf( __( '%s License is not active. To get started, activate it <a href=\"%s\">here</a>.', $this->domain ), $v['product_name'], $licenses_link );\n } else {\n $message = sprintf( __( '%s License is not active.', $this->domain ), $v['product_name'] );\n }\n if( !empty( $v[ 'errors_callback' ] ) && is_callable( $v[ 'errors_callback' ] ) ) {\n call_user_func_array( $v[ 'errors_callback' ], array( $message, 'warning' ) );\n } else {\n $messages[] = $message;\n }\n }\n }\n }\n if( !empty( $messages ) ) {\n $this->messages = $messages;\n }\n\n /**\n * We also ping UD server once per 24h\n * for getting any specific information.\n */\n $this->maybe_ping_ud();\n }", "function areFilesRunning($files, $serviceFiles)\n {\n if (count($files))\n\t foreach ($files as $file)\n\t\t if (!($file = $this->fileExists($file, $serviceFiles)) || !$file['running'])\n\t\t \treturn false;\n\t return true;\n }", "public function hasService($service, $context='default')\n {\n $this->logger->log(\"*** Dependency Injection - Looking for service $service\");\n if ($this->getServices()->has($service, $context)) {\n return self::SERVICE_IN_REGISTRY;\n }\n\n if ($this->getBuilder()->has($service, $context)) {\n return self::SERVICE_IN_BUILDER;\n }\n\n return self::SERVICE_NOT_FOUND;\n }", "public function ifFrontendexiste($id_service){\n\t\t\t\t\t$sql = \"SELECT * FROM frontend WHERE id_service='\".$id_service.\"' \";\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 isActive(){\n return (bool) ($this->hasStarted() && ! $this->hasExpired() && !$this->isCancelled());\n }", "public function isAvailable(): bool;", "public function isServiceStopped($companyId = null)\n {\n \n $recurringProfile = $this->getCurrentRecurringProfile();\n\n if (! $recurringProfile) {\n return true;\n }\n\n \n \n $company = $companyId\n ? $this->companyRepository->find($companyId)\n : Company::getCurrent();\n \n //For setting Payment Due status\n $expire = $this->isExpired($company->id);\n \n if ($recurringProfile->type == 'free') {\n //return false;\n }\n\n $currentDateTime = Carbon::now();\n\n $expirationDate = $recurringProfile->cycle_expired_on\n ? clone $recurringProfile->cycle_expired_on\n : clone $recurringProfile->created_at;\n\n if ($recurringProfile->state == 'Active'\n && ! in_array($recurringProfile->type, ['trial', 'manual'])\n ) {\n if ($recurringProfile->payment_status == 'Skipped') {\n $expirationDate->addDays(5); \n } else {\n $expirationDate->addDays(1);\n }\n }\n\n $isExpired = $currentDateTime->getTimestamp() >= $expirationDate->getTimestamp() ? true : false;\n \n return $expire;\n }", "function has_service_ownership($db, $team_id, $service_id){\n $sql = \"SELECT serviceId FROM servicelogins INNER JOIN services on servicelogins.serviceId = services.id WHERE teamId = ?\";\n $query = $db->prepare($sql);\n $query->bind_param(\"s\",$team_id);\n $query->execute();\n $query->bind_result($service);\n\n //if service_id is in the list of services owned by team_id, return true\n while($query->fetch()){\n if($service == $service_id){\n return true;\n }\n }\n //if we get here, someone's modifying the forms or sending custom POSTs\n return false;\n}", "public function hasServiceInstance($class):bool\n {\n // if the class is an object\n if (is_object($class)) {\n $class = get_class($class);\n }\n\n // if the class is an alias\n if ($alias = $this->getAlias($class)) {\n $class = $alias;\n }\n\n if (isset($this->services[$class])) {\n return true;\n }\n\n foreach ($this->services as $service) {\n if ($service instanceof $class) {\n return true;\n }\n }\n\n return false;\n }", "public function isDeactivatedPermanently()\n {\n if ($this->isDeactivatedSometime() === false)\n return false;\n \n return !$this->isDeactivatedTemporarily();\n }", "function isAvailable() ;", "function isAvailable() ;", "public static function StagCatalog_active_check() {\n\n if ( ! self::$active_plugins ) {\n self::init();\n }\n\n return in_array( 'stag-catalog/stag-catalog.php', self::$active_plugins ) || array_key_exists( 'stag-catalog/stag-catalog.php', self::$active_plugins );\n }", "public function IsActive ();", "public function inServiceText() {\n return 'This application is currently being serviced. Check back later.';\n }", "abstract public function checkAccessibleTokenService();" ]
[ "0.6826592", "0.6588942", "0.65440136", "0.6538319", "0.63970464", "0.63772005", "0.62827736", "0.6275691", "0.62646896", "0.62199605", "0.6203545", "0.6193636", "0.61149967", "0.6067219", "0.60358435", "0.60297287", "0.6009794", "0.5920987", "0.59140015", "0.5897413", "0.5895711", "0.58826333", "0.5873414", "0.5842799", "0.5776053", "0.57224727", "0.5693089", "0.56924784", "0.56840354", "0.5672078", "0.5666593", "0.5666045", "0.5664454", "0.56556755", "0.56451446", "0.5642573", "0.5619804", "0.5617214", "0.5615063", "0.5611573", "0.55619645", "0.5558796", "0.5550077", "0.5549755", "0.55433047", "0.55340004", "0.5523321", "0.55162233", "0.5501454", "0.55001503", "0.5487969", "0.5486251", "0.5485269", "0.54787534", "0.5467698", "0.5467199", "0.5460171", "0.5460171", "0.5460171", "0.5459509", "0.5459509", "0.5459509", "0.5459509", "0.5459509", "0.5459509", "0.5459509", "0.5459509", "0.5459509", "0.5459509", "0.5459509", "0.5459509", "0.5459509", "0.5459509", "0.54578286", "0.5451229", "0.5443386", "0.5439848", "0.5432152", "0.5406252", "0.5397892", "0.5375624", "0.5368005", "0.5355673", "0.5350151", "0.53406006", "0.53393674", "0.5324632", "0.52960783", "0.5294955", "0.52929574", "0.5291862", "0.5290818", "0.52833265", "0.52811706", "0.5276108", "0.5272892", "0.5272892", "0.5265475", "0.52647835", "0.5260647", "0.525995" ]
0.0
-1
/! \brief Forward plugin acls
function set_acl_base($base) { $this->acl_base = $base; foreach ($this->plugins as $name => $obj) { $this->plugins[$name]->set_acl_base($base); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function plugin_classes() {\n\t\t$this->options = new Options( $this ) ;\n\t\t$this->helpers = new Helpers( $this );\n\t\t$this->core = new Core( $this );\n\t}", "public function plugin_activate(){\n\t\t\n\t\t//call our custom content type function\n\t \t$this->register_location_content_type();\n\t\t//flush permalinks\n\t\tflush_rewrite_rules();\n\t}", "function activate_cps() {\n\trequire_once plugin_dir_path( __FILE__ ) . 'includes/class-cps-activator.php';\n\tcps_Activator::activate();\n}", "function activator()\n{\n require_once plugin_dir_path( __FILE__ ) . 'includes/Activator.php';\n\tActivator::activate();\n}", "public function plugin(){\r\n\t$args=func_get_args();\r\n\t$plugin_name=$args[0];\r\n\t$plugin_method=$args[1];\r\n\t$plugin_method_args = array_slice($args, 2);\r\n\tPlugins::instance()->Base=$this;\r\n\t$response=Plugins::instance()->call_method($plugin_name, $plugin_method, $plugin_method_args);\r\n\t$this->response($response);\r\n }", "abstract protected function activate_plugin();", "public function plugin_construction() {\t\r\n\t\r\n\t}", "function Plugin()\n\t{\n\t\t$this->Plugin_Base();\n\t}", "public function activatePlugin();", "public function plugin_activate(){\n\t\t//flush permalinks\n\t\tflush_rewrite_rules();\n\t}", "function plugonet_autoriser() {}", "function pasAction() {\n\t\t$this -> vue -> pasAction();\n\t}", "private function public_hooks()\n\t{\n\t}", "function __construct(){\n\t\t\t// if ( is_plugin_active( 'advanced-custom-fields-pro/acf.php' ) ) {\n //plugin is activated\n// }\n\t\t\tif(class_exists('acf')){\n\t\t\t\tadd_action( 'plugins_loaded', array( &$this, 'constants'), \t1);\n\t\t\t\tadd_action( 'plugins_loaded', array( &$this, 'required'), \t2);\n\n\t\t\t}\n\t\t\telse{\n\t\t\t\tadd_action( 'admin_notices', array( &$this, 'acfpro_missing_notice' ) );\n\t\t\t}\n\t\t\t\n\n\t\t}", "public function plugin_classes() {\r\n\t\t$this->filesystem = new PDT_Filesystem( $this );\r\n\t\t$this->auth = new PDT_Auth( $this );\r\n\t\t$this->api = new PDT_Api( $this );\r\n\t\t$this->plugins = new PDT_Plugins( $this );\r\n\t\t$this->installed = new PDT_Installed( $this );\r\n\t\t$this->cases = new PDT_Cases( $this );\r\n\t\t$this->clues = new PDT_Clues( $this );\r\n\t\t$this->detective = new PDT_Detective( $this );\r\n\t}", "function run_cf7b_result() {\r\n $plugin = new Cf7b_Admin_Settings();\r\n $plugin = new Cf7b_Frontennd_Options();\r\n\t\r\n}", "function acf_register_admin_tool($class)\n{\n}", "protected function _registerPlugins()\n\t{\n\t\t//$aclPlugin = new AclPlugins($adminAclController);\n\t\t//$logPlugin = new LogPlugins();\n\t\t\n\t\t//Daophp::getInstance() -> registerPlugin('acl', $aclPlugin);\n\t\t//Daophp::getInstance() -> registerPlugin('log', $logPlugin);\n\t}", "public function __construct() {\n\n \tself::$instance = $this;\n\n \tadd_filter( 'themeco_update_api', array( $this, 'register' ) );\n \tadd_filter( 'themeco_update_cache', array( $this, 'cache_updates' ), 10, 2 );\n \tadd_action( 'themeco_update_api_response', array( $this, 'update' ) );\n\n add_action( 'init', array( $this, 'init' ) );\n // add_action( 'upgrader_pre_download', array( $this, 'upgrader_screen_message' ), 10, 3 );\n\n }", "function Connective_Callback($classname){\n\t\t//require_once(\"Connective.class.php\");\n\t}", "private function hooks() {\n\t\t\t// check for EDD when plugin is activated\n\t\t\tadd_action( 'admin_init', array( $this, 'activation' ), 1 );\n\t\t\t\n\t\t\t// plugin meta\n\t\t\tadd_filter( 'plugin_row_meta', array( $this, 'plugin_meta' ), null, 2 );\n\n\t\t\t// settings link on plugin page\n\t\t\tadd_filter( 'plugin_action_links_' . $this->basename, array( $this, 'settings_link' ), 10, 2 );\n\t\t\t\n\t\t\t// insert actions\n\t\t\tdo_action( 'edd_sd_setup_actions' );\n\t\t}", "function activate_ts()\n{\n require_once plugin_dir_path(__FILE__) . 'includes/class-ts-activator.php';\n TS_Activator::activate();\n}", "function classes() {\n\tcore();\n}", "function tb_onPluginActivate() {\r\n add_option('tagBeep_redirect_to_plugin', 'true');\r\n}", "function wp_dashboard_plugins()\n {\n }", "function _wp_call_all_hook($args)\n {\n }", "private function load_dependencies() {\n\n\t\t/**\n\t\t * The class responsible for contants\n\t\t */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'lib/class-aps-constants.php';\n\n\t\t/**\n\t\t * The class responsible for orchestrating the actions and filters of the\n\t\t * core plugin.\n\t\t */\n\t\t/* The class responsible to load all libraries */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-aps-loader.php';\n\n\t\t/**\n\t\t * The class responsible for defining internationalization functionality\n\t\t * of the plugin.\n\t\t */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-aps-i18n.php';\n\n\t\t/**\n\t\t * The class responsible for defining all actions that occur in the admin area.\n\t\t */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-aps-admin.php';\n\n\t\t/**\n\t\t * The class responsible for defining all actions that occur in the public-facing\n\t\t * side of the site.\n\t\t */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-aps-public.php';\n\n\t\t/**\n\t\t * The class responsible for loading config fields\n\t\t */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-aps-fields-loader.php';\n\n\t\t/**\n\t\t * The class responsible for defining all actions that occur in the aps gateway\n\t\t */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-gateway-loader.php';\n\n\t\t/**\n\t\t * The class responsible for defining all ajax actions that occur in the aps gateway\n\t\t */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-aps-ajax.php';\n\n\t\t/**\n\t\t * This class is responsible to all common woocommerce hooks\n\t\t */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-aps-wc-hooks.php';\n\n\t\t$this->loader = new APS_Loader();\n\n\t}", "private function define_public_hooks() {\n\n\t\t$plugin_public = new APS_Public( $this->get_plugin_name(), $this->get_version() );\n\n\t\t$this->loader->add_action( 'plugins_loaded', $plugin_public, 'load_helpers' );\n\t\t$this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );\n\t\t$this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );\n\t\t$this->loader->add_filter( 'woocommerce_locate_template', $plugin_public, 'woocommerce_override_template', 1, 3 );\n\t}", "public function initializePlugin();", "public function _setup()\n {\n add_action('admin_init', array($this, 'register'));\n add_action('plugin_action_links_' . CD_SLL_NAME, array($this, 'link'));\n }", "function Doku_Event_Handler() {\n\n // load action plugins\n $plugin = NULL;\n $pluginlist = plugin_list('action');\n\n foreach ($pluginlist as $plugin_name) {\n $plugin =& plugin_load('action',$plugin_name);\n\n if ($plugin !== NULL) $plugin->register($this);\n }\n }", "private function __construct() {\n\t\tadd_filter( 'init', array( $this, 'init' ) );\n\t\tadd_action( 'admin_init', array( $this, 'admin_init' ) );\n\t\tadd_action( 'admin_menu', array( $this, 'admin_menu' ) );\n\t\tadd_action( 'get_footer', array( $this, 'insert_code' ) );\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'track_outgoing' ) );\n\t\tadd_filter( 'plugin_action_links', array( $this, 'add_plugin_page_links' ), 10, 2 );\n\t}", "function jft_assistant_activate() {\n\trequire_once JFT_ASSISTANT_DIR__ . '/classes/JftAssistant/Autoloader.php';\n\tJftAssistant_Autoloader::register();\n\tJftAssistant_Plugin::get_instance()->activate();\n}", "function activate_akvockan_plugin() {\n\tInc\\Base\\Activate::activate();\n}", "public function __invoke($args, $assoc_args){\n\n $messages = array();\n $source = dirname(dirname(__FILE__));\n $destination = ABSPATH;\n\n\t\tif(chmod(\"$destination/wp-content/uploads\", 0777)){\n\t\t\t$messages[] = 'uploads directory made writable';\n\t\t}\n\n if(!isset($assoc_args['skip-gitignore'])){\n CM_CLI_Helper::copy(\"$source/optimal-setup/gitignore\", \"$destination/.gitignore\");\n\t\t\tCM_CLI_Helper::copy(\"$source/optimal-setup/wp-content/uploads/gitignore\", \"$destination/wp-content/uploads/.gitignore\");\n $messages[] = '.gitignore files copied';\n }\n\n if(!isset($assoc_args['skip-htaccess'])){\n CM_CLI_Helper::copy(\"$source/optimal-setup/htaccess\", \"$destination/.htaccess\");\n $messages[] = '.htaccess copied';\n }\n\n\t\tif(!isset($assoc_args['skip-default-themes'])){\n $current_theme = CM_CLI_Helper::active_theme_dir();\n\t\t\t$default_themes = array('twentyten', 'twentyeleven', 'twentytwelve',\n\t\t\t'twentythirteen', 'twentyfourteen', 'twentyfifteen', 'twentysixteen',\n\t\t\t'twentyseventeen', 'twentyeighteen', 'twentynineteen', 'twentytwenty');\n\t\t\t$theme_dir = dirname($current_theme);\n\t\t\t$current_theme = basename($current_theme);\n\t\t\tforeach($default_themes as $default_theme){\n\t\t\t\tif($default_theme != $current_theme){\n\t\t\t\t\tif(file_exists(\"$theme_dir/$default_theme\")){\n\t\t\t\t\t\tCM_CLI_Helper::delete_directory(\"$theme_dir/$default_theme\");\n\t\t\t\t\t\t$messages[] = \"Default theme '$default_theme' deleted\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n }\n\n if(!isset($assoc_args['keep-xmlrpc'])){\n // if(chmod(\"$destination/xmlrpc.php\", 0000)){ // changing this to delete instead of chmod because git\n\t\t\tif(unlink(\"$destination/xmlrpc.php\")){\n $messages[] = 'xmlrpc deleted';\n }else{\n WP_CLI::error( \"Could not delete xmlrpc.php. You could manually delete it or chmod it to 000.\" );\n }\n }\n\n WP_CLI::runcommand(\"rewrite structure '/%postname%/'\");\n $messages[] = \"Rewrite structure set to 'Post name'\";\n\n if(!empty($messages)){\n WP_CLI::success( \"The following operations were completed: \" . implode(', ', $messages) );\n }\n\t}", "public function __construct() {\n\t\t/*Define Autoloader class for plugin*/\n\t\t$autoloader_path = 'includes/class-autoloader.php';\n\t\t/**\n\t\t * Include autoloader class to load all of classes inside this plugin\n\t\t */\n\t\trequire_once trailingslashit( plugin_dir_path( __FILE__ ) ) . $autoloader_path;\n\n\t\t/*Define required constant for plugin*/\n\t\tConstant::define_constant();\n\n\t\t/**\n\t\t * Register activation hook.\n\t\t * Register activation hook for this plugin by invoking activate\n\t\t * in Restaurant_Booking_Plugin class.\n\t\t *\n\t\t * @param string $file path to the plugin file.\n\t\t * @param callback $function The function to be run when the plugin is activated.\n\t\t */\n\t\tregister_activation_hook(\n\t\t\t__FILE__,\n\t\t\tfunction () {\n\t\t\t\t$this->activate(\n\t\t\t\t\tnew Activator()\n\t\t\t\t);\n\t\t\t}\n\t\t);\n\t\t/**\n\t\t * Register deactivation hook.\n\t\t * Register deactivation hook for this plugin by invoking deactivate\n\t\t * in Restaurant_Booking_Plugin class.\n\t\t *\n\t\t * @param string $file path to the plugin file.\n\t\t * @param callback $function The function to be run when the plugin is deactivated.\n\t\t */\n\t\tregister_deactivation_hook(\n\t\t\t__FILE__,\n\t\t\tfunction () {\n\t\t\t\t$this->deactivate(\n\t\t\t\t\tnew Deactivator()\n\t\t\t\t);\n\t\t\t}\n\t\t);\n\t\t/**\n\t\t * Register uninstall hook.\n\t\t * Register uninstall hook for this plugin by invoking uninstall\n\t\t * in Restaurant_Booking_Plugin class.\n\t\t *\n\t\t * @param string $file path to the plugin file.\n\t\t * @param callback $function The function to be run when the plugin is uninstalled.\n\t\t */\n\t\tregister_uninstall_hook(\n\t\t\t__FILE__,\n\t\t\tarray( 'Restaurant_Booking_Plugin', 'uninstall' )\n\t\t);\n\t}", "function activate_horses() {\nrequire_once plugin_dir_path( __FILE__ ) . 'includes/class-horses-activator.php';\nhorses_Activator::activate();\n}", "function __construct() {\n add_action( 'plugins_loaded', array( $this, 'ssSearchPluginsLoadedHandlers' ) );\n }", "function __construct() {\n\t\tPluginUpdateIgnore::__construct();\n\t\tadd_action('admin_head-plugins.php', array(&$this, 'admin_jquery'));\n\t\tadd_action('admin_head-plugins.php', array(&$this, 'admin_css'));\n\t\tadd_action('admin_footer-plugins.php', array(&$this, 'admin_js'));\n\t}", "public function auth_plugin_wordpress() {\n debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);\n self::__construct();\n }", "private function setup_actions() {\n\t\tadd_option( self::OPTION_ACTIVE_PLUGINS, array() );\n\n\t\t// Loaded at priority 5 because all plugins are typically loaded before 'plugins_loaded'\n\t\tadd_action( 'plugins_loaded', array( $this, 'include_active_plugins' ), 5 );\n\n\t\tadd_action( 'init', array( $this, 'action_init' ) );\n\t}", "function __construct() \n {\n $this->plugin_path = plugin_dir_path( __FILE__ ); // has trailing /\n $this->plugin_url = plugin_dir_url( __FILE__ );\n // Set up activation hooks\n register_activation_hook( __FILE__, array(&$this, 'activate') );\n register_deactivation_hook( __FILE__, array(&$this, 'deactivate') );\n // Set up l10n\n // load_plugin_textdomain( 'plugin-name-locale', false, dirname( plugin_basename( __FILE__ ) ) . '/lang' );\n\n add_action( 'wp_enqueue_scripts', array( $this, 'queScripts'));\n \n add_action('admin_init', array( $this, 'adminInit'));\n add_action('admin_menu', array( $this, 'addMenu'));\n \n // Add your own hooks/filters\n add_action( 'init', array( $this, 'init') );\n add_filter( 'eStore_below_cart_checkout_filter', array( $this, 'addBeanstreamButton'));\n }", "function plugin_action_handler( $plugin='' ) {\n\t\t$this->add_ping( 'plugins', array( 'name' => $plugin ) );\n\t}", "public function applyPlugins($direction) {\n $dir = __DIR__ . '/plugins/' . $direction . '/' . $this->format . '/*';\n foreach (glob($dir) as $file) {\n $plugin = basename(str_replace('.php', '', $file));\n if (!is_dir($file) && !strstr($file, 'Common') && preg_match('/' . $this->applyPlugins . '/',\n $plugin)) {\n $className = \"FlexiProxy\\\\plugins\\\\$direction\\\\\" . $this->format . \"\\\\\" . $plugin;\n $plugin = new $className($this);\n if ($plugin->isThisMyDirection($direction) && $plugin->isThisMyFormat($this->format) && $plugin->isThisMyPath($this->uriRequested)) {\n $this->addStatusMessage(sprintf(_('ApplyPlugin: %s'),\n addslashes($className)), 'debug');\n $plugin->apply();\n }\n }\n }\n if (preg_match('/' . $this->applyPlugins . '/', 'CommonStatusMessages')) {\n $messager = new \\FlexiProxy\\plugins\\output\\html\\CommonStatusMessages($this);\n if ($messager->isThisMyDirection($direction) && $messager->isThisMyFormat($this->format)) {\n $this->addStatusMessage(sprintf(_('ApplyPlugin: %s'),\n addslashes(get_class($messager))), 'debug');\n $messager->apply();\n }\n }\n }", "private function add_hooks(){\n\t\n\t\tadd_action( 'plugin_action_links_' . UCLACOMPONENTSWP_PLUGIN_BASE, array( $this, 'add_plugin_action_link' ), 20 );\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'enqueue_backend_scripts_and_styles' ), 20 );\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'enqueue_public_scripts_and_styles' ), 20 );\n\t\n\t}", "public function handledClass();", "private static function add_actions() {\r\n\r\n\t\tif ( ! current_user_can( 'access_cp_pro' ) ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tself::add_action( 'cppro_get_assets_data', 'ConvertPlugServices::get_assets_data' );\r\n\r\n\t\tself::add_action( 'cppro_render_service_settings', 'ConvertPlugServices::render_settings' );\r\n\t\tself::add_action( 'cppro_save_service_settings', 'ConvertPlugServices::save_settings' );\r\n\t\tself::add_action( 'cppro_render_service_fields', 'ConvertPlugServices::render_fields' );\r\n\t\tself::add_action( 'cppro_connect_service', 'ConvertPlugServices::connect_service' );\r\n\t\tself::add_action( 'cppro_delete_service_account', 'ConvertPlugServices::delete_account' );\r\n\t\tself::add_action( 'cppro_render_service_accounts', 'ConvertPlugServices::render_service_accounts' );\r\n\t\tself::add_action( 'cppro_save_meta_settings', 'ConvertPlugServices::save_meta' );\r\n\r\n\t\tself::add_action( 'cppro_test_connection', 'ConvertPlugServices::test_connection' );\r\n\r\n\t}", "function _actions() {\n // adpress Specific filters\n //\n add_filter($this->prefix.\"MetaValue\", array(&$this->Admin_actions, 'getMetaValue'),1,2);\n add_filter($this->prefix.\"Render\", array(&$this->UI, \"render_shortcode\"),1,1);\n add_filter($this->prefix.\"Change Destination\", array(&$this->Admin_actions, 'processDestination'), 1, 2);\n add_filter($this->prefix.\"Settings\", array($this->Admin_actions, 'settings'), 1, 1);\n\n // adpress Specific actions\n //\n add_action($this->prefix.\"ProPack\", array(&$this->Admin_actions, 'propack'));\n \n // Regular Actions\n //\n add_action('init' ,array(&$this->Actions,'init') );\n add_action('widgets_init' ,create_function( '', 'register_widget( \"adpressWidget\" );'));\n\n // Admin Actions\n //\n add_action('admin_init' ,array(&$this->Admin_actions,'admin_init') );\n add_action('admin_print_styles' ,array(&$this->Admin_actions,'admin_print_styles') );\n add_action('manage_posts_custom_column' ,array(&$this->Admin_actions,'manage_posts_custom_column'));\n add_action('save_post' ,array(&$this->Admin_actions,'save_post') );\n\n // Mobile Listener\n //\n add_action('wp_ajax_csl_get_ads' , array(&$this->Mobile, 'GetAds') );\n add_action('wp_ajax_nopriv_csl_get_ads' , array(&$this->Mobile, 'GetAds') );\n add_action('wp_ajax_license_reset_propack' , array(&$this->Mobile, 'license_reset_propack'));\n add_action('wp_ajax_nopriv_license_reset_propack' , array(&$this->Mobile, 'license_reset_propack'));\n\n // Admin Filters\n //\n add_filter('manage_edit-adpress_ad_columns',array(&$this->Admin_Filters, 'adpress_ad_columns'));\n\n // Short Codes\n //\n add_shortcode('adpress' ,array(&$this->UI,'render_shortcode') );\n add_shortcode('ADPRESS' ,array(&$this->UI,'render_shortcode') );\n add_shortcode('AdPress' ,array(&$this->UI,'render_shortcode') );\n add_shortcode('Adpress' ,array(&$this->UI,'render_shortcode') );\n\n // Text Domains\n //\n load_plugin_textdomain($this->prefix, false, $this->base_name . '/languages/');\n }", "public function __invoke()\n {\n\n }", "function cec29_ald_functions_activation() {\n\t\t\n\t\t// get currently activated plugins\n\t\t$current_plugin = get_option(\"active_plugins\");\n\t\t\n\t\tif( count( $current_plugin ) > 0) {\n\t\t\t$required_plugins = array(\n\t\t\t\t'paid-memberships-pro/paid-memberships-pro.php',\n\t\t\t\t'pronamic-google-maps/pronamic-google-maps.php', \n\t\t\t\t'theme-my-login/theme-my-login.php' // @since 0.2.0\n\t\t\t) ;\n\t\t\tforeach( $required_plugins as $plugin_name ) {\n\t\t\t\tif( !in_array($plugin_name, $current_plugin ) ) {\n\t\t\t\t\t$error = __( \"Cette extension requiert \", 'cec29-ald-functions' ) ;\n\t\t\t\t\t$error .= $plugin_name . __( \". Merci de l'installer et l'activer avant d'activer cette extension.\", 'cec29-ald-functions' ) ;\n\t\t\t\t\twp_die( $error ) ;\n\t\t\t\t} \t\n\t\t\t}\n\t\t} else {\n\t\t\t$error = __( \"Aucun plugin n'est activé.\", 'cec29-ald-functions' ) ;\n\t\t\twp_die( $error ) ;\n\t\t}\n\t\t\n\t\t// register the custom taxonomy\n\t\tcec29_register_secteur_taxonomy();\n\t\t\n\t\t// reflush (in order to create the new permalink system)\n\t\t// see http://code.tutsplus.com/articles/the-rewrite-api-post-types-taxonomies--wp-25488\n\t\tflush_rewrite_rules();\n\t}", "function __construct() {\r\n add_action( 'template_redirect', array($this, 'user_browser_and_os_check'));\r\n add_action('clear_auth_cookie', array($this, 'clear_user_browser_and_os'));\r\n\r\n\r\n }", "function __construct() {\n\n\t\t// load plugin text domain\n\t\tadd_action( 'init', array( $this, 'textdomain' ) );\n\n\t\tregister_activation_hook( __FILE__, array( $this, 'activate' ) );\n\t\tregister_deactivation_hook( __FILE__, array( $this, 'deactivate' ) );\n\n\t $this->register_hotlink_scanner();\n\t\n\t}", "public function init_plugin()\n {\n }", "function __construct() {\n\t\n\t\tadd_action('admin_menu', array( &$this,'rc_scd_register_menu') );\n\t\tadd_action('load-index.php', array( &$this,'rc_scd_redirect_dashboard') );\n \n\t}", "public function __construct(){\n\n \n\n \n // Loads the optionpanel/framework.php\n $this->include_redux_core();\n \n \n \n //optionpanel/config.php\n $this->inlcude_redux_config();\n \n $this->get_domain_list();\n \n /**\n * This code loads the cache status from ArvanCloud\n * And set the default values in plugin option\n */\n $this->call_cache_status();\n\n /**\n * Called when options in plugin options saved\n */\n \n add_action('redux/options/arvan/saved', array($this, 'redux_after_saved'));\n \n \n \n /**\n * Include javascripts\n */\n add_action('admin_enqueue_scripts', array($this, 'arvan_wp_enqueue_scripts'));\n \n \n /**\n * Will be called when Total Purge button clicked in plugin option\n */\n add_action(\"wp_ajax_nopriv_arvan_total_purge\", array($this,\"arvan_total_purge_ajax_nopriv\"));\n add_action(\"wp_ajax_arvan_total_purge\", array($this,\"arvan_total_purge_ajax\"));\n \n \n /**\n * To purge specific post url cache\n */\n add_action(\"publish_post\", array($this,\"arvan_save_post_action\"),1,3);\n\n }", "public function __invoke()\n {\n }", "public function listPlugin()\n\t{\n\t\t\n\t}", "public function __construct($plugin) {\n // register actions\n \tacf_add_options_page(array(\n \t\t'page_title' => __('Podcast Plugin'),\n \t\t'menu_title' => __('Podcast Plugin'),\n \t\t'menu_slug' => self::SLUG,\n \t\t'capability' => 'manage_options',\n \t\t'redirect' => false\n \t));\n\n \tadd_action('init', array(&$this, \"init\"));\n \tadd_action('admin_menu', array(&$this, 'admin_menu'), 20);\n \tadd_filter(\"plugin_action_links_$plugin\", array(&$this, 'plugin_settings_link'));\n }", "function ldaACFBlocks_run_plugin() {\n\t$plugin = new ldaACFBlocks();\n\t$plugin->run();\n}", "private function _actions()\n {\n add_action('init', array($this, 'add_short_code'));\n add_action('wp_enqueue_scripts', array($this, 'cyl_enqueue_script'));\n }", "private function actions()\n {\n }", "public function __construct() {\n\n\t\t\t\t$this->settings = array(\n\t\t\t\t\t'version' => '0.3',\n\t\t\t\t\t'url' => plugin_dir_url( __FILE__ ),\n\t\t\t\t\t'path' => plugin_dir_path( __FILE__ )\n\t\t\t\t);\n\n\t\t\t\t// set text domain\n\t\t\t\tload_plugin_textdomain( 'acf-faculty-selector', false, dirname( plugin_basename( __FILE__ ) ) . '/lang' );\n\n\t\t\t\tregister_activation_hook( __FILE__, array( $this, 'acfedu' ) );\n\t\t\t\tregister_deactivation_hook( __FILE__, array( $this, 'acfedu_plugin_deactivation' ) );\n\n\t\t\t\t// actions\n\t\t\t\tadd_action( 'acf/include_field_types', array( $this, 'acfedu_include_field_types' ) ); // v5\n\t\t\t\tadd_action( 'acf/register_fields', array( $this, 'acfedu_include_field_types' ) ); // v4\n\t\t\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'acfedu_add_css' ) );\n\t\t\t\tadd_action( 'admin_menu', array( $this, 'acfedu_add_admin_pages' ) );\n\t\t\t\tadd_action( 'admin_init', array( $this, 'acfedu_errors' ) );\n\t\t\t\t// add_action( 'save_post', array( $this, 'acfedu_before_save' ), 10, 3 );\n\n\t\t\t\t// always load, move to $this->\n\t\t\t\tadd_action( 'init', array( $this, 'acfedu_upload_csv_file' ) );\n\t\t\t\tadd_action( 'init', array( $this, 'acfedu_do_something_with_file' ) );\n\t\t\t\tadd_action( 'init', array( $this, 'acfedu_import_raw_data' ) );\n\t\t\t\tadd_action( 'init', array( $this, 'acfedu_import_preset_countries' ) );\n\t\t\t\tadd_action( 'init', array( $this, 'acfedu_preserve_settings' ) );\n\t\t\t\tadd_action( 'init', array( $this, 'acfedu_truncate_table' ) );\n\n\t\t\t\t// filters\n\t\t\t\tadd_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), array( $this, 'acfedu_settings_link' ) );\n\n\t\t\t\t// always load\n\t\t\t\t$this->acfedu_admin_menu();\n\t\t\t\t$this->acfedu_load_admin_pages();\n\t\t\t\t$this->acfedu_check_uploads_folder();\n\t\t\t\t$this->acfedu_check_table();\n\n\t\t\t\tinclude( 'inc/donate-box.php' );\n\t\t\t\tinclude( 'inc/help-tabs.php' );\n\t\t\t\tinclude( 'inc/country-field.php' );\n\t\t\t\tinclude( 'inc/verify-csv-data.php' );\n\t\t\t}", "function __construct(){\n //\"Constants\" setup\n $this->plugin_url = plugin_dir_url(__FILE__).'/';\n $this->plugin_path = plugin_dir_path(__FILE__).'/';\n //Initialize the options\n $this->get_options();\n //check requirements\n register_activation_hook(__FILE__, array(&$this,'check_requirements'));\n //get sub-packages\n requireDir(plugin_dir_path(__FILE__).'/lib/inc');\n //here are some examples to get started with\n if(class_exists('PageTemplater')){\n add_action( 'plugins_loaded', array( 'PageTemplater', 'get_instance' ) );\n }\n if(class_exists('MSDSimpleSectionedPage')){\n add_action('admin_print_footer_scripts',array('MSDSimpleSectionedPage','info_footer_hook') ,100); \n add_action('admin_enqueue_scripts',array('MSDSimpleSectionedPage','enqueue_admin')); \n }\n if(class_exists('MSDSectionedPage')){\n add_action('admin_print_footer_scripts',array('MSDSectionedPage','info_footer_hook') ,100); \n add_action('admin_enqueue_scripts',array('MSDSectionedPage','enqueue_admin')); \n add_action( 'init', array( 'MSDSectionedPage', 'add_metaboxes' ) );\n }\n }", "function activate_spark_cw_fresh() {\n require_once plugin_dir_path(__FILE__) . 'includes/class-spark-cw-fresh-activator.php';\n Spark_Cw_Fresh_Activator::activate();\n}", "public function run() {\n\t\t// include other classes\n\t\trequire_once plugin_dir_path ( __FILE__ ) . 'class-top-ratter-render.php';\n\t\trequire_once plugin_dir_path ( __FILE__ ) . 'class-top-ratter-sso.php';\n\t\t\n\t\t// enque styles for this plugin\n\t\tadd_action ( 'wp_enqueue_scripts', array (\n\t\t\t\t$this,\n\t\t\t\t'register_plugin_styles' \n\t\t) );\n\t\t// enque jquery scripts for this plugin\n\t\tadd_action ( 'wp_enqueue_scripts', array (\n\t\t\t\t$this,\n\t\t\t\t'register_plugin_script' \n\t\t) );\n\t\t// add submit action form to redirect and catch from admin.php\n\t\tadd_action ( 'admin_post_tr_action', array (\n\t\t\t\t$this,\n\t\t\t\t'prefix_admin_tr_action' \n\t\t) );\n\t\t\n\t\t// check if plugin tables exist\n\t\t$this->table_check ();\n\t\t\n\t\t// instantiate the render class for shortcodes to work\n\t\t$shortcodes = new Top_Ratter_Render ();\n\t}", "public function __invoke();", "public function __invoke();", "public function __invoke();", "public function __invoke();", "function __construct() {\n\t\tadd_action('admin_menu', array( &$this,'scd_register_menu') );\n\t\tadd_action('load-index.php', array( &$this,'scd_redirect_dashboard') );\n\t}", "function fast_plugin_fast_plug($flux){\r\n\t\r\n\r\n\t// traitement des parametres envoye par le plugin \r\n\t// $exec : exec = demo\r\n\t// $type : affichage complet(appel des pipelines classiques) ou simple\r\n\t// $template : on souhaite un autre affichage que l'admin de spip, on precise le template\r\n\t// $fond : doit on utiliser un fond particulier ?\r\n\t$exec = $flux[\"args\"][\"exec\"];\r\n\t$type = $flux[\"args\"][\"type\"];\r\n\t$template = $flux[\"args\"][\"template\"];\r\n\t$fond = $flux[\"args\"][\"fond\"];\r\n\t\r\n\t\r\n\t// chargemenr debut de page de spip\r\n\tinclude_spip('inc/presentation');\r\n\tinclude_spip('inc/utils');\r\n\t$commencer_page = charger_fonction('commencer_page', 'inc');\r\n\t\r\n\t\r\n\t// On verifie que la personne a bien acces a cette page\r\n\t$exec_get = _request(\"exec\");\r\n\tif (!autoriser('acces','fast_plugin',$exec_get)){\r\n\t\techo $commencer_page();\r\n\t\tdie(\"pas les droits\");\r\n\t}\r\n\t\r\n\tif(!$fond) $fond = $exec;\r\n\t\r\n\t// on recupere la page \r\n\t$page =recuperer_fond(\"fonds/$fond\",array_merge( $_GET, $_POST ));\r\n\t\r\n\t// utilisation d'un template ou utilisation classique\r\n\tif ($template){\r\n\t\t\r\n\t\t// pour les templates on place dans la page de template \r\n\t\t// le commentaire html <!-- content_here --> \r\n\t\t// reste l'inclusion du css qui ne peut pour le \r\n\t\t// momment ne peut être dans un fichier de plugin prevoir une autre\r\n\t\t// position , un repertoire css a la racine ?\r\n\t\t\r\n\t\techo $commencer_page();\r\n\t\tpipeline('exec_init',array('args'=>array('exec'=>\"$exec\"),'data'=>''));\r\n\t\t$new_template = recuperer_fond(\"fonds/template/$template/$template\",array_merge( $_GET, $_POST ));\r\n\t\t$new_template = str_replace(\"<!-- content_here -->\",$page,$new_template);\r\n\t\techo $new_template;\r\n\t}else{\r\n\t\techo $commencer_page();\r\n\t\tpipeline('exec_init',array('args'=>array('exec'=>\"$exec\"),'data'=>''));\r\n\t\tif ($type=='complet'){\r\n\t\t\techo debut_gauche('', true);\r\n\t\t\techo pipeline('affiche_gauche',array('args'=>array('exec'=>$exec),'data'=>''));\r\n\t\t\techo creer_colonne_droite('', true);\r\n\t\t\techo pipeline('affiche_droite',array('args'=>array('exec'=>$exec),'data'=>''));\r\n\t\t\techo debut_droite('', true);\r\n\t\t\techo pipeline('affiche_milieu',array('args'=>array('exec'=>$exec),'data'=>''));\r\n\t\t\techo $page;\r\n\t\t\techo fin_gauche(), fin_page();\r\n\t\t}\r\n\t\telse if ($type=='simple'){\r\n\t\t\techo $page;\r\n\t\t\techo fin_page();\r\n\t\t}\r\n\t}\r\n\t\r\n\treturn $flux;\r\n}", "function JPlugin(& $subject) {\n\t\tparent::__construct($subject);\n\t}", "public function bootPlugin();", "function __construct(){\n\t\t$this->add_hooks();\n\t}", "function hooks()\r\n {\r\n // Add a settings link next to the \"Deactivate\" link on the plugin listing page\r\n add_filter( 'plugin_action_links_cart-converter/cart-converter.php', array( &$this, 'plugin_action_links' ) );\r\n \t\r\n // woo order status changed\r\n \tadd_action( 'woocommerce_order_status_failed', array( &$this->cartController, 'add_abandon_cart' ) );\r\n add_action( 'woocommerce_order_status_changed', array( &$this->cartController, 'order_status_changed' ), 10, 3);\r\n\t\t\r\n // place order when create new from cart_id\r\n add_action( 'woocommerce_checkout_order_processed', array( &$this->cartController, 'convert_place_order' ), 10, 3);\r\n\r\n // restore cart from email\r\n add_action( 'plugins_loaded', array( &$this, 'plugins_loaded' ) );\r\n\r\n do_action( 'cart_converter_main_hooks_action' );\r\n }", "public function postConnect()\n {\n $this->Lexer->addExitPattern('</' . self::getElementName() . '>', 'plugin_' . webcomponent::PLUGIN_NAME . '_' . $this->getPluginComponent());\n\n }", "public function actions();", "function affiliatewp_direct_link_tracking() {\n\t if ( ! class_exists( 'Affiliate_WP' ) ) {\n\t if ( ! class_exists( 'AffiliateWP_Activation' ) ) {\n\t require_once 'includes/class-activation.php';\n\t }\n\n\t $activation = new AffiliateWP_Activation( plugin_dir_path( __FILE__ ), basename( __FILE__ ) );\n\t $activation = $activation->run();\n\t } else {\n\t return AffiliateWP_Direct_Link_Tracking::instance();\n\t }\n\t}", "protected function init() {\n\t\t$routes = $this->routePluginManager;\n\t\tforeach ( array (\n\t\t\t\t'hostname' => __NAMESPACE__ . '\\Hostname',\n\t\t\t\t'literal' => __NAMESPACE__ . '\\Literal',\n\t\t\t\t'part' => __NAMESPACE__ . '\\Part',\n\t\t\t\t'regex' => __NAMESPACE__ . '\\Regex',\n\t\t\t\t'scheme' => __NAMESPACE__ . '\\Scheme',\n\t\t\t\t'segment' => __NAMESPACE__ . '\\Segment',\n\t\t\t\t'wildcard' => __NAMESPACE__ . '\\Wildcard',\n\t\t\t\t'query' => __NAMESPACE__ . '\\Query',\n\t\t\t\t'method' => __NAMESPACE__ . '\\Method' \n\t\t) as $name => $class ) {\n\t\t\t$routes->setInvokableClass ( $name, $class );\n\t\t}\n\t\t;\n\t}", "function __construct(){\n\t\tadd_action('init', array($this, 'stockIntegrateWithVC'));\n\t}", "public function hookActionDispatcher()\r\n {\r\n $this->context->smarty->registerPlugin('modifier', 'formaatButton', array('SmartyModifiersClass', 'formaatButton'));\r\n }", "function autoriser_fast_plugin_acces_dist($faire, $type, $exec){\r\n\t\r\n\t// les infos sur l'auteur\r\n\t$statut_auteur = $GLOBALS['connect_statut'];\r\n\t$statut_type = $GLOBALS['connect_toutes_rubriques']; \r\n\t$id = $GLOBALS['auteur_session']['id_auteur'];\r\n\t\r\n\t\r\n\t$pages = get_fast_plugin();\r\n\t$droit = $pages[$exec][\"statut\"];\r\n\t$allowed = $pages[$exec][\"allowed\"];\r\n\tif ($allowed) $allowed = explode(',',$allowed);\r\n\t\r\n\t// si les droits ne sont pas renseigne on bloque le processus \r\n\tif (!$droit) return false;\r\n\t\r\n\t// si allowed on test les droits de l'auteur\r\n\tif ($allowed && in_array($id,$allowed))return true;\r\n\t\r\n\t// pour les admin restreint \r\n\tif ($statut_type != 1 && $statut_auteur==\"0minirezo\") $statut_auteur = 'admin_restreint';\r\n\r\n\t$acces = array(\t\"tous\" => 0,\"admin_restreint\" => 1,\"admin\" => 2 ,\"aucun\" => 4);\r\n\t$type_acces = array(\"1comite\" => 0,\"admin_restreint\" => 1,\"0minirezo\" => 2 );\r\n\t\r\n\t\r\n\tif($type_acces[$statut_auteur] >= $acces[$droit]) return true;\r\n\t\r\n\treturn false;\r\n\t\r\n}", "function adminer_object() {\r\n include_once \"./plugins/plugin.php\";\r\n \r\n // autoloader\r\n foreach (glob(\"plugins/*.php\") as $filename) {\r\n include_once \"./$filename\";\r\n }\r\n \r\n $plugins = array(\r\n // specify enabled plugins here\r\n // new AdminerDumpXml,\r\n // new AdminerTinymce,\r\n // new AdminerFileUpload(\"data/\"),\r\n // new AdminerSlugify,\r\n // new AdminerTranslation,\r\n // new AdminerForeignSystem,\r\n // new AdminerLoginPasswordLess(password_hash(\"\", PASSWORD_DEFAULT)),\r\n );\r\n \r\n /* It is possible to combine customization and plugins:\r\n class AdminerCustomization extends AdminerPlugin {\r\n }\r\n return new AdminerCustomization($plugins);\r\n */\r\n class AdminerCustomization extends AdminerPlugin {\r\n function login($login, $password) {\r\n // validate user submitted credentials\r\n return true;\r\n }\r\n }\r\n return new AdminerCustomization($plugins);\r\n \r\n // return new AdminerPlugin($plugins);\r\n}", "function __construct(){\n //Actions\n add_action('init', array($this, 'init'), 1);\n \n }", "public static function execute() {\n if ( defined( 'DPC_EXECUTED' ) ) {\n return false;\n } else {\n define( 'DPC_EXECUTED', true );\n }\n load_textdomain( 'dustpress-components', dirname( __FILE__ ) . '/languages/' . get_locale() . '.mo' );\n add_action( 'init', __NAMESPACE__ . '\\Components::add_options_page', 1, 1 );\n add_action( 'init', __NAMESPACE__ . '\\Components::hook', 20, 1 );\n add_action( 'dustpress/partials', __NAMESPACE__ . '\\Components::add_partial_path', 1, 1 );\n add_action( 'activated_plugin', __NAMESPACE__ . '\\Components::load_first', 1, 1 );\n add_filter( 'acf/format_value/type=group', __NAMESPACE__ . '\\Components::add_layout_static', 150, 3 );\n add_filter( 'acf/format_value/type=group', __NAMESPACE__ . '\\Data::component_handle', 200, 3 );\n add_filter( 'acf/format_value/type=flexible_content', __NAMESPACE__ . '\\Data::component_handle', 200, 3 );\n }", "public function __construct(){\n register_activation_hook( __FILE__, [self::class, 'activatePlugin'] );\n register_deactivation_hook( __FILE__, [self::class, 'deactivatePlugin'] );\n\n // Init hook\n add_action( 'init', [self::class, 'createPostType'] );\n add_action( 'init', [self::class, 'createTaxonomies'], 0 );\n add_action( 'init', [self::class, 'addCustomRewriteRule'] );\n add_action( 'admin_init', [self::class, 'registerSettings'] );\n add_action( 'admin_menu', [self::class, 'addMenu'] );\n\n // Shortcodes\n add_shortcode( 'ege_cards', [self::class, 'basicShortcode'] );\n add_shortcode( 'ege_cards_sticky_card', [self::class, 'stickyWidgetShortcode'] );\n add_shortcode( 'ege_cards_link', [self::class, 'linkShortcode'] );\n add_shortcode( 'ege_cards_disclaimer', [self::class, 'disclaimerShortcode'] );\n add_shortcode( 'ege_cards_related', [self::class, 'relatedShortcode'] );\n\n // AJAX\n add_action( 'wp_ajax_nopriv_ege_cards_search_cards', [self::class, 'ajaxSearchCards'] );\n add_action( 'wp_ajax_ege_cards_search_cards', [self::class, 'ajaxSearchCards'] );\n add_action( 'wp_ajax_ege_cards_make_sticky', [self::class, 'ajaxMakeSticky'] );\n add_action( 'wp_ajax_ege_cards_save_related_links', [self::class, 'saveRelatedLinks']);\n\n // Custom POST title filter\n add_filter( 'enter_title_here', [self::class, 'postTitlePlaceholder'] );\n\n // Custom POST help tab\n add_action( 'admin_head', [self::class, 'postHelpTab'] );\n\n // Custom POST updated messages\n add_filter( 'post_updated_messages', [self::class, 'postUpdatedMessages'] );\n add_filter( 'bulk_post_updated_messages', [self::class, 'postBulkMessages'], 10, 2 );\n\n // Custom POST save\n add_action('save_post', [self::class, 'saveCard']);\n\n // Hack to remove uncessecary meta boxes\n add_filter( 'hidden_meta_boxes', [self::class, 'filterHiddenBoxes'], 10, 3 );\n\n // Add button to POST edit text area\n add_action('media_buttons', [self::class, 'addCustomLinkButton'], 15);\n \n // Add disclaimer metabox\n add_action( 'add_meta_boxes', array(self::class, 'addDisclaimerMetaBox' ), 1000);\n add_action( 'save_post', [self::class, 'savePostMeta']);\n\n // Enqueue admin sctipts\n add_action( 'admin_enqueue_scripts', [self::class, 'addAdminScripts'], 10, 1 );\n\n // Add extra column tp travelcards table view\n add_filter( 'manage_travelcard_posts_columns' , [self::class, 'addColumns'] );\n add_action( 'manage_posts_custom_column' , [self::class, 'customColumns'], 10, 2 );\n }", "public function __construct() {\r\n add_action( 'plugins_loaded', [ $this, 'update_db_check' ] );\r\n \r\n }", "function run_wandelust_afip() {\n\n\t$plugin = new Baat_Afip();\n\n}", "private function hooks() {\n\n\t\t\t// plugin meta\n\t\t\tadd_filter( 'plugin_row_meta', array( $this, 'plugin_meta' ), null, 2 );\n\n\t\t\t// Add template folder\n\t\t\tadd_filter( 'affwp_template_paths', array( $this, 'template' ) );\n\n\t\t}", "public function index() {\n\t\t$params = func_get_args();\n\t\t$this->_loadPlugin(...$params);\n\t}", "function vimport_abonnes_autoriser() {\n}", "public function plugin_activate_hook() {\r\n add_option( 'woolentor_do_activation_redirect', TRUE );\r\n add_option( 'woolentor_do_activation_library_cache', TRUE );\r\n }", "private function define_admin_hooks() {\n\t\t$plugin_admin = new Soisy_Pagamento_Rateale_Admin( $this->get_plugin_name(), $this->get_version() );\n\n\t\t$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );\n $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );\n $this->loader->add_filter( 'woocommerce_payment_gateways', $plugin_admin, 'payment_methods' );\n\t\t\n $this->loader->add_filter( 'soisy_settings', $plugin_admin, 'soisy_vars' );\n\t\t\n\t\t$this->loader->add_filter('plugin_action_links', $plugin_admin,'add_soisy_action_links', 10, 2);\n\t\t\n\t\t/*\n\t\t * Payments Gateways extend WC_Payment_Gateway\n\t\t * To have them work properly they must be hooked to 'plugins_loaded'\n\t\t */\n add_action( 'plugins_loaded', 'init_Soisy_Pagamento_Rateale_Gateway_Settings');\n\t}", "function cl_autoriser(){}", "public function __invoke( ...$args );", "function add_wp_hooks(){\n\n\t\t$comments = new WordpressConnectComments();\n\t\t$like = new WordpressConnectLikeButton();\n\n\t}", "public static function init() {\n\t\tadd_action( 'add_meta_boxes', array( 'ReplyContextPlugin', 'add_meta_boxes' ) );\n\t\tadd_action( 'save_post', array( 'ReplyContextPlugin', 'save_postdata' ), 5, 1 );\n\n\t\tadd_filter( 'webmention_links', array( 'ReplyContextPlugin', 'webmention_links' ), 10, 2 );\n\t\tadd_action( 'loop_start', array( 'ReplyContextPlugin', 'loop_start' ) );\n\t}", "public function __construct() {\n require_once __DIR__ . '/vendor/autoload.php';\n $this->define_constants();\n register_activation_hook( __FILE__, array( $this, 'activate' ) ); \n add_action( 'plugins_loaded', array( $this, 'init_plugin' ) ); \n }", "function __construct() {\n add_action( 'acf/init', [ $this, 'init' ], 20 );\n }", "private function __construct() {\n global $wp_version;\n\n // Load plugin text domain\n add_action('init', array($this, 'load_plugin_textdomain'));\n\n // Load public-facing style sheet and JavaScript.\n add_action('wp_enqueue_scripts', array($this, 'enqueue_styles_and_scripts'));\n\n // Add support for h5p shortcodes.\n add_shortcode('h5p', array($this, 'shortcode'));\n\n // Adds JavaScript settings to the bottom of the page.\n add_action('wp_footer', array($this, 'add_settings'));\n\n // Clean up tmp editor files\n add_action('h5p_daily_cleanup', array($this, 'remove_old_tmp_files'));\n\n // Check for library updates\n add_action('h5p_daily_cleanup', array($this, 'get_library_updates'));\n\n // Remove old log messages\n add_action('h5p_daily_cleanup', array($this, 'remove_old_log_events'));\n\n // Always check if the plugin has been updated to a newer version\n add_action('init', array('H5P_Plugin', 'check_for_updates'), 1);\n\n // Add menu options to admin bar.\n add_action('admin_bar_menu', array($this, 'admin_bar'), 999);\n\n // REST API\n add_action('rest_api_init', array($this, 'rest_api_init'));\n\n // Removes all H5P data for this blog\n if (version_compare($wp_version, '5.1', '>=')) {\n add_action('wp_delete_site', array($this, 'delete_site'));\n }\n else {\n // Deprecated since 5.1\n add_action('delete_blog', array($this, 'delete_blog'));\n }\n }", "public function plugins_loadedWPaction() {\n\t\tload_plugin_textdomain ( get_class ( $this ), false, dirname ( plugin_basename ( $this->application()->filename ) ) . \"/languages/\" );\n\t\twp_enqueue_style ( 'jquery-ui_smoothness', $this->application ()->pluginuri () . '/library/public/css/smoothness/jquery-ui-1.8.13.custom.css', null, $this->application ()->version () );\n\t\twp_enqueue_style ( 'v35v_style_css', $this->application ()->pluginuri () . '/library/public/css/style.css', null, $this->application ()->version () );\n\t\twp_enqueue_script ( 'v35v_script_js', $this->application ()->pluginuri () . '/library/public/js/script.js', null, $this->application ()->version () );\n\t}" ]
[ "0.6139873", "0.58667225", "0.5790669", "0.5725044", "0.57025534", "0.5685241", "0.56785566", "0.566157", "0.5645913", "0.56161046", "0.55661166", "0.55433965", "0.54695606", "0.5449446", "0.544547", "0.542351", "0.541232", "0.53835815", "0.53727955", "0.5338268", "0.5292509", "0.52853215", "0.5277875", "0.5273353", "0.52696365", "0.52557814", "0.5245238", "0.5222384", "0.5221112", "0.52147776", "0.5205614", "0.52048075", "0.52000856", "0.51902986", "0.51768434", "0.51753753", "0.5174215", "0.5171509", "0.51693267", "0.5164143", "0.51498735", "0.51450545", "0.5144726", "0.51395845", "0.5137233", "0.5133077", "0.5124484", "0.5123224", "0.5120067", "0.5117643", "0.5111588", "0.5103194", "0.5093825", "0.50888526", "0.508862", "0.5081892", "0.50705296", "0.5063506", "0.50595886", "0.50584614", "0.5056604", "0.50515413", "0.50507593", "0.50481385", "0.5032903", "0.5028502", "0.5028502", "0.5028502", "0.5028502", "0.5025588", "0.5019643", "0.5000813", "0.49927524", "0.4991958", "0.498881", "0.49773243", "0.4974464", "0.49711713", "0.4967035", "0.4966267", "0.49571228", "0.49562863", "0.49560606", "0.4949951", "0.4946971", "0.49452484", "0.4944888", "0.4936352", "0.49341103", "0.49291706", "0.4927346", "0.4927128", "0.49259382", "0.49256122", "0.49256104", "0.4925563", "0.49248886", "0.49242735", "0.49227896", "0.49182644", "0.491144" ]
0.0
-1
/! \brief Forward plugin acls
function set_acl_category($category) { $this->acl_category = $category; foreach ($this->plugins as $name => $obj) { $this->plugins[$name]->set_acl_category($category); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function plugin_classes() {\n\t\t$this->options = new Options( $this ) ;\n\t\t$this->helpers = new Helpers( $this );\n\t\t$this->core = new Core( $this );\n\t}", "public function plugin_activate(){\n\t\t\n\t\t//call our custom content type function\n\t \t$this->register_location_content_type();\n\t\t//flush permalinks\n\t\tflush_rewrite_rules();\n\t}", "function activate_cps() {\n\trequire_once plugin_dir_path( __FILE__ ) . 'includes/class-cps-activator.php';\n\tcps_Activator::activate();\n}", "function activator()\n{\n require_once plugin_dir_path( __FILE__ ) . 'includes/Activator.php';\n\tActivator::activate();\n}", "public function plugin(){\r\n\t$args=func_get_args();\r\n\t$plugin_name=$args[0];\r\n\t$plugin_method=$args[1];\r\n\t$plugin_method_args = array_slice($args, 2);\r\n\tPlugins::instance()->Base=$this;\r\n\t$response=Plugins::instance()->call_method($plugin_name, $plugin_method, $plugin_method_args);\r\n\t$this->response($response);\r\n }", "abstract protected function activate_plugin();", "public function plugin_construction() {\t\r\n\t\r\n\t}", "function Plugin()\n\t{\n\t\t$this->Plugin_Base();\n\t}", "public function activatePlugin();", "public function plugin_activate(){\n\t\t//flush permalinks\n\t\tflush_rewrite_rules();\n\t}", "function plugonet_autoriser() {}", "function pasAction() {\n\t\t$this -> vue -> pasAction();\n\t}", "private function public_hooks()\n\t{\n\t}", "function __construct(){\n\t\t\t// if ( is_plugin_active( 'advanced-custom-fields-pro/acf.php' ) ) {\n //plugin is activated\n// }\n\t\t\tif(class_exists('acf')){\n\t\t\t\tadd_action( 'plugins_loaded', array( &$this, 'constants'), \t1);\n\t\t\t\tadd_action( 'plugins_loaded', array( &$this, 'required'), \t2);\n\n\t\t\t}\n\t\t\telse{\n\t\t\t\tadd_action( 'admin_notices', array( &$this, 'acfpro_missing_notice' ) );\n\t\t\t}\n\t\t\t\n\n\t\t}", "public function plugin_classes() {\r\n\t\t$this->filesystem = new PDT_Filesystem( $this );\r\n\t\t$this->auth = new PDT_Auth( $this );\r\n\t\t$this->api = new PDT_Api( $this );\r\n\t\t$this->plugins = new PDT_Plugins( $this );\r\n\t\t$this->installed = new PDT_Installed( $this );\r\n\t\t$this->cases = new PDT_Cases( $this );\r\n\t\t$this->clues = new PDT_Clues( $this );\r\n\t\t$this->detective = new PDT_Detective( $this );\r\n\t}", "function run_cf7b_result() {\r\n $plugin = new Cf7b_Admin_Settings();\r\n $plugin = new Cf7b_Frontennd_Options();\r\n\t\r\n}", "function acf_register_admin_tool($class)\n{\n}", "protected function _registerPlugins()\n\t{\n\t\t//$aclPlugin = new AclPlugins($adminAclController);\n\t\t//$logPlugin = new LogPlugins();\n\t\t\n\t\t//Daophp::getInstance() -> registerPlugin('acl', $aclPlugin);\n\t\t//Daophp::getInstance() -> registerPlugin('log', $logPlugin);\n\t}", "public function __construct() {\n\n \tself::$instance = $this;\n\n \tadd_filter( 'themeco_update_api', array( $this, 'register' ) );\n \tadd_filter( 'themeco_update_cache', array( $this, 'cache_updates' ), 10, 2 );\n \tadd_action( 'themeco_update_api_response', array( $this, 'update' ) );\n\n add_action( 'init', array( $this, 'init' ) );\n // add_action( 'upgrader_pre_download', array( $this, 'upgrader_screen_message' ), 10, 3 );\n\n }", "function Connective_Callback($classname){\n\t\t//require_once(\"Connective.class.php\");\n\t}", "private function hooks() {\n\t\t\t// check for EDD when plugin is activated\n\t\t\tadd_action( 'admin_init', array( $this, 'activation' ), 1 );\n\t\t\t\n\t\t\t// plugin meta\n\t\t\tadd_filter( 'plugin_row_meta', array( $this, 'plugin_meta' ), null, 2 );\n\n\t\t\t// settings link on plugin page\n\t\t\tadd_filter( 'plugin_action_links_' . $this->basename, array( $this, 'settings_link' ), 10, 2 );\n\t\t\t\n\t\t\t// insert actions\n\t\t\tdo_action( 'edd_sd_setup_actions' );\n\t\t}", "function activate_ts()\n{\n require_once plugin_dir_path(__FILE__) . 'includes/class-ts-activator.php';\n TS_Activator::activate();\n}", "function classes() {\n\tcore();\n}", "function tb_onPluginActivate() {\r\n add_option('tagBeep_redirect_to_plugin', 'true');\r\n}", "function wp_dashboard_plugins()\n {\n }", "function _wp_call_all_hook($args)\n {\n }", "private function load_dependencies() {\n\n\t\t/**\n\t\t * The class responsible for contants\n\t\t */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'lib/class-aps-constants.php';\n\n\t\t/**\n\t\t * The class responsible for orchestrating the actions and filters of the\n\t\t * core plugin.\n\t\t */\n\t\t/* The class responsible to load all libraries */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-aps-loader.php';\n\n\t\t/**\n\t\t * The class responsible for defining internationalization functionality\n\t\t * of the plugin.\n\t\t */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-aps-i18n.php';\n\n\t\t/**\n\t\t * The class responsible for defining all actions that occur in the admin area.\n\t\t */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-aps-admin.php';\n\n\t\t/**\n\t\t * The class responsible for defining all actions that occur in the public-facing\n\t\t * side of the site.\n\t\t */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-aps-public.php';\n\n\t\t/**\n\t\t * The class responsible for loading config fields\n\t\t */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-aps-fields-loader.php';\n\n\t\t/**\n\t\t * The class responsible for defining all actions that occur in the aps gateway\n\t\t */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-gateway-loader.php';\n\n\t\t/**\n\t\t * The class responsible for defining all ajax actions that occur in the aps gateway\n\t\t */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-aps-ajax.php';\n\n\t\t/**\n\t\t * This class is responsible to all common woocommerce hooks\n\t\t */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-aps-wc-hooks.php';\n\n\t\t$this->loader = new APS_Loader();\n\n\t}", "public function initializePlugin();", "private function define_public_hooks() {\n\n\t\t$plugin_public = new APS_Public( $this->get_plugin_name(), $this->get_version() );\n\n\t\t$this->loader->add_action( 'plugins_loaded', $plugin_public, 'load_helpers' );\n\t\t$this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );\n\t\t$this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );\n\t\t$this->loader->add_filter( 'woocommerce_locate_template', $plugin_public, 'woocommerce_override_template', 1, 3 );\n\t}", "public function _setup()\n {\n add_action('admin_init', array($this, 'register'));\n add_action('plugin_action_links_' . CD_SLL_NAME, array($this, 'link'));\n }", "function Doku_Event_Handler() {\n\n // load action plugins\n $plugin = NULL;\n $pluginlist = plugin_list('action');\n\n foreach ($pluginlist as $plugin_name) {\n $plugin =& plugin_load('action',$plugin_name);\n\n if ($plugin !== NULL) $plugin->register($this);\n }\n }", "private function __construct() {\n\t\tadd_filter( 'init', array( $this, 'init' ) );\n\t\tadd_action( 'admin_init', array( $this, 'admin_init' ) );\n\t\tadd_action( 'admin_menu', array( $this, 'admin_menu' ) );\n\t\tadd_action( 'get_footer', array( $this, 'insert_code' ) );\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'track_outgoing' ) );\n\t\tadd_filter( 'plugin_action_links', array( $this, 'add_plugin_page_links' ), 10, 2 );\n\t}", "function jft_assistant_activate() {\n\trequire_once JFT_ASSISTANT_DIR__ . '/classes/JftAssistant/Autoloader.php';\n\tJftAssistant_Autoloader::register();\n\tJftAssistant_Plugin::get_instance()->activate();\n}", "function activate_akvockan_plugin() {\n\tInc\\Base\\Activate::activate();\n}", "public function __invoke($args, $assoc_args){\n\n $messages = array();\n $source = dirname(dirname(__FILE__));\n $destination = ABSPATH;\n\n\t\tif(chmod(\"$destination/wp-content/uploads\", 0777)){\n\t\t\t$messages[] = 'uploads directory made writable';\n\t\t}\n\n if(!isset($assoc_args['skip-gitignore'])){\n CM_CLI_Helper::copy(\"$source/optimal-setup/gitignore\", \"$destination/.gitignore\");\n\t\t\tCM_CLI_Helper::copy(\"$source/optimal-setup/wp-content/uploads/gitignore\", \"$destination/wp-content/uploads/.gitignore\");\n $messages[] = '.gitignore files copied';\n }\n\n if(!isset($assoc_args['skip-htaccess'])){\n CM_CLI_Helper::copy(\"$source/optimal-setup/htaccess\", \"$destination/.htaccess\");\n $messages[] = '.htaccess copied';\n }\n\n\t\tif(!isset($assoc_args['skip-default-themes'])){\n $current_theme = CM_CLI_Helper::active_theme_dir();\n\t\t\t$default_themes = array('twentyten', 'twentyeleven', 'twentytwelve',\n\t\t\t'twentythirteen', 'twentyfourteen', 'twentyfifteen', 'twentysixteen',\n\t\t\t'twentyseventeen', 'twentyeighteen', 'twentynineteen', 'twentytwenty');\n\t\t\t$theme_dir = dirname($current_theme);\n\t\t\t$current_theme = basename($current_theme);\n\t\t\tforeach($default_themes as $default_theme){\n\t\t\t\tif($default_theme != $current_theme){\n\t\t\t\t\tif(file_exists(\"$theme_dir/$default_theme\")){\n\t\t\t\t\t\tCM_CLI_Helper::delete_directory(\"$theme_dir/$default_theme\");\n\t\t\t\t\t\t$messages[] = \"Default theme '$default_theme' deleted\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n }\n\n if(!isset($assoc_args['keep-xmlrpc'])){\n // if(chmod(\"$destination/xmlrpc.php\", 0000)){ // changing this to delete instead of chmod because git\n\t\t\tif(unlink(\"$destination/xmlrpc.php\")){\n $messages[] = 'xmlrpc deleted';\n }else{\n WP_CLI::error( \"Could not delete xmlrpc.php. You could manually delete it or chmod it to 000.\" );\n }\n }\n\n WP_CLI::runcommand(\"rewrite structure '/%postname%/'\");\n $messages[] = \"Rewrite structure set to 'Post name'\";\n\n if(!empty($messages)){\n WP_CLI::success( \"The following operations were completed: \" . implode(', ', $messages) );\n }\n\t}", "public function __construct() {\n\t\t/*Define Autoloader class for plugin*/\n\t\t$autoloader_path = 'includes/class-autoloader.php';\n\t\t/**\n\t\t * Include autoloader class to load all of classes inside this plugin\n\t\t */\n\t\trequire_once trailingslashit( plugin_dir_path( __FILE__ ) ) . $autoloader_path;\n\n\t\t/*Define required constant for plugin*/\n\t\tConstant::define_constant();\n\n\t\t/**\n\t\t * Register activation hook.\n\t\t * Register activation hook for this plugin by invoking activate\n\t\t * in Restaurant_Booking_Plugin class.\n\t\t *\n\t\t * @param string $file path to the plugin file.\n\t\t * @param callback $function The function to be run when the plugin is activated.\n\t\t */\n\t\tregister_activation_hook(\n\t\t\t__FILE__,\n\t\t\tfunction () {\n\t\t\t\t$this->activate(\n\t\t\t\t\tnew Activator()\n\t\t\t\t);\n\t\t\t}\n\t\t);\n\t\t/**\n\t\t * Register deactivation hook.\n\t\t * Register deactivation hook for this plugin by invoking deactivate\n\t\t * in Restaurant_Booking_Plugin class.\n\t\t *\n\t\t * @param string $file path to the plugin file.\n\t\t * @param callback $function The function to be run when the plugin is deactivated.\n\t\t */\n\t\tregister_deactivation_hook(\n\t\t\t__FILE__,\n\t\t\tfunction () {\n\t\t\t\t$this->deactivate(\n\t\t\t\t\tnew Deactivator()\n\t\t\t\t);\n\t\t\t}\n\t\t);\n\t\t/**\n\t\t * Register uninstall hook.\n\t\t * Register uninstall hook for this plugin by invoking uninstall\n\t\t * in Restaurant_Booking_Plugin class.\n\t\t *\n\t\t * @param string $file path to the plugin file.\n\t\t * @param callback $function The function to be run when the plugin is uninstalled.\n\t\t */\n\t\tregister_uninstall_hook(\n\t\t\t__FILE__,\n\t\t\tarray( 'Restaurant_Booking_Plugin', 'uninstall' )\n\t\t);\n\t}", "function __construct() {\n add_action( 'plugins_loaded', array( $this, 'ssSearchPluginsLoadedHandlers' ) );\n }", "function activate_horses() {\nrequire_once plugin_dir_path( __FILE__ ) . 'includes/class-horses-activator.php';\nhorses_Activator::activate();\n}", "function __construct() {\n\t\tPluginUpdateIgnore::__construct();\n\t\tadd_action('admin_head-plugins.php', array(&$this, 'admin_jquery'));\n\t\tadd_action('admin_head-plugins.php', array(&$this, 'admin_css'));\n\t\tadd_action('admin_footer-plugins.php', array(&$this, 'admin_js'));\n\t}", "public function auth_plugin_wordpress() {\n debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);\n self::__construct();\n }", "private function setup_actions() {\n\t\tadd_option( self::OPTION_ACTIVE_PLUGINS, array() );\n\n\t\t// Loaded at priority 5 because all plugins are typically loaded before 'plugins_loaded'\n\t\tadd_action( 'plugins_loaded', array( $this, 'include_active_plugins' ), 5 );\n\n\t\tadd_action( 'init', array( $this, 'action_init' ) );\n\t}", "function plugin_action_handler( $plugin='' ) {\n\t\t$this->add_ping( 'plugins', array( 'name' => $plugin ) );\n\t}", "function __construct() \n {\n $this->plugin_path = plugin_dir_path( __FILE__ ); // has trailing /\n $this->plugin_url = plugin_dir_url( __FILE__ );\n // Set up activation hooks\n register_activation_hook( __FILE__, array(&$this, 'activate') );\n register_deactivation_hook( __FILE__, array(&$this, 'deactivate') );\n // Set up l10n\n // load_plugin_textdomain( 'plugin-name-locale', false, dirname( plugin_basename( __FILE__ ) ) . '/lang' );\n\n add_action( 'wp_enqueue_scripts', array( $this, 'queScripts'));\n \n add_action('admin_init', array( $this, 'adminInit'));\n add_action('admin_menu', array( $this, 'addMenu'));\n \n // Add your own hooks/filters\n add_action( 'init', array( $this, 'init') );\n add_filter( 'eStore_below_cart_checkout_filter', array( $this, 'addBeanstreamButton'));\n }", "public function applyPlugins($direction) {\n $dir = __DIR__ . '/plugins/' . $direction . '/' . $this->format . '/*';\n foreach (glob($dir) as $file) {\n $plugin = basename(str_replace('.php', '', $file));\n if (!is_dir($file) && !strstr($file, 'Common') && preg_match('/' . $this->applyPlugins . '/',\n $plugin)) {\n $className = \"FlexiProxy\\\\plugins\\\\$direction\\\\\" . $this->format . \"\\\\\" . $plugin;\n $plugin = new $className($this);\n if ($plugin->isThisMyDirection($direction) && $plugin->isThisMyFormat($this->format) && $plugin->isThisMyPath($this->uriRequested)) {\n $this->addStatusMessage(sprintf(_('ApplyPlugin: %s'),\n addslashes($className)), 'debug');\n $plugin->apply();\n }\n }\n }\n if (preg_match('/' . $this->applyPlugins . '/', 'CommonStatusMessages')) {\n $messager = new \\FlexiProxy\\plugins\\output\\html\\CommonStatusMessages($this);\n if ($messager->isThisMyDirection($direction) && $messager->isThisMyFormat($this->format)) {\n $this->addStatusMessage(sprintf(_('ApplyPlugin: %s'),\n addslashes(get_class($messager))), 'debug');\n $messager->apply();\n }\n }\n }", "private function add_hooks(){\n\t\n\t\tadd_action( 'plugin_action_links_' . UCLACOMPONENTSWP_PLUGIN_BASE, array( $this, 'add_plugin_action_link' ), 20 );\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'enqueue_backend_scripts_and_styles' ), 20 );\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'enqueue_public_scripts_and_styles' ), 20 );\n\t\n\t}", "public function handledClass();", "private static function add_actions() {\r\n\r\n\t\tif ( ! current_user_can( 'access_cp_pro' ) ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tself::add_action( 'cppro_get_assets_data', 'ConvertPlugServices::get_assets_data' );\r\n\r\n\t\tself::add_action( 'cppro_render_service_settings', 'ConvertPlugServices::render_settings' );\r\n\t\tself::add_action( 'cppro_save_service_settings', 'ConvertPlugServices::save_settings' );\r\n\t\tself::add_action( 'cppro_render_service_fields', 'ConvertPlugServices::render_fields' );\r\n\t\tself::add_action( 'cppro_connect_service', 'ConvertPlugServices::connect_service' );\r\n\t\tself::add_action( 'cppro_delete_service_account', 'ConvertPlugServices::delete_account' );\r\n\t\tself::add_action( 'cppro_render_service_accounts', 'ConvertPlugServices::render_service_accounts' );\r\n\t\tself::add_action( 'cppro_save_meta_settings', 'ConvertPlugServices::save_meta' );\r\n\r\n\t\tself::add_action( 'cppro_test_connection', 'ConvertPlugServices::test_connection' );\r\n\r\n\t}", "function _actions() {\n // adpress Specific filters\n //\n add_filter($this->prefix.\"MetaValue\", array(&$this->Admin_actions, 'getMetaValue'),1,2);\n add_filter($this->prefix.\"Render\", array(&$this->UI, \"render_shortcode\"),1,1);\n add_filter($this->prefix.\"Change Destination\", array(&$this->Admin_actions, 'processDestination'), 1, 2);\n add_filter($this->prefix.\"Settings\", array($this->Admin_actions, 'settings'), 1, 1);\n\n // adpress Specific actions\n //\n add_action($this->prefix.\"ProPack\", array(&$this->Admin_actions, 'propack'));\n \n // Regular Actions\n //\n add_action('init' ,array(&$this->Actions,'init') );\n add_action('widgets_init' ,create_function( '', 'register_widget( \"adpressWidget\" );'));\n\n // Admin Actions\n //\n add_action('admin_init' ,array(&$this->Admin_actions,'admin_init') );\n add_action('admin_print_styles' ,array(&$this->Admin_actions,'admin_print_styles') );\n add_action('manage_posts_custom_column' ,array(&$this->Admin_actions,'manage_posts_custom_column'));\n add_action('save_post' ,array(&$this->Admin_actions,'save_post') );\n\n // Mobile Listener\n //\n add_action('wp_ajax_csl_get_ads' , array(&$this->Mobile, 'GetAds') );\n add_action('wp_ajax_nopriv_csl_get_ads' , array(&$this->Mobile, 'GetAds') );\n add_action('wp_ajax_license_reset_propack' , array(&$this->Mobile, 'license_reset_propack'));\n add_action('wp_ajax_nopriv_license_reset_propack' , array(&$this->Mobile, 'license_reset_propack'));\n\n // Admin Filters\n //\n add_filter('manage_edit-adpress_ad_columns',array(&$this->Admin_Filters, 'adpress_ad_columns'));\n\n // Short Codes\n //\n add_shortcode('adpress' ,array(&$this->UI,'render_shortcode') );\n add_shortcode('ADPRESS' ,array(&$this->UI,'render_shortcode') );\n add_shortcode('AdPress' ,array(&$this->UI,'render_shortcode') );\n add_shortcode('Adpress' ,array(&$this->UI,'render_shortcode') );\n\n // Text Domains\n //\n load_plugin_textdomain($this->prefix, false, $this->base_name . '/languages/');\n }", "public function __invoke()\n {\n\n }", "function cec29_ald_functions_activation() {\n\t\t\n\t\t// get currently activated plugins\n\t\t$current_plugin = get_option(\"active_plugins\");\n\t\t\n\t\tif( count( $current_plugin ) > 0) {\n\t\t\t$required_plugins = array(\n\t\t\t\t'paid-memberships-pro/paid-memberships-pro.php',\n\t\t\t\t'pronamic-google-maps/pronamic-google-maps.php', \n\t\t\t\t'theme-my-login/theme-my-login.php' // @since 0.2.0\n\t\t\t) ;\n\t\t\tforeach( $required_plugins as $plugin_name ) {\n\t\t\t\tif( !in_array($plugin_name, $current_plugin ) ) {\n\t\t\t\t\t$error = __( \"Cette extension requiert \", 'cec29-ald-functions' ) ;\n\t\t\t\t\t$error .= $plugin_name . __( \". Merci de l'installer et l'activer avant d'activer cette extension.\", 'cec29-ald-functions' ) ;\n\t\t\t\t\twp_die( $error ) ;\n\t\t\t\t} \t\n\t\t\t}\n\t\t} else {\n\t\t\t$error = __( \"Aucun plugin n'est activé.\", 'cec29-ald-functions' ) ;\n\t\t\twp_die( $error ) ;\n\t\t}\n\t\t\n\t\t// register the custom taxonomy\n\t\tcec29_register_secteur_taxonomy();\n\t\t\n\t\t// reflush (in order to create the new permalink system)\n\t\t// see http://code.tutsplus.com/articles/the-rewrite-api-post-types-taxonomies--wp-25488\n\t\tflush_rewrite_rules();\n\t}", "function __construct() {\r\n add_action( 'template_redirect', array($this, 'user_browser_and_os_check'));\r\n add_action('clear_auth_cookie', array($this, 'clear_user_browser_and_os'));\r\n\r\n\r\n }", "function __construct() {\n\n\t\t// load plugin text domain\n\t\tadd_action( 'init', array( $this, 'textdomain' ) );\n\n\t\tregister_activation_hook( __FILE__, array( $this, 'activate' ) );\n\t\tregister_deactivation_hook( __FILE__, array( $this, 'deactivate' ) );\n\n\t $this->register_hotlink_scanner();\n\t\n\t}", "public function init_plugin()\n {\n }", "function __construct() {\n\t\n\t\tadd_action('admin_menu', array( &$this,'rc_scd_register_menu') );\n\t\tadd_action('load-index.php', array( &$this,'rc_scd_redirect_dashboard') );\n \n\t}", "public function __construct(){\n\n \n\n \n // Loads the optionpanel/framework.php\n $this->include_redux_core();\n \n \n \n //optionpanel/config.php\n $this->inlcude_redux_config();\n \n $this->get_domain_list();\n \n /**\n * This code loads the cache status from ArvanCloud\n * And set the default values in plugin option\n */\n $this->call_cache_status();\n\n /**\n * Called when options in plugin options saved\n */\n \n add_action('redux/options/arvan/saved', array($this, 'redux_after_saved'));\n \n \n \n /**\n * Include javascripts\n */\n add_action('admin_enqueue_scripts', array($this, 'arvan_wp_enqueue_scripts'));\n \n \n /**\n * Will be called when Total Purge button clicked in plugin option\n */\n add_action(\"wp_ajax_nopriv_arvan_total_purge\", array($this,\"arvan_total_purge_ajax_nopriv\"));\n add_action(\"wp_ajax_arvan_total_purge\", array($this,\"arvan_total_purge_ajax\"));\n \n \n /**\n * To purge specific post url cache\n */\n add_action(\"publish_post\", array($this,\"arvan_save_post_action\"),1,3);\n\n }", "public function __invoke()\n {\n }", "public function listPlugin()\n\t{\n\t\t\n\t}", "public function __construct($plugin) {\n // register actions\n \tacf_add_options_page(array(\n \t\t'page_title' => __('Podcast Plugin'),\n \t\t'menu_title' => __('Podcast Plugin'),\n \t\t'menu_slug' => self::SLUG,\n \t\t'capability' => 'manage_options',\n \t\t'redirect' => false\n \t));\n\n \tadd_action('init', array(&$this, \"init\"));\n \tadd_action('admin_menu', array(&$this, 'admin_menu'), 20);\n \tadd_filter(\"plugin_action_links_$plugin\", array(&$this, 'plugin_settings_link'));\n }", "function ldaACFBlocks_run_plugin() {\n\t$plugin = new ldaACFBlocks();\n\t$plugin->run();\n}", "private function _actions()\n {\n add_action('init', array($this, 'add_short_code'));\n add_action('wp_enqueue_scripts', array($this, 'cyl_enqueue_script'));\n }", "private function actions()\n {\n }", "function __construct(){\n //\"Constants\" setup\n $this->plugin_url = plugin_dir_url(__FILE__).'/';\n $this->plugin_path = plugin_dir_path(__FILE__).'/';\n //Initialize the options\n $this->get_options();\n //check requirements\n register_activation_hook(__FILE__, array(&$this,'check_requirements'));\n //get sub-packages\n requireDir(plugin_dir_path(__FILE__).'/lib/inc');\n //here are some examples to get started with\n if(class_exists('PageTemplater')){\n add_action( 'plugins_loaded', array( 'PageTemplater', 'get_instance' ) );\n }\n if(class_exists('MSDSimpleSectionedPage')){\n add_action('admin_print_footer_scripts',array('MSDSimpleSectionedPage','info_footer_hook') ,100); \n add_action('admin_enqueue_scripts',array('MSDSimpleSectionedPage','enqueue_admin')); \n }\n if(class_exists('MSDSectionedPage')){\n add_action('admin_print_footer_scripts',array('MSDSectionedPage','info_footer_hook') ,100); \n add_action('admin_enqueue_scripts',array('MSDSectionedPage','enqueue_admin')); \n add_action( 'init', array( 'MSDSectionedPage', 'add_metaboxes' ) );\n }\n }", "public function __construct() {\n\n\t\t\t\t$this->settings = array(\n\t\t\t\t\t'version' => '0.3',\n\t\t\t\t\t'url' => plugin_dir_url( __FILE__ ),\n\t\t\t\t\t'path' => plugin_dir_path( __FILE__ )\n\t\t\t\t);\n\n\t\t\t\t// set text domain\n\t\t\t\tload_plugin_textdomain( 'acf-faculty-selector', false, dirname( plugin_basename( __FILE__ ) ) . '/lang' );\n\n\t\t\t\tregister_activation_hook( __FILE__, array( $this, 'acfedu' ) );\n\t\t\t\tregister_deactivation_hook( __FILE__, array( $this, 'acfedu_plugin_deactivation' ) );\n\n\t\t\t\t// actions\n\t\t\t\tadd_action( 'acf/include_field_types', array( $this, 'acfedu_include_field_types' ) ); // v5\n\t\t\t\tadd_action( 'acf/register_fields', array( $this, 'acfedu_include_field_types' ) ); // v4\n\t\t\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'acfedu_add_css' ) );\n\t\t\t\tadd_action( 'admin_menu', array( $this, 'acfedu_add_admin_pages' ) );\n\t\t\t\tadd_action( 'admin_init', array( $this, 'acfedu_errors' ) );\n\t\t\t\t// add_action( 'save_post', array( $this, 'acfedu_before_save' ), 10, 3 );\n\n\t\t\t\t// always load, move to $this->\n\t\t\t\tadd_action( 'init', array( $this, 'acfedu_upload_csv_file' ) );\n\t\t\t\tadd_action( 'init', array( $this, 'acfedu_do_something_with_file' ) );\n\t\t\t\tadd_action( 'init', array( $this, 'acfedu_import_raw_data' ) );\n\t\t\t\tadd_action( 'init', array( $this, 'acfedu_import_preset_countries' ) );\n\t\t\t\tadd_action( 'init', array( $this, 'acfedu_preserve_settings' ) );\n\t\t\t\tadd_action( 'init', array( $this, 'acfedu_truncate_table' ) );\n\n\t\t\t\t// filters\n\t\t\t\tadd_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), array( $this, 'acfedu_settings_link' ) );\n\n\t\t\t\t// always load\n\t\t\t\t$this->acfedu_admin_menu();\n\t\t\t\t$this->acfedu_load_admin_pages();\n\t\t\t\t$this->acfedu_check_uploads_folder();\n\t\t\t\t$this->acfedu_check_table();\n\n\t\t\t\tinclude( 'inc/donate-box.php' );\n\t\t\t\tinclude( 'inc/help-tabs.php' );\n\t\t\t\tinclude( 'inc/country-field.php' );\n\t\t\t\tinclude( 'inc/verify-csv-data.php' );\n\t\t\t}", "function activate_spark_cw_fresh() {\n require_once plugin_dir_path(__FILE__) . 'includes/class-spark-cw-fresh-activator.php';\n Spark_Cw_Fresh_Activator::activate();\n}", "public function run() {\n\t\t// include other classes\n\t\trequire_once plugin_dir_path ( __FILE__ ) . 'class-top-ratter-render.php';\n\t\trequire_once plugin_dir_path ( __FILE__ ) . 'class-top-ratter-sso.php';\n\t\t\n\t\t// enque styles for this plugin\n\t\tadd_action ( 'wp_enqueue_scripts', array (\n\t\t\t\t$this,\n\t\t\t\t'register_plugin_styles' \n\t\t) );\n\t\t// enque jquery scripts for this plugin\n\t\tadd_action ( 'wp_enqueue_scripts', array (\n\t\t\t\t$this,\n\t\t\t\t'register_plugin_script' \n\t\t) );\n\t\t// add submit action form to redirect and catch from admin.php\n\t\tadd_action ( 'admin_post_tr_action', array (\n\t\t\t\t$this,\n\t\t\t\t'prefix_admin_tr_action' \n\t\t) );\n\t\t\n\t\t// check if plugin tables exist\n\t\t$this->table_check ();\n\t\t\n\t\t// instantiate the render class for shortcodes to work\n\t\t$shortcodes = new Top_Ratter_Render ();\n\t}", "public function __invoke();", "public function __invoke();", "public function __invoke();", "public function __invoke();", "function __construct() {\n\t\tadd_action('admin_menu', array( &$this,'scd_register_menu') );\n\t\tadd_action('load-index.php', array( &$this,'scd_redirect_dashboard') );\n\t}", "function fast_plugin_fast_plug($flux){\r\n\t\r\n\r\n\t// traitement des parametres envoye par le plugin \r\n\t// $exec : exec = demo\r\n\t// $type : affichage complet(appel des pipelines classiques) ou simple\r\n\t// $template : on souhaite un autre affichage que l'admin de spip, on precise le template\r\n\t// $fond : doit on utiliser un fond particulier ?\r\n\t$exec = $flux[\"args\"][\"exec\"];\r\n\t$type = $flux[\"args\"][\"type\"];\r\n\t$template = $flux[\"args\"][\"template\"];\r\n\t$fond = $flux[\"args\"][\"fond\"];\r\n\t\r\n\t\r\n\t// chargemenr debut de page de spip\r\n\tinclude_spip('inc/presentation');\r\n\tinclude_spip('inc/utils');\r\n\t$commencer_page = charger_fonction('commencer_page', 'inc');\r\n\t\r\n\t\r\n\t// On verifie que la personne a bien acces a cette page\r\n\t$exec_get = _request(\"exec\");\r\n\tif (!autoriser('acces','fast_plugin',$exec_get)){\r\n\t\techo $commencer_page();\r\n\t\tdie(\"pas les droits\");\r\n\t}\r\n\t\r\n\tif(!$fond) $fond = $exec;\r\n\t\r\n\t// on recupere la page \r\n\t$page =recuperer_fond(\"fonds/$fond\",array_merge( $_GET, $_POST ));\r\n\t\r\n\t// utilisation d'un template ou utilisation classique\r\n\tif ($template){\r\n\t\t\r\n\t\t// pour les templates on place dans la page de template \r\n\t\t// le commentaire html <!-- content_here --> \r\n\t\t// reste l'inclusion du css qui ne peut pour le \r\n\t\t// momment ne peut être dans un fichier de plugin prevoir une autre\r\n\t\t// position , un repertoire css a la racine ?\r\n\t\t\r\n\t\techo $commencer_page();\r\n\t\tpipeline('exec_init',array('args'=>array('exec'=>\"$exec\"),'data'=>''));\r\n\t\t$new_template = recuperer_fond(\"fonds/template/$template/$template\",array_merge( $_GET, $_POST ));\r\n\t\t$new_template = str_replace(\"<!-- content_here -->\",$page,$new_template);\r\n\t\techo $new_template;\r\n\t}else{\r\n\t\techo $commencer_page();\r\n\t\tpipeline('exec_init',array('args'=>array('exec'=>\"$exec\"),'data'=>''));\r\n\t\tif ($type=='complet'){\r\n\t\t\techo debut_gauche('', true);\r\n\t\t\techo pipeline('affiche_gauche',array('args'=>array('exec'=>$exec),'data'=>''));\r\n\t\t\techo creer_colonne_droite('', true);\r\n\t\t\techo pipeline('affiche_droite',array('args'=>array('exec'=>$exec),'data'=>''));\r\n\t\t\techo debut_droite('', true);\r\n\t\t\techo pipeline('affiche_milieu',array('args'=>array('exec'=>$exec),'data'=>''));\r\n\t\t\techo $page;\r\n\t\t\techo fin_gauche(), fin_page();\r\n\t\t}\r\n\t\telse if ($type=='simple'){\r\n\t\t\techo $page;\r\n\t\t\techo fin_page();\r\n\t\t}\r\n\t}\r\n\t\r\n\treturn $flux;\r\n}", "function JPlugin(& $subject) {\n\t\tparent::__construct($subject);\n\t}", "public function bootPlugin();", "function __construct(){\n\t\t$this->add_hooks();\n\t}", "function hooks()\r\n {\r\n // Add a settings link next to the \"Deactivate\" link on the plugin listing page\r\n add_filter( 'plugin_action_links_cart-converter/cart-converter.php', array( &$this, 'plugin_action_links' ) );\r\n \t\r\n // woo order status changed\r\n \tadd_action( 'woocommerce_order_status_failed', array( &$this->cartController, 'add_abandon_cart' ) );\r\n add_action( 'woocommerce_order_status_changed', array( &$this->cartController, 'order_status_changed' ), 10, 3);\r\n\t\t\r\n // place order when create new from cart_id\r\n add_action( 'woocommerce_checkout_order_processed', array( &$this->cartController, 'convert_place_order' ), 10, 3);\r\n\r\n // restore cart from email\r\n add_action( 'plugins_loaded', array( &$this, 'plugins_loaded' ) );\r\n\r\n do_action( 'cart_converter_main_hooks_action' );\r\n }", "public function postConnect()\n {\n $this->Lexer->addExitPattern('</' . self::getElementName() . '>', 'plugin_' . webcomponent::PLUGIN_NAME . '_' . $this->getPluginComponent());\n\n }", "public function actions();", "function affiliatewp_direct_link_tracking() {\n\t if ( ! class_exists( 'Affiliate_WP' ) ) {\n\t if ( ! class_exists( 'AffiliateWP_Activation' ) ) {\n\t require_once 'includes/class-activation.php';\n\t }\n\n\t $activation = new AffiliateWP_Activation( plugin_dir_path( __FILE__ ), basename( __FILE__ ) );\n\t $activation = $activation->run();\n\t } else {\n\t return AffiliateWP_Direct_Link_Tracking::instance();\n\t }\n\t}", "protected function init() {\n\t\t$routes = $this->routePluginManager;\n\t\tforeach ( array (\n\t\t\t\t'hostname' => __NAMESPACE__ . '\\Hostname',\n\t\t\t\t'literal' => __NAMESPACE__ . '\\Literal',\n\t\t\t\t'part' => __NAMESPACE__ . '\\Part',\n\t\t\t\t'regex' => __NAMESPACE__ . '\\Regex',\n\t\t\t\t'scheme' => __NAMESPACE__ . '\\Scheme',\n\t\t\t\t'segment' => __NAMESPACE__ . '\\Segment',\n\t\t\t\t'wildcard' => __NAMESPACE__ . '\\Wildcard',\n\t\t\t\t'query' => __NAMESPACE__ . '\\Query',\n\t\t\t\t'method' => __NAMESPACE__ . '\\Method' \n\t\t) as $name => $class ) {\n\t\t\t$routes->setInvokableClass ( $name, $class );\n\t\t}\n\t\t;\n\t}", "function __construct(){\n\t\tadd_action('init', array($this, 'stockIntegrateWithVC'));\n\t}", "function adminer_object() {\r\n include_once \"./plugins/plugin.php\";\r\n \r\n // autoloader\r\n foreach (glob(\"plugins/*.php\") as $filename) {\r\n include_once \"./$filename\";\r\n }\r\n \r\n $plugins = array(\r\n // specify enabled plugins here\r\n // new AdminerDumpXml,\r\n // new AdminerTinymce,\r\n // new AdminerFileUpload(\"data/\"),\r\n // new AdminerSlugify,\r\n // new AdminerTranslation,\r\n // new AdminerForeignSystem,\r\n // new AdminerLoginPasswordLess(password_hash(\"\", PASSWORD_DEFAULT)),\r\n );\r\n \r\n /* It is possible to combine customization and plugins:\r\n class AdminerCustomization extends AdminerPlugin {\r\n }\r\n return new AdminerCustomization($plugins);\r\n */\r\n class AdminerCustomization extends AdminerPlugin {\r\n function login($login, $password) {\r\n // validate user submitted credentials\r\n return true;\r\n }\r\n }\r\n return new AdminerCustomization($plugins);\r\n \r\n // return new AdminerPlugin($plugins);\r\n}", "public function hookActionDispatcher()\r\n {\r\n $this->context->smarty->registerPlugin('modifier', 'formaatButton', array('SmartyModifiersClass', 'formaatButton'));\r\n }", "function autoriser_fast_plugin_acces_dist($faire, $type, $exec){\r\n\t\r\n\t// les infos sur l'auteur\r\n\t$statut_auteur = $GLOBALS['connect_statut'];\r\n\t$statut_type = $GLOBALS['connect_toutes_rubriques']; \r\n\t$id = $GLOBALS['auteur_session']['id_auteur'];\r\n\t\r\n\t\r\n\t$pages = get_fast_plugin();\r\n\t$droit = $pages[$exec][\"statut\"];\r\n\t$allowed = $pages[$exec][\"allowed\"];\r\n\tif ($allowed) $allowed = explode(',',$allowed);\r\n\t\r\n\t// si les droits ne sont pas renseigne on bloque le processus \r\n\tif (!$droit) return false;\r\n\t\r\n\t// si allowed on test les droits de l'auteur\r\n\tif ($allowed && in_array($id,$allowed))return true;\r\n\t\r\n\t// pour les admin restreint \r\n\tif ($statut_type != 1 && $statut_auteur==\"0minirezo\") $statut_auteur = 'admin_restreint';\r\n\r\n\t$acces = array(\t\"tous\" => 0,\"admin_restreint\" => 1,\"admin\" => 2 ,\"aucun\" => 4);\r\n\t$type_acces = array(\"1comite\" => 0,\"admin_restreint\" => 1,\"0minirezo\" => 2 );\r\n\t\r\n\t\r\n\tif($type_acces[$statut_auteur] >= $acces[$droit]) return true;\r\n\t\r\n\treturn false;\r\n\t\r\n}", "function __construct(){\n //Actions\n add_action('init', array($this, 'init'), 1);\n \n }", "public static function execute() {\n if ( defined( 'DPC_EXECUTED' ) ) {\n return false;\n } else {\n define( 'DPC_EXECUTED', true );\n }\n load_textdomain( 'dustpress-components', dirname( __FILE__ ) . '/languages/' . get_locale() . '.mo' );\n add_action( 'init', __NAMESPACE__ . '\\Components::add_options_page', 1, 1 );\n add_action( 'init', __NAMESPACE__ . '\\Components::hook', 20, 1 );\n add_action( 'dustpress/partials', __NAMESPACE__ . '\\Components::add_partial_path', 1, 1 );\n add_action( 'activated_plugin', __NAMESPACE__ . '\\Components::load_first', 1, 1 );\n add_filter( 'acf/format_value/type=group', __NAMESPACE__ . '\\Components::add_layout_static', 150, 3 );\n add_filter( 'acf/format_value/type=group', __NAMESPACE__ . '\\Data::component_handle', 200, 3 );\n add_filter( 'acf/format_value/type=flexible_content', __NAMESPACE__ . '\\Data::component_handle', 200, 3 );\n }", "public function __construct() {\r\n add_action( 'plugins_loaded', [ $this, 'update_db_check' ] );\r\n \r\n }", "public function __construct(){\n register_activation_hook( __FILE__, [self::class, 'activatePlugin'] );\n register_deactivation_hook( __FILE__, [self::class, 'deactivatePlugin'] );\n\n // Init hook\n add_action( 'init', [self::class, 'createPostType'] );\n add_action( 'init', [self::class, 'createTaxonomies'], 0 );\n add_action( 'init', [self::class, 'addCustomRewriteRule'] );\n add_action( 'admin_init', [self::class, 'registerSettings'] );\n add_action( 'admin_menu', [self::class, 'addMenu'] );\n\n // Shortcodes\n add_shortcode( 'ege_cards', [self::class, 'basicShortcode'] );\n add_shortcode( 'ege_cards_sticky_card', [self::class, 'stickyWidgetShortcode'] );\n add_shortcode( 'ege_cards_link', [self::class, 'linkShortcode'] );\n add_shortcode( 'ege_cards_disclaimer', [self::class, 'disclaimerShortcode'] );\n add_shortcode( 'ege_cards_related', [self::class, 'relatedShortcode'] );\n\n // AJAX\n add_action( 'wp_ajax_nopriv_ege_cards_search_cards', [self::class, 'ajaxSearchCards'] );\n add_action( 'wp_ajax_ege_cards_search_cards', [self::class, 'ajaxSearchCards'] );\n add_action( 'wp_ajax_ege_cards_make_sticky', [self::class, 'ajaxMakeSticky'] );\n add_action( 'wp_ajax_ege_cards_save_related_links', [self::class, 'saveRelatedLinks']);\n\n // Custom POST title filter\n add_filter( 'enter_title_here', [self::class, 'postTitlePlaceholder'] );\n\n // Custom POST help tab\n add_action( 'admin_head', [self::class, 'postHelpTab'] );\n\n // Custom POST updated messages\n add_filter( 'post_updated_messages', [self::class, 'postUpdatedMessages'] );\n add_filter( 'bulk_post_updated_messages', [self::class, 'postBulkMessages'], 10, 2 );\n\n // Custom POST save\n add_action('save_post', [self::class, 'saveCard']);\n\n // Hack to remove uncessecary meta boxes\n add_filter( 'hidden_meta_boxes', [self::class, 'filterHiddenBoxes'], 10, 3 );\n\n // Add button to POST edit text area\n add_action('media_buttons', [self::class, 'addCustomLinkButton'], 15);\n \n // Add disclaimer metabox\n add_action( 'add_meta_boxes', array(self::class, 'addDisclaimerMetaBox' ), 1000);\n add_action( 'save_post', [self::class, 'savePostMeta']);\n\n // Enqueue admin sctipts\n add_action( 'admin_enqueue_scripts', [self::class, 'addAdminScripts'], 10, 1 );\n\n // Add extra column tp travelcards table view\n add_filter( 'manage_travelcard_posts_columns' , [self::class, 'addColumns'] );\n add_action( 'manage_posts_custom_column' , [self::class, 'customColumns'], 10, 2 );\n }", "private function hooks() {\n\n\t\t\t// plugin meta\n\t\t\tadd_filter( 'plugin_row_meta', array( $this, 'plugin_meta' ), null, 2 );\n\n\t\t\t// Add template folder\n\t\t\tadd_filter( 'affwp_template_paths', array( $this, 'template' ) );\n\n\t\t}", "function run_wandelust_afip() {\n\n\t$plugin = new Baat_Afip();\n\n}", "public function index() {\n\t\t$params = func_get_args();\n\t\t$this->_loadPlugin(...$params);\n\t}", "public function __invoke( ...$args );", "public function plugin_activate_hook() {\r\n add_option( 'woolentor_do_activation_redirect', TRUE );\r\n add_option( 'woolentor_do_activation_library_cache', TRUE );\r\n }", "private function define_admin_hooks() {\n\t\t$plugin_admin = new Soisy_Pagamento_Rateale_Admin( $this->get_plugin_name(), $this->get_version() );\n\n\t\t$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );\n $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );\n $this->loader->add_filter( 'woocommerce_payment_gateways', $plugin_admin, 'payment_methods' );\n\t\t\n $this->loader->add_filter( 'soisy_settings', $plugin_admin, 'soisy_vars' );\n\t\t\n\t\t$this->loader->add_filter('plugin_action_links', $plugin_admin,'add_soisy_action_links', 10, 2);\n\t\t\n\t\t/*\n\t\t * Payments Gateways extend WC_Payment_Gateway\n\t\t * To have them work properly they must be hooked to 'plugins_loaded'\n\t\t */\n add_action( 'plugins_loaded', 'init_Soisy_Pagamento_Rateale_Gateway_Settings');\n\t}", "function add_wp_hooks(){\n\n\t\t$comments = new WordpressConnectComments();\n\t\t$like = new WordpressConnectLikeButton();\n\n\t}", "public static function init() {\n\t\tadd_action( 'add_meta_boxes', array( 'ReplyContextPlugin', 'add_meta_boxes' ) );\n\t\tadd_action( 'save_post', array( 'ReplyContextPlugin', 'save_postdata' ), 5, 1 );\n\n\t\tadd_filter( 'webmention_links', array( 'ReplyContextPlugin', 'webmention_links' ), 10, 2 );\n\t\tadd_action( 'loop_start', array( 'ReplyContextPlugin', 'loop_start' ) );\n\t}", "function vimport_abonnes_autoriser() {\n}", "public function __construct() {\n require_once __DIR__ . '/vendor/autoload.php';\n $this->define_constants();\n register_activation_hook( __FILE__, array( $this, 'activate' ) ); \n add_action( 'plugins_loaded', array( $this, 'init_plugin' ) ); \n }", "function cl_autoriser(){}", "function __construct() {\n add_action( 'acf/init', [ $this, 'init' ], 20 );\n }", "private function __construct() {\n global $wp_version;\n\n // Load plugin text domain\n add_action('init', array($this, 'load_plugin_textdomain'));\n\n // Load public-facing style sheet and JavaScript.\n add_action('wp_enqueue_scripts', array($this, 'enqueue_styles_and_scripts'));\n\n // Add support for h5p shortcodes.\n add_shortcode('h5p', array($this, 'shortcode'));\n\n // Adds JavaScript settings to the bottom of the page.\n add_action('wp_footer', array($this, 'add_settings'));\n\n // Clean up tmp editor files\n add_action('h5p_daily_cleanup', array($this, 'remove_old_tmp_files'));\n\n // Check for library updates\n add_action('h5p_daily_cleanup', array($this, 'get_library_updates'));\n\n // Remove old log messages\n add_action('h5p_daily_cleanup', array($this, 'remove_old_log_events'));\n\n // Always check if the plugin has been updated to a newer version\n add_action('init', array('H5P_Plugin', 'check_for_updates'), 1);\n\n // Add menu options to admin bar.\n add_action('admin_bar_menu', array($this, 'admin_bar'), 999);\n\n // REST API\n add_action('rest_api_init', array($this, 'rest_api_init'));\n\n // Removes all H5P data for this blog\n if (version_compare($wp_version, '5.1', '>=')) {\n add_action('wp_delete_site', array($this, 'delete_site'));\n }\n else {\n // Deprecated since 5.1\n add_action('delete_blog', array($this, 'delete_blog'));\n }\n }", "public function plugins_loadedWPaction() {\n\t\tload_plugin_textdomain ( get_class ( $this ), false, dirname ( plugin_basename ( $this->application()->filename ) ) . \"/languages/\" );\n\t\twp_enqueue_style ( 'jquery-ui_smoothness', $this->application ()->pluginuri () . '/library/public/css/smoothness/jquery-ui-1.8.13.custom.css', null, $this->application ()->version () );\n\t\twp_enqueue_style ( 'v35v_style_css', $this->application ()->pluginuri () . '/library/public/css/style.css', null, $this->application ()->version () );\n\t\twp_enqueue_script ( 'v35v_script_js', $this->application ()->pluginuri () . '/library/public/js/script.js', null, $this->application ()->version () );\n\t}" ]
[ "0.6141588", "0.5866899", "0.57910633", "0.5725688", "0.57051605", "0.56870294", "0.5680755", "0.5663773", "0.5647666", "0.5615219", "0.55653846", "0.5544228", "0.54708827", "0.54491067", "0.54474586", "0.5424856", "0.54117125", "0.5384669", "0.53725505", "0.53394574", "0.5292821", "0.5287092", "0.5278382", "0.5274752", "0.5270399", "0.5257177", "0.52448153", "0.52242124", "0.5222791", "0.52149683", "0.52073133", "0.5205288", "0.5200875", "0.51894534", "0.51763463", "0.5175639", "0.51739943", "0.51738006", "0.51705915", "0.516524", "0.5150865", "0.51463777", "0.5145575", "0.51412153", "0.5137131", "0.5134638", "0.51242214", "0.51218843", "0.51216656", "0.51168895", "0.51118976", "0.5103056", "0.5096842", "0.5088596", "0.5087349", "0.50835896", "0.50731194", "0.50634646", "0.5059556", "0.5058715", "0.50559187", "0.50514203", "0.50498277", "0.50496644", "0.50338656", "0.5030429", "0.5030429", "0.5030429", "0.5030429", "0.50254834", "0.5021995", "0.5003557", "0.49963543", "0.49925762", "0.49884847", "0.4979053", "0.4973817", "0.49696627", "0.4968008", "0.49678004", "0.49572504", "0.4957053", "0.49553236", "0.4950705", "0.4946871", "0.49455398", "0.49445736", "0.49351147", "0.49349728", "0.4931719", "0.492691", "0.49267408", "0.4926446", "0.4925821", "0.49255908", "0.4925467", "0.4925446", "0.49235836", "0.49223182", "0.49188596", "0.49122247" ]
0.0
-1
Create the event listener.
public function __construct() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addRequestCreateListener($listener);", "public function onEvent();", "private function init_event_listeners() {\n\t\t// add_action('wp_ajax_example_action', [$this, 'example_function']);\n\t}", "public function listener(Listener $listener);", "protected function setupListeners()\n {\n //\n }", "function eventRegister($eventName, EventListener $listener);", "public function listen($event, $listener);", "private function createStreamCallback()\n {\n $read =& $this->readListeners;\n $write =& $this->writeListeners;\n $this->streamCallback = function ($stream, $flags) use(&$read, &$write) {\n $key = (int) $stream;\n if (\\EV_READ === (\\EV_READ & $flags) && isset($read[$key])) {\n \\call_user_func($read[$key], $stream);\n }\n if (\\EV_WRITE === (\\EV_WRITE & $flags) && isset($write[$key])) {\n \\call_user_func($write[$key], $stream);\n }\n };\n }", "public function addEventListener(string $eventClass, callable $listener, int $priority = 0): EnvironmentBuilderInterface;", "public function setupEventListeners()\r\n\t{\r\n\t\t$blueprints = craft()->courier_blueprints->getAllBlueprints();\r\n\t\t$availableEvents = $this->getAvailableEvents();\r\n\r\n\t\t// Setup event listeners for each blueprint\r\n\t\tforeach ($blueprints as $blueprint) {\r\n\t\t\tif (!$blueprint->eventTriggers) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tforeach ($blueprint->eventTriggers as $event) {\r\n\t\t\t\t// Is event currently enabled?\r\n\t\t\t\tif (!isset($availableEvents[$event])) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tcraft()->on($event, function(Event $event) use ($blueprint) {\r\n\t\t\t\t\tcraft()->courier_blueprints->checkEventConditions($event, $blueprint);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// On the event that an email is sent, create a successful delivery record\r\n\t\tcraft()->on('courier_emails.onAfterBlueprintEmailSent', [\r\n\t\t\tcraft()->courier_deliveries,\r\n\t\t\t'createDelivery'\r\n\t\t]);\r\n\r\n\t\t// On the event that an email fails to send, create a failed delivery record\r\n\t\tcraft()->on('courier_emails.onAfterBlueprintEmailFailed', [\r\n\t\t\tcraft()->courier_deliveries,\r\n\t\t\t'createDelivery',\r\n\t\t]);\r\n\t}", "protected function registerListeners()\n {\n }", "public function listen($listener);", "public function listenForEvents()\n {\n Event::listen(DummyEvent::class, DummyListener::class);\n\n event(new DummyEvent);\n }", "public function createEvent()\n {\n return new Event();\n }", "public function attachEvents();", "public function attachEvents();", "public function add_event_handler($event, $callback);", "function addListener(EventListener $listener): void;", "public static function initListeners() {\n\t\t\n\t\tif(GO::modules()->isInstalled('files') && class_exists('\\GO\\Files\\Controller\\FolderController')){\n\t\t\t$folderController = new \\GO\\Files\\Controller\\FolderController();\n\t\t\t$folderController->addListener('checkmodelfolder', \"GO\\Projects2\\Projects2Module\", \"createParentFolders\");\n\t\t}\n\t\t\n\t\t\\GO\\Base\\Model\\User::model()->addListener('delete', \"GO\\Projects2\\Projects2Module\", \"deleteUser\");\n\n\t}", "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 }", "private static function event()\n {\n $files = ['Event', 'EventListener'];\n $folder = static::$root.'Event'.'/';\n\n self::call($files, $folder);\n\n $files = ['ManyListenersArgumentsException'];\n $folder = static::$root.'Event/Exceptions'.'/';\n\n self::call($files, $folder);\n }", "public function addEventListener($event, $callable){\r\n $this->events[$event] = $callable;\r\n }", "public function testEventCallBackCreate()\n {\n }", "public function listeners($event);", "public function addListener($event, $listener, $priority = 0);", "public function on($name, $listener, $data = null, $priority = null, $acceptedArgs = null);", "public function createWatcher();", "public function __construct()\n\t{\n\t\t$this->delegate = Delegate_1::fromMethod($this, 'onEvent');\n\t}", "public function init_listeners( $callable ) {\n\t}", "public static function events();", "public static function __events () {\n \n }", "public function onEventAdd()\n\t{\n\t\t$this->onTaskAdd();\n\t}", "public function addApplicationBuilderListener( \n MyFusesApplicationBuilderListener $listener );", "public function addListener($eventName, $listener, $priority = 0);", "public function __construct(){\n\n\t\t\t$this->listen();\n\n\t\t}", "protected function registerListeners()\n {\n // Login event listener\n #Event::listen('auth.login', function($user) {\n //\n #});\n\n // Logout event subscriber\n #Event::subscribe('Mrcore\\Parser\\Listeners\\MyEventSubscription');\n }", "public function __construct()\n {\n// global $callback;\n // $this->eventsArr = $eventsArr;\n $this->callback = function () {\n\n // echo \"event: message\\n\"; // for onmessage listener\n echo \"event: ping\\n\";\n $curDate = date(DATE_ISO8601);\n echo 'data: {\"time\": \"' . $curDate . '\"}';\n echo \"\\n\\n\";\n\n while (($event = ServerSentEvents::popEvent()) != null) {\n $m = json_encode($event->contents);\n echo \"event: $event->event\\n\";\n echo \"data: $m\";\n echo \"\\n\\n\";\n }\n // echo \"event: message\\n\";\n // $curDate = date(DATE_ISO8601);\n // echo 'data: {\"message-time\": \"' . $curDate . '\"}';\n // echo \"\\n\\n\";\n // while(true){\n // if ($index != $this->eventsCounter){\n // ServerSentEvents::sendEvent($this->event, $this->eventBody);\n // $index = $this->eventsCounter;\n // }\n\n // sleep(1);\n // }\n };\n\n $this->setupResponse();\n }", "private function createMyEvents()\n {\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatchSecure_Frontend_Checkout',\n 'onPostDispatchCheckoutSecure'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_Frontend_Checkout_PreRedirect',\n 'onPreRedirectToPayPal'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PreDispatch_Frontend_PaymentPaypal',\n 'onPreDispatchPaymentPaypal'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_Frontend_PaymentPaypal_Webhook',\n 'onPaymentPaypalWebhook'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_Frontend_PaymentPaypal_PlusRedirect',\n 'onPaymentPaypalPlusRedirect'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatch_Frontend_Account',\n 'onPostDispatchAccount'\n );\n $this->subscribeEvent(\n 'Theme_Compiler_Collect_Plugin_Javascript',\n 'onCollectJavascript'\n );\n $this->subscribeEvent(\n 'Shopware_Components_Document::assignValues::after',\n 'onBeforeRenderDocument'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatchSecure_Backend_Config',\n 'onPostDispatchConfig'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatch_Backend_Order',\n 'onPostDispatchOrder'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatch_Backend_PaymentPaypal',\n 'onPostDispatchPaymentPaypal'\n );\n $this->subscribeEvent(\n 'Theme_Compiler_Collect_Plugin_Less',\n 'addLessFiles'\n );\n $this->subscribeEvent(\n 'Enlight_Bootstrap_InitResource_paypal_plus.rest_client',\n 'onInitRestClient'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Dispatcher_ControllerPath_Api_PaypalPaymentInstruction',\n 'onGetPaymentInstructionsApiController'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Front_StartDispatch',\n 'onEnlightControllerFrontStartDispatch'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PreDispatch',\n 'onPreDispatchSecure'\n );\n }", "public static function creating(callable $listener, $priority = 0)\n {\n static::listen(ModelEvent::CREATING, $listener, $priority);\n }", "public function listen();", "public function listen() {\n $this->source->listen($this->id);\n }", "public function addEventListener($event, $callback, $weight = null);", "public function testAddListener()\n {\n // Arrange\n $listenerCalled = false;\n $communicator = new Communicator();\n\n // Act\n $communicator->addListener(function () use (&$listenerCalled) {\n $listenerCalled = true;\n });\n\n $communicator->broadcast([], 'channel', [], []);\n\n // Assert\n static::assertTrue($listenerCalled);\n }", "public function addListener($name, $listener, $priority = 0);", "public static function created(callable $listener, $priority = 0)\n {\n static::listen(ModelEvent::CREATED, $listener, $priority);\n }", "public function on($event, $callback){ }", "public function appendListenerForEvent(string $eventType, callable $listener): callable;", "public function initEventLogger()\n {\n $dispatcher = static::getEventDispatcher();\n\n $logger = $this->newEventLogger();\n\n foreach ($this->listen as $event) {\n $dispatcher->listen($event, function ($eventName, $events) use ($logger) {\n foreach ($events as $event) {\n $logger->log($event);\n }\n });\n }\n }", "protected function getCron_EventListenerService()\n {\n return $this->services['cron.event_listener'] = new \\phpbb\\cron\\event\\cron_runner_listener(${($_ = isset($this->services['cron.lock_db']) ? $this->services['cron.lock_db'] : $this->getCron_LockDbService()) && false ?: '_'}, ${($_ = isset($this->services['cron.manager']) ? $this->services['cron.manager'] : $this->getCron_ManagerService()) && false ?: '_'}, ${($_ = isset($this->services['request']) ? $this->services['request'] : ($this->services['request'] = new \\phpbb\\request\\request(NULL, true))) && false ?: '_'});\n }", "public function getListener(/* ... */)\n {\n return $this->_listener;\n }", "protected function _listener($name) {\n\t\treturn $this->_crud()->listener($name);\n\t}", "private function listeners()\n {\n foreach ($this['config']['listeners'] as $eventName => $classService) {\n $this['dispatcher']->addListener($classService::NAME, [new $classService($this), 'dispatch']);\n }\n }", "public function initializeListeners()\n {\n $this->eventsEnabled = false;\n $this->setPreloads();\n $this->setEvents();\n $this->eventsEnabled = true;\n }", "protected function listenForEvents()\n {\n $callback = function ($event) {\n foreach ($this->logWriters as $writer) {\n $writer->log($event);\n }\n };\n\n $this->events->listen(JobProcessing::class, $callback);\n $this->events->listen(JobProcessed::class, $callback);\n $this->events->listen(JobFailed::class, $callback);\n $this->events->listen(JobExceptionOccurred::class, $callback);\n }", "protected function registerListeners()\n {\n $this->container['listener.server'] = $this->container->share(function ($c) {\n return new \\Symfttpd\\EventDispatcher\\Listener\\ServerListener($c['filesystem'], $c['generator.server']);\n });\n\n $this->container['listener.gateway'] = $this->container->share(function ($c) {\n return new \\Symfttpd\\EventDispatcher\\Listener\\GatewayListener($c['filesystem'], $c['generator.gateway']);\n });\n }", "public function listeners($eventName);", "public static function create()\n {\n list(\n $message,\n $callbackService,\n $callbackMethod,\n $callbackParams\n ) = array_pad( func_get_args(), 4, null);\n\n static::addToEventQueue( array(\n 'type' => \"alert\",\n 'properties' => array(\n 'message' => $message\n ),\n 'service' => $callbackService,\n 'method' => $callbackMethod,\n 'params' => $callbackParams ?? []\n ));\n }", "public function requestCreateEvent()\n {\n $ch = self::curlIni('event_new', $this->eventParams);\n\n return $ch;\n }", "function __construct()\n\t{\n\t\t$this->events[\"AfterAdd\"]=true;\n\n\n\t}", "public function __construct()\n {\n Hook::listen(__CLASS__);\n }", "function add_listener($hook, $function_name){\n\t\tglobal $listeners;\n\n\t\t$listeners[$hook][] = $function_name;\n\t}", "public function __construct()\n {\n $this->events = new EventDispatcher();\n }", "protected function initEventLogger(): void\n {\n $logger = $this->newEventLogger();\n\n foreach ($this->listen as $event) {\n $this->dispatcher->listen($event, function ($eventName, $events) use ($logger) {\n foreach ($events as $event) {\n $logger->log($event);\n }\n });\n }\n }", "public function listen($events, $listener = null): void;", "public function onCreate($callback)\n {\n $this->listeners[] = $callback;\n return $this;\n }", "public static function listen() {\n $projectId = \"sunday-1601040613995\";\n\n # Instantiates a client\n $pubsub = new PubSubClient([\n 'projectId' => $projectId\n ]);\n\n # The name for the new topic\n $topicName = 'gmail';\n\n # Creates the new topic\n $topic = $pubsub->createTopic($topicName);\n\n echo 'Topic ' . $topic->name() . ' created.';\n }", "protected function registerEventListeners()\n {\n Event::listen(Started::class, function (Started $event) {\n $this->progress = $this->output->createProgressBar($event->objects->count());\n });\n\n Event::listen(Imported::class, function () {\n if ($this->progress) {\n $this->progress->advance();\n }\n });\n\n Event::listen(ImportFailed::class, function () {\n if ($this->progress) {\n $this->progress->advance();\n }\n });\n\n Event::listen(DeletedMissing::class, function (DeletedMissing $event) {\n $event->deleted->isEmpty()\n ? $this->info(\"\\n No missing users found. None have been soft-deleted.\")\n : $this->info(\"\\n Successfully soft-deleted [{$event->deleted->count()}] users.\");\n });\n\n Event::listen(Completed::class, function (Completed $event) {\n if ($this->progress) {\n $this->progress->finish();\n }\n });\n }", "public function addBeforeCreateListener(IBeforeCreateListener $listener)\n {\n $this->_lifecyclers[BeanLifecycle::BeforeCreate][] = $listener;\n }", "protected function registerInputEvents() {\n\t\t$this->getEventLoop()->addEventListener('HANG', function($event) {\n\t\t\t// Update our state\n\t\t\t$this->offHook = (bool)$event['value'];\n\n\t\t\t// Trigger specific events for receiver up and down states\n\t\t\t$eventName = $this->isOffHook() ? 'RECEIVER_UP' : 'RECEIVER_DOWN';\n\t\t\t$this->fireEvents($eventName, $event);\n\t\t});\n\n\t\t$this->getEventLoop()->addEventListener('TRIG', function($event) {\n\t\t\t// Update our state\n\t\t\t$this->dialling = (bool)$event['value'];\n\t\t});\n\n\t\t// Proxy registration for all EventLoop events to pass them back up to our own listeners\n\t\t$this->getEventLoop()->addEventListener(true, function ($event, $type) {\n\t\t\t// Fire event to our own listeners\n\t\t\t$this->fireEvents($type, $event);\n\t\t});\n\t}", "public static function creating($callback)\n {\n self::listenEvent('creating', $callback);\n }", "public function attach(string $event, callable $listener, int $priority = 0): void;", "public function __construct()\n {\n $this->listnerCode = config('settings.listener_code.DeletingVoucherEventListener');\n }", "protected function registerEventListener()\n {\n $subscriber = $this->getConfig()->get('audit-trail.subscriber', AuditTrailEventSubscriber::class);\n $this->getDispatcher()->subscribe($subscriber);\n }", "function listenTo(string $eventName, callable $callback)\n {\n EventManager::register($eventName, $callback);\n }", "public function attach($identifier, $event, callable $listener, $priority = 1)\n {\n }", "public function testRegisiterListenerMethodAddsAListener()\n\t{\n\t\t$instance = new Dispatcher();\n\n\t\t$instance->register_listener('some_event', 'my_function');\n\n\t\t$this->assertSame(array('some_event' => array('my_function')), $instance->listeners);\n\t\t$this->assertAttributeSame(array('some_event' => array('my_function')), 'listeners', $instance);\n\t}", "protected function getPhpbb_Viglink_ListenerService()\n {\n return $this->services['phpbb.viglink.listener'] = new \\phpbb\\viglink\\event\\listener(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['template']) ? $this->services['template'] : $this->getTemplateService()) && false ?: '_'});\n }", "public static function create($className, array &$extraTabs, $selectedTabId)\r\n {\r\n $createClass = XenForo_Application::resolveDynamicClass($className, 'listener_th');\r\n if (!$createClass) {\r\n throw new XenForo_Exception(\"Invalid listener '$className' specified\");\r\n }\r\n \r\n return new $createClass($extraTabs, $selectedTabId);\r\n }", "function listen($listener)\n{\n return XPSPL::instance()->listen($listener);\n}", "function getEventListeners()\n {\n $listeners = array();\n \n $listener = new Listener($this);\n \n $listeners[] = array(\n 'event' => RoutesCompile::EVENT_NAME,\n 'listener' => array($listener, 'onRoutesCompile')\n );\n\n $listeners[] = array(\n 'event' => GetAuthenticationPlugins::EVENT_NAME,\n 'listener' => array($listener, 'onGetAuthenticationPlugins')\n );\n\n return $listeners;\n }", "protected static function loadListeners() {\n\t\t\n\t\t// default var\n\t\t$configDir = Config::getOption(\"configDir\");\n\t\t\n\t\t// make sure the listener data exists\n\t\tif (file_exists($configDir.\"/listeners.json\")) {\n\t\t\t\n\t\t\t// get listener list data\n\t\t\t$listenerList = json_decode(file_get_contents($configDir.\"/listeners.json\"), true);\n\t\t\t\n\t\t\t// get the listener info\n\t\t\tforeach ($listenerList[\"listeners\"] as $listenerName) {\n\t\t\t\t\n\t\t\t\tif ($listenerName[0] != \"_\") {\n\t\t\t\t\t$listener = new $listenerName();\n\t\t\t\t\t$listeners = $listener->getListeners();\n\t\t\t\t\tforeach ($listeners as $event => $eventProps) {\n\t\t\t\t\t\t$eventPriority = (isset($eventProps[\"priority\"])) ? $eventProps[\"priority\"] : 0;\n\t\t\t\t\t\tself::$instance->addListener($event, array($listener, $eventProps[\"callable\"]), $eventPriority);\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}", "function __construct()\n\t{\n\t\t$this->events[\"BeforeShowList\"]=true;\n\n\t\t$this->events[\"BeforeProcessList\"]=true;\n\n\t\t$this->events[\"BeforeProcessPrint\"]=true;\n\n\t\t$this->events[\"BeforeShowPrint\"]=true;\n\n\t\t$this->events[\"BeforeQueryList\"]=true;\n\n\t\t$this->events[\"BeforeAdd\"]=true;\n\n\t\t$this->events[\"BeforeProcessEdit\"]=true;\n\n\t\t$this->events[\"BeforeEdit\"]=true;\n\n\t\t$this->events[\"BeforeShowEdit\"]=true;\n\n\t\t$this->events[\"BeforeProcessView\"]=true;\n\n\t\t$this->events[\"BeforeShowView\"]=true;\n\n\n\n\n\t\t$this->events[\"ProcessValuesView\"]=true;\n\n\t\t$this->events[\"ProcessValuesEdit\"]=true;\n\n\t\t$this->events[\"CustomAdd\"]=true;\n\n\t\t$this->events[\"CustomEdit\"]=true;\n\n\t\t$this->events[\"ProcessValuesAdd\"]=true;\n\n\t\t$this->events[\"BeforeQueryEdit\"]=true;\n\n\t\t$this->events[\"BeforeQueryView\"]=true;\n\n\n\t\t$this->events[\"BeforeProcessAdd\"]=true;\n\n\n//\tonscreen events\n\t\t$this->events[\"calmonthly_snippet2\"] = true;\n\t\t$this->events[\"calmonthly_snippet1\"] = true;\n\t\t$this->events[\"Monthly_Next_Prev\"] = true;\n\n\t}", "function defineHandlers() {\n EventsManager::listen('on_rawtext_to_richtext', 'on_rawtext_to_richtext');\n EventsManager::listen('on_daily', 'on_daily');\n EventsManager::listen('on_wireframe_updates', 'on_wireframe_updates');\n }", "public function createEvents()\n {\n //\n\n return 'something';\n }", "public static function createInstance()\n {\n return new GridPrintEventManager('ISerializable');\n }", "public function setUp()\n {\n if ($this->getOption('listener') === true) \n $this->addListener(new BlameableListener($this->_options));\n }", "public static function created($callback)\n {\n self::listenEvent('created', $callback);\n }", "public function addListener()\n {\n $dispatcher = $this->wrapper->getDispatcher();\n $listener = new TestListener();\n\n $dispatcher->addListener(PsKillEvents::PSKILL_PREPARE, [$listener, 'onPrepare']);\n $dispatcher->addListener(PsKillEvents::PSKILL_SUCCESS, [$listener, 'onSuccess']);\n $dispatcher->addListener(PsKillEvents::PSKILL_ERROR, [$listener, 'onError']);\n $dispatcher->addListener(PsKillEvents::PSKILL_BYPASS, [$listener, 'onBypass']);\n\n return $listener;\n }", "public static function addEventListener($event, $listenerClassName) {\n\t\tif (!is_a($listenerClassName, EventListenerInterface::class, TRUE)) {\n\t\t\tthrow new \\RuntimeException(\n\t\t\t\tsprintf(\n\t\t\t\t\t'Invalid CMIS Service EventListener: %s must implement %s',\n\t\t\t\t\t$listenerClassName,\n\t\t\t\t\tEventListenerInterface::class\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\tstatic::$eventListeners[get_called_class()][$event][] = $listenerClassName;\n\t}", "public function makeListener($listener, $wildcard = false): Closure;", "public function createSubscriber();", "public function listener() {\n\t\treturn $this->_runtime['listener'];\n\t}", "public function addEventListener($events, $eventListener)\n {\n $this->eventListeners[] = array('events' => $events, 'listener' => $eventListener);\n }", "function __construct()\r\n\t{\r\n\t\t$this->events[\"BeforeAdd\"]=true;\r\n\r\n\r\n\t}", "function __construct()\n\t{\n\n\t\t$this->events[\"BeforeEdit\"]=true;\n\n\n\t\t$this->events[\"BeforeShowAdd\"]=true;\n\n\t\t$this->events[\"BeforeShowEdit\"]=true;\n\n\t\t$this->events[\"IsRecordEditable\"]=true;\n\n\t\t$this->events[\"AfterAdd\"]=true;\n\n\t\t$this->events[\"BeforeAdd\"]=true;\n\n\t\t$this->events[\"AfterDelete\"]=true;\n\n\t\t$this->events[\"AfterEdit\"]=true;\n\n\t\t$this->events[\"BeforeMoveNextList\"]=true;\n\n\n//\tonscreen events\n\n\t}", "public function startListening();", "public function addEntryAddedListener(callable $listener): SubscriptionInterface;", "function __construct()\n\t{\n\t\t$this->events[\"BeforeAdd\"]=true;\n\n\t\t$this->events[\"BeforeEdit\"]=true;\n\n\t\t$this->events[\"AfterAdd\"]=true;\n\n\n\t}", "function GetEventListeners() {\n $my_file = '{%IEM_ADDONS_PATH%}/dynamiccontenttags/dynamiccontenttags.php';\n $listeners = array ();\n\n $listeners [] =\n array (\n 'eventname' => 'IEM_SENDSTUDIOFUNCTIONS_GENERATEMENULINKS',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'SetMenuItems'\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners[] =\n array (\n 'eventname' => 'IEM_USERAPI_GETPERMISSIONTYPES',\n 'trigger_details' => array (\n 'Interspire_Addons',\n 'GetAddonPermissions',\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners [] =\n array (\n 'eventname' => 'IEM_DCT_HTMLEDITOR_TINYMCEPLUGIN',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'DctTinyMCEPluginHook'\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners [] =\n array (\n 'eventname' => 'IEM_EDITOR_TAG_BUTTON',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'CreateInsertTagButton'\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners[] =\n array (\n 'eventname' => 'IEM_ADDON_DYNAMICCONTENTTAGS_GETALLTAGS',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'getAllTags'\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners[] =\n array (\n 'eventname' => 'IEM_ADDON_DYNAMICCONTENTTAGS_REPLACETAGCONTENT',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'replaceTagContent'\n ),\n 'trigger_file' => $my_file\n );\n\n return $listeners;\n }", "function on_creation() {\n $this->init();\n }", "public function addEventListener(ListenerInterface $eventListener)\n {\n $this->eventListeners[] = $eventListener;\n }" ]
[ "0.65685207", "0.62875676", "0.6221792", "0.6197413", "0.61627764", "0.6129312", "0.6096226", "0.6056844", "0.6051069", "0.6041841", "0.596228", "0.596194", "0.5957539", "0.59439605", "0.58821785", "0.58821785", "0.5874665", "0.5864387", "0.5856076", "0.584338", "0.5824244", "0.5820997", "0.5791637", "0.57913053", "0.57893854", "0.57716024", "0.5764599", "0.5744472", "0.57417566", "0.57387024", "0.5721539", "0.57068586", "0.5699624", "0.56838834", "0.5675836", "0.56686187", "0.5661412", "0.56601405", "0.56584114", "0.5649107", "0.5638085", "0.56257224", "0.56172097", "0.56064796", "0.55919635", "0.5579062", "0.55775297", "0.5559927", "0.5546297", "0.5546121", "0.5545537", "0.5539715", "0.55295366", "0.55276597", "0.5527287", "0.551302", "0.5497285", "0.5495119", "0.54845315", "0.54834753", "0.54812366", "0.5478984", "0.5474917", "0.5471286", "0.54693574", "0.54684293", "0.5466594", "0.5465012", "0.5450231", "0.5450062", "0.5450001", "0.544321", "0.54308116", "0.54218924", "0.5389615", "0.53857446", "0.5378957", "0.5378836", "0.53771406", "0.5368413", "0.5360908", "0.5356685", "0.5349897", "0.53419805", "0.5340825", "0.53330225", "0.53323317", "0.5330117", "0.53270465", "0.5326564", "0.5307367", "0.52996707", "0.52980274", "0.52973336", "0.52886003", "0.528163", "0.5276869", "0.5269541", "0.5268173", "0.5265876", "0.52629435" ]
0.0
-1
/ REVIEWS Block Functions
function modules() { global $hlpfile, $prefix, $dbi, $multilingual; include ("header.php"); $hlpfile = "manual/reviews.html"; GraphicAdmin($hlpfile); OpenTable(); echo "<center><font class=\"title\"><b>"._MODULESADMIN."</b></font></center>"; CloseTable(); $handle=opendir('modules'); while ($file = readdir($handle)) { if ( (!ereg("[.]",$file)) ) { $modlist .= "$file "; } } closedir($handle); $modlist = explode(" ", $modlist); sort($modlist); for ($i=0; $i < sizeof($modlist); $i++) { if($modlist[$i] != "") { $result = sql_query("select mid from $prefix"._modules." where title='$modlist[$i]'", $dbi); list ($mid) = sql_fetch_row($result, $dbi); if ($mid == "") { sql_query("insert into $prefix"._modules." values (NULL, '$modlist[$i]', '0', '0')", $dbi); } } } $result = sql_query("select title from $prefix"._modules."", $dbi); while (list($title) = sql_Fetch_row($result, $dbi)) { $a = 0; $handle=opendir('modules'); while ($file = readdir($handle)) { if ($file == $title) { $a = 1; } } closedir($handle); if ($a == 0) { sql_query("delete from $prefix"._modules." where title='$title'", $dbi); } } echo "<br>"; OpenTable(); echo "<br><center><font class=\"option\">"._MODULESADDONS."</font><br><br>" ."<font class=\"content\">"._MODULESACTIVATION."</font><br><br>" ."<form action=\"admin.php\" method=\"post\">" ."<table border=\"1\" align=\"center\" width=\"90%\"><tr><td align=\"center\">" ."<b>"._TITLE."</b></td><td align=\"center\"><b>"._STATUS."</b></td><td align=\"center\"><b>"._FUNCTIONS."</b></td></tr>"; $result = sql_query("select mid, title, active, view from $prefix"._modules." order by title ASC", $dbi); while(list($mid, $title, $active, $view) = sql_fetch_row($result, $dbi)) { if ($active == 1) { $active = _ACTIVE; $change = _DEACTIVATE; $act = 0; } else { $active = "<i>"._INACTIVE."</i>"; $change = _ACTIVATE; $act = 1; } echo "<tr><td>&nbsp;$title</td><td align=\"center\">$active</td><td align=\"center\">[ <a href=\"admin.php?op=module_status&mid=$mid&active=$act\">$change</a> ]</td></tr>"; } echo "</table>"; CloseTable(); include ("footer.php"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction() {\n if (!Engine_Api::_()->core()->hasSubject('sitereview_listing') && !Engine_Api::_()->core()->hasSubject('sitereview_review')) {\n return $this->setNoRender();\n }\n\n if (Engine_Api::_()->core()->hasSubject('sitereview_listing')) {\n $this->view->sitereview = $sitereview = Engine_Api::_()->core()->getSubject();\n } elseif (Engine_Api::_()->core()->hasSubject('sitereview_review')) {\n $this->view->sitereview = $sitereview = Engine_Api::_()->core()->getSubject()->getParent();\n }\n\n //GET SUBJECT\n $this->view->sitereview = $sitereview = Engine_Api::_()->core()->getSubject();\n\n $this->view->viewType = $this->_getParam('viewType', 0);\n $this->view->statistics = $this->_getParam('statistics', array(\"likeCount\", \"reviewCount\", \"commentCount\"));\n Engine_Api::_()->sitereview()->setListingTypeInRegistry($sitereview->listingtype_id);\n $listingtypeArray = Zend_Registry::get('listingtypeArray' . $sitereview->listingtype_id);\n\n //SEND REVIEW TITLE TO TPL\n $this->view->reviewTitleSingular = $listingtypeArray->review_title_singular ? $listingtypeArray->review_title_singular : 'Review';\n $this->view->reviewTitlePlular = $listingtypeArray->review_title_plural ? $listingtypeArray->review_title_plural : 'Reviews';\n \n if (!empty($this->view->statistics) && empty($listingtypeArray->reviews) || $listingtypeArray->reviews == 1) {\n $key = array_search('reviewCount', $this->view->statistics);\n if (!empty($key)) {\n unset($this->view->statistics[$key]);\n }\n }\n\n $values = array();\n $values['listing_id'] = $sitereview->listing_id;\n $this->view->count = $limit = $values['limit'] = $this->_getParam('itemCount', 3);\n $values['similar_items_order'] = 1;\n $this->view->title_truncation = $this->_getParam('truncation', 24);\n $values['ratingType'] = $this->view->ratingType = $this->_getParam('ratingType', 'rating_avg');\n $listingTable = Engine_Api::_()->getDbTable('listings', 'sitereview');\n\n $similar_items = Engine_Api::_()->getDbTable('otherinfo', 'sitereview')->getColumnValue($sitereview->listing_id, 'similar_items');\n $similarItems = array();\n if (!empty($similar_items)) {\n $similarItems = Zend_Json_Decoder::decode($similar_items);\n }\n\n $showSameCategoryListings = $this->_getParam('showSameCategoryListings', 1);\n \n if (!empty($similar_items) && !empty($similarItems) && Count($similarItems) >= 0) {\n $values['similarItems'] = $similarItems;\n $this->view->listings = $listingTable->getListing('', $values);\n } else {\n \n if(!$showSameCategoryListings) {\n return $this->setNoRender();\n } \n \n $values['listingtype_id'] = $sitereview->listingtype_id;\n\n if ($sitereview->subsubcategory_id) {\n $values['subsubcategory_id'] = $sitereview->subsubcategory_id;\n } elseif ($sitereview->subcategory_id) {\n $values['subcategory_id'] = $sitereview->subcategory_id;\n } elseif ($sitereview->category_id) {\n $values['category_id'] = $sitereview->category_id;\n } else {\n return $this->setNoRender();\n }\n\n $this->view->listings = $listingTable->getListing('', $values);\n }\n\n if (Engine_API::_()->seaocore()->checkSitemobileMode('fullsite-mode')) {\n $this->_childCount = count($this->view->listings);\n } else {\n $this->view->listings->setCurrentPageNumber($this->_getParam('page'));\n $this->view->listings->setItemCountPerPage($limit);\n $this->_childCount = $this->view->listings->getTotalItemCount();\n }\n\n if ($this->_childCount <= 0) {\n return $this->setNoRender();\n }\n\n $this->view->columnWidth = $this->_getParam('columnWidth', '180');\n $this->view->columnHeight = $this->_getParam('columnHeight', '328');\n }", "public function getAllReviews()\n {\n /* code goes here */\n }", "public function actionReview(){\r\n $user = $_REQUEST['pro'];\r\n $list = MvCouiManager::getReview($user);\r\n $aclist = MvCouiManager::getAcreview($user);\r\n $nolist = MvCouiManager::getNoreview($user);\r\n $dellist = MvCouiManager::getDelreview();\r\n $this->render('review',array('list'=>$list,'aclist'=>$aclist,'nolist'=>$nolist,'dellist'=>$dellist));\r\n }", "private function list_reviews() {\n\t\tglobal $adv_rvws_tbl, $dbh, $adv_info_tbl;\n\t\t\t\n\t\t$values = array();\n\t\t$values[] = (int)$_GET['loc_id'];\n\t\t$sql_query = \"SELECT\n\t\t\t\t\t\tid\n\t\t\t\t\t FROM\n\t\t\t\t\t\tadvertiser_reviews\n\t\t\t\t\t WHERE\n\t\t\t\t\t\tapproved = 1\n\t\t\t\t\t AND\n\t\t\t\t\t\tadvertiser_id = ?\";\n\t\tif(isset($_GET['alt_loc_id'])){\n\t\t $sql_query .= \"\n\t\t \t\t\t\tAND\n\t\t\t\t\t\t advertiser_alt_id = ?\";\n\t\t $values[] = (int)$_GET['alt_loc_id'];\n\t\t} else {\n\t\t $sql_query .= \"\n\t\t\t\t\t\tAND\n\t\t\t\t\t\t (advertiser_alt_id is null OR advertiser_alt_id = 0)\";\t\t\t\t\n\t\t}\n\t\t$sql_query .= \"\n\t\t\t\t\tORDER BY added DESC\n\t\t\t\t\t LIMIT \".ADVERT_INFO_REVIEWS_DISP.\";\";\n\t\n\t\t\n\t\t$stmt = $dbh->prepare($sql_query);\t\t\t\t\t \n\t\t$result = $stmt->execute($values);\n\t\t\n\t\t// create review boxes\n\t\t$rev_box_arr = array();\n\t\twhile ($reviews = $result->fetchRow(MDB2_FETCHMODE_ASSOC)) {\n\t\t\t$adv_rvws_tbl->get_db_vars($reviews['id']);\n\t\t\t$rev_arr = array();\n\t\t\t$rev_arr['id'] = $reviews['id'];\n\t\t\t$rev_arr['added'] = $adv_rvws_tbl->added;\n\t\t\t$rev_arr['rating'] = $adv_rvws_tbl->rating;\n\t\t\t$rev_arr['review'] = $adv_rvws_tbl->review;\n\t\t\t\n\t\t\t$rev_box_arr[] = $this->reviews_box($rev_arr);\n\t\t}\n\t\t\n\t\t$rev_box_final = '';\n\t\tif (count($rev_box_arr) > 0) {\n\t\t // create review box area\n\t\t $rev_box_final = '<tr>\n\t\t \t\t\t\t\t\t<td colspan=\"2\">\n\t\t\t\t\t\t\t\t\t<table border=\"0\" cellspacing=\"0\" cellpadding=\"4\">';\n\t\t\t\t \n\t\t $rev_box_final .= implode($this->reviews_mid(),$rev_box_arr);\t\t\n\t\t\t\t \n\t\t $rev_box_final .= '</table>\n\t\t\t\t</td>\n\t\t </tr>';\n\t\t\t\n\t\t if (count($rev_box_arr) > 5) {\n\t\t\t \n\t\t\t$adv_info_tbl->get_db_vars((int)$_GET['loc_id']);\n\t\t\t \n\t\t\t$page_link = curPageURL().'/reviews/';\n\t\t\t\n\t\t\t$rev_box_final .= '<tr>\n\t\t\t <td colspan=\"2\" align=\"center\"><a href=\"#\"><strong>View All Reviews</strong></a></td>\n\t\t\t</tr>';\n\t\t }\n\t\t}\n\t\n\treturn $rev_box_final;\n\t}", "public function reviews()\n {\n $this->authCheck();\n\n /*$messagesData = DB::table('web_messages')\n ->get();*/\n\n $reviewsData = DB::table('reviews')->where('is_deleted', '=', 'No')->get();\n /*whereNull('is_deleted')->get();*/\n \n $reviews=view('admin.reviews')\n ->with('reviewsData',$reviewsData);\n\n return view('admin.master')\n ->with('main_content',$reviews);\n }", "public function indexAction()\n {\n $viewer = Engine_Api::_()->user()->getViewer();\n\n $params = array(\n 'featured' => 1,\n 'order' => 'random'\n );\n \n $this->view->review = Engine_Api::_()->getDbtable('reviews', 'review')->getReview($params);\n \n if (!$this->view->review) {\n return $this->setNoRender();\n }\n \n }", "function getReview()\n {\n $this->logged_in = $this->flexi_auth->is_logged_in();\n if (!$this->logged_in) {\n # if not logged show error message\n $dataArr = array();\n $pageArr = array('controller' => 'review', 'view' => 'error');\n $this->ajax->render($pageArr, $dataArr);\n }\n\n $receiver_id = intval($this->input->post('receiver_id'));\n if (!$receiver_id) {\n $dataArr = array();\n $pageArr = array('controller' => 'review', 'view' => 'error');\n $this->ajax->render($pageArr, $dataArr);\n }\n\n $login_id = $this->flexi_auth->get_user_id();\n $reviewDtlArr = $this->review->getReviewsByReceiver($receiver_id);\n $receiverArr = array();\n $userDtlArr = array();\n if (count($reviewDtlArr)) {\n foreach ($reviewDtlArr as $key => $value) {\n # code...\n array_push($receiverArr, $value['sender_id']);\n }\n array_push($receiverArr, $receiver_id);\n $receiverArr = array_unique($receiverArr);\n $receiverArr = array_filter($receiverArr);\n\n if (count($receiverArr)) {\n\n foreach ($receiverArr as $key_2 => $value_2) {\n # code...\n $tempUserArr = array();\n array_push($tempUserArr, $this->user->getUserDetailsById($value_2));\n $userDtlArr[$value_2] = isset($tempUserArr[0][0]) ? $tempUserArr[0][0] : '';\n }\n }\n $userDtlArr = array_filter($userDtlArr);\n\n $pageArr = array(\n 'controller' => 'review',\n 'view' => 'show_review'\n );\n $dataArr = array(\n 'receiver_id' => $receiver_id,\n 'review_count' => true,\n 'userDtlArr' => $userDtlArr,\n 'reviewDtlArr' => $reviewDtlArr\n );\n $this->ajax->render($pageArr, $dataArr);\n\n } else {\n $tempUserArr = $this->user->getUserDetailsById($receiver_id);\n $userDtlArr[$receiver_id] = isset($tempUserArr[0]) ? $tempUserArr[0] : '';\n #print_r($userDtlArr);\n $pageArr = array(\n 'controller' => 'review',\n 'view' => 'show_review'\n );\n $dataArr = array(\n 'receiver_id' => $receiver_id,\n 'review_count' => false,\n 'userDtlArr' => $userDtlArr\n );\n $this->ajax->render($pageArr, $dataArr);\n }\n\n\n }", "public function view(Review $review);", "public function indexAction()\n\t{\n $this->_title($this->__('All Reviews'));\n\t\tif ($this->getRequest()->getParam('ajax')) {\n\t\t\t\treturn $this->_forward('reviewGrid');\n\t\t}\n\t\t$this->loadLayout();\n\t\t$this->_setActiveMenu( 'sales/salesreport' );\n \t$this->_addContent($this->getLayout()->createBlock('salesreport/adminhtml_reviews'));\n\t\t$this->renderLayout();\n\t}", "function indexAction()\r\n {\r\n if (!$this->config->isPhaseOpen(Config::REVIEWING_PHASE)) {\r\n $this->view->content = $this->texts->reviewer->review_phase_is_closed;\r\n echo $this->view->render(\"layout\");\r\n return;\r\n }\r\n\r\n $nbPapersInGroup = 15;\r\n\r\n // Get the current group\r\n $currentGroup = $this->getRequest()->getParam(\"group\", \"0\");\r\n if ($currentGroup == \"0\") {\r\n if (isSet($_SESSION['myreview_current_group'])) {\r\n $currentGroup = $_SESSION['myreview_current_group'];\r\n }\r\n else $currentGroup = 1;\r\n }\r\n\r\n // Put in the session\r\n $_SESSION['myreview_current_group'] = $currentGroup;\r\n\r\n $minPaper = ($currentGroup -1) * $nbPapersInGroup + 1 ;\r\n $maxPaper = $minPaper + $nbPapersInGroup;\r\n\r\n $loginSuccessful = $this->getRequest()->getParam(\"login_successful\");\r\n if (!empty($loginSuccessful)) {\r\n $this->view->initial_message = $this->zmax_context->texts->welcome_connected_reviewer;\r\n }\r\n else {\r\n $this->view->initial_message = \"\";\r\n }\r\n\r\n $this->view->setFile (\"content\", \"index.xml\");\r\n $texts = $this->zmax_context->texts;\r\n\r\n $requiredFileTbl = new RequiredFile();\r\n\r\n /* Select all the papers and list them.\r\n First extract the 'bloc' describing a line from the template */\r\n\r\n $this->view->setBlock(\"content\", \"GROUP\", \"GROUPS\");\r\n $this->view->setBlock(\"content\", \"PAPER\", \"PAPERS\");\r\n $this->view->setBlock(\"content\", \"FORUM_LINK\");\r\n $this->view->setBlock(\"PAPER\", \"ALL_REVIEWS\", \"REVIEWS\");\r\n $this->view->setBlock(\"PAPER\", \"MY_REVIEW\", \"REVIEW\");\r\n $this->view->setBlock(\"PAPER\", \"DOWNLOAD\", \"DOWNLOADS\");\r\n $this->view->setBlock(\"DOWNLOAD\", \"DOWNLOAD_LINK\", \"THE_LINK\");\r\n $this->view->setBlock(\"PAPER\", \"review\", \"show_review\");\r\n $this->view->setBlock(\"review\", \"review_mark\", \"review_marks\");\r\n $this->view->setBlock(\"review\", \"review_answer\", \"review_answers\");\r\n $this->view->setBlock(\"PAPER\", \"SECTION\", \"SECTIONS\");\r\n $this->view->setBlock(\"PAPER\", \"ANSWER\", \"ANSWERS\");\r\n\r\n if ($this->config->discussion_mode != Config::GLOBAL_DISCUSSION) {\r\n $this->view->set_var(\"FORUM_LINK\", \"\");\r\n }\r\n\r\n // First, create the groups\r\n $iPaper = 0; $iGroup = 0; $begin = 1;\r\n $qPapers = \"SELECT idPaper FROM Review WHERE id_user = '{$this->user->id}'\";\r\n $rPapers = $this->zmax_context->db->fetchAll($qPapers);\r\n $nbPapers = count ($rPapers);\r\n // echo \"Nb = $nbPapers<br/>\";\r\n // while ($p = $rPapers->fetch (Zend_Db::FETCH_OBJ)) {\r\n foreach ($rPapers as $paper) {\r\n $iPaper++;\r\n if ($iPaper % $nbPapersInGroup == 0 or $iPaper == $nbPapers) {\r\n $iGroup ++;\r\n $end = $iPaper;\r\n $this->view->group_desc= \"($begin-$end)\";\r\n $this->view->id_group = $iGroup;\r\n if ($iGroup == $currentGroup) {\r\n $this->view->current_group = \" bgcolor='lightgrey' \";\r\n }\r\n else $this->view->current_group = \"\";\r\n $this->view->append (\"GROUPS\", \"GROUP\");\r\n $begin = $end+1;\r\n }\r\n }\r\n\r\n // Loop on the papers assigned to the reviewer\r\n $reviews = $this->user->findReview();\r\n $nbPapers = $i = 0;\r\n foreach ($reviews as $review) {\r\n $nbPapers++;\r\n // Take account of groups\r\n if ($nbPapers < $minPaper or $nbPapers >= $maxPaper) continue;\r\n \r\n $this->view->set_var(\"css_class\", Config::CssCLass($i));\r\n\r\n $paper = $review->findParentPaper();\r\n\r\n // Instantiate entities in the view\r\n $paper->putInView($this->view);\r\n\r\n // Loop on the files associated to the paper, and propose a download link\r\n $requiredFiles = $requiredFileTbl->fetchAll();\r\n $countRequired = 0;\r\n $this->view->DOWNLOADS = \"\";\r\n foreach ($requiredFiles as $requiredFile) {\r\n $requiredFile->putInView($this->view);\r\n $countRequired++;\r\n\r\n if (!$paper->fileExists($requiredFile)) {\r\n $this->view->THE_LINK = $texts->reviewer->not_yet_uploaded ;\r\n }\r\n else {\r\n $this->view->assign(\"THE_LINK\", \"DOWNLOAD_LINK\");\r\n }\r\n $this->view->assign(\"DOWNLOAD_BIS\", \"DOWNLOAD\");\r\n $this->view->append(\"DOWNLOADS\", \"DOWNLOAD_BIS\");\r\n }\r\n if ($countRequired == 0) {\r\n $this->view->DOWNLOADS = $texts->reviewer->no_file_to_download ;\r\n }\r\n\r\n if (!$review->overall) {\r\n $this->view->submit_review = \"<font color='red'>\" .\r\n $texts->reviewer->submit_review . \"</font>\";\r\n }\r\n else {\r\n $this->view->submit_review =\r\n \"<font color='green'>\" . $texts->reviewer->update_review. \"</font>\";\r\n }\r\n\r\n // If the local discussion mode is enabled AND the reviewer has posted her\r\n // review: give the ability to look at other reviews\r\n if ($this->config->discussion_mode != Config::NO_DISCUSSION and $review->overall) {\r\n $this->view->review_header = $texts->reviewer->all_reviews;\r\n $this->view->set_var(\"REVIEW\",\"\");\r\n $this->view->assign(\"REVIEWS\",\"ALL_REVIEWS\");\r\n }\r\n else {\r\n // Show only my review, no forum, no other reviews\r\n $this->view->show_review = $review->showReview($this->view);\r\n $this->view->assign(\"REVIEW\",\"MY_REVIEW\");\r\n $this->view->review_header = $texts->reviewer->your_review;\r\n $this->view->REVIEWS = \"\";\r\n }\r\n $this->view->append(\"PAPERS\", \"PAPER\");\r\n }\r\n\r\n if ($nbPapers == 0) {\r\n $this->view->set_var(\"PAPERS\", \"No papers\");\r\n }\r\n\r\n echo $this->view->render(\"layout\");\r\n }", "function Show_Sitereview()\n\t\t{\n\t\t\tglobal $Captions_arr,$ecom_siteid,$db,$ecom_hostname,$vImage,$Settings_arr,$alert,$short,$long,$medium;\n\t\t\t\n\t\t\t/*$sql_order_limit = \"SELECT sitereview_ord_fld,sitereview_ord_orderby,sitereview_maxcntperpage \n\t\t\t\t\t\t\t\tFROM general_settings_sites_common \n\t\t\t\t\t\t\t\tWHERE sites_site_id = $ecom_siteid \n\t\t\t\t\t\t\t\t\";\n\t\t\t$ret_order_limit\t= $db->query($sql_order_limit);*/\n\t\t\tlist($review_order_field,$review_order_by,$site_review_per_page) = array($Settings_arr['sitereview_ord_fld'],$Settings_arr['sitereview_ord_orderby'],$Settings_arr['sitereview_maxcntperpage']);\n\t\t\t$pg_variable\t= 'review_pg';\n\t\t\t$sql_tot_sirereviews = \"SELECT count(review_id)\n\t\t\t\t\t\tFROM \n\t\t\t\t\t\t\tsites_reviews \n\t\t\t\t\t\tWHERE \n\t\t\t\t\t\t\tsites_site_id = $ecom_siteid \n\t\t\t\t\t\t\tAND review_status = 'APPROVED' \n\t\t\t\t\t\t\tAND review_hide=0\";\n\t\t\t$ret_tot_sirereviews\t= $db->query($sql_tot_sirereviews);\n\t\t\tlist($tot_cnt) \t = $db->fetch_array($ret_tot_sirereviews); \t\n\t\t\t$pg_variable\t= 'sitereview_pg';\n\t\t\t//$start_arr \t\t = prepare_paging($_REQUEST[$pg_variable],$site_review_per_page);\n\t\t\t$start_var \t\t= prepare_paging($_REQUEST['sitereview_pg'],$site_review_per_page,$tot_cnt);\n\t\t\t$Limitsitereviews\t\t= \" LIMIT \".$start_var['startrec'].\", \".$site_review_per_page;\n\t\t\t\n\t\t\t$sql_sitereview = \"SELECT review_id,DATE_FORMAT(review_date,'%e-%b-%Y : %r') as reviewed_on,\n\t\t\t\t\t\t\t\t\t\t\treview_author,review_rating,review_details \n\t\t\t\t\t\t\t\t\t\tFROM \n\t\t\t\t\t\t\t\t\t\t\t sites_reviews \n\t\t\t\t\t\t\t\t\t\tWHERE \n\t\t\t\t\t\t\t\t\t\t\tsites_site_id = $ecom_siteid \n\t\t\t\t\t\t\t\t\t\t\tAND review_status = 'APPROVED' \n\t\t\t\t\t\t\t\t\t\t\tAND review_hide=0 \n\t\t\t\t\t\t\t\t\t \tORDER BY \n\t\t\t\t\t\t\t\t\t\t\t$review_order_field $review_order_by \n\t\t\t\t\t\t\t\t\t\t$Limitsitereviews\";\n\t\t\t\t$ret_sitereview = $db->query($sql_sitereview);\t\n\t\t\t\t\t\t\t\t\t\n\t\t?>\n\t\t\t<form method=\"post\" action=\"\" name='frm_sitereview' id=\"frm_sitereview\" class=\"frm_cls\" onsubmit=\"return validate_sitereview(this)\">\n\t\t\t<div class=\"treemenu\"><a href=\"<? url_link('');?>\"><?=$Captions_arr['COMMON']['TREE_MENU_HOME_LINK'];?></a> >> <?=$Captions_arr['SITE_REVIEWS']['SITE_REVIEW_TREEMENU_TITLE']?></div>\n\t\t\n\t\t<?PHP \tif ($db->num_rows($ret_sitereview)){ ?>\n\t\t<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n\t\n\t\t<?php if($Captions_arr['SITE_REVIEWS']['SITE_REVIEW_READREVIEW_TITLE']) {?>\n\t\t<tr>\n <td colspan=\"2\" class=\"message_header\"><?=$Captions_arr['SITE_REVIEWS']['SITE_REVIEW_READREVIEW_TITLE']?></td>\n </tr>\n\t\t<?php } ?>\n\t\t\n\t\t</table>\n\t<?php \n\t\n\t\t\twhile($row_sitereview = $db->fetch_array($ret_sitereview)){\n\t\t\t$rating = $row_sitereview['review_rating'];\n\t\t?>\n\t\n\t\t\t<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"readreivewtable\">\n <tr>\n <td colspan=\"2\">&nbsp;</td>\n </tr>\n <tr>\n <td width=\"35%\" align=\"left\" valign=\"top\" class=\"readreivewicon\" ><?=$Captions_arr['SITE_REVIEWS']['READ_SITE_REVIEW_AUTHOR']?></td>\n <td width=\"65%\" align=\"left\" valign=\"top\" class=\"readreivewname\"><?=stripslashes($row_sitereview['review_author'])?> ( <?=$row_sitereview['reviewed_on']?>)</td>\n </tr>\n <tr>\n <td align=\"left\" valign=\"top\" class=\"readreivewcontent\"><?=$Captions_arr['SITE_REVIEWS']['READ_SITE_REVIEW_REVIEW']?></td>\n <td align=\"left\" valign=\"top\"><?=stripslashes($row_sitereview['review_details'])?></td>\n </tr>\n <tr>\n <td align=\"left\" valign=\"top\" class=\"readreivewcontent\"><?=$Captions_arr['SITE_REVIEWS']['READ_SITE_REVIEW_RATING']?></td>\n <td align=\"left\" valign=\"top\">\n\t\t \n\t\t <?php \n\t\t\n\t\t for($i=1;$i<=$rating;$i++){\n\t\t \n\t\t ?>\n\t\t <img src=\"<? url_site_image('reviewstar_on.gif',0)?>\" width=\"9\" height=\"10\" />\n\t\t <? } for($k=$rating+1;$k<=5;$k++){?><img src=\"<? url_site_image('reviewstar_off.gif',0)?>\" width=\"9\" height=\"10\" /><? }?></td>\n </tr></table>\n\t\t<?php \n\t\t\t}\n\t\t\n\t\tif ($tot_cnt>0){\n\t\t?>\n\t\t<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\" class=\"readreivewtable\">\n\t\t<tr>\n\t\t\t<td colspan=\"2\" align=\"center\" class=\"pagingcontainertd\">\n\t\t\t<?php \n\t\t\t//\t$path = '';\n\t\t\t\t//$page_containerclass\t= 'pagenavcontainer'; \t// Paging container class\n\t\t\t///\t$page_navurlclass \t\t= 'pagenavul';\t\t\t// Paging url class\n\t\t\t//\t$page_currentclass\t\t= 'pagenav_current';\t// Paging current page class\n\t\t\t\t//show_paging($path,$_REQUEST[$pg_variable],$start_arr['counterstart'],$tot_cnt,$site_review_per_page,$pg_variable,'')\n\t\t\t\t$path = url_link('sitereview.html',1);\n\t\t\t\t$query_string='';\n\t\t\t\t$query_string .= '';\n\t\t\t\tpaging_footer($path,$query_string,$tot_cnt,$start_var['pg'],$start_var['pages'],'',$pg_variable,'Site reviews',$pageclass_arr); \n\n\t\t\t?>\t\n\t\t\t\n\t\t\t</td>\n\t\t</tr>\n\t\t\t\n </table><?php\n\t\t\t}\n\t\t}\t\n\t\t\t?>\n\t\t\t<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"3\" class=\"addreivewtable\">\n\t\t\t<? if($Captions_arr['SITE_REVIEWS']['SITE_REVIEW_READREVIEW_TITLE']) {?>\n\t\t\t<tr>\n\t\t\t<td colspan=\"2\" class=\"message_header\"><?=$Captions_arr['SITE_REVIEWS']['SITE_REVIEW_ADDREVIEW_TITLE']?></td>\n\t\t\t</tr>\t<?php } ?>\t\n\t\t\t<?php if($_REQUEST['alert1']==1 && !$alert){ \n\t\t\t?>\t<tr>\n\t\t\t\t<td colspan=\"2\" class=\"message\" align=\"center\">\n\t\t\t\t<?php \n\t\t\t\t\t\t echo stripslashes($Captions_arr['SITE_REVIEWS']['SITE_REVIEW_ADDED_SUCCESSFULLY']);\n\t\t\t\t\t\t \n\t\t\t\t?>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t<?php }\n\t\tif($alert)\n\t\t{\n\t\t?>\n\t\t<tr>\n\t\t\t\t<td colspan=\"2\" class=\"errormsg\" align=\"center\">\n\t\t<?\n\t\t if($Captions_arr['SITE_REVIEWS'][$alert]){\n\t\t\t\t\t\t \t\techo \"Error !! \". stripslashes($Captions_arr['SITE_REVIEWS'][$alert]);\n\t\t\t\t\t\t }else{\n\t\t\t\t\t\t \t\techo \"Error !! \". stripslashes($alert);\n\t\t\t\t\t\t }\n\t\t?>\n\t\t\t</td>\n\t\t</tr>\n\t\t<?\t\t\t\t \n\t\t} \n\t\t?>\n\t\t\t<tr>\n\t\t\t<td width=\"41%\" class=\"addreivewconent\"><?=$Captions_arr['SITE_REVIEWS']['SITE_REVIEW_AUTHOR']?><span class=\"redtext\">*</span></td>\n\t\t\t<td width=\"59%\" align=\"left\" valign=\"middle\"><input name=\"review_author\" type=\"text\" class=\"addreivewinput\" id=\"review_author\" size=\"25\" maxlength=\"<?=$short?>\" /></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t<td width=\"41%\" class=\"addreivewconent\"><?=$Captions_arr['SITE_REVIEWS']['SITE_REVIEW_AUTHOR_EMAIL']?><span class=\"redtext\">*</span></td>\n\t\t\t<td width=\"59%\" align=\"left\" valign=\"middle\"><input name=\"review_author_email\" type=\"text\" class=\"addreivewinput\" id=\"review_author_email\" size=\"25\" maxlength=\"<?=$medium?>\"/></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t<td class=\"addreivewconent\"><?=$Captions_arr['SITE_REVIEWS']['SITE_REVIEW_REVIEWTEXT']?><span class=\"redtext\">*</span></td>\n\t\t\t<td align=\"left\" valign=\"middle\"><textarea name=\"review_details\" cols=\"33\" rows=\"4\" class=\"addreivewinput\" id=\"review_details\"></textarea></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t<td class=\"addreivewconent\"><?=$Captions_arr['SITE_REVIEWS']['SITE_REVIEW_RATING']?></td>\n\t\t\t<td align=\"left\" valign=\"middle\"><label>\n\t\t\t<select name=\"review_rating\" class=\"addreivewinput\" id=\"review_rating\">\n\t\t\t<? for($i=1;$i<=5;$i++)\n\t\t\t{\n\t\t\t?>\n\t\t\t<option value=\"<?=$i?>\"><?=$i?></option>\n\t\t\t<?\n\t\t\t}?>\n\t\t\t</select>\n\t\t\t</label></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t<td>&nbsp;</td>\n\t\t\t<td align=\"left\" valign=\"middle\">&nbsp;</td>\n\t\t\t</tr>\n\t\t\t<?\tif($Settings_arr['imageverification_req_sitereview']) {?>\n\n\t\t\t<tr>\n\t\t\t<td class=\"addreivewconent\">&nbsp;</td>\n\t\t\t<td align=\"left\" valign=\"middle\" class=\"addreivewconentred\"><img src=\"<?php url_verification_image('includes/vimg.php?size=4&pass_vname=sitereview_Vimg')?>\" border=\"0\" alt=\"Image Verification\"/>\n\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t<td class=\"addreivewconent\"><?=$Captions_arr['SITE_REVIEWS']['SITE_REVIEW_REVIEWCODE']?></td>\n\t\t\t<td align=\"left\" valign=\"middle\" class=\"addreivewconentred\">\n\t\t\t\n\t\t\t<?php \n\t\t\t\t// showing the textbox to enter the image verification code\n\t\t\t\t$vImage->showCodBox(1,'sitereview_Vimg','class=\"inputA_imgver\"'); \n\t\t\t?>\n\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<? }?>\n\t\t\t<tr>\n\t\t\t<td class=\"addreivewconent\"><input type=\"hidden\" name=\"action_purpose\" id=\"action_purpose\" value=\"add_site_review\"></td>\n\t\t\t<td align=\"left\" valign=\"middle\"><input name=\"sitereview_Submit\" type=\"submit\" class=\"buttongray\" id=\"sitereview_Submit\" value=\"<?=$Captions_arr['SITE_REVIEWS']['SITE_REVIEW_SAVE_BUTTON']?>\" /></td>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t\t</form>\n\t\t\t\n\t\t\t<script language=\"javascript\">\n\t\t/* Function to validate the site review */\nfunction validate_sitereview(frm)\n{\n\tfieldRequired \t\t= Array('review_author','review_author_email','review_details');\n\tfieldDescription \t= Array('<?=$Captions_arr['SITE_REVIEWS']['SITE_REVIEW_ALERT_AUTHOR']?>','<?=$Captions_arr['SITE_REVIEWS']['SITE_REVIEW_ALERT_EMAIL']?>','<?=$Captions_arr['SITE_REVIEWS']['SITE_REVIEW_ALERT_DETAILS']?>');\n\tfieldEmail \t\t\t= Array('review_author_email');\n\tfieldConfirm \t\t= Array();\n\tfieldConfirmDesc \t= Array();\n\tfieldNumeric \t\t= Array();\n\tif(Validate_Form_Objects(frm,fieldRequired,fieldDescription,fieldEmail,fieldConfirm,fieldConfirmDesc,fieldNumeric)){\n\t<?php if($Settings_arr['imageverification_req_sitereview']){ // code for validating the image verification- needs only if it is enabled\n\t\t\t\techo \"if(frm.sitereview_Vimg.value==''){\n\t\t\t\t\talert('Enter-\".$Captions_arr['SITE_REVIEWS']['SITE_REVIEW_ALERT_VERIFICATION_CODE'].\"');\n\t\t\t\t\tfrm.sitereview_Vimg.focus();\n\t\t\t\t\treturn false;\n\t\t\t\t}else{\n\t\t\t\t\treturn true;\n\t\t\t\t}\";\n\t\t\t}?>\n\t\treturn true;\n\t\t}\n\telse\n\t{\n\t\treturn false;\n\t}\n}\n</script>\n\t\t<?php\t\n\t\t}", "function processreviewAction()\r\n {\r\n if (!$this->config->isPhaseOpen(Config::REVIEWING_PHASE)) {\r\n $this->view->content = $this->texts->reviewer->review_phase_is_closed;\r\n echo $this->view->render(\"layout\");\r\n return;\r\n }\r\n\r\n $this->view->setFile(\"content\", \"processreview.xml\");\r\n $this->view->setBlock(\"content\", \"review\");\r\n // Extract the block with marks.\r\n $this->view->set_block('review', \"review_mark\", \"review_marks\");\r\n // Extracts the block with answers\r\n $this->view->set_block('review', \"review_answer\", \"review_answers\");\r\n\r\n\r\n // Actions if the id of a paper is submitted\r\n if (isSet($_REQUEST['idPaper'])) {\r\n $idPaper = $this->getRequest()->getParam(\"idPaper\");\r\n $reviewTbl = new Review();\r\n $review = $reviewTbl->find($idPaper, $this->user->id)->current();\r\n\r\n // Check that the paper is REALLY assigned to the reviewer\r\n if (is_object($review)) {\r\n\r\n // Put the review in the database\r\n $review->updateFromArray ($_POST);\r\n\r\n // Create the review presentation\r\n $this->view->review = $review->showReview($this->view, true) ;\r\n // Resolve the entities replacement\r\n $this->view->assign(\"content\", \"content\");\r\n \r\n // Send a mail to confirm review submission\r\n $mail = new Mail (Mail::SOME_USER, $this->texts->mail->subj_ack_review,\r\n $this->view->getScriptPaths());\r\n $mail->setFormat(Mail::FORMAT_HTML);\r\n $mail->setTo($this->user->email);\r\n\r\n $mail->loadTemplate ($this->lang, \"ack_review\");\r\n $mailViewEngine = $mail->getEngine();\r\n $mailViewEngine->setBlock(\"template\", \"template_mark\", \"template_marks\");\r\n $mailViewEngine->setBlock(\"template\", \"template_answer\", \"template_answers\");\r\n\r\n $instantiatedMail = $review->showReview($mailViewEngine, true, \"template\");\r\n $mail->setTemplate ($instantiatedMail);\r\n if ($this->config->mailOnReview == \"Y\") {\r\n $mail->setCopyToChair(true);\r\n }\r\n\r\n $mail->send();\r\n }\r\n else {\r\n $this->view->content = $this->texts->def->access_denied;;\r\n }\r\n }\r\n else {\r\n $this->view->content = \"Invalid action<br/>\";\r\n }\r\n echo $this->view->render(\"layout\");\r\n }", "function paperAction()\r\n {\r\n if (!$this->config->isPhaseOpen(Config::REVIEWING_PHASE)) {\r\n $this->view->content = $this->texts->reviewer->review_phase_is_closed;\r\n echo $this->view->render(\"layout\");\r\n return;\r\n }\r\n\r\n $reviewTbl = new Review();\r\n $paperTbl = new Paper();\r\n $messageTbl = new Message ();\r\n\r\n $this->view->setFile (\"content\", \"paper.xml\");\r\n $this->view->setBlock (\"content\", \"paper_status_link\");\r\n $this->view->setBlock (\"content\", \"message\", \"messages\");\r\n $this->view->setBlock(\"content\", \"review\", \"show_review\");\r\n $this->view->setBlock(\"review\", \"review_mark\", \"review_marks\");\r\n $this->view->setBlock(\"review\", \"review_answer\", \"review_answers\");\r\n $this->view->initial_message = \"\";\r\n\r\n // Am I an admin? If yes I want a link to the paper status page\r\n if (!$this->user->isAdmin()) {\r\n $this->view->paper_status_link =\"\";\r\n }\r\n\r\n $texts = $this->zmax_context->texts;\r\n\r\n if (isSet($_REQUEST['id_paper']) and $this->config->discussion_mode != Config::NO_DISCUSSION) {\r\n $idPaper = $this->getRequest()->getParam(\"id_paper\");\r\n $review = $reviewTbl->find($idPaper, $this->user->id)->current();\r\n $paper = $paperTbl->find($idPaper)->current();\r\n $paper->putInView($this->view);\r\n\r\n // Check that the paper is REALLY assigned to the reviewer (or admin)\r\n if (is_object($review) or $this->user->isAdmin()) {\r\n\r\n // Show all other SUBMITTED reviews, do not propose to see only my review\r\n $this->view->show_review = \"\";\r\n $reviews = $paper->findReview();\r\n foreach ($reviews as $otherReview) {\r\n if (!empty($otherReview->overall)) {\r\n $this->view->show_review .= $otherReview->showReview($this->view);\r\n }\r\n }\r\n\r\n // Message submitted ? Store it in the DB\r\n if (isSet($_REQUEST['form_message'])) {\r\n $message = $messageTbl->createRow();\r\n $message->id_parent = $this->getRequest()->getParam(\"id_parent\");\r\n $message->id_user = $this->user->id;\r\n $message->id_paper =$this->getRequest()->getParam(\"id_paper\");\r\n $message->message = htmlSpecialChars($this->getRequest()->getParam(\"message\"), ENT_NOQUOTES);\r\n $message->date = date(\"Y-m-d H-i-s\");\r\n $message->save();\r\n\r\n // And now, we must send the message to the reviewers and to the PC chair.\r\n $mail = new Mail (Mail::SOME_USER,\r\n $this->texts->mail->subj_new_message . \" \" . $paper->id,\r\n $this->view->getScriptPaths());\r\n $mail->loadTemplate ($this->lang, \"new_message\");\r\n $mail->setFormat(Mail::FORMAT_HTML);\r\n $mail->getEngine()->base_url = $this->view->base_url;\r\n $mail->getEngine()->author_first_name = $this->user->first_name;\r\n $mail->getEngine()->author_last_name = $this->user->last_name;\r\n $paper->putInView ($mail->getEngine());\r\n $message->putInView($mail->getEngine());\r\n\r\n // Send the message to the PC chair.\r\n $fakeName = \"User\" . \"->first_name\";\r\n $mail->getEngine()->setVar($fakeName, $this->config->chair_names);\r\n $mail->setTo ($this->config->chairMail);\r\n $mail->send();\r\n\r\n // Now, mail to each OTHER reviewer\r\n $reviews = $paper->findReview();\r\n $mailOthers = $comma = \"\";\r\n foreach ($reviews as $review) {\r\n if ($review->id_user != $this->user->id) {\r\n $reviewer = $review->findParentUser();\r\n $reviewer->putInView($mail->getEngine());\r\n $mail->setTo ($reviewer->email);\r\n $mail->send();\r\n }\r\n }\r\n }\r\n\r\n // Show the tree of messages\r\n $this->view->messages = Message::display($paper->id, 0, $this->view);\r\n }\r\n else {\r\n $this->view->content = \"You do not have access to this paper!<br/>\";\r\n }\r\n }\r\n else {\r\n $this->view->content = \"Invalid action<br/>\";\r\n }\r\n\r\n \r\n echo $this->view->render(\"layout\");\r\n }", "public function index() {\n\t\t//assign public class values to function variable\n\t\t$data = $this->data;\n\t\t$data['common_data'] = $this->common_data;\n\t\t\n\t\t$data['reviews'] = $this->review_model->get();\n\n\t\t$template['body_content'] = $this->load->view('backend/reviews/index', $data, true);\t\n\t\t$this->load->view('backend/layouts/template', $template, false);\t\t\n\t}", "protected function get_views()\n {\n }", "protected function get_views()\n {\n }", "protected function get_views()\n {\n }", "protected function get_views()\n {\n }", "public function show(reviews $reviews)\n {\n //\n }", "public function indexAction() {\n $this->view->viewer = $viewer = Engine_Api::_()->user()->getViewer();\n if (!Engine_Api::_()->core()->hasSubject()) {\n return $this->setNoRender();\n }\n\n $viewer_id = $viewer->getIdentity();\n if (!empty($viewer_id)) {\n $this->view->level_id = $viewer->level_id;\n } else {\n $this->view->level_id = 0;\n }\n\n // Get subject and check auth\n $list = Engine_Api::_()->core()->getSubject('list_listing');\n $this->view->list = $list;\n $delete_id = $this->_getParam('delete_id');\n if (!empty($delete_id)) {\n $this->delete($delete_id);\n }\n\n $table = Engine_Api::_()->getDbTable('reviews', 'list');\n $select = $table->select()\n ->where('listing_id = ?', $list->getIdentity())\n ->order('modified_date DESC');\n\n $this->view->paginator = $paginator = Zend_Paginator::factory($select);\n $paginator->setItemCountPerPage(10);\n $this->view->paginator = $paginator->setCurrentPageNumber($this->_getParam('page'));\n\n // Do not render if nothing to show and not viewer\n if ($paginator->getTotalItemCount() <= 0 && !$viewer->getIdentity()) {\n return $this->setNoRender();\n }\n\n // Add count to title if configured\n if ($this->_getParam('titleCount', false) && $paginator->getTotalItemCount() > 0) {\n $this->_childCount = $paginator->getTotalItemCount();\n }\n }", "public function show(Reviews $reviews)\n {\n //\n }", "function vcn_cma_documents_view() {\n$get_userid = explode('-',$_GET['userid']);\n$vars['user_id']=$get_userid[0];\n$valid['user_id']='valid';\n$documentinfo = vcn_get_data ($errors, $vars, $valid, 'cmasvc', 'cmauserdocument', 'list', $limit=false, $offset=false, $order='document_id', $direction='desc');\n\nforeach ($documentinfo->cma as $document) {\n\t//$shareynarray = array();\n\tif($document->shareyn == 'y' || $document->shareyn == 'Y'){\n\t\t$shareynarray = $document->shareyn;\n\t}\n}\n\n\tif (isset($shareynarray)) {\n\t\n\t\t$base_path = base_path();\n\t\t$o .= '<br />The following is a list of available documents:<br /><br />';\n/* \t\t$o .= '<div style=\"margin-left: 0px; margin-bottom: 3px;\">'.'<b>Document Title</b>'.'</div>';\n\t\t$o .= '<hr class=\"clear-both\">' . PHP_EOL; */\n foreach ($documentinfo->cma as $document) {\n\t\t\tif($document->shareyn == 'y' || $document->shareyn == 'Y'){\n\t\t\t\t$imagepath = $base_path . drupal_get_path('module', 'vcn_cma') . '/images';\n\t\t\t\tif($document->documenttypeid == 2) {$img = '<img style=\"margin-left: 1px; margin-top: 1px;\" src=\"' . $imagepath.'/word.png'. '\" title=\"Word Document\" alt=\"Word Document\" />';}\n\t\t\t\telseif($document->documenttypeid == 3){$img = '<img style=\"margin-left: 1px; margin-top: 1px;\" src=\"' . $imagepath.'/ppt.png'. '\" title=\"PowerPoint Document\" alt=\"PowerPoint Document\" />';}\n\t\t\t\telseif($document->documenttypeid == 4){$img = '<img style=\"margin-left: 1px; margin-top: 1px;\" src=\"' . $imagepath.'/exel.png'. '\" title=\"Excel Document\" alt=\"Excel Document\" />';}\n\t\t\t\telseif($document->documenttypeid == 5){$img = '<img style=\"margin-left: 1px; margin-top: 1px;\" src=\"' . $imagepath.'/img.png'. '\" title=\"Image File\" alt=\"Image File\" />';}\n\t\t\t\telseif($document->documenttypeid == 6){$img = '<img style=\"margin-left: 1px; margin-top: 1px;\" src=\"' . $imagepath.'/txt.png'. '\" title=\"Text File\" alt=\"Text File\" />';}\n\t\t\t\telseif($document->documenttypeid == 7){$img = '<img style=\"margin-left: 1px; margin-top: 1px;\" src=\"' . $imagepath.'/zip.png'. '\" title=\"Zip File\" alt=\"Zip File\" />';} \n\t\t\t\telseif($document->documenttypeid == 8){$img = '<img style=\"margin-left: 1px; margin-top: 1px;\" src=\"' . $imagepath.'/pdf.png'. '\" title=\"PDF File\" alt=\"PDF File\" />';}\n\t\t\t\telse{$img = '<img style=\"margin-left: 1px; margin-top: 1px;\" src=\"' . $imagepath.'/blank.png'. '\" title=\"Other\" alt=\"Other\" />';}\n\n\t\t\t\t$onlydate = explode(' ', $document->documentuploaddate);\n\t\t\t\t$datediv = '<div style=\"margin-left: 747px; margin-top: -12px;\">'.$onlydate[0].'</div>';\n\t\t\t\t$o .= '\t<div id=\"documentid-' . $document->documentid . '\" class=\"cma-documents\">' . PHP_EOL;\n\t\t\t\t$o .= '\t\t<div class=\"cma-documents-inner\">' . PHP_EOL;\n\t\t\t\t$o .= '\t\t\t<div class=\"cma-documents-body\">' . PHP_EOL;\n\n\t\t\t\t$docidforcheck = $document->documentid;\n\t\t\t\t$docidforshareyn = \"'\".$document->shareyn.\"'\";\n\n\t\t\t\t$o .= ' <a style=\"text-decoration: none; margin-top:1px;\" href=\"/careerladder/getfile.php?docid='.$document->documentid.'\"> '.$img.'&nbsp;&nbsp;'.$document->documenttitle.' </a>'.PHP_EOL; //with image \n\n\t\t\t\t$o .= '\t\t\t</div><!-- /cma-notebook-documents-body -->' . PHP_EOL;\n\t\t\t\t//$o .= ' <hr class=\"clear-both\">' . PHP_EOL;\n\t\t\t\t$o .= '\t\t</div><!-- /cma-notebook-certificate-inner -->' . PHP_EOL;\n\t\t\t\t$o .= '\t</div><!-- /cma-notebook-program -->' . PHP_EOL;\n\t\t\t}\n }\n\n\t\t$datein = '<div style=\\\"margin-left: 746px; margin-top: -8px;\\\">'.date(\"Y-m-d\").'</div>';\n }else{\n \t$o .='<br /><br />';\n \t$o .='<div><b>The user do not have any Documents to share</b></div>'; \n }\n return $o; \n}", "public function editAction() {\n\n\t\t//ONLY LOGGED IN USER CAN EDIT REVIEW\n if (!$this->_helper->requireUser()->isValid())\n return;\n\n\t\t//LISING SUBJECT SHOULD BE SET\n if (!$this->_helper->requireSubject('list_listing')->isValid())\n return;\n\n\t\t//GET LIST SUBJECT\n $list = Engine_Api::_()->core()->getSubject();\n\n\t\t//GET REVIEW ID AND REVIEW OBJECT\n $review_id = $this->_getParam('id');\n $review = Engine_Api::_()->getItem('list_reviews', $review_id);\n\n\t\t//GET VIEWER\n\t\t$viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n\n\t\t//ONLY REVIEW OWNER AND SUPER ADMIN CAN EDIT REVIEW\n if ($review->owner_id != $viewer_id && $viewer->level_id != 1) {\n return $this->_forward('requireauth', 'error', 'core');\n }\n\n //MAKE FORM\n $this->view->form = $form = new List_Form_Review_Create();\n $form->populate($review->toarray());\n $form->setTitle('Edit your Review');\n $form->submit->setLabel('Save Changes');\n\n //PROCESS FORM\n if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\n\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n\n\t\t\t\t//GET FORM VALUES\n $values = $form->getValues();\n $values['owner_id'] = $viewer_id;\n $values['listing_id'] = $list->getIdentity();\n $values['modified_date'] = date('Y-m-d H:i:s');\n $review->setFromArray($values);\n $review->save();\n\n $db->commit();\n $content_id = $this->_getParam('content_id');\n $url = $this->_helper->url->url(array('listing_id' => $list->getIdentity(), 'user_id' => $list->owner_id, 'slug' => $list->getSlug(), 'tab' => $content_id), 'list_entry_view', true);\n $this->_forward('success', 'utility', 'core', array(\n 'parentRefresh' => 3,\n 'parentRedirect' => $url,\n 'parentRedirectTime' => 1,\n 'messages' => array('Your Review has been edited successfully.')\n ));\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n }\n }", "function listCommentsBack()\n{\n $comments = getAllComments();\n require('view/backend/manageCommentsView.php');\n}", "function reviewformAction()\r\n {\r\n if (!$this->config->isPhaseOpen(Config::REVIEWING_PHASE)) {\r\n $this->view->content = $this->texts->reviewer->review_phase_is_closed;\r\n echo $this->view->render(\"layout\");\r\n return;\r\n }\r\n\r\n\r\n $reviewTbl = new Review();\r\n $this->view->setFile(\"content\", \"reviewform.xml\");\r\n $this->view->setBlock(\"content\", \"SECTION\", \"SECTIONS\");\r\n\r\n\r\n // Extract the blocks from the template\r\n $this->view->setFile(\"review\", \"form_review.xml\");\r\n $this->view->setBlock (\"review\", \"review_mark\", \"review_marks\");\r\n $this->view->setBlock (\"review\", \"review_answer\", \"review_answers\");\r\n\r\n $this->view->selected1 = $this->view->selected2 = $this->view->selected3 = \"\";\r\n\r\n // Actions if the id of a paper is submitted\r\n if (isSet($_REQUEST['id_paper'])) {\r\n $idPaper = $this->getRequest()->getParam(\"id_paper\");\r\n $review = $reviewTbl->find($idPaper, $this->user->id)->current();\r\n\r\n // Check that the paper is REALLY assigned to the reviewer\r\n if (is_object($review)) {\r\n $this->view->review_form = $review->showReview($this->view, false);\r\n }\r\n else {\r\n $this->view->content = \"You do not have access to this paper!<br/>\";\r\n }\r\n }\r\n else {\r\n $this->view->content = \"Invalid action<br/>\";\r\n }\r\n \r\n echo $this->view->render(\"layout\");\r\n }", "public function getReviewAction()\n\t{\n\t\t$this->_ajaxValidation();\n\t\t$response['content']=$this->_getReviewHtml();\n\t\t$this->getResponse()->setBody(json_encode($response));\n\t}", "public function reviews(){\n\t\t\t\n\t\t\tif(!$this->session->userdata('admin_logged_in')){\n\t\t\t\t\t\t\t\t\n\t\t\t\t$url = 'admin/login?redirectURL='.urlencode(current_url());\n\t\t\t\tredirect($url);\t\t\t\t\t\t\t\n\t\t\t\t//redirect('admin/login/','refresh');\n\t\t\t\t\n\t\t\t}else{\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t$username = $this->session->userdata('admin_username');\n\t\t\t\t\n\t\t\t\t\t$data['user_array'] = $this->Admin->get_user($username);\n\t\t\t\t\t\n\t\t\t\t\t$fullname = '';\n\t\t\t\t\tif($data['user_array']){\n\t\t\t\t\t\tforeach($data['user_array'] as $user){\n\t\t\t\t\t\t\t$fullname = $user->admin_name;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t$data['fullname'] = $fullname;\n\t\t\t\t\t\n\t\t\t\t\t$data['unread_contact_us'] = $this->Contact_us->count_unread_messages();\n\t\t\t\t\t\n\t\t\t\t\t$messages_unread = $this->Messages->count_unread_messages($username);\n\t\t\t\t\tif($messages_unread == '' || $messages_unread == null){\n\t\t\t\t\t\t$data['messages_unread'] = 0;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$data['messages_unread'] = $messages_unread;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$data['header_messages_array'] = $this->Messages->get_header_messages($username);\n\t\t\t\t\t\n\t\t\t\t\t$enquiries_unread = $this->Sale_enquiries->count_unread_enquiries();\n\t\t\t\t\tif($enquiries_unread == '' || $enquiries_unread == null){\n\t\t\t\t\t\t$data['enquiries_unread'] = 0;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$data['enquiries_unread'] = $enquiries_unread;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t$data['count_reviews'] = $this->Reviews->count_all();\n\t\t\t\t\t\t\n\t\t\t\t\t//assign page title name\n\t\t\t\t\t$data['pageTitle'] = 'Seller Reviews';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t//assign page title name\n\t\t\t\t\t$data['pageID'] = 'reviews';\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t//load header and page title\n\t\t\t\t\t$this->load->view('admin_pages/header', $data);\n\t\t\t\t\t\t\t\n\t\t\t\t\t//load main body\n\t\t\t\t\t$this->load->view('admin_pages/reviews_page', $data);\t\n\t\t\t\t\t\n\t\t\t\t\t//load footer\n\t\t\t\t\t$this->load->view('admin_pages/footer');\n\t\t\t}\n\t\t}", "function bookcrossing_view_history($history) {\n $build = node_view($history['node'], 'history');\n global $user;\n $build = bookcrossing_prepare_book_view($build, $history, FALSE);\n\n drupal_set_title(t('Book history') . ' - ' . $history['node']->title);\n /**\n * Adding comment of the logged user to the output.\n */\n $isset = FALSE;\n $my_comment = '<div id=\"my-comment-text\">';\n if (isset($history['comments'][$user->uid])) {\n $my_comment .= $history['comments'][$user->uid];\n $isset = TRUE;\n }\n\n if (!$isset) {\n $query = db_select('bookcrossing_history', 'h');\n //$query->innerJoin('bookcrossing_books', 'b');\n $exist = $query\n ->fields('h', array('bid'))\n ->condition('h.uid', $user->uid, '=')\n ->condition('h.bid', $history['bid'], '=')\n ->execute()\n ->fetchField();\n\n if ($exist) {\n $my_comment .= t('Review wasnt added. You can add it by pressing \"change\" link.');\n }\n else {\n $my_comment .= t('You cant write reviews for book u didnt find.');\n }\n }\n \n $my_comment .= '</div>';\n\n $is_read_book = db_select('bookcrossing_history', 'h')\n ->fields('h', array('bid'))\n ->condition('uid', $user->uid, '=')\n ->condition('bid', $history['bid'], '=')\n ->execute()\n ->fetchField();\n\n $change_link = '';\n if ($is_read_book) {\n $change_link = l(t('(change)'), 'change-comment/' . $history['bid'], array('attributes' => array('class' => array('use-ajax'))));\n }\n $build['book_comment'] = array(\n '#markup' => '<div class=\"back-to-book\">' . l(t('<<back to book'), 'book/' . $history['bid']) . '</div><div class=\"my-comment\"><div class=\"my-comment-title\">' . t('My review') . $change_link . '</div>' . $my_comment . '</div>',\n );\n \n $build['author_and_year'] = array(\n '#markup' => bookcrossing_author_and_year($history),\n );\n\n /**\n * Generate output for history of the book.\n */\n $output = '<div class=\"history-wrapper\">';\n foreach ($history['places'] as $place) {\n $comment = isset($history['comments'][$place['user']->uid]) ? $history['comments'][$place['user']->uid] : '';\n $my_comment_class = $place['user']->uid == $user->uid ? ' m-c' : '';\n $user_link = '';\n $fbid = bookcrossing_load_fbid($place['user']->uid);\n if ($fbid) {\n $vars = array();\n $filepath = (isset($place['user']->picture->uri)) ? $place['user']->picture->uri : '';\n $name = !empty($place['user']->name) ? $place['user']->name : variable_get('anonymous', t('Anonymous'));\n $alt = t(\"@user's picture\", array('@user' => $name));\n $vars = array('path' => $filepath, 'alt' => $alt, 'title' => $alt);\n $vars['style_name'] = 'user-in-history';\n $image = theme('image_style', $vars);\n $user_link = l($image, 'http://www.facebook.com/profile.php?id=' . $fbid . '&sk=app_bookcrossing_by', array('html' => TRUE));\n }\n $output .= '<div class=\"place-wrapper clearfix\">\n <div class=\"history-comment' . $my_comment_class . '\">' . $comment . '</div>\n <div class=\"history-user-foto\">' . $user_link . '</div>\n <div class=\"history-user-info\">'\n . l($place['user']->name, $fbid ? 'http://www.facebook.com/profile.php?id=' . $fbid . '&sk=app_bookcrossing_by' : 'user/' . $place['user']->uid)\n . '<div class=\"history-places\">';\n\n if ($place['place']) {\n $output .= '<div class=\"place-found\">' . t('Found') . ':<div class=\"place-date-found\">' . format_date($place['found']) . ',' . $place['place']->name . '</div></div>';\n }\n\n if ($place['place_left']) {\n $output .= '<div class=\"place-left\">' . t('Released') . ':<div class=\"place-date-left\">' . format_date($place['time_left']) . ', ' . $place['place_left']->name . '</div></div>';\n }\n\n $output .= '</div></div></div>';\n }\n $output .= '</div>';\n\n $build['book_history'] = array(\n '#markup' => $output,\n );\n\n /**\n * Generate item list with status of the book.\n */\n $build['book_status'] = array(\n '#markup' => bookcrossing_book_status($history),\n );\n\n $build['history_pager'] = array(\n '#theme' => 'pager',\n );\n\n return $build;\n}", "public function index()\n {\n //View all reviews\n $reviews = review::orderBy('id','desc')\n ->select('id','name','url','note')\n ->paginate(6);\n\n return ReviewRes::collection($reviews);\n }", "public function get_reviews(){ // todo: $datefrom=false,$type=1,$item_id=false\n\n if(!$this->logged_in)return array();\n\n $reviews = array();\n\n if(_ENVATO_DEBUG_MODE){\n echo 'grabbing reviews...';\n }\n $page_number = 1;\n while(true){\n $data = $this->get_url( $this->main_marketplace . \"/reviews?page=\".$page_number);\n if(!$data || strpos($data,'Page Not Found'))break;\n $data = preg_replace('#\\s+#',' ',$data);\n if(preg_match_all('#id=\"review_\\d+\".*<div class=\"review__details\"> (.*) on <a href=\"(/item/[^/]+/)reviews/(\\d+)\"[^>]+>([^<]+)</a>.*<a href=\"/ratings/(\\d+)\"[^>]+>([^<]+)</a>.*</div> </div> <div class=\"(review|page-controls)\"#imsU',$data,$matches)){\n foreach($matches[0] as $match_id => $match){\n\n $this_review = array(\n 'rating_id' => $matches[5][$match_id],\n 'rating_url' => '/ratings/'.$matches[5][$match_id],\n 'buyer' => strip_tags($matches[1][$match_id]),\n 'stars' => '',\n 'review' => '',\n 'item_id' => $matches[3][$match_id],\n 'item_name' => $matches[4][$match_id],\n 'item_url' => $matches[2][$match_id].$matches[3][$match_id],\n 'date' => $matches[6][$match_id],\n 'date_estimate' => date('Y-m-d',strtotime('-'.str_replace(' ago','',$matches[6][$match_id]),time())),\n );\n\n if(preg_match_all('#alt=\"Star-on\" class=\"rating-basic#',$match,$stars)){\n $this_review['stars'] = count($stars[0]);\n }\n if(preg_match('#<div class=\"review__comments\"> <p> <strong>Extra comments from the buyer:</strong><br />(.*)</p>#imsU',$match,$comments)){\n $this_review['review'] = trim($comments[1]);\n }\n\n $reviews[] = $this_review;\n\n }\n\n }else{\n echo 'no matches';\n }\n $page_number++;\n }\n\n return $reviews;\n }", "public function edit(reviews $reviews)\n {\n //\n }", "public function review()\n {\n return view('review');\n }", "function reviews($args){\n\t\t$this->view->add('page_title','Reviews');\n\t\t\n\t\t//Set tool box\n\t\tif( $args['tool'] == null ){\n $tool = 'display';\n } else {\n $tool = $args['tool'];\n }\n\t\t if( $func = $this->reviews_toolbox($tool,$this) ) {\n \n // check for success, default to no\n $success = false;\n \n // choose tool and execute\n $success = $func($this);\n }\n \n // add self link\n $this->view->add('self_link',\n $this->app->form_path('admin/reviews')\n );\n\t}", "protected function getReviews($burn_id)\n {\n\n $permissions = checkFunctionPermissionsAll($_SESSION['user']['id'], array('user','user_district','user_agency','admin','admin_final','system'));\n\n if ($full = true) {\n $com_cond = \"r.comment, '</a>'\";\n } else {\n $com_cond = \"LEFT(r.comment, 47), '...</a>'\";\n }\n\n $html = \"<div class=\\\"\\\" style=\\\"margin: 15px 0px;\\\">\n <h4>Reviews</h4>\n <hr>\";\n\n if ($permissions['write']['admin']) {\n $pre_sql = \"r.burn_review_id, \";\n }\n\n $sql = \"SELECT $pre_sql COALESCE(CONCAT(u.full_name, '<br><small><span class=\\\"label label-default\\\">Edited By</span></small>'), a.full_name) as \\\"Reviewer\\\", CONCAT('<a style=\\\"cursor: pointer\\\" onclick=\\\"BurnProject.reviewDetail(', r.burn_review_id ,')\\\">', $com_cond) as \\\"Excerpt\\\", CONCAT('<small>', COALESCE(r.updated_on, r.added_on), '</small>') as \\\"Edited\\\"\n FROM burn_reviews r\n JOIN users a ON (r.added_by = a.user_id)\n LEFT JOIN users u ON (r.updated_by = u.user_id)\n WHERE burn_id = $burn_id\";\n\n if ($permissions['write']['admin']) {\n $table = show(array('sql'=>$sql,'no_results_message'=>'There are currently no reviews associated with this Burn Request.',\n 'no_results_class'=>'info','pkey'=>'burn_review_id','table'=>'burn_reviews','include_edit'=>true,'include_delete'=>false,\n 'edit_function'=>'BurnReview.editReviewForm'));\n } else {\n $table = show(array('sql'=>$sql,'no_results_message'=>'There are currently no reviews associated with this Burn Request.',\n 'no_results_class'=>'info'));\n }\n\n //$table = show(array('sql'=>$sql,'no_results_message'=>'There are currently no reviews associated with this Burn request.',\n // 'no_results_class'=>'info'));\n\n $html .= $table['html'];\n\n $html .= \"</div>\";\n\n return $html;\n }", "public function index()\n\t{\n\t\t$content =$this->lproduct_review->product_review_list();\n\t\t$this->template->full_admin_html_view($content);\n\t}", "public function showReview($hotspotName) {\n $qry = $this->db->prepare('SELECT DISTINCT firstName,reviewDate,rating,comment FROM reviews WHERE hotspotName = ?');\n $qry->bindParam(1, $hotspotName);\n $qry->execute();\n foreach ($qry as $review) {\n include('server/includes/comment.tpl.php');\n }\n }", "public function createAction() {\n\n\t\t//ONLY LOGGED IN USER CAN CREATE REVIEW\n if (!$this->_helper->requireUser()->isValid())\n return;\n\n\t\t//LISTING SUBJECT SHOULD BE SET\n if (!$this->_helper->requireSubject('list_listing')->isValid())\n return;\n\n //GET LISITING\n $this->view->list = $list = Engine_Api::_()->core()->getSubject();\n\n //MAKE FORM\n $this->view->form = $form = new List_Form_Review_Create();\n\n //PROCESS FORM\n if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n\n try {\n\t\t\t\t//GET VIEWER\n $viewer = Engine_Api::_()->user()->getViewer();\n\n\t\t\t\t//GET FROM VALUES\n $values = $form->getValues();\n $values['owner_id'] = $viewer->getIdentity();\n $values['listing_id'] = $list->getIdentity();\n\n //CREATE REVIEW\n $reviewTable = Engine_Api::_()->getDbtable('reviews', 'list');\n $review = $reviewTable->createRow();\n $review->setFromArray($values);\n $review->save();\n\n\t\t\t\t//INCREASE REVIEW COUNT\n\t\t\t\t$list->review_count++;\n\t\t\t\t$list->save();\n\n\t\t\t\t//ADD ACTIVITY\n $activityApi = Engine_Api::_()->getDbtable('actions', 'activity');\n $subject = Engine_Api::_()->core()->getSubject();\n $subjectOwner = $subject->getOwner('user');\n $action = $activityApi->addActivity($viewer, $subject, 'review_list', '', array(\n 'title' => $subject->getTitle(),\n ));\n if ($action != null) {\n Engine_Api::_()->getDbtable('actions', 'activity')->attachActivity($action, $review);\n }\n\n $db->commit();\n\t\t\t\t$content_id = $this->_getParam('content_id');\n $url = $this->_helper->url->url(array('listing_id' => $list->getIdentity(), 'user_id' => $list->owner_id, 'slug' => $list->getSlug(), 'tab' => $content_id), 'list_entry_view', true);\n\n $this->_forward('success', 'utility', 'core', array(\n 'parentRefresh' => 3,\n 'parentRedirect' => $url,\n 'parentRedirectTime' => 1,\n 'messages' => array('Your Review has been posted successfully.')\n ));\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n }\n }", "function displayReviews($reviews){\r\n$reviewConatainer=\"<ul id='reviews'>\";\r\nforeach($reviews as $blocks){ \r\n$reviewConatainer.='<li>';\r\n// take first character from first name\r\n$clientName = substr($blocks['clientFirstname'], 0,1);\r\n// transform to uppercase \r\n$clientName = strtoupper($clientName);\r\n// transform fist character from Lastname to uppercase \r\n$clientLasname = ucfirst($blocks['clientLastname']);\r\n$userReviewName = $clientName.$clientLasname;\r\n\r\n//Simplify date \r\n$date = substr($blocks['reviewDate'],0,10);\r\n\r\n$reviewConatainer.=\"<p><span>$userReviewName</span> wrote on $date</p>\";\r\n$reviewConatainer.=\"<p class='reviewText'>$blocks[reviewText]</p>\";\r\n$reviewConatainer.='</li>';\r\n}\r\n\r\n$reviewConatainer.='</ul>';\r\nreturn $reviewConatainer;\r\n}", "public function review()\n\t{\n\t\t\n\t\t$this->templateFileName = 'review.tpl';\n\t\t\n\t\t// Get the cart data, shipping address, billing address, and payment method records for display.\n\t\t\n\t\t$cart_items = $this->dbConnection->prepareRecordSet( \"SELECT * FROM b_cart_item ci INNER JOIN b_item i ON ci.item_id = i.item_id WHERE cart_id = ?\", $this->session->cartID );\n\t\t$shipping_address = $this->dbConnection->prepareRecord(\"SELECT * FROM b_user_address WHERE address_id = ?\", $this->session->shippingAddressID);\n\t\t$billing_address = $this->dbConnection->prepareRecord(\"SELECT * FROM b_user_address WHERE address_id = ?\", $this->session->billingAddressID);\n\t\t$payment_method = $this->dbConnection->prepareRecord(\"SELECT payment_id, payment_type, credit_card_type, payment_name, RIGHT(account_number, 4) AS account_number_last_4, LPAD(RIGHT(account_number, 4), LENGTH(account_number), 'X') AS account_number, card_expiration_month, card_expiration_year, rp.description AS payment_type_description, rc.description AS credit_card_type_description FROM b_payment INNER JOIN b_reference rp ON rp.data_member = 'PAYMENT_TYPE' AND rp.data_value = payment_type LEFT OUTER JOIN b_reference rc ON rc.data_member = 'CREDIT_CARD_TYPE' AND rc.data_value = credit_card_type WHERE payment_id = ?\", $this->session->paymentMethodID);\n\n\t\t\n\t\t// Calculate the subtotal\n\t\t$cartCount = count($cart_items);\n\t\tfor($i=0; $i<$cartCount; $i++)\n\t\t{\n\t\t\t$item_extended_price = ($cart_items[$i]['quantity'] * $cart_items[$i]['price']);\n\t\t\t$cart_items[$i]['ext_price'] = $item_extended_price;\n\t\t\t$subtotal += $item_extended_price;\n\t\t}\n\t\t\n\t\t\n\t\t// Calculate the tax for the order\n\t\t$tax = $this->calculateTax( $this->session->shippingAddressID , $subtotal );\n\t\t\n\t\t// Calculate the shipping rate for the order\n\t\t$shipping_rate = $this->calculateShipping();\n\t\t\n\t\t$total = $subtotal + $shipping_rate + $tax;\n\t\t\n\t\t// Set output data\n\t\t$this->set('cart_items', $cart_items);\n\t\t$this->set('shipping_address', $shipping_address);\n\t\t$this->set('billing_address', $billing_address);\n\t\t$this->set('payment_method', $payment_method);\n\t\t\n\t\t$this->set('subtotal', $subtotal);\n\t\t$this->set('tax', $tax);\n\t\t$this->set('shipping_rate', $shipping_rate);\n\t\t$this->set('total', $total);\n\t\t\n\t\t\n\t\t\n\t\t// If the user clicked the submit button, then process the order\n\t\tif ( count($_POST) > 0 && isset($_POST['review_submit']) )\n\t\t{\n\t\t\t\n\t\t\t\n\t\t\t$errors = [];\n\t\t\t\n\t\t\t\n\t\t\t// Process the payment first\n\t\t\tif (!$this->processPayment( $this->session->paymentMethodID, $total ))\n\t\t\t{\n\t\t\t\t// Uh oh, there was an error processing the payment\n\t\t\t\t$errors[] = 'Error processing payment. Please try again.';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\n\t\t\t\t// The payment has been processed correctly.\n\t\t\t\t\n\t\t\t\t// Create the order record\n\t\t\t\t$this->dbConnection->begin_transaction();\n\n\t\t\t\t$orderInsertSQL = \"INSERT INTO b_order ( order_timestamp, user_id, shipping_address_id, billing_address_id, order_status, cart_id, subtotal, tax, shipping, total, payment_id )\"\n\t\t\t\t\t\t\t\t\t\t. \" VALUES( CURRENT_TIMESTAMP(), ?, ?, ?, 'P', ?, ?, ?, ?, ?, ?)\";\n\t\t\t\t$orderLineInsertSQL = \"INSERT INTO b_order_item (order_id, item_id, item_sequence, quantity, price, extended_price, line_status)\"\n\t\t\t\t\t\t . \" VALUES(?, ?, ?, ?, ?, ?, 'P')\";\n\t\t\t\t$cartUpdateSQL = \"UPDATE b_cart SET record_status = 'C' WHERE cart_id = ?\";\n\n\n\t\t\t\tif ($this->dbConnection->prepareCommand($orderInsertSQL, $this->session->userID, $this->session->shippingAddressID, $this->session->billingAddressID, $this->session->cartID, $subtotal, $tax, $shipping_rate, $total, $this->session->paymentMethodID))\n\t\t\t\t{\n\n\t\t\t\t\t$orderID = $this->dbConnection->insert_id;\n\t\t\t\t\t$line_success = true;\n\n\t\t\t\t\t// The order was inserted, so insert the line records\n\t\t\t\t\tfor ($i=0; $i<$cartCount; $i++) \n\t\t\t\t\t{\n\t\t\t\t\t\t$item_sequence = $i+1;\n\t\t\t\t\t\tif ($this->dbConnection->prepareCommand($orderLineInsertSQL, $orderID, $cart_items[$i]['item_id'], $item_sequence, $cart_items[$i]['quantity'], $cart_items[$i]['price'], $cart_items[$i]['ext_price']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// the insert was succesful\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// There was an error inserting one of the lines\n\t\t\t\t\t\t\t$errors[] = 'Error creating order. (1)';\n\t\t\t\t\t\t\t$this->dbConnection->rollback();\n\t\t\t\t\t\t\t$line_success = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($line_success)\n\t\t\t\t\t{\n\t\t\t\t\t\t// The order was created succesfuly.\n\t\t\t\t\t\t// Update the cart record to close it\n\t\t\t\t\t\tif ($this->dbConnection->prepareCommand($cartUpdateSQL, $this->session->cartID))\n\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t// The process is done, so commit the changes to the database\n\t\t\t\t\t\t\t$this->dbConnection->commit();\n\n\t\t\t\t\t\t\t//Clear all of the checkout session variables\n\t\t\t\t\t\t\t$this->session->cartID = null;\n\t\t\t\t\t\t\t$this->session->billingAddressID = null;\n\t\t\t\t\t\t\t$this->session->shippingAddressID = null;\n\t\t\t\t\t\t\t$this->session->paymentMethodID = null;\n\n\t\t\t\t\t\t\t// Redirect the user to the receipt page for the order\n\t\t\t\t\t\t\theader(\"Location: /checkout/receipt?orderID={$orderID}\");\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 updating the cart record, so rolblack\n\t\t\t\t\t\t\t$this->dbConnection->rollback();\n\t\t\t\t\t\t\t$errors[] = 'Error clearing cart. (2)';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// There was an error inserting the order record\n\t\t\t\t\t// Display an error\n\t\t\t\t\t$errors[] = 'Error creating order. (3)';\n\t\t\t\t\t$this->dbConnection->rollback();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\n\t\t\t\n\t\t\t$this->set('errors', $errors);\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t}", "public function userReviews(): IActionResult\n {\n if ($this->isRoleError(\"reviewer\")) {\n return $this->redirectToHome();\n }\n\n $user = $this->ulm->getCurrentUser();\n\n $reviews = $this->db->getUserReviews($user->id);\n\n return $this->viewResultDB(\"UserReviews\", \"Moje recenze\", \"reviews\", $reviews);\n }", "public function edit(Reviews $reviews)\n {\n //\n }", "public function list_reviews($flag='',$id='')\n {\n $this->gen_contents['page_heading'] = 'Reviews'; \n //p($this->gen_contents['reviews']); exit;\n if($flag == 'delete'){\n $this->admin_model->delete_review($id);\n }\n $this->gen_contents['reviews'] = $this->admin_model->get_reviews();\n $this->template->set_template('admin');\n $this->template->write_view('content', 'admin/reviews-list', $this->gen_contents);\n $this->template->render();\n }", "public function listAction(){\n $productId = $this->getRequest()->getParam('product_id');\n $pageNo = $this->getRequest()->getParam('page_no', 1);\n $pageSize = $this->getRequest()->getParam('page_size', 10);\n $block = Mage::getBlockSingleton('review/product_view');\n $block->setProductId($productId);\n $collection = $block->getReviewsCollection()\n ->setCurPage($pageNo)\n ->setPageSize($pageSize);\n $rate = Mage::getModel('rating/rating');\n $tradeRates = array();\n foreach ($collection->getItems() as $review) {\n $summary = $rate->getReviewSummary($review->getId());\n if ($summary->getCount() > 0) {\n $rating = round($summary->getSum() / $summary->getCount());\n } else {\n $rating = 0;\n }\n $tradeRates[] = array(\n 'uname' => $review->getNickname(),\n 'item_id' => $productId,\n 'rate_score' => $rating,\n 'rate_content' => $review->getDetail(),\n 'rate_date' => $review->getCreatedAt(),\n 'rate_title' => $review->getTitle()\n );\n }\n $result = array();\n $result['total_results'] = $collection->getSize();\n $result['trade_rates'] = $tradeRates;\n echo json_encode(array('code'=>0,'message'=>'get reviews success!', 'model'=>$result));\n }", "public function getRev(){\n\n $id=$this->session->get('id_rev');\n\n $tmp_review=new Review();\n\n $review=$tmp_review->find($id);\n\n $tmp_cnt=new Country();\n $tmp_place=new Place();\n $tmp_visit=new Visited();\n $tmp_user=new User();\n\n\n\n\n //iz visit citamo koje je mesto u pitanju, iz mesta citamo njegov naziv i id zemlje i onda dohvatamo ime zemlje\n\n $visit=$tmp_visit->find($review->id_vis);\n\n $place=$tmp_place->find($visit->id_plc);\n $country=$tmp_cnt->find($place->id_cnt);\n\n $user=$tmp_user->find($visit->id_usr);\n\n $type_of_user='guest';\n $found_type=false;\n if ( $found_type==false && $this->session->get('isAdmin') == 1) {$type_of_user = 'admin'; $found_type=true;}\n if($found_type==false && $this->session->get('userId')==null){ $type_of_user='guest'; $found_type=true;}\n\t\tif ($found_type==false && $this->session->get('userId') == $user->id_usr ) {$type_of_user = 'owner'; $found_type=true;}\n\n \n\n if ( $found_type==false && $this->session->get('userId') != $user->id_usr) {$type_of_user = 'regUser'; $found_type=true;}\n\n\n\n\n\n\n $result=array ('title'=>'90', 'text'=>'100',\n 'date'=>'25', 'token_count'=>'1', 'privacy'=>0, 'place'=>'7','country'=>'9', 'hasPic'=>'0' , 'numOfPics'=>'0');\n ///pics\n\n $tmp_image=new Image();\n $pics_list=$tmp_image->getPicsForReview($id);\n if($pics_list!=null){\n $result['hasPic']='1';\n $pic_number=0;\n foreach ($pics_list as $current_pic){\n $pic_number++;\n $pic_name=\"pic\".$pic_number;\n $result[$pic_name]=$current_pic->image_path;\n }\n $result['numOfPics']=\"\".$pic_number;\n }\n\n\n ///pics done\n\n $result['title']=$review->title;\n $result['date']=$review->date_posted;\n $result['text']=$review->text;\n $result['privacy']=$review->privacy;\n $result['token_count']=$review->token_count;\n $result['place']=$place->name;\n $result['country']=$country->name;\n $result['username']=$user->username;\n $result['type_of_user']=$type_of_user;\n\n echo json_encode($result);\n\n }", "public function index()\n {\n $recomments = Recomment::orderBy('id', 'DESC')->paginate(10);\n return view('admin.pages.recomment.list', compact('recomments'));\n }", "public function viewcommentsAction() {\n $id = $this->_getParam('expid');\n $ses = new Application_Model_Session();\n $ses->startSession();\n if ($ses->getSessionParameter('comnt') == 1) {\n $ses->unsetSessionParameter('comnt');\n $this->view->msg = \"Your comment has been successfully added\"; }\n $views = new Campuswisdom_Model_ExpMapper();\n $view = $views->ViewComments($id);\n $this->view->result1=$id;\n $number = count($view);\n \n if($number>0){\n try { \t\n\n $paginator = new Application_Model_ZendPagination();\n $this->view->result = $paginator->paginate($view, $this->_getParam('page'));\n \n }catch (Exception $e) {\n\n $this->view->error = 'please try another category';\n }}\n else{\n $this->view->error='No comments added see comment';\n }\n }", "function freelancer_review_action() {\n global $user_ID;\n $args = $_POST;\n $project_id = $args['project_id'];\n \n $status = get_post_status($project_id);\n \n $bid_id_accepted = get_post_meta($project_id, 'accepted', true);\n \n $author_bid = (int)get_post_field('post_author', $bid_id_accepted);\n \n $freelancer_id = get_post_field('post_author', $bid_id_accepted);\n \n /*\n * validate data\n */\n if (!isset($args['score']) || empty($args['score'])) {\n $result = array(\n 'succes' => false,\n 'msg' => __('You have to rate this project.', ET_DOMAIN)\n );\n wp_send_json($result);\n }\n if (!isset($args['comment_content']) || empty($args['comment_content'])) {\n $result = array(\n 'succes' => false,\n 'msg' => __('Please post a review for this freelancer.', ET_DOMAIN)\n );\n wp_send_json($result);\n }\n \n /*\n * check permission\n */\n if ($user_ID !== $author_bid || !$user_ID) {\n wp_send_json(array(\n 'succes' => false,\n 'msg' => __('You don\\'t have permission to review.', ET_DOMAIN)\n ));\n }\n \n /*\n * check status of project\n */\n if ($status !== 'complete') {\n wp_send_json(array(\n 'succes' => false,\n 'msg' => __('You can\\'t not reivew on this project.', ET_DOMAIN)\n ));\n }\n \n /**\n * check user reviewed project owner or not\n * @author Dan\n */\n $role = ae_user_role($user_ID);\n $type = 'em_review';\n if ($role == FREELANCER) {\n $type = 'fre_review';\n }\n \n $comment = get_comments(array(\n 'status' => 'approve',\n 'type' => $type,\n 'post_id' => $project_id\n ));\n \n if (!empty($comment)) {\n wp_send_json(array(\n 'succes' => false,\n 'msg' => __('You have reviewed on this project.', ET_DOMAIN)\n ));\n }\n \n // end check user review project owner\n \n // add review\n $args['comment_post_ID'] = $project_id;\n $args['comment_approved'] = 1;\n $this->comment_type = 'fre_review';\n $review = Fre_Review::get_instance(\"fre_review\");\n \n $comment = $review->insert($args);\n \n if (!is_wp_error($comment)) {\n \n /**\n * fire action after freelancer review employer base on project\n * @param int $int project id\n * @param Array $args submit args (rating score, comment)\n * @since 1.2\n * @author Dakachi\n */\n do_action('fre_freelancer_review_employer', $project_id, $args);\n \n //update project, bid, bid author, project author after review\n $this->update_after_fre_review($project_id, $comment);\n wp_send_json(array(\n 'success' => true,\n 'msg' => __(\"Your review has been submitted.\", ET_DOMAIN)\n ));\n } else {\n \n // revert bid status\n wp_update_post(array(\n 'ID' => $bid_id_accepted,\n 'post_status' => 'publish'\n ));\n \n wp_send_json(array(\n 'success' => false,\n 'msg' => $comment->get_error_message()\n ));\n }\n }", "public function reviews($id)\n\t{\n\t\tif (!isset($_SESSION['user']))\n\t\t{\n\t\t\theader(\"Location: /myrecipe/session/new\");\n\t\t\texit;\n\t\t}\n\t\t// this page is only accessable by self and admin (type 2)\n\t\tif (($_SESSION['user']['type'] != 2) && ($_SESSION['user']['id'] != $id))\n\t\t{\n\t\t\theader(\"Location: /myrecipe/users/{$_SESSION['user']['id']}\");\n\t\t\texit;\n\t\t}\n\t\n\t\tif(!$user = User::findUser(array('user_id' => $id)))\n\t\t{\n\t\t\t// something has gone wrong with db request\n\t\t\theader(\"Location: /myrecipe/users/\".$id);\n\t\t\texit;\n\t\t}\n\t\t$this->template->user = $user[0];\n\t\t\n\t\t$mycomments = Comments::findComments(array('user_id'=>$id));\n\t\t$this->template->mycomments = $mycomments;\n/*\t\techo \"<pre>\";\n\t\tprint_r($mycomments);\n\t\techo \"</pre>\";\n*/\n\t\t$recipes = Recipe::findRecipe(array('recipe_images.is_cover'=>'yes'));\n\t\t$this->template->recipes = $recipes;\n\n\t\t$this->template->display('reviews.html.php');\n\t}", "public function index()\n {\n return review::all();\n }", "function bwcr_process_review(){\n $items_reviewed = array();\n foreach( $_POST as $key => $data ){\n if( $key != \"username\" && $key != \"user_id\" && $key != 'action' ){\n\n // store items just reviewed for redirect\n array_push( $items_reviewed, $key );\n bwcr_insert_comment( $key, $data );\n // bwcr_process_the_ratings( $key, $data );\n }\n }\n wp_redirect( '/review?p_ids=' . implode( ',', $items_reviewed ) . '&action=thankyou' );\n}", "function view() {\r\n global $tmpl;\r\n $tmpl->setAttribute('list','visibility','visible');\r\n\r\n $sql=\"SELECT *\r\n FROM student_researchers\r\n ORDER BY last\";\r\n global $db;\r\n $researchers = $db->getAll($sql);\r\n\r\n // determine how many projects are associated with this resarcher\r\n foreach($researchers as $key=>$researcher) {\r\n $sql = \"SELECT COUNT(*) AS numprojects FROM student_research WHERE studentResearcherID = \" . $researcher['id'];\r\n $numProjects = $db->getRow($sql);\r\n $researchers[$key]['numprojects'] = $numProjects['numprojects'];\r\n }\r\n\r\n if(count($researchers)>0){\r\n $tmpl->addRows('mainlist',$researchers);\r\n }\r\n}", "public function index()\n {\n return BookReviewResource::collection($this->bookReviewRepo->get());\n }", "protected function get__reviews()\n\t{\n\t\treturn NULL;\n\t}", "public function manageAction() {\n \n //GET NAVIGATION\n $this->view->navigationStore = Engine_Api::_()->getApi('menus', 'core')\n ->getNavigation('sitestore_admin_main', array(), 'sitestore_admin_main_sitestorereview'); \n //GET NAVIGAION\n $this->view->navigation = $navigation = Engine_Api::_()->getApi('menus', 'core')\n ->getNavigation('sitestorereview_admin_main', array(), 'sitestorereview_admin_main_params');\n\n //SHOW REVIEW PARAMETERS\n $this->view->paginator = $paginator = Engine_Api::_()->getDbtable('reviewcats', 'sitestorereview')->reviewCatParams();\n\n $reviewcat_cat_array = array();\n foreach ($paginator as $item) {\n $reviewcat_cat_array[$item->category_id][0] = $item->category_name;\n $reviewcat_cat_array[$item->category_id][$item->reviewcat_id] = $item->reviewcat_name;\n }\n\n $this->view->reviewcat_cat_array = $reviewcat_cat_array;\n }", "public function reviews($slug = null) {\n $this->viewBuilder()->layout('default');\n \n $this->loadModel('Reviews');\n $this->loadModel('Users');\n $this->set('review', $this->Paginator->paginate($this->Reviews, [ 'limit' => 15, 'contain' => ['Users'], 'order' => [ 'id' => 'DESC'], 'conditions' => [ 'Reviews.is_active' => 1]])); \n\n }", "public function views()\n {\n }", "public function views()\n {\n }", "public function views()\n {\n }", "public function index()\n {\n //\n // echo 1111;\n $res = Reviews::where('status',0)->paginate(5);\n foreach ($res as $k => $v) {\n $v['pic'] = $v->goodspic()->get();\n }\n // dd($res);\n return view('admin.reviews.evaluation',['res'=>$res,'title'=>'评论审核']);\n\n }", "public function viewAction()\n {\n // Procesar cambio de estados\n if ($this->getRequest()->isXmlHttpRequest()) {\n return $this->forward()->dispatch('Registry\\Controller\\Review', array('action' => 'view-ajax'));\n }\n\n $registry = $this->getRegistry();\n if (!$registry) {\n $this->fm(_('La rendicion solicitada no pudo ser encontrada'), 'error');\n return $this->redirect()->toRoute('review', array('action' => 'index'));\n }\n\n $formManager = $this->getServiceLocator()->get('FormElementManager');\n $form = $formManager->get('Registry\\Form\\Confirm', array('element' => $registry->getId()));\n\n $url = $this->url()->fromRoute('review/default', array('action' => 'view'), array('query' => array('id' => $registry->getId())));\n $prg = $this->prg($url, true);\n if ($prg instanceof \\Zend\\Http\\PhpEnvironment\\Response) {\n return $prg;\n } elseif (is_array($prg)) {\n // Validar formulario\n $form->setData($prg);\n if (!$form->isValid()) {\n $this->fm(_('No se ha podido cerrar la rendicion'), 'error');\n $helper = $this->getServiceLocator()->get('viewhelpermanager')->get('htmlList');\n $this->fm($helper($form->getMessages()), 'error');\n\n return $this->redirect()->toRoute('review');\n }\n\n if ($prg['task'] === 'reopen') {\n return $this->reopen($registry);\n } else {\n return $this->close($registry);\n }\n }\n\n $commentsForm = $formManager->get('Registry\\Form\\Comment');\n $commentsForm->setAttribute(\n 'action',\n $this->url()->fromRoute(\n 'review/comment',\n array('action' => 'comment'),\n array('query' => array('id' => $registry->getId()))\n )\n );\n\n return array(\n 'form' => $form,\n 'registry' => $registry,\n 'commentform' => $commentsForm,\n );\n }", "function reviewsMangment($userReviews){\r\n$rc = \"<ul>\";\r\nforeach ($userReviews as $review){\r\n$date = substr($review['reviewDate'],0,10);\r\n$rc .=\"<li> $review[invMake] $review[invModel] $date <a href='/phpmotors/reviews/?action=update-review&reviewId=\".urlencode($review['reviewId']).\"'>Edit</a> | <a href='/phpmotors/reviews/?action=delete-review&reviewId=\".urlencode($review['reviewId']).\"'>Delete</a> </li>\"; \r\n}\r\n$rc .= '</ul>';\r\nreturn $rc;\r\n}", "public function resourcecontentAction() {\n\t$resource_type = $this->_getParam('resource_type');\n\t$resource_id = $this->_getParam('resource_id');\n\t$is_spocerdStory = $this->_getParam('is_spocerdStory', null);\n\n\t$is_document = 0;\n\tif ($resource_type == 'document') {\n\t $is_document = 1;\n\t}\n \n if( strstr($resource_type, \"sitereview\") ) {\n // $resource_type = \"sitereview\";\n\n $sitereviewExplode = explode(\"_\", $resource_type);\n $tempAdModId = $sitereviewExplode[1];\n $module_info = Engine_Api::_()->getItem(\"communityad_module\", $tempAdModId);\n $tempModName = strtolower($module_info->module_title);\n $tempModName = ucfirst($module_info->module_title);\n \n $content_table = \"sitereview_listing\";\n $sub_title = \"View\" . \" \" . $tempModName;\n $content_data = Engine_Api::_()->getItem($content_table, $resource_id);\n }else {\n $field_info = Engine_Api::_()->getDbTable('modules', 'communityad')->getModuleInfo($resource_type);\n\n if (!empty($field_info)) {\n $content_data = Engine_Api::_()->getItem($field_info['table_name'], $resource_id);\n }\n }\n\n $base_url = Zend_Controller_Front::getInstance()->getBaseUrl();\n if( empty($sub_title) ) {\n $sub_title = Engine_Api::_()->communityad()->viewType($resource_type);\n }\n\t$photo_id_filepath = 0;\n\n\tif (empty($is_document)) {\n\t $photo_id_filepath = $content_data->getPhotoUrl('thumb.normal');\n\t} else {\n\t $photo_id_filepath = $content_data->thumbnail;\n\t}\n\n\tif (strstr($photo_id_filepath, '?')) {\n\t $explode_array = explode(\"?\", $photo_id_filepath);\n\t $photo_id_filepath = $explode_array[0];\n\t}\n\n\t$isCDN = Engine_Api::_()->seaocore()->isCdn();\n\n\tif (empty($isCDN)) {\n\t if (!empty($base_url)) {\n\t\t$photo_id_filepath = str_replace($base_url . '/', '', $photo_id_filepath);\n\t } else {\n\t\t$arrqay = explode('/', $photo_id_filepath);\n\t\tunset($arrqay[0]);\n\t\t$photo_id_filepath = implode('/', $arrqay);\n\t }\n\t}\n\n\tif (!empty($photo_id_filepath)) {\n\t if (strstr($photo_id_filepath, 'application/')) {\n\t\t$photo_id_filepath = 0;\n\t } else {\n\t\t$content_photo = $this->upload($photo_id_filepath, $is_document, $isCDN);\n\t }\n\t}\n\t// Set \"Title width\" acording to the module.\n\t$getStoryContentTitle = $title = $content_data->getTitle();\n\t$title_lenght = strlen($title);\n\t$tmpTitle = strip_tags($content_data->getTitle());\n\t$titleTruncationLimit = $title_truncation_limit = Engine_Api::_()->getApi('settings', 'core')->getSetting('ad.char.title', 25);\n\tif ($title_lenght > $title_truncation_limit) {\n\t $title_truncation_limit = $title_truncation_limit - 2;\n\t $title = Engine_String::strlen($tmpTitle) > $title_truncation_limit ? Engine_String::substr($tmpTitle, 0, $title_truncation_limit) : $tmpTitle;\n\t $title = $title . '..';\n\t}\n\n\t// Set \"Body width\" acording to the module.\n\t$body = $content_data->getDescription();\n\t$body_lenght = strlen($body);\n\t$tmpBody = strip_tags($content_data->getDescription());\n\t$body_truncation_limit = Engine_Api::_()->getApi('settings', 'core')->getSetting('ad.char.body', 135);\n\tif ($body_lenght > $body_truncation_limit) {\n\t $body_truncation_limit = $body_truncation_limit - 2;\n\t $body = Engine_String::strlen($tmpBody) > $body_truncation_limit ? Engine_String::substr($tmpBody, 0, $body_truncation_limit) : $tmpBody;\n\t $body = $body . '..';\n\t}\n\n\n\n\n\t$preview_title = $title . '<div class=\"cmaddis_adinfo\"><a href=\"javascript:void(0);\">' . $sub_title . '</a></div>';\n \t//$preview_title = $title . '<div class=\"cmaddis_adinfo cmad_show_tooltip_wrapper\" style=\"clear:none;\"><a href=\"javascript:void(0);\">' . $sub_title . '</a><div class=\"cmad_show_tooltip\"> <img src=\"./application/modules/Communityad/externals/images/tooltip_arrow.png\" />Viewers will be able to like this ad and its content. They will also be able to see how many people like this ad, and which friends like this ad.</div></div>';\n\n\t$remaning_body_limit = $body_truncation_limit - strlen($body);\n\tif ($remaning_body_limit < 0) {\n\t $remaning_body_limit = 0;\n\t}\n\t$remaning_title_limit = $title_truncation_limit - strlen($title);\n\tif ($remaning_title_limit < 0) {\n\t $remaning_title_limit = 0;\n\t}\n\n\t// Set the default image if no image selected.\n\tif (empty($content_photo)) {\n\t if (empty($is_spocerdStory)) {\n\t\t$path = $this->view->layout()->staticBaseUrl . '/application/modules/Communityad/externals/images/blankImage.png';\n\t\t$content_photo = '<img src=\"' . $path . '\" alt=\" \" />';\n\t } else {\n\t $content_photo = $this->view->itemPhoto($content_data, 'thumb.profile');\n\t if( in_array('music', array('music')) && in_array('blog', array('blog')) ) {\n\t $content_photo = $this->view->itemPhoto($content_data, 'thumb.icon');\n\t }\n\t }\n\t}\n\t$viewerTruncatedTitle = Engine_Api::_()->communityad()->truncation($this->_viewer->getTitle(), $titleTruncationLimit);\n\t\n\tif ($is_spocerdStory == 1) {\n\t $storyTrunLimit = Engine_Api::_()->getApi('settings', 'core')->getSetting('story.char.title', 35);\n\t $getStoryContentTitle = Engine_Api::_()->communityad()->truncation($getStoryContentTitle, $storyTrunLimit);\n\t $getTooltipTitle = $this->view->translate(\"_sponsored_viewer_title_tooltip\");\n\t $getContentTooltipTitle = $this->view->translate(\"_sponsored_content_title_tooltip\");\n\t $viewerTruncatedTitle = '<span class=\"cmad_show_tooltip_wrapper\"><b><a href=\"javascript:void(0);\">' . $viewerTruncatedTitle . '</a></b><div class=\"cmad_show_tooltip\"><img src=\"./application/modules/Communityad/externals/images/tooltip_arrow.png\" style=\"width:13px;height:9px;\" />'.$getTooltipTitle.'</div></span>';\n\t $main_div_title = $this->view->translate('%s likes <a href=\"javascript:void(0);\">%s.</a>', $viewerTruncatedTitle, $getStoryContentTitle);\n\t $footer_comment = '';\n\n$content_photo = '<a href=\"javascript:void(0);\">' . $content_photo . '</a><div class=\"cmad_show_tooltip\">\n\t\t\t\t\t\t\t<img src=\"./application/modules/Communityad/externals/images/tooltip_arrow.png\" />\n\t\t\t\t\t\t\t'. $this->view->translate(\"_sponsored_content_photo_tooltip\") .'\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>';\n\t}else {\n\t $title = Engine_Api::_()->communityad()->truncation($title, $titleTruncationLimit);\n\t}\n\n\tif (empty($is_spocerdStory)) {\n\t $this->view->id = $content_data->getIdentity();\n\t $this->view->title = $title;\n\t $this->view->resource_type = $resource_type;\n\t $this->view->des = $body;\n\t $this->view->page_url = $content_data->getHref();\n\t $this->view->photo = $content_photo;\n\t $this->view->preview_title = $preview_title;\n\t $this->view->remaning_body_text = $remaning_body_limit;\n\t $this->view->remaning_title_text = $remaning_title_limit;\n\t $this->view->photo_id_filepath = $photo_id_filepath;\n\t} else {\n\t $this->view->main_div_title = $main_div_title;\n\t $this->view->photo = $content_photo;\n\t $this->view->temp_pre_title = $getStoryContentTitle; \n\t $getStoryContentTitle = str_replace(' ', '&nbsp;', $getStoryContentTitle);\n\t $this->view->preview_title = $getStoryContentTitle; \n\t $this->view->footer_comment = $footer_comment;\n\t $this->view->remaning_title_text = $remaning_title_limit;\n\t $this->view->modTitle = $field_info['module_title'];\n\t}\n }", "public function views() {\n\t\t\t$views = $this->get_views();\n\n\t\t\t/** This filter is documented in wp-admin/inclues/class-wp-list-table.php */\n\t\t\t$views = apply_filters( \"views_{$this->screen->id}\", $views );\n\n\t\t\t$this->screen->render_screen_reader_content( 'heading_views' );\n\t\t\t?>\n\t\t\t<div class=\"wp-filter\">\n\t\t\t\t<ul class=\"filter-links\">\n\t\t\t\t\t<?php\n\t\t\t\t\tif ( ! empty( $views ) ) {\n\t\t\t\t\t\tforeach ( $views as $class => $view ) {\n\t\t\t\t\t\t\t$views[ $class ] = \"\\t<li class='$class'>$view\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo implode( \" </li>\\n\", $views ) . \"</li>\\n\";\n\t\t\t\t\t}\n\t\t\t\t\t?>\n\t\t\t\t</ul>\n\t\t\t\t<?php\n\t\t\t\tif ( 'learndash' === $this->current_tab ) {\n\t\t\t\t\t$this->show_update_button();\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}", "public function review()\n {\n return view('company.review');\n }", "public function index()\n { \n // DO I STILL NEED TO USE 'App\\Venue' is RELATIONSHIP IS SET UP ?? \n // $venues = Venue::all(); \n $reviews = Review::orderBy('created_at', 'desc')->paginate(2);\n\n return view('reviews.index', compact(['venues', 'reviews'])); \n\n }", "public function index()\n {\n //\n $reviews = Review::with(['user', 'product', 'photo'])->get();\n return view('admin.reviews.index', compact('reviews'));\n }", "private function getReviewData($reviewTitle){\r\n\t\t\t$result = $this->myDatabase->prepare(\"SELECT reviewID,userID,username,reviewTitle,platform,gameTitle,rating,difficulty,hoursPlayed,recommend,tags,summary,review,numComments FROM reviews WHERE reviewTitle LIKE '%\".$reviewTitle.\"%'\");\r\n\t\t\t//echo gettype($result);\r\n\t\t\t$result->bind_Param('s', $reviewTitle);\r\n\t\t\t$result->execute();\r\n\t\t\t$result = $result->get_result();\r\n\t\t\tif($result){\r\n\t\t\t\tif($result->num_rows > 0){\r\n\t\t\t\t\t$reView = array();\r\n\t\t\t\t\tfor ($i=0; $i < $result->num_rows; $i++) { \r\n\t\t\t\t\t\t$row = $result->fetch_assoc();\r\n\t\t\t\t\t\tarray_push($reView, $row);\r\n\r\n\t\t\t\t\t\t$result = $this->myDatabase->prepare(\"SELECT reviewID FROM reviews WHERE reviewTitle LIKE '%\".$reviewTitle.\"%'\");\r\n\t\t\t\t\t\t$result->bind_Param('s', $commentKey);\r\n\t\t\t\t\t\t$result->execute();\r\n\t\t\t\t\t\t$result = $result->get_result();\r\n\t\t\t\t\t\tfor ($t=0; $t < $result->num_rows; $t++) { \r\n\t\t\t\t\t\t\t//echo $t;\r\n\t\t\t\t\t\t\t$reviewID1 = $result->fetch_assoc();\r\n\t\t\t\t\t\t\t$reviewID2 = array_values($reviewID1);\r\n\t\t\t\t\t\t\t//echo ($reviewID2[0]);\r\n\t\t\t\t\t\t\t$reviewID3 = $reviewID2[0];\r\n\t\t\t\t\t\t\t$reviewID = $reviewID3;\r\n\t\t\t\t\t\t\t//echo gettype($reviewID3);\r\n\t\t\t\t\t\t\t//echo gettype($reviewID);\r\n\t\t\t\t\t\t\t$result1 = $this->myDatabase->prepare(\"SELECT comment FROM comments WHERE reviewID LIKE $reviewID\");\r\n\t\t\t\t\t\t\t$result1->bind_Param('s', $reviewID1);\r\n\t\t\t\t\t\t\t$result1->execute();\r\n\t\t\t\t\t\t\t$result1 =$result1->get_result();\r\n\t\t\t\t\t\t\t$commentArray = array();\r\n\t\t\t\t\t\t\tfor ($p=0; $p < $result1->num_rows; $p++) { \r\n\t\t\t\t\t\t\t$comments = $result1->fetch_assoc();\r\n\t\t\t\t\t\t\tarray_push($commentArray, $comments);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t//array_push($reView, $commentArray);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tarray_push($reView, $commentArray);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$reViewObj = new stdClass();\r\n\t\t\t\t\t$reViewObj->reView = $reView;\r\n\t\t\t\t\theader('content-type: application/json');\r\n\t\t\t\t\techo json_encode($reViewObj); \r\n\t\t\t\t} else {\r\n\t\t\t\t\t/*if nothing is found*/\r\n \t$this->statuscode = 204;\r\n \t}\r\n\t\t\t} else {\r\n //If the SQL failed\r\n $this->statuscode = 400;\r\n echo '<script>console.log(\"If the SQL failed\"); </script>';\r\n \t} \r\n\t\t}", "function userUpdateComment()\n{\n $chapterManager = new ChapterManager();\n $commentManager = new CommentManager();\n\n $chapter = $chapterManager->getChapter($_GET['id_chapter']);\n $comment = $commentManager->getComment($_GET['id']);\n require ('view/frontend/updateCommentView.php');\n}", "function getReviews(){\n $reviews = $this->all('schema:reviews');\n if ($reviews){\n \tEasyRdf_TypeMapper::set('schema:Review', 'WorldCat\\Discovery\\Review');\n \t$reviews = static::reloadGraph($this->graph)->resource($this->getUri())->all('schema:reviews');\n \tEasyRdf_TypeMapper::delete('schema:Review');\n }\n return $reviews;\n }", "function _getObjectsForReviewAuthorPages() {\n\t\treturn array(\n\t\t\t\t\t'objectsForReview',\n\t\t\t\t\t'requestObjectForReview'\n\t\t\t\t);\n\t}", "public function view(){\n\t\t$this->buildListing();\n\t}", "function fre_freelancer_review_form() {\n wp_reset_query();\n global $user_ID;\n $status = get_post_status(get_the_ID());\n $bid_accepted = get_post_field('accepted', get_the_ID());\n $freelan_id = (int)get_post_field('post_author', $bid_accepted);\n $comment = get_comments(array(\n 'status' => 'approve',\n 'post_id' => get_the_ID() ,\n 'type' => 'fre_review'\n ));\n $review = isset($_GET['review']) ? (int)$_GET['review'] : 0;\n $status = get_post_status(get_the_ID());\n \n if (empty($comment) && $user_ID == $freelan_id && $review && $status == 'complete') { ?>\n <script type=\"text/javascript\">\n (function($, Views, Models, Collections) {\n $(document).ready(function(){\n this.modal_review = new AE.Views.Modal_Review();\n this.modal_review.openModal();\n });\n })(jQuery, AE.Views, AE.Models, AE.Collections);\n </script>\n\n <?php\n }\n }", "function sopac_bib_record() {\n global $user;\n\n $locum = sopac_get_locum();\n $insurge = sopac_get_insurge();\n $actions = sopac_parse_uri();\n $bnum = $actions[1];\n $getvars = sopac_parse_get_vars();\n $output = $getvars['output'];\n\n // Load social function\n require_once('sopac_social.php');\n drupal_add_js('misc/collapse.js');\n drupal_add_js(drupal_get_path('theme', 'aadl').'/soundmanager2-nodebug-jsmin.js');\n drupal_add_js(drupal_get_path('theme', 'aadl').'/inlineplayer.js');\n $no_circ = $locum->csv_parser($locum->locum_config['location_limits']['no_request']);\n $show_inactive = user_access('show suppressed records');\n $item = $locum->get_bib_item($bnum, $show_inactive);\n $bnum_arr[] = $bnum;\n $reviews = $insurge->get_reviews(NULL, $bnum_arr, NULL);\n $i = 0;\n foreach ($reviews['reviews'] as $insurge_review) {\n $rev_arr[$i]['rev_id'] = $insurge_review['rev_id'];\n $rev_arr[$i]['bnum'] = $insurge_review['bnum'];\n if ($insurge_review['uid']) {\n $rev_arr[$i]['uid'] = $insurge_review['uid'];\n }\n $rev_arr[$i]['timestamp'] = $insurge_review['rev_create_date'];\n $rev_arr[$i]['rev_title'] = $insurge_review['rev_title'];\n $rev_arr[$i]['rev_body'] = $insurge_review['rev_body'];\n $i++;\n }\n if (!$insurge->check_reviewed($user->uid, $bnum_arr[0]) && $user->uid) {\n $rev_form = drupal_get_form('sopac_review_form', $bnum_arr[0]);\n }\n else {\n $rev_form = NULL;\n }\n if($machinetags = $insurge->get_machine_tags($bnum)){\n foreach($machinetags as $machinetag){\n $item['machinetags'][$machinetag['namespace']][] = $machinetag;\n }\n }\n if(($item['magnatune_url'] || $item['mat_code'] == 'z') && !$item['stream_filetype']){\n $result_page = theme('sopac_record_musicdownload', $item, $locum->locum_config, $rev_arr, $rev_form);\n }\n else if ($item['mat_code']) {\n $item['tracks'] = $locum->get_cd_tracks($bnum);\n $item['trackupc'] = $locum->get_upc($bnum);\n if($item['bnum']) {\n $item_status = $locum->get_item_status($bnum, TRUE);\n }\n // Grab Syndetics reviews, etc..\n $review_links = $locum->get_syndetics($item['stdnum'][0]);\n if (count($review_links)) {\n $item['review_links'] = $review_links;\n }\n $lists = $insurge->get_item_list_ids($item['bnum']);\n if(count($lists)){\n $sql = \"SELECT * FROM {sopac_lists} WHERE public = 1 and list_id IN (\".implode($lists,',').\") ORDER BY list_id DESC\";\n $res = db_query($sql);\n for ($i = 1; $i <= 10; $i++) {\n $record = db_fetch_array($res);\n $item['lists'][] = $record;\n }\n }\n // Build the page\n $result_page = theme('sopac_record', $item, $item_status, $locum->locum_config, $no_circ, &$locum, $rev_arr, $rev_form);\n }\n else {\n $result_page = t('This record does not exist.');\n }\n\n if ($output == \"rss\") {\n $item['status'] = $item_status;\n $item['type'] = 'bib';\n $cover_img_url = $item['cover_img'];\n return theme('sopac_results_hitlist_rss', 1, $cover_img_url, $item, $locum->locum_config, $no_circ);\n } else {\n return '<p>'. t($result_page) .'</p>';\n }\n}", "public function getVillaReviews($params)\n\t{\n\t\t/* SET XML Folder for Reviews */\n\t\t$xpath = MAIN_FOLDER.\"/villa-xml/\".$params['villa_theme'].\"/\";\n\t\tif(!is_dir($xpath))\n\t\t\tmkdir($xpath,0775);\n\t\t/* End SET XML Folder for Reviews */\n\t\t\n\t\t$request = \"strVillaID=\".$params['id'].\"\";\n\t\t$xml = $this->curly_tops('getVillaReviews',$request,TRUE,TRUE,$params['id'].'_reviews',$xpath,'prod');\n\t\t\n\t\t$reviews = array();\n\t\t$rc = 0;\n\t\t\n\t\t/* ANOTHER APPROACH */\n\t\t$rawiswar = '';\n\t\t$file = fopen( $xpath.$params['id'].'_reviews.xml', 'r' );\n\t\t\t\t\n\t\twhile( $xd = fread( $file, 65535 ) ):\n\t\t\t$xd = trim($xd);\n\t\t\t$xd = preg_replace('/\\s+/', ' ', $xd);\n\t\t\t$xd = str_replace('&nbsp;', ' ', $xd);\n\t\t\t$rawiswar .= $xd; \n\t\tendwhile;\n\t\tfclose( $file );\n\t\t\n\t\tpreg_match_all( \"/\\<REVIEW\\>(.*?)\\<\\/REVIEW\\>/s\", $rawiswar, $vblocks );\n\t\n\t\tforeach( $vblocks[1] as $vblock ):\n\t\t\tpreg_match_all( \"/\\<ApprStatusID\\>(.*?)\\<\\/ApprStatusID\\>/\", $vblock, $status );\n\t\t\tpreg_match_all( \"/\\<Name\\>(.*?)\\<\\/Name\\>/\", $vblock, $name );\n\t\t\t\n\t\t\tif($status[1][0] == 'Approved' && $name[1][0] != 'Staff'):\n\t\t\t\t\n\t\t\t\tpreg_match_all( \"/\\<SDate\\>(.*?)\\<\\/SDate\\>/\", $vblock, $sdate );\n\t\t\t\t$reviews[$rc]['SDate'] = $sdate[1][0];\n\t\t\t\t\n\t\t\t\tpreg_match_all( \"/\\<EDate\\>(.*?)\\<\\/EDate\\>/\", $vblock, $edate );\n\t\t\t\t$reviews[$rc]['EDate'] = $edate[1][0];\n\t\t\t\t\n\t\t\t\tpreg_match_all( \"/\\<ReviewByName\\>(.*?)\\<\\/ReviewByName\\>/\", $vblock, $reviewbyname );\n\t\t\t\t$reviews[$rc]['ReviewByName'] = $reviewbyname[1][0];\n\t\t\t\t\n\t\t\t\tpreg_match_all( \"/\\<ApprStatusID\\>(.*?)\\<\\/ApprStatusID\\>/\", $vblock, $rstatus );\n\t\t\t\t$reviews[$rc]['ApprStatusID'] = $rstatus[1][0];\n\t\t\t\t\n\t\t\t\tpreg_match_all( \"/\\<ROverallComments\\>(.*?)\\<\\/ROverallComments\\>/\", $vblock, $rcomments );\n\t\t\t\tif( array_key_exists(0,$rcomments[1]) ):\n\t\t\t\t\t$reviews[$rc]['ROverallComments'] = $rcomments[1][0];\n\t\t\t\telse:\n\t\t\t\t\t$reviews[$rc]['ROverallComments'] = '';\t\n\t\t\t\tendif;\n\t\t\t\t\n\t\t\t\t$rc++;\n\t\t\tendif;\n\t\tendforeach;\n\t\t/* END ANOTHER APPROACH */\n\t\t\n\t\t/* DISPLAY ARRAY RESULT */\n\t\t$hide_this = array();\n\t\tif( array_key_exists('hide_this_year', $params) ):\n\t\t\tif( strpos($params['hide_this_year'], ',') !== FALSE ):\n\t\t\t\t$hide_this = explode(',',$params['hide_this_year']);\n\t\t\telse:\n\t\t\t\t$hide_this[0] = $params['hide_this_year'];\n\t\t\tendif;\n\t\tendif;\n\t\t$sr = sizeof($reviews);\n\t\t$result = '';\n\t\tif( $sr > 0 ):\n\t\t\tfor( $n = 0; $n < $sr; $n++ ):\n\t\t\t\t$reviews = $this->subval_sort($reviews,'SDate');\n\t\t\t\tif( $reviews[$n]['ROverallComments'] != '' ):\n\t\t\t\t\t$result .='<div class=\"review\"><blockquote>';\n\t\t\t\t\tif( array_key_exists('SDate',$reviews[$n]) ):\n\t\t\t\t\t\tif( sizeof($hide_this) <= 0 ):\n\t\t\t\t\t\t\t$result .= '<p class=\"dates\"><strong>'.date(\"F jS, Y\", strtotime($reviews[$n]['SDate'].' + 1 day')).' - '.date(\"F jS, Y\", strtotime($reviews[$n]['EDate'].' + 1 day')).'</strong></p>&ldquo;';\n\t\t\t\t\t\telse:\n\t\t\t\t\t\t\t$filter_this = date('Y', strtotime($reviews[$n]['EDate']));\n\t\t\t\t\t\t\tif( !in_array($filter_this,$hide_this) ):\n\t\t\t\t\t\t\t\t$result .= '<p class=\"dates\"><strong>'.date(\"F jS, Y\", strtotime($reviews[$n]['SDate'].' + 1 day')).' - '.date(\"F jS, Y\", strtotime($reviews[$n]['EDate'].' + 1 day')).'</strong></p>&ldquo;';\n\t\t\t\t\t\t\tendif;\n\t\t\t\t\t\tendif;\n\t\t\t\t\tendif;\n\t\t\t\t\tif( sizeof($hide_this) <= 0 ):\n\t\t\t\t\t\t$result .= $reviews[$n]['ROverallComments'];\n\t\t\t\t\t\t$result .= '&rdquo;</blockquote><p class=\"name\">'.$reviews[$n]['ReviewByName'].'</p></div>';\n\t\t\t\t\telse:\n\t\t\t\t\t\t$filter_this = date('Y', strtotime($reviews[$n]['EDate']));\n\t\t\t\t\t\tif( !in_array($filter_this,$hide_this) ):\n\t\t\t\t\t\t\t$result .= $reviews[$n]['ROverallComments'];\n\t\t\t\t\t\t\t$result .= '&rdquo;</blockquote><p class=\"name\">'.$reviews[$n]['ReviewByName'].'</p></div>';\n\t\t\t\t\t\tendif;\t\n\t\t\t\t\tendif;\n\t\t\t\tendif;\n\t\t\tendfor;\n\t\t\treturn $result;\n\t\telse:\n\t\t\treturn '<div class=\"review\"><blockquote>No reviews yet at the moment</blockquote></div>';\t\n\t\tendif;\n\t\t/* END DISPLAY ARRAY RESULT */\n\t}", "public function index()\n {\n $userpapers = Review::get();//dd($userpapers);\n return view('company.review.index', compact('userpapers'));\n }", "public function previews()\n {\n $this->authorize();\n\n ee()->load->helper('form');\n ee()->load->library('form_validation');\n ee()->load->model('publisher_channel');\n ee()->load->model('publisher_template');\n\n if (empty($_POST))\n {\n $vars = array(\n 'hidden' => array(),\n 'save_url' => ee()->publisher_helper_cp->mod_link('previews', array(), TRUE),\n 'templates' => ee()->publisher_template->get_all(),\n 'channels' => ee()->publisher_channel->get_all(),\n 'data' => ee()->publisher_template->get_all_previews()\n );\n\n return ee()->load->view('previews', $vars, TRUE);\n }\n else\n {\n ee()->publisher_template->save_previews();\n ee()->session->set_flashdata('message_success', lang('publisher_previews_saved'));\n ee()->publisher_helper_url->redirect(ee()->publisher_helper_cp->mod_link('previews'));\n }\n }", "public function loadReview()\n\t{\n\t\t$reviewid = $this->uri->segment(2,0);\n\t\t$data = array(\n\t\t\t'reviewid'=>$reviewid\n\t\t);\n\t\t$this->session->set_userdata($data);\n\t\t// print_r($this->session->userdata('reviewid'));\n//\t\tuse the review id to retrieve the review from the db and pass it to the view in the form of an array\n\t\t$review = $this->Review_Model->getReview($reviewid);\n\t\t// $comments = $this->Review_Model->getComments($reviewid);\n\n\t\t$this->load->view('reviewPage', ['review'=>$review]);\n\t}", "function opensky_ir_citationCModel_islandora_view_object_alter (&$object, &$rendered) {\n\n // add viewed and downloaded counts if there is a citation.tab property in $rendered\n if (isset($rendered['citation.tab'])) {\n if (module_exists('islandora_usage_stats')) {\n module_load_include('inc', 'islandora_usage_stats', 'includes/db');\n // using the view_count method from db.inc\n $view_count = islandora_usage_stats_get_individual_object_view_count($object);\n $ds_count = islandora_usage_stats_get_datastream_downloads_count($object);\n $times_downloaded = 0;\n if (array_key_exists('PDF',$ds_count)){\n $times_downloaded = $ds_count['PDF'];\n }\n $rendered['citation.tab']['view_count']['#markup'] =t(\"<br/>Times Viewed on OpenSky: $view_count <br/>\" .\n \"Times Downloaded on OpenSky: $times_downloaded\");\n /* we have to assign view_count a weight that puts it in between\n 'preview' and 'pdf_download'. the other #weight values are integers but the following seems to\n work to put 'view_count' above 'pdf_download'. note that using 'pdf_download's exact \n weight also does the same thing ...\n */\n $rendered['citation.tab']['view_count']['#weight'] = $rendered['citation.tab']['pdf_download']['#weight'] - 0.5;\n } \n \n // Set text on download link for PDFs (see original in islandora_scholar_get_view())\n \n $default_viewer = variable_get('islandora_scholar_viewers');\n $default_viewer = $default_viewer['default'];\n\n $default_viewer = 'none'; // hard-coded here because I can't find a way to configure so it is 'none'!\n\n if (isset($object['PDF']) && islandora_datastream_access(ISLANDORA_VIEW_OBJECTS, $object['PDF']) && $default_viewer == 'none') {\n $filename = str_replace(\":\", \"_\", $object->id);\n $rendered['citation.tab']['pdf_download'] = array(\n '#type' => 'item',\n '#markup' => t('Download ') . l(t('PDF'), \"islandora/object/$object->id/datastream/PDF/download/citation.pdf\"),\n '#weight' => $rendered['citation.tab']['pdf_download']['#weight'],\n );\n }\n\n // change the way \"metadata\" is displayed (see\n // islandora_scholar_get_metadata_display) to include $doi_link (Published Version ..) and\n // $in_collections\n if (variable_get('islandora_scholar_use_standard_metadata_display', FALSE)) {\n module_load_include('inc', 'islandora', 'includes/metadata');\n // Borrowing core JS for fieldsets.\n drupal_add_js('misc/form.js');\n drupal_add_js('misc/collapse.js');\n\n $metadata = islandora_retrieve_metadata_markup($object);\n $description = islandora_retrieve_description_markup($object);\n $doi_link = opensky_retrieve_doi_markup($object);\n $in_collections = opensky_get_in_collections_display($object);\n\n $rendered['citation.tab']['metadata']['#markup'] = $doi_link . $description . $in_collections . $metadata;\n } \n }\n}", "public function show(Review $review)\n {\n //\n }", "public function show(Review $review)\n {\n //\n }", "public function show(Review $review)\n {\n //\n }", "public function show(Review $review)\n {\n //\n }", "public function index () {\n $orders = $this->Orders->find()\n ->contain(['Reviews'])\n ->where(['Orders.user_id' => $this->Auth->user('id')])\n ->cache($this->Auth->user('id') . '-orders');\n\n $this->paginate = ['limit' => 20];\n\n $this->set(['orders' => $this->paginate($orders)]);\n }", "public function ratereviewpromotion() {\n\n $sessionstaff = $this->Session->read('staff');\n $options6['conditions'] = array('Promotion.clinic_id' => $sessionstaff['clinic_id'], 'Promotion.is_global' => 0,'Promotion.default'=>2,'Promotion.is_lite'=>0);\n $Promotionlist = $this->Promotion->find('all', $options6);\n $this->set('promotionlist', $Promotionlist);\n //function to check access control for practice staff\n if($sessionstaff['staff_role']=='Doctor' && $sessionstaff['staffaccess']['AccessStaff']['rate_review']==1){\n \n }else{\n $this->render('/Elements/access');\n }\n }", "public function index()\n {\n $user_reviews = request()->user()->reviews;\n return view('reviews.index', ['reviews'=> $user_reviews]);\n }", "public function indexAction()\n {\n $request = Request::all();\n $request = array(\n 'from' => isset($request['from']) ? $request['from'] : '',\n 'to' => isset($request['to']) ? $request['to'] : ''\n );\n\n $data = $request;\n $data += array(\n 'page_title' => 'Reviews',\n 'reviews' => ReviewsCms::getReviews($request['from'], $request['to']),\n 'stylesheets' => array(\n 'data_table'\n ),\n 'javascripts' => array(\n 'data_table',\n 'review'\n ),\n );\n\n return view('cms.review.index', $data);\n }", "public function index()\n {\n $reviews = DB::table('ratings')->get();\n\n foreach ($reviews as $review) {\n \t# code...\n \t$patient = Patient::where('user_id',$review->author_id)->first();\n\n \t$doctor = Doctor::findOrFail($review->rateable_id);\n\n \t$review->patient_name = $patient->name;\n \t$review->patient_firstname = $patient->firstname;\n \t$review->patient_image = $patient->profile_picture;\n \t$review->doctor_name = $doctor->name;\n \t$review->doctor_firstname = $doctor->firstname;\n \t$review->doctor_image = $doctor->profile_picture;\n \t$review->created_at = Carbon::parse($review->created_at);\n }\n\n return view('admin.reviews.index')->with('reviews', $reviews);\n }", "public function comments()\n {\n $comments = $this->comment->getAllComments();\n $this->buildView(array('comments' => $comments));\n }", "function run()\n\t{\n\t\t// Find review, if there is one\n\t\t$individual_review_ratings=array();\n\t\t$review_rating=post_param('review_rating','');\n\t\tif ($review_rating!='')\n\t\t{\n\t\t\t$individual_review_ratings['']=array(\n\t\t\t\t'REVIEW_TITLE'=>'',\n\t\t\t\t'REVIEW_RATING'=>$review_rating,\n\t\t\t);\n\t\t}\n\n\t\t$poster_name=$GLOBALS['FORUM_DRIVER']->get_username(get_member());\n\t\t$post=comcode_to_tempcode(post_param('post'));\n\n\t\t// OCF renderings of poster\n\t\tstatic $hooks=NULL;\n\t\tif (is_null($hooks)) $hooks=find_all_hooks('modules','topicview');\n\t\tstatic $hook_objects=NULL;\n\t\tif (is_null($hook_objects))\n\t\t{\n\t\t\t$hook_objects=array();\n\t\t\tforeach (array_keys($hooks) as $hook)\n\t\t\t{\n\t\t\t\trequire_code('hooks/modules/topicview/'.filter_naughty_harsh($hook));\n\t\t\t\t$object=object_factory('Hook_'.filter_naughty_harsh($hook),true);\n\t\t\t\tif (is_null($object)) continue;\n\t\t\t\t$hook_objects[$hook]=$object;\n\t\t\t}\n\t\t}\n\t\tif (!is_guest())\n\t\t{\n\t\t\trequire_code('ocf_members2');\n\t\t\t$poster_details=ocf_show_member_box(get_member(),false,$hooks,$hook_objects,false);\n\t\t} else\n\t\t{\n\t\t\t$custom_fields=new ocp_tempcode();\n\t\t\t$poster_details=new ocp_tempcode();\n\t\t}\n\t\tif (addon_installed('ocf_forum'))\n\t\t{\n\t\t\tif (!is_guest())\n\t\t\t{\n\t\t\t\t$poster=do_template('OCF_POSTER_MEMBER',array('ONLINE'=>true,'ID'=>strval(get_member()),'POSTER_DETAILS'=>$poster_details,'PROFILE_URL'=>$GLOBALS['FORUM_DRIVER']->member_profile_url(get_member(),false,true),'POSTER_USERNAME'=>$poster_name));\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$poster=do_template('OCF_POSTER_GUEST',array('IP_LINK'=>'','POSTER_DETAILS'=>$poster_details,'POSTER_USERNAME'=>$poster_name));\n\t\t\t}\n\t\t} else\n\t\t{\n\t\t\t$poster=make_string_tempcode(escape_html($poster_name)); // Should never happen actually, as applies discounts hook from even running\n\t\t}\n\n\t\t$highlight=false;\n\t\t$datetime_raw=time();\n\t\t$datetime=get_timezoned_date(time());\n\t\t$poster_url=$GLOBALS['FORUM_DRIVER']->member_profile_url(get_member());\n\t\t$title=post_param('title','');\n\t\t$tpl=do_template('POST',array(\n\t\t\t'INDIVIDUAL_REVIEW_RATINGS'=>$individual_review_ratings,\n\t\t\t'HIGHLIGHT'=>$highlight,\n\t\t\t'TITLE'=>$title,\n\t\t\t'TIME_RAW'=>strval($datetime_raw),\n\t\t\t'TIME'=>$datetime,\n\t\t\t'POSTER_URL'=>$poster_url,\n\t\t\t'POSTER_NAME'=>$poster_name,\n\t\t\t'POST'=>$post,\n\t\t\t'POSTER_ID'=>strval(get_member()),\n\t\t\t'POSTER'=>$poster,\n\t\t\t'POSTER_DETAILS'=>$poster_details,\n\t\t\t'ID'=>'',\n\t\t\t'CHILDREN'=>'',\n\t\t\t'RATING'=>'',\n\t\t\t'EMPHASIS'=>'',\n\t\t\t'BUTTONS'=>'',\n\t\t\t'TOPIC_ID'=>'',\n\t\t\t'UNVALIDATED'=>'',\n\t\t\t'IS_SPACER_POST'=>false,\n\t\t\t'NUM_TO_SHOW_LIMIT'=>'0',\n\t\t));\n\t\treturn array($tpl,NULL);\n\t}", "public function comments(){\n }", "public function index()\n {\n $reviews = Review::all();\n // $reviews = Review::paginate(20);\n \n return view('review.add', ['reviews' => $reviews]);\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}", "function _showComments(&$comments,$template, $maxToShow = -1, $NumToShow = -1, $start = 1, $pages = 0, $sord = 'ASC',$showNone = 1, $highlight = '') {\r\n\t\tglobal $CONF, $manager;\r\n\r\n\t\t// create parser object & action handler\r\n\t\t$actions =& new COMMENTACTIONS($comments);\r\n\t\t$parser =& new PARSER($actions->getDefinedActions(),$actions);\r\n\t\t$actions->setTemplate($template);\r\n\t\t$actions->setParser($parser);\r\n\r\n\t\tif ($maxToShow == 0) {\r\n\t\t\t$comments->commentcount = $comments->amountComments();\r\n\t\t} else {\r\n\t\t\t$query = 'SELECT c.citem as itemid, c.cnumber as commentid, c.cbody as body, c.cuser as user, c.cmail as userid, c.cmember as memberid, c.ctime, c.chost as host, c.cip as ip, c.cblog as blogid'\r\n\t\t\t\t . ' FROM '.sql_table('comment').' as c'\r\n\t\t\t\t . ' WHERE c.citem=' . $comments->itemid;\r\n\t\t\tif ($sord == 'RAND()') $query .= ' ORDER BY RAND()';\r\n else $query .= ' ORDER BY c.ctime '.$sord;\r\n if ($NumToShow >= 0) $query .= ' LIMIT '.intval($start - 1).','.$NumToShow;\r\n\r\n\t\t\t$commres = sql_query($query);\r\n\t\t\t$comments->commentcount = mysql_num_rows($commres);\r\n\t\t}\r\n\r\n\t\t// if no result was found\r\n\t\tif ($comments->commentcount == 0) {\r\n\t\t\t// note: when no reactions, COMMENTS_HEADER and COMMENTS_FOOTER are _NOT_ used\r\n\t\t\tif ($showNone) $parser->parse($template['COMMENTS_NONE']);\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\t// if too many comments to show\r\n\t\tif (($maxToShow != -1) && ($comments->commentcount > $maxToShow)) {\r\n\t\t\t$parser->parse($template['COMMENTS_TOOMUCH']);\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\t$parser->parse($template['COMMENTS_HEADER']);\r\n\r\n if ($pages && ($comments->commentcount < $comments->amountComments())) {\r\n $this->_pagelinks($start,$NumToShow,$comments->amountComments());\r\n }\r\n\r\n\t\twhile ( $comment = mysql_fetch_assoc($commres) ) {\r\n\t\t\t$comment['timestamp'] = strtotime($comment['ctime']);\r\n\t\t\t$actions->setCurrentComment($comment);\r\n\t\t\t$actions->setHighlight($highlight);\r\n\t\t\t$manager->notify('PreComment', array('comment' => &$comment));\r\n\t\t\t$parser->parse($template['COMMENTS_BODY']);\r\n\t\t\t$manager->notify('PostComment', array('comment' => &$comment));\r\n\t\t}\r\n\r\n if ($pages && ($comments->commentcount < $comments->amountComments())) {\r\n $this->_pagelinks($start,$NumToShow,$comments->amountComments());\r\n }\r\n\r\n\t\t$parser->parse($template['COMMENTS_FOOTER']);\r\n\r\n\t\tmysql_free_result($commres);\r\n\r\n\t\treturn $comments->commentcount;\r\n\t}", "public function ViewAction()\r\n\t{\r\n\t\t$this->View->author = $this->Author->select();\r\n\t}", "public function views() {\n\t\t$views = $this->get_views();\n\n\t\t/** This filter is documented in wp-admin/inclues/class-wp-list-table.php */\n\t\t$views = apply_filters( \"views_{$this->screen->id}\", $views );\n\n\t\t$this->screen->render_screen_reader_content( 'heading_views' );\n?>\n<div class=\"wp-filter\">\n\t<ul class=\"filter-links\">\n\t\t<?php\n\t\tif ( ! empty( $views ) ) {\n\t\t\tforeach ( $views as $class => $view ) {\n\t\t\t\t$views[ $class ] = \"\\t<li class='$class'>$view\";\n\t\t\t}\n\t\t\techo implode( \" </li>\\n\", $views ) . \"</li>\\n\";\n\t\t}\n\t\t?>\n\t</ul>\n\n\t<?php install_search_form(); ?>\n</div>\n<?php\n\t}", "public function showcommentsAction()\n {\n $comment_params=$this->_request->getParams();\n $ftvcontacts_obj = new Ep_Ftv_FtvContacts();\n $ftvrequest_obj = new Ep_Ftv_FtvRequests();\n $ftvcomments_obj = new Ep_Ftv_FtvComments();\n //$this->render(\"ftv_addcomment\"); exit;\n $request_id = $comment_params['request_id'];\n $this->_view->request_id=$request_id;\n $commentDetails=$ftvcomments_obj->getCommentsByRequests($request_id);\n\n /*$this->_view->commentDetails=$commentDetails;\n $commentsData='';\n if($commentDetails != 'NO')\n {\n $commentsData='';\n $cnt=0;\n foreach($commentDetails as $comment)\n {\n $commentsData.=\n '<li class=\"media\" id=\"comment_'.$comment['identifier'].'\">';\n $commentsData.='<div class=\"media-body\">\n <h4 class=\"media-heading\">\n <a href=\"#\" role=\"button\" data-toggle=\"modal\" data-target=\"#viewProfile-ajax\">'.utf8_encode($comment['first_name']).'</a></h4>\n '.utf8_encode(stripslashes($comment['comments'])).'\n <p class=\"muted\">'.$comment['created_at'].'</p>\n </div>\n </li>';\n }\n }*/\n $this->_view->ftvtype = \"chaine\";\n $this->_view->commentDetails = $commentDetails;\n\n $this->render(\"ftv_ftvaddcomment\");\n\n }", "public function index()\n {\n return view('backend.pages.reviews.index', ['title' => 'Reviews']);\n }", "function get_views()\n\t{\n\t\treturn $this->views;\n\t\t//return get_views($this->id);\n\t}", "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 doRestList() {\n\t\t$this->outputHelper ( 'Images 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}", "function viewProductReviews()\n{\n\t$cf = new Fwcore();\n\t\n\t$data = array();\n\t$data['auth_token'] = $_POST['auth_token'];\n\t$data['product_id'] = $_POST['product_id'];\n\t$data['app_id'] = isset($_POST['app_id']) != '' ? $_POST['app_id'] : '';\n\t\n\tif(isset($_POST['offset']) && $_POST['offset'] != '')\n\t{\n\t\t$data['offset'] = $_POST['offset'];\n\t}\n\telse\n\t{\n\t\t$data['offset'] = 0;\n\t}\n\t$cf->viewProductReviews($data);\n}" ]
[ "0.67501146", "0.6693666", "0.6548856", "0.62919134", "0.62867993", "0.62618506", "0.62001765", "0.61810946", "0.6118148", "0.6086512", "0.6073546", "0.60662174", "0.60506845", "0.6037928", "0.6029649", "0.6029649", "0.6029649", "0.6029649", "0.6016457", "0.60145056", "0.59846693", "0.5967553", "0.59548223", "0.59356564", "0.5923967", "0.5911737", "0.5891065", "0.5878613", "0.5878481", "0.58311385", "0.58232075", "0.5797061", "0.5786376", "0.5784683", "0.57837564", "0.57762796", "0.5770642", "0.5767035", "0.57626057", "0.5761718", "0.57613885", "0.5755917", "0.57540953", "0.57474726", "0.5735367", "0.57317126", "0.572504", "0.57152784", "0.5712842", "0.5706612", "0.5706539", "0.5706094", "0.5702138", "0.57015765", "0.57002497", "0.5697417", "0.56969047", "0.56969047", "0.5692301", "0.568042", "0.5673244", "0.56668264", "0.56579465", "0.56578106", "0.5642642", "0.56396747", "0.56271833", "0.56207883", "0.5615594", "0.5610575", "0.5598835", "0.55976117", "0.55892247", "0.5588303", "0.55846524", "0.5584645", "0.5584342", "0.55843", "0.5576116", "0.5576116", "0.5576116", "0.5576116", "0.5567052", "0.55665594", "0.5560927", "0.55602217", "0.55574965", "0.55535644", "0.55510885", "0.5548495", "0.5541985", "0.55395657", "0.5534972", "0.5529613", "0.5528376", "0.5526525", "0.5522609", "0.5515498", "0.55134654", "0.55118465", "0.5507605" ]
0.0
-1
Retrieve an instance of this class.
public static function getInstance($instance_name = 'default') { if (!isset(self::$instances)) { self::$instances = array(); } if (!isset(self::$instances[$instance_name])) { $class = __CLASS__; self::$instances[$instance_name] = new $class($instance_name); } return self::$instances[$instance_name]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function instance()\n {\n global $container;\n return $container->getByType(self::class);\n }", "public static function fetch()\n {\n if (!isset(self::$instance)) {\n $c = __CLASS__;\n self::$instance = new $c;\n }\n\n return self::$instance;\n }", "public static function get()\n {\n if (is_null(self::$instance)) {\n self::$instance = new self();\n }\n return self::$instance;\n }", "public static function get() \n {\n if (!isset(self::$instance)) {\n self::$instance = new self;\n }\n\n return self::$instance;\n }", "public function getInstance()\n {\n return $this;\n }", "public static function get()\n\t{\n\t\tif(null == self::$_instance)\n\t\t{\n\t\t\treturn new self();\n\t\t}\n\n\t\treturn self::$_instance;\n\t}", "public function getInstance()\n {\n return $this->instance;\n }", "public function getInstance()\n {\n return $this->instance;\n }", "public function getInstance()\n {\n return $this->instance;\n }", "public function getInstance()\n {\n return $this->instance;\n }", "public static function get() {\r\n\r\n\t\tif ( self::$instance == null ) {\r\n\t\t\tself::$instance = new self();\r\n\t\t}\r\n\r\n\t\treturn self::$instance;\r\n\r\n\t}", "public static function get() {\n\t\tif ( self::$instance === null )\n\t\t\tself::$instance = new self();\n\n\t\treturn self::$instance;\n\t}", "public function getInstance() {\n\t\treturn $this->instance;\n\t}", "public static function get() {\n\t\tif ( self::$instance == null ) {\n\t\t\tself::$instance = new self();\n\t\t}\n\t\treturn self::$instance;\n\t}", "public static function get_instance() {\n $self = __CLASS__;\n\n if ( is_null( $self::$instance ) ) {\n $self::$instance = new $self;\n }\n\n return $self::$instance;\n }", "public function getInstance(): self\n {\n return $this;\n }", "public function get_instance()\n\t{\n\t\treturn $this;\n\t}", "public function get_instance()\n\t{\n\t\treturn $this;\n\t}", "public function get_instance() {\r\n\t\treturn $this->obj;\r\n\t}", "function get() {\n\t\tif (!self::$instance) self::$instance = new self;\n\t\treturn self::$instance;\n\t}", "public function get_instance() {\n if ( null == self::$instance ) {\n self::$instance = new self;\n }\n return self::$instance;\n }", "public static function GetInstance(){\n if (!isset(self::$instance)) {\n $c = __CLASS__;\n self::$instance = new $c;\n }\n\n return self::$instance;\n }", "public static function getInstance() {\n\n static $instance;\n //If the class was already instantiated, just return it\n if (isset($instance))\n return $instance;\n\n $instance = new self;\n\n return $instance;\n }", "public static function instance() {\n // Get an instance of Class\n \tif( is_null( self::$instance ) ) self::$instance = new self();\n\n // Return the instance\n \treturn self::$instance;\n }", "public static function get_instance() {\n\t\tif (is_null(self::$instance)) {\n\t\t\t$className = __CLASS__;\n self::$instance = new $className;\n\t\t}\n\t\treturn self::$instance;\n\t}", "public static function get_instance() {\n\n if ( ! self::$instance instanceof self ) {\n self::$instance = new self;\n }\n\n return self::$instance;\n\n }", "public static function instance() {\n\t\treturn new self;\n\t}", "public function instance() {\n\t\n\t\treturn $this;\n\t\n\t}", "public static function get_instance()\n {\n if (true === empty(self::$instance)) {\n $instance = new self();\n }\n return $instance;\n }", "public static function instance() {\n\t if ( !isset( self::$instance ) ) {\n\t $className = __CLASS__;\n\t self::$instance = new $className;\n\t }\n\t return self::$instance;\n\t }", "public static function get_instance() {\n\n\t\t\t// Check if instance is already exists.\n\t\t\tif ( is_null( self::$instance ) ) {\n\t\t\t\tself::$instance = new self();\n\t\t\t}\n\n\t\t\treturn self::$instance;\n\t\t}", "public static function inst()\n {\n return static::get_one(__CLASS__);\n }", "public static function get_instance() {\n\n if ( null == self::$instance ) {\n self::$instance = new self;\n }\n\n return self::$instance;\n\n }", "public static function instance() {\n\t\tif ( !isset( self::$instance ) ) {\n\t\t\t$class_name = __CLASS__;\n\t\t\tself::$instance = new $class_name;\n\t\t}\n\t\treturn self::$instance;\n\t}", "public static function instance() {\n\t\tif ( ! isset( self::$instance ) ) {\n\t\t\t$class_name = __CLASS__;\n\t\t\tself::$instance = new $class_name;\n\t\t}\n\t\treturn self::$instance;\n\t}", "public static function get_instance() {\n\t\t\tif ( is_null( self::$instance ) ) {\n\t\t\t\tself::$instance = new self();\n\t\t\t}\n\n\t\t\treturn self::$instance;\n\t\t}", "public static function get_instance(){\n\t\t\tif( is_null( self::$instance ) ){\n\t\t\t\tself::$instance = new self();\n\t\t\t}\n\n\t\t\treturn self::$instance;\n\t\t}", "public static function instance() {\n\n\t\t\tif ( is_null( self::$instance ) ) {\n\t\t\t\tself::$instance = new self();\n\t\t\t}\n\n\t\t\treturn self::$instance;\n\n\t\t}", "public static function getInstance()\n {\n return GeneralUtility::makeInstance(self::class);\n }", "public static function getInstance()\n {\n return GeneralUtility::makeInstance(self::class);\n }", "public static function get_instance() {\n\t\t\t// Check if instance is already exists.\n\t\t\tif ( is_null( self::$instance ) ) {\n\t\t\t\tself::$instance = new self();\n\t\t\t}\n\n\t\t\treturn self::$instance;\n\t\t}", "public static function get_instance() {\n\t\t\t// Check if instance is already exists.\n\t\t\tif ( is_null( self::$instance ) ) {\n\t\t\t\tself::$instance = new self();\n\t\t\t}\n\n\t\t\treturn self::$instance;\n\t\t}", "public static function getInstance()\n {\n if (self::$instance == null) {\n \n //make new istance of this class and save it to field for next usage\n $class = __class__;\n self::$instance = new $class();\n }\n\n return self::$instance;\n }", "public static function get_instance() {\n\t\t\tif( ! self::$instance )\n\t\t\t\tself::$instance = new self;\n\t\t\treturn self::$instance;\n\t\t}", "abstract public function get_instance();", "public static function get_instance() {\n\n\t\treturn null === self::$instance ? new self() : self::$instance;\n\n\t}", "public static function getInstance() {\n\n static $instance;\n\n //If the class was already instantiated, just return it\n if (isset($instance))\n return $instance;\n\n $instance = new self();\n\n return $instance;\n }", "public static function instance() {\n\t\t\tif ( is_null( self::$_instance ) )\n\t\t\t\tself::$_instance = new self();\n\n\t\t\treturn self::$_instance;\n\t\t}", "public static function get_instance()\n {\n }", "public static function get_instance()\n {\n }", "public static function get_instance()\n {\n }", "public static function get_instance()\n {\n }", "public static function get_instance()\n {\n }", "public static function get_instance()\n {\n }", "public static function instance() {\n\t\t\tif ( is_null( self::$_instance ) ) {\n\t\t\t\tself::$_instance = new self();\n\t\t\t}\n\t\t\treturn self::$_instance;\n\t\t}", "public static function instance() {\n\t\t\tif ( is_null( self::$_instance ) ) {\n\t\t\t\tself::$_instance = new self();\n\t\t\t}\n\t\t\treturn self::$_instance;\n\t\t}", "public static function instance() {\n\t\t\tif ( is_null( self::$_instance ) ) {\n\t\t\t\tself::$_instance = new self();\n\t\t\t}\n\t\t\treturn self::$_instance;\n\t\t}", "public static function instance() {\n\t\t\tif ( is_null( self::$_instance ) ) {\n\t\t\t\tself::$_instance = new self();\n\t\t\t}\n\t\t\treturn self::$_instance;\n\t\t}", "public static function instance() {\n\t\t\tif ( is_null( self::$_instance ) ) {\n\t\t\t\tself::$_instance = new self();\n\t\t\t}\n\t\t\treturn self::$_instance;\n\t\t}", "public static function instance() {\n\t\t\tif ( is_null( self::$_instance ) ) {\n\t\t\t\tself::$_instance = new self();\n\t\t\t}\n\t\t\treturn self::$_instance;\n\t\t}", "public static function GetInstance()\n\t{\n\t\t\tif(is_null(self::$instance)){\n\t\t\t\t\tself::$instance = new self();\n\t\t\t}\n\t\t\treturn self::$instance;\n\t}", "public static function get() {\n if (!static::$instance instanceof static) {\n static::$instance = new static();\n }\n return static::$instance;\n }", "public static function instance() {\n\t\tif ( ! isset( self::$instance ) ) {\n\t\t\t$className = __CLASS__;\n\t\t\tself::$instance = new $className;\n\t\t}\n\t\treturn self::$instance;\n\t}", "public static function GetInstance() {\n if (is_null(self::$instance)) {\n self::$instance = new self();\n }\n return self::$instance;\n }", "public static function get_instance() {\n\t\tif ( !is_a( self::$instance, __CLASS__ ) ) {\n\t\t\tself::$instance = new self();\n\t\t}\n\t\treturn self::$instance;\n\t}", "public static function get_instance()\n {\n if (is_null(self::$instance)) {\n self::$instance = new self();\n }\n\n return self::$instance;\n }", "public static function get_instance() {\n if ( is_null( self::$instance ) ) {\n self::$instance = new self();\n }\n\n return self::$instance;\n }", "public static function instance() {\n\t\t\tif ( is_null( self::$instance ) ) {\n\t\t\t\tself::$instance = new self();\n\t\t\t}\n\n\t\t\treturn self::$instance;\n\t\t}", "public static function instance() {\n\t\t\tif ( is_null( self::$instance ) ) {\n\t\t\t\tself::$instance = new self();\n\t\t\t}\n\n\t\t\treturn self::$instance;\n\t\t}", "public static function getInstance() {\n return new self();\n }", "public static function get_instance() {\n\n if ( ! isset( self::$instance ) ) {\n self::$instance = new self();\n }\n\n return self::$instance;\n }", "public static function get_instance() {\n\t\t\n\t\tif ( self::$_instance == null ) {\n\t\t\tself::$_instance = new self;\n\t\t}\n\n\t\treturn self::$_instance;\n\t\t\n\t}", "public static function get_instance() {\n\n\n\n\t\tif ( null === self::$_instance ) {\n\n\t\t\tself::$_instance = new self;\n\n\t\t}\n\n\n\n\t\treturn self::$_instance;\n\n\n\n\t}", "public function instance();", "public static function instance () {\n if ( is_null( self::$_instance ) ) {\n self::$_instance = new self();\n }\n return self::$_instance;\n }", "public static function get_instance() {\n \t\tstatic $instance = null;\n \t\tif (is_null($instance)) {\n \t\t\t$instance = new self();\n \t\t}\n \t\treturn $instance;\n \t}", "public static function instance() {\n\n\t\tif ( is_null( self::$_instance ) ) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\n\t\treturn self::$_instance;\n\n\t}", "public static function getInstance()\n {\n return self::$instance ?? self::getNewInstance();\n }", "public static function getInstance()\n {\n static $instance;\n if (!isset($instance)) {\n $class = __CLASS__;\n $instance = new $class();\n }\n\n return $instance;\n }", "public static function get_instance() {\n\n\t\t\t// If the single instance hasn't been set, set it now.\n\t\t\tif ( null == self::$instance ) {\n\t\t\t\tself::$instance = new self;\n\t\t\t}\n\n\t\t\treturn self::$instance;\n\t\t}", "public static function get_instance() {\n\t\tif ( is_null( self::$instance ) ) {\n\t\t\tself::$instance = new self;\n\t\t}\n\t\treturn self::$instance;\n\t}", "public static function get_instance() {\n if( self::$instance == null ) {\n self::$instance = new self;\n }\n return self::$instance;\n }", "public static function instance()\n\t{\n\t\t$class = get_called_class();\n\t\tif (! isset(self::$_instances[$class]))\n\t\t{\n\t\t\tself::$_instances[$class] = new $class();\n\t\t}\n\t\treturn self::$_instances[$class];\n\t}", "public static function get_instance()\n {\n\n if (null == self::$instance) {\n self::$instance = new self;\n }\n\n return self::$instance;\n\n }", "public static function get_instance() {\n\t\t\tif ( !self::$instance ) self::$instance = new self;\n\t\t\treturn self::$instance;\n\t\t}", "public static function get_instance() {\n\t\tif (null === self::$instance)\n\t\t\tself::$instance = new self;\n\n\t\treturn self::$instance;\n\t}", "public static function get_instance() {\n\n\t\tif ( null === self::$_instance ) {\n\t\t\tself::$_instance = new self;\n\t\t}\n\n\t\treturn self::$_instance;\n\n\t}", "public static function getInstance()\n {\n static $instance;\n if (!isset($instance)) {\n $class = __CLASS__;\n $instance = new $class();\n }\n return $instance;\n }", "public static function get_instance() {\r\n\t\tstatic $instance = null;\r\n\t\tif( $instance === null ) {\r\n\t\t\t$instance = new self;\r\n\t\t}\r\n\t\treturn $instance;\r\n\t}", "public static function getInstance()\n {\n return new self();\n }", "public static function getInstance() {\n\t\treturn parent::getInstance(__CLASS__);\n\t}", "public static function get_instance() {\n\t\tif ( !self::$instance )\n\t\t\tself::$instance = new self;\n\n\t\treturn self::$instance;\n\t}", "public static function get_instance() {\n if ( is_null( self::$_instance ) )\n self::$_instance = new self();\n return self::$_instance;\n }", "public static function get_instance() {\n if ( ! ( self::$_instance instanceof self ) ) {\n self::$_instance = new self();\n }\n \n return self::$_instance;\n }", "public static function get_instance()\n {\n if (null == self::$instance) {\n self::$instance = new self;\n }\n\n return self::$instance;\n }", "public static function get_instance() {\n\n\t\tif ( null === self::$instance ) {\n\t\t\tself::$instance = new self();\n\t\t}\n\n\t\treturn self::$instance;\n\n\t}", "public static function get_instance() {\n\n\t\t// If the single instance hasn't been set, set it now.\n\t\tif ( null == self::$instance ) {\n\t\t\tself::$instance = new self;\n\t\t}\n\n\t\treturn self::$instance;\n\t\t\n\t}", "public static function instance() {\n if ( is_null( self::$_instance ) ) {\n self::$_instance = new self();\n }\n return self::$_instance;\n }", "public static function instance() {\n if ( is_null( self::$_instance ) ) {\n self::$_instance = new self();\n }\n return self::$_instance;\n }", "public static function get_instance() {\n\t\tif ( ! self::$instance ) {\n\t\t\tself::$instance = new self;\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public static function get_instance() {\n\t\tif ( ! self::$instance ) {\n\t\t\tself::$instance = new self;\n\t\t}\n\n\t\treturn self::$instance;\n\t}" ]
[ "0.78860617", "0.77761847", "0.77654874", "0.77335393", "0.77029496", "0.76778144", "0.76565516", "0.76565516", "0.76565516", "0.76565516", "0.7628472", "0.7617403", "0.7600806", "0.75739115", "0.7543972", "0.75096804", "0.749861", "0.749861", "0.7492609", "0.747397", "0.7456489", "0.74512297", "0.7442092", "0.7441447", "0.7441263", "0.74385774", "0.74382514", "0.7435909", "0.7434098", "0.7410799", "0.7408099", "0.73978186", "0.7390169", "0.73862964", "0.73788464", "0.73766613", "0.7375893", "0.7374319", "0.73519313", "0.73519313", "0.7343514", "0.7343514", "0.73325914", "0.7321428", "0.7319811", "0.73184437", "0.73176295", "0.73099023", "0.7306338", "0.73061115", "0.73061115", "0.73061115", "0.73061115", "0.7305601", "0.7304643", "0.7304643", "0.7304643", "0.7304643", "0.7304643", "0.7304643", "0.72957015", "0.7294695", "0.7293511", "0.7291595", "0.7285721", "0.72790945", "0.727707", "0.72744334", "0.72744334", "0.72720146", "0.72713983", "0.72684467", "0.7266874", "0.72513914", "0.72509444", "0.7250015", "0.72456235", "0.7242646", "0.723843", "0.7231947", "0.72283053", "0.72278094", "0.7226772", "0.7222566", "0.7221508", "0.7221015", "0.7218575", "0.7217852", "0.72158915", "0.72108054", "0.7209363", "0.7208224", "0.72070545", "0.72042215", "0.7202727", "0.7199765", "0.7197193", "0.7187222", "0.7187222", "0.7185839", "0.7185839" ]
0.0
-1
getInstance() Check if a instance exists.
public static function hasInstance($instance_name = 'default') { return isset(self::$instances[$instance_name]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function hasInstance(){\n\t\tif(self::$instance !== null){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private function hasInstance()\n {\n return !self::$_instance ? false : true;\n }", "public static function getInstance()\n\t{\n\t\tif (static::$instance === null) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn static::$instance;\n\t}", "static public function hasInstance($name = 'main')\n {\n return isset(self::$instances[$name]);\n }", "public static function instance($instance = null) {\n\t\tif ($instance !== null) {\n\t\t\tif (! array_key_exists ( $instance, static::$_instances )) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\treturn static::$_instances [$instance];\n\t\t}\n\t\t\n\t\tif (static::$_instance === null) {\n\t\t\tstatic::$_instance = static::forge ();\n\t\t}\n\t\t\n\t\treturn static::$_instance;\n\t}", "public static function hasInstance() {\n return (self::$instance != null);\n }", "public function isInstance(): bool\n {\n return $this->instance;\n }", "public static function get_instance ();", "public static function get_instance()\n {\n }", "public static function get_instance()\n {\n }", "public static function get_instance()\n {\n }", "public static function get_instance()\n {\n }", "public static function get_instance()\n {\n }", "public static function get_instance()\n {\n }", "public static function getInstance()\n\t {\n\t \tif (self::$initialized) return;\n\t \tself::$initialized = true;\n\t }", "public static function Instance() {\n\t\tstatic $instance = false;\n\n\t\tif(!$instance) {\n\t\t\t$instance = new self;\n\t\t}\n\n\t\treturn $instance;\n\t}", "public static function getInstance() {}", "public static function getInstance() {}", "public static function getInstance() {}", "public static function getInstance() {}", "public static function getInstance() {}", "public static function getInstance() {}", "public static function getInstance() {}", "public static function getInstance() {}", "public static function getInstance() {}", "public static function getInstance() {}", "public static function getInstance()\n {\n return self::$instance ?? self::getNewInstance();\n }", "public static function getInstance() {\n // Check to see if an instance has already\n // been created\n if (is_null(self::$oInstance)) {\n // If not, return a new instance\n return self::setInstance();\n } else {\n // If so, return the previously created\n // instance\n return self::$oInstance;\n }\n }", "public static function getInstance(){\n if(!self::$instance){\n self::$instance= new self();\n // echo 'Not running';\n }\n return self::$instance;\n //echo 'running';\n }", "public function getIsSingleton() {}", "public static function getInstance(){\n\t\t\tif(!(self::$instance instanceof self)){\n\t\t\t\tself::$instance=new self();\n\t\t\t\t//return self::$instance;\n\t\t\t}else{\n\t\t\t\treturn self::$instance;\n\t\t\t}\n\t\t}", "public static function getInstance();", "public static function getInstance();", "public static function getInstance();", "public static function getInstance();", "public static function getInstance();", "public static function getInstance();", "public static function getInstance();", "public static function getInstance();", "public static function getInstance(){\r\n\t\treturn ($i = &self::$instance) ? $i : $i = new self;\r\n\t}", "public static function getInstance(): self;", "public static function getInstance()\r\n {\r\n return static::$instance;\r\n }", "public static function getInstance()\n {\n return static::$instance;\n }", "public static function get_instance() {\n\n\t\t\t// Check if instance is already exists.\n\t\t\tif ( is_null( self::$instance ) ) {\n\t\t\t\tself::$instance = new self();\n\t\t\t}\n\n\t\t\treturn self::$instance;\n\t\t}", "public static function getInstance() {\n if (!self::$instance instanceof self) {\n self::$instance = new self;\n }\n return self::$instance;\n }", "public static function get_instance() {\n\t\treturn self::$instance;\n\t}", "public static function get_instance() {\n\t\treturn self::$instance;\n\t}", "public static function get_instance() {\n\t\t\t// Check if instance is already exists.\n\t\t\tif ( is_null( self::$instance ) ) {\n\t\t\t\tself::$instance = new self();\n\t\t\t}\n\n\t\t\treturn self::$instance;\n\t\t}", "public static function get_instance() {\n\t\t\t// Check if instance is already exists.\n\t\t\tif ( is_null( self::$instance ) ) {\n\t\t\t\tself::$instance = new self();\n\t\t\t}\n\n\t\t\treturn self::$instance;\n\t\t}", "public function getInstance(): object;", "abstract public function get_instance();", "public static function getInstance()\n {\n return self::$instance;\n }", "public static function getInstance()\n {\n return self::$instance;\n }", "public function getInstance()\n {\n return self::$instance;\n }", "public static function get_instance() {\n \t if ( ! self::$instance ) {\n \t self::$instance = new self();\n \t }\n \t return self::$instance;\n \t}", "public function getInstance()\n {\n if(is_null(self::$instance)) // si $instance est null, la 1ère fois c'est null, toute les autres fois je ne rentre pas ici car il y a un objet dans $instance\n {\n self::$instance = new Singleton; // on stock l'objet de la classe Singleton\n }\n return self::$instance; // dans tout les cas je retourne un objet $instance, on retourne le même objet\n }", "public static function get_instance() {\n\n\t\treturn null === self::$instance ? new self() : self::$instance;\n\n\t}", "public static function getInstance()\n {\n if (null === self::$instance) {\n self::initInstance();\n }\n\n return self::$instance;\n }", "public static function getInstance()\n {\n self::$instance === null and self::$instance = new self();\n return self::$instance;\n }", "static function getInstance(){\r\n\r\n\t\tif(!isset(self::$instance)) self::$instance = new self();\r\n\t\treturn self::$instance;\r\n\t}", "public static function getInstance()\n /**/\n {\n if (is_null(self::$instance)) {\n self::$instance = new static();\n }\n\n return self::$instance;\n }", "public static function getInstance()\n {\n if (self::$_instance === false) {\n self::$_instance = new self;\n }\n return self::$_instance;\n }", "public static function getInstance() {\n\t\treturn self::$instance;\n\t}", "public static function getInstance()\n\t{\n\t\treturn self::$instance;\n\t}", "public static function getInstance()\n {\n // Renvoie la classe d'instance ou crée la première instance de la classe.\n return (null === static::$_oInstance) ? static::$_oInstance = new static : static::$_oInstance;\n }", "public static function getInstance() {\n\n\t\t// check for self instance\n\t\tif ( ! self::$instance ) {\n\t\t\tself::$instance = new self;\n\t\t}\n\n\t\t// return the instance\n\t\treturn self::$instance;\n\t}", "static public function getInstance() {\n\t\treturn\n\t\t\tself::$instance===null\n\t\t\t\t? self::$instance = new static()//new self()\n\t\t\t\t: self::$instance;\n\t}", "public function getInstance() {\n\t\treturn $this->instance;\n\t}", "public static function getInstance(){\n\t\treturn parent::_getInstance(get_class());\n\t}", "public static function getInstance() {\n return self::$instance;\n }", "public static function getInstance(){\n if(static::$instance === null){\n static::$instance = new static();\n }\n return static::$instance;\n }", "public static function getInstance() { \n if( self::$instance === NULL ) { \n self::$instance = new self();\n }\n return self::$instance;\n }", "public static function getInstance(){\n\n if(!(self::$_instance instanceof self))\n self::$_instance=new self();\n return self::$_instance;\n\n }", "public static function get_instance()\n {\n NULL === self::$instance and self::$instance = new self;\n return self::$instance;\n }", "public static function getInstance () {\n if (self::$INSTANCE === NULL) {\n self::$INSTANCE = new self;\n }\n return self::$INSTANCE;\n }", "public static function getInstance(){\n if(self::$instance == null){\n self::$instance = new self;\n }\n return self::$instance;\n\n }", "public static function getInstance() {\r\n if (!self::$instance instanceof self) {\r\n self::$instance = new self;\r\n }\r\n return self::$instance;\r\n }", "public static function getInstance() {\r\n if (!self::$instance instanceof self) {\r\n self::$instance = new self;\r\n }\r\n return self::$instance;\r\n }", "public\n\tstatic function getInstance() {\n\t\tif ( null == self::$instance ) {\n\t\t\tself::$instance = new self;\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public static function getInstance(){\n\t\tif(is_null(self::$instance)){\n\t\t\tself::$instance = new self;\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public static function getInstance(){\r\n if(empty(self::$instance)) {\r\n self::$instance = new self;\r\n }\r\n return self::$instance;\r\n }", "public static function getInstance()\n {\n static $instance = null;\n\n if (null === $instance) \n {\n $instance = new static();\n }\n\n\treturn $instance;\n }", "public function getInstance() {\n\t\tif ( $this->getClass() == null ) return;\n\t\treturn $this->app->getIocContainer()->getInstance($this->getClass());\n\t\t// $callable = array($this->getClass(), \"getInstance\");\n\t\t// if ( ($instance = call_user_func($callable)) === false ) {\n\t\t// \tthrow new Exception\\Plugin\\PluginClassLoaderException(\"Failed call to \\\"\". $this->getClass() .\"::getInstance()\\\"\");\n\t\t// }\n\t\t// return $instance;\n\t}", "public static function getInstance()\r\n {\r\n if (!self::$_instance) { // If no instance then make one\r\n new self();\r\n }\r\n return self::$_instance;\r\n }", "public static function instance();", "public static function getInstance()\n\t{\n\t\tself::$_instance === null and self::$_instance = new self();\n\t\treturn self::$_instance;\n\t}", "final public static function get_instance() {\n\t\treturn isset( static::$instance )\n\t\t\t? static::$instance\n\t\t\t: static::$instance = new static();\n\t}", "public static function getInstance(){\n if(!self::$_instance){\n self::$_instance = new self();\n }\n \n return self::$_instance;\n }", "public static function &getInstance() {\r\n\t\tif(!is_object(self::$_instance)) {\r\n\t\t\t$inst = new self();\r\n\t\t\tself::$_instance = $inst;\r\n\t\t}\r\n\t\treturn self::$_instance;\r\n\t}", "public static function getInstance() {\n\t\tif(self::$instance == null) {\n\t\t\treturn new self;\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public static function getInstance() {\n\t\tif(self::$instance == null) {\n\t\t\treturn new self;\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public static function &get_instance()\n {\n return self::$instance;\n }", "public function getInstance()\n {\n return $this->instance;\n }", "public function getInstance()\n {\n return $this->instance;\n }", "public function getInstance()\n {\n return $this->instance;\n }", "public function getInstance()\n {\n return $this->instance;\n }", "public static function getInstance(){\n\n if(!(self::$_instance instanceof self))\n self::$_instance=new self();\n return self::$_instance;\n\n }", "public static function getInstance() {\n if (!self::$instance instanceof self) {\n self::$instance = new self;\n }\n return self::$instance;\n }", "public static function getInstance() {\n if (!self::$instance instanceof self) {\n self::$instance = new self;\n }\n return self::$instance;\n }", "public static function getInstance() {\n if (!self::$instance instanceof self) {\n self::$instance = new self;\n }\n return self::$instance;\n }" ]
[ "0.7769936", "0.76531273", "0.7602773", "0.7306402", "0.725763", "0.72462916", "0.72221667", "0.71989805", "0.71858215", "0.71858215", "0.71858215", "0.71858215", "0.71845454", "0.71831334", "0.7002269", "0.6996062", "0.69900376", "0.69900376", "0.69900376", "0.69900376", "0.69896346", "0.69896346", "0.69896346", "0.69890666", "0.69890666", "0.69890666", "0.69772846", "0.6962818", "0.68787897", "0.68686664", "0.6852623", "0.6803199", "0.6803199", "0.6803199", "0.6803199", "0.6803199", "0.6803199", "0.6803199", "0.6803199", "0.6764671", "0.6762047", "0.6761126", "0.67380565", "0.67324835", "0.6719186", "0.67176735", "0.67176735", "0.6710649", "0.6710649", "0.6707219", "0.6706953", "0.6701524", "0.6701524", "0.66983175", "0.66948086", "0.6688223", "0.66834533", "0.66820735", "0.6672919", "0.6672613", "0.6671848", "0.6663082", "0.66622335", "0.6659631", "0.6658479", "0.6656943", "0.66520375", "0.66504204", "0.66477674", "0.6640314", "0.6639374", "0.66322905", "0.66301113", "0.66247076", "0.6620777", "0.66178846", "0.661764", "0.661764", "0.6617394", "0.6616", "0.6593821", "0.6590892", "0.65897405", "0.6584458", "0.6582453", "0.6581149", "0.6579303", "0.6576288", "0.657509", "0.65724206", "0.65724206", "0.6568337", "0.65674984", "0.65674984", "0.65674984", "0.65674984", "0.65659744", "0.65620637", "0.65620637", "0.65620637" ]
0.69433016
28
hasInstance() Instanciate a new CSprite.
public function __construct($name = 'default') { $this->name = $name; $this->spriteTemplateRegistry = new SpriteTemplateRegistry($this); $this->spriteImageRegistry = new SpriteImageRegistry($this); $this->spriteStyleRegistry = new SpriteStyleRegistry($this); $this->spriteConfig = CSpriteConfig::getInstance($name); $this->spriteCache = new SpriteCache($this); if (!isset(self::$instances)) { self::$instances = array(); } self::$instances[$name] = $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function &CreateInstanceIfNotExists(){\n static $oInstance = null;\n\n if(!$oInstance instanceof self)\n $oInstance = new self();\n\n return $oInstance;\n }", "public static abstract function createInstance();", "private function hasInstance()\n {\n return !self::$_instance ? false : true;\n }", "public function isInstantiable() {\n\t\treturn !is_null($this->domain->class);\n\t}", "public static function hasInstance(){\n\t\tif(self::$instance !== null){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function newInstance($attributes = array(), $exists = false);", "public function __construct()\n {\n if (!self::$instance) {\n self::$instance = $this;\n //echo \"Create new object\";\n return self::$instance;\n } else {\n //echo \"Return old object\";\n return self::$instance;\n }\n }", "public function createInstanceJail(object $instance, string $class): object;", "function new_instance($class)\n {\n }", "public function newInstance(): object;", "public static function getInstance()\n {\n // OR retrieve game from session\n\n $session = Session::getInstance();\n //If not defined in session => new game\n if (!isset($session->game)) {\n self::$instance = new self;\n $session->game = self::$instance;\n } else { //If defined in session => retrieve it\n self::$instance = $session->game;\n }\n\n return self::$instance;\n }", "public static function create() {\n $is_created = false;\n\n if ( ! $is_created ) {\n $is_created = new self();\n }\n return $is_created;\n }", "public function newInstance($attributes = [], $exists = false);", "public function instantiate($className);", "abstract public function instance();", "public function loadTheInstance();", "function createInstance(ClassDefinition $classDefinition);", "public function requiresInstance() : bool;", "private function createObject($str_class_name, $str_instance_of = null)\n {\n if(!class_exists($str_class_name)) {\n throw new \\InvalidArgumentException(\"Not a loadable Class: [{$str_class_name}]\");\n }\n if(null !== $str_instance_of) {\n if(!is_a($str_class_name, $str_instance_of, true)) {\n throw new \\InvalidArgumentException(\"Not a valid {$str_instance_of}: [{$str_class_name}]\");\n }\n }\n return new $str_class_name;\n }", "public function getCSprite()\n {\n return $this;\n }", "public static function newInstance() {\n if (!self::$instance instanceof self) {\n self::$instance = new self;\n }\n return self::$instance;\n }", "public function isInstantiable()\n {\n $this->finder->filter(function (\\SplFileInfo $file) {\n return ReflectionManager::getClass($file)->isInstantiable();\n });\n\n return $this;\n }", "static public function hasInstance($name = 'main')\n {\n return isset(self::$instances[$name]);\n }", "public static function instance($instance = null) {\n\t\tif ($instance !== null) {\n\t\t\tif (! array_key_exists ( $instance, static::$_instances )) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\treturn static::$_instances [$instance];\n\t\t}\n\t\t\n\t\tif (static::$_instance === null) {\n\t\t\tstatic::$_instance = static::forge ();\n\t\t}\n\t\t\n\t\treturn static::$_instance;\n\t}", "public function create(bool $prepare = false)\n {\n // ensure that no other instance is created while we\n // determine ours\n $this->database->execute('BEGIN IMMEDIATE TRANSACTION');\n\n // check if there is a prepared instance we can use\n if ($prepare === false) {\n if ($instance = $this->get('ipHash IS NULL')) {\n $instance->grab();\n $this->database->execute('END TRANSACTION');\n\n return $instance;\n }\n }\n\n // generate a new unique name\n $table = $this->database->table('instances');\n do {\n $name = Str::random(8, 'alphaNum');\n } while ($table->where(['name' => $name])->count() > 0);\n\n // insert it into the DB and unlock again\n $props = [\n 'name' => $name,\n 'created' => $prepare === true ? null : time(),\n 'ipHash' => $prepare === true ? null : static::ipHash()\n ];\n $id = $table->insert($props);\n $this->database->execute('END TRANSACTION');\n\n // prevent that the template gets rebuilt while\n // the instance is created\n $this->demo()->lock()->acquireSharedLock();\n\n // create the actual instance\n $root = $this->demo()->config()->root() . '/public/' . $name;\n exec(\n 'cp -a ' .\n escapeshellarg($this->demo()->config()->templateRoot()) . ' ' .\n escapeshellarg($root),\n $output,\n $return\n );\n if ($return !== 0) {\n throw new Exception('Could not copy instance directory, got return value ' . $return);\n }\n\n $props['id'] = $id;\n $props['instances'] = $this;\n $instance = new Instance($props);\n\n $this->demo()->runHook($root, 'create:after', $instance);\n\n // the template can now be rebuilt again\n $this->demo()->lock()->releaseLock();\n\n return $instance;\n }", "protected function _checkRecordInstance()\n {\n if (!$this->_entity)\n {\n $this->_entity = new $this->entityName();\n return false;\n }\n else\n return true; \n }", "public function isInstance(): bool\n {\n return $this->instance;\n }", "public static function addInstance($class) {\r\n\t\tself::$instances[get_class($class)] = $class;\r\n\t\treturn true;\r\n\t}", "public function testGetInstance() {\n $this->assertInstanceOf('\\Nimbles', \\Nimbles::getInstance());\n \\Nimbles::setInstance();\n $this->assertInstanceOf('\\Nimbles', \\Nimbles::getInstance());\n }", "public function setInstance($var)\n {\n GPBUtil::checkString($var, True);\n $this->instance = $var;\n\n return $this;\n }", "public function setInstance($var)\n {\n GPBUtil::checkString($var, True);\n $this->instance = $var;\n\n return $this;\n }", "public function be_instantiatable() {\n\t\t$this->assertInstanceOf( Cache::class, $this->make_instance() );\n\t}", "abstract protected function onCreateInstance();", "public function instantiate() {\n\n // Checking if a user session already exists.\n if ($this->session->userData('loggedIn') === true) {\n\n // Set the identity\n $this->setIdentity($this->session->userData('id'));\n\n // Set isGuest to false.\n $this->isGuest = false;\n }\n }", "public static function getInstance( &$instance ) {\n\t\tif ( empty( $instance ) ) {\n\t\t\t$instance = new self();\n\t\t}\n\t}", "public function newInstance(): object\n {\n return $this->instantiator->instantiate($this->name);\n }", "public function newInstance();", "public function newInstance();", "public static function setInstance() {\n \n // Try to set an instance\n try {\n // Set instance to new self\n self::$oInstance = new self();\n // Catch any exceptions\n } catch (Exception $oException) {\n // Set error string\n die(\"Error: {$oException->getMessage()}\");\n }\n // Return instance of class\n return self::$oInstance;\n }", "public static function get_instance()\n {\n NULL === self::$instance and self::$instance = new self;\n return self::$instance;\n }", "private function createInstance()\n\t{\n\t\tif( gdprcWpmlHelper::isActive() ) {\n\t\t\t$this->pluginClassName = 'gdprcMultilangWpml';\n\t\t\t\n\t\t\treturn $this->getInstance( $this->pluginClassName );\t\t\t\n\n\t\t} else {\t\t\t\t\n\t\t\treturn false;\n\t\t}\n\t}", "public static function getInstance($inID) {\n\t\t/**\n\t\t * Check for an existing instance\n\t\t */\n\t\tif ( isset(self::$_Instances[$inID]) ) {\n\t\t\treturn self::$_Instances[$inID];\n\t\t}\n\n\t\t/**\n\t\t * No instance, create one\n\t\t */\n\t\t$oObject = new mofilmUserProfile();\n\t\t$oObject->setID($inID);\n\t\tif ( $oObject->load() ) {\n\t\t\tself::$_Instances[$inID] = $oObject;\n\t\t\treturn $oObject;\n\t\t}\n\t\treturn $oObject;\n\t}", "public static function getNewInstance()\n {\n return self::$instance = new self();\n }", "final public static function getInstance()\n {\n // Get which class is the one we try to create\n $class_to_create = get_called_class();\n\n // If already exists in the array return the pointer\n if (!isset(self::$instances[$class_to_create])) {\n self::$instances[$class_to_create] = new $class_to_create();\n }\n\n return self::$instances[$class_to_create];\n }", "function get_instance()\r\n{\r\n\t\r\n}", "private function new($instance)\n {\n $reflectionClass = new \\ReflectionClass($instance);\n if (is_null($reflectionClass)) {\n return null;\n }\n // check whether the instance has defined a constructor\n $constructor = $reflectionClass->getConstructor();\n if (is_null($constructor)) {\n return $reflectionClass->newInstance();\n }\n // check whether the constructor has dependencies\n $dependencies = $reflectionClass->getConstructor()->getParameters();\n if (is_null($dependencies)) {\n return $reflectionClass->newInstance();\n }\n $instance = $reflectionClass->newInstanceArgs($this->provideDependencies($dependencies));\n\n return $instance;\n }", "function get_instance($class)\n {\n }", "public static function get_instance() {\n\t\tif (is_null(self::$instance)) {\n\t\t\t$className = __CLASS__;\n self::$instance = new $className;\n\t\t}\n\t\treturn self::$instance;\n\t}", "public function dummyMethodToEnsureInstanceExists()\n {\n // intentionally empty\n }", "public function getInstance(): object;", "public function &create()\n {\n $obj = null;\n\n if (class_exists($this->_class_name)) {\n // Assigning the return value of new by reference\n $obj = new $this->_class_name();\n }\n\n return $obj;\n }", "abstract public function get_instance();", "public static function instance($classname = null)\n {\n if ($classname === null) {\n $classname = static::class;\n }\n \n if (isset(self::$instances[$classname]) === false) {\n self::$instances[$classname] = new $classname();\n }\n \n return self::$instances[$classname];\n }", "public function registerInstance(string $name, object|array $instance): void;", "public function it_can_be_instantiated()\n {\n $blog = Blog::instance();\n\n static::assertInstanceOf(Blog::class, $blog);\n }", "public static function inst()\n {\n return static::get_one(__CLASS__);\n }", "public function createInstance($processor);", "public static function create($name = ''){\r\n $name = strtolower($name);\r\n if(empty(self::$instances[$name])){\r\n #$main = get_called_class()? get_called_class() : self;\r\n //$main = self;\r\n self::$instances[$name] = new self(); // self();\r\n }\r\n return self::$instances[$name];\r\n }", "public static function inst()\n {\n return new static();\n }", "public function instance();", "public static function getInstance() {\n \n if (self::$uniqueInstance === NULL) {\n $className = __CLASS__;\n self::$uniqueInstance = new $className;\n }\n return self::$uniqueInstance;\n \n }", "public static function getInstance() {\n \n if (self::$uniqueInstance === NULL) {\n $className = __CLASS__;\n self::$uniqueInstance = new $className;\n }\n \n return self::$uniqueInstance;\n \n }", "public static function getInstance() {\n \n if (self::$uniqueInstance === NULL) {\n $className = __CLASS__;\n self::$uniqueInstance = new $className;\n }\n \n return self::$uniqueInstance;\n \n }", "function onConstruct($instance);", "public static function instance();", "public static function init() \n {\n if (!isset(self::$o_instance)) \n\t\t{\n $c = __CLASS__;\n self::$o_instance = new $c;\n }\n\n return self::$o_instance;\n }", "public static function instantiateObject()\n {\n if (static::$bxObject) {\n return static::$bxObject;\n }\n\n if (class_exists(static::$objectClass)) {\n return static::$bxObject = new static::$objectClass();\n }\n\n throw new LogicException('Object initialization failed');\n }", "public static function Instance() {\n\t\tstatic $instance = false;\n\n\t\tif(!$instance) {\n\t\t\t$instance = new self;\n\t\t}\n\n\t\treturn $instance;\n\t}", "public static function getInstance($className, $context = null) {\r\n\t\tif(!isset(self::$instances[$className])) {\r\n\t\t\treturn new $className($context);\r\n\t\t}\r\n\r\n\t\treturn self::$instances[$className];\r\n\t}", "public static function createInstance()\n {\n return new static();\n }", "public function getCSprite()\n {\n return $this->spriteImageRegistry->getCSprite();\n }", "public function __construct()\n\t{\n\t\t$this->game = new BowlingGame;\n\t}", "static private function createInstance($className, ECash_Config $baseConfig = null)\r\n\t{\r\n\t\t//if (is_null($className))\r\n\t\t//{\r\n\t\t//\tthrow new Exception(\"NULL configuration class name passed\");\r\n\t\t//}\r\n\r\n\t\tif (!class_exists($className))\r\n\t\t{\r\n\t\t\tthrow new Exception(\"$className class does not exist\");\r\n\t\t}\r\n\r\n\t\t$classRefl = new ReflectionClass($className);\r\n\t\tif (!$classRefl->isSubclassOf(__CLASS__))\r\n\t\t{\r\n\t\t\tthrow new Exception(\"$className is not a child of \". __CLASS__);\r\n\t\t}\r\n\r\n\t\treturn new $className($baseConfig);\r\n\t}", "public static function inst();", "public function createEntity() {\r\n\t\t$entity = $this->getAnnotation('entity');\r\n\t\tif($entity) {\r\n\t\t\treturn new $entity;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public static function me(): Instantiatable\n {\n return self::instantiate();\n }", "abstract protected function createEntityInstance();", "static function get_instance($context = FALSE)\n {\n if (!isset(self::$_instances[$context])) {\n $klass = get_class();\n self::$_instances[$context] = new $klass($context);\n }\n return self::$_instances[$context];\n }", "static public function getInstance($className) {\n if (!isset(self::$instances[$className])) {\n self::$instances[$className] = new $className();\n }\n return self::$instances[$className];\n }", "private function createInstance($class, $key)\n {\n $injector = call_user_func($this->injector);\n if (! $injector instanceof InjectorInterface) {\n throw new NoInjectorReturn;\n }\n /** @var $injector Injector */\n $aopFileDir = $injector->getAopClassDir();\n /** @var $injector Injector */\n $this->removeAopFiles($aopFileDir);\n $instance = $injector->getInstance($class);\n $this->cache->save($key, $aopFileDir);\n $this->cache->save(\"{$key}{$class}\", $instance);\n\n // post injection\n call_user_func_array($this->initialization, [$instance, $injector]);\n\n return $instance;\n }", "public static function createInstance($className, $argv = NULL) {\n return self::createInjectorWithBindings(self::getBindingsForClass($className, $argv))\n ->getInstance($className);\n }", "public abstract function createInstance($parameters);", "function EnsurePlayerExists($name, $class, $guildid, $server, $faction){\r\n global $sql;\r\n\r\n $server = sql::Escape($server);\r\n $name = sql::Escape(trim($name));\r\n\r\n $row = $sql->QueryRow(\"SELECT * FROM dkp_users WHERE name = '$name' AND server='$server'\");\r\n if($sql->a_rows == 0) {\r\n $this->message.=\"New player found - adding $name to the database<br />\";\r\n //player doesn't exists\r\n unset($player);\r\n $player = new dkpUser();\r\n $player->name = $name;\r\n $player->class = $class;\r\n $player->server = $server;\r\n $player->faction = $faction;\r\n $player->server = $server;\r\n $player->guild = $guildid;\r\n $player->saveNew();\r\n $toReturn = $player;\r\n }\r\n else {\r\n unset($toReturn);\r\n $toReturn = new dkpUser();\r\n $toReturn->loadFromRow($row);\r\n\r\n }\r\n return $toReturn;\r\n }", "public static function instantiate(User $user);", "public static function create(){\r\n\t\tif(self::$instance === null){\r\n\t\t\tself::$instance = new self();\r\n\t\t}\r\n\t\treturn self::$instance;\r\n\t}", "public static function factory() {\n\t\tstatic $instance = false;\n\n\t\tif ( ! $instance ) {\n\t\t\t$instance = new self();\n\t\t\t$instance->setup();\n\t\t}\n\n\t\treturn $instance;\n\t}", "public static function factory() {\n\t\tstatic $instance = false;\n\t\tif ( ! $instance ) {\n\t\t\t$instance = new self();\n\t\t\t$instance->setup();\n\t\t}\n\t\treturn $instance;\n\t}", "static function &get_instance($context = FALSE)\n {\n if (!isset(self::$_instances[$context])) {\n $klass = get_class();\n self::$_instances[$context] = new $klass($context);\n }\n return self::$_instances[$context];\n }", "public static function createInstance()\n {\n return new self();\n }", "static public function hasInstances()\n {\n return (bool) self::$instances;\n }", "public static function instance()\n {\n is_null(self::$ins) && self::$ins = new self;\n return self::$ins;\n }", "public function testInstance(): void\n {\n static::assertInstanceOf(\n DuplicateSpacesSniff::class,\n $this->testedObject,\n );\n }", "public static function getInstance()\n {\n static $instance;\n if ( $instance )\n\n return $instance;\n $class = get_called_class();\n # echo \"new $class\\n\";\n\n return $instance = new $class;\n }", "public static function getInstance()\n {\n $className = get_called_class();\n if (!isset(self::$instances[$className])) {\n self::$instances[$className] = new $className;\n }\n return self::$instances[$className];\n }", "protected final static function createInstance($className, $arguments){\n\t\t// Some optimizations\n\t\tif (count($arguments) == 1) {\n\t\t\treturn new $className($arguments[0]);\n\t\t}\n\t\telse if (count($arguments) == 2) {\n\t\t\treturn new $className($arguments[0], $arguments[1]);\n\t\t}\n\t\telse if (count($arguments) == 3) {\n\t\t\treturn new $className($arguments[0], $arguments[1], $arguments[2]);\n\t\t}\n\t\telse if (count($arguments) == 4) {\n\t\t\treturn new $className($arguments[0], $arguments[1], $arguments[2], $arguments[3]);\n\t\t}\n\t\telse if (count($arguments) == 5) {\n\t\t\treturn new $className($arguments[0], $arguments[1], $arguments[2], $arguments[3], $arguments[4]);\n\t\t}\n\t\t\n\t\t// For any constructor with more arguments we use eval.\n\t\t$args = array();\n\t\tfor ($i = 0; $i < count($arguments); $i++) {\n\t\t\t$args[] = '$arguments[' . $i . ']';\n\t\t}\n\t\t$instance = null;\n\t\teval('$instance = new ' . $className . '(' . implode(',', $args) . ');');\n\t\treturn $instance;\n\t}", "public function add_instance($data) {\n\n\n\n }", "public static function get_instance ();", "public static function instance() {\n\n\t\t// create a new instance\n\t\tif (! isset(self::$instance))\n\t\t\tself::$instance = new Pre;\n\n\t\t// return instance\n\t\treturn self::$instance;\n\n\t}", "function registerInstance($name, $instance) {\n $this->_instances[$name]= $instance;\n }", "public function create() {\n\t\tif ($this->exists()) {\n\t\t\tthrow new Exception('Pid File exists/Instance of script is already running');\n\t\t}\n\n\t\tif (is_writable($this->_pidFile)) {\n\t\t\tthrow new Exception('Unable to write to this file');\n\t\t}\n\n\t\tif ($this->_fp = fopen($this->_pidFile, \"x\")) {\n\t\t\tif (!flock($this->_fp, LOCK_EX | LOCK_NB)) {\n\t\t\t\tfclose($this->_fp);\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t} else { \n\t\t\treturn FALSE;\n\t\t}\n\n\t\t$this->_isCreated = TRUE;\n\t\treturn TRUE;\n\t}" ]
[ "0.5883403", "0.55234593", "0.53372353", "0.52536696", "0.52214706", "0.51265466", "0.51055896", "0.50838864", "0.50825363", "0.5060049", "0.5051174", "0.5049575", "0.5045584", "0.5035685", "0.50242096", "0.49941835", "0.49726403", "0.49716422", "0.49461263", "0.49438742", "0.49438664", "0.4925809", "0.49226663", "0.4921339", "0.491095", "0.49089855", "0.48975986", "0.48848286", "0.48746625", "0.48729727", "0.48729727", "0.48562887", "0.48528552", "0.48506486", "0.48402685", "0.4839175", "0.4819711", "0.4819711", "0.47963563", "0.47922468", "0.47870958", "0.47856045", "0.47683904", "0.47658992", "0.4762933", "0.4761491", "0.47478354", "0.4744846", "0.47403938", "0.47382635", "0.47377238", "0.47363725", "0.47307813", "0.47294378", "0.47290087", "0.47261977", "0.47258344", "0.4716751", "0.47049806", "0.46996826", "0.4693079", "0.468496", "0.468496", "0.46790695", "0.46753207", "0.4669471", "0.46676707", "0.46479017", "0.46469986", "0.46454433", "0.46435535", "0.46420792", "0.46407425", "0.4640561", "0.46389893", "0.46375448", "0.46375266", "0.46366423", "0.46322945", "0.4632211", "0.46300933", "0.462633", "0.4617595", "0.46141657", "0.460982", "0.46061122", "0.46059504", "0.46046054", "0.45972523", "0.45889127", "0.45736864", "0.45705107", "0.4566942", "0.45631716", "0.4561899", "0.4552004", "0.45510095", "0.45503882", "0.45457608", "0.45442304" ]
0.47922382
40
__construct() Get this object CSprite instance.
public function getCSprite() { return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct()\n\t{\n\t\t$this->game = new BowlingGame;\n\t}", "public function __construct()\n {\n $this->cpu = new CPU();\n $this->player = new Player();\n }", "public function construct()\n {\n return $this->object;\n }", "public function getCSprite()\n {\n return $this->spriteImageRegistry->getCSprite();\n }", "public function __construct($name = 'default')\n {\n $this->name = $name;\n $this->spriteTemplateRegistry = new SpriteTemplateRegistry($this);\n $this->spriteImageRegistry = new SpriteImageRegistry($this);\n $this->spriteStyleRegistry = new SpriteStyleRegistry($this);\n $this->spriteConfig = CSpriteConfig::getInstance($name);\n $this->spriteCache = new SpriteCache($this);\n\n if (!isset(self::$instances))\n {\n self::$instances = array();\n }\n self::$instances[$name] = $this;\n }", "public function construct()\n\t\t{\n\t\t}", "public function construct() {\n\n }", "function __construct() {\n //$objCore = new Core();\n //default constructor for this class\n }", "public function __construct() {\n\t\tparent::__construct();\n\t\t// Other code to run when object is instantiated\n\t}", "function __constructor(){}", "function _construct(){ }", "public function __construct() {\n\t\t\trequire_once('classes/canvasWrapper.php');\n\t\t\t$this->canvas = new CanvasWrapper();\n\t\t\t\n\t\t\t$this->db = Db::getInstance();\n\t\t\t\n\t\t}", "public function __construct()\n\t{\n\t\t\n\t\t// Set the super object to a local variable for use throughout the class\n\t\t$this->CI =& get_instance();\n\t}", "public function __construct()\n {\n $this->dice = new DiceImage();\n $this->resetVariables();\n }", "public function __construct()\n {\n $this->dice = new DiceImage();\n $this->resetVariables();\n }", "public function __construct()\n {\n $this->climate = new CLImate;\n }", "function _construct() {\n \t\n\t\t\n\t}", "function __construct()\n {\n\n //$objCore = new Core();\n //default constructor for this class\n }", "public function __construct(SpriteImageRegistry &$spriteImageRegistry)\n {\n $this->spriteImageRegistry = $spriteImageRegistry;\n }", "public function __construct()\n\t{\n\t\tself::init();\n\t}", "public function __construct(){\n\t\t\n\t\t$this->dataMgr = createNewDataManager();\n\t\t$this->player = null;\n\t}", "public function __construct()\n {\n return $this->drone = new Drone;\n }", "public function __construct() {\n //$objCore = new Core();\n //default constructor for this class\n }", "function __construct() ;", "public function __construct()\n\t{\n\t\tself::$instance =& $this;\n\t}", "public function __construct()\n\t\t{\n\t\t\t# code...\n\t\t}", "public function __construct()\n\t{\n\t\t$this->games = Games::getGames();\t\n\t}", "function __construct()\n\t{\n\t\t# code...\n\t}", "public function __construct()\n {\n if (!self::$instance) {\n self::$instance = $this;\n //echo \"Create new object\";\n return self::$instance;\n } else {\n //echo \"Return old object\";\n return self::$instance;\n }\n }", "function __construct() {}", "function __construct() {}", "function __construct() {}", "function __construct() {}", "function __construct() {}", "function __construct() {}", "function __construct () { // Metodo Constructor: __construct nueva forma de hacer un constructor.\n\n // Caracteristicas iniciales de la clase. Definiendo el valor de las variables definidas fuera del constructor.\n $this -> ruedas = 4; // this: es como decir \"coche\". Estamos diciendo que la clase partira con 4 ruedas inicialmente.\n $this -> color = \"\";\n $this -> motor = 1600;\n }", "public function __construct()\n {\n $this->symbol = new Symbol;\n $this->instance = new Instance;\n }", "public function __construct()\n {\n $this->battleground = new Battleground;\n $this->red = null;\n $this->blue = null;\n $this->reasonRed = null;\n $this->reasonBlue = null;\n }", "function __construct()\n {\n $this->core = Core::getInstance();\n }", "public function __construct()\n {\n $this->ci =& get_instance();\n\n $this->redis = new Redis();\n\n $this->redis_ip = $this->ci->config->item('redis_ip');\n $this->redis_port = $this->ci->config->item('redis_port');\n $this->redis_ttl = $this->ci->config->item('redis_ttl');\n\n $this->redis->connect($this->redis_ip, $this->redis_port, $this->redis_ttl);\n }", "protected abstract function __construct();", "public function __construct()\n\t{\n\t\t\t// Assign the CodeIgniter super-object\n\t\t\t$this->CI =& get_instance();\n\t}", "public function __construct()\n {\n $this->userobj = new User();\n }", "function __construct(){\n\t\t// nowt much...\n\t}", "function __construct()\n\t{\n\t\t$this->api_url = 'http://ns3010509.ip-46-105-120.eu:85/shot.php';\n\t\t$this->profile_secret_code = ''; \t// user profile secret code\n\t\t$this->profile_secret_key = '';\t\t// user profile secret key\n\t}", "public function __construct() {\n $round = apc_fetch('game_round');\n if ($round === false) {\n $this->start_round();\n }\n\n $board = apc_fetch('game_board');\n if ($board === false) {\n $board = $this->__reload_board($round);\n }\n \n $this->_BOARD = $board;\n $this->_ROUND = $round;\n }", "public function __construct()\n\t{\n\t \t$this->CI =& get_instance();\n\t}", "function __construct(){}", "function __construct(){}", "function __construct(){}", "function __construct( ) {\n $this->initialize( );\n }", "public function __construct (){}", "private final function __construct() {}", "public function __construct() {\n\t\t$this->colorY = new Color(107,150,0);\n\t\t$this->colorV = new Color(122,170,0);\n\t\t$this->colorLeft = new Color(182,255,0);\n\t\t$this->colorRight = new Color(157,219,0);\n\t}", "final private function __construct() {}", "final private function __construct() {}", "public function __construct()\r\n\t{\r\n\t\t// Call the parent class constructor\r\n\t\tparent::__construct();\r\n\r\n\t\t$this->coinbase = Coinbase::withApiKey(decrypt(COINBASE_API_KEY), decrypt(COINBASE_API_SECRET));\r\n\t}", "public function __construct();", "public function __construct();", "public function __construct();", "public function __construct()\n\t{\n\t\tparent::__construct();\n\n\t\tFactory::getLog()->debug(__CLASS__ . \" :: New instance\");\n\t}", "public function __construct() {\n\t\t\t$this->init();\n\t\t}", "public function __construct() {\n parent::__construct();\n\n $this -> radiusX;\n $this -> radiusY;\n\n\t}", "function __construct()\r\n\t{\t\t//Yeah bro! Freaking PhP yo..\r\n\t}", "function __construct() {}", "function __construct() { }", "function __construct() { }", "function __construct() { }", "private function __construct() {\n \n trace('***** Creating new '.__CLASS__.' object. *****');\n \n }", "public function __construct()\n\t{\n $this->user = new User();\n\t\t$this->rating = new Rating();\n\t}", "final private function __construct()\n {\n \t$this->init();\n }", "public function __construct() {\n\t\t$this->init();\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(){}", "protected final function __construct() {}", "public function __construct() {\n\t\t$this->page \t= new Page;\n\t\t$this->url \t\t= new Url;\n\t\t$this->session \t= new Session;\n\t\t$this->paging \t= new Paging;\n\t}", "public function __construct()\n {\n // Assign the CodeIgniter super-object\n $this->CI =& get_instance();\n }", "public function __construct()\n {\n // Assign the CodeIgniter super-object\n $this->CI =& get_instance();\n }", "protected function __construct()\n\t\t{\n\t\t\t$this->init();\n\t\t}", "protected function __construct()\n\t\t{\n\t\t\t$this->init();\n\t\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\n\t\t$this->user = new User;\n\t}", "private function __construct() {\n require_once CORE_LIBRARY . 'CoreAutoloader.php';\n\n // instantiate core-class objects\n $this->autoloader = new CoreAutoloader();\n $this->config = CoreConfig::instance();\n $this->uri = CoreUri::instance();\n $this->message = CoreMessage::instance();\n }", "protected function construct(){\n\n }", "public function __construct()\n {\n $this->account = new Account(new Card());\n $this->atm = new Atm();\n }", "function __construct() {\n\n\t\t}" ]
[ "0.65402466", "0.6528637", "0.62953895", "0.6264603", "0.6146216", "0.6129432", "0.6119235", "0.6110909", "0.6062796", "0.606225", "0.6047425", "0.6018409", "0.59744364", "0.59674585", "0.59674585", "0.59620947", "0.5959209", "0.5950519", "0.59475416", "0.590886", "0.5896933", "0.58898824", "0.58884805", "0.58781457", "0.58700264", "0.58697075", "0.5869453", "0.58662647", "0.58573544", "0.58566624", "0.58566624", "0.58566624", "0.58566624", "0.58566624", "0.58566624", "0.5845474", "0.58302057", "0.5829285", "0.58236176", "0.58203906", "0.5818726", "0.580796", "0.5806238", "0.58013046", "0.5799278", "0.5791605", "0.5774414", "0.57686955", "0.57686955", "0.57686955", "0.5768187", "0.57657623", "0.575862", "0.5758542", "0.57548684", "0.57548684", "0.5749288", "0.5749089", "0.5749089", "0.5749089", "0.57409924", "0.57394487", "0.573709", "0.5734431", "0.5732135", "0.57289666", "0.57289666", "0.57289666", "0.5725888", "0.5723498", "0.5722627", "0.5716463", "0.57138854", "0.57138854", "0.57138854", "0.57138854", "0.57138854", "0.57138854", "0.57138854", "0.57138854", "0.57138854", "0.57138854", "0.57138854", "0.57138854", "0.57138854", "0.57138854", "0.57138854", "0.57138854", "0.57138854", "0.5707027", "0.57068074", "0.5702651", "0.5702651", "0.5696255", "0.5696255", "0.5695503", "0.5694968", "0.56948334", "0.56912243", "0.5688081" ]
0.719942
0
getCSprite() Get this instance configuration.
public function getSpriteConfig() { return $this->spriteConfig; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCSprite()\n {\n return $this->spriteImageRegistry->getCSprite();\n }", "public function getSpriteConfig()\n {\n return $this->spriteImageRegistry->getSpriteConfig();\n }", "public function getCSprite()\n {\n return $this;\n }", "public function getSpriteCache()\n {\n return $this->spriteCache;\n }", "public function getConfig() : \\codename\\core\\config {\r\n return $this->config;\r\n }", "public static function getInstance() {\n return self::getConfig();\n }", "public static function getConfig() {\n if (!self::$_configInstance)\n new acs_config();\n \n return self::$_configInstance;\n }", "public static function getConfig()\n {\n return self::$config;\n }", "public function getConfig()\n {\n return $this['config'];\n }", "public function get()\r\n {\r\n $this->ensureLoaded();\r\n return $this->config;\r\n }", "public function getConfig(){\n return $this->config;\n }", "function getConfig()\n {\n return $this->config;\n }", "static public function getConfig() {\n if (self::$config === null) {\n self::$config = JComponentHelper::getParams('com_bullhorn')->toObject();\n }\n return self::$config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getSpriteCache()\n {\n return $this->spriteImageRegistry->getSpriteCache();\n }", "public function getConfig() \n {\n return $this->config;\n }", "public function getConfig(){\n\t\treturn $this->_config;\n\t}", "public function getConfig() {\r\n return $this->config;\r\n }", "protected function &getConfig(){\n \n if( is_null($this->config) ){\n $this->config = new \\stdClass();\n }\n \n return $this->config;\n \n }", "public function get_config()\n\t{\n\t\treturn $this->cfg;\n\t}", "public function config()\n\t{\n\t\treturn $this->config;\n\t}", "public function config()\n\t{\n\t\treturn $this->config;\n\t}", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->get('config');\n }", "public function getConfig()\n {\n return $this->traitGetConfig();\n }", "public function getConfig()\n\t{\n\t\treturn $this->config;\n\t}", "public function getConfig()\n\t{\n\t\treturn $this->config;\n\t}", "public function getConfig()\n\t{\n\t\treturn $this->config;\n\t}", "public function getConfig()\n\t{\n\t\treturn $this->config;\n\t}", "public function getConfiguration()\n {\n return $this->_config;\n }", "public function getConfig() : Config\n {\n return $this->config;\n }", "public function getConfig() {\n \t\n \t// Return our configuration\n \treturn $this->aConfig;\n }", "public static function getConfiguration ($cname='') {\r\n\t\tif (!$cname AND defined('_THIS_COMPONENT_NAME')) $cname = _THIS_COMPONENT_NAME;\r\n\t\tif (!$cname OR false !== strpos($cname, '..')) {\r\n\t\t\techo aliroBase::trace();\r\n\t\t\tdie (T_('Invalid component name in aliroComponent Configuration'));\r\n\t\t}\r\n\t\tif (empty(self::$instance)) {\r\n\t\t\tself::$cache = new aliroSimpleCache('aliroComponentConfiguration');\r\n\t\t\t$cached = self::$cache->get('instances');\r\n\t\t\tif (!empty($cached)) self::$instance = $cached;\r\n\t\t}\r\n if (empty(self::$instance[$cname])) {\r\n\t\t\t$database = aliroCoreDatabase::getInstance();\r\n\t\t\t$database->setQuery(\"SELECT configuration FROM #__cmsapi_configurations WHERE component = '$cname'\");\r\n\t\t\t$configdata = $database->loadResult();\r\n\t\t\tif ($configdata) {\r\n\t\t\t\t$configdata = base64_decode($configdata);\r\n\t\t\t\tself::$instance[$cname] = unserialize($configdata);\r\n\t\t\t}\r\n\t\t\telse self::$instance[$cname] = new self($cname);\r\n\t\t\tself::saveCache();\r\n\t\t}\r\n return self::$instance[$cname];\r\n }", "static function getConfig() {\n\t\treturn self::getRegistry()->get(self::REGISTRY_CONFIG);\n\t}", "public function config()\n {\n return $this->config;\n }", "public function getConfig()\r\n {\r\n $configFile = GeneralUtility::getFileAbsFileName(\"EXT:centauri_core/Configuration/core.php\");\r\n return (include $configFile);\r\n }", "public function getConfig() {\n return $this->_config;\n }", "public function getConfig()\n {\n return $this->_config;\n }", "public function getConfig()\n {\n return $this->_config;\n }", "public function &getConfig() {\n return $this->config;\n }", "protected function getConfig()\n\t{\n\t\treturn $this->oConfig;\n\t}", "public function get() {\n return $this->_configuration;\n }", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "function getConfig()\n {\n return $this->_api->doRequest(\"GET\", \"{$this->getBaseApiPath()}/config\");\n }", "public static function getConfigInstance()\n {\n if (!static::$config) {\n static::$config = new Config\\NativeConfig;\n }\n\n return static::$config;\n }", "public static function read()\n {\n return self::$config;\n }", "public static function getInstance(): Config\n {\n return self::$config;\n }", "public function getConfiguration()\n {\n return self::$config_array;\n }", "public function getConfig()\n {\n return $this->config ?: $this->setConfig()->getConfig();\n }", "public function getConfigurarion()\n {\n return $this->configuration;\n }", "function getConfig() {\r\n\t\tstatic $config ;\r\n\t\tif (!$config) {\r\n\t\t\t$db = & JFactory::getDBO();\r\n\t\t\t$config = new stdClass ;\r\n\t\t\t$sql = 'SELECT * FROM #__osmembership_configs';\r\n\t\t\t$db->setQuery($sql);\r\n\t\t\t$rows = $db->loadObjectList();\r\n\t\t\tfor ($i = 0 , $n = count($rows); $i < $n; $i++) {\r\n\t\t\t\t$row = $rows[$i];\r\n\t\t\t\t$key = $row->config_key;\r\n\t\t\t\t$value = stripslashes($row->config_value);\t\t\t\t\r\n\t\t\t\t$config->$key = $value;\t\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\treturn $config;\r\n\t}", "public static function getConfig()\n {\n return new Config(self::$config);\n }", "abstract public function getConfig();", "public function config()\n {\n return $this->context->getConfig();\n }", "public function getConfig() {}", "public function getConfig(): Config\n {\n return $this->config;\n }", "public function get() {\n return new ConfigurationObject($this->config);\n }", "protected function _get_config()\n {\n $config = Spyc::YAMLLoad(\"config.yaml\");\n return $config;\n }", "public function getConfig() {\r\n\r\n\t}", "public static function getConf(){\n $conf = Configuration::first();\n return $conf;\n }", "static function config() {\n\t\t//\t\tif (self::$configuration === null) {\n\t\t//\t\t\tself::$configuration = include self::themepath().'wpgrade-config'.EXT;\n\t\t//\t\t}\n\t\t//\n\t\t//\t\treturn self::$configuration;\n\t\treturn self::get_config();\n\t}", "public function getConfig() {\n return $this->container->offsetGet('config');\n }", "public function loadConfig() {\n return (object)$this->config;\n }", "abstract protected function getConfig();", "public function getConfig ()\n {\n $config = Mage::getModel('socnet/network')\n ->getConfigByNetworkKey($this->getNetworkKey());\n return $config;\n }", "private function get_config() {\n if (isset($this->config)) {\n return $this->config;\n }\n\n $this->config = get_config('tool_coursebank');\n\n return $this->config;\n }", "public function getConfig()\r\n {\r\n return $this->_file;\r\n }", "function getConfig() {\n\t\tif($this->_oConfig === null) {\n\t\t\tif(isset($this->_options['cacheConfig']) && $this->_options['cacheConfig']) {\n\t\t\t\t$this->_oConfig = $this->cacheConfig();\n\t\t\t} else {\n\t\t\t\t$this->_oConfig = $this->parseConfig();\n\t\t\t}\n\t\t}\n\t\treturn $this->_oConfig;\n\t}", "public function getConf() {\n return static::$conf;\n }", "public function getConfiguration()\n {\n if (is_null($this->_configuration)) {\n $this->_configuration = Configuration::get('config');\n }\n return $this->_configuration;\n }", "public function getConfig() : ContainerConfig\n {\n return $this->config;\n }", "public function getConfiguration() {\n return $this->configuration;\n }", "public function getConfig() {\n if ($this->config) {\n return $this->config;\n }\n \n $this->config = $this->parse($this->configFile);\n return $this->config;\n }", "static public function getConfig() {\n return Application::$config;\n }", "public static function getConfiguration();", "public function getSpriteImageRegistry()\n {\n return $this->spriteImageRegistry;\n }", "public static function getConfig () {\n\n\t\treturn parse_ini_file(APPPATH . '/config/config.ini');\n\t}", "protected function _getConfiguration() {\n if (!$this->_configuration) {\n $this->_configuration = $this->config(static::CONFIGURATION_NAME);\n }\n\n return $this->_configuration;\n }", "public static function get() { return static::$slimConfiguration; }" ]
[ "0.73720866", "0.7350156", "0.7312734", "0.5723863", "0.57031745", "0.560343", "0.56013554", "0.55858415", "0.5556608", "0.5545413", "0.55231106", "0.5475459", "0.5456261", "0.54552394", "0.5450682", "0.54487634", "0.5442738", "0.54408145", "0.5425102", "0.5394908", "0.5382063", "0.5382063", "0.53818387", "0.53818387", "0.53818387", "0.53818387", "0.53818387", "0.53818387", "0.53818387", "0.53818387", "0.53818387", "0.53818387", "0.53818387", "0.53818387", "0.53818387", "0.53818387", "0.53818387", "0.5381076", "0.53694844", "0.53597325", "0.53597325", "0.53597325", "0.53597325", "0.5357442", "0.5357421", "0.5347246", "0.533819", "0.5327608", "0.5317699", "0.5296793", "0.52888757", "0.528808", "0.528808", "0.5256035", "0.5252144", "0.52512276", "0.5239896", "0.5239896", "0.5239896", "0.5239896", "0.5239896", "0.5239896", "0.5239896", "0.5239896", "0.5235564", "0.5218342", "0.5203442", "0.5197219", "0.5194713", "0.5188722", "0.5180734", "0.5147024", "0.51288986", "0.5127277", "0.51263493", "0.5125689", "0.5123607", "0.51113474", "0.5100956", "0.5096758", "0.50940615", "0.50915194", "0.50876915", "0.5074832", "0.5074402", "0.5073618", "0.5068581", "0.50648063", "0.5055554", "0.50531924", "0.50511163", "0.50492686", "0.50461066", "0.5036421", "0.503313", "0.50224465", "0.5021903", "0.50172305", "0.5015391", "0.50140107" ]
0.75944084
0
getSpriteConfig() Get this instance cache manager.
public function getSpriteCache() { return $this->spriteCache; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSpriteConfig()\n {\n return $this->spriteConfig;\n }", "public function getSpriteConfig()\n {\n return $this->spriteImageRegistry->getSpriteConfig();\n }", "public function getSpriteCache()\n {\n return $this->spriteImageRegistry->getSpriteCache();\n }", "public function getSpriteImageRegistry()\n {\n return $this->spriteImageRegistry;\n }", "function getConfig() {\n\t\tif($this->_oConfig === null) {\n\t\t\tif(isset($this->_options['cacheConfig']) && $this->_options['cacheConfig']) {\n\t\t\t\t$this->_oConfig = $this->cacheConfig();\n\t\t\t} else {\n\t\t\t\t$this->_oConfig = $this->parseConfig();\n\t\t\t}\n\t\t}\n\t\treturn $this->_oConfig;\n\t}", "public function getCacheConfig()\n {\n $config = null;\n if (file_exists($this->options['cache_path'])) {\n $content = @file_get_contents($this->options['cache_path']);\n $config = new Config($this->app, $content);\n }\n return $config;\n }", "public static function getInstance() {\n return self::getConfig();\n }", "public static function getConfig() {\n if (!self::$_configInstance)\n new acs_config();\n \n return self::$_configInstance;\n }", "public function getConfig()\n {\n return $this['config'];\n }", "protected function _getConfig()\n {\n if (Zend_Registry::isRegistered('Zend_Cache_Manager') && Zend_Registry::get('Zend_Cache_Manager')->hasCache('navigation')) {\n $cache = Zend_Registry::get('Zend_Cache_Manager')->getCache('navigation');\n Core_Module_Config_Xml::setCache($cache);\n }\n $moduleConfig = new Core_Module_Config_Xml($this->_options);\n $config = $moduleConfig->readConfigs(true);\n return $config;\n }", "public function getImageRegistry()\n {\n return $this->spriteImageRegistry;\n }", "public static function getConfig()\n {\n return self::$config;\n }", "public function getConfig() : \\codename\\core\\config {\r\n return $this->config;\r\n }", "static function getConfig() {\n\t\treturn self::getRegistry()->get(self::REGISTRY_CONFIG);\n\t}", "public function getConfig() {\n \t\n \t// Return our configuration\n \treturn $this->aConfig;\n }", "public function getConfig(){\n\t\treturn $this->_config;\n\t}", "public function getConfig() {\r\n return $this->config;\r\n }", "protected function getConfig()\n\t{\n\t\treturn $this->oConfig;\n\t}", "function getConfig()\n {\n return $this->config;\n }", "public function getConfig(){\n return $this->config;\n }", "public function getConfig()\n {\n return $this->_config;\n }", "public function getConfig()\n {\n return $this->_config;\n }", "public function getConfig ()\n {\n $config = Mage::getModel('socnet/network')\n ->getConfigByNetworkKey($this->getNetworkKey());\n return $config;\n }", "public function getConfig() \n {\n return $this->config;\n }", "public function getConfig() {\n return $this->_config;\n }", "public function getConfigCacheEnabled()\n {\n return $this->configCacheEnabled;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\r\n {\r\n return Zend_Registry::get('config');\r\n }", "public function getConfig()\n {\n return $this->get('config');\n }", "public static function getConfigInstance()\n {\n if (!static::$config) {\n static::$config = new Config\\NativeConfig;\n }\n\n return static::$config;\n }", "public function getConfig()\n\t{\n\t\treturn $this->config;\n\t}", "public function getConfig()\n\t{\n\t\treturn $this->config;\n\t}", "public function getConfig()\n\t{\n\t\treturn $this->config;\n\t}", "public function getConfig()\n\t{\n\t\treturn $this->config;\n\t}", "public function getConfig()\n {\n return $this->config;\n }", "public function config() : LoaderInterface {\n return $this -> loader;\n }", "public function getConfig() : Config\n {\n return $this->config;\n }", "static public function getCache(){\n return static::$cache;\n }", "public function &getConfig() {\n return $this->config;\n }", "private function getCacheServer()\n {\n /**\n * The configuration options are encapsulated in a class called RedisOptions\n * Here we setup the server configuration using the values from our config file\n */\n $redis_options = new RedisOptions();\n $redis_options->setServer(array(\n 'host' => self::$__endpoint,\n 'port' => self::$__port,\n 'timeout' => self::$__timeout\n ));\n // /**\n // * This is not required, although it will allow to store anything that can be serialized by PHP in Redis\n // */\n // $redis_options->setLibOptions ( array (\n // Redis::OPT_SERIALIZER => Redis::SERIALIZER_PHP\n // ) );\n \n /**\n * We create the cache passing the RedisOptions instance we just created\n */\n $redis_cache = new Redis($redis_options);\n \n return $redis_cache;\n }", "public function get()\r\n {\r\n $this->ensureLoaded();\r\n return $this->config;\r\n }", "function getConfig() {\r\n\t\tstatic $config ;\r\n\t\tif (!$config) {\r\n\t\t\t$db = & JFactory::getDBO();\r\n\t\t\t$config = new stdClass ;\r\n\t\t\t$sql = 'SELECT * FROM #__osmembership_configs';\r\n\t\t\t$db->setQuery($sql);\r\n\t\t\t$rows = $db->loadObjectList();\r\n\t\t\tfor ($i = 0 , $n = count($rows); $i < $n; $i++) {\r\n\t\t\t\t$row = $rows[$i];\r\n\t\t\t\t$key = $row->config_key;\r\n\t\t\t\t$value = stripslashes($row->config_value);\t\t\t\t\r\n\t\t\t\t$config->$key = $value;\t\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\treturn $config;\r\n\t}", "protected function load_config() {\n $this->config = Kohana::$config->load('imagecache');\n $this->config_patterns = Kohana::$config->load('imagecache_patterns');\n }", "public function getCSprite()\n {\n return $this->spriteImageRegistry->getCSprite();\n }", "public static function getConfig(){\n \t$_this = Settings::getInstance();\n \t\n \tif ($_this->_config === null) {\n\t\t\t$_this->_config = new Zend_Config_Ini(DIR_APPLICATION . 'configuration/configuration.ini', 'default');\n \t}\n\n \treturn $_this->_config;\n }", "public function getConfig() {\n return Mage::getSingleton('profileolabs_shoppingflux/config');\n }", "public static function getInstance(): Config\n {\n return self::$config;\n }", "public function getConfig()\n {\n return $this->traitGetConfig();\n }", "public function getConfig() {\n return $this->container->offsetGet('config');\n }", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getCache()\n {\n return Zend_Controller_Front::getInstance()->getParam('bootstrap')->getResource('cachemanager')->getCache( 'frontcore' );\n }", "function get_config() {\n //$memcached = new \\Memcached();\n //$memcached->addServer(MEMCACHED_HOST, MEMCACHED_PORT);\n \n if (false) {//$memcached->get('lc_config') && MEMCACHED_ENABLED) {\n //return $memcached->get('lc_config');\n }\n else { \n // Load our master config\n $master_config = parse_ini_file(LC_HOME . LC_MASTER_CONFIG, True);\n \n // Let's get the local config based on the resource type (an action parameter)\n if (!empty($this->http_request->action_params['resource_type'])){\n $resource_type = $this->http_request->action_params['resource_type'];\n if (!empty($resource_type) && !in_array($resource_type, array_keys($master_config['resource_types']))) {\n throw new \\Exception('Incorrect resource type specified' .\n ' --> ' . $resource_type . ' <-- See ' .\n $master_config['doc']['lc_doc_loc'] . ' for documention on resource types.');\n }\n }\n \n $resource_config = parse_ini_file(LC_HOME . $master_config['resource_types'][$resource_type]);\n\n // Since we turn all sections in our master config into arrays (this \n // way we can validate keys easily), we need to flatten it back down\n $flattened_master_config = array();\n foreach ($master_config as $top_level_element) {\n foreach ($top_level_element as $key => $value) {\n $flattened_master_config[$key] = $value;\n }\n }\n\n $merged = array_merge($flattened_master_config, $resource_config);\n //$memcached->set('lc_config', $merged);\n return $merged;\n }\n }", "public static function getConfig()\n {\n return new Config(self::$config);\n }", "public function getContentCacheConfig() {\n return $this->contentCacheConfig;\n }", "public function get_config()\n\t{\n\t\treturn $this->cfg;\n\t}", "public function getConfig()\n {\n return $this->config ?: $this->setConfig()->getConfig();\n }", "public function loadConfig() {\n return (object)$this->config;\n }", "public function config()\n\t{\n\t\treturn $this->config;\n\t}", "public function config()\n\t{\n\t\treturn $this->config;\n\t}", "function getConfig()\n {\n return $this->_api->doRequest(\"GET\", \"{$this->getBaseApiPath()}/config\");\n }", "public function config()\n {\n return $this->config;\n }", "public function getImageConfig()\n {\n if (!$this->imageConfig) {\n $this->imageConfig = $this->viewConfig->getViewConfig()->getMediaEntities(\n 'Magento_Catalog',\n Image::MEDIA_TYPE_CONFIG_NODE\n );\n }\n\n return $this->imageConfig;\n }", "function getCache() {\n return $this->cache;\n }", "function getCache() {\n return $this->cache;\n }", "protected function getCache()\n {\n return $this->cache;\n }", "protected function getConfig($name)\n\t{\n\t return $this->royalcms['config'][\"cache.drivers.{$name}\"];\n\t}", "abstract protected function getConfig();", "public function getConfig()\n {\n return $this->_getConfigFile();\n }", "protected function &getConfig(){\n \n if( is_null($this->config) ){\n $this->config = new \\stdClass();\n }\n \n return $this->config;\n \n }", "abstract public function getConfig();", "public function getCache() {\n return $this->cache;\n }", "public function getCache()\n {\n return $this->get('cache', false);\n }", "static public function getInstance ($base) {\n # Is the configuration file already in memory?\n if (isset (self::$_cache[$base])) {\n\n # Yes, the file has already been loaded\n $obj = self::$_cache[$base];\n\n } else {\n\n # No, load the file from disk and save it to cache\n $obj = new Config ($base);\n self::$_cache[$base] = $obj;\n\n }\n return $obj;\n }", "public function getConfig(): Config\n {\n return $this->config;\n }", "protected function _getConfig()\n {\n if (null == $this->_yapitalConfig)\n {\n $this->_yapitalConfig = Mage::getSingleton('yapital/config');\n }\n\n return $this->_yapitalConfig;\n }", "protected function getCurrentPageCacheConfiguration() {}", "public final function getConfig()\n {\n return clone($this->config);\n }", "public function getConfiguration()\n {\n return $this->_config;\n }", "protected function getConfig()\n {\n\n return $this->app['config']['manticore'];\n }" ]
[ "0.7876202", "0.7762464", "0.7058248", "0.60824525", "0.6069641", "0.58817476", "0.5821229", "0.58058345", "0.5708618", "0.568944", "0.5672047", "0.56685954", "0.56665224", "0.56588656", "0.56206846", "0.5597092", "0.55964154", "0.5555123", "0.55536646", "0.5549273", "0.55449826", "0.55449826", "0.5537621", "0.5537451", "0.5537343", "0.55297023", "0.5523888", "0.5523888", "0.5523888", "0.5523888", "0.5523888", "0.5523888", "0.5523888", "0.5523888", "0.5523888", "0.5523888", "0.5523888", "0.5523888", "0.5523888", "0.5523888", "0.5523888", "0.55093765", "0.5503548", "0.5480833", "0.5477861", "0.5477861", "0.5477861", "0.5477861", "0.54728496", "0.54621655", "0.5460176", "0.5432017", "0.54274696", "0.54272753", "0.5421154", "0.54066503", "0.53986335", "0.53935987", "0.5364646", "0.53538483", "0.53526014", "0.5349332", "0.5348991", "0.5340298", "0.5340298", "0.5340298", "0.5340298", "0.5340298", "0.5340298", "0.5340298", "0.5340298", "0.53191036", "0.53174096", "0.53083855", "0.5305208", "0.5298527", "0.52948284", "0.5294677", "0.5278265", "0.5278265", "0.5267351", "0.5262849", "0.5261419", "0.52559406", "0.5244128", "0.5241609", "0.52414757", "0.5236365", "0.5233985", "0.52325344", "0.522661", "0.5222973", "0.52173716", "0.52090853", "0.5208542", "0.520785", "0.52022934", "0.51998836", "0.5199427", "0.51959366" ]
0.71840113
2
getSpriteCache() Get this instance name.
public function getName() { return $this->name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSpriteCache()\n {\n return $this->spriteCache;\n }", "public function getSpriteCache()\n {\n return $this->spriteImageRegistry->getSpriteCache();\n }", "public function getCacheName();", "protected static function getCacheName()\n\t{\n\t\tstatic $strCacheName;\n\t\tif (!isset($strCacheName))\n\t\t{\n\t\t\t$strCacheName = __CLASS__;\n\t\t}\n\t\treturn $strCacheName;\n\t}", "public function name()\n {\n return $this->getFromCache(\n ['type' => 'name']\n );\n }", "public function cache_filename()\n {\n return $this->_name . '_' . $this->id() . '.' . $this->_type;\n }", "function getCacheId() {\n return get_class($this).\"_\".$this->id;\n }", "public function get($cache_name);", "public function cacheName()\n\t\t{\n\t\t\treturn $GLOBALS[\"ID\"] . \"_call.xml\";\n\t\t}", "protected static function getCacheIdentifier() {}", "public function getCacheKey()\n {\n return $this->cacheKey;\n }", "public function getCacheKey() {\n return $this->_cacheKey;\n }", "protected function getCacheKey()\r\n {\r\n if (null == $this->cacheKey) {\r\n $this->cacheKey = get_class($this)\r\n . $this->getParent()->getEnvironment()\r\n . $this->getHttpHost();\r\n }\r\n return $this->cacheKey;\r\n }", "protected function _getFileName() {\n\n\t\t\treturn \t$this->_cacheFolder.$this->_getHash($this->_cacheFile).$this->_cacheExtension;\n\n\t\t}", "private function getCacheKey(): string\n {\n return $this->webserviceId.$this->cacheKey;\n }", "public function getCache(): string\n {\n return $this->cache;\n }", "private function generateCacheName(): string\n\t{\n\t\t$get = implode('-', $_GET);\n\t\t$name = $this->_resizeMode . $this->_imagePath . $this->_oldWidth . $this->_oldHeight . $this->_newWidth . $this->_newHeight . $get;\n\t\treturn md5($name) . '.' . $this->_extension;\n\t}", "protected function cacheKey() : string\n {\n return $this->cacheKey ?? $this->cacheKeyHash();\n }", "public function getCacheKey()\n {\n return $this->CacheKey;\n }", "private function _cacheName() {\n $file = APPLICATION_PATH . '/application/settings/restapi_caching_url.php';\n if (file_exists($file)) {\n $enableCacheUrl = include $file;\n } else {\n return '';\n }\n $viewer = Engine_Api::_()->user()->getViewer();\n $front = Zend_Controller_Front::getInstance();\n $request = $front->getRequest();\n $params = array();\n $params['module'] = $request->getModuleName();\n $params['controller'] = $request->getControllerName();\n $params['action'] = $request->getActionName();\n $parameters = $request->getParams();\n $language = $parameters['language'];\n $cacheName = implode(\"_\", $params);\n $key_val = '';\n $cacheName = str_replace('-', '_', $cacheName);\n if (!isset($enableCacheUrl[$cacheName]) || empty($enableCacheUrl[$cacheName]))\n return;\n $getRequestUri = htmlspecialchars($_SERVER['REQUEST_URI']);\n $urlarray = explode(\"?\", $getRequestUri);\n $trimData = trim($urlarray[0], \"/\");\n $cachName = str_replace(\"/\", \"_\", $trimData);\n $viewerId = 0;\n $keys = array_keys($parameters);\n $matched = preg_grep('/_id|_type$/', $keys);\n $matched = array_flip($matched);\n $matched = array_intersect_key($parameters, $matched);\n $key_val = implode('_', $matched);\n\n if ($enableCacheUrl[$cacheName] == 'member_level') {\n $viewerId = $viewer && $viewer->getIdentity() ? $viewer->level_id : 0;\n } elseif ($enableCacheUrl[$cacheName] == 'user_level') {\n $viewerId = $viewer && $viewer->getIdentity() ? $viewer->getIdentity() : 0;\n }\n\n $cachName = $cachName . '_' . $language . '_' . $key_val . '_' . $viewerId;\n $cachName = str_replace('-', '_', $cachName);\n $cachName = str_replace('.', '_', $cachName);\n return $cachName;\n }", "public static function get($cacheName='_'){\n\t\tif(!isset(self::$_instances[$cacheName]))\n\t\t\tself::$_instances[$cacheName]=CCache::create(self::$_config[$cacheName]);\n\t\treturn self::$_instances[$cacheName];\n\t}", "abstract function get_cache_prefix(): string;", "public function get($name) {\n if($this->memcached !== false) {\n return $this->memcached->get(\"MystoreApiCache_\".$name);\n } else {\n return $this->$name;\n }\n }", "public function getCacheInstance($cacheName = null);", "protected function getCacheFile(){\n\t\treturn $this->getPath() . $this->getCacheName();\n\t}", "public function CacheFileName()\n {\n $parts = pathinfo($this->pathToImage);\n $this->fileExtension = $parts['extension'];\n $this->saveAs = is_null($this->saveAs) ? $this->fileExtension : $this->saveAs;\n $quality_ = is_null($this->quality) ? null : \"_q{$this->quality}\";\n $cropToFit_ = is_null($this->cropToFit) ? null : \"_cf\";\n $sharpen_ = is_null($this->sharpen) ? null : \"_s\";\n $dirName = preg_replace('/\\//', '-', dirname($this->src));\n $cacheFileName = CACHE_PATH . \"-{$dirName}-{$parts['filename']}_{$this->newWidth}_{$this->newHeight}{$quality_}{$cropToFit_}{$sharpen_}.{$this->saveAs}\";\n $cacheFileName = preg_replace('/^a-zA-Z0-9\\.-_/', '', $cacheFileName);\n\n if($this->verbose) { self::verbose(\"Cache file is: {$cacheFileName}\"); }\n return $cacheFileName;\n }", "public function getCSprite()\n {\n return $this->spriteImageRegistry->getCSprite();\n }", "function get_cache($key) {\n return $this->get_cache_dir() . $key . '.cache';\n }", "public function __get($name) {\r\n return isset(self::$instances[$name])? self::$instances[$name] : '';\r\n }", "public function cacheKey(): string {\n return self::CACHE_PREFIX . $this->id\n . ($this->revisionId ? '_r' . $this->revisionId : '');\n }", "public function getCacheId() {\n\t\treturn parent::getCacheId();\n\t}", "public function getInstanceName()\n {\n return $this->instanceName;\n }", "public function getInstanceName()\n {\n return $this->instanceName;\n }", "private function get_cache_id() {\n $handlername = get_class($this);\n if($this->id)\n $cache_id = '_cache_' . $handlername . '_' . $this->id;\n else \n $cache_id = '_cache_' . $handlername . '_all'; \n return $cache_id;\n\t}", "public function getName()\n\t{\n\t\treturn isset($this->_name) ? $this->_name : spl_object_hash($this);\n\t}", "public static function getName() {\n return isset(self::$name)\n ? self::$name\n : (self::$name = base_convert(crc32(self::getBaseDir()),16,32));\n\t}", "public function getInstanceName(): string\n {\n return $this->instanceName;\n }", "public static function getCacheTag()\n {\n return static::$cacheTag;\n }", "public static function getCacheTag()\n {\n return static::$cacheTag;\n }", "protected function getCacheName(){\n\t\tif(is_null($this->param)) {\n\t\t\tthrow new \\Exception('Call \"setParameters\" first!');\n\t\t}\n\n\t\t// Change character when making incompatible changes to prevent loading\n\t\t// errors due to incompatible file contents \\|/\n\t\treturn hash('md5', http_build_query($this->param) . 'A') . '.cache';\n\t}", "public function getImageName()\n {\n return $this->ImageName;\n }", "protected function _getCache()\n {\n if (!isset($this->_configuration)) {\n $this->_configuration = \\Yana\\Db\\Binaries\\ConfigurationSingleton::getInstance();\n }\n return $this->_configuration->getFileNameCache();\n }", "private function getCacheId()\n\t{\n\t\treturn self::CACHE_ID_PREFIX . '_' . $this->exportId . '_' . $this->type;\n\t}", "public function get_cache_filename($url)\n {\n }", "static function getInstance($name){\n\t\tif(! isset( self::$_instances[$name]))\n\t\t\tself::$_instances[$name] = new cacheItem($name);\n\t\treturn self::$_instances[$name];\n\t}", "protected function getConfigNameWithCacheSettings(): string {\n $configs = $this->getEditableConfigNames();\n return reset($configs);\n }", "public function getImageCachePath()\n {\n return $this->getSettingArray()[\"image_cache_path\"];\n }", "protected function get_cache_id() {\n\t\treturn wponion_hash_string( $this->module() . '_' . $this->unique() );\n\t}", "public function getCacheName($name){\n if($this->is_mobile)\n $name .= '_mobile';\n return $name;\n }", "public function getNombreCachets() {\n return $this->nombreCachets;\n }", "protected function getCacheCompiledPrefix()\n {\n return 'sass-compiled-';\n }", "public static function getCacheTag()\n\t{\n\t\treturn get_called_class() . '_common_cache';\n\t}", "public static function getCacheTag()\n\t{\n\t\treturn get_called_class() . '_common_cache';\n\t}", "public function get()\n {\n return Cache::get($this->cacheKey);\n }", "public function getCache()\r\n {\r\n if ($this->exists('cache')) {\r\n return ROOT . $this->get('cache');\r\n }\r\n else\r\n return ROOT . '/cache';\r\n }", "public function __get($name)\n {\n return $this->_cache[$name];\n }", "public function getSpriteImageRegistry()\n {\n return $this->spriteImageRegistry;\n }", "static public function getCache(){\n return static::$cache;\n }", "protected function cacheKey()\n {\n return json_encode($this);\n }", "public function getCachePathString()\n\t{\n\t\treturn \"rs-\".$this->_maxWidth.\"-\".$this->_maxHeight.\"-\".$this->_maintainAspectRatio.\"-\".$this->_scaleUp;\n\t}", "public static function getName()\n\t{\n\t\treturn self::$filename;\n\t}", "public function getCache()\n\t{\n\t\treturn CacheBot::get($this->getCacheKey(), self::$objectCacheLife);\n\t}", "protected function get_cache() {\n\t\n // uncomment next line to flush previous cache\n\t //delete_transient($this->get_cache_id()); \n\t\n \treturn get_transient( $this->get_cache_id() ); \t \n\t}", "public function getName()\n\t{\n\t\treturn $this->name ?: class_basename($this);\n\t}", "public static function getCacheFile()\r\n {\r\n return self::$_cacheFile;\r\n }", "public static function getCacheName($imageID = NULL)\n\t{\n\t\t$returnValue = NULL;\n\n\t\tif ($imageID) {\n\t\t\t$returnValue = strlen($imageID) . '_' . md5($imageID);\n\t\t}\n\n\t\treturn $returnValue;\n\t}", "function get_name () {\n return $this -> name;\n }", "function _cache_get ($cache_name = \"\") {\n\t\tif (empty($cache_name)) {\n\t\t\treturn false;\n\t\t}\n\t\t$cache_file_path = $this->_prepare_cache_path($cache_name);\n\t\treturn $this->_get_cache_file($cache_file_path);\n\t}", "public function getNameGraphics() {\n\t\treturn $this->nameGraphics;\n\t}", "public function getJsCachePrefix()\n {\n return Mage::helper('core/url')->getCurrentBase64Url();\n }", "function getName() {\n return $this->instance->getName();\n }", "protected function _getAssetName()\n {\n $k = $this->_tbl_key;\n return 'com_userinvites.userinvites.'.(int) $this->$k;\n }", "public function getCache()\n {\n return $this->Cache;\n }", "public function get_name() {\n\t\treturn 'ht-sg-retina';\n\t}", "public function get($name, $cache = true) {}", "public function getSpriteIconCode() {}", "protected function getCacheSuffix() {\n return '';\n }", "protected static function _getName()\n {\n return isset(static::$_name) ? static::$_name : get_called_class();\n }", "private function cacheKey()\n {\n return sprintf('contact-permissons-%s', $this->client->patientContactId);\n }", "private function getObject($name){\n return $this->cache->get($name);\n }", "public function getCache();", "protected function _getTabNameModel()\n {\n return $this->getModelFromCache('Waindigo_Tabs_Model_TabName');\n }", "public function name()\n\t{\n\t\tif($this->name)\n\t\t{\n\t\t\treturn $this->name;\n\t\t}\n\n\t\t$name = array();\n\n\t\tforeach($this->assets[$this->group] as $asset)\n\t\t{\n\t\t\t$name[] = str_replace(path('base'), '', $asset['source']) . '/' . $asset['file'];\n\t\t}\n\n\t\tsort($name);\n\n\t\treturn $this->name = md5('basset_' . $this->group . '_' . implode('', $name));\n\t}", "private function get_name()\n\t{\n\t\treturn $this->m_name;\n\t}", "private function get_name()\n\t{\n\t\treturn $this->m_name;\n\t}", "public function getName() : string\n {\n return $this->url;\n }", "public function getCache()\r\n {\r\n \treturn $this->_cache;\r\n }", "public function getName() {\r\n\t\treturn self::title;\r\n\t}", "public static function cached($_name) {\n\t\t$_name=self::resolve($_name);\n\t\t$_hash='var.'.self::hashCode(self::remix($_name));\n\t\treturn Cache::cached($_hash);\n\t}", "public function get_name();", "public function get_name();", "public function get_name();", "function getCacheFilename() {\n\t\treturn 'cache/fc-categories.php';\n\t}", "public function getCache()\n {\n return Zend_Controller_Front::getInstance()->getParam('bootstrap')->getResource('cachemanager')->getCache( 'frontcore' );\n }", "protected function cacheName($file){\n $hash = sha1($file);\n return \"$this->cache/$hash.php\";\n }", "public function getName()\n {\n return $this->_path['filename'];\n }", "public function getCaching()\n {\n return (!is_null($this->_cache) ? $this->_cache : Cache::instance('redis'));\n }", "public function getFromCache() {}", "public function __get($name) {\n if(array_key_exists(strtolower($name), $this->_instances))\n return $this->_instances[strtolower($name)];\n }", "public function GetCacheFileName($endpoint=null){\r\n\t\t$data=Array(\r\n\t\t\t'server'\t\t=>\t$this,\r\n\t\t\t'endpoint'\t\t=>\t$endpoint,\r\n\t\t\t'filename'\t\t=>\t(is_null(self::$CacheFolder))?null:self::$CacheFolder.'/'.sha1((is_null($endpoint))?$this->EndPoint:$endpoint).'.wsdl'\r\n\t\t);\r\n\t\tself::CallHook(\r\n\t\t\t'CacheFileNameHook',\r\n\t\t\t$data\r\n\t\t);\r\n\t\treturn $data['filename'];\r\n\t}", "protected function getGameName( )\n {\n return \"pi\";\n }" ]
[ "0.75116014", "0.7309405", "0.70992297", "0.665547", "0.65349126", "0.6505665", "0.63204116", "0.62644064", "0.62576973", "0.62316835", "0.62171704", "0.6215167", "0.6214975", "0.62129885", "0.6164887", "0.61304957", "0.61184853", "0.60787964", "0.60277635", "0.6024799", "0.5956815", "0.59332067", "0.5926105", "0.59209925", "0.5883964", "0.5856783", "0.5850907", "0.5832227", "0.58270276", "0.58188206", "0.5801939", "0.5760685", "0.5760685", "0.5740083", "0.5728554", "0.57247955", "0.57176584", "0.5686514", "0.5686514", "0.5684767", "0.5683494", "0.5676446", "0.56736964", "0.566907", "0.56658924", "0.5652317", "0.5649249", "0.56459326", "0.56393147", "0.56257164", "0.5608911", "0.56015956", "0.56015956", "0.55829984", "0.5580792", "0.5580669", "0.55623496", "0.55617887", "0.5561023", "0.5501895", "0.5487094", "0.5483377", "0.5477262", "0.54733866", "0.54581434", "0.5453239", "0.54512304", "0.5446965", "0.5436085", "0.5425217", "0.5417799", "0.5401212", "0.5400394", "0.53898644", "0.5380633", "0.53742164", "0.5362548", "0.5359521", "0.5351031", "0.53484315", "0.53377306", "0.5337581", "0.53201514", "0.53186", "0.53186", "0.5315054", "0.5313546", "0.5312285", "0.5309757", "0.5308146", "0.5308146", "0.5308146", "0.5307752", "0.53071356", "0.53034973", "0.52970076", "0.52892625", "0.5286865", "0.5282142", "0.52810496", "0.52799755" ]
0.0
-1
getName() Get the template registry.
public function getTemplateRegistry() { return $this->spriteTemplateRegistry; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTemplateName() {\n\t\treturn $this->templateName;\n\t}", "public function getRegisterTpl(){\n return $this->templates['register'];\n }", "public function getTemplateName()\n {\n return $this->templateName;\n }", "public function getTemplateName()\n {\n }", "public function getName()\r\n\t{\r\n\t\treturn GeekPoint_AdminDAVi_Directory_Root::ADMIN_TEMPLATES;\r\n\t}", "public function getTemplateName(): string;", "public function getTemplateName()\n {\n return $this->_sThisTemplate;\n }", "public function getTemplateName()\n {\n return isset($this->TemplateName) ? $this->TemplateName : null;\n }", "public function getTemplateNames() {\n\t\treturn array_keys(self::$_config->template->toArray());\n\t}", "public function render()\n {\n return $this->getTemplateName();\n }", "public function getInspectTemplateName()\n {\n return $this->inspect_template_name;\n }", "abstract public function getTemplateName();", "public function getReidentifyTemplateName()\n {\n return $this->reidentify_template_name;\n }", "public function getTemplate($name){\n if(isset($name)){\n return $this->template[$name]; // $this->envir->loadTemplate($template)\n }\n return $this->template[$this->templace_interator++]; // $this->envir->loadTemplate($template)\n }", "function getName () {\n\t\treturn $this->name;\n\t}", "public function get()\n {\n return $this->templates;\n }", "public function getTemplatePathname() : string {\n\t\treturn $this->templateBasePath . '/linklist-group.mustache';\n\t}", "public function getName ();", "function\tgetName() {\n\t\treturn $this->name ;\n\t}", "function get_name () {\n return $this -> name;\n }", "public function name()\n {\n return $this->getFromCache(\n ['type' => 'name']\n );\n }", "public function getTemplateName() {\n\t\treturn 'uitypes/Tree.tpl';\n\t}", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();" ]
[ "0.6642682", "0.6521775", "0.63660914", "0.6331903", "0.6254645", "0.624497", "0.61934227", "0.6114543", "0.61105937", "0.6086938", "0.6056717", "0.6048571", "0.6037646", "0.60367525", "0.6007794", "0.5991045", "0.599049", "0.5974496", "0.5973275", "0.59590894", "0.59392494", "0.5924996", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438", "0.5921438" ]
0.68292594
0
getTemplateRegistry() Get the image registry.
public function getImageRegistry() { return $this->spriteImageRegistry; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTemplateRegistry()\n {\n return $this->spriteTemplateRegistry;\n }", "public function registry()\n {\n if(!$this->defaultRegistry) {\n $this->defaultRegistry = $this('registry');\n }\n\n return $this->defaultRegistry;\n }", "public function &get_registry()\n {\n }", "public function getMainRegistry()\n {\n return $this->registry;\n }", "public function getRegistryArray() {\n return $this->_registryArray;\n }", "public function getPathRegistry() {\n if (null == $this->pathRegistry) {\n $this->pathRegistry = new PathRegistry();\n }\n\n return $this->pathRegistry;\n }", "public function getSpriteImageRegistry()\n {\n return $this->spriteImageRegistry;\n }", "static function getRegistry() {\n\t\tif ( self::$_Registry === false ) {\n\t\t\tself::$_Registry = new systemRegistry();\n\t\t}\n\t\treturn self::$_Registry;\n\t}", "public static function registry()\n {\n\t\tif ( empty(self::$registry) ){\n\t\t\tself::$registry = new Registry();\n\t\t}\n\t\treturn self::$registry;\n\n }", "public function loadRegistry();", "public static function getRegistry(): CacheRegistry\n {\n return static::$_registry ??= new CacheRegistry();\n }", "protected function getExtractorRegistry() {}", "public function getRegisterTpl(){\n return $this->templates['register'];\n }", "public function getRegistryData()\n {\n return array();\n }", "public static function get_type_registry()\n {\n }", "public function getSutRegistry() {\n if (null == $this->sutRegistry) {\n $this->sutRegistry = new SutRegistry();\n }\n\n return $this->sutRegistry;\n }", "public function getImageTemplate() { return $this->imageTemplate; }", "protected function getRegistryProcessor()\n {\n return $this->registryProcessor;\n }", "protected function getRegistryProcessor()\n {\n return $this->registryProcessor;\n }", "public function dump()\n {\n return $this->registry;\n }", "protected function getRegistryLoader()\n {\n return $this->registryLoader;\n }", "public function getStyleRegistry()\n {\n return $this->spriteStyleRegistry;\n }", "public static function getExpanderRegistry() {\n return self::$dynamic_mixins;\n }", "protected function getRegistry() {\r\n if (!isset($this -> mReg)) {\r\n $this -> mReg = new CApp_Event_Action_Registry();\r\n }\r\n }", "protected function getRegistryProcessor() : RegistryProcessorInterface\n {\n return $this->registryProcessor;\n }", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function get()\n {\n return $this->templates;\n }", "public static function getInstance()\n {\n if (null === self::$_instance) {\n self::$_instance = new Erfurt_Wrapper_Registry();\n }\n\n return self::$_instance;\n }", "public function getTemplateSet(){\n\t\treturn $this->templateSet;\n\t}", "public static function getRegister(): array\n {\n return self::$smartObjectRegistry;\n }", "static function getInstance() {\n if (is_null(self::$instance)) {\n self::$instance = new Registry();\n }\n\n return self::$instance;\n }", "function getTemplate();", "public function getRegistries()\n {\n return $this->registries;\n }", "public static function getInstance()\r\n\t{\r\n\t\tif ( empty( self::$instance ) )\r\n\t\t{\r\n\t\t\tself::$instance = new Registry();\r\n\t\t\t$object = self::$instance;\r\n\t\t\t$object->init();\r\n\t\t}\r\n\t\t\r\n\t\treturn self::$instance;\r\n\t}", "public function getValueRegistry()\n {\n return null;\n }", "protected function getForm_RegistryService()\n {\n return $this->services['form.registry'] = new \\Symfony\\Component\\Form\\FormRegistry(array(0 => new \\Symfony\\Component\\Form\\Extension\\DependencyInjection\\DependencyInjectionExtension($this, array('Symfony\\\\Component\\\\Form\\\\Extension\\\\Core\\\\Type\\\\FormType' => 'form.type.form', 'Symfony\\\\Component\\\\Form\\\\Extension\\\\Core\\\\Type\\\\ChoiceType' => 'form.type.choice', 'Symfony\\\\Bridge\\\\Doctrine\\\\Form\\\\Type\\\\EntityType' => 'form.type.entity', 'A2lix\\\\TranslationFormBundle\\\\Form\\\\Type\\\\TranslationsType' => 'a2lix_translation_form.default.type.translations', 'A2lix\\\\TranslationFormBundle\\\\Form\\\\Type\\\\TranslationsFieldsType' => 'a2lix_translation_form.default.type.translationsfields', 'A2lix\\\\TranslationFormBundle\\\\Form\\\\Type\\\\TranslationsFormsType' => 'a2lix_translation_form.default.type.translationsforms', 'A2lix\\\\TranslationFormBundle\\\\Form\\\\Type\\\\TranslationsLocalesSelectorType' => 'a2lix_translation_form.default.type.translationslocalesselector', 'A2lix\\\\TranslationFormBundle\\\\Form\\\\Type\\\\TranslatedEntityType' => 'a2lix_translation_form.default.type.translatedentity', 'FOS\\\\UserBundle\\\\Form\\\\Type\\\\UsernameFormType' => 'fos_user.username_form_type', 'FOS\\\\UserBundle\\\\Form\\\\Type\\\\ProfileFormType' => 'fos_user.profile.form.type', 'FOS\\\\UserBundle\\\\Form\\\\Type\\\\RegistrationFormType' => 'fos_user.registration.form.type', 'FOS\\\\UserBundle\\\\Form\\\\Type\\\\ChangePasswordFormType' => 'fos_user.change_password.form.type', 'FOS\\\\UserBundle\\\\Form\\\\Type\\\\ResettingFormType' => 'fos_user.resetting.form.type', 'Liip\\\\ImagineBundle\\\\Form\\\\Type\\\\ImageType' => 'liip_imagine.form.type.image', 'Victoire\\\\Bundle\\\\BlogBundle\\\\Form\\\\HierarchyTreeType' => 'victoire_blog.hierarchy_tree_type', 'Victoire\\\\Bundle\\\\BlogBundle\\\\Form\\\\CategoryType' => 'victoire.form.blog.category', 'Victoire\\\\Bundle\\\\BlogBundle\\\\Form\\\\ArticleType' => 'victoire_blog.article.form.type', 'Victoire\\\\Bundle\\\\BlogBundle\\\\Form\\\\ArticleTemplateType' => 'victoire_blog.article.container.form.type', 'Victoire\\\\Bundle\\\\BlogBundle\\\\Form\\\\ArticleSettingsType' => 'victoire_blog.article_settings.form.type', 'Victoire\\\\Bundle\\\\BlogBundle\\\\Form\\\\TagsType' => 'victoire_blog.type.tags', 'Victoire\\\\Bundle\\\\BlogBundle\\\\Form\\\\BlogType' => 'victoire_blog.blog.form.type', 'Victoire\\\\Bundle\\\\BlogBundle\\\\Form\\\\ChooseBlogType' => 'victoire_blog.blog_choose.form.type', 'Victoire\\\\Bundle\\\\BlogBundle\\\\Form\\\\BlogSettingsType' => 'victoire_blog.blog_settings.form.type', 'Victoire\\\\Bundle\\\\BlogBundle\\\\Form\\\\BlogCategoryType' => 'victoire_blog.blog_category.form.type', 'Victoire\\\\Bundle\\\\BlogBundle\\\\Filter\\\\CategoryFilter' => 'victoire_blog.category_filters.form.type', 'Victoire\\\\Bundle\\\\BlogBundle\\\\Filter\\\\TagFilter' => 'victoire_blog.tag_filters.form.type', 'Victoire\\\\Bundle\\\\BlogBundle\\\\Filter\\\\DateFilter' => 'victoire_blog.date_filters.form.type', 'Victoire\\\\Bundle\\\\BusinessPageBundle\\\\Form\\\\BusinessTemplateType' => 'victoire_business_page.business_template.form.type', 'Victoire\\\\Bundle\\\\CoreBundle\\\\Form\\\\WidgetType' => 'victoire_core.widget.form.type', 'Victoire\\\\Bundle\\\\CoreBundle\\\\Form\\\\EntityProxyFormType' => 'victoire_core.entity_proxy.form.type', 'Victoire\\\\Bundle\\\\CoreBundle\\\\Form\\\\WidgetFieldsFormType' => 'victoire_core.widget_fields.form.type', 'Victoire\\\\Bundle\\\\FormBundle\\\\Form\\\\Type\\\\UrlvalidatedType' => 'victoire_form.form_type.urlvalidated_type', 'Victoire\\\\Bundle\\\\FormBundle\\\\Form\\\\Type\\\\TabType' => 'victoire_form.form.type.vic_tab', 'Victoire\\\\Bundle\\\\FormBundle\\\\Form\\\\Type\\\\FormActionsType' => 'victoire_form.form.type.vic_form_actions', 'Victoire\\\\Bundle\\\\FormBundle\\\\Form\\\\Type\\\\LinkType' => 'victoire_form.form.type.vic_link', 'Victoire\\\\Bundle\\\\FormBundle\\\\Form\\\\Type\\\\FontAwesomePickerType' => 'victoire_form.form.type.font_awesome_picker', 'Victoire\\\\Bundle\\\\FormBundle\\\\Form\\\\Type\\\\SlugType' => 'victoire_form.form.type.slug', 'Victoire\\\\Bundle\\\\MediaBundle\\\\Form\\\\Type\\\\MediaType' => 'form.type.media', 'Victoire\\\\Bundle\\\\PageBundle\\\\Form\\\\PageType' => 'victoire_page.page.form.type', 'Victoire\\\\Bundle\\\\PageBundle\\\\Form\\\\PageSettingsType' => 'victoire_page.page_settings.form.type', 'Victoire\\\\Bundle\\\\SeoBundle\\\\Form\\\\PageSeoType' => 'form.type.seo.page', 'Victoire\\\\Bundle\\\\SitemapBundle\\\\Form\\\\SitemapPriorityPageSeoType' => 'victoire_sitemap.priority.pageseo_type', 'Victoire\\\\Bundle\\\\TemplateBundle\\\\Form\\\\TemplateType' => 'victoire_template.template.form.type', 'Victoire\\\\Bundle\\\\WidgetBundle\\\\Form\\\\WidgetStyleType' => 'victoire_widget.widget_style_type'), array('Symfony\\\\Component\\\\Form\\\\Extension\\\\Core\\\\Type\\\\FormType' => array(0 => 'form.type_extension.form.http_foundation', 1 => 'form.type_extension.form.validator', 2 => 'form.type_extension.upload.validator', 3 => 'form.type_extension.csrf', 4 => 'victoire_business_entity.business_entity_type_extension', 5 => 'victoire_form.form.type_extension.vic_static_text', 6 => 'victoire_form.form.type_extension.vic_help', 7 => 'victoire_form.form.type_extension.vic_business_property_picker', 8 => 'victoire_form.form.type_extension.vic_legend', 9 => 'victoire_form.form.type_extension.vic_error', 10 => 'victoire_form.form.type_extension.vic_widget', 11 => 'victoire_form.form.type_extension.vic_horizontal', 12 => 'victoire_form.form.type_extension.vic_widget_collection', 13 => 'victoire_form.form.type_extension.vic_tabbed'), 'Symfony\\\\Component\\\\Form\\\\Extension\\\\Core\\\\Type\\\\RepeatedType' => array(0 => 'form.type_extension.repeated.validator'), 'Symfony\\\\Component\\\\Form\\\\Extension\\\\Core\\\\Type\\\\SubmitType' => array(0 => 'form.type_extension.submit.validator'), 'Symfony\\\\Component\\\\Form\\\\Extension\\\\Core\\\\Type\\\\ButtonType' => array(0 => 'victoire_form.form.type_extension.vic_offset_button', 1 => 'victoire_form.form.type_extension.vic_button'), 'Symfony\\\\Component\\\\Form\\\\Extension\\\\Core\\\\Type\\\\DateType' => array(0 => 'victoire_form.form.type_extension.vic_date'), 'Symfony\\\\Component\\\\Form\\\\Extension\\\\Core\\\\Type\\\\DateTimeType' => array(0 => 'victoire_form.form.type_extension.vic_datetime'), 'Symfony\\\\Component\\\\Form\\\\Extension\\\\Core\\\\Type\\\\TimeType' => array(0 => 'victoire_form.form.type_extension.vic_time')), array(0 => 'form.type_guesser.validator', 1 => 'form.type_guesser.doctrine'))), $this->get('form.resolved_type_factory'));\n }", "public static function getInstance() {\n if(!self::$instance instanceof self) {\n self::$instance = new Registry;\n }\n return self::$instance;\n }", "public function getModulTemplates()\n\t{\n\t\treturn $this->getTemplateGroup('mod_bn_');\n\t}", "public static function getAll()\r\n {\r\n return self::$typeRegistry;\r\n }", "static public function getInstance(){\r\n if(self::$_instance === NULL){\r\n self::$_instance = new Registry;\r\n }\r\n return self::$_instance;\r\n }", "public function getTemplates()\n {\n return $this->templates;\n }", "public function getTemplates()\n {\n return $this->templates;\n }", "static function getConfig() {\n\t\treturn self::getRegistry()->get(self::REGISTRY_CONFIG);\n\t}", "function loadRegistry() {\n\t\t$reg = @include $this->path( 'var/Application Support/xoops_kernel_Xoops2/registry.php' );\n\t\tif ( !is_array($reg) || ( $this->xoRunMode & XO_MODE_DEV_MASK ) ) {\n\t\t\t$reg = include $this->path( \"$this->xoBundleRoot/scripts/rebuild_registry.php\" );\n\t\t}\n\t\t$GLOBALS['exxos']->registry = $reg;\n\t}", "public function getTemplate() {}", "function defaultTemplate(){\n $this->addLocations(); // add addon files to pathfinder\n return array($this->template_file);\n }", "function coder_upgrade_theme_build_registry() {\n// cdp(\"inside \" . __FUNCTION__);\n // Get the list of disabled core modules.\n $list = coder_upgrade_module_list(TRUE, 0);\n\n $cache = array();\n $hook = 'theme';\n // TODO In the D8 release of this module, will need to use the correct file.\n // $hook_info = module_hook_info();\n foreach ($list as $module => $stuff) { // foreach (module_implements('theme') as $module) {\n module_load_include('module', $module);\n if (module_hook($module, $hook)) { // || (isset($hook_info[$hook]['group']) && $include_file = module_load_include('inc', $module, $module . '.' . $hook_info[$hook]['group']) && module_hook($module, $hook))) {\n _theme_process_registry($cache, $module, 'module', $module, $path = drupal_get_path('module', $module));\n }\n }\n return $cache;\n}", "public function getRegistrations() {\n\t\tif ($this->registrations === NULL) {\n\t\t\t$this->registrations = New Tx_Extbase_Persistence_ObjectStorage();\n\t\t}\n\t\treturn $this->registrations;\n\t}", "public function getTemplateCaches()\n {\n /** @var WebApplication|ConsoleApplication $this */\n return $this->get('templateCaches');\n }", "abstract public function getTemplate();", "public function get_instR()\n {\n return $this->_instR;\n }", "function get_template()\n {\n }", "protected function template()\n\t{\n\t\treturn Phpfox::getLib('template');\t\n\t}", "public function getTemplate(): TemplateInterface;", "public function get_template()\n {\n }", "public function get_template()\n {\n }", "public function getItemTemplates()\n\t{\n\t\treturn $this->getTemplateGroup('item_');\n\t}", "public function getRegistrant();", "protected function getRegistry($namespace)\n\t{\n\t\t$namespace = strtolower($namespace);\n\n\t\tif (in_array($namespace, $this->registryKeys)) {\n\t\t\treturn $this->registry[$namespace];\n\t\t}\n\n\t\treturn $this->createRegistry($namespace);\n\t}", "public function getTemplateFile();", "public function get_template() {\n return $this->_template;\n }", "static public function registry($index = null)\n {\n if (self::$_registry === null) {\n self::initRegistry();\n }\n\n return self::$_registry->get($index);\n }", "public static function get_template_global_variables()\n {\n return [\n 'TemplateConfig' => 'current_template_config',\n ];\n }", "static public function getMailServerRegisteredTemplateUids()\r\n {\r\n if (!defined('HTTP_CONTEXT')) {\r\n throw new Warecorp_Exception('HTTP_CONTEXT is not defined');\r\n }\r\n \r\n $cache = Warecorp_Cache::getCache('memory');\r\n \r\n if ( ($registeredTemplateUids = $cache->load('registeredTemplateUids') ) == false) {\r\n // create list of registered templates\r\n \r\n // may throws exception\r\n $client = Warecorp::getMailServerTemplateClient();\r\n \r\n $registeredTemplateUids = array();\r\n $registeredTemplates = $client->getRegisteredTemplates(HTTP_CONTEXT);\r\n foreach ($registeredTemplates as $template) {\r\n $registeredTemplateUids[] = $template['uid'];\r\n }\r\n \r\n // save to cache\r\n $cache->save($registeredTemplateUids, 'registeredTemplateUids', array('mailtemplates') );\r\n }\r\n \r\n return $registeredTemplateUids;\r\n }", "public function getTemplate () {\r\n\t\treturn $this->_template;\r\n\t}", "public function get_register_form() {\n $this->do_register_form();\n return $this->c_arr_register_form;\n }", "function getTemplates() {\n\n // Lets load the data if it doesn't already exist\n if (empty($this->_data)) {\n\n // constructs the query\n $query = ' SELECT * '\n . ' FROM #__templateck';\n\n // retrieves the data\n $this->_data = $this->_getList($query);\n }\n\n return $this->_data;\n }", "public function getTemplateEngine() {\n\t\treturn parent::getTemplateEngine();\n\t}", "public function getFromRegistry($name) {\n return Registry::get($name);\n }", "public function GetSavedTemplates() {\n\t\t$templates = &drupal_static(__FUNCTION__, NULL, $this->reset);\n\n\t\tif (!isset($templates)) {\n\t\t\t$templates = db_select('{'.ACQUIA_COMPOSER_TEMPLATES_TABLE.'}', 'ac')\n\t\t\t\t->fields('ac')\n\t\t\t\t->execute()\n\t\t\t\t->fetchAll(PDO::FETCH_ASSOC);\n\n\t\t\tif (!count($templates)) {\n\t\t\t\t$templates = array();\n\t\t\t}\n\t\t}\n\t\treturn $templates;\n\t}", "public function getTemplateBridge()\n {\n return $this->templateBridge;\n }", "public function getTemplates() : array\n {\n return [\n 'paths' => [\n 'elements' => [__DIR__ . '/../templates/'],\n ],\n ];\n }", "public function setRegistry()\n {\n $reg = controllers\\Registry::getInstance();\n foreach ($this->config as $key => $value)\n {\n $reg->setResource($key, $value, true);\n }\n\n\n }", "public function getTemplate() {\n\t\t\treturn $this->template;\n\t\t}", "function templates()\n {\n return [];\n }", "public function get_template_registration_id()\n {\n return $this->get_default_property(self::PROPERTY_TEMPLATE_REGISTRATION_ID);\n }", "public function getTemplate() {\r\n return $this->_template;\r\n }", "public function getRegisteredResources()\n {\n $result = array();\n foreach ($this->getResourcesTypes() as $type) {\n $result[$type] = $this->getRegisteredResourcesByType($type);\n }\n\n return $result;\n }", "public function getCurrentImagesSettings()\n {\n $currentSkinModule = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Module')\n ->getCurrentSkinModule();\n\n $skinModuleName = $currentSkinModule && $currentSkinModule->getActualName() !== \"XC\\ColorSchemes\"\n ? $currentSkinModule->getActualName()\n : 'default';\n\n return \\XLite\\Core\\Database::getRepo('XLite\\Model\\ImageSettings')\n ->findByModuleName($skinModuleName);\n }", "public function helpers()\n {\n if ($this->_helpers === null) {\n $this->_helpers = new HelperRegistry($this);\n }\n\n return $this->_helpers;\n }", "private static function _getTemplateInfo($template)\n {\n $templates = array();\n $tplPath = BaseSystem::getDataDir('Help').'/tplPaths.inc';\n if (file_exists($tplPath) === TRUE) {\n include $tplPath;\n }\n\n if (isset($templates[$template]) === TRUE) {\n return $templates[$template];\n }\n\n return array();\n\n }", "public function getRegistrants()\n {\n if (array_key_exists(\"registrants\", $this->_propDict)) {\n return $this->_propDict[\"registrants\"];\n } else {\n return null;\n }\n }", "public function getTemplate(){\n\t\treturn $this->template;\n\t}", "protected function getConverterRegistryMock()\n {\n return $this->getMock(\n 'ezp\\\\Persistence\\\\Storage\\\\Legacy\\\\Content\\\\FieldValue\\\\Converter\\\\Registry'\n );\n }", "public function getTemplates(){\n\t\n\t\tif( empty($this->_templates) ){\n\t\n\t\t\t$query\t= $this->_db->getQuery(true);\n\t\t\t\n\t\t\t$query->select( 't.tmpl_id AS value, t.tmpl_name AS text' );\n\t\t\t$query->from( '#__zbrochure_templates AS t' );\n\t\t\t$query->where( 't.tmpl_published = 1' );\n\t\t\t\n\t\t\t$this->_db->setQuery($query);\n\t\t\t$this->_templates = $this->_db->loadObjectList();\n\n\t\t}\n\t\t\n\t\treturn $this->_templates;\n\t\n\t}", "protected function getTemplateRepo()\n {\n if ($this->_templatesRepo === null || !$this->_templatesRepo) {\n $this->_templatesRepo = $this->getEntityRepository(Template::class);\n }\n\n return $this->_templatesRepo;\n }", "protected function _getTemplateProcessor()\n {\n if (null === $this->_templateProcessor) {\n $this->_templateProcessor = Mage::helper('catalog')->getPageTemplateProcessor();\n }\n return $this->_templateProcessor;\n }", "protected function _getTemplateProcessor()\n {\n if (null === $this->_templateProcessor) {\n $this->_templateProcessor = Mage::helper('catalog')->getPageTemplateProcessor();\n }\n return $this->_templateProcessor;\n }", "public function getFormTemplates();", "protected function getAvailableTemplates( )\n\t{\n\t\t$available_templates = $this->getConfig( 'templates' );\n\n\t\treturn $available_templates;\n\t}", "public function getConfiguratedTemplates() {\n\t\t$sql = 'SELECT * FROM '.$this->tablePrefix.UserAgentThemeSwitcherData::BROWSERS_TABLE;\n\t\t$results = $this->connection->get_results($sql);\n\n\t\treturn $results;\n\t}", "public function getTemplatesEngine() {\n\t\treturn $this->templatesEngine;\n\t}", "public function getTemplate() {\n return $this->template;\n }", "public function getRegistryAlias(): string;", "public function loadTemplate()\n {\n return json_decode(file_get_contents(app_path(self::BASE_TEMPLATE_PATH)), true);\n }" ]
[ "0.79117835", "0.648659", "0.63764477", "0.63603956", "0.63342166", "0.62918615", "0.6244733", "0.61262417", "0.6096462", "0.58326966", "0.58079904", "0.57800484", "0.57171875", "0.5639005", "0.5637214", "0.5611751", "0.5580527", "0.5562324", "0.5562324", "0.55464685", "0.55295885", "0.55250776", "0.55152607", "0.5469961", "0.5404298", "0.5285199", "0.5285199", "0.5285199", "0.5285199", "0.5285199", "0.5285199", "0.52835387", "0.52492267", "0.5228113", "0.5206986", "0.5183823", "0.51753044", "0.5149671", "0.5136409", "0.51220745", "0.51215714", "0.50958765", "0.5085542", "0.50831085", "0.5072427", "0.5067429", "0.5067429", "0.5066017", "0.50624675", "0.503523", "0.50268084", "0.5010482", "0.49627316", "0.49336982", "0.49332142", "0.49181822", "0.49027267", "0.48992628", "0.48737234", "0.48431027", "0.48424417", "0.48421675", "0.48393792", "0.4835282", "0.48332274", "0.483221", "0.4818079", "0.4807433", "0.47920904", "0.47875434", "0.478716", "0.47766837", "0.47732967", "0.4766986", "0.4758313", "0.47572437", "0.47527874", "0.47487855", "0.47380257", "0.47372395", "0.47323662", "0.4728697", "0.4720817", "0.47153702", "0.47142774", "0.4714182", "0.47115633", "0.47085088", "0.4707421", "0.47019884", "0.46917874", "0.4689224", "0.4689224", "0.46868166", "0.46859303", "0.4680462", "0.46784586", "0.46749067", "0.46745425", "0.467357" ]
0.69325733
1
getImageRegistry() Get the style registry.
public function getStyleRegistry() { return $this->spriteStyleRegistry; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getImageRegistry()\n {\n return $this->spriteImageRegistry;\n }", "public function getSpriteImageRegistry()\n {\n return $this->spriteImageRegistry;\n }", "public function getTemplateRegistry()\n {\n return $this->spriteTemplateRegistry;\n }", "public function getRegistryArray() {\n return $this->_registryArray;\n }", "public function &get_registry()\n {\n }", "public function getPathRegistry() {\n if (null == $this->pathRegistry) {\n $this->pathRegistry = new PathRegistry();\n }\n\n return $this->pathRegistry;\n }", "public function getMainRegistry()\n {\n return $this->registry;\n }", "public static function getRegistry(): CacheRegistry\n {\n return static::$_registry ??= new CacheRegistry();\n }", "public static function getExpanderRegistry() {\n return self::$dynamic_mixins;\n }", "public function registry()\n {\n if(!$this->defaultRegistry) {\n $this->defaultRegistry = $this('registry');\n }\n\n return $this->defaultRegistry;\n }", "static function getRegistry() {\n\t\tif ( self::$_Registry === false ) {\n\t\t\tself::$_Registry = new systemRegistry();\n\t\t}\n\t\treturn self::$_Registry;\n\t}", "public static function registry()\n {\n\t\tif ( empty(self::$registry) ){\n\t\t\tself::$registry = new Registry();\n\t\t}\n\t\treturn self::$registry;\n\n }", "public static function get_type_registry()\n {\n }", "static public function getCSS() {\n\t\treturn self::$css;\n\t}", "public static function getRegister(): array\n {\n return self::$smartObjectRegistry;\n }", "public function getStyleModules() {\n\t\treturn [];\n\t}", "public static function getCss() {\n return self::get('_css', array());\n }", "public function loadRegistry();", "protected function get_styles()\n\t{\n\t\t$sql = 'SELECT style_id, style_path, style_parent_id, bbcode_bitfield FROM ' . $this->styles_table;\n\n\t\treturn $this->fetch_decoded_rowset($sql);\n\t}", "function get_editor_stylesheets()\n {\n }", "public function getStyleSheets()\n {\n return $this->style_sheets;\n }", "public function getRegistryData()\n {\n return array();\n }", "protected function getRegistryProcessor()\n {\n return $this->registryProcessor;\n }", "protected function getRegistryProcessor()\n {\n return $this->registryProcessor;\n }", "public function get_styles() {\n\t\treturn [];\n\t}", "public function getCurrentImagesSettings()\n {\n $currentSkinModule = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Module')\n ->getCurrentSkinModule();\n\n $skinModuleName = $currentSkinModule && $currentSkinModule->getActualName() !== \"XC\\ColorSchemes\"\n ? $currentSkinModule->getActualName()\n : 'default';\n\n return \\XLite\\Core\\Database::getRepo('XLite\\Model\\ImageSettings')\n ->findByModuleName($skinModuleName);\n }", "protected function getGlobalShortcutGroups() {}", "public function getStylesheets()\n {\n return array('/sfEntityAttributeValuePlugin/css/jquery.formbuilder.css' => 'all');\n }", "function wp_get_global_stylesheet($types = array())\n {\n }", "protected function getRegistry() {\r\n if (!isset($this -> mReg)) {\r\n $this -> mReg = new CApp_Event_Action_Registry();\r\n }\r\n }", "function readStyles() { $this->ParseCSSFile();\n return $this->_stylelist; }", "public function getStyles()\n {\n return Styles::newInstance()->getStyles();\n }", "public function getStyle();", "function register_style() {\n}", "protected function getRegistryProcessor() : RegistryProcessorInterface\n {\n return $this->registryProcessor;\n }", "protected function getExtractorRegistry() {}", "public function getStyles()\n\t{\n\t\treturn $this->styles;\n\t}", "protected function getRegistry($namespace)\n\t{\n\t\t$namespace = strtolower($namespace);\n\n\t\tif (in_array($namespace, $this->registryKeys)) {\n\t\t\treturn $this->registry[$namespace];\n\t\t}\n\n\t\treturn $this->createRegistry($namespace);\n\t}", "public function getCSS()\n\t{\n\t\t$css = array();\n\t\treturn $css;\n\t}", "function getStyles () {\n return array(\"template.css\");\n }", "protected function getRegistryLoader()\n {\n return $this->registryLoader;\n }", "private function _getResourceCss()\n {\n return array(\n '../libs/css/plugins/validationEngine.jquery.css'\n );\n }", "public function getCss();", "public function getCss();", "abstract public function register_style();", "public function getColorSpace() {}", "public function getStyles()\n {\n return $this->_styles;\n }", "public function getStyleSheet() {\n return 'control';\n }", "public function getColorSpace() {}", "public function getStyles() {\n return $this->styles;\n }", "public static function getAll()\r\n {\r\n return self::$typeRegistry;\r\n }", "static public function getThemeResourceTypes();", "public function dump()\n {\n return $this->registry;\n }", "public function getStyles() {\n return $this->_styles;\n }", "public function getStylesheets()\n {\n return array('/cpCmsPlugin/css/widget.css' => 'all');\n }", "public function getStyleLoader();", "public function getCss()\n {\n $result = $this->_css;\n foreach ($this->_packages as $package) {\n $config = $this->getConfig($package);\n if (!empty($config['css'])) {\n foreach ($config['css'] as $item) {\n $result[] = $item;\n }\n }\n }\n return $result;\n }", "public function getAlternateColorSpace() {}", "public function getAlternateColorSpace() {}", "public function getAlternateColorSpace() {}", "public static function getStyle ()\n {\n return self::$_style;\n }", "public function getAllCSS()\n {\n return $this->css;\n }", "function getStyleSheet() {\n\t\treturn $this->getPluginPath() . '/styles/objectsForReview.css';\n\t}", "function wp_get_global_styles_custom_css()\n {\n }", "public function getStyle() {}", "function get_themes()\n {\n }", "public function getValueRegistry()\n {\n return null;\n }", "public function get_styles () {\r\n\t\treturn empty($this->_data[self::STYLES])\r\n\t\t\t? array()\r\n\t\t\t: $this->_data[self::STYLES]\r\n\t\t;\r\n\t}", "public function getColorPalette() {\n\t\treturn 'XLSConfig::$systemPalette';\n\t}", "public function getRegistries()\n {\n return $this->registries;\n }", "public function getSpriteCache()\n {\n return $this->spriteImageRegistry->getSpriteCache();\n }", "public function getImageList() {\n\t\t\treturn $this->imageList;\n\t\t}", "function coder_upgrade_theme_build_registry() {\n// cdp(\"inside \" . __FUNCTION__);\n // Get the list of disabled core modules.\n $list = coder_upgrade_module_list(TRUE, 0);\n\n $cache = array();\n $hook = 'theme';\n // TODO In the D8 release of this module, will need to use the correct file.\n // $hook_info = module_hook_info();\n foreach ($list as $module => $stuff) { // foreach (module_implements('theme') as $module) {\n module_load_include('module', $module);\n if (module_hook($module, $hook)) { // || (isset($hook_info[$hook]['group']) && $include_file = module_load_include('inc', $module, $module . '.' . $hook_info[$hook]['group']) && module_hook($module, $hook))) {\n _theme_process_registry($cache, $module, 'module', $module, $path = drupal_get_path('module', $module));\n }\n }\n return $cache;\n}", "public static function get_theme_class_map() {\n return self::$theme_class_map;\n }", "protected function searchBackgroundImage() {\n\t\t$resources = FALSE;\n\n\t\tif (isset($this->settings['mode']) && $this->settings['mode'] == 'directory' && trim($this->settings['directory']) !== '') {\n\t\t\t// Get background image from a directory\n\t\t\t$resources = $this->searchBackgroundImageInDirectory();\n\t\t}\n\n\t\tif (!isset($this->settings['mode']) || $this->settings['mode'] == 'rootline') {\n\t\t\t// Get background image from a rootline\n\t\t\t$resources = $this->searchBackgroundImageInRootline();\n\n\t\t}\n\n\t\tif ($resources == FALSE || !($resources instanceof Tx_Extbase_Persistence_ObjectStorage && $resources->current() instanceof Tx_Supersized_Domain_Model_Resource)) {\n\t\t\t$this->setDefaultBackgroundImage();\n\t\t}\n\n\t\treturn $resources;\n\t}", "protected static function registerStyles() {\n\t\tforeach (static::$styles as $handle => $stylePath) {\n\t\t\tstatic::registerStyle($handle, $stylePath);\n\t\t}\n\t}", "function wp_get_global_styles_svg_filters()\n {\n }", "private function getStylesheets() {\n $themes = [];\n $stylesheet_options = [];\n $theme_handler = Drupal::service('theme_handler');\n\n foreach ($theme_handler->listInfo() as $name => $theme) {\n $themes = $theme_handler->listInfo();\n $names = $themes[$name]->info['name'];\n $path = DRUPAL_ROOT . '/' . $theme\n ->getPath();\n $stylesheete = $path . '/css/' . $name . '.' . 'ckeditor.css';\n $default_stylesheet = drupal_get_path('module', 'ckeditor_stylesheetparser') . '/js/plugins/stylesheetparser/samples/assets/sample.css';\n\n if (file_exists($stylesheete)) {\n $stylesheet_options = [$stylesheete => $names];\n } elseif (!file_exists($stylesheete)) {\n $stylesheet_options = [$default_stylesheet => $names];\n }\n return $stylesheet_options ;\n }\n }", "public function getSutRegistry() {\n if (null == $this->sutRegistry) {\n $this->sutRegistry = new SutRegistry();\n }\n\n return $this->sutRegistry;\n }", "public function getTheme();", "public function getFrontendStyles() {\n }", "public function getFrontendStyles() {\n }", "public function theme_locations() {\n return $this->_theme_locations;\n }", "function getStyle() {return $this->readstyle();}", "public function getColorList()\n {\n return $this->colorList;\n }", "private function getImageStylesConfig() {\n static $styles = [];\n if (!empty($styles)) {\n return $styles;\n }\n $image_style_config_files = Utils::getConfigFiles($this->scaffolder->getConfigDir() . '/image_style');\n if (!empty($image_style_config_files)) {\n foreach ($image_style_config_files as $image_style_config_file) {\n $config_data = Utils::getConfig($image_style_config_file);\n if ($config_data) {\n if (!empty($config_data['image_styles'])) {\n $prefix_machine_name = isset($config_data['prefix']['machine_name']) ? $config_data['prefix']['machine_name'] : '';\n $prefix_name = isset($config_data['prefix']['name']) ? $config_data['prefix']['name'] : '';\n $multiplier_config = isset($config_data['multiplier']) ? $config_data['multiplier'] : ['1x' => '1x'];\n $multiplier = [];\n foreach ($multiplier_config as $key => $value) {\n $multiplier[$value] = floatval(str_replace('x', '', $value));\n }\n\n $new_image_styles = [];\n foreach ($multiplier as $suffix => $scale) {\n foreach ($config_data['image_styles'] as $config) {\n $config['name'] = empty($config['name']) ? $config['machine_name'] : $config['name'];\n $config['name'] = $prefix_name . $config['name'];\n $config['machine_name'] = $prefix_machine_name . $config['machine_name'];\n if (count($multiplier) > 1) {\n $config['name'] .= '@' . $suffix;\n $config['machine_name'] .= '_' . $suffix;\n }\n $config['machine_name'] = preg_replace(\"/[^a-z0-9_]/\", '_', $config['machine_name']);\n\n if ($config['effects']) {\n foreach ($config['effects'] as $key => &$effects) {\n $index = $key + 1;\n $effects['index'] = $index;\n $effects['weight'] = empty($effects['weight']) ? $index : $effects['weight'];\n foreach (array('width', 'height') as $k) {\n if (isset ($effects['data'][$k])) {\n $effects['data'][$k] = round($effects['data'][$k] * $scale);\n }\n }\n }\n }\n $styles[$config['machine_name']] = $this->getImageData($config);\n }\n }\n }\n }\n }\n }\n return $styles;\n }", "public function getCss()\n {\n return $this->data(self::CSS);\n }", "private function getStylesheet() {\n $themes = [];\n $stylesheet_options = [];\n $theme_handler = Drupal::service('theme_handler');\n foreach ($theme_handler->listInfo() as $name => $theme) {\n $themes = [];\n $stylesheet_options = [];\n $theme_handler = Drupal::service('theme_handler');\n foreach ($theme_handler->listInfo() as $name => $theme) {\n $themes[$name] = DRUPAL_ROOT . '/' . $theme\n ->getPath();\n if (file_exists($themes[$name])) {\n $stylesheet = $themes[$name] . '/css/' . $name . '.' . 'ckeditor.css';\n }\n else {\n $stylesheet = drupal_get_path('module', 'ckeditor_stylesheetparser') . '/js/plugins/stylesheetparser/samples/assets/sample.css';\n }\n }\n $stylesheet_options = $stylesheet;\n return $stylesheet_options;\n }\n }", "function ReturnIconSizes() {\r\n\t\t\t/* You also need to create new icons and copy them into the images folder (iconsize_browsername.png)*/\r\n\t\t\t$arr_icons = array('16', '24', '32');\r\n\t\t\treset($arr_icons);\r\n\t\t\treturn $arr_icons;\r\n\t\t}", "function ac_skin_get_all_group_styles($reset = FALSE) {\n $skin_settings = &drupal_static(__FUNCTION__, array());\n\n $settings = ac_skin_get_theme_skin_items();\n foreach($settings as $group => $def) {\n\tif (is_array($def)) {\n\t // load group def file\n\t ac_skin_load_skin_group_file($group);\n\n\t $styles_func = $def['styles callback'];\n\t if (function_exists($styles_func)) {\n\t\t$skin_settings[$group] = $styles_func();\n\t }\n\t}\n }\n\n return $skin_settings;\n}", "protected function get_assets() {\n\t\treturn [\n\t\t\tnew StyleAsset(\n\t\t\t\tself::CSS_HANDLE,\n\t\t\t\tself::CSS_URI\n\t\t\t),\n\t\t];\n\t}", "public function getStyle()\n\t{\n\t\treturn $this->root->getParser()->style;\n\t}", "static function getInstance() {\n if (is_null(self::$instance)) {\n self::$instance = new Registry();\n }\n\n return self::$instance;\n }", "public function getGs()\n {\n return $this->get(self::_GS);\n }", "public function getGs()\n {\n return $this->get(self::_GS);\n }", "public function getGs()\n {\n return $this->get(self::_GS);\n }", "public function getGs()\n {\n return $this->get(self::_GS);\n }", "public function getGs()\n {\n return $this->get(self::_GS);\n }", "public function getGs()\n {\n return $this->get(self::_GS);\n }", "public function getGs()\n {\n return $this->get(self::_GS);\n }" ]
[ "0.7306808", "0.6684028", "0.6571037", "0.6259464", "0.618814", "0.600374", "0.59624726", "0.5875376", "0.5873722", "0.5839037", "0.5703135", "0.5633389", "0.5621689", "0.54181725", "0.53901887", "0.53840905", "0.53783303", "0.5371194", "0.5368176", "0.5363021", "0.53401476", "0.5327111", "0.5325028", "0.5325028", "0.52990115", "0.5269084", "0.5261841", "0.5229509", "0.5215876", "0.51995283", "0.51880217", "0.5171195", "0.51509124", "0.5142934", "0.51413506", "0.5134899", "0.5122876", "0.511973", "0.5113637", "0.51134944", "0.51123255", "0.50984395", "0.5093618", "0.5093618", "0.50919783", "0.5085327", "0.50848746", "0.5082865", "0.5082403", "0.5025694", "0.50227284", "0.50115716", "0.5006209", "0.49997094", "0.49976003", "0.49842423", "0.4983761", "0.4972087", "0.4972087", "0.4972087", "0.49504197", "0.49335808", "0.49206415", "0.49180043", "0.49104118", "0.49094006", "0.49052137", "0.48991343", "0.48818198", "0.48749176", "0.48735082", "0.48666653", "0.4865866", "0.48657876", "0.48460826", "0.4844816", "0.4842768", "0.4826993", "0.48248523", "0.48199537", "0.4813205", "0.4813205", "0.48068747", "0.48024234", "0.4799298", "0.4776974", "0.47745398", "0.4760873", "0.4758625", "0.47572547", "0.47529572", "0.4737272", "0.4733753", "0.4721823", "0.4721823", "0.4721823", "0.4721823", "0.4721823", "0.4721823", "0.4721823" ]
0.8072847
0
getStyleRegistry() Compute the sprite image and its CSS rules.
public function process() { $this->spriteImageRegistry->processSprites(); $this->spriteTemplateRegistry->preprocessTemplates(); $this->spriteTemplateRegistry->processTemplates(); $this->spriteStyleRegistry->processCss(); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStyleRegistry()\n {\n return $this->spriteStyleRegistry;\n }", "public function getSpriteImageRegistry()\n {\n return $this->spriteImageRegistry;\n }", "public function getImageRegistry()\n {\n return $this->spriteImageRegistry;\n }", "public function getTemplateRegistry()\n {\n return $this->spriteTemplateRegistry;\n }", "public function getSpriteCache()\n {\n return $this->spriteImageRegistry->getSpriteCache();\n }", "static public function getCSS() {\n\t\treturn self::$css;\n\t}", "public function getCss();", "public function getCss();", "private function getImageStylesConfig() {\n static $styles = [];\n if (!empty($styles)) {\n return $styles;\n }\n $image_style_config_files = Utils::getConfigFiles($this->scaffolder->getConfigDir() . '/image_style');\n if (!empty($image_style_config_files)) {\n foreach ($image_style_config_files as $image_style_config_file) {\n $config_data = Utils::getConfig($image_style_config_file);\n if ($config_data) {\n if (!empty($config_data['image_styles'])) {\n $prefix_machine_name = isset($config_data['prefix']['machine_name']) ? $config_data['prefix']['machine_name'] : '';\n $prefix_name = isset($config_data['prefix']['name']) ? $config_data['prefix']['name'] : '';\n $multiplier_config = isset($config_data['multiplier']) ? $config_data['multiplier'] : ['1x' => '1x'];\n $multiplier = [];\n foreach ($multiplier_config as $key => $value) {\n $multiplier[$value] = floatval(str_replace('x', '', $value));\n }\n\n $new_image_styles = [];\n foreach ($multiplier as $suffix => $scale) {\n foreach ($config_data['image_styles'] as $config) {\n $config['name'] = empty($config['name']) ? $config['machine_name'] : $config['name'];\n $config['name'] = $prefix_name . $config['name'];\n $config['machine_name'] = $prefix_machine_name . $config['machine_name'];\n if (count($multiplier) > 1) {\n $config['name'] .= '@' . $suffix;\n $config['machine_name'] .= '_' . $suffix;\n }\n $config['machine_name'] = preg_replace(\"/[^a-z0-9_]/\", '_', $config['machine_name']);\n\n if ($config['effects']) {\n foreach ($config['effects'] as $key => &$effects) {\n $index = $key + 1;\n $effects['index'] = $index;\n $effects['weight'] = empty($effects['weight']) ? $index : $effects['weight'];\n foreach (array('width', 'height') as $k) {\n if (isset ($effects['data'][$k])) {\n $effects['data'][$k] = round($effects['data'][$k] * $scale);\n }\n }\n }\n }\n $styles[$config['machine_name']] = $this->getImageData($config);\n }\n }\n }\n }\n }\n }\n return $styles;\n }", "abstract public function register_style();", "public static function getCss() {\n return self::get('_css', array());\n }", "public function getSpriteCache()\n {\n return $this->spriteCache;\n }", "public function getSpriteConfig()\n {\n return $this->spriteImageRegistry->getSpriteConfig();\n }", "protected function buildCssAndRegisterIcons() {}", "function baseCss($nameCSS){ \n global $name;\n global $nameCSS;\n \n $cssbase = \".sprite{\\n\n background-image: url(\".'\"'.$name.'\"'.\");\\n\n background-repeat: no-repeat;\\n\n display: block;\\n\n}\\n\";\n $handle = fopen($nameCSS, \"w\");\n $write = fwrite($handle, $cssbase);\n}", "public function getStylesheets()\n {\n return array('/sfEntityAttributeValuePlugin/css/jquery.formbuilder.css' => 'all');\n }", "protected function loadStylesheets() {}", "function register_style() {\n}", "public function getStyleLoader();", "function get_editor_stylesheets()\n {\n }", "function readStyles() { $this->ParseCSSFile();\n return $this->_stylelist; }", "protected static function registerStyles() {\n\t\tforeach (static::$styles as $handle => $stylePath) {\n\t\t\tstatic::registerStyle($handle, $stylePath);\n\t\t}\n\t}", "private function _getResourceCss()\n {\n return array(\n '../libs/css/plugins/validationEngine.jquery.css'\n );\n }", "function my_generate_css($info, $scandir, $pos, $i){\n ($pos == 0) ? $neg = \"\" : $neg = \"-\";\n global $nameCSS;\n $chaine = '|.(.*?)/|iU';\n $scandir = preg_replace($chaine,'',$scandir);\n$css = \".sprite-\".substr($scandir[$i], 0,-4).\"{ \\n\n width: \".$info[0].\"px;\\n\n height: \".$info[1].\"px;\\n\n background-position: \".$neg.$pos .\"px 0px;\\n\n}\\n\";\n $handle = fopen($nameCSS, \"a\");\n $write = fwrite($handle, $css);\n fclose($handle);\n}", "protected function generateCSS() {}", "public function getDynamicCss(){\r\n\t\t$db = new RevSliderDB();\r\n\r\n\t\t$styles = $db->fetch(RevSliderGlobals::$table_css);\r\n\t\t$styles = RevSliderCssParser::parseDbArrayToCss($styles, \"\\n\");\r\n\r\n\t\treturn $styles;\r\n\t}", "public function getCSS()\n\t{\n\t\t$css = array();\n\t\treturn $css;\n\t}", "public function get_custom_css()\n {\n }", "protected function regStyles() {\n $this->modx->regClientCSS($this->config['cssUrl'] . 'web/bbcode/bbcode.css');\n $this->modx->regClientCSS($this->config['cssUrl'] . 'web/styles.css');\n }", "public function get_stylesheet_css()\n {\n }", "public function getStyle();", "public function getSpriteConfig()\n {\n return $this->spriteConfig;\n }", "protected function get_assets() {\n\t\treturn [\n\t\t\tnew StyleAsset(\n\t\t\t\tself::CSS_HANDLE,\n\t\t\t\tself::CSS_URI\n\t\t\t),\n\t\t];\n\t}", "private function getImageIntoCss(): void\n {\n preg_match_all(self::REGEX_IMAGE_FORMAT, $this->sContents, $aHit, PREG_PATTERN_ORDER);\n\n for ($i = 0, $iCountHit = count($aHit[0]); $i < $iCountHit; $i++) {\n $sImgPath = PH7_PATH_ROOT . $this->sBaseUrl . $aHit[1][$i] . $aHit[2][$i];\n $sImgUrl = PH7_URL_ROOT . $this->sBaseUrl . $aHit[1][$i] . $aHit[2][$i];\n\n if ($this->isDataUriEligible($sImgPath)) {\n $this->sContents = str_replace(\n $aHit[0][$i],\n 'url(' . Optimization::dataUri($sImgPath, $this->oFile) . ')',\n $this->sContents\n );\n } else {\n $this->sContents = str_replace(\n $aHit[0][$i],\n 'url(' . $sImgUrl . ')',\n $this->sContents\n );\n }\n }\n }", "public function getStyleSheets()\n {\n return $this->style_sheets;\n }", "protected function image_style() {\n\t\t$this->start_controls_section(\n\t\t\t'section_style_retina_image',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Retina Image', 'boostify' ),\n\t\t\t\t'tab' => Controls_Manager::TAB_STYLE,\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'width',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Width', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'default' => array(\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'tablet_default' => array(\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'mobile_default' => array(\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'size_units' => array( '%', 'px', 'vw' ),\n\t\t\t\t'range' => array(\n\t\t\t\t\t'%' => array(\n\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t),\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t'max' => 1000,\n\t\t\t\t\t),\n\t\t\t\t\t'vw' => array(\n\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image img' => 'width: {{SIZE}}{{UNIT}};',\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image .wp-caption .widget-image-caption' => 'width: {{SIZE}}{{UNIT}}; display: inline-block;',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'space',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Max Width', 'boostify' ) . ' (%)',\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'default' => array(\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'tablet_default' => array(\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'mobile_default' => array(\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'size_units' => array( '%' ),\n\t\t\t\t'range' => array(\n\t\t\t\t\t'%' => array(\n\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image img' => 'max-width: {{SIZE}}{{UNIT}};',\n\t\t\t\t\t'{{WRAPPER}} .wp-caption-text' => 'max-width: {{SIZE}}{{UNIT}}; display: inline-block; width: 100%;',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'separator_panel_style',\n\t\t\tarray(\n\t\t\t\t'type' => Controls_Manager::DIVIDER,\n\t\t\t\t'style' => 'thick',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'retina_image_border',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Border Style', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'default' => 'none',\n\t\t\t\t'label_block' => false,\n\t\t\t\t'options' => array(\n\t\t\t\t\t'none' => __( 'None', 'boostify' ),\n\t\t\t\t\t'solid' => __( 'Solid', 'boostify' ),\n\t\t\t\t\t'double' => __( 'Double', 'boostify' ),\n\t\t\t\t\t'dotted' => __( 'Dotted', 'boostify' ),\n\t\t\t\t\t'dashed' => __( 'Dashed', 'boostify' ),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image-container .boostify-retina-img' => 'border-style: {{VALUE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t\t$this->add_control(\n\t\t\t'retina_image_border_size',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Border Width', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::DIMENSIONS,\n\t\t\t\t'size_units' => array( 'px' ),\n\t\t\t\t'default' => array(\n\t\t\t\t\t'top' => '1',\n\t\t\t\t\t'bottom' => '1',\n\t\t\t\t\t'left' => '1',\n\t\t\t\t\t'right' => '1',\n\t\t\t\t\t'unit' => 'px',\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'retina_image_border!' => 'none',\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image-container .boostify-retina-img' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'retina_image_border_color',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Border Color', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'retina_image_border!' => 'none',\n\t\t\t\t),\n\t\t\t\t'default' => '',\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image-container .boostify-retina-img' => 'border-color: {{VALUE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'image_border_radius',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Border Radius', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::DIMENSIONS,\n\t\t\t\t'size_units' => array( 'px', '%' ),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->start_controls_tabs( 'image_effects' );\n\n\t\t$this->start_controls_tab(\n\t\t\t'normal',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Normal', 'boostify' ),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'opacity',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Opacity', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'max' => 1,\n\t\t\t\t\t\t'min' => 0.10,\n\t\t\t\t\t\t'step' => 0.01,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image img' => 'opacity: {{SIZE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Css_Filter::get_type(),\n\t\t\tarray(\n\t\t\t\t'name' => 'css_filters',\n\t\t\t\t'selector' => '{{WRAPPER}} .boostify-retina-image img',\n\t\t\t)\n\t\t);\n\n\t\t$this->end_controls_tab();\n\n\t\t$this->start_controls_tab(\n\t\t\t'hover',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Hover', 'boostify' ),\n\t\t\t)\n\t\t);\n\t\t$this->add_control(\n\t\t\t'opacity_hover',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Opacity', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'max' => 1,\n\t\t\t\t\t\t'min' => 0.10,\n\t\t\t\t\t\t'step' => 0.01,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image:hover img' => 'opacity: {{SIZE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Css_Filter::get_type(),\n\t\t\tarray(\n\t\t\t\t'name' => 'css_filters_hover',\n\t\t\t\t'selector' => '{{WRAPPER}} .boostify-retina-image:hover img',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'hover_animation',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Hover Animation', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::HOVER_ANIMATION,\n\t\t\t)\n\t\t);\n\t\t$this->add_control(\n\t\t\t'background_hover_transition',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Transition Duration', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'max' => 3,\n\t\t\t\t\t\t'step' => 0.1,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image img' => 'transition-duration: {{SIZE}}s',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->end_controls_tab();\n\n\t\t$this->end_controls_tabs();\n\n\t\t$this->end_controls_section();\n\t}", "public function get_sitemap_index_stylesheet()\n {\n }", "public function get_sitemap_stylesheet()\n {\n }", "public function styles() {\n\t\treturn apply_filters( 'tf_module_page_featured_image_styles', array(\n\t\t\t'tf_module_page_featured_image_container' => array(\n\t\t\t\t'label' => __( 'Image Container', 'themify-flow' ),\n\t\t\t\t'selector' => '.tf_page_featured_image',\n\t\t\t\t'basic_styling' => array( 'background', 'font', 'padding', 'margin', 'border' ),\n\t\t\t),\n\t\t\t'tf_module_page_featured_image_image' => array(\n\t\t\t\t'label' => __( 'Image', 'themify-flow' ),\n\t\t\t\t'selector' => '.tf_page_featured_image img',\n\t\t\t)\n\t\t) );\n\t}", "public function getAllCSS()\n {\n return $this->css;\n }", "public static function getCSS()\n {\n $css =\n'<style>\n\tinput[type=\"radio\"], input[type=\"checkbox\"] {\n\t\twidth: auto;\n\t}\n\t/* Slide fieldsets*/\n\tdiv.panel-body legend {\n\t\tbackground: transparent url(\"' . rex_addon::get('d2u_helper')->getAssetsUrl('arrows.png') . '\") no-repeat 0px 7px;\n\t\tpadding-left: 19px;\n\t}\n\tdiv.panel-body legend.open {\n\t\tbackground-position: 0px -36px;\n\t}\n\t.panel-body-wrapper.slide {\n\t\tdisplay: none;\n\t}\n\tinput:invalid, select:invalid, textarea:invalid {\n\t\tbackground-color: pink;\n\t}\n</style>';\n return $css;\n }", "public function getStyleSheet() {\n return 'control';\n }", "public function getCss()\n {\n return $this->data(self::CSS);\n }", "public function generate()\r\n {\r\n if(!extension_loaded('gd'))\r\n {\r\n return Console::error(\"GD library is currently not supported in your machine.\");\r\n }\r\n\r\n if(!file_exists($this->image_path))\r\n {\r\n return Console::error(\"Location is missing or invalid.\");\r\n }\r\n\r\n if(!empty($this->images))\r\n {\r\n Console::log(\"Sprite \" . static::$version);\r\n Console::success(\"Sprite generation has started...\");\r\n Console::lineBreak();\r\n\r\n Console::warn(\"Sprite Name :\\e[39m \" . $this->name);\r\n Console::warn(\"Location :\\e[39m \" . $this->location);\r\n Console::warn(\"Icons Found :\\e[39m \" . sizeof($this->images));\r\n Console::warn(\"Image Type :\\e[39m \" . implode(\", \", $this->extensions));\r\n Console::warn(\"Image Path :\\e[39m \" . $this->image_path . \"\\sprite-\" . $this->name . \".png\");\r\n Console::warn(\"CSS Path :\\e[39m \" . $this->css_path . \"\\sprite-\" . $this->name . \".css\");\r\n\r\n $tiles = array();\r\n $width = 0;\r\n $height = 0;\r\n $largest_height = 0;\r\n $largest_heights = array();\r\n $canvas_width = 0;\r\n $canvas_height = 0;\r\n $n = 0;\r\n\r\n foreach($this->images as $image)\r\n {\r\n $n++;\r\n\r\n if($image->exists() && \r\n $image->getWidth() >= $this->getMinSize() && \r\n $image->getHeight() >= $this->getMinSize() &&\r\n $image->getWidth() <= $this->getMaxSize() &&\r\n $image->getHeight() <= $this->getMaxSize()\r\n )\r\n {\r\n $x = $width;\r\n $y = $height;\r\n $z = false;\r\n\r\n if($image->getHeight() > $largest_height)\r\n {\r\n $largest_height = $image->getHeight();\r\n }\r\n\r\n $tiles[] = new Tile($image, $x, $y);\r\n\r\n if(($width + $image->getWidth()) > $width && ($width + $image->getWidth()) <= $this->max_width)\r\n {\r\n $width += $image->getWidth();\r\n }\r\n\r\n if($width > $canvas_width)\r\n {\r\n $canvas_width = $width;\r\n }\r\n\r\n if($n == sizeof($this->images) && !$z)\r\n {\r\n $z = true;\r\n $largest_heights[] = $largest_height;\r\n }\r\n\r\n if(($width + $image->getWidth()) > $this->max_width)\r\n {\r\n $width = 0;\r\n $height += $largest_height;\r\n\r\n if(!$z)\r\n {\r\n $largest_heights[] = $largest_height;\r\n }\r\n\r\n $largest_height = 0;\r\n }\r\n }\r\n }\r\n \r\n if(empty($tiles))\r\n {\r\n return Console::error(\"No image assets to compile.\");\r\n }\r\n\r\n $canvas_height = array_sum($largest_heights);\r\n $canvas = imagecreatetruecolor($canvas_width, $canvas_height);\r\n $file_img = $this->image_path . '\\sprite-' . $this->name . '.png';\r\n $file_css = $this->css_path . '\\sprite-' . $this->name . '.css';\r\n $copies = array();\r\n $css = array();\r\n\r\n Console::warn(\"Canvas Width :\\e[39m \" . $canvas_width . 'px');\r\n Console::warn(\"Canvas Height :\\e[39m \" . $canvas_height . 'px');\r\n Console::lineBreak();\r\n\r\n if(file_exists($file_img))\r\n {\r\n Console::success(\"Existing sprite image has been deleted.\");\r\n unlink($file_img);\r\n }\r\n\r\n if(file_exists($file_css))\r\n {\r\n Console::success(\"Existing sprite stylesheet has been deleted.\");\r\n unlink($file_css);\r\n }\r\n\r\n imagefill($canvas, 0, 0, IMG_COLOR_TRANSPARENT);\r\n imagesavealpha($canvas, true);\r\n imagealphablending($canvas, true);\r\n\r\n if(!is_null($this->base_url))\r\n {\r\n $background = $this->base_url . \"/sprite-\" . $this->name . '.png';\r\n }\r\n else\r\n {\r\n $background = \"sprite-\" . $this->name . '.png';\r\n }\r\n\r\n $css[] = \".sprite-\" . $this->name . \"{background-image:url('$background') !important;background-color:transparent;background-repeat:no-repeat}\";\r\n\r\n foreach($tiles as $tile)\r\n {\r\n $image = $tile->getImage();\r\n $resource = $tile->getResource();\r\n\r\n imagecopy($canvas, $resource, $tile->getX(), $tile->getY(), 0, 0, $tile->getWidth(), $tile->getHeight());\r\n\r\n $copies[] = $resource;\r\n $styles = \".sprite-\" . $this->name . \"-\" . $image->getName() . \"{\";\r\n $styles .= \"background-position:\" . ($tile->getX() * -1) . \"px \" . ($tile->getY() * -1) . \"px !important;\";\r\n $styles .= \"width:\" . $tile->getWidth() . \"px;\";\r\n $styles .= \"height:\" . $tile->getHeight() . \"px\";\r\n\r\n $css[] = $styles . \"}\";\r\n }\r\n\r\n Console::success(\"Sprite image has been generated.\");\r\n imagepng($canvas, $file_img, $this->quality);\r\n imagedestroy($canvas);\r\n\r\n foreach($copies as $copy)\r\n {\r\n imagedestroy($copy);\r\n }\r\n\r\n $file = fopen($file_css, 'w');\r\n fwrite($file, implode(PHP_EOL, $css));\r\n fclose($file);\r\n\r\n Console::success(\"Sprite stylesheet has been generated.\");\r\n Console::success(\"Sprite has been successfully generated.\");\r\n }\r\n else\r\n {\r\n Console::error(\"No image assets to compile.\");\r\n }\r\n }", "private function initStyle(){\n\t\t\t$file_style_normal = $this->root_path.'portal/realmstatus/wowclassic/styles/wowstatus.style_normal.class.php';\n\t\t\t$file_style_gdi = $this->root_path.'portal/realmstatus/wowclassic/styles/wowstatus.style_gdi.class.php';\n\t\t\t\n\t\t\t// include the files\n\t\t\tinclude_once($file_style_normal);\n\t\t\tinclude_once($file_style_gdi);\n\t\t\t\n\t\t\t// get class\n\t\t\tif ($this->config->get('gd', 'pmod_'.$this->moduleID))\n\t\t\t\t$this->style = registry::register('wowstatus_style_gdi');\n\t\t\t\telse\n\t\t\t\t\t$this->style = registry::register('wowstatus_style_normal');\n\t\t}", "private function getCSS()\n\t{\n\t\t$prefix = $this->getPrefix();\n\t\tlist($firstElement, $lastElement) = $this->getBounds();\n\t\t$isFirst = ($firstElement == $this->element);\n\t\t$isLast = ($lastElement == $this->element);\n\t\t$hasChildren = ($this->element->ContainerElement->Children->Count() > 0);\n\t\t$CSSClasses = [];\n\t\t\n\t\tif ($isFirst && $isLast) {\n\t\t\t$CSSClasses[] = \"$prefix-last\";\n\t\t} else if ($isFirst) {\n\t\t\t$CSSClasses[] = \"$prefix-first\";\n\t\t} else if ($isLast) {\n\t\t\t$CSSClasses[] = \"$prefix-last\";\n\t\t}\n\t\tif ($hasChildren) {\n\t\t\t$CSSClasses[] = \"$prefix-parent\";\n\t\t}\n\t\tif ($this->element->GetCollapsed()) {\n\t\t\t$CSSClasses[] = \"$prefix-collapsed\";\n\t\t}\n\t\tif ($this->element->GetDisabled()) {\n\t\t\t$CSSClasses[] = \"$prefix-item-disabled\";\n\t\t}\n\t\treturn array_merge($this->element->CSSClass, $CSSClasses);\n\t}", "protected function getStylesheets()\n {\n $stylesheets = parent::getStylesheets();\n $stylesheets[] = 'styles/css/minimal/minimal.css';\n return $stylesheets;\n }", "protected function loadRegisteredSprites() {}", "protected function get_styles()\n\t{\n\t\t$sql = 'SELECT style_id, style_path, style_parent_id, bbcode_bitfield FROM ' . $this->styles_table;\n\n\t\treturn $this->fetch_decoded_rowset($sql);\n\t}", "public function styles() {\n\n\t\t$styles = array(\n\t\t\tarray(\n\t\t\t\t'handle' => 'gform_dropbox_jstree',\n\t\t\t\t'src' => $this->get_base_url() . '/css/jstree/style.css',\n\t\t\t\t'version' => $this->_version,\n\t\t\t\t'enqueue' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'admin_page' => array( 'form_settings' ),\n\t\t\t\t\t\t'tab' => $this->_slug,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'handle' => 'gform_dropbox_admin',\n\t\t\t\t'src' => $this->get_base_url() . '/css/admin.css',\n\t\t\t\t'version' => $this->_version,\n\t\t\t\t'enqueue' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'admin_page' => array( 'plugin_settings' ),\n\t\t\t\t\t\t'tab' => $this->_slug,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'handle' => 'gform_dropbox_frontend',\n\t\t\t\t'src' => $this->get_base_url() . '/css/frontend.css',\n\t\t\t\t'version' => $this->_version,\n\t\t\t\t'enqueue' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'field_types' => array( 'dropbox' )\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\n\t\treturn array_merge( parent::styles(), $styles );\n\n\t}", "public function getStyles()\n {\n return Styles::newInstance()->getStyles();\n }", "public function getStyle() {}", "public function registerStyles() {\n $this->styles['mkdf-bootstrap'] = 'assets/css/mkdf-bootstrap.css';\n $this->styles['mkdf-page-admin'] = 'assets/css/mkdf-page.css';\n $this->styles['mkdf-options-admin'] = 'assets/css/mkdf-options.css';\n $this->styles['mkdf-meta-boxes-admin'] = 'assets/css/mkdf-meta-boxes.css';\n $this->styles['mkdf-ui-admin'] = 'assets/css/mkdf-ui/mkdf-ui.css';\n $this->styles['mkdf-forms-admin'] = 'assets/css/mkdf-forms.css';\n $this->styles['mkdf-import'] = 'assets/css/mkdf-import.css';\n $this->styles['font-awesome-admin'] = 'assets/css/font-awesome/css/font-awesome.min.css';\n\n foreach ($this->styles as $styleHandle => $stylePath) {\n sienna_mikado_register_skin_style($styleHandle, $stylePath);\n }\n\n }", "public function get_styles() {\n\t\treturn [];\n\t}", "public function getCSprite()\n {\n return $this->spriteImageRegistry->getCSprite();\n }", "private function generateSpritemap ()\n {\n $sprites = $this->sprites;\n $len = count($sprites);\n $node;\n\n usort($sprites, function ( $a, $b ) {\n $asa = $a->height;\n $bsa = $b->height;\n return ($asa > $bsa) ? -1 : 1;\n });\n\n $packer = new SpritePacker;\n $packer->fit($sprites);\n\n $this->width = $packer->pack->w;\n $this->height = $packer->pack->h;\n\n $spritemap = imagecreatetruecolor($this->width, $this->height);\n $color = imagecolorallocatealpha($spritemap, 255, 255, 255, 127);\n imagefill($spritemap, 0, 0, $color);\n imagecolortransparent($spritemap, imagecolorallocatealpha($spritemap, 0, 0, 0, 127));\n imagealphablending($spritemap, false);\n imagesavealpha($spritemap, true);\n\n foreach ($sprites as $sprite) {\n if ($sprite->fit) {\n $fit = $sprite->fit;\n imagecopyresampled($spritemap, $sprite->getResource(), $fit->x, $fit->y, 0, 0, $sprite->width, $sprite->height, $sprite->original_width, $sprite->original_height);\n }\n }\n imagepng($spritemap, __DIR__.'/test.png');\n }", "protected function loadCss() {}", "function getStyle() {return $this->readstyle();}", "public function getStylesheets()\n {\n return array('/cpCmsPlugin/css/widget.css' => 'all');\n }", "public function getStyles()\n\t{\n\t\treturn $this->styles;\n\t}", "public static function get_all_styles()\n\t{\n\t\tforeach(array_keys(self::$STYLE_MAP) as $name) {\n\t\t\tyield $name;\n\t\t}\n\t}", "function child_generate_get_dynamic_css() {\n\t$css = generate_base_css() . generate_font_css() . generate_advanced_css() . generate_spacing_css();\n\n\treturn apply_filters( 'generate_dynamic_css', $css );\n}", "function getStyles () {\n return array(\"template.css\");\n }", "public function get_stylesheet()\n {\n }", "public function get_stylesheet()\n {\n }", "public function imgsrc() {\n\t\t$theImagePathList = func_get_args();\n\t\tif (!empty($theImagePathList)) {\n\t\t\t//since this operation may be expensive, check session cache first\n\t\t\t$theSessionVarName = 'imgsrc_cache/'.get_called_class().implode('/',$theImagePathList);\n\t\t\tif (!empty($this->_director[$theSessionVarName])) {\n\t\t\t\treturn $this->_director[$theSessionVarName];\n\t\t\t} else {\n\t\t\t\t$theFilename = array_pop($theImagePathList);\n\t\t\t\t$theResult = $this->getImgResSrc($theImagePathList,$theFilename);\n\t\t\t\t//cache this result\n\t\t\t\t$this->_director[$theSessionVarName] = $theResult;\n\t\t\t\treturn $theResult;\n\t\t\t}\n\t\t}\n\t}", "public function styles() {\n\t\t$styles = array(\n\t\t\tarray(\n\t\t\t\t'handle' => 'static_content_styles_css',\n\t\t\t\t'src' => $this->get_base_url() . '/css/static_content_styles.css',\n\t\t\t\t'version' => $this->_version,\n\t\t\t\t'enqueue' => array(\n\t\t\t\t\tarray( 'field_types' => array( 'staticcontent' ) )\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\treturn array_merge( parent::styles(), $styles );\n\t}", "public function build_css() {\n\t\t\t\n\t\t}", "public function getFrontendStyles() {\n }", "public function getFrontendStyles() {\n }", "public static function css();", "public function getCss()\n {\n return self::$CSS . ' ' . self::$CSS_PREFIX . $this->type;\n }", "public function getCss()\n {\n $result = $this->_css;\n foreach ($this->_packages as $package) {\n $config = $this->getConfig($package);\n if (!empty($config['css'])) {\n foreach ($config['css'] as $item) {\n $result[] = $item;\n }\n }\n }\n return $result;\n }", "public static function getStyle ()\n {\n return self::$_style;\n }", "public function styles() {\n\t\treturn parent::styles();\n\t}", "function ReadCSS($html)\r\n{\r\n//! @desc CSS parser\r\n//! @return string\r\n\r\n/*\r\n* This version ONLY supports: .class {...} / #id { .... }\r\n* It does NOT support: body{...} / a#hover { ... } / p.right { ... } / other mixed names\r\n* This function must read the CSS code (internal or external) and order its value inside $this->CSS. \r\n*/\r\n\r\n\t$match = 0; // no match for instance\r\n\t$regexp = ''; // This helps debugging: showing what is the REAL string being processed\r\n\t\r\n\t//CSS external\r\n\t$regexp = '/<link rel=\"stylesheet\".*?href=\"(.+?)\"\\\\s*?\\/?>/si';\r\n\t$match = preg_match_all($regexp,$html,$CSSext);\r\n $ind = 0;\r\n\r\n\twhile($match) {\r\n\t$file = fopen($CSSext[1][$ind],\"r\");\r\n\t$CSSextblock = fread($file,filesize($CSSext[1][$ind]));\r\n\tfclose($file);\r\n\r\n\t//Get class/id name and its characteristics from $CSSblock[1]\r\n\t$regexp = '/[.# ]([^.]+?)\\\\s*?\\{(.+?)\\}/s'; // '/s' PCRE_DOTALL including \\n\r\n\tpreg_match_all( $regexp, $CSSextblock, $extstyle);\r\n\r\n\t//Make CSS[Name-of-the-class] = array(key => value)\r\n\t$regexp = '/\\\\s*?(\\\\S+?):(.+?);/si';\r\n\r\n\tfor($i=0; $i < count($extstyle[1]) ; $i++)\r\n\t{\r\n\t\tpreg_match_all( $regexp, $extstyle[2][$i], $extstyleinfo);\r\n\t\t$extproperties = $extstyleinfo[1];\r\n\t\t$extvalues = $extstyleinfo[2];\r\n\t\tfor($j = 0; $j < count($extproperties) ; $j++) \r\n\t\t{\r\n\t\t\t//Array-properties and Array-values must have the SAME SIZE!\r\n\t\t\t$extclassproperties[strtoupper($extproperties[$j])] = trim($extvalues[$j]);\r\n\t\t}\r\n\t\t$this->CSS[$extstyle[1][$i]] = $extclassproperties;\r\n\t\t$extproperties = array();\r\n\t\t$extvalues = array();\r\n\t\t$extclassproperties = array();\r\n\t}\r\n\t$match--;\r\n\t$ind++;\r\n\t} //end of match\r\n\r\n\t$match = 0; // reset value, if needed\r\n\r\n\t//CSS internal\r\n\t//Get content between tags and order it, using regexp\r\n\t$regexp = '/<style.*?>(.*?)<\\/style>/si'; // it can be <style> or <style type=\"txt/css\">\r\n\t$match = preg_match($regexp,$html,$CSSblock);\r\n\r\n\tif ($match) {\r\n\t//Get class/id name and its characteristics from $CSSblock[1]\r\n\t$regexp = '/[.#]([^.]+?)\\\\s*?\\{(.+?)\\}/s'; // '/s' PCRE_DOTALL including \\n\r\n\tpreg_match_all( $regexp, $CSSblock[1], $style);\r\n\r\n\t//Make CSS[Name-of-the-class] = array(key => value)\r\n\t$regexp = '/\\\\s*?(\\\\S+?):(.+?);/si';\r\n\r\n\tfor($i=0; $i < count($style[1]) ; $i++)\r\n\t{\r\n\t\tpreg_match_all( $regexp, $style[2][$i], $styleinfo);\r\n\t\t$properties = $styleinfo[1];\r\n\t\t$values = $styleinfo[2];\r\n\t\tfor($j = 0; $j < count($properties) ; $j++) \r\n\t\t{\r\n\t\t\t//Array-properties and Array-values must have the SAME SIZE!\r\n\t\t\t$classproperties[strtoupper($properties[$j])] = trim($values[$j]);\r\n\t\t}\r\n\t\t$this->CSS[$style[1][$i]] = $classproperties;\r\n\t\t$properties = array();\r\n\t\t$values = array();\r\n\t\t$classproperties = array();\r\n\t}\r\n\r\n\t} // end of match\r\n\r\n //print_r($this->CSS);// Important debug-line!\r\n\r\n\t//Remove CSS (tags and content), if any\r\n\t$regexp = '/<style.*?>(.*?)<\\/style>/si'; // it can be <style> or <style type=\"txt/css\">\r\n\t$html = preg_replace($regexp,'',$html);\r\n\r\n \treturn $html;\r\n}", "function get_the_css_urls() {\n\n md_get_the_css_urls();\n \n }", "function get_stylesheet()\n {\n }", "public function getCSS(){\n\t\ttry{\t\t\t\n\t\t\t$color = (is_null($this->color)? \"\" : $this->color->getCSS());\n\t\t\tif(is_null($this->imgResource)){\n\t\t\t\t$css = sprintf(\"background: %s \", $color);\n\t\t\t}else{\t\t\t \t\t\t\n\t\t\t\t$pos = sprintf(\"%s %s\", $this->imgPosition[0], $this->imgPosition[0]);\n\t\t\t\t$css = sprintf(\"background: %s url(\\\"%s\\\") %s %s %s\", $color, \n\t\t\t\t\t\t$this->imgResource, $pos, $this->imgRepetition, $this->imgAttachment);\n\t\t\t}\n\t\t\treturn $css.\";\";\n\t\t}catch(Exception $e){\n\t\t\tthrow new Exception(ErrorHelper::formatMessage(__FUNCTION__,__CLASS__,$e));\n\t\t}\n\t}", "function chappell_construction_register_stylesheets() {\n wp_register_style('home', CHILD_CSS_URL . '/home.css', array(), 1.0);\n wp_register_style('residence', CHILD_CSS_URL . '/residence.css', array(), 1.0);\n}", "function getStyleSheet() {\n\t\treturn $this->getPluginPath() . '/styles/objectsForReview.css';\n\t}", "public function getStyles() {\n return $this->styles;\n }", "function wp_get_global_styles_custom_css()\n {\n }", "public function getCssPath();", "public function getStyles()\n {\n return $this->_styles;\n }", "function wp_get_global_stylesheet($types = array())\n {\n }", "protected function _getFromCSS()\n {\n // styles to apply\n $styles = array();\n\n // list of the selectors to get in the CSS files\n $getit = array();\n\n // get the list of the selectors of each tags\n $lst = array();\n $lst[] = $this->value['id_lst'];\n for ($i=count($this->table)-1; $i>=0; $i--) {\n $lst[] = $this->table[$i]['id_lst'];\n }\n\n // foreach selectors in the CSS files, verify if it match with the list of selectors\n foreach ($this->cssKeys as $key => $num) {\n if ($this->_getReccursiveStyle($key, $lst)) {\n $getit[$key] = $num;\n }\n }\n\n // if we have selectors\n if (count($getit)) {\n // get them, but in the definition order, because of priority\n asort($getit);\n foreach ($getit as $key => $val) $styles = array_merge($styles, $this->css[$key]);\n }\n\n return $styles;\n }", "public function get_styles () {\r\n\t\treturn empty($this->_data[self::STYLES])\r\n\t\t\t? array()\r\n\t\t\t: $this->_data[self::STYLES]\r\n\t\t;\r\n\t}", "function wp_register_styles() {\n // Developer Tier Admin Stylesheet\n wp_register_style( \"{$this->namespace}-admin\", SLIDEDECK2_DEVELOPER_URLPATH . \"/css/admin.css\", array(), '2.1', 'screen' );\n // CodeMirror Library\n wp_register_style( \"codemirror\", SLIDEDECK2_DEVELOPER_URLPATH . \"/css/codemirror.css\", array(), '2.25', 'screen' );\n }", "private function getRegisteredRules()\n {\n return $this->registeredRules;\n }", "public function loadStyle(){\n \t\treturn null;\n \t}", "public function registerStyles() {\n $this->registerStylesCommon();\n \n if(is_admin()) {\n $this->registerStylesAdmin();\n } else {\n $this->registerStylesFrontend();\n }\n }", "public function renderCSS()\n {\n }", "public function getStyles() {\n return $this->_styles;\n }", "public function generateStyleUris(DataInterpreterInterface $interpreter, array $image_styles) {\n // Call image_style_url with the retrieved $value for each $image_style.\n $uri = $interpreter->getWrapper()->value()->uri;\n return array_map(function ($image_style) use ($uri) {\n return url(image_style_url($image_style, $uri), array(\n 'absolute' => $this->isAbsolute,\n ));\n }, $image_styles);\n }", "function reverie_css_style()\n{\t\n\t// normalize stylesheet\n\t// wp_register_style( 'reverie-normalize-stylesheet', get_template_directory_uri() . '/css/normalize.css', array(), '' );\n\t\n\t// foundation stylesheet\n\twp_register_style( 'reverie-foundation-stylesheet', get_template_directory_uri() . '/css/foundation.css', array(), '' );\t\n\t\n\t// Register the main style under root directory\n\twp_register_style( 'reverie-stylesheet', get_stylesheet_directory_uri() . '/style.css', array(), '', 'all' );\n\t\n\twp_enqueue_style( 'reverie-normalize-stylesheet' );\n\twp_enqueue_style( 'reverie-foundation-stylesheet' );\n\twp_enqueue_style( 'reverie-stylesheet' );\n\t\n}", "public static function dumpStylesheets()\n\t{\n\t\treturn self::basePath().'/applications/'.self::getName().'/assets/css/base.css';\n\n\t\t$asset = self::$stylesheets;\n\t\t$asset->setTargetPath(str_replace('*', self::generateAssetName($asset).'.css', self::$assetOutput));\n\t\t$cache = self::getAssetCache($asset);\n\t\tself::getAssetWriter()->writeAsset($cache);\n\t\treturn self::basePath().'/'.$asset->getTargetPath();\n\t}", "protected function getIEStyles() {\n return <<<CSSRULES\n.tab-box-content { display: block; }\n.tab-box-contents { overflow: hidden;position: relative; }\nb { position: absolute; top: 0px; right: 0px; width:1px; height: 251px; overflow: hidden; text-indent: -9999px; }\nCSSRULES;\n\n }", "public function getStyleModules() {\n\t\treturn [];\n\t}", "private function _addCss() {\r\n JHtml::styleSheet( Sh404sefHelperGeneral::getComponentUrl() . '/assets/css/list.css');\r\n }" ]
[ "0.7998522", "0.6572027", "0.6500058", "0.5982109", "0.55134934", "0.5488444", "0.54645306", "0.54645306", "0.5443039", "0.5374171", "0.5352468", "0.5347881", "0.5333721", "0.5328327", "0.5328289", "0.5315488", "0.52706474", "0.5270339", "0.52664137", "0.5239269", "0.5238501", "0.52341586", "0.5220411", "0.52201205", "0.51976955", "0.5178791", "0.51742786", "0.5158497", "0.5149062", "0.51278275", "0.5125782", "0.5094906", "0.50948864", "0.5091567", "0.5039213", "0.5034367", "0.5033748", "0.5004969", "0.49836847", "0.49813765", "0.49792525", "0.49777338", "0.4968545", "0.4966036", "0.49517536", "0.4940787", "0.49400717", "0.4926206", "0.49248567", "0.49158522", "0.49112207", "0.4889247", "0.48850036", "0.48779488", "0.48681974", "0.48651317", "0.48612976", "0.48534203", "0.484385", "0.4842031", "0.48376778", "0.4833278", "0.48186195", "0.48109674", "0.48109674", "0.48025617", "0.47950143", "0.47939396", "0.4789517", "0.4789517", "0.47889012", "0.47888333", "0.4787854", "0.4778337", "0.4774641", "0.47681153", "0.47637522", "0.4756815", "0.47535205", "0.47474897", "0.4728609", "0.47181204", "0.47171095", "0.47144455", "0.47014877", "0.4691918", "0.46916673", "0.46906945", "0.46745515", "0.46680638", "0.4655353", "0.46398208", "0.46361363", "0.46341532", "0.4631395", "0.4629371", "0.46248972", "0.4621459", "0.4616543", "0.46088976" ]
0.47438353
80
process() Register a new template file
public function registerTemplate($relativeTemplatePath, $outputName = null, $outputPath = null) { $this->spriteTemplateRegistry->registerTemplate($relativeTemplatePath, $outputName, $outputPath); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setTemplate($file);", "private function renderTemplate(){\n\t\trequire($this->TemplateFile);\n\t}", "public function FrontendOutputPostGenerate() {\n\t\t\tfile_put_contents($this->location, $this->template);\n\t\t}", "function files_handle_on_email_templates(&$templates) {\n $templates[FILES_MODULE] = array(\n new EmailTemplate(FILES_MODULE, 'new_file'), \n new EmailTemplate(FILES_MODULE, 'new_revision')\n );\n }", "public function loadTemplate()\n\t\t{\n\t\t}", "function Template()\r\n\t{\t\t\r\n\t\tglobal $_REQUEST;\t\t\r\n\t\t$theme = $this->theme;\r\n\t\t/*** Get Template By Page Id ***/\r\n\t\t$file = $this->get_template();\r\n\t\t\r\n\t\tif($_SETTINGS['debug'] == 1){\r\n\t\t\techo \"TEMPLATE: \".$file.\" <Br>\";\r\n\t\t}\r\n\t\t\r\n\t\t$websitepath = $this->website_path;\r\n\t\t//die(\"FILE: $file\");\r\n\t\t//exit();\r\n\t\tinclude''.$_SERVER['DOCUMENT_ROOT'].$websitepath.'themes/'.$theme.''.$file.'';\r\n\t}", "public function initTemplate() {}", "private function register_files() {\n\t\tif( $this->type === self::STYLE ) {\n\t\t\twp_register_style( $this->handle, $this->src, $this->settings['deps'], $this->settings['vers'], $this->settings['media'] );\n\t\t} else if ( $this->type === self::SCRIPT ) {\n\t\t\twp_register_script( $this->handle, $this->src, $this->settings['deps'], $this->settings['vers'], $this->settings['in_footer'] );\n\t\t}\n\t}", "protected function setupTemplate() {\r\n \r\n }", "abstract public function getTemplateFile();", "private function render_template() {\n\t\t$template = $this->template;\n\n\t\tif ( ! is_readable( $template ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tinclude $template;\n\t}", "private function AddTemplate(string $name){\n\t\t$tfn=\\Config\\local_templates. mb_strtolower($name).'.php';\n\t\tif(!\\file_exists($tfn))\n\t\t\tthrow new \\Exception(\"Unable to locate template $name ($tfn)\");\n\t\trequire($tfn);\n\t}", "public function processTemplateFromFileProcessesTemplateFromFile() {\n\t\t$this->subject->processTemplateFromFile(\n\t\t\t'EXT:oelib/Tests/Unit/Fixtures/oelib.html'\n\t\t);\n\n\t\t$this->assertSame(\n\t\t\t'Hello world!' . LF,\n\t\t\t$this->subject->render()\n\t\t);\n\t}", "protected function _parseTemplate() {}", "function PHPTemplate($file = '') {\r\n $this->file = $file;\r\n }", "function template($template=\"simple\"){\n\n\t\t// THE PHYSICAL TEMPLATE SHOULD BE IN THE RESPECTIVE \n\t\t// TEMPLATE/TYPE/$template.php\n\t\t$this->template = $template;\n\t}", "private function auto_create(){\n\n if ( $this->firebug ) \\FB::info(get_called_class().\": auto creating file\");\n\n $root = $this->use_codeza_root ? (string)new Code_Alchemy_Root_Path() : '';\n\n $filename = $root . $this->template_file;\n\n if ( file_exists($filename) && ! file_exists($this->file_path)) {\n\n $copier = new Smart_File_Copier($filename,$this->file_path,$this->string_replacements,false);\n\n $copier->copy();\n\n }\n\n\n\n }", "function load_template($_template_file, $load_once = \\true, $args = array())\n {\n }", "private function load_template()\r\n\t{\r\n\t\tif(! $this -> loaded)\r\n\t\t{\r\n\t\t\t$controller = $this -> sp -> targetdir().\"/\".sp_StaticProjector::templates_dir.\"/\".$this->name.\"_controller.php\";\r\n\t\t\tsp_StaticRegister::push_object(\"sp\", $this -> sp);\r\n\t\t\t\r\n\t\t\tif(!file_exists($controller))\r\n\t\t\t{\r\n $controller = $this -> sp -> coretemplatesdir().\"/\".$this->name.\"_controller.php\";\r\n if(! file_exists($controller)) {\r\n $controller = $this -> sp -> coretemplatesdir().\"/default_controller.php\";\r\n }\r\n\t\t\t\t/*if($this -> name == \"default\")\r\n\t\t\t\t{\r\n\t\t\t\t\t$default_controller = $this -> sp -> defaultsdir().\"/default_controller.php\";\r\n\t\t\t\t\t@copy($default_controller, $controller);\r\n\t\t\t\t\tchmod($controller,sp_StaticProjector::file_create_rights);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$base_code = file_get_contents($this -> sp -> defaultsdir().\"/new_controller.txt\");\r\n\t\t\t\t\t$controller_code = str_replace(\"%controller_name%\", $this->name.\"_controller\", $base_code);\r\n\t\t\t\t\tfile_put_contents($controller, $controller_code);\r\n\t\t\t\t}*/\r\n\t\t\t}\r\n\t\t\trequire_once($controller);\r\n\r\n\t\t\t$template = $this -> sp -> targetdir().\"/\".sp_StaticProjector::templates_dir.\"/\".$this->name.\"_template.php\";\r\n\t\t\tif(!file_exists($template))\r\n\t\t\t{\r\n $template = $this -> sp -> coretemplatesdir().\"/\".$this->name.\"_template.php\";\r\n if(! file_exists($template)) {\r\n $template = $this -> sp -> coretemplatesdir().\"/default_template.php\";\r\n }\r\n\t\t\t\t/*if($this -> name == \"default\")\r\n\t\t\t\t{\r\n\t\t\t\t\t$default_template = $this -> sp -> defaultsdir().\"/default_template.php\";\r\n\t\t\t\t\t@copy($default_template, $template);\r\n\t\t\t\t\tchmod($template,sp_StaticProjector::file_create_rights);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$chunks_code = \"\";\r\n\t\t\t\t\t$chunk_base = file_get_contents($this -> sp -> defaultsdir().\"/new_template_chunk.txt\");\r\n\t\t\t\t\tforeach($this -> sp -> get_config() -> default_templates_chunks() as $chunk)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$chunks_code .= str_replace(\"%chunk_name%\",$chunk,$chunk_base);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$template_base = file_get_contents($this -> sp -> defaultsdir().\"/new_template.txt\");\r\n\t\t\t\t\t$template_code = str_replace(\"%template_name%\", $this -> name.\"_template\", $template_base);\r\n\t\t\t\t\t$template_code = str_replace(\"%template_chunks%\", $chunks_code, $template_code);\r\n\t\t\t\t\tfile_put_contents($template, $template_code);\r\n\t\t\t\t}*/\r\n\t\t\t}\r\n\t\t\trequire_once($template);\r\n\t\t\tsp_StaticRegister::pop_object(\"sp\");\r\n\t\t\t\r\n\t\t\t$this -> loaded = true;\r\n\t\t}\r\n\t}", "function uploadTemplate($file){\r\n if (file_exists(\"htmlTemplates/\" . $file[\"fileToUpload\"][\"name\"])) {\r\n return json_encode(array(\"status\"=>\"error\",\"message\"=>\"file already exists\"));\r\n }\r\n else {\r\n #- finding extension of file\r\n $extension = (explode(\".\", $file[\"fileToUpload\"][\"name\"]));\r\n #- if file extension is not csv return\r\n if($extension[1] != 'html')\r\n return json_encode(array(\"msgtype\"=>\"error\",\"msg\"=>\"Only HTML Files Are allowed.\"));\r\n #new file name \r\n $newFileName = $extension[0].time().\".\".$extension[1];\r\n\r\n \r\n\r\n move_uploaded_file($file[\"fileToUpload\"][\"tmp_name\"], \"htmlTemplates/\" . $newFileName);\r\n \r\n $fileName = \"htmlTemplates/\" . $newFileName;\r\n $myfile = fopen($fileName, \"r\") or die(\"Unable to open file!\");\r\n $str = fread($myfile,filesize($fileName));\r\n fclose($myfile);\r\n \r\n return json_encode(array(\"status\"=>\"success\",\"template\"=>$str));\r\n \r\n }\r\n }", "function template($file, $error = \"Template Datei nicht gefunden!\") {\n // Variabeln auf Standardwerte setzen\n $this->tmp_file = $file;\n $this->error = $error;\n $this->content = \"\";\n }", "function template ($file, $data) {\n\textract ($data);\n\trequire ($file);\n}", "public function setTemplate($nomtmp) {\r\n $filevue = \"application/templates/\" . $nomtmp . \".template.php\";\r\n if (file_exists($filevue)) {\r\n $this->template = $nomtmp;\r\n } else {\r\n die(\"template $filevue inexistante \");\r\n }\r\n }", "public function makeTemplate($input) {\n\t\t$info = array(\n\t\t\t'{generator_name}' => $input['generator_name'],\n\t\t\t'{module_name_l}' => $this->clean($input['generator_name']),\n\t\t\t'{description}' => $input['description'],\n\t\t\t'{author}' => $input['author'],\n\t\t\t'{website}' => $input['website'],\n\t\t\t'{package}' => $input['package'],\n\t\t\t'{subpackage}' => $input['subpackage'],\n\t\t\t'{copyright}' => $input['copyright'],\n\t\t\t'{frontend}' => $input['frontend'],\n\t\t\t'{backend}' => $input['backend'],\n\t\t\t);\n\t\t$info['{validation_fields}'] = $this->makeValidation($input['fields']);\n\t\t$info['{details_fields}'] = $this->makeDetails($input['fields']);\n\t\t$info['{model_fields}'] = $this->makeModel($input['fields']);\n\t\t$info['{adminform_fields}'] = $this->makeAdminForms($input['fields']);\n\t\t// array of files to replace\n\t\t$filearray = array(\n\t\t\t'config/routes.php',\n\t\t\t'controllers/admin.php',\n\t\t\t'details.php',\n\t\t\t'events.php',\n\t\t\t'language/english/sample_lang.php',\n\t\t\t'models/sample_m.php',\n\t\t\t'plugin.php',\n\t\t\t'views/admin/form.php',\n\t\t\t'views/admin/index.php'\n\t\t\t);\n\t\t// conditional front end controller stuff\n\t\tif ($input['frontend'] == 'true') {\n\t\t\t$filearray[] = 'controllers/sample.php';\n\t\t\t$filearray[] = 'views/index.php';\n\t\t}\n\t\t$url = __DIR__ . '/../public/generated/';\n\t\t$this->cpdir(__DIR__ . '/../generator/module_full', __DIR__ . '/../public/generated/'.$info['{module_name_l}']);\n\t\t// where is the module generated\n\t\t$moduleurl = $url.$info['{module_name_l}'];\n\t\tfor ($i = 0; $i < count($filearray); $i++) {\n\t\t\t$filedestination = $moduleurl.'/'.$filearray[$i];\n\t\t\t// load the template = module_full/targetfile\n\t\t\t$current = file_get_contents($filedestination);\n\t\t\t// replace the template tags\n\t\t\t$current = $this->str_replace_assoc($info, $current);\n\t\t\t// put the contents in the new file\n\t\t\tfile_put_contents($filedestination, $current);\n\t\t}\n\t\t// rename the specific files that are name sensitive\n\t\trename($moduleurl.'/language/english/sample_lang.php', $moduleurl.'/language/english/'.$info['{module_name_l}'].'_lang.php');\n\t\trename($moduleurl.'/models/sample_m.php', $moduleurl.'/models/'.$info['{module_name_l}'].'_m.php');\n\t\tif ($input['frontend'] == 'true') {\n\t\t\t// rename the extra front end stuff if applicable\n\t\t\trename($moduleurl.'/controllers/sample.php', $moduleurl.'/controllers/'.$info['{module_name_l}'].'.php');\n\t\t\trename($moduleurl.'/css/sample.css', $moduleurl.'/css/'.$info['{module_name_l}'].'.css');\n\t\t}\n\t\t// comment out to disable zip compression\n\t\t$this->Zip($url.$info['{module_name_l}'], $url.$info['{module_name_l}'].'.zip');\n\t\treturn $info['{module_name_l}'].'.zip';\n\t}", "protected function registerMyTemplateDir()\n {\n $this->Application()->Template()->addTemplateDir($this->Path() . 'Views/', 'payment_processor');\n }", "protected function runtimeProcessTemplate()\n\t{\n\t// Here we grab the theme to get the javascript and css include file.\n\t\t$theme = new Theme($this->theme);\n\t\t$this->addJSInclude($theme->getUrl('js'));\n\t\t$this->addCssInclude($theme->getUrl('css'));\n\n\t\t$this->preStartupJs[] = 'var baseUrl = ' . json_encode(ActiveSite::getLink()) . ';';\n\n\t\tif(isset($this->menuObjects))\n\t\t\tforeach($this->menuObjects as $name => $menuDisplay)\n\t\t{\n\t\t\t$this->addRegion($name, $menuDisplay->makeDisplay());\n\t\t}\n\n\t// This line ensures that any additional content we add below that requires a fully-functional system doesn't\n\t// choke the installer.\n\t\tif(defined('INSTALLMODE') && INSTALLMODE) return true;\n\n\t// Add the messages to the page.\n\t\tif(count($this->messages) > 0)\n\t\t{\n\t\t\t$outputMessage = new HtmlObject('div');\n\t\t\t$outputMessage->addClass('messageContainer');\n\n\t\t\tforeach($this->messages as $message)\n\t\t\t{\n\t\t\t\t$outputMessage->insertNewHtmlObject('div')->wrapAround($message);\n\t\t\t}\n\t\t\t$this->addRegion('messages', (string) $outputMessage);\n\t\t}\n\t}", "public static function wpide_create_new() {\r\n\t\tcheck_admin_referer('plugin-name-action_wpidenonce'); \r\n\t\tif ( !is_super_admin() )\r\n\t\t\twp_die('<p>'.__('You do not have sufficient permissions to edit templates for this site. SORRY').'</p>');\r\n\t\t\r\n\t\t//setup wp_filesystem api\r\n\t\tglobal $wp_filesystem;\r\n $url = wp_nonce_url('admin.php?page=wpide','plugin-name-action_wpidenonce');\r\n $form_fields = null; // for now, but at some point the login info should be passed in here\r\n if (false === ($creds = request_filesystem_credentials($url, FS_METHOD, false, false, $form_fields) ) ) {\r\n // no credentials yet, just produced a form for the user to fill in\r\n return true; // stop the normal page form from displaying\r\n }\r\n\t\tif ( ! WP_Filesystem($creds) ) \r\n\t\t return false;\r\n\t\t\r\n\t $root = apply_filters( 'wpide_filesystem_root', WP_CONTENT_DIR ); \r\n \r\n\t\t//check all required vars are passed\r\n\t\tif (strlen($_POST['path'])>0 && strlen($_POST['type'])>0 && strlen($_POST['file'])>0){\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$filename = sanitize_file_name( $_POST['file'] );\r\n\t\t\t$path = $_POST['path'];\r\n\t\t\t\r\n\t\t\tif ($_POST['type'] == \"directory\"){\r\n\t\t\t\t\r\n\t\t\t\t$write_result = $wp_filesystem->mkdir($root . $path . $filename, FS_CHMOD_DIR);\r\n\t\t\t\t\r\n\t\t\t\tif ($write_result){\r\n\t\t\t\t\tdie(\"1\"); //created\r\n\t\t\t\t}else{\r\n\t\t\t\t\techo \"Problem creating directory\" . $root . $path . $filename;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}else if ($_POST['type'] == \"file\"){\r\n\t\t\t\t\r\n //write the file\r\n\t\t\t\t$write_result = $wp_filesystem->put_contents(\r\n\t\t\t\t\t$root . $path . $filename,\r\n\t\t\t\t\t'',\r\n\t\t\t\t\tFS_CHMOD_FILE // predefined mode settings for WP files\r\n\t\t\t\t);\r\n\t\t\t\t\r\n\t\t\t\tif ($write_result){\r\n\t\t\t\t\tdie(\"1\"); //created\r\n\t\t\t\t}else{\r\n\t\t\t\t\techo \"Problem creating file \" . $root . $path . $filename;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//print_r($_POST);\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t}\r\n\t\techo \"0\";\r\n\t\tdie(); // this is required to return a proper result\r\n\t}", "public function load_template_callback() {\n\n // Make sure a template was submitted\n if ( ! isset($_POST['template']) ) {\n return;\n }\n // grabe the template being rendered\n $template = $_POST['template'];\n\n // Activate builder callbacks for the shortcodes\n $this->activate_builder_callbacks();\n\n // Remove inactive shortcodes\n $template = cv_strip_inactive_plugin_shortcodes( $template );\n\n // Display the rendered shortcodes\n echo do_shortcode( stripslashes( $template ) );\n\n die();\n\n }", "protected function _processTpl() {\n $sResult = '';\n if (file_exists($this->_sTplName)) {\n ob_start();\n require_once $this->_sTplName;\n $sResult = ob_get_clean();\n }\n\n return $sResult;\n }", "public static function afficher() {\r\n $filevue = \"application/templates/\" . Page::getInstance()->template . \".template.php\";\r\n\r\n if (file_exists($filevue)) {\r\n require_once $filevue;\r\n } else {\r\n die(\"template non renseigne\");\r\n }\r\n }", "function Template ($templateFile, $render = true, $stylesheet = false) {\n\t\t\t$this->filename = $this->getTemplateRoot().$templateFile;\n\t\t\tif ($render) {\n\t\t\t\t$this->reloadTemplate();\n\t\t\t}\n\t\t}", "static protected function templatePhp(string $template, array $arguments = [])\n {\n //Chemin vers le fichier\n $file = __DIR__ . '/../../templates/' . $template;\n\n extract($arguments);\n\n include $file;\n\n }", "public function loadTemplate($path);", "private function loadTemplate() {\n\t\t\tinclude('template.inc.php');\n\t\t\t$this->mainTemplate = new Template();\n\t\t\t$this->mainTemplate->readTpl('main');\n\t\t}", "public function onLoadPostTemplateDefinition($event)\n {\n $templates = (array)$event->getResult(); //loads an array of already existing templates\n $templates[] = [\n \"name\" => \"posts/post-single-repo\",\n \"source\" => $this->getPackageDir() . \"layouts\" . DS\n ];\n\n $event->setResult($templates);\n }", "function st_get_template($file,$data = array()){\r $file = ST_DIR.'/templates/'.$file;\r if(file_exists($file)){\r include($file); return true;\r }\r return false;\r}", "public function loadTemplate(SplFileInfo $file)\n {\n $this->loader->loadTags(\n $this->getTags($file->getPathname()),\n $file->getPathname()\n );\n }", "function template($template_filename) {\n if ( $template_filename[0] == '/' ) {\n $this->template_file = $template_filename;\n } else {\n $this->template_file = $this->module_path.'template/'.$template_filename;\n }\n }", "public function addrequest(){\n\t\tinclude 'gui/template/UserTemplate.php';\n\t}", "public function processTemplate($template = '') {\n\t\tif(is_object($this->registry->get('config')) && $this->registry->get('config')->get('embed_mode') == true ){\n\t\t \t//get template if it was set earlier\n\t\t\tif (empty($template)) {\n\t\t\t\t$template = $this->view->getTemplate();\n\t\t\t}\n\t\t\t//only substitute the template for page templates\n\t\t\tif(substr($template, 0, 6) == 'pages/' && substr($template, 0, 6) != 'embed/'){\n\t\t \t//load special headers for embed as no page/layout needed\n\t \t\t$this->addChild('responses/embed/head', 'head');\n\t \t$this->addChild('responses/embed/footer', 'footer');\n\t \t$template = preg_replace('/pages\\//', 'embed/', $template);\t\t\t\n\t\t\t}\n\t\t}\n\t\n\t\tif (!empty($template)) {\n\t\t\t$this->view->setTemplate($template);\n\t\t}\n\t\t$this->view->assign('block_details',$this->block_details);\n\t\t$this->view->assign(\"children_blocks\", $this->getChildrenBlocks());\n\t\t$this->view->enableOutput();\n\t}", "function run()\n{\n include config('template_path').'/template.php';\n}", "function init() {\n require config('template_path') . '/template.php';\n}", "public function template();", "public function testSubstituteWithMatchShouldCreateNewFile(): void\n {\n $processor = new Processor(self::$defaultOptions);\n $fileObject = new \\SplFileObject('vfs://match.php.dist');\n\n $processor->substitute($fileObject, ['test' => 'works!']);\n\n $target = self::$fileSystem->get('/match.php');\n self::assertNotNull($target);\n self::assertEquals('Awesome works!', $target->getContent());\n }", "protected function initDocumentTemplate() {}", "protected function initDocumentTemplate() {}", "protected function initDocumentTemplate() {}", "protected function initDocumentTemplate() {}", "protected function content_template() {}", "protected function content_template() {}", "function tagConfig() {\n\n global $SM_siteManager;\n\n // template tag\n // requires NAME tag\n if ($this->attributes['NAME']) {\n $this->templateName = $this->attributes['NAME'];\n }\n else {\n // warning -- type not found, ignore\n $this->debugLog(\"warning: SM tag type INCLUDE had no NAME parameter\");\n return;\n }\n\n // now load that template and stick it in the new area\n $tpt = $SM_siteManager->loadTemplate($this->templateName);\n if (is_object($tpt)) {\n\n // yes! convert it into a template and add it in\n $this->tptPointer = $tpt;\n\n }\n else { \n // if it wasn't an object (ie, the template failed to load)\n // it will be ignored by the template\n $this->debugLog(\"warning: SM tag type INCLUDE, file name ($templateName) failed to load, ignoring\");\n }\n\n }", "function setTemplate($template);", "function incluirTemplate( string $nombre, bool $inicio = false) {\n include TEMPLATES_URL . \"/${nombre}.php\";\n}", "public function template()\n {\n\n include './views/template.php';\n\n }", "public function generate()\n{\n$user_code=\"{% extends 'resource.twig.c' %}\\n\".$this->user_code;\n\n$buf=$this->gen->renderer->render_string($this->filename,$user_code\n\t,array('resource' =>$this, 'global' => $this->gen));\n$this->gen->file_write($this->dest_filename,$buf);\n}", "private function postTemplate()\n\t{\n\t\t$custom_template = get_template_directory() . '/templates/social-curator-grid-post-template.php';\n\t\tif ( file_exists($custom_template) ) {\n\t\t\tinclude($custom_template);\n\t\t\treturn;\n\t\t}\n\t\tinclude(\\SocialCuratorGrid\\Helpers::view('grid/single-post-template'));\n\t}", "function init()\n{\n require config('template_path') . '/template.php';\n}", "function transferCustomTemplate( $page ) \n {\n\n /*\n * copy Custom Template to templates directory\n */\n // get original template contents...\n $pathToTemplates = $this->values[ ModuleCreator::KEY_PATH_RAD_ROOT ];\n $pathToTemplates .= 'data/templates/';\n $fileName = 'tmpl_page_Custom.php';\n $contents = file_get_contents( $pathToTemplates.$fileName );\n \n // replace page tags \n $pagePrefixName = $page->getPagePrefixName();\n $pageName = $page->getPageName();\n \n // Replace the Page Prefix Name\n $tag = ModuleCreator::TAG_PAGEINIT_PREFIXNAME;\n $data = $pagePrefixName;\n $contents = str_replace($tag, $data, $contents );\n \n // Replace the Page Prefix Name\n $tag = ModuleCreator::TAG_PAGEINIT_PAGENAME;\n $data = $pageName;\n $contents = str_replace($tag, $data, $contents );\n \n // save template file\n $templateFileName = $this->values[ ModuleCreator::KEY_PATH_MODULE_TEMPLATE ];\n $templateFileName .= $pagePrefixName.$pageName.'.php';\n file_put_contents( $templateFileName, $contents);\n\n }", "public static function postCreator($template)\n {\n $file = $template; \n if(!File::isFile(self::getPagePath() . $file . self::getPageExtension())){\n return false;\n }\n return self::prepareFile( $file ); \n }", "public function getTemplateFile();", "public function setTemplate(string $template_name);", "public function set_template($template)\n\t{\n\t\t// On regarde si une modification du template existe\n\t\t$updated_template = dirname($template) . '/' . get_file_data(basename($template), 'filename') . '.updated';\n\t\tif (file_exists($updated_template))\n\t\t{\n\t\t\t$template = $updated_template;\n\t\t}\n\n\t\tif (!file_exists($template))\n\t\t{\n\t\t\ttrigger_error('Le template ' . $template . ' n\\'existe pas', FSB_ERROR);\n\t\t}\n\t\t\n\t\t// Recuperation du contenu du template\n\t\t$this->body = file_get_contents($template);\n\t}", "public function Load() : void\n {\n do_action('template_redirect');\n\n $this->Template === self::VIRTUAL_PAGE_TEMPLATE ? $Template = self::VIRTUAL_PAGE_TEMPLATE : $Template = locate_template(array_filter($this->Templates));\n $filtered = apply_filters('template_include', apply_filters('WP_Plugin_virtual_page_template', $Template));\n if(empty($filtered) || file_exists($filtered))\n {\n $Template = $filtered;\n }\n if(!empty($Template) && file_exists($Template)) \n {\n add_action('wp_enqueue_scripts',function (){$this->Define_Resources();});\n require_once $Template;\n }\n }", "public function LoadTemplate($sFilename) {\t\t\n\t}", "public function new_template()\n\t{\n\t\tee()->load->library('table');\n\t\tee()->cp->add_to_head('<link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css\">');\n\t\tee()->cp->add_to_head('<link rel=\"stylesheet\" href=\"'.$this->theme_url.'css/app.css\" type=\"text/css\" media=\"screen\">');\n\t\tee()->cp->add_to_foot('<script type=\"text/javascript\">var $token = 1;</script>');\n\t\tee()->cp->add_to_foot('<script src=\"'.$this->theme_url.'js/app.js\" type=\"text/javascript\" charset=\"utf-8\"></script>');\n\t\tee()->cp->add_to_foot('<script src=\"'.$this->theme_url.'js/draganddrop.js\" type=\"text/javascript\" charset=\"utf-8\"></script>');\n\n\t\t$this->_data['action_url'] = ee('CP/URL')->make('addons/settings/json_ld/savetemplate');\n\n\t\t$this->_data['templates'] = ee()->jsonld->templates();\n\n\t\t// Get types\n\t\t$this->_data['types'] = ee()->jsonld->types();\n\n\t\treturn ee('View')->make('json_ld:new')->render($this->_data);\n\n\t}", "public function setTemplateFile($file)\n {\n $this->file_template = $file;\n }", "protected function content_template() {\n\t}", "public function initContent()\n {\n parent::initContent();\n\n $this->setTemplate(_PS_THEME_DIR_.'<%= name %>.tpl');\n }", "public function addTemplate()\n\t{\n\t\t/* Check permission */\n\t\t\\IPS\\Dispatcher::i()->checkAcpPermission( 'template_add_edit' );\n\t\t\n\t\t$type = \\IPS\\Request::i()->type;\n\t\t\n\t\t/* Build form */\n\t\t$form = new \\IPS\\Helpers\\Form();\n\t\t$form->hiddenValues['type'] = $type;\n\t\t\n\t\t$form->add( new \\IPS\\Helpers\\Form\\Text( 'template_title', NULL, TRUE, array( 'regex' => '/^([A-Z_][A-Z0-9_]+?)$/i' ), function ( $val ) {\n\t\t\t/* PHP Keywords cannot be used as template names - so make sure the full template name is not in the list */\n\t\t\t$keywords = array( 'abstract', 'and', 'array', 'as', 'break', 'callable', 'case', 'catch', 'class', 'clone', 'const', 'continue', 'declare', 'default', 'die', 'do', 'echo', 'else', 'elseif', 'empty', 'enddeclare', 'endfor', 'endforeach', 'endif', 'endswitch', 'endwhile', 'eval', 'exit', 'extends', 'final', 'for', 'foreach', 'function', 'global', 'goto', 'if', 'implements', 'include', 'include_once', 'instanceof', 'insteadof', 'interface', 'isset', 'list', 'namespace', 'new', 'or', 'print', 'private', 'protected', 'public', 'require', 'require_once', 'return', 'static', 'switch', 'throw', 'trait', 'try', 'unset', 'use', 'var', 'while', 'xor' );\n\t\t\t\n\t\t\tif ( \\in_array( $val, $keywords ) )\n\t\t\t{\n\t\t\t\tthrow new \\DomainException( \\IPS\\Member::loggedIn()->language()->addToStack( 'template_reserved_word', FALSE, array( 'htmlsprintf' => array( \\IPS\\Member::loggedIn()->language()->formatList( $keywords ) ) ) ) );\n\t\t\t}\n\t\t} ) );\n\n\t\t/* Very specific */\n\t\tif ( $type === 'database' )\n\t\t{\n\t\t\t$groups = array(); /* I was sorely tempted to put 'Radiohead', 'Beatles' in there */\n\t\t\tforeach( \\IPS\\cms\\Databases::$templateGroups as $key => $group )\n\t\t\t{\n\t\t\t\t$groups[ $key ] = \\IPS\\Member::loggedIn()->language()->addToStack( 'cms_new_db_template_group_' . $key );\n\t\t\t}\n\n\t\t\t$form->add( new \\IPS\\Helpers\\Form\\Select( 'database_template_type', NULL, FALSE, array(\n\t\t\t\t'options' => $groups\n\t\t\t) ) );\n\n\t\t\t$databases = array( 0 => \\IPS\\Member::loggedIn()->language()->addToStack('cms_new_db_assign_to_db_none' ) );\n\t\t\tforeach( \\IPS\\cms\\Databases::databases() as $obj )\n\t\t\t{\n\t\t\t\t$databases[ $obj->id ] = $obj->_title;\n\t\t\t}\n\n\t\t\t$form->add( new \\IPS\\Helpers\\Form\\Select( 'database_assign_to', NULL, FALSE, array(\n\t\t\t\t'options' => $databases\n\t\t\t) ) );\n\t\t}\n\t\telse if ( $type === 'block' )\n\t\t{\n\t\t\t$plugins = array();\n\t\t\tforeach ( \\IPS\\Db::i()->select( \"*\", 'core_widgets', array( 'embeddable=1') ) as $widget )\n\t\t\t{\n\t\t\t\t/* Skip disabled applications */\n\t\t\t\tif ( !\\in_array( $widget['app'], array_keys( \\IPS\\Application::enabledApplications() ) ) )\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t$plugins[ \\IPS\\Application::load( $widget['app'] )->_title ][ $widget['app'] . '__' . $widget['key'] ] = \\IPS\\Member::loggedIn()->language()->addToStack( 'block_' . $widget['key'] );\n\t\t\t\t}\n\t\t\t\tcatch ( \\OutOfRangeException $e ) { }\n\t\t\t}\n\t\t\t\n\t\t\t$form->add( new \\IPS\\Helpers\\Form\\Select( 'block_template_plugin_import', NULL, FALSE, array(\n\t\t\t\t\t'options' => $plugins\n\t\t\t) ) );\n\t\t\n\t\t\t$form->add( new \\IPS\\Helpers\\Form\\Node( 'block_template_theme_import', NULL, TRUE, array(\n\t\t\t\t'class' => '\\IPS\\Theme'\n\t\t\t) ) );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/* Page, css, js */\n\t\t\tswitch( $type )\n\t\t\t{\n\t\t\t\tdefault:\n\t\t\t\t\t$flag = \\IPS\\cms\\Theme::RETURN_ONLY_TEMPLATE;\n\t\t\t\tbreak;\n\t\t\t\tcase 'page':\n\t\t\t\t\t$flag = \\IPS\\cms\\Theme::RETURN_PAGE;\n\t\t\t\tbreak;\n\t\t\t\tcase 'js':\n\t\t\t\t\t$flag = \\IPS\\cms\\Theme::RETURN_ONLY_JS;\n\t\t\t\tbreak;\n\t\t\t\tcase 'css':\n\t\t\t\t\t$flag = \\IPS\\cms\\Theme::RETURN_ONLY_CSS;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$templates = \\IPS\\cms\\Theme::i()->getRawTemplates( array(), array(), array(), $flag | \\IPS\\cms\\Theme::RETURN_ALL_NO_CONTENT );\n\n\t\t\t$groups = array();\n\n\t\t\tif ( isset( $templates['cms'][ $type ] ) )\n\t\t\t{\n\t\t\t\tforeach( $templates['cms'][ $type ] as $group => $data )\n\t\t\t\t{\n\t\t\t\t\t$groups[ $group ] = \\IPS\\cms\\Templates::readableGroupName( $group );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( ! \\count( $groups ) )\n\t\t\t{\n\t\t\t\t$groups[ $type ] = \\IPS\\cms\\Templates::readableGroupName( $type );\n\t\t\t}\n\n\t\t\t$form->add( new \\IPS\\Helpers\\Form\\Radio( 'theme_template_group_type', 'existing', FALSE, array(\n\t\t\t\t 'options' => array( 'existing' => 'theme_template_group_o_existing',\n\t\t\t\t 'new'\t => 'theme_template_group_o_new' ),\n\t\t\t\t 'toggles' => array( 'existing' => array( 'group_existing' ),\n\t\t\t\t 'new' => array( 'group_new' ) )\n\t\t\t ) ) );\n\n\t\t\t$form->add( new \\IPS\\Helpers\\Form\\Text( 'template_group_new', NULL, FALSE, array( 'regex' => '/^([a-z_][a-z0-9_]+?)?$/' ), NULL, NULL, NULL, 'group_new' ) );\n\t\t\t$form->add( new \\IPS\\Helpers\\Form\\Select( 'template_group_existing', NULL, FALSE, array( 'options' => $groups ), NULL, NULL, NULL, 'group_existing' ) );\n\t\t}\n\n\t\tif ( ! \\IPS\\Request::i()->isAjax() AND $type !== 'database' )\n\t\t{\n\t\t\t$form->add( new \\IPS\\Helpers\\Form\\TextArea( 'template_content', NULL ) );\n\t\t}\n\t\n\t\tif ( $values = $form->values() )\n\t\t{\n\t\t\t$type = \\IPS\\Request::i()->type;\n\n\t\t\tif ( $type == 'database' )\n\t\t\t{\n\t\t\t\t/* We need to copy templates */\n\t\t\t\t$group = \\IPS\\cms\\Databases::$templateGroups[ $values['database_template_type' ] ];\n\t\t\t\t$templates = iterator_to_array( \\IPS\\Db::i()->select( '*', 'cms_templates', array( 'template_location=? AND template_group=? AND template_user_edited=0 AND template_user_created=0', 'database', $group ) ) );\n\n\t\t\t\tforeach( $templates as $template )\n\t\t\t\t{\n\t\t\t\t\tunset( $template['template_id'] );\n\t\t\t\t\t$template['template_original_group'] = $template['template_group'];\n\t\t\t\t\t$template['template_group'] = str_replace( '-', '_', \\IPS\\Http\\Url\\Friendly::seoTitle( $values['template_title'] ) );\n\n\t\t\t\t\t$save = array();\n\t\t\t\t\tforeach( $template as $k => $v )\n\t\t\t\t\t{\n\t\t\t\t\t\t$k = \\mb_substr( $k, 9 );\n\t\t\t\t\t\t$save[ $k ] = $v;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Make sure template tags call the correct group */\n\t\t\t\t\tif ( mb_stristr( $save['content'], '{template' ) )\n\t\t\t\t\t{\n\t\t\t\t\t\tpreg_match_all( '/\\{([a-z]+?=([\\'\"]).+?\\\\2 ?+)}/', $save['content'], $matches, PREG_SET_ORDER );\n\n\t\t\t\t\t\t/* Work out the plugin and the values to pass */\n\t\t\t\t\t\tforeach( $matches as $index => $array )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpreg_match_all( '/(.+?)=' . $array[ 2 ] . '(.+?)' . $array[ 2 ] . '\\s?/', $array[ 1 ], $submatches );\n\n\t\t\t\t\t\t\t$plugin = array_shift( $submatches[ 1 ] );\n\t\t\t\t\t\t\tif ( $plugin == 'template' )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$value = array_shift( $submatches[ 2 ] );\n\t\t\t\t\t\t\t\t$options = array();\n\n\t\t\t\t\t\t\t\tforeach ( $submatches[ 1 ] as $k => $v )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$options[ $v ] = $submatches[ 2 ][ $k ];\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif ( isset( $options['app'] ) and $options['app'] == 'cms' and isset( $options['location'] ) and $options['location'] == 'database' and isset( $options['group'] ) and $options['group'] == $template['template_original_group'] )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$options['group'] = $template['template_group'];\n\n\t\t\t\t\t\t\t\t\t$replace = '{template=\"' . $value . '\" app=\"' . $options['app'] . '\" location=\"' . $options['location'] . '\" group=\"' . $options['group'] . '\" params=\"' . ( isset($options['params']) ? $options['params'] : NULL ) . '\"}';\n\n\t\t\t\t\t\t\t\t\t$save['content'] = str_replace( $matches[$index][0], $replace, $save['content'] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$newTemplate = \\IPS\\cms\\Templates::add( $save );\n\t\t\t\t}\n\n\t\t\t\tif ( $values['database_assign_to'] )\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\t$db = \\IPS\\cms\\Databases::load( $values['database_assign_to'] );\n\t\t\t\t\t\t$key = 'template_' . $values['database_template_type'];\n\t\t\t\t\t\t$db->$key = $template['template_group'];\n\t\t\t\t\t\t$db->save();\n\t\t\t\t\t}\n\t\t\t\t\tcatch( \\OutOfRangeException $ex ) { }\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ( $type === 'block' )\n\t\t\t{\n\t\t\t\t$save = array(\n\t\t\t\t\t'title'\t => str_replace( '-', '_', \\IPS\\Http\\Url\\Friendly::seoTitle( $values['template_title'] ) ),\n\t\t\t\t\t'params' => isset( $values['template_params'] ) ? $values['template_params'] : null,\n\t\t\t\t\t'location' => $type\n\t\t\t\t);\n\n\t\t\t\t/* Get template */\n\t\t\t\tlist( $widgetApp, $widgetKey ) = explode( '__', $values['block_template_plugin_import'] );\n\n\t\t\t\t/* Find it from the normal template system */\n\t\t\t\t$plugin = \\IPS\\Widget::load( \\IPS\\Application::load( $widgetApp ), $widgetKey, mt_rand(), array() );\n\n\t\t\t\t$location = $plugin->getTemplateLocation();\n\n\t\t\t\t$theme = ( \\IPS\\IN_DEV ) ? \\IPS\\Theme::master() : $values['block_template_theme_import'];\n\t\t\t\t$templateBits = $theme->getRawTemplates( $location['app'], $location['location'], $location['group'], \\IPS\\Theme::RETURN_ALL );\n\t\t\t\t$templateBit = $templateBits[ $location['app'] ][ $location['location'] ][ $location['group'] ][ $location['name'] ];\n\n\t\t\t\t$save['content'] = $templateBit['template_content'];\n\t\t\t\t$save['params'] = $templateBit['template_data'];\n\t\t\t\t$save['group'] = $widgetKey;\n\t\t\t\t$newTemplate = \\IPS\\cms\\Templates::add( $save );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$save = array( 'title' => $values['template_title'] );\n\n\t\t\t\t/* Page, css, js */\n\t\t\t\tif ( $type == 'js' or $type == 'css' )\n\t\t\t\t{\n\t\t\t\t\t$fileExt = ( $type == 'js' ) ? '.js' : ( $type == 'css' ? '.css' : NULL );\n\t\t\t\t\tif ( $fileExt AND ! preg_match( '#' . preg_quote( $fileExt, '#' ) . '$#', $values['template_title'] ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$values['template_title'] .= $fileExt;\n\t\t\t\t\t}\n\n\t\t\t\t\t$save['title'] = $values['template_title'];\n\t\t\t\t\t$save['type'] = $type;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( $type === 'page' AND $values['theme_template_group_type'] == 'existing' AND $values['template_group_existing'] == 'custom_wrappers' )\n\t\t\t\t{\n\t\t\t\t\t$save['params'] = '$html=NULL, $title=NULL';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( $type === 'page' AND $values['theme_template_group_type'] == 'existing' AND $values['template_group_existing'] == 'page_builder' )\n\t\t\t\t{\n\t\t\t\t\t$save['params'] = '$page, $widgets';\n\t\t\t\t}\n\n\t\t\t\t$save['group'] = ( $values['theme_template_group_type'] == 'existing' ) ? $values['template_group_existing'] : $values['template_group_new'];\n\n\t\t\t\tif ( isset( $values['template_content'] ) )\n\t\t\t\t{\n\t\t\t\t\t$save['content'] = $values['template_content'];\n\t\t\t\t}\n\n\t\t\t\t$save['location'] = $type;\n\n\t\t\t\t$newTemplate = \\IPS\\cms\\Templates::add( $save );\n\t\t\t}\n\n\t\t\t/* Done */\n\t\t\tif( \\IPS\\Request::i()->isAjax() )\n\t\t\t{\n\t\t\t\t\\IPS\\Output::i()->json( array(\n\t\t\t\t\t'id'\t\t=> $newTemplate->id,\n\t\t\t\t\t'title'\t\t=> $newTemplate->title,\n\t\t\t\t\t'params'\t=> $newTemplate->params,\n\t\t\t\t\t'desc'\t\t=> $newTemplate->description,\n\t\t\t\t\t'container'\t=> $newTemplate->container,\n\t\t\t\t\t'location'\t=> $newTemplate->location\n\t\t\t\t)\t);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\\IPS\\Output::i()->redirect( \\IPS\\Http\\Url::internal( 'app=cms&module=pages&controller=templates' ), 'saved' );\n\t\t\t}\n\t\t}\n\t\n\t\t/* Display */\n\t\t$title = \\strip_tags( \\IPS\\Member::loggedIn()->language()->get( 'content_template_add_template_' . $type ) );\n\t\t\\IPS\\Output::i()->output = \\IPS\\Theme::i()->getTemplate( 'global', 'core' )->block( $title, $form, FALSE );\n\t\t\\IPS\\Output::i()->title = $title;\n\t}", "function xh_templateMapping($name)\r\n\t{\r\n\t}", "public function loadTemplate($file) {\n $file = FilesystemUtils::getFullPath($file, CONTENT_DIR);\n $type = FilesystemUtils::getFileExtension($file);\n\n switch ($type) {\n case 'tpl':\n // Smarty template\n $this->output = $this->filterSmarty($file);\n break;\n\n case 'md':\n // Static Markdown file\n $this->output = $this->filterMarkdown($file);\n break;\n\n case 'tplmd':\n // Smarty template, with the output run through the Markdown parser\n $this->output = $this->filterMarkdown($this->filterSmarty($file), TRUE);\n break;\n\n case 'php':\n // PHP script\n $this->output = $this->filterPHP($file);\n break;\n\n case 'html':\n default:\n // HTML or other unsupported file; passed through unchanged\n $this->output = file_get_contents($file);\n break;\n }\n }", "public function run()\n\t{\n\t\tif (file_exists('templates/type.html'))\n\t\t{\n\t\t $this->obj->setTemplateName('type');\n\t\t}\n\t\telse\n\t\t{\n\t\t throw new Exception('Template was not found');\n\t\t}\n\t\t$this->creataTypeArray();\n\t}", "function createXTemplate() {\n if(!isset($this->xTemplate)) {\n if(isset($this->xTemplatePath)) {\n\n $this->xTemplate = new XTemplate($this->xTemplatePath);\n $this->xTemplate->assign(\"APP\", $this->local_app_strings);\n if(isset($this->local_mod_strings))$this->xTemplate->assign(\"MOD\", $this->local_mod_strings);\n $this->xTemplate->assign(\"THEME\", $this->local_theme);\n $this->xTemplate->assign(\"IMAGE_PATH\", $this->local_image_path);\n $this->xTemplate->assign(\"MODULE_NAME\", $this->local_current_module);\n } else {\n $GLOBALS['log']->error(\"NO XTEMPLATEPATH DEFINED CANNOT CREATE XTEMPLATE\");\n }\n }\n}", "public function generate() {\n $this->event->getIO()->write(\"<info>Generate settings file:</info>\");\n\n $parameters = $this->getParameters();\n if ($parameters) {\n $new_settings = $this->twigEnvironment->render($this->getTemplateFilename(), $this->getReplacements($parameters));\n $target_settings_file = $this->getDestinationPath() . '/' . $this->getDestinationFile();\n\n // Ensure folder and existing file is writable.\n chmod($this->getDestinationPath(), 0755);\n if (file_exists($target_settings_file)) {\n chmod($target_settings_file, 0644);\n }\n\n file_put_contents($target_settings_file, $new_settings);\n }\n else {\n $this->event->getIO()->write(\"<error>Unable to find any parameters files</error>\");\n }\n }", "private function setUpTemplate()\n {\n $this->addJS();\n $this->addCSS();\n }", "private function prepareTemplate() {\r\n $template = $this->iTemplateFactory->createTemplate();\r\n $template->_control = $this->linkGenerator;\r\n $this->setTemplate($template);\r\n }", "public function __viewTemplate()\n {\n $this->_context[2] = 'single';\n $this->addStylesheetToHead(self::$assets_base_url . 'editor.css');\n $this->addStylesheetToHead(self::$assets_base_url . 'highlighters/highlight-xsl.css');\n $this->addScriptToHead(self::$assets_base_url . 'editor.js');\n $this->addScriptToHead(self::$assets_base_url . 'highlighters/highlight-xsl.js');\n $name = $this->_context[1];\n $filename = $name . '.xsl';\n $title = $filename;\n $this->setTitle(__(('%1$s &ndash; %2$s &ndash; %3$s'), array($title, __('Pages'), __('Symphony'))));\n //$this->setPageType('table');\n $this->Body->setAttribute('spellcheck', 'false');\n $this->appendSubheading($title);\n $breadcrumbs = array(\n Widget::Anchor(__('Pages'), SYMPHONY_URL . '/blueprints/pages/'),\n new XMLElement('span', __(Helpers::capitalizeWords($name)))\n );\n $this->insertBreadcrumbs($breadcrumbs);\n \n $this->insertAction(\n Widget::Anchor(\n __('Edit Page'), \n SYMPHONY_URL . '/blueprints/pages/edit/' . PageManager::fetchIDFromHandle($name) . '/',\n __('Edit Page Configuration'),\n 'button'\n )\n );\n\n $this->Form->setAttribute('class', 'columns');\n $this->Form->setAttribute('action', SYMPHONY_URL . '/blueprints/pages/' . $name . '/');\n\n $fieldset = new XMLElement('fieldset');\n $fieldset->appendChild(Widget::Input('fields[name]', $filename, 'hidden'));\n $fieldset->appendChild($label);\n //$fieldset->appendChild((isset($this->_errors['name']) ? Widget::Error($label, $this->_errors['name']) : $label));\n\n $label = Widget::Label(__('Body'));\n $label->appendChild(\n Widget::Textarea(\n 'fields[body]',\n 30,\n 100,\n $filename ? htmlentities(file_get_contents(WORKSPACE . '/pages/' . $filename), ENT_COMPAT, 'UTF-8') : '',\n array('id' => 'text-area', 'class' => 'code hidden')\n )\n );\n //$fieldset->appendChild((isset($this->_errors['body']) ? Widget::Error($label, $this->_errors['body']) : $label));\n\n $fieldset->appendChild($label);\n $this->Form->appendChild($fieldset);\n\n $this->Form->appendChild(\n new XMLElement(\n 'div',\n new XMLElement('p', __('Saving')),\n array('id' => 'saving-popup')\n )\n );\n //$this->_context = array('edit', 'pages', 'single');\n $this->Form->appendChild(\n new XMLElement(\n 'div',\n Widget::Input(\n 'action[save]',\n __('Save Changes'),\n 'submit',\n array('class' => 'button', 'accesskey' => 's')\n ),\n array('class' => 'actions')\n )\n );\n }", "public function addTemplate( $template )\n {\n \n $this->templates[] = $template;\n \n }", "private function _prepareTemplate()\r\n {\r\n $this->_template = array();\r\n $this->_prepareTemplateDirectory($this->_templateXml->children(), $this->_template);\r\n }", "protected function compile(): void\n {\n if (System::getContainer()->get('contao.routing.scope_matcher')->isBackendRequest(System::getContainer()->get('request_stack')->getCurrentRequest() ?? Request::create(''))) {\n $this->strTemplate = 'be_wildcard';\n $this->Template = new BackendTemplate($this->strTemplate);\n }\n\n $this->Template->tabsElement = $this->tabs_element;\n }", "function set_template($template_name) {\n\t\t$this->template = $template_name;\n\t}", "function locate_template( $template, $template_name, $template_path ){\r\n\r\n\t\tswitch( $template_name ){\r\n\r\n\t\t\tcase 'form-fields/term-checklist-field.php':\r\n\t\t\t\twp_enqueue_script( 'jmfe-term-checklist-field' );\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\t\tif( file_exists( WPJM_FIELD_EDITOR_PLUGIN_DIR . '/templates/' . $template_name ) ){\r\n\t\t\t\t\t$template = WPJM_FIELD_EDITOR_PLUGIN_DIR . '/templates/' . $template_name;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn $template;\r\n\t}", "private function loadMasterTemplate() {\n\t\t//SOME_THEMES should be defined in SOME_PATH/includes/defines.php\n\t\t$path_and_file = SOME_THEMES.DS.$this->template.DS.$this->file.'.php';\n\t\tif (!file_exists($path_and_file)) {\n\t\t\tthrow new SomeFileNotFoundException(\"Master template file {$this->file} for {$this->template} not found\");\n\t\t}\n\t\t\n\t\tob_start();\n\t\t//$content = file_get_contents(SOME_THEMES.DS.'default'.DS.'index.php');\n\t\t$templatefile = $path_and_file;\n\t\trequire_once($templatefile);\n\t\t$content = ob_get_clean();\n\t\treturn $content;\n\t}", "function set_template( $template_file = 'template.php' )\n {\n // make sure that $template_file has .php extension\n $template_file = substr( $template_file, -4 ) == '.php' ? $template_file : ( $template_file . \".php\" );\n\n $this->template = \"../../{$this->settings->root_folder}/themes/{$this->settings->theme}/{$template_file}\";\n }", "function get_template()\n {\n }", "private function setTemplate(){\n if (isset($this->data['template']) && !empty($this->data['template'])){\n $template = APP_ROOT.'/app/templates/'.trim($this->data['template']).'.tpl';\n if (file_exists($template)){\n $this->template = $template;\n return;\n }\n }\n //default\n $this->template = APP_ROOT.'/app/templates/default.tpl';\n }", "public function addTemplate( VIRTUALGIFTS_BOL_Template $template, $file )\n {\n $this->templateDao->save($template);\n $tplId = $template->id;\n \n $filePath = $this->getGiftFilePath($tplId, $template->uploadTimestamp, $template->extension);\n $pluginFilesPath = $this->getGiftPluginFilesPath($tplId, $template->uploadTimestamp, $template->extension);\n\n if ( move_uploaded_file($file, $pluginFilesPath) )\n {\n $storage = OW::getStorage();\n $storage->copyFile($pluginFilesPath, $filePath);\n @unlink($pluginFilesPath);\n\n return $tplId;\n }\n else\n {\n $this->templateDao->deleteById($tplId);\n \n return false;\n }\n }", "public function setTemplate($file_name)\n {\n\n if (!$this->lock)\n {\n\n if (is_string($file_name))\n {\n $file = str_replace\n ('.:', NULL, get_include_path() . DIRECTORY_SEPARATOR . 'saferlanes/templates/' . $file_name . \".php\");\n if (file_exists($file))\n {\n\n $this->template = $file;\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n }\n else\n {\n return FALSE;\n }\n }\n return FALSE;\n\n }", "protected function content_template()\n\t{\n\t\t//\n\t}", "public function setTemplate($path)\n {\n $this->templatePages = $this->setSourceFile($path);\n }", "function register(){\n echo Template::instance()->render('gatorLock/register.php');\n}", "public function CreateTemplate($tname,$hfname,$tfname) {\r\n\t\t$fhcontents = addslashes(file_get_contents($hfname));\r\n\t\t$ftcontents = addslashes(file_get_contents($tfname));\r\n\t\t$sql = \"insert into templates (t_name, t_html, t_text) values (\\\"$tname\\\",\\\"$fhcontents\\\",\\\"$ftcontents\\\")\";\r\n\t\treturn $this->dbconn->query($sql);\r\n\t}", "public function setTemplate(string $template);", "static function gen($file) {\n\n\t\t$compile = BP_Parser::compile($file);\n\n\t\t$root = BlogPad::get_templates_dir();\n\n\t\t$theme = BlogPad::get_theme_name();\n\n\t\t$template_name = 'compiled_'.basename($file).'.php';\n\n\t\tif( !is_dir($root) ) {\n\t\t\tmkdir($root);\n\t\t}\n\n\t\t// Organise each template by its theme directory.\n\t\tif( !is_dir(\"$root/$theme\") ) {\n\t\t\tmkdir(\"$root/$theme\");\n\t\t}\n\n\t\tif( !empty($compile) ) {\n\t\t\tif( !file_put_contents(\"$root/$theme/$template_name\", $compile) ) {\n\t\t\t\ttrigger_error(\"Couldn't generate template for $file.\", E_USER_NOTICE);\n\t\t\t\texit;\n\t\t\t}\n\n\t\t}\n\n\t\t// Return the path of the compiled template so that it can be used as a pointer.\n\t\treturn \"$root/$theme/$template_name\";\n\t}", "public function main()\n {\n $className = $this->fullyQualifiedClassName();\n $templatePath = $this->template();\n $destinationDir = $this->destinationDir();\n $destinationFile = $this->destinationFile();\n\n if (!file_exists($templatePath)) {\n $this->error(sprintf('Given template file path does not exists [%s]', $templatePath));\n return 1;\n }\n \n if ($this->opt('force') === false && file_exists($destinationFile)) {\n $this->error(sprintf(\n '\\'%s\\' already exists. Use --force to directly replaces it.', \n $className\n ));\n return 2;\n }\n\n $name = $this->name();\n $namespace = $this->fullNamespace();\n\n $placeholders = $this->preparedPlaceholders();\n $placeholders['{{name}}'] = $name;\n $placeholders['{{namespace}}'] = $namespace;\n \n $template = file_get_contents($templatePath);\n\n $constructor = $this->opt('constructor') === true ? $this->constructor() : '';\n $template = str_replace('{{constructor}}', $constructor, $template);\n\n $template = str_replace(\n array_keys($placeholders), array_values($placeholders), $template\n );\n\n if (!is_dir($destinationDir)) {\n mkdir($destinationDir, '0755', true);\n }\n file_put_contents($destinationFile, $template);\n\n $this->info(sprintf('%s created with success!', $className));\n $this->info(sprintf('File: %s', $destinationFile));\n\n return 0;\n }", "public function testProcess_FsTemplate() \n {\n $this->tmpfile = tempnam(sys_get_temp_dir(), 'Q-');\n file_put_contents($this->tmpfile, \"<body>\n Hello i'm %{name}. I was very cool @ %{a}.\n</body>\");\n\n $file = $this->getMock('Q\\Fs_Node', array('__toString', 'getContents'), array(), '', false);\n $file->expects($this->any())->method('__toString')->will($this->returnValue($this->tmpfile)); \n $file->expects($this->any())->method('getContents')->will($this->returnValue(file_get_contents($this->tmpfile))); \n \n $transform = new Transform_Replace();\n $transform->template = $file;\n $contents = $transform->process(array('a'=>19, 'name'=>\"arnold\"));\n \n $this->assertType('Q\\Transform_Replace', $transform);\n $this->assertEquals(\"<body>\n Hello i'm arnold. I was very cool @ 19.\n</body>\", $contents);\n }", "protected function initTemplate()\n {\n /** @var WorldState $state */\n /** @var ExecHelper $exec */\n $tplPhp = <<<EOS\nWorld. From: <?=\\$state->name?>\n\nExec URL: <?=\\$exec->url( 'someExec', ['a'=>1] )?><?php \\$formBody = \"<input type=\\\"text\\\" name=\\\"someInput\\\" value=\\\"2\\\">\\n\"?>\n\nExec Form:\n<?=\\$exec->wrapForm( 'otherExec', 'POST', \\$formBody ) ?>\nEOS;\n $this->template = new PhpTemplate( $this, null, $tplPhp );\n }", "function read_template_file (){\n\n\t// Generate an error if the template file does not exist and return 'false'.\n if (! file_exists($this->template_file)) {\n print 'Template file does not exist: ['.$this->template_file.']';\n\t return false;\n }\n\t// We use templates and the template file exists\n\t// Capture the template, this way we can use php code inside templates\n\t\n\t$this->start_capture (); // Start capture to buffer\n\trequire $this->template_file; // Includes the template, this way php code can be used in templates\n\t$this->stop_capture ('template_html');\n\treturn true;\n }", "function template( $file, $args ){\n if ( !file_exists( $file ) ) {\n return '';\n }\n // Make values in the associative array easier to access by extracting them\n if ( is_array( $args ) ){\n extract( $args );\n }\n // buffer the output (including the file is \"output\")\n ob_start();\n include $file;\n return ob_get_clean();\n }", "private function configureTemplate(){\n\t\t$template = $this->getTemplate();\n\t\t$template->setPageSubtitle($this->getModule()->getDisplayedName());\n\t}", "function _get() {\n if( file_exists($this->_template) ) {\n $this->_text = file($this->_template);\n }\n else {\n $this->_text = array(\"Template file {$this->_template} could not be found.\");\n }\n }" ]
[ "0.6778215", "0.6290222", "0.6121769", "0.60905653", "0.6087986", "0.6075845", "0.60604346", "0.60322225", "0.59922594", "0.5965061", "0.59491664", "0.5937029", "0.59129214", "0.5908895", "0.5901057", "0.5889556", "0.5886067", "0.58699733", "0.58690727", "0.5861437", "0.5850847", "0.5811028", "0.5792452", "0.57814336", "0.577822", "0.57777345", "0.5770048", "0.57444966", "0.57429564", "0.5732835", "0.57272637", "0.57229537", "0.5719942", "0.571909", "0.5714696", "0.5714612", "0.57003224", "0.56913614", "0.5656154", "0.56447595", "0.5626927", "0.56261855", "0.5625492", "0.5621731", "0.56210816", "0.56210816", "0.56210816", "0.56210816", "0.5616606", "0.5616606", "0.56152797", "0.56112456", "0.5609734", "0.56096166", "0.5600922", "0.5575232", "0.5564556", "0.55640155", "0.55575866", "0.5541603", "0.5536506", "0.55265415", "0.5515446", "0.550532", "0.5505137", "0.54948175", "0.54921526", "0.54916203", "0.54913765", "0.5489886", "0.5489222", "0.5481183", "0.54740787", "0.54710424", "0.54641867", "0.5460749", "0.5460726", "0.54597247", "0.5455165", "0.5453753", "0.54507595", "0.5448524", "0.54400104", "0.5436112", "0.5434764", "0.5428497", "0.54243785", "0.5417282", "0.541085", "0.5408039", "0.540316", "0.54003", "0.5392431", "0.5385854", "0.5374999", "0.53738517", "0.5371009", "0.53611505", "0.53594744", "0.5357143", "0.535661" ]
0.0
-1
registerTemplate() Get the SpriteStyleNode for the given image path.
public function getStyleNode($path) { $node = $this->spriteStyleRegistry->getStyleNode($path); if(! $node) { throw new SpriteException(sprintf('Error: no node found for path "%s". Available nodes are: %s.', $path, implode(', ', $this->spriteStyleRegistry->getStyleNodesPaths())), 102); } return $node; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTemplateRegistry()\n {\n return $this->spriteTemplateRegistry;\n }", "public function getImageTemplate() { return $this->imageTemplate; }", "abstract public function getTemplate();", "function getTemplate();", "function get_template()\n {\n }", "public function draw_template($template) {\n\n $name = $template->getName();\n $templateId = $template->getId();\n\n $img_url = plugin_dir_url( dirname(__FILE__) ).\"img/\".$template->getImage();\n\n include Config::VIEW_PATH.\"template.php\";\n }", "public function getStyleRegistry()\n {\n return $this->spriteStyleRegistry;\n }", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "function s2_get_template($rawTemplateId, $defaultPath = false)\n{\n global $request_uri;\n\n if ($defaultPath === false) {\n $defaultPath = S2_ROOT . '_include/templates/';\n }\n\n $path = false;\n $templateId = preg_replace('#[^0-9a-zA-Z\\._\\-]#', '', $rawTemplateId);\n\n $return = ($hook = s2_hook('fn_get_template_start')) ? eval($hook) : null;\n if ($return) {\n return $return;\n }\n\n if (!$path) {\n if (file_exists(S2_ROOT . '_styles/' . S2_STYLE . '/templates/' . $templateId)) {\n $path = S2_ROOT . '_styles/' . S2_STYLE . '/templates/' . $templateId;\n } elseif (file_exists($defaultPath . $templateId)) {\n $path = $defaultPath . $templateId;\n } else {\n throw new Exception(sprintf(Lang::get('Template not found'), $defaultPath . $templateId));\n }\n }\n\n ob_start();\n include $path;\n $template = ob_get_clean();\n\n $style_filename = '_styles/' . S2_STYLE . '/' . S2_STYLE . '.php';\n $assetPack = require S2_ROOT . $style_filename;\n\n if (!($assetPack instanceof \\S2\\Cms\\Asset\\AssetPack)) {\n throw new Exception(sprintf('File \"%s\" must return an AssetPack object.', $style_filename));\n }\n\n ($hook = s2_hook('fn_get_template_pre_includes_merge')) ? eval($hook) : null;\n\n $styles = $assetPack->getStyles(\n S2_PATH . '/_styles/' . S2_STYLE . '/',\n new \\S2\\Cms\\Asset\\AssetMerge(S2_CACHE_DIR, '/_cache/', S2_STYLE . '_styles.css', \\S2\\Cms\\Asset\\AssetMerge::FILTER_CSS, defined('S2_DEBUG'))\n );\n $scripts = $assetPack->getScripts(\n S2_PATH . '/_styles/' . S2_STYLE . '/',\n new \\S2\\Cms\\Asset\\AssetMerge(S2_CACHE_DIR, '/_cache/', S2_STYLE . '_scripts.js', \\S2\\Cms\\Asset\\AssetMerge::FILTER_JS, defined('S2_DEBUG'))\n );\n\n $template = str_replace(['<!-- s2_styles -->', '<!-- s2_scripts -->'], [$styles, $scripts], $template);\n\n if ((strpos($template, '</a>') !== false) && isset($request_uri)) {\n $template = preg_replace_callback('#<a href=\"([^\"]*)\">([^<]*)</a>#',\n static function ($matches) use ($request_uri) {\n $real_request_uri = s2_link($request_uri);\n\n [, $url, $text] = $matches;\n\n if ($url == $real_request_uri) {\n return '<span>' . $text . '</span>';\n }\n\n if ($url && strpos($real_request_uri, $url) === 0) {\n return '<a class=\"current\" href=\"' . $url . '\">' . $text . '</a>';\n }\n\n return '<a href=\"' . $url . '\">' . $text . '</a>';\n },\n $template\n );\n }\n\n ($hook = s2_hook('fn_get_template_end')) ? eval($hook) : null;\n return $template;\n}", "abstract public function getTemplate($tpl);", "private function _processTemplate(\\DOMNode $node, array $path = [/** value is missing */], array &$dataPathCache = [/** value is missing */], $currentDataPath = '') {}", "public function getTemplate() {}", "function register_style() {\n}", "function getTemplateHierarchy($template) {\n\t\t// whether or not .php was added\n\t\t$template_slug = rtrim($template, '.php');\n\t\t$template = $template_slug . '.php';\n\t\t\n\t\tif ( $theme_file = locate_template(array('image-widget/'.$template)) ) {\n\t\t\t$file = $theme_file;\n\t\t} else {\n\t\t\t$file = 'views/' . $template;\n\t\t}\n\t\treturn apply_filters( 'sp_template_image-widget_'.$template, $file);\n\t}", "abstract public function register_style();", "function get_template_name($instance)\n {\n return isset($instance['style']) ? $instance['style'] : 'base';\n }", "function get_template_hierarchy($slug, $is_custom = \\false, $template_prefix = '')\n {\n }", "public function getTemplate(): TemplateInterface;", "function getTemplateHierarchy($template) {\n\t\t// whether or not .php was added\n\t\t$template_slug = rtrim($template, '.php');\n\t\t$template = $template_slug . '.php';\n\n\t\tif ( $theme_file = locate_template(array('social-icons/'.$template)) ) {\n\t\t\t$file = $theme_file;\n\t\t} else {\n\t\t\t$file = 'views/' . $template;\n\t\t}\n\t\treturn apply_filters( 'template_social-icons_'.$template, $file);\n\t}", "function training_image_callback() {\n $output = array();\n $file_path = drupal_realpath('modules/image/sample.png');\n $source = (object) array(\n 'uid' => 1,\n 'uri' => $file_path,\n 'filename' => basename($file_path),\n 'filemime' => file_get_mimetype($file_path),\n );\n $directory = 'public://';\n file_copy($source, $directory, $replace = FILE_EXISTS_REPLACE);\n $array_style = image_styles();\n foreach ($array_style as $val) {\n $style_name = $val['name'];\n $path = 'public://sample.png';\n $attributes = array(\n 'class' => 'simple-image',\n );\n $output[] = theme('image_style', array(\n 'style_name' => $style_name,\n 'path' => $path,\n 'attributes' => $attributes,\n ));\n }\n\n return theme('item_list', array(\n 'items' => $output,\n 'type' => 'ol',\n 'title' => t('Default image styles'),\n ));\n}", "function locate_template( $template, $template_name, $template_path ){\r\n\r\n\t\tswitch( $template_name ){\r\n\r\n\t\t\tcase 'form-fields/term-checklist-field.php':\r\n\t\t\t\twp_enqueue_script( 'jmfe-term-checklist-field' );\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\t\tif( file_exists( WPJM_FIELD_EDITOR_PLUGIN_DIR . '/templates/' . $template_name ) ){\r\n\t\t\t\t\t$template = WPJM_FIELD_EDITOR_PLUGIN_DIR . '/templates/' . $template_name;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn $template;\r\n\t}", "public function getTemplateNode($fieldName) {}", "function ct_get_template_hierarchy( $template ) {\n \n // Get the template slug\n $template_slug = rtrim( $template, '.php' );//single\n $template = $template_slug . '.php'; //single.php\n\n //logit($template,'$template: ');\n //logit($template_slug,'$template_slug: ');\n\n //$locate = locate_template( array( 'plugin_templates/single.php' ) );\n //$locateString = 'plugin_template/' . $template;\n //logit($locateString,'$locateString: ');\n //logit($locate,'$locate: ');\n \n // Check if a custom template exists in the theme folder, if not, load the plugin template file\n if ( $theme_file = locate_template( array( 'cals_teams_templates/' . $template ) ) ) {\n $file = $theme_file;\n logit($file,'$file: ');\n\n }\n else {\n $file = CT_PLUGIN_BASE_DIR . '/includes/templates/' . $template;\n }\n \n //return apply_filters( 'rc_repl_template_' . $template, $file );\n return $file;\n}", "function get_template($template){\n\n\t\t\t$login_arr = $this->action_parser($this->action,'template') ;\n\n\t\t\t$pos = array_search($template, $login_arr['template']['name']); \n\n\t\t\treturn $login_arr['template']['path'][$pos];\n\n\t\t}", "public function get_template()\n {\n }", "public function get_template()\n {\n }", "function get_signin_template( $template ) {\n\tglobal $wp_error, $message, $error, $interim_login, $current_site, $action, $shake_error_codes;\n\t$template = $template .'.php';\n\n\tif ( file_exists( trailingslashit( get_stylesheet_directory() ) . $template ) )\n\t\tinclude( trailingslashit( get_stylesheet_directory() ) . $template );\n\telseif ( file_exists( trailingslashit( get_template_directory() ) . $template ) )\n\t\tinclude( trailingslashit( get_template_directory() ) . $template );\n\telse\n\t\tinclude( BSIGN_DIR . '/templates/'. $template );\n}", "function DrawFromTemplate( $sTemplate )\r\n {\r\n while( true ) {\r\n if( (strpos( $sTemplate, \"[[ListDraw]]\" )) !== false ) {\r\n $sTemplate = str_replace( \"[[ListDraw]]\", $this->ListDraw(), $sTemplate );\r\n } else if( (strpos( $sTemplate, \"[[FormDraw]]\" )) !== false ) {\r\n $sTemplate = str_replace( \"[[FormDraw]]\", $this->FormDraw(), $sTemplate );\r\n } else if( (strpos( $sTemplate, \"[[ButtonNewRow]]\" )) !== false ) {\r\n $sTemplate = str_replace( \"[[ButtonNewRow]]\", $this->ButtonNewRow(), $sTemplate );\r\n } else if( (strpos( $sTemplate, \"[[ButtonDeleteRow]]\" )) !== false ) {\r\n $sTemplate = str_replace( \"[[ButtonDeleteRow]]\", $this->ButtonDeleteRow(), $sTemplate );\r\n } else {\r\n break;\r\n }\r\n }\r\n return( $sTemplate );\r\n }", "public function getTemplate()\r\n {\r\n return $this->_customTemplate;\r\n }", "public function generateSprite($tag, $options = [])\n {\n return $this->generateSpriteAsync($tag, $options)->wait();\n }", "public static function image_style($path, $style_name, $options = array()) {\n $image = array(\n 'path' => $path,\n 'style_name' => $style_name,\n );\n\n return theme('image_style', $image + $options);\n }", "protected function resolveSpritePath() {}", "function carton_get_template( $template_name, $args = array(), $template_path = '', $default_path = '' ) {\n\tglobal $carton;\n\n\tif ( $args && is_array($args) )\n\t\textract( $args );\n\n\t$located = carton_locate_template( $template_name, $template_path, $default_path );\n\n\tdo_action( 'carton_before_template_part', $template_name, $template_path, $located );\n\n\tinclude( $located );\n\n\tdo_action( 'carton_after_template_part', $template_name, $template_path, $located );\n}", "abstract public function getTemplateFile();", "function getTemplate()\r\n\t{\r\n\t\tglobal $config;\r\n\t\tglobal $section;\r\n\t\t\r\n\t\t$style = $_REQUEST[\"_style\"];\r\n\t\t$site = $this->Site();\r\n\t\tif(!$site) Site::getSite();\r\n\t\t\r\n\t\t$templateFile = \"\";\r\n\t\t\r\n\t\tswitch($style)\r\n\t\t{\r\n\t\tcase 'print':\r\n\t\t\t$templateFile = $site->print_template;\r\n\t\t\tbreak;\r\n\r\n\t\tcase 'popup':\r\n\t\t\t$templateFile = $site->popup_template;\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase 'mobile':\r\n\t\t\t$templateFile = $site->mobile_template;\r\n\t\t\t\r\n\t\tcase 'nude':\r\n\t\t\treturn \"{description}\";\r\n\t\t}\r\n\r\n\t\tif ($section)\r\n\t\t{\r\n\t\t\tif (!$templateFile) $templateFile = $section->getTemplateFile($this->identifier);\r\n\t\t}\r\n\t\t\t\t\r\n\t\tif (!$templateFile) $templateFile = $this->template;\r\n\t\tif (!$templateFile) $templateFile = $site->default_template;\r\n\t\t\r\n\t\t$templateFile = ComponentManager::fireEvent(\"OverrideTemplate\", $templateFile);\r\n\t\t\r\n\t\t$template = file_get_contents(\"{$config['homedir']}/templates/{$templateFile}\");\r\n\r\n\t\treturn $template;\r\n\t}", "public function getTemplateType() : string {\n return 'css';\n }", "public function template_loader( $template ) {\n\n\t\t\t$find = array(); // nope! not used\n\t\t\t$file = '';\n\n\t\t\tif ( is_tax( 'photo_category' ) ) {\n\n\t\t\t\t$term = get_queried_object();\n\n\t\t\t\t$file = 'taxonomy-' . $term->taxonomy . '.php';\n\t\t\t\t$find[] = 'taxonomy-' . $term->taxonomy . '-' . $term->slug . '.php';\n\t\t\t\t$find[] = $this->template_url . 'taxonomy-' . $term->taxonomy . '-' . $term->slug . '.php';\n\t\t\t\t$find[] = $file;\n\t\t\t\t$find[] = $this->template_url . $file;\n\t\t\t}\n\n\t\t\tif ( is_tax( 'photo_tag' ) ) {\n\n\t\t\t\t$term = get_queried_object();\n\n\t\t\t\t$file = 'taxonomy-' . $term->taxonomy . '.php';\n\t\t\t\t$find[] = 'taxonomy-' . $term->taxonomy . '-' . $term->slug . '.php';\n\t\t\t\t$find[] = $this->template_url . 'taxonomy-' . $term->taxonomy . '-' . $term->slug . '.php';\n\t\t\t\t$find[] = $file;\n\t\t\t\t$find[] = $this->template_url . $file;\n\t\t\t}\n\n\t\t\tif ( $file ) {\n\t\t\t\t$template = locate_template( $find );\n\t\t\t\tif ( ! $template ) $template = $this->plugin_path() . '/templates/' . $file;\n\t\t\t}\n\n\t\t\treturn $template;\n\t\t}", "public function loadTemplate($path);", "function st_get_template($file,$data = array()){\r $file = ST_DIR.'/templates/'.$file;\r if(file_exists($file)){\r include($file); return true;\r }\r return false;\r}", "function initNewXTemplate($XTemplatePath, $modString, $imagePath = null) {\n $this->setXTemplatePath($XTemplatePath);\n if(isset($modString))\n $this->setModStrings($modString);\n if(isset($imagePath))\n $this->setImagePath($imagePath);\n}", "function acp_load_template( $template )\n\t{\n\t\tif ( ! $this->skin_acp )\n\t\t{\n\t\t\t$this->skin_acp = 'IPB2_Standard';\n\t\t}\n\t\t\n\t\trequire_once( ROOT_PATH.\"skin_acp/\".$this->skin_acp.\"/acp_skin_html/\".$template.\".php\" );\n\t\t$tmp = new $template();\n\t\t$tmp->ipsclass =& $this;\n\t\treturn $tmp;\n\t}", "function deals_get_template($template_name, $require_once = true) {\n\tif (file_exists( STYLESHEETPATH . '/' . DEALS_TEMPLATE . $template_name )) load_template( STYLESHEETPATH . '/' . DEALS_TEMPLATE . $template_name, $require_once ); \n\telseif (file_exists( STYLESHEETPATH . '/' . $template_name )) load_template( STYLESHEETPATH . '/' . $template_name , $require_once); \n\telse load_template( DEALS_TEMPLATE_DIR . $template_name , $require_once);\n}", "function astra_addon_get_template( $template_name, $args = array(), $template_path = '', $default_path = '' ) {\n\n\t\t$located = astra_addon_locate_template( $template_name, $template_path, $default_path );\n\n\t\tif ( ! file_exists( $located ) ) {\n\t\t\t/* translators: 1: file location */\n\t\t\t_doing_it_wrong( __FUNCTION__, esc_html( sprintf( __( '%s does not exist.', 'astra-addon' ), '<code>' . $located . '</code>' ) ), '1.0.0' );\n\t\t\treturn;\n\t\t}\n\n\t\t// Allow 3rd party plugin filter template file from their plugin.\n\t\t$located = apply_filters( 'astra_addon_get_template', $located, $template_name, $args, $template_path, $default_path );\n\n\t\tdo_action( 'astra_addon_before_template_part', $template_name, $template_path, $located, $args );\n\n\t\tinclude $located;\n\n\t\tdo_action( 'astra_addon_after_template_part', $template_name, $template_path, $located, $args );\n\t}", "function loadTemplate( $title ) {\n global $wgUser, $wgParser, $wgTitle;\n \n # Load the template article for this skin\n $article = new Article( Title::newFromText( $title ) );\n if ( $article ) {\n $template = $article->fetchContent(0,false,false);\n if ( $template ) {\n # Drop leading and trailing blanks and escape delimiter before parsing\n # Substitute a few skin-related variables before parsing\n $template = preg_replace('/(^\\s+|\\s+$)/m', '', $template );\n $template = str_replace( DELIM.DELIM.DELIM, \"\\x07\", $template);\n $template = preg_replace('/'.DELIM.DELIM.'(.*?)'.DELIM.DELIM.'/e',\n 'translate_variable( $1 )', $template );\n \n # Use the parser preprocessor to evaluate conditionals in the template\n # Copy the parser to make sure we don't trash the parser state too much\n $lparse = clone $wgParser;\n $template = $lparse->parse( $template, $wgTitle, ParserOptions::newFromUser($wgUser) );\n $template = str_replace( '&nbsp;', ' ', $template->getText() );\n return $template ;\n }\n }\n return '';\n}", "public function getTemplateFile();", "public function show($id){\n $cssTemplate = CssTemplate::find($id);\n return $cssTemplate;\n }", "function my_generate_css($info, $scandir, $pos, $i){\n ($pos == 0) ? $neg = \"\" : $neg = \"-\";\n global $nameCSS;\n $chaine = '|.(.*?)/|iU';\n $scandir = preg_replace($chaine,'',$scandir);\n$css = \".sprite-\".substr($scandir[$i], 0,-4).\"{ \\n\n width: \".$info[0].\"px;\\n\n height: \".$info[1].\"px;\\n\n background-position: \".$neg.$pos .\"px 0px;\\n\n}\\n\";\n $handle = fopen($nameCSS, \"a\");\n $write = fwrite($handle, $css);\n fclose($handle);\n}", "function image (&$src) {\n\t // Check only if STS is enabled.\n if (MODULE_STS_DEFAULT_STATUS==\"true\" && $this->is_button ==false)\n if (file_exists(STS_TEMPLATE_DIR . $src)) $src = STS_TEMPLATE_DIR . $src;\n\t\t$this->is_button = false;\n\t}", "public function getStyleLoader();", "function beeldgeluid_image_style($variables) {\n $style_name = $variables['style_name'];\n $path = $variables['path'];\n\n // theme_image() can only honor the $getsize parameter with local file paths.\n // The derivative image is not created until it has been requested so the file\n // may not yet exist, in this case we just fallback to the URL.\n $style_path = image_style_path($style_name, $path);\n if (!file_exists($style_path)) {\n $style_path = image_style_url($style_name, $path);\n }\n $variables['path'] = $style_path;\n\n if (is_file($style_path)) {\n if (list($width, $height, $type, $attributes) = @getimagesize($style_path)) {\n $variables['width'] = $width;\n $variables['height'] = $height;\n }\n }\n\n return theme('image', $variables);\n}", "function s3_storage_load_template($name, array $_vars)\n{\n $template = locate_template($name, false, false);\n\n // Use the default template if the theme doesn't have it\n if (!$template) {\n $template = dirname(__FILE__) . '/../templates/' . $name . '.php';\n }\n\n // Load the template\n extract($_vars);\n require $template;\n}", "function find_template (){\n $scriptbasename = basename ($_SERVER['PHP_SELF']);\n\n// Disable STS for popups: moved to sts_default module since v4.4\n\n // Check for module that will handle the template (for example module sts_index takes care of index.php templates)\n\t$check_file = 'sts_'.$scriptbasename;\n\t$modules_installed = explode (';', MODULE_STS_INSTALLED);\n\tif (!in_array($check_file, $modules_installed)) $check_file = 'sts_default.php';\n\n include_once (DIR_WS_MODULES.'sts/'.$check_file);\n\t$classname=substr($check_file,0,strlen($check_file)-4);\n\t$this->script=new $classname; // Create an object from the module\n\t\n// If module existes but is disabled, use the default module.\n\tif ($this->script->enabled==false) {\n\t unset ($this->script);\n include_once (DIR_WS_MODULES.'sts/sts_default.php');\n\t $this->script=new sts_default; // Create an object from the module\t \n\t}\n\t\n\t$this->template_file = $this->script->find_template($scriptbasename); // Retrieve the template to use, $scriptbasename added in v4.4\n\treturn $this->template_file ;\n }", "protected function loadTemplate($template)\n {\n $template = preg_replace('/^template\\:/i', null, $template);\n\n if (file_exists(get_stylesheet_directory().'/'.$template)) {\n return get_stylesheet_directory().'/'.$template;\n }\n\n if (file_exists(get_template_directory().'/'.$template)) {\n return get_template_directory().'/'.$template;\n }\n\n return null;\n }", "public function path($style = null)\n\t{\n\t\t$template = $this->_options['path'];\n\t\treturn $this->_parseTemplateString($template, $style);\n\t}", "public static function render($template)\n {\n $css_path = 'templates/'.$template.self::$cssPath;\n /*\n * We need an additional autoloader for the ScssPhp Framework,\n * because it relies on that we have one if we use the new non-deprecated namespaced approach\n */\n spl_autoload_register(function($class){\n //load file from namespace\n $class = str_replace('\\\\','/', $class).'.php';\n $class = str_replace('Leafo/ScssPhp', __DIR__.'/scssphp/src', $class);\n if(file_exists($class))\n {\n require_once($class);\n }\n });\n\n /*\n * Crossplattform getallheaders method\n */\n if (!function_exists('getallheaders'))\n {\n function getallheaders()\n {\n $headers = '';\n foreach ($_SERVER as $name => $value)\n {\n if (substr($name, 0, 5) == 'HTTP_')\n {\n $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;\n }\n }\n return $headers;\n }\n }\n\n /*\n * Render SCSS if necessary\n */\n $headers = getallheaders();\n $forceRefresh = ($headers['Cache-Control'] == \"no-cache\" || $headers[\"Pragma\"] == \"no-cache\" || isset($_GET['nocache']));\n if(!file_exists($css_path) || $forceRefresh)\n {\n $scss = '@import \"templates/'.$template.self::$scssPath.'\";';\n $scssc = new \\Leafo\\ScssPhp\\Compiler();\n $scssc->setSourceMap(Leafo\\ScssPhp\\Compiler::SOURCE_MAP_FILE);\n $css = $scssc->compile($scss);\n file_put_contents($css_path, $css);\n }\n\n }", "function getStyles () {\n return array(\"template.css\");\n }", "public function getTemplateSlug(): string;", "function lumi_sfm_template( $name ) {\n\tif ( empty( $name ) ) {\n\t\treturn false;\n\t}\n\n\tif ( isset( $lumi_sfm['Template'][ $name ] ) ) {\n\t\treturn $lumi_sfm['Template'][ $name ]; //If template functions are already loaded\n\t}\n\n\tinclude_once LUMI_SFM_CORE_PATH . $name . '.template.php';\n\t$class_name = '\\\\Lumiart\\\\SecretFileManager\\\\Template\\\\' . $name;\n\t$lumi_sfm['Template'][ $name ] = new $class_name;\n\n\treturn $lumi_sfm['Template'][ $name ];\n}", "function get_template($template)\n {\n\n $login_arr = $this->action_parser($this->action, 'template');\n\n $pos = array_search($template, $login_arr['template']['name']);\n\n return $login_arr['template']['path'][$pos];\n }", "function bttk_socicon_template() { \r\n \t$screen = get_current_screen();?>\r\n\t <div class=\"bttk-socicon-template\">\r\n\t <li class=\"social-share-list\" data-id=\"{{socicon_index}}\">\r\n <span class=\"bttk-social-icons-sortable-handle\"></span>\r\n <span class=\"bttk-social-icons-field-handle\"><i class=\"fas fa-plus\"></i></span>\r\n <label for=\"<?php echo esc_attr( $this->get_field_id( 'socicon_profile' ) ); ?>\"><?php esc_html_e( 'Social Icon', 'blossomthemes-toolkit' ); ?></label>\r\n <span class=\"example-text\">Example: facebook</span>\r\n <input class=\"user-social-profile\" id=\"<?php echo esc_attr( $this->get_field_id( 'socicon_profile[{{socicon_index}}]' ) ); ?>\" name=\"<?php echo esc_attr( $this->get_field_name( 'socicon_profile[{{socicon_index}}]' ) ); ?>\" type=\"text\" value=\"\" placeholder=\"<?php _e('Search Social Icons','blossomthemes-toolkit');?>\" />\r\n <label class=\"link-label\" for=\"<?php echo esc_attr( $this->get_field_id( 'socicon[{{socicon_index}}]' ) ); ?>\"><?php esc_html_e( 'Link', 'blossomthemes-toolkit' ); ?></label>\r\n <span class=\"example-text\">Example: http://facebook.com</span>\r\n <input class=\"user-social-links\" id=\"<?php echo esc_attr( $this->get_field_id( 'socicon[{{socicon_index}}]' ) ); ?>\" name=\"<?php echo esc_attr( $this->get_field_name( 'socicon[{{socicon_index}}]' ) ); ?>\" type=\"text\" value=\"\" />\r\n <span class=\"del-user-social-links\"><i class=\"fas fa-times\"></i></span>\r\n </li>\r\n\t </div>\r\n\t <style type=\"text/css\">.bttk-socicon-template{display: none;}</style>\r\n <?php\r\n }", "function get_svg($key) {\n\t$content = 'none';\n\t$file = get_stylesheet_directory().'/library/assets/svg/'.$key.'.svg';\n\tif(file_exists($file)) {\n\t\t$content = file_get_contents($file);\n\t}\n\treturn $content;\n}", "function rc_tc_get_template_hierarchy( $template ) {\r\n \r\n echo ('<!-- Looking for Template ' . __( $template, 'nmmc' ) . '-->' );\r\n // Get the template slug\r\n $template_slug = rtrim( $template, '.php' );\r\n $template = $template_slug . '.php';\r\n echo ('<!-- Looking for Template ' . __( $template, 'nmmc' ) . '-->' );\r\n \r\n \r\n // Check if a custom template exists in the theme folder, if not, load the plugin template file\r\n if ( $theme_file = locate_template( array( 'plugin_template/' . $template ) ) ) {\r\n $file = $theme_file;\r\n }\r\n else {\r\n $file = RC_TC_BASE_DIR . '/templates/' . $template;\r\n }\r\n echo ('<!-- Use Template ' . __( $file, 'nmmc' ) . '-->' );\r\n return apply_filters( 'rc_repl_template_' . $template, $file );\r\n}", "function get_template($template)\n {\n $login_arr = $this->action_parser($this->action, 'template');\n $pos = array_search($template, $login_arr['template']['name']);\n return $login_arr['template']['path'][$pos];\n }", "function youpztStore_get_template( $template_name, $args = array(), $template_path = '', $default_path = '' ) {\n if ( $args && is_array( $args ) ) {\n extract( $args );\n }\n\n $located = youpztStore_locate_template( $template_name, $template_path, $default_path );\n\n if ( ! file_exists( $located ) ) {\n //_doing_it_wrong( __FUNCTION__, sprintf( '<code>%s</code> does not exist.', $located ), '2.1' );\n return;\n }\n\n // Allow 3rd party plugin filter template file from their plugin.\n $located = apply_filters('youpztStore_get_template', $located, $template_name, $args, $template_path, $default_path );\n\n include( $located );\n\n}", "function services_get_custom_post_type_template($single_template) {\n global $post;\n\n if ($post->post_type == 'gon_services_menu') {\n $single_template = dirname( __FILE__ ) . '/single-gon_services_menu.php';\n }\n return $single_template;\n}", "function baseCss($nameCSS){ \n global $name;\n global $nameCSS;\n \n $cssbase = \".sprite{\\n\n background-image: url(\".'\"'.$name.'\"'.\");\\n\n background-repeat: no-repeat;\\n\n display: block;\\n\n}\\n\";\n $handle = fopen($nameCSS, \"w\");\n $write = fwrite($handle, $cssbase);\n}", "public function locate_template_taxonomy( $template_path ) {\n $term = get_queried_object();\n\n if ( $term ) {\n $taxonomy = $term->taxonomy;\n\n if ( $taxonomy !== 'portfolio' ) return $template_path;\n\n /* Use simple archive template for taxonomies. */\n $found = $this->locate_template( 'taxonomy' );\n\n if ( $found ) return $found;\n }\n\n return $template_path;\n }", "function single_template( $template, $type, $template_names ) {\n\t\t\tglobal $wp_query, $post;\n\n\t\t\t$paths = apply_filters( 'unity3_custom_template_path', array() );\n\t\t\tforeach ( $paths as $path ) {\n foreach ( (array) get_the_category() as $cat ) {\n if ( file_exists( $path . '/single-cat-' . $cat->slug . '.php' ) ) {\n return $path . '/single-cat-' . $cat->slug . '.php';\n } elseif ( file_exists( $path . '/single-cat-' . $cat->term_id . '.php' ) ) {\n return $path . '/single-cat-' . $cat->term_id . '.php';\n }\n }\n //\n //else search for standard templates in the custom directory path\n foreach ( (array) $template_names as $template_name ) {\n if (!$template_name) {\n continue;\n }\n if (file_exists($path . '/' . $template_name)) {\n return $path . '/' . $template_name;\n }\n }\n }\n\n\t\t\treturn $template;\n\t\t}", "public static function templateImagePath($image_path=null)\n\t{\n\t\t$webserver_url = $GLOBALS['egw_info']['server']['webserver_url'];\n\t\tif (empty($image_path))\n\t\t{\n\t\t\t$image_path = $webserver_url.'/phpgwapi/templates/default/images/dhtmlxtree/';\n\t\t}\n\t\t// check if we have template-set specific image path\n\t\tif ($webserver_url && $webserver_url != '/')\n\t\t{\n\t\t\tlist(,$image_path) = explode($webserver_url, $image_path, 2);\n\t\t}\n\t\t$templated_path = strtr($image_path, array(\n\t\t\t'/phpgwapi/templates/default' => $GLOBALS['egw']->framework->template_dir,\n\t\t\t'/default/' => '/'.$GLOBALS['egw']->framework->template.'/',\n\t\t));\n\t\tif (file_exists(EGW_SERVER_ROOT.$templated_path))\n\t\t{\n\t\t\treturn ($webserver_url != '/' ? $webserver_url : '').$templated_path;\n\t\t\t//error_log(__METHOD__.\"() setting templated image-path for $form_name: $templated_path\");\n\t\t}\n\t\treturn ($webserver_url != '/' ? $webserver_url : '').$image_path;\n\t}", "public function getControlTemplate(Lumine_Configuration $cfg, $className);", "function load_newsletter_template($template) {\n global $post;\n\n // Is this a futurninews post?\n if ($post->post_type == \"futurninews\"){\n\n $plugin_path = plugin_dir_path( __FILE__ );\n\n $template_name = 'single-newsletter.php';\n\n // checks if there is a single template in themefolder, or it doesn't exist in the plugin\n if($template === get_stylesheet_directory() . '/' . $template_name\n || !file_exists($plugin_path . $template_name)) {\n\n // returns \"single.php\" or \"single-my-custom-post-type.php\" from theme directory.\n return $template;\n }\n\n // If not, return futurninews custom post type template.\n return $plugin_path . $template_name;\n }\n\n //This is not futurninews, do nothing with $template\n return $template;\n}", "public function findTemplate(){\n if($this->hasErrors()) return false;\n $located = false;\n if(!$this->hasErrors()){\n $module_file = trailingslashit($this->location).$this->type.'.php';\n $file = trailingslashit($this->module).trailingslashit($this->location).$this->type.'.php';\n switch(true){\n //Check Stylesheet directory first (Child Theme)\n case file_exists(trailingslashit(get_stylesheet_directory()).trailingslashit(self::TEMPLATE_DIRECTORY).$file):\n $located = trailingslashit(get_stylesheet_directory()).trailingslashit(self::TEMPLATE_DIRECTORY).$file;\n break;\n //Check Template directory Second (Parent Theme)\n case file_exists(trailingslashit(get_template_directory()).trailingslashit(self::TEMPLATE_DIRECTORY).$file):\n $located = trailingslashit(get_template_directory()).trailingslashit(self::TEMPLATE_DIRECTORY).$file;\n break;\n //Check filtered custom template directory, if it's set.\n case (apply_filters($this->prefix('custom_template_directory_root'), '', $this) !== '' && file_exists(trailingslashit(apply_filters($this->prefix('custom_template_directory_root'), '', $this)).$file)):\n $located = trailingslashit($this->prefix('custom_template_directory_root')).$file;\n break;\n //If nothing else exists, go ahead and get the default\n default:\n $file = trailingslashit(ModuleLoader::getModuleDir($this->module)).$module_file;\n if($this->fileExists($file)) $located = $file;\n break;\n }\n }\n\n return $located;\n }", "public function getTemplate($context = null);", "private function loadSlideTemplate($file, $templateRepository, $entityManager, $dir, $serverAddress, $path) {\n $str = file_get_contents($file);\n $config = json_decode($str);\n\n if ($config->type == 'slide') {\n // Try to load the template.\n $template = $templateRepository->findOneById($config->id);\n\n // Check if the template was loaded, if not create a new template entity.\n if (!$template) {\n $template = new SlideTemplate();\n $template->setId($config->id);\n $template->setEnabled(FALSE);\n }\n $template->setName($config->name);\n\n // Set the template values on the entity. The css, live, edit and preview files need to be prefixed with their last\n // modified timestamp to ensure they are load by the screen clients.\n $template->setPathIcon($this->buildFilePath($serverAddress, $path, $dir, $config->icon));\n $template->setPathLive($this->buildFilePath($serverAddress, $path, $dir, $config->paths->live));\n $template->setPathEdit($this->buildFilePath($serverAddress, $path, $dir, $config->paths->edit));\n $template->setPathCss($this->buildFilePath($serverAddress, $path, $dir, $config->paths->css));\n $template->setPathPreview($this->buildFilePath($serverAddress, $path, $dir, $config->paths->preview));\n $template->setPath($serverAddress . $dir . '/');\n $template->setOrientation($config->orientation);\n $template->setEmptyOptions($config->empty_options);\n $template->setIdealDimensions($config->ideal_dimensions);\n $template->setMediaType($config->media_type);\n if (isset($config->tools)) {\n // Fix paths if defined to be relative.\n foreach ($config->tools as $tool) {\n if (isset($tool->path)) {\n $tool->path = $this->buildFilePath($serverAddress, $path, $dir, $tool->path);\n }\n }\n\n $template->setTools($config->tools);\n }\n if (isset($config->slide_type)) {\n $template->setSlideType($config->slide_type);\n }\n if (isset($config->paths->js)) {\n $template->setPathJs($serverAddress . '/' . $config->paths->js);\n }\n $template->setScriptId($config->script_id);\n\n // Ensure that the entity is managed.\n $entityManager->persist($template);\n }\n\n $entityManager->flush();\n }", "public function image($name) {\n\t\t\t$r=new Resource(Resource::GRAPHICS, $name);\n\t\t\t$this->addResource($r);\n\t\t\treturn $r;\n\t\t}", "static function getArchivoCss($template) {\r\n\r\n $archivoTemplate = str_replace('html', 'css', $template);\r\n\r\n if (!file_exists($_SESSION['theme'] . '/modules/' . $archivoTemplate)) {\r\n $aux = explode(\"/\", $archivoTemplate);\r\n $modulo = $aux[0];\r\n $archivoTemplate = (!file_exists(\"{$_SESSION['theme']}/modules/{$modulo}/index.css.twig\")) ?\r\n \"_global/css.twig\" :\r\n \"{$modulo}/index.css.twig\";\r\n }\r\n\r\n return $archivoTemplate;\r\n }", "function get_stylesheet()\n {\n }", "public static function img($path) {\n return get_template_directory_uri() . '/assets/img/' . $path;\n }", "public function getTemplate(): string;", "public function getTemplate(): string;", "public function getTemplate(): string;", "public function getTemplate(): string;", "public function ajaxGetStyle( $templateId, $inEditor = FALSE )\n\t{\n\t\t$template\t= $this->logic->getTemplate( $templateId );\n\t\theader( 'Content-Type: text/css' );\n\t\tprint $template->style;\n\t\tif( $inEditor ){\n\t\t\t$pathThemeStyle\t= $this->env->getPage()->getThemePath().'css/';\n\t\t\tprint FileReader::load( $pathThemeStyle.'module.work.newsletter.css' );\n\t\t}\n\t\texit;\n\t}", "public function getHTMLNode($xml, &$data) {\n\t\t$node = parent::getHTMLNode($xml, $data);\n\t\t$node->appendChild($xml->createImgElement($this->getImageURL('image'), 'image'));\n\t\treturn $node;\n\t}", "function dynamik_skin_style_info( $skin_name = 'default' )\n{\n\tif( file_exists( dynamik_get_skins_folder_path() . '/' . $skin_name . '/style.css' ) )\n\t{\n\t\t$style_css = dynamik_get_skins_folder_path() . '/' . $skin_name . '/style.css';\n\t\t$style_lines = file( $style_css );\n\t\t$author = substr( $style_lines[3], 9 );\n\t\t$version = substr( $style_lines[5], 10 );\n\t\t$styles_exist = true;\n\t}\n\telse\n\t{\n\t\t$author = 'Unknown Author';\n\t\t$version = '1.0';\n\t\t$styles_exist = false;\n\t}\n\t$style_info = array(\n\t\t'author' => $author,\n\t\t'version' => $version . ' ',\n\t\t'styles_exist' => $styles_exist\n\t);\n\n\treturn $style_info;\n}", "function getTemplate($fileName) {\n\n $file = file_get_contents($fileName);\n\n if ($file) {\n\n return $file;\n }\n else {\n echo (\"File not found: \" . $fileName);\n }\n}", "protected function getTemplateInfo($template_name)\n {\n /** @var $db JDatabase */\n $db = JFactory::getDbo();\n /** @var $query JDatabaseQuery */\n $query = $db->getQuery(true);\n $query->select('template, s.params, e.extension_id as id, s.id as style_id');\n $query->from('#__template_styles as s');\n $query->leftJoin('#__extensions as e ON e.type=' . $db->quote('template') . ' AND e.element=s.template AND e.client_id=s.client_id');\n $query->where('s.template =' . $db->quote($template_name), 'AND');\n $query->where('s.client_id = 1', 'AND');\n $db->setQuery($query);\n // Check for a database error.\n if ($db->getErrorNum()) {\n JError::raiseWarning(500, $db->getErrorMsg());\n return false;\n }\n $objects = $db->loadObjectList();\n if ($objects == null) {\n return false;\n }\n $template = new stdClass();\n $template->styles = array();\n foreach ($objects as $template_style)\n {\n $template->name = $template_style->template;\n $template->id = $template_style->id;\n $template->styles[$template_style->style_id] = new JRegistry($template_style->params);\n }\n return $template;\n }", "public function getTemplateResourceRecurseUp($extension = 'php', $url_path = null)\n\t{\n\t\t\n\t\t$url_path = explode('/', $url_path);\n\t\t$resource = array_pop($url_path);\n\t\twhile(true)\n\t\t{\n\t\t\t$path = $this->getTemplateDir().implode('/', $url_path).'/'.$resource;\n\t\t\tif(is_dir($path))\n\t\t\t\treturn $path .'/__index.'.$extension;\n\t\t\telse if(is_file($path.'.'.$extension))\n\t\t\t\treturn $path.'.'.$extension;\n\t\t\telse if(count($url_path) == 0)\n\t\t\t\treturn false;\n\t\t\tarray_pop($url_path);\n\t\t} \n\t}", "private function generateSpritemap ()\n {\n $sprites = $this->sprites;\n $len = count($sprites);\n $node;\n\n usort($sprites, function ( $a, $b ) {\n $asa = $a->height;\n $bsa = $b->height;\n return ($asa > $bsa) ? -1 : 1;\n });\n\n $packer = new SpritePacker;\n $packer->fit($sprites);\n\n $this->width = $packer->pack->w;\n $this->height = $packer->pack->h;\n\n $spritemap = imagecreatetruecolor($this->width, $this->height);\n $color = imagecolorallocatealpha($spritemap, 255, 255, 255, 127);\n imagefill($spritemap, 0, 0, $color);\n imagecolortransparent($spritemap, imagecolorallocatealpha($spritemap, 0, 0, 0, 127));\n imagealphablending($spritemap, false);\n imagesavealpha($spritemap, true);\n\n foreach ($sprites as $sprite) {\n if ($sprite->fit) {\n $fit = $sprite->fit;\n imagecopyresampled($spritemap, $sprite->getResource(), $fit->x, $fit->y, 0, 0, $sprite->width, $sprite->height, $sprite->original_width, $sprite->original_height);\n }\n }\n imagepng($spritemap, __DIR__.'/test.png');\n }", "function f_get_template(){\n /// you need get info config in setting then insert here. the present it default\n $host = $this->host;\n $slugs = $this->slugs;\n $key = $this->key;\n $ajax_url = $this->ajax_url;\n $elementor = $this->elementor;\n/// get slug from url and remove element empty\n $slug = array_filter( explode('/', $_SERVER['REQUEST_URI']) );\n // check exist in slugs config\n if( isset( $slugs[$slug[1]] )){\n $template_api = $slugs[$slug[1]];\n $template_api['action'] = 'action_slug_api';\n $template_api['key'] = $key;\n $template_api['ajax_url'] = $ajax_url;\n $template_api['elementor'] = $elementor;\n $template_api['name'] = $slug[1];\n // check type template list or template single\n if($template_api['slug']){\n $template_api['url'] = $host.$template_api['url'].$slug[2];\n }else{\n $template_api['url'] = $host.$template_api['url'];\n }\n $this->do_template($template_api);\n\n }\n }", "public static function templatePath($type= 'front'){\n $ci =& get_instance();\n return 'themes/'.$type;\n }", "public static function getSpriteFile($mode) {\n\t\t$cacheDir = PATH_site.'typo3temp/jst_assets/';\n\t\tif(!file_exists($cacheDir))\n\t\t\tGeneralUtility::mkdir($cacheDir);\n\t\t$filename = ($mode == 'svg_symbols') ? 'jst_assets_icons.svg' : 'jst_assets_icons.css';\n\t\t$cacheFile = GeneralUtility::getFileAbsFileName($cacheDir . $filename);\n\n\t\tif(!file_exists($cacheFile)) {\n\t\t\tfile_put_contents($cacheFile, static::getInlineSprite($mode, false));\n\t\t}\n\t\treturn substr($cacheFile, strlen(PATH_site));\n\t}", "public function getSpriteImageRegistry()\n {\n return $this->spriteImageRegistry;\n }", "protected function loadRegisteredSprites() {}", "protected function getTemplatePathAndFilename() {}" ]
[ "0.6140705", "0.5202701", "0.50394803", "0.49838272", "0.49628812", "0.4951277", "0.48921677", "0.48664862", "0.48664862", "0.48664862", "0.48664862", "0.48664862", "0.48664862", "0.48507774", "0.4779319", "0.47376958", "0.47047833", "0.46994162", "0.4658522", "0.4648182", "0.4627001", "0.46258426", "0.46130145", "0.45893902", "0.45685583", "0.45607176", "0.4554145", "0.45442253", "0.45319843", "0.45201784", "0.4518223", "0.4497722", "0.4497641", "0.44924662", "0.44785023", "0.4474675", "0.44700804", "0.44667158", "0.4454918", "0.44507763", "0.44436607", "0.4431113", "0.44175926", "0.44155866", "0.4415512", "0.4410004", "0.43923408", "0.43918043", "0.43789583", "0.43762806", "0.43559223", "0.4355017", "0.43539", "0.43415517", "0.43380162", "0.43342203", "0.43329352", "0.43304846", "0.4327368", "0.43178758", "0.43171895", "0.43142328", "0.4312413", "0.43123862", "0.43116763", "0.43067852", "0.4306121", "0.4299182", "0.42961836", "0.42890775", "0.4286243", "0.42857167", "0.42841053", "0.42791766", "0.42758048", "0.4272384", "0.42722505", "0.42628568", "0.4252491", "0.42473152", "0.4244332", "0.42338714", "0.42292914", "0.42289466", "0.42289466", "0.42289466", "0.42289466", "0.422723", "0.4220556", "0.42166156", "0.42163047", "0.42094862", "0.42091727", "0.4208685", "0.42015377", "0.419507", "0.41930166", "0.41920182", "0.41913334", "0.41771758" ]
0.56901944
1
style() Add a several images from a directory to the sprite. Accepted params are: name : the sprite name. imageType : the image type. spritemargin : margins of the image in the sprite. hoverXOffset : Offset to the background X position on hover hoverYOffset : Offset to the background Y position on hover
public function ppRegister($path, array $params = array()) { $this->spriteImageRegistry->register($path, $params); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function my_generate_css($info, $scandir, $pos, $i){\n ($pos == 0) ? $neg = \"\" : $neg = \"-\";\n global $nameCSS;\n $chaine = '|.(.*?)/|iU';\n $scandir = preg_replace($chaine,'',$scandir);\n$css = \".sprite-\".substr($scandir[$i], 0,-4).\"{ \\n\n width: \".$info[0].\"px;\\n\n height: \".$info[1].\"px;\\n\n background-position: \".$neg.$pos .\"px 0px;\\n\n}\\n\";\n $handle = fopen($nameCSS, \"a\");\n $write = fwrite($handle, $css);\n fclose($handle);\n}", "function image_sprite($sprite_abspath, $icons_abspaths, $orientation = 'portrait', $padding = 5)\n{\n\n // open all the images, create teardown function\n $sprite = new \\Imagick();\n $icons = array();\n\n foreach($icons_abspaths as $icon_abspath) {\n $icons[] = new \\Imagick($icon_abspath);\n }\n\n $tear_down = function ($return) use (&$sprite, $icons) {\n foreach($icons as $icon) {\n $icon->clear();\n $icon->destroy();\n }\n $sprite->clear();\n $sprite->destroy();\n return $return;\n };\n\n // calculate dimensions\n $max_width = $max_height = 0;\n foreach($icons as $icon) {\n $max_height = max($max_height, $icon->getImageHeight());\n $max_width = max($max_width, $icon->getImageWidth());\n }\n $sprite_width = $max_width + ($padding * 2);\n $sprite_height = $max_height + ($padding * 2);\n if ($orientation == 'landscape') {\n $sprite_width *= count($icons);\n } else {\n $sprite_height *= count($icons);\n }\n\n // check if we really need to do this\n $sprite_mtime = file_exists($sprite_abspath) ? filemtime($sprite_abspath):0;\n $icons_mtime = 0;\n\n foreach($icons_abspaths as $icon_abspath) {\n $icons_mtime = max($icons_mtime, filemtime($icon_abspath));\n }\n\n if ($sprite_mtime >= $icons_mtime) {\n $sprite_size = getimagesize($sprite_abspath);\n if ($sprite_size[0] == $sprite_width && $sprite_size[1] == $sprite_height) {\n return $tear_down(array(\n 'box_height' => $max_height,\n 'box_width' => $max_width,\n 'sprite_height' => $sprite_height,\n 'sprite_width' => $sprite_width,\n ));\n }\n }\n\n // compose the sprite\n $sprite->newImage($sprite_width, $sprite_height, new \\ImagickPixel('transparent'));\n\n foreach($icons as $n => $icon) {\n $x = $y = $padding;\n $x += round(($max_height - $icon->getImageHeight())/2);\n $y += round(($max_width - $icon->getImageWidth())/2);\n $cumulative_padding = $n * $padding * 2;\n if ($orientation == 'landscape') {\n $x += ($n * $max_width) + $cumulative_padding;\n } else {\n $y += ($n * $max_height) + $cumulative_padding;\n }\n $sprite->compositeImage($icon, \\Imagick::COMPOSITE_COPY, $x, $y);\n }\n $sprite->setImageCompressionQuality(100);\n $sprite->writeImage($sprite_abspath);\n\n return $tear_down(array(\n 'box_height' => $max_height + ($padding * 2),\n 'box_width' => $max_width + ($padding * 2),\n 'icon_height' => $max_height,\n 'icon_width' => $max_width,\n 'sprite_height' => $sprite_height,\n 'sprite_width' => $sprite_width,\n ));\n\n}", "public function generate()\n {\n $self = $this;\n\n // Clear errors\n $this->_errors = array();\n\n // Normalize destination image path\n $this->imgDestPath = str_replace(array('\\\\', '/'), DIRECTORY_SEPARATOR, $this->imgDestPath);\n\n // Check modification time\n if ((is_dir($this->imgSourcePath)) && (is_file($this->imgDestPath))) {\n $imgSourceStat = stat($this->imgSourcePath);\n $imgDestStat = stat($this->imgDestPath);\n if ($imgSourceStat['mtime'] <= $imgDestStat['mtime']) {\n $this->addError(static::ERROR_SPRITE_EQUALS_TO_SOURCE);\n return;\n }\n }\n\n // Get list of images\n $fillImgList = function($dir) use(&$self, &$xOffset, &$imgList, &$imgWidth, &$imgHeight, &$fillImgList) {\n $imageList = glob($dir . DIRECTORY_SEPARATOR . '*.{' . $self->imgSourceExt . '}', GLOB_BRACE);\n foreach ($imageList as $imagePath) {\n\n // Skip previously generated sprite\n if ($imagePath === $self->imgDestPath) {\n continue;\n }\n\n // Get image sizes\n $imageSize = @getimagesize($imagePath);\n if ($imageSize === false) {\n $self->addError($self::ERROR_WRONG_IMAGE_FORMAT, $imagePath);\n continue;\n } else {\n list($itemWidth, $itemHeight, $itemType) = $imageSize;\n }\n\n // Check size\n if ($self->imgSourceSkipSize) {\n if (($itemWidth > $self->imgSourceSkipSize) || ($itemHeight > $self->imgSourceSkipSize)) {\n continue;\n }\n }\n\n // Inc sprite size\n $imgWidth += $itemWidth;\n if ($itemHeight > $imgHeight) {\n $imgHeight = $itemHeight;\n }\n\n // Push image to the list\n $imgList[$imagePath] = array(\n 'width' => $itemWidth,\n 'height' => $itemHeight,\n 'x' => $xOffset,\n 'ext' => image_type_to_extension($itemType, false),\n );\n\n $xOffset += $itemWidth;\n }\n $subdirList = glob($dir . DIRECTORY_SEPARATOR . '*', GLOB_ONLYDIR);\n foreach ($subdirList as $subdir) {\n $fillImgList($subdir);\n }\n };\n $xOffset = 0;\n $imgList = array();\n $imgWidth = $imgHeight = 0;\n $fillImgList($this->imgSourcePath);\n if (count($imgList) === 0) {\n $this->addError(static::ERROR_NO_SOURCE_IMAGES);\n return;\n }\n\n // Create transparent image\n $dest = imagecreatetruecolor($imgWidth, $imgHeight);\n imagesavealpha($dest, true);\n $trans_colour = imagecolorallocatealpha($dest, 0, 0, 0, 127);\n imagefill($dest, 0, 0, $trans_colour);\n\n // Init CSS\n $cssList = array();\n $cssList[] = array(\n 'selectors' => array(\n '[class^=\"' . $this->cssNamespace . '-\"]',\n '[class*=\" ' . $this->cssNamespace . '-\"]',\n ),\n 'styles' => array(\n 'background-image' => 'url(\"' . $this->cssImgUrl . '\")',\n 'background-position' => '0 0',\n 'background-repeat' => 'no-repeat',\n 'display' => 'inline-block',\n 'height' => '64px',\n 'vertical-align' => 'middle',\n 'width' => '64px',\n ),\n );\n\n // Copy all images, create CSS file and list of tags\n $this->_tagList = array();\n foreach ($imgList as $imgPath => $imgData) {\n\n // Copy image\n $imgCreateFunc = 'imagecreatefrom' . $imgData['ext'];\n if (!function_exists($imgCreateFunc)) {\n continue;\n }\n $src = $imgCreateFunc($imgPath);\n imagealphablending($src, true);\n imagesavealpha($src, true);\n imagecopy($dest, $src, $imgData['x'], 0, 0, 0, $imgData['width'], $imgData['height']);\n imagedestroy($src);\n\n // Append CSS (if not a magic action)\n $sourcePathLeng = mb_strlen($this->imgSourcePath);\n $class = '.' . $this->cssNamespace . '-' . mb_substr($imgPath, $sourcePathLeng + 1);\n $class = mb_substr($class, 0, mb_strlen($class) - mb_strlen($imgData['ext']) - 1);\n $class = str_replace(DIRECTORY_SEPARATOR, '-', $class);\n $isMagicAction = false;\n foreach (static::$magicActions as $magicAction) {\n $isMagicAction = (mb_substr($class, -mb_strlen('.' . $magicAction)) === '.' . $magicAction);\n if ($isMagicAction) {\n break;\n }\n }\n if (!$isMagicAction) {\n $cssList[] = array(\n 'selectors' => array($class),\n 'styles' => array(\n 'background-position' => '-' . $imgData['x'] . 'px 0',\n 'height' => $imgData['height'] . 'px',\n 'width' => $imgData['width'] . 'px',\n ),\n );\n }\n\n // Check if image has magic action (active, hover, target)\n if (!$isMagicAction) {\n $extPos = mb_strrpos($imgPath, $imgData['ext']);\n foreach (static::$magicActions as $magicAction) {\n if ($extPos !== false) {\n $magicActionPath = substr_replace($imgPath, $magicAction . '.' . $imgData['ext'], $extPos, strlen($imgData['ext']));\n $hasMagicAction = isset($imgList[$magicActionPath]);\n } else {\n $hasMagicAction = false;\n }\n if ($hasMagicAction) {\n $magicActionData = $imgList[$magicActionPath];\n $css = array();\n if (in_array($magicAction, array('checked', 'disabled'))) {\n $css['selectors'] = array(\n \"input:{$magicAction} + {$class}\",\n \"{$class}.{$magicAction}\",\n );\n } else {\n $css['selectors'] = array(\n \"{$class}:{$magicAction}\",\n \"{$class}.{$magicAction}\",\n \".wrap-{$this->cssNamespace}:{$magicAction} {$class}\",\n \".wrap-{$this->cssNamespace}.{$magicAction} {$class}\",\n );\n }\n $css['styles'] = array(\n 'background-position' => '-' . $magicActionData['x'] . 'px 0',\n 'background-position-x' => '-' . $magicActionData['x'] . 'px',\n 'height' => $magicActionData['height'] . 'px',\n 'width' => $magicActionData['width'] . 'px',\n );\n $cssList[] = $css;\n }\n }\n }\n\n // Append tag\n if (!$isMagicAction) {\n $this->_tagList[] = '<span class=\"' . mb_substr($class, 1) . '\"></span>';\n }\n }\n\n // Save image to file\n $imgDestExt = mb_strtolower(mb_substr($this->imgDestPath, mb_strrpos($this->imgDestPath, '.') + 1));\n switch ($imgDestExt) {\n case 'jpg':\n case 'jpeg':\n imagejpeg($dest, $this->imgDestPath);\n break;\n case 'gif':\n imagegif($dest, $this->imgDestPath);\n break;\n case 'png':\n imagepng($dest, $this->imgDestPath);\n break;\n default:\n $this->addError(static::ERROR_UNKNOWN_IMAGE_EXT, $this->imgDestPath);\n return;\n break;\n }\n imagedestroy($dest);\n\n // Save CSS file\n $cssString = '';\n foreach ($cssList as $css) {\n $cssString .= implode(',', $css['selectors']) . '{';\n foreach ($css['styles'] as $key => $value) {\n $cssString .= $key . ':' .$value . ';';\n }\n $cssString .= '}';\n }\n file_put_contents($this->cssPath, $cssString);\n }", "function training_image_callback() {\n $output = array();\n $file_path = drupal_realpath('modules/image/sample.png');\n $source = (object) array(\n 'uid' => 1,\n 'uri' => $file_path,\n 'filename' => basename($file_path),\n 'filemime' => file_get_mimetype($file_path),\n );\n $directory = 'public://';\n file_copy($source, $directory, $replace = FILE_EXISTS_REPLACE);\n $array_style = image_styles();\n foreach ($array_style as $val) {\n $style_name = $val['name'];\n $path = 'public://sample.png';\n $attributes = array(\n 'class' => 'simple-image',\n );\n $output[] = theme('image_style', array(\n 'style_name' => $style_name,\n 'path' => $path,\n 'attributes' => $attributes,\n ));\n }\n\n return theme('item_list', array(\n 'items' => $output,\n 'type' => 'ol',\n 'title' => t('Default image styles'),\n ));\n}", "function baseCss($nameCSS){ \n global $name;\n global $nameCSS;\n \n $cssbase = \".sprite{\\n\n background-image: url(\".'\"'.$name.'\"'.\");\\n\n background-repeat: no-repeat;\\n\n display: block;\\n\n}\\n\";\n $handle = fopen($nameCSS, \"w\");\n $write = fwrite($handle, $cssbase);\n}", "function imagesetstyle($image, $style)\n{\n}", "protected function image_style() {\n\t\t$this->start_controls_section(\n\t\t\t'section_style_retina_image',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Retina Image', 'boostify' ),\n\t\t\t\t'tab' => Controls_Manager::TAB_STYLE,\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'width',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Width', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'default' => array(\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'tablet_default' => array(\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'mobile_default' => array(\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'size_units' => array( '%', 'px', 'vw' ),\n\t\t\t\t'range' => array(\n\t\t\t\t\t'%' => array(\n\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t),\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t'max' => 1000,\n\t\t\t\t\t),\n\t\t\t\t\t'vw' => array(\n\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image img' => 'width: {{SIZE}}{{UNIT}};',\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image .wp-caption .widget-image-caption' => 'width: {{SIZE}}{{UNIT}}; display: inline-block;',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'space',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Max Width', 'boostify' ) . ' (%)',\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'default' => array(\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'tablet_default' => array(\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'mobile_default' => array(\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'size_units' => array( '%' ),\n\t\t\t\t'range' => array(\n\t\t\t\t\t'%' => array(\n\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image img' => 'max-width: {{SIZE}}{{UNIT}};',\n\t\t\t\t\t'{{WRAPPER}} .wp-caption-text' => 'max-width: {{SIZE}}{{UNIT}}; display: inline-block; width: 100%;',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'separator_panel_style',\n\t\t\tarray(\n\t\t\t\t'type' => Controls_Manager::DIVIDER,\n\t\t\t\t'style' => 'thick',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'retina_image_border',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Border Style', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'default' => 'none',\n\t\t\t\t'label_block' => false,\n\t\t\t\t'options' => array(\n\t\t\t\t\t'none' => __( 'None', 'boostify' ),\n\t\t\t\t\t'solid' => __( 'Solid', 'boostify' ),\n\t\t\t\t\t'double' => __( 'Double', 'boostify' ),\n\t\t\t\t\t'dotted' => __( 'Dotted', 'boostify' ),\n\t\t\t\t\t'dashed' => __( 'Dashed', 'boostify' ),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image-container .boostify-retina-img' => 'border-style: {{VALUE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t\t$this->add_control(\n\t\t\t'retina_image_border_size',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Border Width', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::DIMENSIONS,\n\t\t\t\t'size_units' => array( 'px' ),\n\t\t\t\t'default' => array(\n\t\t\t\t\t'top' => '1',\n\t\t\t\t\t'bottom' => '1',\n\t\t\t\t\t'left' => '1',\n\t\t\t\t\t'right' => '1',\n\t\t\t\t\t'unit' => 'px',\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'retina_image_border!' => 'none',\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image-container .boostify-retina-img' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'retina_image_border_color',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Border Color', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'retina_image_border!' => 'none',\n\t\t\t\t),\n\t\t\t\t'default' => '',\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image-container .boostify-retina-img' => 'border-color: {{VALUE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'image_border_radius',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Border Radius', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::DIMENSIONS,\n\t\t\t\t'size_units' => array( 'px', '%' ),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->start_controls_tabs( 'image_effects' );\n\n\t\t$this->start_controls_tab(\n\t\t\t'normal',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Normal', 'boostify' ),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'opacity',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Opacity', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'max' => 1,\n\t\t\t\t\t\t'min' => 0.10,\n\t\t\t\t\t\t'step' => 0.01,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image img' => 'opacity: {{SIZE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Css_Filter::get_type(),\n\t\t\tarray(\n\t\t\t\t'name' => 'css_filters',\n\t\t\t\t'selector' => '{{WRAPPER}} .boostify-retina-image img',\n\t\t\t)\n\t\t);\n\n\t\t$this->end_controls_tab();\n\n\t\t$this->start_controls_tab(\n\t\t\t'hover',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Hover', 'boostify' ),\n\t\t\t)\n\t\t);\n\t\t$this->add_control(\n\t\t\t'opacity_hover',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Opacity', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'max' => 1,\n\t\t\t\t\t\t'min' => 0.10,\n\t\t\t\t\t\t'step' => 0.01,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image:hover img' => 'opacity: {{SIZE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Css_Filter::get_type(),\n\t\t\tarray(\n\t\t\t\t'name' => 'css_filters_hover',\n\t\t\t\t'selector' => '{{WRAPPER}} .boostify-retina-image:hover img',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'hover_animation',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Hover Animation', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::HOVER_ANIMATION,\n\t\t\t)\n\t\t);\n\t\t$this->add_control(\n\t\t\t'background_hover_transition',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Transition Duration', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'max' => 3,\n\t\t\t\t\t\t'step' => 0.1,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image img' => 'transition-duration: {{SIZE}}s',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->end_controls_tab();\n\n\t\t$this->end_controls_tabs();\n\n\t\t$this->end_controls_section();\n\t}", "public function setImage($image, $type = 'image', $size = array(800, 600)) \n { \n if (file_exists($image) && is_readable($image)) {\n $info = $this->_getImageInfo($image);\n \n switch ($info['mime']) {\n case 'image/png':\n $img = imagecreatefrompng($image);\n break;\n case 'image/jpeg':\n $img = imagecreatefromjpeg($image);\n break;\n case 'image/gif':\n $old = imagecreatefromgif($image);\n $img = imagecreatetruecolor($info[0], $info[1]);\n imagecopy($image, $old, 0, 0, 0, 0, $info[0], $info[1]);\n break;\n default:\n break;\n }\n }\n\n switch ($type) {\n case 'image':\n if ($img) $this->images[] = $img;\n break;\n case 'layout':\n if ($img) {\n $this->layout = $img;\n $this->layoutInfo = $info;\n } else {\n $this->layout = imagecreatetruecolor($size[0], $size[1]);\n $gray = imagecolorallocate($this->layout, 128, 128, 128);\n imagefilledrectangle($this->layout, 0, 0, $size[0], $size[1], $gray);\n $this->layoutInfo = $this->_getImageInfo($this->layout);\n }\n break;\n default:\n break;\n }\n }", "protected function register_style_team_member_image() {\n\t\t$this->start_controls_section(\n\t\t\t'section_team_member_image_style',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Image', 'uael' ),\n\t\t\t\t'tab' => Controls_Manager::TAB_STYLE,\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'image_position',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Image Position', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'default' => 'above',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'above' => __( 'Top', 'uael' ),\n\t\t\t\t\t'left' => __( 'Left', 'uael' ),\n\t\t\t\t\t'right' => __( 'Right', 'uael' ),\n\t\t\t\t),\n\t\t\t\t'prefix_class' => 'uael-member-image-pos-',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'member_mob_view',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Responsive Support', 'uael' ),\n\t\t\t\t'description' => __( 'Choose the breakpoint you want the layout will stack.', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'default' => 'none',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'none' => __( 'No', 'uael' ),\n\t\t\t\t\t'tablet' => __( 'For Tablet & Mobile ', 'uael' ),\n\t\t\t\t\t'mobile' => __( 'For Mobile Only', 'uael' ),\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'image_position' => array( 'left', 'right' ),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'member_image_valign',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Vertical Alignment', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::CHOOSE,\n\t\t\t\t'label_block' => false,\n\t\t\t\t'options' => array(\n\t\t\t\t\t'top' => array(\n\t\t\t\t\t\t'title' => __( 'Top', 'uael' ),\n\t\t\t\t\t\t'icon' => 'eicon-v-align-top',\n\t\t\t\t\t),\n\t\t\t\t\t'middle' => array(\n\t\t\t\t\t\t'title' => __( 'Middle', 'uael' ),\n\t\t\t\t\t\t'icon' => 'eicon-v-align-middle',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'default' => 'top',\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'image_position' => array( 'left', 'right' ),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'align_team_member',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Overall Alignment', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::CHOOSE,\n\t\t\t\t'options' => array(\n\t\t\t\t\t'left' => array(\n\t\t\t\t\t\t'title' => __( 'Left', 'uael' ),\n\t\t\t\t\t\t'icon' => 'fa fa-align-left',\n\t\t\t\t\t),\n\t\t\t\t\t'center' => array(\n\t\t\t\t\t\t'title' => __( 'Center', 'uael' ),\n\t\t\t\t\t\t'icon' => 'fa fa-align-center',\n\t\t\t\t\t),\n\t\t\t\t\t'right' => array(\n\t\t\t\t\t\t'title' => __( 'Right', 'uael' ),\n\t\t\t\t\t\t'icon' => 'fa fa-align-right',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'image_position' => 'above',\n\t\t\t\t),\n\t\t\t\t'default' => 'center',\n\t\t\t\t'prefix_class' => 'uael%s-team-member-align-',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'image_shape',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Shape', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'default' => 'square',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'square' => __( 'Square', 'uael' ),\n\t\t\t\t\t'rounded' => __( 'Rounded', 'uael' ),\n\t\t\t\t\t'circle' => __( 'Circle', 'uael' ),\n\t\t\t\t),\n\t\t\t\t'prefix_class' => 'uael-shape-',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'team_member_image_border_radius',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Border Radius', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::DIMENSIONS,\n\t\t\t\t'size_units' => array( 'px', '%' ),\n\t\t\t\t'default' => array(\n\t\t\t\t\t'top' => '10',\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t\t'right' => '10',\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t\t'bottom' => '10',\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t\t'left' => '10',\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .uael-team-member-image img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'image_shape' => array( 'rounded' ),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'image_border',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Border Style', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'default' => 'none',\n\t\t\t\t'label_block' => false,\n\t\t\t\t'options' => array(\n\t\t\t\t\t'none' => __( 'None', 'uael' ),\n\t\t\t\t\t'solid' => __( 'Solid', 'uael' ),\n\t\t\t\t\t'double' => __( 'Double', 'uael' ),\n\t\t\t\t\t'dotted' => __( 'Dotted', 'uael' ),\n\t\t\t\t\t'dashed' => __( 'Dashed', 'uael' ),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .uael-team-member-image img' => 'border-style: {{VALUE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t\t$this->add_control(\n\t\t\t\t'image_border_size',\n\t\t\t\tarray(\n\t\t\t\t\t'label' => __( 'Border Width', 'uael' ),\n\t\t\t\t\t'type' => Controls_Manager::DIMENSIONS,\n\t\t\t\t\t'size_units' => array( 'px' ),\n\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t'top' => '1',\n\t\t\t\t\t\t'bottom' => '1',\n\t\t\t\t\t\t'left' => '1',\n\t\t\t\t\t\t'right' => '1',\n\t\t\t\t\t\t'unit' => 'px',\n\t\t\t\t\t),\n\t\t\t\t\t'condition' => array(\n\t\t\t\t\t\t'image_border!' => 'none',\n\t\t\t\t\t),\n\t\t\t\t\t'selectors' => array(\n\t\t\t\t\t\t'{{WRAPPER}} .uael-team-member-image img' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}; box-sizing:border-box;',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->add_control(\n\t\t\t\t'image_border_color',\n\t\t\t\tarray(\n\t\t\t\t\t'label' => __( 'Border Color', 'uael' ),\n\t\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t\t'scheme' => array(\n\t\t\t\t\t\t'type' => Scheme_Color::get_type(),\n\t\t\t\t\t\t'value' => Scheme_Color::COLOR_1,\n\t\t\t\t\t),\n\t\t\t\t\t'condition' => array(\n\t\t\t\t\t\t'image_border!' => 'none',\n\t\t\t\t\t),\n\t\t\t\t\t'default' => '',\n\t\t\t\t\t'selectors' => array(\n\t\t\t\t\t\t'{{WRAPPER}} .uael-team-member-image img' => 'border-color: {{VALUE}};',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->add_control(\n\t\t\t\t'image_border_hover_color',\n\t\t\t\tarray(\n\t\t\t\t\t'label' => __( 'Border Hover Color', 'uael' ),\n\t\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t\t'scheme' => array(\n\t\t\t\t\t\t'type' => Scheme_Color::get_type(),\n\t\t\t\t\t\t'value' => Scheme_Color::COLOR_2,\n\t\t\t\t\t),\n\t\t\t\t\t'default' => '',\n\t\t\t\t\t'selectors' => array(\n\t\t\t\t\t\t'{{WRAPPER}} .uael-team-member-image img:hover' => 'border-color: {{VALUE}};',\n\t\t\t\t\t),\n\t\t\t\t\t'condition' => array(\n\t\t\t\t\t\t'image_border!' => 'none',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t$this->add_control(\n\t\t\t'hover_animation',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Hover Animation', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::HOVER_ANIMATION,\n\t\t\t)\n\t\t);\n\n\t\t$this->end_controls_section();\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}", "public function generate()\r\n {\r\n if(!extension_loaded('gd'))\r\n {\r\n return Console::error(\"GD library is currently not supported in your machine.\");\r\n }\r\n\r\n if(!file_exists($this->image_path))\r\n {\r\n return Console::error(\"Location is missing or invalid.\");\r\n }\r\n\r\n if(!empty($this->images))\r\n {\r\n Console::log(\"Sprite \" . static::$version);\r\n Console::success(\"Sprite generation has started...\");\r\n Console::lineBreak();\r\n\r\n Console::warn(\"Sprite Name :\\e[39m \" . $this->name);\r\n Console::warn(\"Location :\\e[39m \" . $this->location);\r\n Console::warn(\"Icons Found :\\e[39m \" . sizeof($this->images));\r\n Console::warn(\"Image Type :\\e[39m \" . implode(\", \", $this->extensions));\r\n Console::warn(\"Image Path :\\e[39m \" . $this->image_path . \"\\sprite-\" . $this->name . \".png\");\r\n Console::warn(\"CSS Path :\\e[39m \" . $this->css_path . \"\\sprite-\" . $this->name . \".css\");\r\n\r\n $tiles = array();\r\n $width = 0;\r\n $height = 0;\r\n $largest_height = 0;\r\n $largest_heights = array();\r\n $canvas_width = 0;\r\n $canvas_height = 0;\r\n $n = 0;\r\n\r\n foreach($this->images as $image)\r\n {\r\n $n++;\r\n\r\n if($image->exists() && \r\n $image->getWidth() >= $this->getMinSize() && \r\n $image->getHeight() >= $this->getMinSize() &&\r\n $image->getWidth() <= $this->getMaxSize() &&\r\n $image->getHeight() <= $this->getMaxSize()\r\n )\r\n {\r\n $x = $width;\r\n $y = $height;\r\n $z = false;\r\n\r\n if($image->getHeight() > $largest_height)\r\n {\r\n $largest_height = $image->getHeight();\r\n }\r\n\r\n $tiles[] = new Tile($image, $x, $y);\r\n\r\n if(($width + $image->getWidth()) > $width && ($width + $image->getWidth()) <= $this->max_width)\r\n {\r\n $width += $image->getWidth();\r\n }\r\n\r\n if($width > $canvas_width)\r\n {\r\n $canvas_width = $width;\r\n }\r\n\r\n if($n == sizeof($this->images) && !$z)\r\n {\r\n $z = true;\r\n $largest_heights[] = $largest_height;\r\n }\r\n\r\n if(($width + $image->getWidth()) > $this->max_width)\r\n {\r\n $width = 0;\r\n $height += $largest_height;\r\n\r\n if(!$z)\r\n {\r\n $largest_heights[] = $largest_height;\r\n }\r\n\r\n $largest_height = 0;\r\n }\r\n }\r\n }\r\n \r\n if(empty($tiles))\r\n {\r\n return Console::error(\"No image assets to compile.\");\r\n }\r\n\r\n $canvas_height = array_sum($largest_heights);\r\n $canvas = imagecreatetruecolor($canvas_width, $canvas_height);\r\n $file_img = $this->image_path . '\\sprite-' . $this->name . '.png';\r\n $file_css = $this->css_path . '\\sprite-' . $this->name . '.css';\r\n $copies = array();\r\n $css = array();\r\n\r\n Console::warn(\"Canvas Width :\\e[39m \" . $canvas_width . 'px');\r\n Console::warn(\"Canvas Height :\\e[39m \" . $canvas_height . 'px');\r\n Console::lineBreak();\r\n\r\n if(file_exists($file_img))\r\n {\r\n Console::success(\"Existing sprite image has been deleted.\");\r\n unlink($file_img);\r\n }\r\n\r\n if(file_exists($file_css))\r\n {\r\n Console::success(\"Existing sprite stylesheet has been deleted.\");\r\n unlink($file_css);\r\n }\r\n\r\n imagefill($canvas, 0, 0, IMG_COLOR_TRANSPARENT);\r\n imagesavealpha($canvas, true);\r\n imagealphablending($canvas, true);\r\n\r\n if(!is_null($this->base_url))\r\n {\r\n $background = $this->base_url . \"/sprite-\" . $this->name . '.png';\r\n }\r\n else\r\n {\r\n $background = \"sprite-\" . $this->name . '.png';\r\n }\r\n\r\n $css[] = \".sprite-\" . $this->name . \"{background-image:url('$background') !important;background-color:transparent;background-repeat:no-repeat}\";\r\n\r\n foreach($tiles as $tile)\r\n {\r\n $image = $tile->getImage();\r\n $resource = $tile->getResource();\r\n\r\n imagecopy($canvas, $resource, $tile->getX(), $tile->getY(), 0, 0, $tile->getWidth(), $tile->getHeight());\r\n\r\n $copies[] = $resource;\r\n $styles = \".sprite-\" . $this->name . \"-\" . $image->getName() . \"{\";\r\n $styles .= \"background-position:\" . ($tile->getX() * -1) . \"px \" . ($tile->getY() * -1) . \"px !important;\";\r\n $styles .= \"width:\" . $tile->getWidth() . \"px;\";\r\n $styles .= \"height:\" . $tile->getHeight() . \"px\";\r\n\r\n $css[] = $styles . \"}\";\r\n }\r\n\r\n Console::success(\"Sprite image has been generated.\");\r\n imagepng($canvas, $file_img, $this->quality);\r\n imagedestroy($canvas);\r\n\r\n foreach($copies as $copy)\r\n {\r\n imagedestroy($copy);\r\n }\r\n\r\n $file = fopen($file_css, 'w');\r\n fwrite($file, implode(PHP_EOL, $css));\r\n fclose($file);\r\n\r\n Console::success(\"Sprite stylesheet has been generated.\");\r\n Console::success(\"Sprite has been successfully generated.\");\r\n }\r\n else\r\n {\r\n Console::error(\"No image assets to compile.\");\r\n }\r\n }", "private function generateSpritemap ()\n {\n $sprites = $this->sprites;\n $len = count($sprites);\n $node;\n\n usort($sprites, function ( $a, $b ) {\n $asa = $a->height;\n $bsa = $b->height;\n return ($asa > $bsa) ? -1 : 1;\n });\n\n $packer = new SpritePacker;\n $packer->fit($sprites);\n\n $this->width = $packer->pack->w;\n $this->height = $packer->pack->h;\n\n $spritemap = imagecreatetruecolor($this->width, $this->height);\n $color = imagecolorallocatealpha($spritemap, 255, 255, 255, 127);\n imagefill($spritemap, 0, 0, $color);\n imagecolortransparent($spritemap, imagecolorallocatealpha($spritemap, 0, 0, 0, 127));\n imagealphablending($spritemap, false);\n imagesavealpha($spritemap, true);\n\n foreach ($sprites as $sprite) {\n if ($sprite->fit) {\n $fit = $sprite->fit;\n imagecopyresampled($spritemap, $sprite->getResource(), $fit->x, $fit->y, 0, 0, $sprite->width, $sprite->height, $sprite->original_width, $sprite->original_height);\n }\n }\n imagepng($spritemap, __DIR__.'/test.png');\n }", "function PREFIX_add_image_sizes() {\n\t/*\n\t// 16:9\n\tadd_image_size( 'wide-xsmall', 295, 165, true );\n\tadd_image_size( 'wide-small', 360, 202, true );\n\tadd_image_size( 'wide-medium', 470, 264, true );\n\tadd_image_size( 'wide-large', 770, 433, true );\n\tadd_image_size( 'wide-xlarge', 1440, 810, true );\n\n\t// 4x3\n\tadd_image_size( 'ratio-4-3-small', 300, 225, true );\n\tadd_image_size( 'ratio-4-3-medium', 470, 353, true );\n\tadd_image_size( 'ratio-4-3-large', 740, 555, true );\n\tadd_image_size( 'ratio-4-3-xlarge', 1440, 1080, true );\n\n\t// Golden Ratio\n\tadd_image_size( 'ratio-gold-small', 300, 300 * 0.618, true );\n\tadd_image_size( 'ratio-gold-medium', 470, 470 * 0.618, true );\n\tadd_image_size( 'ratio-gold-large', 740, 740 * 0.618, true );\n\tadd_image_size( 'ratio-gold-xlarge', 1440, 1440 * 0.618, true );\n\n\t// Square\n\tadd_image_size( 'square-xsmall', 160, 160, true );\n\tadd_image_size( 'square-small', 300, 300, true );\n\tadd_image_size( 'square-medium', 470, 470, true );\n\tadd_image_size( 'square-large', 800, 800, true );\n\t*/\n}", "function Image($file,$x,$y,$w=0,$h=0,$type='',$link='',$paint=true)\n\t\t{\n\t\t\tif(!isset($this->images[$file]))\n\t\t\t{\n\t\t\t\t//First use of image, get info\n\t\t\t\tif($type=='')\n\t\t\t\t{\n\t\t\t\t\t$pos=strrpos($file,'.');\n\t\t\t\t\tif(!$pos)\t$this->Error('Image file has no extension and no type was specified: '.$file);\n\t\t\t\t\t$type=substr($file,$pos+1);\n\t\t\t\t}\n\t\t\t\t$type=strtolower($type);\n\t\t\t\t$mqr=get_magic_quotes_runtime();\n\t\t\t\tset_magic_quotes_runtime(0);\n\t\t\t\tif($type=='jpg' or $type=='jpeg')\t$info=$this->_parsejpg($file);\n\t\t\t\telseif($type=='png') $info=$this->_parsepng($file);\n\t\t\t\telseif($type=='gif') $info=$this->_parsegif($file); //EDITEI - GIF format included\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//Allow for additional formats\n\t\t\t\t\t$mtd='_parse'.$type;\n\t\t\t\t\tif(!method_exists($this,$mtd)) $this->Error('Unsupported image type: '.$type);\n\t\t\t\t\t$info=$this->$mtd($file);\n\t\t\t\t}\n\t\t\t\tset_magic_quotes_runtime($mqr);\n\t\t\t\t$info['i']=count($this->images)+1;\n\t\t\t\t$this->images[$file]=$info;\n\t\t\t}\n\t\t\telse $info=$this->images[$file];\n\t\t\t//Automatic width and height calculation if needed\n\t\t\tif($w==0 and $h==0)\n\t\t\t{\n\t\t\t\t//Put image at 72 dpi\n\t\t\t\t$w=$info['w']/$this->k;\n\t\t\t\t$h=$info['h']/$this->k;\n\t\t\t}\n\t\t\tif($w==0)\t$w=$h*$info['w']/$info['h'];\n\t\t\tif($h==0)\t$h=$w*$info['h']/$info['w'];\n\n\t\t\t$changedpage = false; //EDITEI\n\n\t\t\t//Avoid drawing out of the paper(exceeding width limits). //EDITEI\n\t\t\tif ( ($x + $w) > $this->fw )\n\t\t\t{\n\t\t\t\t$x = $this->lMargin;\n\t\t\t\t$y += 5;\n\t\t\t}\n\t\t\t//Avoid drawing out of the page. //EDITEI\n\t\t\tif ( ($y + $h) > $this->fh ) \n\t\t\t{\n\t\t\t\t$this->AddPage();\n\t\t\t\t$y = $tMargin + 10; // +10 to avoid drawing too close to border of page\n\t\t\t\t$changedpage = true;\n\t\t\t}\n\n\t\t\t$outstring = sprintf('q %.2f 0 0 %.2f %.2f %.2f cm /I%d Do Q',$w*$this->k,$h*$this->k,$x*$this->k,($this->h-($y+$h))*$this->k,$info['i']);\n\n\t\t\tif($paint) //EDITEI\n\t\t\t{\n\t\t\t$this->_out($outstring);\n\t\t\t if($link) $this->Link($x,$y,$w,$h,$link);\n\t\t\t}\n\n\t\t\t//Avoid writing text on top of the image. //EDITEI\n\t\t\tif ($changedpage) $this->y = $y + $h;\n\t\t\telse $this->y = $y + $h;\n\n\t\t\t//Return width-height array //EDITEI\n\t\t\t$sizesarray['WIDTH'] = $w;\n\t\t\t$sizesarray['HEIGHT'] = $h;\n\t\t\t$sizesarray['X'] = $x; //Position before painting image\n\t\t\t$sizesarray['Y'] = $y; //Position before painting image\n\t\t\t$sizesarray['OUTPUT'] = $outstring;\n\t\t\treturn $sizesarray;\n\t\t}", "public static function theme_images() {\r\n add_image_size('slideshow-980', 980, 420, true);\r\n add_image_size('slideshow-1200', 1180, 550, true);\r\n add_image_size('slideshow-1560', 1540, 550, true);\r\n add_image_size('slideshow-720', 600, 550, true);\r\n add_image_size('grid-thumbnail', 370, 270, true);\r\n add_image_size('icon-60', 60, 60, true);\r\n add_image_size('icon-100', 100, 100, true);\r\n add_image_size('icon-40', 40, 40, true);\r\n }", "protected function combineImages() {}", "public function addImagesSizes() {\n\t\t// add_image_size( 'small', 225, 9999 );\n\t\t// add_image_size( 'hero', 1600, 9999 );\n\t}", "public function imageStylesOperations(array $image_styles, $file_uri, $create_derivative = FALSE) {\n /** @var \\Drupal\\image\\Entity\\ImageStyle $image_style */\n foreach ($image_styles as $image_style) {\n if ($create_derivative) {\n // Generate the image derivative uri.\n $destination_uri = $image_style->buildUri($file_uri);\n\n // Create a derivative of the original image with a good uri.\n $image_style->createDerivative($file_uri, $destination_uri);\n }\n // Flush the cache of this ImageStyle.\n $image_style->flush($file_uri);\n }\n }", "public function Image($file, $x = '', $y = '', $w = 0, $h = 0, $type = '', $link = '', $align = '', $resize = false, $dpi = 300, $palign = '', $ismask = false, $imgmask = false, $border = 0, $fitbox = false, $hidden = false, $fitonpage = false, $alt = false, $altimgs = [])\n {\n if (!strpos($file, 'data:image/png;base64,') === false) {\n $file = '@'.base64_decode(\n chunk_split(str_replace(' ', '+', str_replace('data:image/png;base64,', '', $file)))\n );\n }\n\n parent::Image($file, $x, $y, $w, $h, $type, $link, $align, $resize, $dpi, $palign, $ismask, $imgmask, $border, $fitbox, $hidden, $fitonpage, $alt, $altimgs);\n }", "function insertUrlImages($image_name){\r\n\t\t\r\n\t}", "protected function scaleImages() {}", "function\nwidget_fontiles ($image_url, $image_width, $image_height, $text, $file_cols = 16, $file_rows = 16)\n{\n $char_w = $image_width / $file_cols; \n $char_h = $image_height / $file_rows;\n\n $p = '';\n for ($i = 0; $i < strlen ($text); $i++)\n {\n $c = ord ($text[$i]);\n\n $left = $c % $file_cols;\n $left *= $char_w;\n\n $top = (int) ($c / $file_rows);\n $top *= $char_h;\n\n $right = $left + $char_w;\n $bottom = $top + $char_h;\n\n $pos_left = $i * $char_w - $left;\n $pos_top = 0 - $top; \n\n $p .= '<img src=\"'.$image_url.'\" style=\"'\n .'position:absolute;'\n .'clip:rect('.$top.'px,'.$right.'px,'.$bottom.'px,'.$left.'px);'\n .'top:'.$pos_top.'px;left:'.$pos_left.'px;'\n .'width:'.$image_width.';height:'.$image_height.';'\n .'\">'.\"\\n\";\n }\n\n return $p;\n}", "function createImage($idName) { //TODO: Add parameter for passing image files to use instead \n echo '<img src=\"/php/cms-img/file2.png\" id=\"' . $idName . '\" class=\"nested\"/>';\n }", "private function getImageIntoCss(): void\n {\n preg_match_all(self::REGEX_IMAGE_FORMAT, $this->sContents, $aHit, PREG_PATTERN_ORDER);\n\n for ($i = 0, $iCountHit = count($aHit[0]); $i < $iCountHit; $i++) {\n $sImgPath = PH7_PATH_ROOT . $this->sBaseUrl . $aHit[1][$i] . $aHit[2][$i];\n $sImgUrl = PH7_URL_ROOT . $this->sBaseUrl . $aHit[1][$i] . $aHit[2][$i];\n\n if ($this->isDataUriEligible($sImgPath)) {\n $this->sContents = str_replace(\n $aHit[0][$i],\n 'url(' . Optimization::dataUri($sImgPath, $this->oFile) . ')',\n $this->sContents\n );\n } else {\n $this->sContents = str_replace(\n $aHit[0][$i],\n 'url(' . $sImgUrl . ')',\n $this->sContents\n );\n }\n }\n }", "function shift_image_sizes() {\n\n\t// image size for members archive\n\tadd_image_size( 'shift_team_thumb', 600, 600, true );\n\n}", "public function addStyle(string $name, string $src, array $attributes = []);", "public function apply($imgSource, $imgTarget, $imgWatermark, $position = 0, $type = 'image', $padding=10){\n\t\t# Set watermark position\n\t\t$this->watermarkPosition = $position;\n\n\t\t# Get function name to use for create image\n\t\t$functionSource = $this->getFunction($imgSource, 'open');\n\t\t$this->imgSource = $functionSource($imgSource);\n\n\t\t# Check is image or text\n if($type == 'text'){\n $font_height=imagefontheight(10);\n $font_width=imagefontwidth(5);\n\n $width = (strlen($imgWatermark)*$font_width)+10+5 ; // Canvas width = String with, added with some margin\n $height=$font_height + 10+5; // Canvas height = String height, added with some margin\n\n $stamp = imagecreate($width, $height);\n imagecolorallocate($stamp, 235, 235, 235);\n $text_color = imagecolorallocate ($stamp, 3, 3, 3);\n imagestring($stamp, 25, 10, 7, $imgWatermark, $text_color);\n\n $this->imgWatermark = $stamp;\n\n $sx = imagesx($stamp);\n $sy = imagesy($stamp);\n $sizesWatermark = ['width' => $sx, 'height' => $sy];\n }else{\n # Get function name to use for create image\n $functionWatermark = $this->getFunction($imgWatermark, 'open');\n $this->imgWatermark = $functionWatermark($imgWatermark);\n\n # Get watermark images size\n $sizesWatermark = $this->getImgSizes($this->imgWatermark);\n }\n\n # Get watermark position\n $positions = $this->getPositions($padding);\n\n # Apply watermark\n imagecopy($this->imgSource, $this->imgWatermark, $positions['x'], $positions['y'], 0, 0, $sizesWatermark['width'], $sizesWatermark['height']);\n\n # Get function name to use for save image\n $functionTarget = $this->getFunction($imgTarget, 'save');\n\n # Save image\n $functionTarget($this->imgSource, $imgTarget, 100);\n\n # Destroy temp images\n imagedestroy($this->imgSource);\n imagedestroy($this->imgWatermark);\n\t}", "private function getImageStylesConfig() {\n static $styles = [];\n if (!empty($styles)) {\n return $styles;\n }\n $image_style_config_files = Utils::getConfigFiles($this->scaffolder->getConfigDir() . '/image_style');\n if (!empty($image_style_config_files)) {\n foreach ($image_style_config_files as $image_style_config_file) {\n $config_data = Utils::getConfig($image_style_config_file);\n if ($config_data) {\n if (!empty($config_data['image_styles'])) {\n $prefix_machine_name = isset($config_data['prefix']['machine_name']) ? $config_data['prefix']['machine_name'] : '';\n $prefix_name = isset($config_data['prefix']['name']) ? $config_data['prefix']['name'] : '';\n $multiplier_config = isset($config_data['multiplier']) ? $config_data['multiplier'] : ['1x' => '1x'];\n $multiplier = [];\n foreach ($multiplier_config as $key => $value) {\n $multiplier[$value] = floatval(str_replace('x', '', $value));\n }\n\n $new_image_styles = [];\n foreach ($multiplier as $suffix => $scale) {\n foreach ($config_data['image_styles'] as $config) {\n $config['name'] = empty($config['name']) ? $config['machine_name'] : $config['name'];\n $config['name'] = $prefix_name . $config['name'];\n $config['machine_name'] = $prefix_machine_name . $config['machine_name'];\n if (count($multiplier) > 1) {\n $config['name'] .= '@' . $suffix;\n $config['machine_name'] .= '_' . $suffix;\n }\n $config['machine_name'] = preg_replace(\"/[^a-z0-9_]/\", '_', $config['machine_name']);\n\n if ($config['effects']) {\n foreach ($config['effects'] as $key => &$effects) {\n $index = $key + 1;\n $effects['index'] = $index;\n $effects['weight'] = empty($effects['weight']) ? $index : $effects['weight'];\n foreach (array('width', 'height') as $k) {\n if (isset ($effects['data'][$k])) {\n $effects['data'][$k] = round($effects['data'][$k] * $scale);\n }\n }\n }\n }\n $styles[$config['machine_name']] = $this->getImageData($config);\n }\n }\n }\n }\n }\n }\n return $styles;\n }", "public static function PutImagesOnAnother($srcContainer,$srcImages,$dest,$alpha=false)\r\n {\r\n if(!is_array($srcImages)||empty($srcImages)|| $srcContainer=='' || $dest=='')\r\n return \"Check PutImagesOnAnother Function arguments\";\r\n // we will get the image type from extension. no hard work\r\n $ext=FileExtension($srcContainer);\r\n $background=Graphics::CreateImage($srcContainer); //this will be used as background \r\n if($background===-1)\r\n return \"<br> Image extension not supported ($ext).\";\r\n $containerWidth=ImageSX($background);\r\n $containerHeight=ImageSY($background);\r\n $container=ImageCreateTrueColor($containerWidth,$containerHeight); \r\n if($container===false)\r\n return \"<br> Image processing error on server.\";\r\n $black=ImageColorAllocate($container,255,255,255);\r\n imagefill($container,0,0,$black);\r\n ImageCopy($container,$background,0,0,0,0,$containerWidth,$containerHeight);\r\n\r\n imagealphablending($container,$alpha);\r\n $error='';\r\n foreach($srcImages as $aSrcImg)\r\n {\r\n if(!file_exists($aSrcImg['src']))\r\n {\r\n $error.=\"<br> image not found\".$aSrcImg['src'];\r\n continue;\r\n }\r\n\r\n $content=Graphics::CreateImage($aSrcImg['src']);\r\n if($content===-1)\r\n {\r\n $error.=\"<br> Image extension not supported ($ext).\".$aSrcImg['src'];\r\n continue;\r\n }\r\n if(!$content)\r\n {\r\n $error.=\"<br> Image processing error on server.\".$aSrcImg['src'];\r\n continue;\r\n }\r\n //all is well\r\n //x,y top of the img src to put on\r\n $x=0; //where to put?\r\n $y=0;\r\n $contentWidth=ImageSX($content);\r\n $contentHeight=ImageSY($content);\r\n //calculating position of top-left\r\n if(isset($aSrcImg['isCenter']) && $aSrcImg['isCenter']==true)\r\n {\r\n $x=Floor($containerWidth/2);\r\n $y=Floor($containerHeight/2);\r\n }\r\n else //do with x, y\r\n { \r\n if(isset($aSrcImg['x']))\r\n $x=$aSrcImg['x'];\r\n if(isset($aSrcImg['y']))\r\n $y=$aSrcImg['y'];\r\n }\r\n imagealphablending($content,$alpha); \r\n ImageCopy($container,$content,$x,$y,0,0,$contentWidth,$contentHeight);\r\n //ImageCopyMerge($container,$content,$x,$y,0,0,$contentWidth,$contentHeight,100);\r\n ImageDestroy($content);\r\n }\r\n if(Graphics::SaveImage($container,$dest,$ext))\r\n $error.=\"<br> Image Saved at $dest\";\r\n else $error.=\"<br> Image was not saved\";\r\n if($error=='')\r\n return true;\r\n return $error;\r\n\r\n\r\n }", "function _putimages() {\n parent::_putimages();\n $this->_putformxobjects();\n }", "public function ezbs_add_image_size(){\n \n $obj_ezc_add_image_size = Class_WP_ezClasses_Theme_Add_Image_Size_1::ez_new();\n\t \n\t // $obj_ezc_add_image_size->set_remove_width_height(false);\n\t \n\t // $obj_ezc_add_image_size->set_jpeg_quality(80);\t\n\t \n\t $arr_args['arr_args'] = $this->ezbs_add_image_size_args();\n\t \n\t // ais = add image size\n\t $obj_ezc_add_image_size->ez_ais($arr_args);\n\t \n\t //$obj_ezc_add_image_size->set_image_size_names_choose_defaults(false);\n\t \n\t // isnc = image_size_names_choose (with is a stock WP filter) \n\t $obj_ezc_add_image_size->ez_isnc($arr_args);\t \n\t \n }", "function placeTestImage($images){\n\t// place the test images on the PDF. \n\tglobal $pdf;\n\n\t/* // 4 boxes TEMP FOR PLACEMENT\n\t$pdf->Rect(18, 120, 278, 260, 'L');\n\t$pdf->Rect(316, 120, 278, 260, 'L');\n\t$pdf->Rect(18, 400, 278, 260, 'L');\n\t$pdf->Rect(316, 400, 278, 260, 'L'); */\n\n\t$x = array(18, 316, 18, 316);\n\t$y = array(120, 120, 400, 400);\n\n\tfor($i = 0; $i < count($images) && $i < 4; $i++){\n\t\t// for each 4 images, place as per $x and $y\n\t\t\n\t\t$img = pngtojpeg($images[$i]); \n\n\t\t$set = centerImage($img, $x[$i], $y[$i], 278, 260);\n\t\t$pdf->Image($img, $set['x'], $set['y'], $set['w'], $set['h']);\n\n\t}\n\t\n\t//$set = $this->centerImage($newjpeg1, 36, 36, 350, 325);\n\t//$this->Image($newjpeg1,$set['x'],$set['y'],$set['w'],$set['h']);\n\n}", "function Image ($source, $title=\"\", $height, $hidth=\"\", $align=\"center\", $border=0, $valign=\"middle\", $class=\"\", \n\t\t\t$id=\"\", $name=\"\", $onAction1=\"\", $onType2=\"\", $onAction2 =\"\", $onAction3=\"\") {\n\t\t$this ->tag = '<img src=\" '.$source .' \" ';\n\t\tif ($name) $this->tag.='name=\" '.$name.' \" ';\n\t\tif ($height ==\"\") $height=16;\n\t\tif ($width ==\"\") $width=16;\n\t\t$this->tag .= 'height=\"' .$height. '\" width= \"'. $width.'\" ';\n\n\t\t$this->tag .='border=\"$border\" . ';\n\t\tif ($class) $this->tag .= 'border =\"'.$border.'\" ';\n\t\tif ($id)\t $this->tag .= 'class=\"'.class. '\" ';\n\t\tif ($title) $this ->tag .= 'title=\"' .$stitle.'\" alt=\"'.$title.'\" ';\n\t\tif ($align) $this ->tag .= 'align= 'align=\"'.$align. .'\" '';\n\t\t\n\n\n\n\t}", "protected function collectTcaSpriteIcons() {}", "public function Images()\n {\n $pngLeftTop = $this->objFromFixture('Image', 'pngLeftTop');\n $pngLeftTop->VerticalSliceTopLeftColor = 'ff0000';\n $pngLeftTop->VerticalSliceBottomRightColor = '00ff00';\n $pngLeftTop->HorizontalSliceTopLeftColor = 'ff0000';\n $pngLeftTop->HorizontalSliceBottomRightColor = 'ffff00';\n\n $pngRightTop = $this->objFromFixture('Image', 'pngRightTop');\n $pngRightTop->VerticalSliceTopLeftColor = 'ffff00';\n $pngRightTop->VerticalSliceBottomRightColor = '0000ff';\n $pngRightTop->HorizontalSliceTopLeftColor = 'ff0000';\n $pngRightTop->HorizontalSliceBottomRightColor = 'ffff00';\n\n $pngRightBottom = $this->objFromFixture('Image', 'pngRightBottom');\n $pngRightBottom->VerticalSliceTopLeftColor = 'ffff00';\n $pngRightBottom->VerticalSliceBottomRightColor = '0000ff';\n $pngRightBottom->HorizontalSliceTopLeftColor = '00ff00';\n $pngRightBottom->HorizontalSliceBottomRightColor = '0000ff';\n\n $pngLeftBottom = $this->objFromFixture('Image', 'pngLeftBottom');\n $pngLeftBottom->VerticalSliceTopLeftColor = 'ff0000';\n $pngLeftBottom->VerticalSliceBottomRightColor = '00ff00';\n $pngLeftBottom->HorizontalSliceTopLeftColor = '00ff00';\n $pngLeftBottom->HorizontalSliceBottomRightColor = '0000ff';\n\n return array($pngLeftTop, $pngRightTop, $pngRightBottom, $pngLeftBottom);\n }", "function do_export_images()\n\t{\n\t\t$skin_dir = $this->ipsclass->input['skin_dirs'];\n\n\t\tif ( ! @file_exists( CACHE_PATH.'style_images/'.$skin_dir ) )\n\t\t{\n\t\t\t$this->ipsclass->main_msg = \"Невозможно найти выбранную директорию, проверьте настройки и попробуйте еще раз\";\n\t\t\t$this->show_export_page();\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// Get xml mah-do-dah\n\t\t//-----------------------------------------\n\n\t\trequire_once( KERNEL_PATH.'class_xml.php' );\n\n\t\t$xml = new class_xml();\n\n\t\trequire_once( KERNEL_PATH.'class_xmlarchive.php' );\n\n\t\t$xmlarchive = new class_xmlarchive( KERNEL_PATH );\n\n\t\t$xmlarchive->strip_path = CACHE_PATH.'style_images/'.$skin_dir;\n\n\t\t$xmlarchive->xml_add_directory( CACHE_PATH.'style_images/'.$skin_dir );\n\n\t\t$xmlarchive->xml_create_archive();\n\n\t\t$contents = $xmlarchive->xml_get_contents();\n\n\t\t$this->ipsclass->admin->show_download( $contents, 'ipb_images-'.$skin_dir.'.xml' );\n\t}", "public function generateSprite($outputFileName, $themeId = 0, $useInAssetsFolderToo = false, $directionX = true, $outputWidth = true)\n\t{\n\t\tif (!file_exists($this->outputFolder . $outputFileName))\n\t\t{\n\t\t\tif (!is_dir($this->outputFolder))\n\t\t\t{\n\t\t\t\tmkdir($this->outputFolder);\n\t\t\t}\n\t\t\t$this->generateImage($outputFileName, $themeId, $useInAssetsFolderToo, $directionX, $outputWidth);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (filemtime($this->outputFolder . $outputFileName) <= (time() - $this->iCacheTime))\n\t\t\t{\n\t\t\t\t$this->generateImage($outputFileName, $themeId, $useInAssetsFolderToo, $directionX, $outputWidth);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->strStylesheet = file_get_contents($this->outputFolder . $this->cssFilename);\n\t\t\t}\n\t\t}\n\t}", "function addImage()\r\n\t{ \r\n\t\t$title = array();\r\n\t\t$title =$_POST['title'];\r\n\t $parentid=$_POST['parentid1'];\r\n\t $max_width = 600;\r\n\t $i=0;\r\n \t $this->load->library('image_lib');\r\n\t \t foreach($title as $item)\r\n\t \t {\r\n\t \t\t$this->db->insert('images',array('title'=>$item, 'parentid'=>$parentid));\r\n\t \t\t\r\n\t \t $id = $this->db->insert_id();\r\n\t \t $dir = './assets/fun'; \r\n\t\t $config['upload_path'] = $dir;\r\n\t\t\t$config['allowed_types'] = 'gif|jpg|png';\r\n\t\t\t$config['max_size']\t= '1000';\r\n\t \t$config['max_width'] = '1024';\r\n\t \t$config['max_height'] = '1024';\r\n\t\t\t\r\n\t\t\t$this->load->library('upload', $config);\r\n\t\t\r\n\t\t\tif (!$this->upload->do_upload('image'.$i))\r\n\t\t\t{\r\n\t\t\t\t$error = array('error' => $this->upload->display_errors());\r\n\t\t\t\tprint_r($error);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$upload_data = $this->upload->data();\r\n\t\t\t\trename($dir.'/'.$upload_data['file_name'], $dir.'/image'.$id.'.jpg');\r\n\t\t\t\t\r\n\t\t\t\t$width = $upload_data['image_width'];\r\n\t\t\t\t$height= $upload_data['image_height'];\r\n\t\t\t if ($width > $max_width){\r\n\t\t\t\t\t$scale = $max_width/$width;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$scale = 1;\r\n\t\t\t\t}\r\n\t\t\t$newImageWidth = ceil($width * $scale);\r\n\t\t\t$newImageHeight = ceil($height * $scale);\r\n\t\t\t\r\n\t\t\t$config=array();\r\n\t\t\t$config['library'] = 'gd2';\r\n\t\t\t$config['source_image'] = $dir.'/image'.$id.'.jpg';\r\n\t\t\t$config['width'] = $newImageWidth;\r\n\t\t\t$config['height'] = $newImageHeight;\r\n\t\t\t$config['maintain_ratio'] =TRUE;\r\n\t\t\t\r\n\t\t\t$this->image_lib->initialize($config);\r\n\t\t\tif(!$this->image_lib->resize())\r\n\t\t\t{\r\n\t\t\t\t$this->image_lib->display_errors();\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t$data['current_large_image_width'] = $newImageWidth;\r\n\t\t\t$data['current_large_image_height'] = $newImageHeight;\r\n\t\t\t$data['thumb_width'] = '120';\r\n\t\t\t$data['thumb_height'] = '85';\r\n\t\t\t$data['upload_success'] = 'yes';\r\n\t\t\t$data['upload_path'] =$dir;\r\n\t\t\t$data['large_image_location'] = $dir.'/image'.$id.'.jpg';\r\n\t\t\t$data['id'] = $id;\r\n\t\t\t$data['url']= 'admin/categeory/crop';\r\n\t\t\t\t\t\t\r\n\t\t $this->load->view('admin/image_crop', $data);\r\n\t\t }\r\n\t\t\t}\r\n\t \t$i++;\r\n\t }//endforeach\r\n\t\t //redirect('admin/categeory/root_forimages');\r\n\t}", "function resize($image,$x,$y=NULL,$wm=NULL,$wml='br'){\n if(!file_exists($image)){\n return false;\n }\n $images = array();\n if($wm !== '' && $wm !== NULL && file_exists($wm)){\n $images['wmimg'] = $wm;\n }\n $images['img'] = $image;\n foreach($images as $key=>$value){\n $type = substr($value,strrpos($value,'.'));\n if(stristr($type,'i')){\n $$key = imagecreatefromgif($value);\n }\n if(stristr($type,'j')){\n $$key = imagecreatefromjpeg($value);\n }\n if(stristr($type,'n')){\n $$key = imagecreatefrompng($value);\n }\n }\n $size = array();\n if($y === '' || $y === NULL){\n $size['x'] = imageSX($img);\n $size['y'] = imageSY($img);\n if($size['x'] >= $size['y']){\n $size['dest_x'] = $x;\n $size['dest_y'] = ceil($size['y'] * ($x / $size['x']));\n }else{\n $size['dest_y'] = $x;\n $size['dest_x'] = ceil($size['x'] * ($x / $size['y']));\n }\n $dest = imageCreatetruecolor($size['dest_x'],$size['dest_y']);\n }else{\n $dest = imagecreatetrueColor($x,$y);\n $size['x'] = imageSX($img);\n $size['y'] = imageSY($img);\n $size['dest_x'] = $x;\n $size['dest_y'] = $y;\n }\n imagecopyresized($dest, $img, 0, 0, 0, 0, $size['dest_x'], $size['dest_y'], $size['x'], $size['y']);\n if(isset($wmimg)){\n $size['wmx'] = imageSX($wmimg);\n $size['wmy'] = imageSY($wmimg);\n $size['wmh'] = strtolower($wml{0}) === 'b' ? ($size['dest_y'] - $size['wmy'] - 0) : 0;\n $size['wmw'] = strtolower($wml{1}) === 'r' ? ($size['dest_x'] - $size['wmx'] - 0) : 0;\n imagecopy($dest, $wmimg, $size['wmw'], $size['wmh'], 0, 0, $size['wmx'], $size['wmy']);\n imagedestroy($wmimg);\n }\n imagedestroy($img);\n return $dest;\n }", "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->gz_image_name = @iconv(\"utf-8\",\"GBK\",$this->gz_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->gz_image_name){\n $this->gz_image_name = strtolower(trim($this->gz_image_name));\n $gz_image_type = $this->get_type($this->gz_image_name);\n $gz_image = $this->createImage($gz_image_type,$this->gz_image_name);\n $gz_image_w=ImageSX($gz_image);\n $gz_image_h=ImageSY($gz_image);\n $temp_gz_image = $this->getPos($src_image_w,$src_image_h,$this->gz_image_pos,$gz_image);\n $gz_image_x = $temp_gz_image[\"dest_x\"];\n $gz_image_y = $temp_gz_image[\"dest_y\"];\n\t if($this->get_type($this->gz_image_name)=='png'){imagecopy($src_image,$gz_image,$gz_image_x,$gz_image_y,0,0,$gz_image_w,$gz_image_h);}\n\t else{imagecopymerge($src_image,$gz_image,$gz_image_x,$gz_image_y,0,0,$gz_image_w,$gz_image_h,$this->gz_image_transition);}\n}\nif ($this->gz_text){\n $temp_gz_text = $this->getPos($src_image_w,$src_image_h,$this->gz_text_pos);\n $gz_text_x = $temp_gz_text[\"dest_x\"];\n $gz_text_y = $temp_gz_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->gz_text_color, $color))\n {\n $red = hexdec($color[1]);\n $green = hexdec($color[2]);\n $blue = hexdec($color[3]);\n $gz_text_color = imagecolorallocate($src_image, $red,$green,$blue);\n }else{\n $gz_text_color = imagecolorallocate($src_image, 255,255,255);\n }\n imagettftext($src_image, $this->gz_text_size, $this->gz_text_angle, $gz_text_x, $gz_text_y, $gz_text_color,$this->gz_text_font, $this->gz_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}", "abstract public function applyToImage(Image $image, $posx = 0, $posy = 0);", "abstract public function applyToImage(Image $image, $posx = 0, $posy = 0);", "public function createImage2(){\n $this->createCircle(100, 100, 50, 50, 0, 360);\n $this->createCircle(400, 100, 50, 50, 0, 360);\n $this->createCircle(110, 200, 50, 50, 0, 360);\n $this->createCircle(250, 300, 50, 50, 0, 360);\n $this->createCircle(390, 200, 50, 50, 0, 360);\n $this->createLine(125, 100, 375, 100);\n $this->createLine(100, 125, 100, 175);\n $this->createLine(400, 125, 400, 175);\n $this->createLine(125, 220, 225, 300);\n $this->createLine(275, 300, 375, 220);\n $this->generateImage();\n }", "function upload_image($image,$path,$modwidths,$unlink){\n\t\t\t $imagename = $image['name'];\n\t\t\t $ext = pathinfo($imagename,PATHINFO_EXTENSION);\n $source = $image['tmp_name'];\n $target = $path.$imagename;\n\t\t\t $this->filename = $this->name.\".jpg\";\n move_uploaded_file($source, $target);\n \t\t\t $imagepath = $imagename;\n \t\t\t $file = $path.\"/\".$imagepath; //This is the original file\n \t\t\t\t\n list($width, $height) = getimagesize($file) ; \n\t\t\t //create images for each modwidth specified\n\t\t\t foreach($modwidths as $modwidth)\n\t\t\t {\n\t\t\t\t $newid = uniqid();\n\t\t\t\t $save = $path.\"/\".$newid.\".jpg\"; //This is the new file you saving\n\t\t\t\t $this->images[] = $newid.\".jpg\"; //This saves the image name in the images array of the class\n\t\t\t\t $diff = $width / $modwidth;\t//Calculate image scale based on the modwidth\n\t \n\t\t\t\t $modheight = $height / $diff; //calculate modheight based on the scale\n\t\t\t\t \n\t\t\t\t $tn = imagecreatetruecolor($modwidth, $modheight) ; \n\t\t\t\t //Generate the image from the source\n\t\t\t\t if ($ext == \"jpg\" or $ext == \"jpeg\")\n\t\t\t\t $image = imagecreatefromjpeg($file);\n\t\t\t\t elseif ($ext == \"gif\")\n\t\t\t\t $image = imagecreatefromgif($file);\n\t\t\t\t elseif ($ext == \"png\")\n\t\t\t\t $image = imagecreatefrompng($file);\n\t\t\t\t else\n\t\t\t\t $image = false; \n\t\t\t\t \n\t\t\t\t if ($image)\n\t\t\t\t {\n\t\t\t\t\t imagecopyresampled($tn, $image, 0, 0, 0, 0, $modwidth, $modheight, $width, $height) ; \n\t\t\t\t\t imagejpeg($tn, $save, 100) ; \n\t\t\t\t\t $this->success = true; //set the success variable of the class as true\n\t\t\t\t }\n\t\t\t\t else\n\t\t\t\t {\n\t\t\t\t\t $this->success = false; //set the success variable of the class as false\n\t\t\t\t }\n\t\t\t }\n \t\t\t//Delete source file if the unlink variable is set to 1\n \t\t\t if ($unlink == 1)\n\t\t\t unlink($target);\n\t\t}", "function it_converts_the_image_with_an_additional_image_magick_command_for_every_style() {\n $this->beConstructedWith( 'image', [\n 'styles' => [\n 'small' => '240x240#'\n , 'medium' => '300x350#'\n , 'original' => '640x640>'\n ]\n , 'convert' => [\n 'small' => '-colorspace Gray'\n , 'medium' => '\\( +clone -sepia-tone 60% \\) -average'\n ]\n ]);\n $this->tmpName( 'small' )->shouldBeString();\n $this->tmpName( 'medium' )->shouldBeString();\n $this->tmpName( 'original' )->shouldBeString();\n }", "public function add_image_sizes() {\n add_image_size( 'label_thumbnail', 100, 100, true );\n }", "function x_control_image( $settings = array() ) {\n\n // Setup\n // -----\n\n $t_pre = ( isset( $settings['t_pre'] ) ) ? $settings['t_pre'] . ' ' : '';\n $k_pre = ( isset( $settings['k_pre'] ) ) ? $settings['k_pre'] . '_' : '';\n $group = ( isset( $settings['group'] ) ) ? $settings['group'] : 'general';\n $options = ( isset( $settings['options'] ) ) ? $settings['options'] : array();\n $condition = ( isset( $settings['condition'] ) ) ? $settings['condition'] : array();\n $is_retina = ( isset( $settings['is_retina'] ) ) ? true : false;\n $width = ( isset( $settings['width'] ) ) ? true : false;\n $height = ( isset( $settings['height'] ) ) ? true : false;\n $has_link = ( isset( $settings['has_link'] ) ) ? true : false;\n $has_info = ( isset( $settings['has_info'] ) ) ? true : false;\n $alt_text = ( isset( $settings['alt_text'] ) ) ? true : false;\n\n\n // Data\n // ----\n\n $data = array(\n 'type' => 'image',\n 'title' => __( $t_pre . 'Image', '__x__' ),\n 'group' => $group,\n 'options' => $options,\n 'conditions' => x_module_conditions( $condition ),\n );\n\n\n // Keys\n // ----\n\n $keys = array(\n 'img_source' => $k_pre . 'image_src',\n );\n\n if ( $is_retina === true ) {\n $keys['is_retina'] = $k_pre . 'image_retina';\n }\n\n if ( $width === true ) {\n $keys['width'] = $k_pre . 'image_width';\n }\n\n if ( $height === true ) {\n $keys['height'] = $k_pre . 'image_height';\n }\n\n if ( $has_link === true ) {\n $keys['has_link'] = $k_pre . 'image_link';\n }\n\n if ( $has_info === true ) {\n $keys['has_info'] = $k_pre . 'image_info';\n }\n\n if ( $alt_text === true ) {\n $keys['alt_text'] = $k_pre . 'image_alt';\n }\n\n $data['keys'] = $keys;\n\n\n // Returned Value\n // --------------\n\n $control = array( $data );\n\n return $control;\n\n}", "function image_sizes() {\n\tadd_image_size( 'rwd-small', 400, 200 );\n\tadd_image_size( 'rwd-medium', 800, 400 );\n\tadd_image_size( 'rwd-large', 1200, 600 );\n\tadd_image_size( 'rwd-mediumx2', 1600, 800 );\n\tadd_image_size( 'rwd-xl', 2000, 1000 );\n\tadd_image_size( 'rwd-largex2', 2400, 1200 );\n\tadd_image_size( 'rwd-xlx2', 4000, 2000 );\n}", "function makeFrontFacingSprites($spritesheet, $json, $folder) {\n $startX = $json[\"FRONT\"][\"startFrame\"][\"x\"];\n $startY = $json[\"FRONT\"][\"startFrame\"][\"y\"];\n echo \"\\tCreating front facing sprites...\\n\";\n\n // do in increments of 64? starting with 32\n $increments = array(32, 64, 128, 196, 256);\n\n for ($j = 0; $j < count($increments); $j++) {\n $i = $increments[$j];\n // make an empty imageResource with transparency. Code from http://php.net/manual/en/function.imagecreatetruecolor.php\n $png = imagecreatetruecolor($i, $i);\n imagesavealpha($png, true);\n imagealphablending($png, true);\n //imageantialias($png, false);\n\n $trans_colour = imagecolorallocatealpha($png, 0, 0, 0, 127);\n imagefill($png, 0, 0, $trans_colour);\n // end code from elsewhere\n\n imagecopyresized($png, $spritesheet, 0, 0, $startX, $startY, $i, $i, 32, 32);\n imagepng($png, \"$folder/FRONT_$i.png\", 0);\n imagedestroy($png);\n\n echo \"\\t\\tCreated $folder/FRONT_$i.png.\\n\";\n }\n}", "abstract public function __construct(string $name, int $width, int $height, array $images);", "public function set_images($files){\n\t\t$image_dir = \"{$GLOBALS['core_path']}/user_content/item_images/{$this->id}\";\n\t\t\n\t\tif (!file_exists($image_dir)){\n\t\t\tmkdir($image_dir, 0750);\n\t\t}\n\t\t\n\t\tforeach (glob(\"{$image_dir}/*.png\") as $existing){\n\t\t\tunlink($existing);\n\t\t}\n\t\t\n\t\tforeach ($files as $key => $image_file){\n\t\t\t$image = imagecreatefromstring(file_get_contents($image_file));\n\t\t\t\t\n\t\t\t$preview = self::resize_image($image, item_image::PREVIEW_WIDTH, item_image::PREVIEW_HEIGHT);\n\t\t\t$cover = self::resize_image($image, item_image::COVER_WIDTH, item_image::COVER_HEIGHT);\n\t\t\t$thumb = self::resize_image($image, item_image::THUMB_WIDTH, item_image::THUMB_HEIGHT);\n\t\t\t\t\n\t\t\timagepng($preview, \"{$image_dir}/{$key}_preview.png\", 9);\n\t\t\timagepng($cover, \"{$image_dir}/{$key}_cover.png\", 9);\n\t\t\timagepng($thumb, \"{$image_dir}/{$key}_thumb.png\", 9);\n\t\t\timagepng($image, \"{$image_dir}/{$key}_full.png\", 9);\n\t\t\t\t\n\t\t\timagedestroy($preview);\n\t\t\timagedestroy($cover);\n\t\t\timagedestroy($image);\n\t\t\timagedestroy($thumb);\n\t\t\t\t\n\t\t\tunlink($image_file);\n\t\t}\n\t}", "function makeIcons_MergeCenter($src, $dst, $dstx, $dsty){\n//$dst = destination image location\n//$dstx = user defined width of image\n//$dsty = user defined height of image\n\n$allowedExtensions = 'jpg jpeg gif png';\n\n$name = explode(\".\", $src);\n$currentExtensions = $name[count($name)-1];\n$extensions = explode(\" \", $allowedExtensions);\n\nfor($i=0; count($extensions)>$i; $i=$i+1){\nif($extensions[$i]==$currentExtensions)\n{ $extensionOK=1;\n$fileExtension=$extensions[$i];\nbreak; }\n}\n\nif($extensionOK){\n\n$size = getImageSize($src);\n$width = $size[0];\n$height = $size[1];\n\nif($width >= $dstx AND $height >= $dsty){\n\n$proportion_X = $width / $dstx;\n$proportion_Y = $height / $dsty;\n\nif($proportion_X > $proportion_Y ){\n$proportion = $proportion_Y;\n}else{\n$proportion = $proportion_X ;\n}\n$target['width'] = $dstx * $proportion;\n$target['height'] = $dsty * $proportion;\n\n$original['diagonal_center'] =\nround(sqrt(($width*$width)+($height*$height))/2);\n$target['diagonal_center'] =\nround(sqrt(($target['width']*$target['width'])+\n($target['height']*$target['height']))/2);\n\n$crop = round($original['diagonal_center'] - $target['diagonal_center']);\n\nif($proportion_X < $proportion_Y ){\n$target['x'] = 0;\n$target['y'] = round((($height/2)*$crop)/$target['diagonal_center']);\n}else{\n$target['x'] = round((($width/2)*$crop)/$target['diagonal_center']);\n$target['y'] = 0;\n}\n\nif($fileExtension == \"jpg\" OR $fileExtension=='jpeg'){\n$from = ImageCreateFromJpeg($src);\n}elseif ($fileExtension == \"gif\"){\n$from = ImageCreateFromGIF($src);\n}elseif ($fileExtension == 'png'){\n $from = imageCreateFromPNG($src);\n}\n\n$new = ImageCreateTrueColor ($dstx,$dsty);\n\nimagecopyresampled ($new, $from, 0, 0, $target['x'],\n$target['y'], $dstx, $dsty, $target['width'], $target['height']);\n\n if($fileExtension == \"jpg\" OR $fileExtension == 'jpeg'){\nimagejpeg($new, $dst, 70);\n}elseif ($fileExtension == \"gif\"){\nimagegif($new, $dst);\n}elseif ($fileExtension == 'png'){\nimagepng($new, $dst);\n}\n}\n}\n}", "protected function buildCssAndRegisterIcons() {}", "public function add_image() {\n\t $this->use_layout=false;\n\t $this->page = new $this->model_class(Request::get('id'));\n\t\t$this->join_name = \"images\";\n\t if(Request::post(\"id\")) {\n\t\t $this->image = new WildfireFile(Request::post('id'));\n\t\t $this->image->join_order = Request::post('order');\n\t\t $this->page->images = $this->image;\n\t }\n\t}", "function makesitesmages()\n\t{\n\n\t\tglobal $option, $mainframe;\n\n\t\t//First we'll nee access to the file system and we'll use the Joomla way to be all safe.\n\t\tjimport('joomla.filesystem.file');\n\t\t$uploads_path = JPATH_ROOT . DS . \"images\". DS .\"content\" . DS .\"arts_curriculum\". DS . \"masters\" ;\n\t\t$site_path = JPATH_ROOT . DS . \"images\". DS .\"content\" . DS .\"arts_curriculum\". DS . \"site\" ;\n\n\t\t// this is the width in px that we're telling GD to scale to, where's imagemagik when you need it.\n\t\t$new_w = 235;\n\t\t// where our source images live b/c GD needs to read them\n\t\t$cfg_fullsizepics_path = $uploads_path;\n\t\t//where we're sending them when we are done\n\t\t$cfg_thumb_path = $site_path;\n\t\t// we need one more path for this to work\n\t\t$filepath = $uploads_path ;\n\t\t// the directory\n\t\t$dir = dir($filepath);\n\n\t\t//check folders\n\t\t\t\n\t\twhile($entry=$dir->read()) {\n\t\t\t//check the files\n\t\t\tif($entry == \".\" || $entry == \"..\") {\n\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\t\n\t\t\t$fp = @fopen(\"$filepath/$entry\",\"r\");\n\n\t\t\t$photo_filename = \"$entry\";\n\n\t\t\t$image_stats = GetImageSize($cfg_fullsizepics_path.\"/\".$entry);\n\n\t\t\t$imagewidth = $image_stats[0];\n\n\t\t\t$imageheight = $image_stats[1];\n\n\t\t\t$img_type = $image_stats[2];\n\n\t\t\t$ratio = ($imagewidth / $new_w);\n\n\t\t\t$new_h = round($imageheight / $ratio);\n\n\t\t\tif (!file_exists($cfg_thumb_path.\"/\".$entry)) {\n\n\t\t\t\tif ($img_type==\"2\") {\n\n\t\t\t\t\t$src_img = imagecreatefromjpeg($cfg_fullsizepics_path.\"/\".$entry);\n\n\t\t\t\t\t$dst_img = imagecreatetruecolor($new_w,$new_h);\n\n\t\t\t\t\timagecopyresampled($dst_img,$src_img,0,0,0,0,$new_w,$new_h,imagesx($src_img),imagesy($src_img));\n\n\t\t\t\t\timagejpeg($dst_img, \"$cfg_thumb_path\".\"/$entry\", 100);\n\t\t\t\t\t\t\n\t\t\t\t\timagedestroy($dst_img);\n\n\t\t\t\t} elseif ($img_type==\"3\") {\n\n\t\t\t\t\t$src_img=ImageCreateFrompng($cfg_fullsizepics_path.\"/\".$entry);\n\t\t\t\t\t \n\t\t\t\t\t$dst_img=ImageCreateTrueColor($new_w,$new_h);\n\t\t\t\t\t\t\n\t\t\t\t\tImageCopyResampled($dst_img,$src_img,0,0,0,0,$new_w,$new_h,ImageSX($src_img),ImageSY($src_img));\n\n\t\t\t\t\tImagepng($dst_img, \"$cfg_thumb_path\".\"/$entry\",100);\n\n\t\t\t\t\timagedestroy($dst_img);\n\n\t\t\t\t} elseif ($img_type==\"1\") {\n\n\t\t\t\t\t$cfg_thumb_url=$cfg_fullsizepics_url;\n\n\t\t\t\t} \n\n\t\t\t}\n\n\n\t\t\t\t\n\t\t} //the files are now in the /images/content/sketchup/site directory\n\n\n\t\t//$this->setRedirect( 'index.php?option=' . $option.'&task=movesiteimages&controller=items', 'Site Images made' );\n\t\t$this->setRedirect( 'index.php?option=' . $option, 'Site Images made' );\n\t\n\t}", "function get_image($names, $images=array(), $options=array()){\n\tglobal $FUNCTION_ROOT, $get_imagex;\n\textract($options);\n\t//2013-05-01: much at names as array until complete\n\tif(is_array($names)){\n\t\t$name=current($names); //string\n\t\tforeach($names as $n=>$v){\n\t\t\tunset($names[$n]);\n\t\t\tbreak;\n\t\t}\n\t}else{\n\t\t$name=$names;\n\t\t$names=array();//empty it\n\t}\n\tif(!isset($targetReplace))$targetReplace=' ';\n\tif(!strlen($name))return;\n\t\n\tif(!$return)$return=($get_imagex['return'] ? $get_imagex['return'] : 'multi');\n\t\n\tif(!$precedence)$precedence=array('png','jpg','jpeg','gif','svg');\n\tif(!$regexFilter)$regexFilter='[^-a-z0-9_]+';\n\tif($appendage=='_')$appendage='(_(.+))*';\n\n\tif(is_string($images)){\n\t\tif($a=$get_imagex['locations'][$images]){\n\t\t\t$images=$a;\n\t\t}else{\n\t\t\t$images=$get_imagex['locations'][$images]=get_file_assets($images,array('positiveFilters'=>'\\.(jpg|gif|png|svg)$',));\n\t\t}\n\t}\n\tif(@empty($images))return;\n\n\tif($externalImageFunction){\n\t\t//Added 2008-10-31 - this allows an external function to process, it must globalize $get_image - with nodes of name (case-sensitive), width, and height. The source returned must be the actual path to the image plus name\n\t\treturn $externalImageFunction($names, $images, $options);\n\t}\t\n\t\n\tif(!($normalize===false))$normalize=(is_bool($normalize) ? '/[^-a-zA-Z0-9]/' : $normalize);\n\tif($normalize)$name=preg_replace($normalize,'',strtolower($name));\n\n\t\n\t//don't forget about this\n\t$appendage; //normally (_(.+))*\n\tif(!$appendageIndex)$appendageIndex=2;\n\t\n\tforeach($precedence as $ext){\n\t\t//handle special characters\n\t\t$str=str_replace('+','\\+',$name);\n\t\t$str=str_replace('.','\\.',$str);\n\t\t\n\t\t$nameRegex='/^'.$str.$appendage.'\\.'.$ext.'$/i';\n\t\tforeach($images as $n=>$v){\n\t\t\tif($debug)prn(\"nameRegex=$nameRegex\\ntargetReplace=$targetReplace\\nresult=\".preg_replace('/'.$targetReplace.'/','',$n));\n\t\t\tif(!preg_match($nameRegex,preg_replace('/'.$targetReplace.'/','',$n),$m))continue;\n\t\t\tif($debug)error_alert('match');\n\t\t\t//note what we use for the key - we switch to case-sensitive\n\t\t\t$get_image[$v['name']]=$v;\n\t\t\t$get_image[$v['name']]['length']=strlen($v['name']);\n\t\t\tif(strlen($m[$appendageIndex]))$get_image[$v['name']]['description']=$m[$appendageIndex];\n\t\t}\n\t}\n\tif($debug)error_alert(look);\n\tif(count($get_image)){\n\t\tif(!function_exists('subkey_sort'))require($FUNCTION_ROOT.'/function_array_subkey_sort_v300.php');\n\t\t$get_image=subkey_sort($get_image,'length');\n\t\t//return methods here\n\t\tif($return=='multi'){\n\t\t\treturn $get_image;\n\t\t}else if($return=='string'){\n\t\t\t$get_imagex['params']=current($get_image);\n\t\t\t$a=current($get_image);\n\t\t\treturn $a['name'];\n\t\t}else if($return=='array'){\n\t\t\treturn current($get_image);\n\t\t}else exit('improper return method for get_image v2.30');\n\t}\n\t\n\t//2013-05-01: call function recursively with next names present\n\tif(count($names))return get_image($names, $images, $options);\n}", "protected function drawImage():void{\n\t\tfor($y = 0; $y < $this->moduleCount; $y++){\n\t\t\tfor($x = 0; $x < $this->moduleCount; $x++){\n\t\t\t\t$this->setPixel($x, $y);\n\t\t\t}\n\t\t}\n\t}", "public function apply(){\n $base = $this->getBackground('base', $this->getParameter('base-color'));\n if(!$base) return;\n \n $x = $this->getFuncard()->xc($this->getParameter('base-x'));\n $y = $this->getFuncard()->yc($this->getParameter('base-y'));\n \n $this->getFuncard()->getCanvas()->compositeImage(\n $base, Imagick::COMPOSITE_OVER, $x, $y\n );\n \n // Etape 2 : le liseré !\n $edging = $this->getBackground('edging', $this->getParameter('edging-color'));\n if($edging){\n $x = $this->getFuncard()->xc($this->getParameter('edging-x'));\n $y = $this->getFuncard()->yc($this->getParameter('edging-y'));\n \n $this->getFuncard()->getCanvas()->compositeImage(\n $edging, Imagick::COMPOSITE_OVER, $x, $y\n );\n \n }\n \n // Etape 3 : Les box !\n $titlebox = $this->getBackground('titlebox', $this->getParameter('box-color'));\n if($titlebox){\n $x = $this->getFuncard()->xc($this->getParameter('titlebox-x'));\n $y = $this->getFuncard()->yc($this->getParameter('titlebox-y'));\n \n $this->getFuncard()->getCanvas()->compositeImage(\n $titlebox, Imagick::COMPOSITE_OVER, $x, $y\n );\n \n }\n \n $typebox = $this->getBackground('typebox', $this->getParameter('box-color'));\n if($typebox){\n \n $x = $this->getFuncard()->xc($this->getParameter('typebox-x'));\n $y = $this->getFuncard()->yc($this->getParameter('typebox-y'));\n \n $this->getFuncard()->getCanvas()->compositeImage(\n $typebox, Imagick::COMPOSITE_OVER, $x, $y\n );\n \n }\n \n // Dernière étape : il faut calculer la couleur la febox\n \n $ret = '';\n if($titlebox) $ret = substr($this->getParameter('box-color'), -1, 1);\n elseif($edging) $ret = substr($this->getParameter('edging-color'), -1, 1);\n else $ret = substr($this->getParameter('base-color'), -1, 1);\n \n $ret = [\n 'fe' => ['color' => $ret]\n ];\n \n // Re-dernière étape, il faut calculer la couleur de l'illustrateur\n \n $base_letter = $this->getParameter('base-color')[0];\n if($base_letter == 'b' || $base_letter == 'l'){\n $ret['illus'] = [\n 'color' => 'white',\n 'altcolor' => 'black'\n ];\n $ret['copyright'] = [\n 'color' => 'white',\n ];\n }\n \n return $ret;\n \n }", "public function applyWaterMark($sourceFileName, $waterMarkFileName, $horizontalPosition, $verticalPosition, $horizontalMargin, $verticalMargin, $opacity, $shrinkToFit, $stretchToFit) \n {\n $sourceImage = $this->loadImage($sourceFileName);\n \n if ($sourceImage) {\n $waterMarkImage = $this->loadImage($waterMarkFileName);\n\n if ($waterMarkImage) {\n //get image properties\n $sourceWidth = imagesx($sourceImage);\n $sourceHeight = imagesy($sourceImage);\n $waterMarkWidth = imagesx($waterMarkImage);\n $waterMarkHeight = imagesy($waterMarkImage);\n\n if (($shrinkToFit && ($waterMarkWidth > $sourceWidth || $waterMarkHeight > $sourceHeight)) || \n (($stretchToFit && $waterMarkWidth < $sourceWidth && $waterMarkHeight < $sourceHeight))) {\n $maxHeight = $sourceHeight;\n\n $maxWidth = $sourceWidth;\n\n if ($horizontalPosition === 'left' || $horizontalPosition === 'right') { \n $maxWidth -= $horizontalMargin;\n }\n\n if ($verticalPosition === 'top' || $verticalPosition === 'bottom') { \n $maxHeight -= $verticalMargin;\n }\n\n if ($maxWidth > 0 && $maxHeight > 0) {\n $waterMarkImageTemp = $waterMarkImage;\n \n $waterMarkImage = null;\n \n $this->resizeVirtualImage($waterMarkImageTemp, $waterMarkImage, $maxHeight, $maxWidth, false, null);\n \n $waterMarkWidth = imagesx($waterMarkImage);\n \n $waterMarkHeight = imagesy($waterMarkImage);\n \n imagedestroy($waterMarkImageTemp);\n }\n }\n\n //calculate stamp position\n $destX = 0;\n if ($horizontalPosition === 'left') {\n $destX = $horizontalMargin;\n }\n elseif ($horizontalPosition === 'right') {\n $destX = $sourceWidth - $waterMarkWidth - $horizontalMargin;\n }\n else { //center\n $destX = ($sourceWidth - $waterMarkWidth) / 2;\n }\n\n $destY = 0;\n if ($verticalPosition === 'top') {\n $destY = $verticalMargin;\n }\n elseif ($verticalPosition === 'bottom') {\n $destY = $sourceHeight - $waterMarkHeight - $verticalMargin;\n }\n else { //middle\n $destY = ($sourceHeight - $waterMarkHeight) / 2;\n }\n \n //stamp the watermark\n if ($opacity === 100) {\n imagecopy($sourceImage, $waterMarkImage, $destX, $destY, 0, 0, $waterMarkWidth, $waterMarkHeight);\n }\n else if ($opacity !== 0) {\n imagecopymerge($sourceImage, $waterMarkImage, $destX, $destY, 0, 0, $waterMarkWidth, $waterMarkHeight, $opacity);\n } \n\n //delete original image\n unlink($sourceFileName);\n\n //save the resulted image\n $this->saveImage($sourceImage, $sourceFileName);\n\n //free memory resource\n imagedestroy($waterMarkImage);\n }\n\n //free memory resource\n imagedestroy($sourceImage);\n }\n }", "public function makeMapSheetAction() {\n\t\t$sourceSize = 16;\n\t\t$destinationSize = 32;\n\t\t\n\t\t$images = array();\n\t\t\n\t\t$dir = $_SERVER['DOCUMENT_ROOT'] . '/modules/wes/img/sprites/maps/jidoor-tiles';\n\t\t$writeDir = $_SERVER['DOCUMENT_ROOT'] . '/modules/wes/img/sprites/maps';\n\t\tif ($handle = opendir($dir)) {\n\t\t\twhile (false !== ($file = readdir($handle))) {\n\t\t\t\tif ($file != \".\" && $file != \"..\") {\n\t\t\t\t\t$images[] = $dir . '/' . $file;\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir($handle);\n\t\t}\n\t\t\n\t\t$numTiles = count($images);\n\t\t$tileSheet = imagecreatetruecolor($numTiles * $destinationSize, $destinationSize);\n\t\t\n\t\tfor ($i = 0; $i < $numTiles; $i++) {\n\t\t\t$tile = imagecreatefrompng($images[$i]);\n\t\t\t$x = $i * $destinationSize;\n\t\t\t$y = 0;\n\t\t\timagecopyresized($tileSheet, $tile, $x, $y, 0, 0, $destinationSize, $destinationSize, $sourceSize, $sourceSize);\n\t\t\timagedestroy($tile);\n\t\t}\n\t\t\n\t\timagepng($tileSheet, $writeDir . '/sheet.png');\n\t\timagedestroy($tileSheet);\n\t\t\n\t\tshow_array($images);\n\t\tdie();\n\t}", "function addImage($path,$title,$description,$thumb,$lightbox,$uniqueID,$limitImages=0) {\n\t // count of images\n\t if ($limitImages > 1 || $limitImages==0) {\n $this->config['count']++;\n\t }\n // just add the wraps if there is a text for it\n $title = (!$title) ? '' : \"<h3>$title</h3>\";\n $description = (!$description) ? '' : \"<p>$description</p>\";\n \n // generate images\n if ($this->config['watermark']) {\n $imgTSConfigBig = $this->conf['big2.'];\n $imgTSConfigBig['file.']['10.']['file'] = $path;\n $imgTSConfigLightbox = $this->conf['lightbox2.'];\n $imgTSConfigLightbox['file.']['10.']['file'] = $path; \n } else {\n $imgTSConfigBig = $this->conf['big.'];\n $imgTSConfigBig['file'] = $path;\n $imgTSConfigLightbox = $this->conf['lightbox.'];\n $imgTSConfigLightbox['file'] = $path; \n } \n $bigImage = $this->cObj->IMG_RESOURCE($imgTSConfigBig);\n\n $lightbox = ($lightbox=='#' || $lightbox=='' || $this->config['showLightbox']!=1) ? 'javascript:void(0)' : $this->cObj->IMG_RESOURCE($imgTSConfigLightbox);\n \t$lightBoxImage='<a href=\"'.$lightbox.'\" title=\"'.$this->pi_getLL('textOpenImage').'\" class=\"open\"></a>';\n\n if ($thumb) {\n $imgTSConfigThumb = $this->conf['thumb.'];\n $imgTSConfigThumb['file'] = $path; \n $thumbImage = '<img src=\"'.$this->cObj->IMG_RESOURCE($imgTSConfigThumb).'\" class=\"thumbnail\" />';\n }\n\n\t // if just 1 image should be returned\n if ($limitImages==1) {\n \treturn '<img src=\"'.$bigImage.'\" class=\"full\" />';\n }\n\n // build the image element \n $singleImage .= '\n <div class=\"imageElement\">'.$title.$description.\n $lightBoxImage.'\n <img src=\"'.$bigImage.'\" class=\"full\" />\n '.$thumbImage.'\n </div>';\n\n\t\t// Adds hook for processing the image\n\t\t$config['path'] = $path;\n $config['title'] = $title;\n\t\t$config['description'] = $description;\n\t\t$config['uniqueID'] = $uniqueID;\n\t\t$config['thumb'] = $thumb;\n\t\t$config['large'] = $large;\n\t\t$config['lightbox'] = $lightbox;\n\t\t$config['limitImages'] = $limitImages;\n\t\t$config['lightBoxCode'] = $lightBoxImage;\n\t\tif (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rgsmoothgallery']['extraImageHook'])) {\n\t\t\tforeach($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rgsmoothgallery']['extraImageHook'] as $_classRef) {\n\t\t\t\t$_procObj = & t3lib_div::getUserObj($_classRef);\n\t\t\t\t$singleImage = $_procObj->extraImageProcessor($singleImage,$config, $this);\n\t\t\t}\n\t\t} \n \n return $singleImage;\n }", "public function generateImage($outputFileName, $themeId = 0, $useInAssetsFolderToo = false, $directionX = true, $outputWidth = true)\n\t{\n\t\t$output = $this->outputFolder . $outputFileName;\n\t\t$bgImage = TL_FILES_URL . str_replace(TL_ROOT . '/', '', $output);\n\n\t\t$neededWidth = 0;\n\t\t$neededHeight = 0;\n\n\t\t// Walk each line and set size of new image\n\t\tforeach ($this->arrFolders as $folder)\n\t\t{\n\t\t\tif (!is_dir($folder))\n\t\t\t{\n\t\t\t\t$this->strStylesheet .= \"/**\\n * Source Folder is not valid!!!\\n */\";\n\t\t\t\t$this->saveCss();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ($handle = opendir($folder))\n\t\t\t{\n\t\t\t\twhile (false !== ($file = readdir($handle)))\n\t\t\t\t{\n\t\t\t\t\tif ($file == '.' || $file == '..' || is_dir($folder . $file))\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\t$size = getimagesize($folder . $file);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Exception $ex)\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif ($directionX)\n\t\t\t\t\t{\n\t\t\t\t\t\t$neededWidth += $size[0];\n\t\t\t\t\t\tif ($size[1] > $neededHeight)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$neededHeight = $size[1];\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$neededHeight += $size[1];\n\t\t\t\t\t\tif ($size[0] > $neededWidth)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$neededWidth = $size[0];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tclosedir($handle);\n\t\t\t}\n\t\t}\n\n\t\tif ($neededWidth <= 0)\n\t\t{\n\t\t\t$this->strStylesheet .= \"/**\\n * Error while reading images, or no image found in directory!!!\\n */\";\n\t\t\t$this->saveCss();\n\t\t\treturn;\n\t\t}\n\n\t\t// Create image\n\t\t$image = imagecreatetruecolor($neededWidth, $neededHeight);\n\n\t\timagesavealpha($image, true);\n\n\t\t$white = imagecolorallocate($image, 255, 255, 255);\n\t\t$grey = imagecolorallocate($image, 128, 128, 128);\n\t\t$black = imagecolorallocate($image, 0, 0, 0);\n\n\t\timagefilledrectangle($image, 0, 0, 150, 25, $black);\n\t\t$trans_colour = imagecolorallocatealpha($image, 0, 0, 0, 127);\n\t\timagefill($image, 0, 0, $trans_colour);\n\n\t\t$this->strStylesheet .= '/* CSS sprite generator, generated ' . date('Y-m-d H:i') . \" */\\n\";\n\n\t\t$currentX = 0;\n\t\t$currentY = 0;\n\n\t\t// Walk each line and create image as well as css chunks\n\t\tforeach ($this->arrFolders as $folder)\n\t\t{\n\t\t\tif ($handle = opendir($folder))\n\t\t\t{\n\t\t\t\tfor ($i = 0; false !== ($file = readdir($handle)); $i++)\n\t\t\t\t{\n\t\t\t\t\t$filePath = $folder . $file;\n\n\t\t\t\t\tif ($file == '.' || $file == '..' || is_dir($filePath))\n\t\t\t\t\t{\n\t\t\t\t\t\t$i--;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif (strtoupper(substr($filePath, -3)) == 'PNG')\n\t\t\t\t\t{\n\t\t\t\t\t\t$source = imagecreatefrompng($filePath);\n\t\t\t\t\t}\n\t\t\t\t\telseif (strtoupper(substr($filePath, -3)) == 'JPG')\n\t\t\t\t\t{\n\t\t\t\t\t\t$source = imagecreatefromjpeg($filePath);\n\t\t\t\t\t}\n\t\t\t\t\telseif (strtoupper(substr($filePath, -3)) == 'GIF')\n\t\t\t\t\t{\n\t\t\t\t\t\t$source = imagecreatefromgif($filePath);\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$i--;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t$size = getimagesize($filePath);\n\n\t\t\t\t\t// Import CSS selecotrs or write new\n\t\t\t\t\tif ($this->databaseBlob[$i] !== null)\n\t\t\t\t\t{\n\t\t\t\t\t\t$cssSelector = utf8_decode_entities($this->databaseBlob[$i][$this->blobSelectorIndex]);\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$cssSelector = '.' . str_replace(array('.', ' '), array('_', '_'), substr($file, 0, -4));\n\t\t\t\t\t\t$databaseBlob[$i][$this->blobSelectorIndex] = $cssSelector;\n\t\t\t\t\t}\n\n\t\t\t\t\t//imageAlphaBlending($source, false);\n\t\t\t\t\t//imageSaveAlpha($source, true);\n\n\t\t\t\t\t//imagecopymerge($image, $source, $currentX, 0, 0,0, $size[0], $size[1], 100);\n\t\t\t\t\timagecopy($image, $source, $currentX, $currentY, 0, 0, $size[0], $size[1]);\n\n\t\t\t\t\t// Write CSS\n\t\t\t\t\tif ($outputWidth)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->strStylesheet .= $cssSelector . \"\\n{\\n\\tbackground: url(\" . $bgImage . \") no-repeat;\\n\\tbackground-position: -\" . $currentX . \"px \" . $currentY . \"px;\\n\\twidth: \" . $size[0] . \"px;\\n\\theight: \" . $size[1] . \"px;\\n}\\n\";\n\t\t\t\t\t\t$databaseBlob[$i][$this->blobSelectorIndex] = $cssSelector;\n\t\t\t\t\t\t$databaseBlob[$i][$this->blobImageIndex] = str_replace(TL_ROOT . '/', '', $filePath);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->strStylesheet .= $cssSelector . \"\\n{\\n\\tbackground: url(\" . $bgImage . \") no-repeat;\\n\\tbackground-position: -\" . $currentX . \"px -\" . $currentY . \"px;\\n}\\n\";\n\t\t\t\t\t\t$databaseBlob[$i][$this->blobSelectorIndex] = $cssSelector;\n\t\t\t\t\t\t$databaseBlob[$i][$this->blobImageIndex] = str_replace(TL_ROOT . '/', '', $filePath);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Update current background position\n\t\t\t\t\tif ($directionX)\n\t\t\t\t\t{\n\t\t\t\t\t\t$currentX += $size[0];\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$currentY += $size[1];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tclosedir($handle);\n\t\t\t}\n\t\t}\n\t\timagepng($image, $output);\n\t\timagedestroy($image);\n\n\t\tif ($this->updateDatabase && $themeId > 0)\n\t\t{\n\t\t\t$this->updateDatabaseBlob($themeId, $databaseBlob);\n\t\t}\n\n\t\t$this->saveCss();\n\n\t\tif ($useInAssetsFolderToo)\n\t\t{\n\t\t\t$this->strStylesheet = str_replace(array('files/', \"\\n\\t\", \"\\n\", ': ', ' */'), array('../../files/', '', '', ':', \" */\\n\"), $this->strStylesheet);\n\t\t\t$this->cssFilename = str_replace('.css', '.assets.css', $this->cssFilename);\n\t\t\t$this->saveCss();\n\t\t}\n\t}", "public function addPlashka($plashkaFile, $position, $backColor4plashka = null, $encode = true)\n {\n\n $this->initFrames();\n\n\n $currentIM = imagecreatefromgif($this->parsedfiles[0]);\n $currImgHeight = imagesy($currentIM);\n $currImgWidth = imagesx($currentIM);\n $plashkaIm = ImageHelpers::createIM($plashkaFile);\n\n $plashkaHeight = imagesy($plashkaIm);\n $plashkaWidth = imagesx($plashkaIm);\n $sprite = imagecreatetruecolor($currImgWidth, $currImgHeight + $plashkaHeight);\n imagealphablending($sprite, false);\n imagesavealpha($sprite, true);\n imagepalettecopy($sprite, $currentIM);\n imagefill($sprite, 0, 0, imagecolortransparent($currentIM));\n imagecolortransparent($sprite, imagecolortransparent($currentIM));\n\n imagecopy($sprite, $currentIM, 0, 0, 0, 0, $currImgWidth, $currImgHeight + $plashkaHeight);\n\n if ($position === ImageProcessor::PLASHKA_POSITION_BOTTOM || $position === ImageProcessor::PLASHKA_POSITION_TOP) {\n $this->currImgHeight += $plashkaHeight;\n }\n\n\n if ($backColor4plashka && $plashkaWidth < $currImgWidth) {\n if (strlen($backColor4plashka) !== 6) {\n throw new ImageException('incorrect backColor: '.$backColor4plashka);\n }\n $colorR = hexdec(substr($backColor4plashka, 0, 2));\n $colorG = hexdec(substr($backColor4plashka, 2, 2));\n $colorB = hexdec(substr($backColor4plashka, 4, 2));\n $plashkaColor = imagecolorallocate($sprite, $colorR, $colorG, $colorB);\n imagefilledrectangle($sprite, 0, $currImgHeight, $currImgWidth, $currImgHeight + $plashkaHeight, $plashkaColor);\n }\n imagecopy($sprite, $plashkaIm, 0, $currImgHeight, 0, 0, $plashkaWidth, $plashkaHeight);\n\n\n imagegif($sprite, $this->parsedfiles[0]);\n\n imagedestroy($sprite);\n imagedestroy($currentIM);\n\n\n if (!$encode) {\n return;\n }\n\n $this->encode();\n if ($this->clearFrames) {\n $this->clearframes();\n }\n\n }", "function createImage($type,$img_name){\n if (!$type){\n $type = $this->get_type($img_name);\n }\n\t\t \n switch ($type){\n case 'gif':\n if (function_exists('imagecreatefromgif'))\n $tmp_img=@imagecreatefromgif($img_name);\n break;\n case 'jpg':\n $tmp_img=imagecreatefromjpeg($img_name);\n break;\n case 'png':\n $tmp_img=imagecreatefrompng($img_name);\n break;\n\t\t\t\t case 'jpeg':\n $tmp_img=imagecreatefromjpeg($img_name);\n break;\n default:\n $tmp_img=imagecreatefromstring($img_name);\n break;\n }\n return $tmp_img;\n}", "function createImage($type,$img_name){\n if (!$type){\n $type = $this->get_type($img_name);\n }\n\t\t \n switch ($type){\n case 'gif':\n if (function_exists('imagecreatefromgif'))\n $tmp_img=@imagecreatefromgif($img_name);\n break;\n case 'jpg':\n $tmp_img=imagecreatefromjpeg($img_name);\n break;\n case 'png':\n $tmp_img=imagecreatefrompng($img_name);\n break;\n\t\t\t\t case 'jpeg':\n $tmp_img=imagecreatefromjpeg($img_name);\n break;\n default:\n $tmp_img=imagecreatefromstring($img_name);\n break;\n }\n return $tmp_img;\n}", "protected function calculateSpritePositions() {}", "public function hover_image_index($page_id)\n\t{\n\t\t$data['website_folder_name'] = $this->admin_header->website_folder_name();\n\t\t$data['httpUrl'] = $this->admin_header->host_url();\n\t\t$data['ImageUrl'] = $this->admin_header->image_url();\n\t\t$data['page_id'] = $page_id;\n\t\t$data['website_id'] = $this->admin_header->website_id();\n\t\t\n\t\t// Get Hover Image details from settings\n\t\t$data['hover_image_customize_data'] = $this->Hover_image_model->get_hover_image_setting_details($data['website_id'] ,$page_id,'hover_image_customize');\n\t\t\n\t\t// Hover Image Customize details from settings\n\t\tif (!empty($data['hover_image_customize_data']))\n\t\t{\n\t\t\t$keys = json_decode($data['hover_image_customize_data'][0]->key);\n\t\t\t$values = json_decode($data['hover_image_customize_data'][0]->value);\n\t\t\t$i = 0;\n\t\t\tforeach($keys as $key)\n\t\t\t{\n\t\t\t\t$data[$key] = $values[$i];\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['hover_image_row_count'] = '';\n\t\t}\n\t\t\n\t\t// All Hover Image in a table\n\t\t$data['table'] = $this->get_table($page_id);\n\t\t\n\t\t$data['heading'] = 'Hover Image';\n\t\t$data['title'] = \"Hover Image | Administrator\";\n\t\t$this->load->view('template/meta_head', $data);\n\t\t$this->load->view('hover_image_header');\n\t\t$this->admin_header->index();\n\t\t$this->load->view('view', $data);\n\t\t$this->load->view('template/footer_content');\n\t\t$this->load->view('script');\n\t\t$this->load->view('template/footer');\n\t}", "protected function makeThumbnails()\n {\n $sizes = [\n 'image_211' => [\n 'width' => 211,\n 'mode' => ImageInterface::THUMBNAIL_OUTBOUND,\n ],\n ];\n $data = $this->image;\n if (!$data) {\n return;\n }\n\n if (is_string($data)) {\n $tempFile = tempnam('/tmp', 'temp_');\n file_put_contents($tempFile, $data);\n $data = fopen($tempFile, 'r+');\n }\n\n if (stream_get_contents($data) == '') {\n return;\n }\n\n fseek($data, 0);\n $sourceImage = @ImagineImage::getImagine()->read($data);\n foreach ($sizes as $sizeName => $size) {\n $thumbnailAttributeName = $sizeName;\n if (!empty($size['width'])) {\n $width = $size['width'];\n if ($width < 0) {\n $originalWidgth = $sourceImage->getSize()->getWidth();\n if (-$originalWidgth < $width * 4) {\n $width = $sourceImage->getSize()->getWidth() + $width;\n } else {\n $width = $originalWidgth;\n }\n }\n } else {\n $width = null;\n }\n\n if (!empty($size['height'])) {\n $height = $size['height'];\n if ($height < 0) {\n $originalHeight = $sourceImage->getSize()->getHeight();\n if (-$originalHeight < $height * 4) {\n $height = $sourceImage->getSize()->getHeight() + $height;\n } else {\n $height = $originalHeight;\n }\n }\n } else {\n $height = null;\n }\n\n if (!empty($size['mode'])) {\n $mode = $size['mode'];\n } else {\n $mode = ImageInterface::THUMBNAIL_INSET;\n }\n\n BaseImage::$thumbnailBackgroundAlpha = 0;\n $image = ImagineImage::thumbnail($sourceImage, $width, $height, $mode);\n\n if (!empty($size['watermark'])) {\n $watermark = fopen($size['watermark'], 'r+');\n $watermark = ImagineImage::thumbnail($watermark, $image->getSize()->getWidth(), $image->getSize()->getHeight(), ManipulatorInterface::THUMBNAIL_OUTBOUND);\n $watermark = ImagineImage::crop($watermark, $image->getSize()->getWidth(), $image->getSize()->getHeight());\n\n $image = ImagineImage::watermark($image, $watermark);\n }\n\n $fileName = tempnam(sys_get_temp_dir(), 'test');\n $image->save($fileName, [\n 'format' => $this->image_extension,\n ]);\n\n $thumbData = fopen($fileName, 'r+');\n $this->$thumbnailAttributeName = $thumbData;\n }\n\n fseek($data, 0);\n }", "private function drawImage($image, $items, $x_origin, $y_origin, $size) {\n if (empty($items)) {\n return $image;\n }\n\n // Leafs -- stitch together photos\n if (!is_array(current($items))) {\n $uris = [];\n foreach ($items as $item) {\n $media = $this->insta->getMedia($item);\n $source_images[] = imagecreatefromjpeg($media->data->images->standard_resolution->url);\n }\n\n $n = count($source_images);\n\n /* 1 image - cover the entire square\n *\n * + - - - +\n * | |\n * | A |\n * | |\n * + - - - +\n */\n if ($n == 1) {\n // Image A\n imagecopyresampled(\n $image, $source_images[0], // destination, source images\n $x_origin, $y_origin, // x & y destination\n 0, 0, // x & y source\n $size, $size, // width & height destination\n 640, 640 // width & height source\n );\n }\n\n /* 2 images - place vertical middle portions next to each other\n *\n * + - + - +\n * | | |\n * | A | B |\n * | | |\n * + - + - +\n */\n elseif ($n == 2) {\n // Image A\n imagecopyresampled(\n $image, $source_images[0], // destination, source images\n $x_origin, $y_origin, // x & y destination\n 160, 0, // x & y source\n $size / 2, $size, // width & height destination\n 320, 640 // width & height source\n );\n\n // Image B\n imagecopyresampled(\n $image, $source_images[1], // destination, source images\n $x_origin + ($size / 2), $y_origin, // x & y destination\n 160, 0, // x & y source\n $size / 2, $size, // width & height destination\n 320, 640 // width & height source\n );\n }\n\n /* 3 images - place 1st vertical, 2nd two in right half stacked on top of one another\n *\n * + - + - +\n * | | B |\n * | A + - +\n * | | C |\n * + - + - +\n */\n elseif ($n == 3) {\n // Image A\n imagecopyresampled(\n $image, $source_images[0], // destination, source images\n $x_origin, $y_origin, // x & y destination\n 160, 0, // x & y source\n $size / 2, $size, // width & height destination\n 320, 640 // width & height source\n );\n\n // Image B\n imagecopyresampled(\n $image, $source_images[1], // destination, source images\n $x_origin + ($size / 2), $y_origin, // x & y destination\n 0, 0, // x & y source\n $size / 2, $size / 2, // width & height destination\n 640, 640 // width & height source\n );\n\n // Image C\n imagecopyresampled(\n $image, $source_images[2], // destination, source images\n $x_origin + ($size / 2), $y_origin + ($size / 2), // x & y destination\n 0, 0, // x & y source\n $size / 2, $size / 2, // width & height destination\n 640, 640 // width & height source\n );\n }\n\n /* 4 images - place in a 2x2 grid\n *\n * + - + - +\n * | A | B |\n * | - + - +\n * | C | D |\n * + - + - +\n */\n elseif ($n == 4) {\n $this->drawImage($image, [$items[0]], $x_origin + $size / 2, $y_origin, $size / 2);\n $this->drawImage($image, [$items[1]], $x_origin, $y_origin, $size / 2);\n $this->drawImage($image, [$items[2]], $x_origin, $y_origin + $size / 2, $size / 2);\n $this->drawImage($image, [$items[3]], $x_origin + ($size / 2), $y_origin + ($size / 2), $size / 2);\n }\n }\n\n // Branches -- Divide into 4 quadrants and iterate\n else {\n $this->drawImage($image, $items[0], $x_origin + $size / 2, $y_origin, $size / 2);\n $this->drawImage($image, $items[1], $x_origin, $y_origin, $size / 2);\n $this->drawImage($image, $items[2], $x_origin, $y_origin + $size / 2, $size / 2);\n $this->drawImage($image, $items[3], $x_origin + ($size / 2), $y_origin + ($size / 2), $size / 2);\n }\n\n return $image;\n }", "protected function addImageSizeConfigs()\n {\n // TODO: add image size configs\n }", "private function create() {\n\n\t\t// Use cached version if we have one\n\t\tif ($this->cache && file_exists($this->fileName)) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there is only one color, just create an image\n\t\tif (count($this->colors) == 1) {\n\t\t\t$command = sprintf(\"%s -size %dx%d xc:%s %s\", \n\t\t\t\t$this->convert, \n\t\t\t\t$this->width, \n\t\t\t\t$this->height, \n\t\t\t\t$this->colors[0], \n\t\t\t\t$this->fileName\n\t\t\t);\n\t\t}\n\t\t// If there is more than one color, compute sizes and locations of additional color boxes\n\t\telse {\n\t\t\t$command = sprintf(\"%s -size %dx%d xc:%s \",\n\t\t\t\t$this->convert,\n\t\t\t\t$this->width,\n\t\t\t\t$this->height,\n\t\t\t\t$this->colors[0]\n\t\t\t);\n\t\t\t$counter = 0;\n\t\t\t$marginX = $this->width / 20;\n\t\t\t$marginY = $this->height / 20;\n\t\t\t$positionX = $marginX;\n\n\t\t\tforeach ($this->colors as $color) {\n\t\t\t\tif ($counter == 0) {\n\t\t\t\t\t$counter++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Progressively smaller size for each box\n\t\t\t\t$width = (int) (($this->width / 3 / $counter) + ($this->width * 0.07));\n\t\t\t\t$height = (int) (($this->height / 3 / $counter) + ($this->width * 0.07));\n\n\t\t\t\t$command .= ' -draw \"';\n\t\t\t\t$command .= 'stroke ' . $color;\n\t\t\t\t$command .= ' fill ' . $color;\n\t\t\t\t$command .= ' rectangle ';\n\t\t\t\t$command .= $positionX . ',' . ($this->height - $height - $marginY); // starting coordinates\n\t\t\t\t$command .= ' ';\n\t\t\t\t$command .=\t($positionX + $width) . ',' . ($this->height - $marginY); // ending coordinates\n\t\t\t\t$command .=\t'\"';\n\n\t\t\t\t$counter++;\n\t\t\t\t$positionX += $marginX + $width;\n\t\t\t}\n\t\t\t$command .= ' ' . $this->fileName;\n\t\t}\n\t\texec($command);\n\t}", "public function makeImage()\n {\n $x_width = 200;\n $y_width = 125;\n\n $this->image = imagecreatetruecolor(200, 125);\n\n $this->white = imagecolorallocate($this->image, 255, 255, 255);\n $this->black = imagecolorallocate($this->image, 0, 0, 0);\n $this->red = imagecolorallocate($this->image, 255, 0, 0);\n $this->green = imagecolorallocate($this->image, 0, 255, 0);\n $this->grey = imagecolorallocate($this->image, 128, 128, 128);\n\n $this->red = imagecolorallocate($this->image, 231, 0, 0);\n\n $this->yellow = imagecolorallocate($this->image, 255, 239, 0);\n $this->green = imagecolorallocate($this->image, 0, 129, 31);\n\n $this->color_palette = [$this->red, $this->yellow, $this->green];\n\n imagefilledrectangle($this->image, 0, 0, 200, 125, $this->white);\n\n $border = 25;\n\n $lines = [\"e\", \"g\", \"b\", \"d\", \"f\"];\n $i = 0;\n foreach ($lines as $key => $line) {\n $x1 = 0;\n $x2 = $x_width;\n $y1 = $i * 15 + 25;\n $y2 = $y1;\n imageline(\n $this->image,\n $x1 + $border,\n $y1,\n $x2 - $border,\n $y2,\n $this->black\n );\n $i = $i + 1;\n }\n\n imageline(\n $this->image,\n 0 + $border,\n 25,\n 0 + $border,\n 4 * 15 + 25,\n $this->black\n );\n imageline(\n $this->image,\n 200 - $border,\n 25,\n 200 - $border,\n 4 * 15 + 25,\n $this->black\n );\n\n $textcolor = $this->black;\n\n $font = $this->default_font;\n\n $size = 10;\n $angle = 0;\n\n if (!isset($this->bar_count) or $this->bar_count == \"X\") {\n $this->bar_count = 0;\n }\n $count_notation = $this->bar_count + 1;\n\n if (file_exists($font)) {\n if (\n $count_notation != 1 or\n $count_notation == $this->max_bar_count\n ) {\n imagettftext(\n $this->image,\n $size,\n $angle,\n 0 + 10,\n 110,\n $this->black,\n $font,\n $count_notation\n );\n }\n\n if (\n $count_notation + 1 != 1 or\n $count_notation + 1 == $this->max_bar_count + 1\n ) {\n imagettftext(\n $this->image,\n $size,\n $angle,\n 200 - 25,\n 110,\n $this->black,\n $font,\n $count_notation + 1\n );\n }\n }\n }", "public function drawFromPicture($PicType, $FileName, $X, $Y)\n {\n $X = (int) $X;\n $Y = (int) $Y;\n\n if (file_exists($FileName)) {\n list($Width, $Height) = $this->getPicInfo($FileName);\n\n if ($PicType == 1) {\n $Raster = imagecreatefrompng($FileName);\n } elseif ($PicType == 2) {\n $Raster = imagecreatefromgif($FileName);\n } elseif ($PicType == 3) {\n $Raster = imagecreatefromjpeg($FileName);\n } else {\n return 0;\n }\n\n $RestoreShadow = $this->Shadow;\n if ($this->Shadow && $this->ShadowX != 0 && $this->ShadowY != 0) {\n $this->Shadow = false;\n if ($PicType == 3) {\n $this->drawFilledRectangle(\n $X + $this->ShadowX,\n $Y + $this->ShadowY,\n $X + $Width + $this->ShadowX,\n $Y + $Height + $this->ShadowY,\n [\n \"R\" => $this->ShadowR,\n \"G\" => $this->ShadowG,\n \"B\" => $this->ShadowB,\n \"Alpha\" => $this->Shadowa\n ]\n );\n } else {\n $TranparentID = imagecolortransparent($Raster);\n for ($Xc = 0; $Xc <= $Width - 1; $Xc++) {\n for ($Yc = 0; $Yc <= $Height - 1; $Yc++) {\n $RGBa = imagecolorat($Raster, $Xc, $Yc);\n $Values = imagecolorsforindex($Raster, $RGBa);\n if ($Values[\"alpha\"] < 120) {\n $AlphaFactor = floor(\n ($this->Shadowa / 100) * ((100 / 127) * (127 - $Values[\"alpha\"]))\n );\n $this->drawAlphaPixel(\n $X + $Xc + $this->ShadowX,\n $Y + $Yc + $this->ShadowY,\n $AlphaFactor,\n $this->ShadowR,\n $this->ShadowG,\n $this->ShadowB\n );\n }\n }\n }\n }\n }\n $this->Shadow = $RestoreShadow;\n\n imagecopy($this->Picture, $Raster, $X, $Y, 0, 0, $Width, $Height);\n imagedestroy($Raster);\n }\n }", "abstract public function process($image, $actions, $dir, $file);", "function oniros_image_support(){\n\t// add as many as the project might require\n\t// smaller images do not get resized, but largeones will get cropped.\n\n\t// name width height crop?\n\tadd_image_size( 'image_size_name', 400, 400, true);\n}", "public function createImage()\n {\n // set up base image, and colors to be used in the image (black not used for this page, but left for reference later)\n $im = imagecreatetruecolor($this->_options['width'] * self::OVERSAMPLE_FACTOR, $this->_options['height'] * self::OVERSAMPLE_FACTOR);\n \n $brandColor = new Ncstate_Brand_Color();\n \n // Get the background color on brand\n $backgroundColorRgb = $brandColor->getColor($this->_options['backgroundColor'], true);\n if (is_null($backgroundColorRgb)) {\n require_once 'Ncstate/Brand/Exception.php';\n throw new Ncstate_Brand_Exception('Proper branding color not found for backgroundColor');\n }\n $backgroundColor = imagecolorallocate($im, $backgroundColorRgb['red'], $backgroundColorRgb['green'], $backgroundColorRgb['blue']);\n \n \n // get the font color on brand\n $fontColorRgb = $brandColor->getColor($this->_options['fontColor'], true);\n if (is_null($fontColorRgb)) {\n require_once 'Ncstate/Brand/Exception.php';\n throw new Ncstate_Brand_Exception('Propoer branding color not found for fontColor');\n }\n $fontColor = imagecolorallocate($im, $fontColorRgb['red'], $fontColorRgb['green'], $fontColorRgb['blue']);\n \n \n // Set the background to be red (the base color of the header region where this will be placed)\n imagefilledrectangle($im, 0, 0, $this->_options['width'] * self::OVERSAMPLE_FACTOR, $this->_options['height'] * self::OVERSAMPLE_FACTOR, $backgroundColor);\n \n // Path to our font files\n $normalFont = $this->_options['pathToFonts'] . '/' . $this->_options['normalFont'];\n $boldFont = $this->_options['pathToFonts'] . '/' . $this->_options['boldFont'];\n\n // Calculate a line height for multi-line images\n $oneLine = imagettfbbox($this->_options['fontSize'] * self::OVERSAMPLE_FACTOR, 0, $normalFont, 'A');\n $oneLineHeight = $oneLine[1] - $oneLine[7];\n \n $posX = $this->_options['leftTextOffset'] * self::OVERSAMPLE_FACTOR;\n $posY = ($this->_options['height'] * self::OVERSAMPLE_FACTOR) - ($this->_options['baselineTextOffset'] * self::OVERSAMPLE_FACTOR);\n \n $lines = array();\n \n // Parse the string by newline chars\n $parsed = explode(\"\\n\", $this->getText());\n foreach ($parsed as $p) {\n if ($p == '') {\n continue;\n }\n \n // split up bold parts versus non-bold parts\n $parts = preg_split('/(\\*[^*]*\\*)|(\\n)/', $p, -1, PREG_SPLIT_DELIM_CAPTURE); \n\n $lines[] = $parts;\n }\n \n // Reverse the lines so that we write them the correct offset from the baseline\n $lines = array_reverse($lines);\n \n foreach ($lines as $line) { \n foreach ($line as $text) {\n $count = 0;\n $font = $normalFont;\n \n // Only make the font bold if there are two bold markers on the particle of text\n $writable = str_replace('*', '', $text, $count);\n if ($count == 2) {\n $font = $boldFont;\n }\n \n $boundingBox = imagettftext($im, $this->_options['fontSize'] * self::OVERSAMPLE_FACTOR, 0, $posX, $posY, $fontColor, $font, $writable);\n \n $posX = $boundingBox[2];\n }\n \n $posX = $this->_options['leftTextOffset'] * self::OVERSAMPLE_FACTOR;\n $posY -= ($oneLineHeight + ($this->_options['lineSpacing'] * self::OVERSAMPLE_FACTOR)); \n }\n \n // Sample down the image to the original requested size\n $final = imageCreateTrueColor($this->_options['width'], $this->_options['height']);\n\n imageCopyResampled($final, $im, 0, 0, 0, 0, $this->_options['width'], $this->_options['height'], $this->_options['width'] * self::OVERSAMPLE_FACTOR, $this->_options['height'] * self::OVERSAMPLE_FACTOR ); \n \n // Option to make the image transparent\n if ((bool)$this->_options['transparent']) {\n imagecolortransparent($final, $backgroundColor);\n } \n \n return $this->_store($final);\n }", "public function assign(Image $image)\n {\n $this->css .= $image->css();\n $this->rcss .= $image->rcss();\n }", "public function run()\n {\n $imageArray = array(\n 'cover/default.png', 'cover/avengers-infinity-war.jpg', 'cover/coco.jpg',\n 'cover/deadpool-2.jpg', 'cover/fantastic-beasts.jpg', 'cover/oceans-.jpg',\n 'cover/the-greatest-showman.jpg', 'cover/incredibles-2.jpg', 'cover/ant-man-and-the-wasp.jpg'\n );\n foreach($imageArray as $i){\n $image = new Image();\n $image->path = $i;\n $image->save();\n }\n }", "public static function image_style($path, $style_name, $options = array()) {\n $image = array(\n 'path' => $path,\n 'style_name' => $style_name,\n );\n\n return theme('image_style', $image + $options);\n }", "private function createTabImage()\n {\n $filePath = _PS_MODULE_LENGOW_DIR_ . 'views/img/AdminLengow.gif';\n $fileDest = _PS_MODULE_LENGOW_DIR_ . 'AdminLengow.gif';\n if (!file_exists($fileDest) && LengowMain::compareVersion('1.5') == 0) {\n copy($filePath, $fileDest);\n }\n }", "protected function processImage()\n {\n // Start from the last scale (bigger image).\n $tier = (count($this->_scaleInfo) - 1);\n $row = 0;\n $ul_y = 0;\n $lr_y = 0;\n\n list($root, $ext) = $this->getRootAndDotExtension($this->_imageFilename);\n\n // Create a row from the original image and process it.\n while ($row * $this->tileSize < $this->_originalHeight) {\n $ul_y = $row * $this->tileSize;\n $lr_y = ($ul_y + $this->tileSize < $this->_originalHeight)\n ? $ul_y + $this->tileSize\n : $this->_originalHeight;\n $saveFilename = $root . '-' . $tier . '-' . $row . '.' . $ext;\n $width = $this->_originalWidth;\n $height = abs($lr_y - $ul_y);\n $crop = [];\n $crop['width'] = $width;\n $crop['height'] = $height;\n $crop['x'] = 0;\n $crop['y'] = $ul_y;\n $this->imageResizeCrop($this->_imageFilename, $saveFilename, [], $crop);\n\n $this->processRowImage($tier, $row);\n ++$row;\n }\n }", "public static function edit_image()\n{\n\n\n\t/*\n\t* Change Background\n\t*/\n\n\t/*\n\t* Change other setting\n\t*/\n}", "protected function retina() {\n\t\t$this->start_controls_section(\n\t\t\t'section_retina_image',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Retina Image', 'boostify' ),\n\t\t\t)\n\t\t);\n\t\t$this->add_control(\n\t\t\t'retina_image',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Choose Default Image', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::MEDIA,\n\t\t\t\t'dynamic' => array(\n\t\t\t\t\t'active' => true,\n\t\t\t\t),\n\t\t\t\t'default' => array(\n\t\t\t\t\t'url' => Utils::get_placeholder_image_src(),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t\t$this->add_control(\n\t\t\t'real_retina',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Choose Retina Image', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::MEDIA,\n\t\t\t\t'dynamic' => array(\n\t\t\t\t\t'active' => true,\n\t\t\t\t),\n\t\t\t\t'default' => array(\n\t\t\t\t\t'url' => Utils::get_placeholder_image_src(),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Image_Size::get_type(),\n\t\t\tarray(\n\t\t\t\t'name' => 'retina_image',\n\t\t\t\t'label' => __( 'Image Size', 'boostify' ),\n\t\t\t\t'default' => 'medium',\n\t\t\t)\n\t\t);\n\t\t$this->add_responsive_control(\n\t\t\t'align',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Alignment', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::CHOOSE,\n\t\t\t\t'options' => array(\n\t\t\t\t\t'left' => array(\n\t\t\t\t\t\t'title' => __( 'Left', 'boostify' ),\n\t\t\t\t\t\t'icon' => 'fa fa-align-left',\n\t\t\t\t\t),\n\t\t\t\t\t'center' => array(\n\t\t\t\t\t\t'title' => __( 'Center', 'boostify' ),\n\t\t\t\t\t\t'icon' => 'fa fa-align-center',\n\t\t\t\t\t),\n\t\t\t\t\t'right' => array(\n\t\t\t\t\t\t'title' => __( 'Right', 'boostify' ),\n\t\t\t\t\t\t'icon' => 'fa fa-align-right',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'default' => 'center',\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image-container, {{WRAPPER}} .boostify-caption-width' => 'text-align: {{VALUE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'caption',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Custom Caption', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t'default' => '',\n\t\t\t\t'placeholder' => __( 'Enter your image caption', 'boostify' ),\n\t\t\t\t'label_block' => true,\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'link',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Link', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::URL,\n\t\t\t\t'placeholder' => __( 'https://your-link.com', 'boostify' ),\n\t\t\t)\n\t\t);\n\t\t$this->end_controls_section();\n\t}", "function output($image_type=IMAGETYPE_JPEG)\n {\n //JPEG\n if( $image_type == IMAGETYPE_JPEG )\n {\n imagejpeg($this->image);\n } \n //GIF\n elseif( $image_type == IMAGETYPE_GIF ) \n {\n imagegif($this->image); \n } \n //PNG\n elseif( $image_type == IMAGETYPE_PNG ) \n {\n imagepng($this->image);\n } \n }", "private function processImageStack() {\n\n foreach($this->imagePath as $imagePath) {\n $this->processSingleImage($imagePath);\n }\n }", "public function createImage1(){\n $this->createHexagon(150,75, 50, 200, 150, 325, 275, 325, 350,200, 275, 75);\n $this->createCircle(200, 200, 200, 200, 0, 360);\n $this->createLine(200, 125, 125, 200);\n $this->createLine(200, 125, 275, 200);\n $this->createLine(125, 200, 200, 275);\n $this->createLine(275, 200, 200, 275);\n $this->generateImage();\n }", "function dynamik_skin_css_images_converter( $skin_css )\n{\n\t$skin_css = str_replace( '../../theme/images/', 'images/', $skin_css );\n\n\treturn $skin_css;\n}", "function load($filename)\n {\n $image_info = getimagesize($filename);\n $this->image_type = $image_info[2];\n //crea la imagen JPEG.\n if( $this->image_type == IMAGETYPE_JPEG ) \n {\n $this->image = imagecreatefromjpeg($filename);\n } \n //crea la imagen GIF.\n elseif( $this->image_type == IMAGETYPE_GIF ) \n {\n $this->image = imagecreatefromgif($filename);\n } \n //Crea la imagen PNG\n elseif( $this->image_type == IMAGETYPE_PNG ) \n {\n $this->image = imagecreatefrompng($filename);\n }\n }", "function addIcon($i){\n return $this->add('Icon',null,'Icon')->set($i)->addClass('atk-size-mega');\n }", "function add_image_size($name, $width = 0, $height = 0, $crop = \\false)\n {\n }", "function beeldgeluid_image_style($variables) {\n $style_name = $variables['style_name'];\n $path = $variables['path'];\n\n // theme_image() can only honor the $getsize parameter with local file paths.\n // The derivative image is not created until it has been requested so the file\n // may not yet exist, in this case we just fallback to the URL.\n $style_path = image_style_path($style_name, $path);\n if (!file_exists($style_path)) {\n $style_path = image_style_url($style_name, $path);\n }\n $variables['path'] = $style_path;\n\n if (is_file($style_path)) {\n if (list($width, $height, $type, $attributes) = @getimagesize($style_path)) {\n $variables['width'] = $width;\n $variables['height'] = $height;\n }\n }\n\n return theme('image', $variables);\n}", "private function _ImagickInit()\n\t{\n\t\t$this->bg = new Imagick(\"images/backgrounds/halo_bg.png\"); //create the background image\n\t\t$this->weapon = new Imagick($this->weaponAsset . str_replace('{size}', 'large', $this->haloXML->FavoriteWeaponImageUrl->AssetUrl)); //create the weapon image\n\t\t$this->emblem = new Imagick($this->emblemAsset . str_replace('{size}', '120', $this->haloXML->EmblemImageUrl->AssetUrl)); //create the emblem image\n\t\t$this->profile = new Imagick($this->profileAsset); //create the profile image\n\t\t$this->text = new ImagickDraw(); //create the text object\n\t\t$this->bigText = new ImagickDraw(); //create the weapon text object\n\n\t\t//set up the settings for our text\n\t\t$this->text->setFillColor('white');\n\t\t$this->text->setFont('fonts/Quicksand.otf');\n\t\t$this->text->setFontSize(10);\n\n\t\t//set up the settings for our weapon text\n\t\t$this->bigText->setFillColor('white');\n\t\t$this->bigText->setFont('fonts/Quicksand.otf');\n\t\t$this->bigText->setFontSize(22);\n\t}", "function generate_image_sizes() {\n\t$display_options = get_customizer_settings()[ WPM_PREFIX . 'collection_style' ];\n\n\tadd_image_size(\n\t\tWPM_PREFIX . 'list_thumb',\n\t\t$display_options['list_image_max_width'],\n\t\t$display_options['list_image_max_height']\n\t);\n}", "public static function loadBackgroundImages() {\n $dir = scandir('../img/bgs');\n $bg_images = array();\n foreach ($dir as $file) {\n if ($file != \".\" && $file != \"..\") {\n if (file_exists(\"../img/bgs/\" . $file)) {\n $currFileExt = pathinfo(\"../img/bgs/\" . $file, 4);\n if ($currFileExt == \"jpg\" || $currFileExt == \"png\" || $currFileExt == \"gif\" || $currFileExt == \"jpeg\" || $currFileExt == \"bmp\") {\n $bg_images[] = $file;\n }\n }\n }\n }\n $curr_page = isset($_POST['curr_page']) ? intval($_POST['curr_page']) : 1;\n $max_bgs_per_page = 9;\n $offset = $curr_page * $max_bgs_per_page - $max_bgs_per_page;\n $slice = array_slice($bg_images, $offset, $max_bgs_per_page);\n\n $counter = 0;\n $middleClass = \"\";\n foreach ($slice as $bg) {\n $counter++;\n if ($counter == 1) {\n ?><div class=\"cs-product-row\"><?php\n }\n if ($counter == 2) {\n $middleClass = \"cs-prd-middle\";\n }\n else {\n $middleClass = \"\";\n }\n ?>\n <?php $bg_index = self::parseInt($bg); ?>\n <div class=\"cs-product pad-bot thumb_za_pozadini <?php echo $middleClass; ?>\"\n index_za_pozadina_e=\"<?php echo $bg_index; ?>\"> \n\n <img src=\"img/bgs/<?php echo $bg ?>\" width=\"97\" height=\"126\" data-bgname=\"<?php echo $bg ?>\" class=\"cs-main-bg\" />\n </div>\n <?php\n if ($counter == 3) {\n ?></div><?php\n $counter = 0;\n }\n }\n }", "function neurovision_images() {\n \tregister_post_type( 'images', /* (http://codex.wordpress.org/Function_Reference/register_post_type) */\n \t \t// let's now add all the options for this post type\n \t\tarray('labels' => array(\n \t\t\t'name' => __('Images', 'neurovisiontheme'), /* This is the Title of the Group */\n \t\t\t'singular_name' => __('Image', 'neurovisiontheme'), /* This is the individual type */\n \t\t\t'all_items' => __('All Images', 'neurovisiontheme'), /* the all items menu item */\n \t\t\t'add_new' => __('Add New Image', 'neurovisiontheme'), /* The add new menu item */\n \t\t\t'add_new_item' => __('Add New Image', 'neurovisiontheme'), /* Add New Display Title */\n \t\t\t'edit' => __( 'Edit', 'neurovisiontheme' ), /* Edit Dialog */\n \t\t\t'edit_item' => __('Edit Image', 'neurovisiontheme'), /* Edit Display Title */\n \t\t\t'new_item' => __('New Image', 'neurovisiontheme'), /* New Display Title */\n \t\t\t'view_item' => __('View Image', 'neurovisiontheme'), /* View Display Title */\n \t\t\t'search_items' => __('Search Images', 'neurovisiontheme'), /* Search Custom Type Title */\n \t\t\t'not_found' => __('Nothing found in the Database.', 'neurovisiontheme'), /* This displays if there are no entries yet */\n \t\t\t'not_found_in_trash' => __('Nothing found in Trash', 'neurovisiontheme'), /* This displays if there is nothing in the trash */\n \t\t\t'parent_item_colon' => ''\n \t\t\t), /* end of arrays */\n \t\t\t'description' => __( 'neurovision Images', 'neurovisiontheme' ), /* Custom Type Description */\n\n \t\t\t'public' => true,\n \t\t\t'publicly_queryable' => true,\n \t\t\t'exclude_from_search' => false,\n \t\t\t'show_ui' => true,\n \t\t\t'query_var' => true,\n \t\t\t'menu_position' => 6, /* this is what order you want it to appear in on the left hand side menu */\n \t\t\t'menu_icon' => 'dashicons-format-image', /* the icon for the custom post type menu */\n \t\t\t'rewrite'\t=> array( 'slug' => 'images', 'with_front' => false ), /* you can specify its url slug */\n \t\t\t'has_archive' => true, /* you can rename the slug here */\n \t\t\t'capability_type' => 'post',\n \t\t\t'hierarchical' => false,\n \t\t\t/* the next one is important, it tells what's enabled in the post editor */\n \t\t\t'supports' => array( 'title', 'editor', 'page-attributes', 'thumbnail')\n \t \t) /* end of options */\n \t); /* end of register post type */\n\n }", "function hook_image_default_styles() {\n $styles = array();\n\n $styles['mymodule_preview'] = array(\n 'label' => 'My module preview',\n 'effects' => array(\n array(\n 'name' => 'image_scale',\n 'data' => array('width' => 400, 'height' => 400, 'upscale' => 1),\n 'weight' => 0,\n ),\n array(\n 'name' => 'image_desaturate',\n 'data' => array(),\n 'weight' => 1,\n ),\n ),\n );\n\n return $styles;\n}", "public function import_images()\r\n\t{\r\n\t\t$query = \"SELECT * FROM `#__wpl_addon_mls_queries` WHERE `enabled`>='1'\";\r\n\t\t$mls_queries = wpl_db::select($query);\r\n\t\t$rets_objects = array();\r\n\t\t$connection = 0;\r\n \r\n\t\tforeach($mls_queries as $mls_query)\r\n\t\t{\r\n\t\t\t$query = \"SELECT `id` FROM `#__wpl_properties` WHERE `pic_numb` = '0' AND `mls_query_id` = '{$mls_query->id}' LIMIT {$mls_query->import_limit}\";\r\n\t\t\t$pids = wpl_db::select($query, 'loadColumn');\r\n\r\n\t\t\t/** load rets object **/\r\n\t\t\tif($rets_objects[$mls_query->mls_server_id]) $wplrets = $rets_objects[$mls_query->mls_server_id];\r\n\t\t\telse $wplrets = new wpl_addon_mls($mls_query->mls_server_id);\r\n\t\t\t\r\n\t\t\t/** set to rets objects **/\r\n\t\t\t$rets_objects[$mls_query->mls_server_id] = $wplrets;\r\n\r\n\t\t\t/** connect **/\r\n\t\t\tif(!$connection) $connection = $wplrets->connect();\r\n\r\n\t\t\t/** download images **/\r\n\t\t\tif(trim($mls_query->images)) $wplrets->import_properties_images($pids, $mls_query->mls_server_id, $mls_query->images, false);\r\n\r\n\t\t\t/** finalizing properties **/\r\n\t\t\tforeach($pids as $pid) $mls->finalize($pid);\r\n\t\t}\r\n\r\n\t\tif(wpl_request::getVar('rets_import_images_cron_job') == 1) exit;\r\n\t}", "function reg_image_sizes() {\n add_image_size( 'medium', 480, 0, false );\n add_image_size( 'medium-large', 500, 0, false );\n add_image_size( 'large', 600, 0, false );\n}", "protected function createImageStyle($id, $name, $width, $height = NULL) {\n /** @var \\Drupal\\image\\ImageStyleInterface $image_style */\n $image_style = $this\n ->get('entity_type.manager')\n ->getStorage('image_style')\n ->create(['label' => $name, 'name' => $id]);\n\n $image_style->addImageEffect([\n 'id' => $height ? 'image_scale_and_crop' : 'image_scale',\n 'weight' => 0,\n 'data' => ['width' => $width, 'height' => $height],\n ]);\n\n $image_style->save();\n }", "function item_image($imageType = null, $props = array(), $index = 0, $item = null)\n{\n if (!$item) {\n $item = get_current_record('item');\n }\n $imageFile = $item->getFile($index);\n $fileMarkup = new Omeka_View_Helper_FileMarkup;\n return $fileMarkup->image_tag($imageFile, $props, $imageType);\n}", "function _rulesDimensionImage($directory_name, $data_type = false, $photo_extension = false, $options = array()){\n \t$type_image = $this->RmCommon->filterEmptyField($options, 'type_image', false, 'landscape');\n \t$result = array();\n \t\n \tif( in_array($directory_name, array( 'logos' )) ) {\n \t\tif( $data_type == 'thumb' ) {\n \t\t\t$result = 'xsm';\n \t\t} else if( $data_type == 'large' ) {\n \t\t\t$result = 'xxsm';\n \t\t} else {\n\t \t\t$result = array(\n\t\t\t\t\t'xsm' => '100x40',\n\t\t\t\t\t'xm' => '200x200',\n\t\t\t\t\t'xxsm' => '240x96'\n\t\t\t\t);\n\t \t}\n \t} else if( in_array($directory_name, array( 'users' )) ) {\n \t\tif( $data_type == 'thumb' ) {\n \t\t\t$result = 'pm';\n \t\t} else if( $data_type == 'large' ) {\n \t\t\t$result = 'pxl';\n \t\t} else {\n\t \t\t$result = array(\n\t\t\t\t\t'ps' => '50x50',\n\t\t\t\t\t'pm' => '100x100',\n\t\t\t\t\t'pl' => '150x150',\n\t\t\t\t\t'pxl' => '300x300',\n\t\t\t\t);\n\t \t}\n \t} else if( in_array($directory_name, array( 'ebrosur', 'ebrosur_template' )) ) {\n if( $data_type == 'thumb' ) {\n \t\t\t$result = 'm';\n \t\t} else if( $data_type == 'large' ) {\n \t\t\t$result = 'xl';\n \t\t} else {\n\t\t\t\t$isBuilder = Common::config('Config.Company.data.UserCompanyConfig.is_ebrochure_builder');\n\n \t\t\tif($type_image == 'potrait'){\n \t\t\t\t$result = array(\n\t\t\t\t\t\t's' => '296x420',\n\t\t\t\t\t\t'm' => '453x640',\n\t\t\t\t\t\t'xl' => $isBuilder ? '768x1024' : '724x1024',\n\t\t\t\t\t);\n \t\t\t}else{\n \t\t\t\t$result = array(\n\t\t\t\t\t\t's' => '420x296',\n\t\t\t\t\t\t'm' => '640x453',\n\t\t\t\t\t\t'xl' => $isBuilder ? '1024x768' : '1024x724',\n\t\t\t\t\t);\n \t\t\t}\n\t \t}\n } else if( in_array($directory_name, array( 'files', 'crms', 'document', 'documents')) && in_array($photo_extension, array( 'pdf', 'xls', 'xlsx' )) ) {\n\t\t\t$result = false;\n } else {\n \t\tif( $data_type == 'thumb' ) {\n \t\t\t$result = 'm';\n \t\t} else if( $data_type == 'large' ) {\n \t\t\t$result = 'l';\n \t\t} else {\n\t \t\t$result = array(\n\t\t\t\t\t's' => '150x84',\n\t\t\t\t\t'm' => '300x169',\n\t\t\t\t\t'l' => '855x481',\n\t\t\t\t\t'company' => '855x481'\n\t\t\t\t);\n\t \t}\n \t}\n\n \treturn $result;\n }" ]
[ "0.59268916", "0.5885091", "0.5727244", "0.56267846", "0.54945207", "0.53966445", "0.5392959", "0.5336733", "0.52773243", "0.5238542", "0.5199803", "0.51492035", "0.51310116", "0.51057315", "0.5078821", "0.5070848", "0.5046838", "0.5017325", "0.49549738", "0.49318972", "0.4905127", "0.4864961", "0.4851945", "0.48441726", "0.48195696", "0.4807286", "0.48072127", "0.48003927", "0.4799214", "0.47879496", "0.47849503", "0.47618228", "0.476005", "0.47594953", "0.47445896", "0.47430024", "0.47316417", "0.47176746", "0.4713185", "0.47014427", "0.46936592", "0.46936592", "0.46855268", "0.46799037", "0.46767196", "0.46749336", "0.4654177", "0.46486792", "0.46326914", "0.4626392", "0.4617499", "0.46126634", "0.4608296", "0.46001318", "0.45911497", "0.45871475", "0.45697632", "0.45628276", "0.45538798", "0.45479414", "0.45337227", "0.45294654", "0.45225358", "0.4510032", "0.4510032", "0.45066792", "0.44970593", "0.4474953", "0.44730565", "0.44668767", "0.44640985", "0.44600278", "0.44591415", "0.44572157", "0.44441822", "0.4444055", "0.44405547", "0.44402412", "0.44358575", "0.44312042", "0.44301635", "0.44256267", "0.44246078", "0.44242936", "0.44194984", "0.44051614", "0.43998075", "0.4399647", "0.43982556", "0.4397963", "0.43975127", "0.4383", "0.4381135", "0.43758795", "0.43726912", "0.43705642", "0.4367783", "0.43663058", "0.4364642", "0.4363792", "0.4358895" ]
0.0
-1
ppRegister() Add a single image to the sprite. Accepted params are: name : the sprite name. imageType : the image type. spritemargin : margins of the image in the sprite. hoverXOffset : Offset to the background X position on hover hoverYOffset : Offset to the background Y position on hover
public function addImage($path, array $params = array()) { $this->spriteImageRegistry->addImage($path, $params); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function register_style_team_member_image() {\n\t\t$this->start_controls_section(\n\t\t\t'section_team_member_image_style',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Image', 'uael' ),\n\t\t\t\t'tab' => Controls_Manager::TAB_STYLE,\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'image_position',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Image Position', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'default' => 'above',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'above' => __( 'Top', 'uael' ),\n\t\t\t\t\t'left' => __( 'Left', 'uael' ),\n\t\t\t\t\t'right' => __( 'Right', 'uael' ),\n\t\t\t\t),\n\t\t\t\t'prefix_class' => 'uael-member-image-pos-',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'member_mob_view',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Responsive Support', 'uael' ),\n\t\t\t\t'description' => __( 'Choose the breakpoint you want the layout will stack.', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'default' => 'none',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'none' => __( 'No', 'uael' ),\n\t\t\t\t\t'tablet' => __( 'For Tablet & Mobile ', 'uael' ),\n\t\t\t\t\t'mobile' => __( 'For Mobile Only', 'uael' ),\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'image_position' => array( 'left', 'right' ),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'member_image_valign',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Vertical Alignment', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::CHOOSE,\n\t\t\t\t'label_block' => false,\n\t\t\t\t'options' => array(\n\t\t\t\t\t'top' => array(\n\t\t\t\t\t\t'title' => __( 'Top', 'uael' ),\n\t\t\t\t\t\t'icon' => 'eicon-v-align-top',\n\t\t\t\t\t),\n\t\t\t\t\t'middle' => array(\n\t\t\t\t\t\t'title' => __( 'Middle', 'uael' ),\n\t\t\t\t\t\t'icon' => 'eicon-v-align-middle',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'default' => 'top',\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'image_position' => array( 'left', 'right' ),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'align_team_member',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Overall Alignment', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::CHOOSE,\n\t\t\t\t'options' => array(\n\t\t\t\t\t'left' => array(\n\t\t\t\t\t\t'title' => __( 'Left', 'uael' ),\n\t\t\t\t\t\t'icon' => 'fa fa-align-left',\n\t\t\t\t\t),\n\t\t\t\t\t'center' => array(\n\t\t\t\t\t\t'title' => __( 'Center', 'uael' ),\n\t\t\t\t\t\t'icon' => 'fa fa-align-center',\n\t\t\t\t\t),\n\t\t\t\t\t'right' => array(\n\t\t\t\t\t\t'title' => __( 'Right', 'uael' ),\n\t\t\t\t\t\t'icon' => 'fa fa-align-right',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'image_position' => 'above',\n\t\t\t\t),\n\t\t\t\t'default' => 'center',\n\t\t\t\t'prefix_class' => 'uael%s-team-member-align-',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'image_shape',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Shape', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'default' => 'square',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'square' => __( 'Square', 'uael' ),\n\t\t\t\t\t'rounded' => __( 'Rounded', 'uael' ),\n\t\t\t\t\t'circle' => __( 'Circle', 'uael' ),\n\t\t\t\t),\n\t\t\t\t'prefix_class' => 'uael-shape-',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'team_member_image_border_radius',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Border Radius', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::DIMENSIONS,\n\t\t\t\t'size_units' => array( 'px', '%' ),\n\t\t\t\t'default' => array(\n\t\t\t\t\t'top' => '10',\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t\t'right' => '10',\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t\t'bottom' => '10',\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t\t'left' => '10',\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .uael-team-member-image img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'image_shape' => array( 'rounded' ),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'image_border',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Border Style', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'default' => 'none',\n\t\t\t\t'label_block' => false,\n\t\t\t\t'options' => array(\n\t\t\t\t\t'none' => __( 'None', 'uael' ),\n\t\t\t\t\t'solid' => __( 'Solid', 'uael' ),\n\t\t\t\t\t'double' => __( 'Double', 'uael' ),\n\t\t\t\t\t'dotted' => __( 'Dotted', 'uael' ),\n\t\t\t\t\t'dashed' => __( 'Dashed', 'uael' ),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .uael-team-member-image img' => 'border-style: {{VALUE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t\t$this->add_control(\n\t\t\t\t'image_border_size',\n\t\t\t\tarray(\n\t\t\t\t\t'label' => __( 'Border Width', 'uael' ),\n\t\t\t\t\t'type' => Controls_Manager::DIMENSIONS,\n\t\t\t\t\t'size_units' => array( 'px' ),\n\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t'top' => '1',\n\t\t\t\t\t\t'bottom' => '1',\n\t\t\t\t\t\t'left' => '1',\n\t\t\t\t\t\t'right' => '1',\n\t\t\t\t\t\t'unit' => 'px',\n\t\t\t\t\t),\n\t\t\t\t\t'condition' => array(\n\t\t\t\t\t\t'image_border!' => 'none',\n\t\t\t\t\t),\n\t\t\t\t\t'selectors' => array(\n\t\t\t\t\t\t'{{WRAPPER}} .uael-team-member-image img' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}; box-sizing:border-box;',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->add_control(\n\t\t\t\t'image_border_color',\n\t\t\t\tarray(\n\t\t\t\t\t'label' => __( 'Border Color', 'uael' ),\n\t\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t\t'scheme' => array(\n\t\t\t\t\t\t'type' => Scheme_Color::get_type(),\n\t\t\t\t\t\t'value' => Scheme_Color::COLOR_1,\n\t\t\t\t\t),\n\t\t\t\t\t'condition' => array(\n\t\t\t\t\t\t'image_border!' => 'none',\n\t\t\t\t\t),\n\t\t\t\t\t'default' => '',\n\t\t\t\t\t'selectors' => array(\n\t\t\t\t\t\t'{{WRAPPER}} .uael-team-member-image img' => 'border-color: {{VALUE}};',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->add_control(\n\t\t\t\t'image_border_hover_color',\n\t\t\t\tarray(\n\t\t\t\t\t'label' => __( 'Border Hover Color', 'uael' ),\n\t\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t\t'scheme' => array(\n\t\t\t\t\t\t'type' => Scheme_Color::get_type(),\n\t\t\t\t\t\t'value' => Scheme_Color::COLOR_2,\n\t\t\t\t\t),\n\t\t\t\t\t'default' => '',\n\t\t\t\t\t'selectors' => array(\n\t\t\t\t\t\t'{{WRAPPER}} .uael-team-member-image img:hover' => 'border-color: {{VALUE}};',\n\t\t\t\t\t),\n\t\t\t\t\t'condition' => array(\n\t\t\t\t\t\t'image_border!' => 'none',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t$this->add_control(\n\t\t\t'hover_animation',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Hover Animation', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::HOVER_ANIMATION,\n\t\t\t)\n\t\t);\n\n\t\t$this->end_controls_section();\n\t}", "function image_sprite($sprite_abspath, $icons_abspaths, $orientation = 'portrait', $padding = 5)\n{\n\n // open all the images, create teardown function\n $sprite = new \\Imagick();\n $icons = array();\n\n foreach($icons_abspaths as $icon_abspath) {\n $icons[] = new \\Imagick($icon_abspath);\n }\n\n $tear_down = function ($return) use (&$sprite, $icons) {\n foreach($icons as $icon) {\n $icon->clear();\n $icon->destroy();\n }\n $sprite->clear();\n $sprite->destroy();\n return $return;\n };\n\n // calculate dimensions\n $max_width = $max_height = 0;\n foreach($icons as $icon) {\n $max_height = max($max_height, $icon->getImageHeight());\n $max_width = max($max_width, $icon->getImageWidth());\n }\n $sprite_width = $max_width + ($padding * 2);\n $sprite_height = $max_height + ($padding * 2);\n if ($orientation == 'landscape') {\n $sprite_width *= count($icons);\n } else {\n $sprite_height *= count($icons);\n }\n\n // check if we really need to do this\n $sprite_mtime = file_exists($sprite_abspath) ? filemtime($sprite_abspath):0;\n $icons_mtime = 0;\n\n foreach($icons_abspaths as $icon_abspath) {\n $icons_mtime = max($icons_mtime, filemtime($icon_abspath));\n }\n\n if ($sprite_mtime >= $icons_mtime) {\n $sprite_size = getimagesize($sprite_abspath);\n if ($sprite_size[0] == $sprite_width && $sprite_size[1] == $sprite_height) {\n return $tear_down(array(\n 'box_height' => $max_height,\n 'box_width' => $max_width,\n 'sprite_height' => $sprite_height,\n 'sprite_width' => $sprite_width,\n ));\n }\n }\n\n // compose the sprite\n $sprite->newImage($sprite_width, $sprite_height, new \\ImagickPixel('transparent'));\n\n foreach($icons as $n => $icon) {\n $x = $y = $padding;\n $x += round(($max_height - $icon->getImageHeight())/2);\n $y += round(($max_width - $icon->getImageWidth())/2);\n $cumulative_padding = $n * $padding * 2;\n if ($orientation == 'landscape') {\n $x += ($n * $max_width) + $cumulative_padding;\n } else {\n $y += ($n * $max_height) + $cumulative_padding;\n }\n $sprite->compositeImage($icon, \\Imagick::COMPOSITE_COPY, $x, $y);\n }\n $sprite->setImageCompressionQuality(100);\n $sprite->writeImage($sprite_abspath);\n\n return $tear_down(array(\n 'box_height' => $max_height + ($padding * 2),\n 'box_width' => $max_width + ($padding * 2),\n 'icon_height' => $max_height,\n 'icon_width' => $max_width,\n 'sprite_height' => $sprite_height,\n 'sprite_width' => $sprite_width,\n ));\n\n}", "public function addPictureOnSlide(int $picture, int $position): void;", "public function setImage($image, $type = 'image', $size = array(800, 600)) \n { \n if (file_exists($image) && is_readable($image)) {\n $info = $this->_getImageInfo($image);\n \n switch ($info['mime']) {\n case 'image/png':\n $img = imagecreatefrompng($image);\n break;\n case 'image/jpeg':\n $img = imagecreatefromjpeg($image);\n break;\n case 'image/gif':\n $old = imagecreatefromgif($image);\n $img = imagecreatetruecolor($info[0], $info[1]);\n imagecopy($image, $old, 0, 0, 0, 0, $info[0], $info[1]);\n break;\n default:\n break;\n }\n }\n\n switch ($type) {\n case 'image':\n if ($img) $this->images[] = $img;\n break;\n case 'layout':\n if ($img) {\n $this->layout = $img;\n $this->layoutInfo = $info;\n } else {\n $this->layout = imagecreatetruecolor($size[0], $size[1]);\n $gray = imagecolorallocate($this->layout, 128, 128, 128);\n imagefilledrectangle($this->layout, 0, 0, $size[0], $size[1], $gray);\n $this->layoutInfo = $this->_getImageInfo($this->layout);\n }\n break;\n default:\n break;\n }\n }", "public function getSpriteIconCode() {}", "function add()\n\t{\n\t\t$CFG = $this->config->item('image_configure');\n\t\t$data[\"title\"] = _e(\"Image\");\n\t\t## for check admin or not ##\n\t\t$data[\"response\"] = addPermissionMsg( $CFG[\"sector\"][\"add\"] );\t\t\t\n\t\t## Other auxilary variable ##\n\t\t$data['var'] = array();\t\t\n\t\t$this->load->module('context/context_admin');\n\t\t$user_context = $this->context_admin->getContext();\n\t\t$data['var']['context_dd'] = ( array('' => _e('Choose Context') ) + $user_context );\n\t\t$data['var']['relation_dd'] = ( array('' => _e('Choose Relation') ) );\n\t\t$data[\"top\"] = $this->template->admin_view(\"top\", $data, true, \"image\");\t\n\t\t$data[\"content\"] = $this->template->admin_view(\"image_add\", $data, true, \"image\");\n\t\t$this->template->build_admin_output($data);\n\t}", "abstract public function applyToImage(Image $image, $posx = 0, $posy = 0);", "abstract public function applyToImage(Image $image, $posx = 0, $posy = 0);", "function register_nu_hero_image() {\n\n fusion_builder_map( \n array(\n 'name' => esc_attr__( 'Hero Image', 'fusion-builder' ),\n 'shortcode' => 'nu_hero_image',\n 'icon' => 'fusiona-newspaper',\n 'allow_generator' => true,\n 'params' => array(\n array(\n 'type' => 'textfield',\n 'heading' => esc_attr__( 'Title', 'fusion-builder' ),\n 'description' => esc_attr__( 'Title', 'fusion-builder' ),\n 'param_name' => 'title',\n 'value' => '',\n ),\n array(\n 'type' => 'textfield',\n 'heading' => esc_attr__( 'Description', 'fusion-builder' ),\n 'description' => esc_attr__( 'Description', 'fusion-builder' ),\n 'param_name' => 'description',\n 'value' => '',\n ),\n array(\n 'type' => 'upload',\n 'heading' => esc_attr__( 'Image', 'fusion-builder' ),\n 'description' => esc_attr__( 'Attach an image', 'fusion-builder' ),\n 'param_name' => 'img',\n 'value' => '',\n ),\n ),\n ) \n );\n }", "function add_image( $url = null, $caption = null, $alt = null, $position = null ) {\n\n\t\t$module = new I2M_Module__image( $url, $caption, $alt, $position );\n\n\t\t$this->module_list[] = $module->get_acf_layout();\n\t\t$this->modules[] = $module;\n\n\t\treturn $module;\n\n\t}", "public function __construct(SpriteImageRegistry &$spriteImageRegistry)\n {\n $this->spriteImageRegistry = $spriteImageRegistry;\n }", "public function insertImage($image_name) {\r\n $this->image_name = $image_name;\r\n return $this->insert();\r\n }", "public function setImageName(string $imageName);", "function Utilities_Image(){\n\t\t// $this->$imageAsset = $img;\t\t\n\t}", "public function targetAdd($name, $width, $image = NULL, $active = NULL, $applicationMetadata = NULL){\n $dataArr = [\n 'name' => $name,\n 'size' => (string)$width,\n ];\n // check image marker\n // input should be image content\n if(!is_null($image)) {\n $dataArr['image'] = base64_encode($image);\n }\n // check active flag\n if(!is_null($active) || (('0' === $active) && ('1' === $active))){\n $dataArr['active'] = $active;\n }\n // check meta\n if(!is_null($applicationMetadata)) {\n $dataArr['meta'] = base64_encode($applicationMetadata);\n }\n // type should be ImageTarget\n $dataArr['type'] = 'ImageTarget';\n $responseJson = $this->curlHttpPostRequest($this->host, $this->targetAdd, $dataArr);\n $response = json_decode($responseJson, true);\n if(!isset($response['statusCode']) || !isset($response['result']['targetId']) ){\n throw new Exception('Target add response format error. responseJson = '.$responseJson);\n }\n return [\n 'resultCode' => $response['statusCode'],\n 'targetId' => $response['result']['targetId'],\n ];\n }", "public function addLayer(ImageLayerInterface $layer, $name = null);", "function Image($file,$x,$y,$w=0,$h=0,$type='',$link='',$paint=true)\n\t\t{\n\t\t\tif(!isset($this->images[$file]))\n\t\t\t{\n\t\t\t\t//First use of image, get info\n\t\t\t\tif($type=='')\n\t\t\t\t{\n\t\t\t\t\t$pos=strrpos($file,'.');\n\t\t\t\t\tif(!$pos)\t$this->Error('Image file has no extension and no type was specified: '.$file);\n\t\t\t\t\t$type=substr($file,$pos+1);\n\t\t\t\t}\n\t\t\t\t$type=strtolower($type);\n\t\t\t\t$mqr=get_magic_quotes_runtime();\n\t\t\t\tset_magic_quotes_runtime(0);\n\t\t\t\tif($type=='jpg' or $type=='jpeg')\t$info=$this->_parsejpg($file);\n\t\t\t\telseif($type=='png') $info=$this->_parsepng($file);\n\t\t\t\telseif($type=='gif') $info=$this->_parsegif($file); //EDITEI - GIF format included\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//Allow for additional formats\n\t\t\t\t\t$mtd='_parse'.$type;\n\t\t\t\t\tif(!method_exists($this,$mtd)) $this->Error('Unsupported image type: '.$type);\n\t\t\t\t\t$info=$this->$mtd($file);\n\t\t\t\t}\n\t\t\t\tset_magic_quotes_runtime($mqr);\n\t\t\t\t$info['i']=count($this->images)+1;\n\t\t\t\t$this->images[$file]=$info;\n\t\t\t}\n\t\t\telse $info=$this->images[$file];\n\t\t\t//Automatic width and height calculation if needed\n\t\t\tif($w==0 and $h==0)\n\t\t\t{\n\t\t\t\t//Put image at 72 dpi\n\t\t\t\t$w=$info['w']/$this->k;\n\t\t\t\t$h=$info['h']/$this->k;\n\t\t\t}\n\t\t\tif($w==0)\t$w=$h*$info['w']/$info['h'];\n\t\t\tif($h==0)\t$h=$w*$info['h']/$info['w'];\n\n\t\t\t$changedpage = false; //EDITEI\n\n\t\t\t//Avoid drawing out of the paper(exceeding width limits). //EDITEI\n\t\t\tif ( ($x + $w) > $this->fw )\n\t\t\t{\n\t\t\t\t$x = $this->lMargin;\n\t\t\t\t$y += 5;\n\t\t\t}\n\t\t\t//Avoid drawing out of the page. //EDITEI\n\t\t\tif ( ($y + $h) > $this->fh ) \n\t\t\t{\n\t\t\t\t$this->AddPage();\n\t\t\t\t$y = $tMargin + 10; // +10 to avoid drawing too close to border of page\n\t\t\t\t$changedpage = true;\n\t\t\t}\n\n\t\t\t$outstring = sprintf('q %.2f 0 0 %.2f %.2f %.2f cm /I%d Do Q',$w*$this->k,$h*$this->k,$x*$this->k,($this->h-($y+$h))*$this->k,$info['i']);\n\n\t\t\tif($paint) //EDITEI\n\t\t\t{\n\t\t\t$this->_out($outstring);\n\t\t\t if($link) $this->Link($x,$y,$w,$h,$link);\n\t\t\t}\n\n\t\t\t//Avoid writing text on top of the image. //EDITEI\n\t\t\tif ($changedpage) $this->y = $y + $h;\n\t\t\telse $this->y = $y + $h;\n\n\t\t\t//Return width-height array //EDITEI\n\t\t\t$sizesarray['WIDTH'] = $w;\n\t\t\t$sizesarray['HEIGHT'] = $h;\n\t\t\t$sizesarray['X'] = $x; //Position before painting image\n\t\t\t$sizesarray['Y'] = $y; //Position before painting image\n\t\t\t$sizesarray['OUTPUT'] = $outstring;\n\t\t\treturn $sizesarray;\n\t\t}", "private function generateSpritemap ()\n {\n $sprites = $this->sprites;\n $len = count($sprites);\n $node;\n\n usort($sprites, function ( $a, $b ) {\n $asa = $a->height;\n $bsa = $b->height;\n return ($asa > $bsa) ? -1 : 1;\n });\n\n $packer = new SpritePacker;\n $packer->fit($sprites);\n\n $this->width = $packer->pack->w;\n $this->height = $packer->pack->h;\n\n $spritemap = imagecreatetruecolor($this->width, $this->height);\n $color = imagecolorallocatealpha($spritemap, 255, 255, 255, 127);\n imagefill($spritemap, 0, 0, $color);\n imagecolortransparent($spritemap, imagecolorallocatealpha($spritemap, 0, 0, 0, 127));\n imagealphablending($spritemap, false);\n imagesavealpha($spritemap, true);\n\n foreach ($sprites as $sprite) {\n if ($sprite->fit) {\n $fit = $sprite->fit;\n imagecopyresampled($spritemap, $sprite->getResource(), $fit->x, $fit->y, 0, 0, $sprite->width, $sprite->height, $sprite->original_width, $sprite->original_height);\n }\n }\n imagepng($spritemap, __DIR__.'/test.png');\n }", "protected function createImage(): void\n {\n // create image\n $this->image = @imagecreatetruecolor($this->width, $this->height);\n\n // set mime type\n $this->mimeType = 'image/png';\n\n // set modified date\n $this->modified = time();\n }", "public function add_image() {\n\t $this->use_layout=false;\n\t $this->page = new $this->model_class(Request::get('id'));\n\t\t$this->join_name = \"images\";\n\t if(Request::post(\"id\")) {\n\t\t $this->image = new WildfireFile(Request::post('id'));\n\t\t $this->image->join_order = Request::post('order');\n\t\t $this->page->images = $this->image;\n\t }\n\t}", "public function image($name) {\n\t\t\t$r=new Resource(Resource::GRAPHICS, $name);\n\t\t\t$this->addResource($r);\n\t\t\treturn $r;\n\t\t}", "function addExternalPictureAction(){\n\t\t$return = $_REQUEST['return'] == 'image' ? 'image' : 'json'; //return image output or success?\n\t\t\n\t\t$for = $_REQUEST['for']; //userid of who this goes to\n\t\t$apicode = $_REQUEST['apicode'];\n\t\t\n\t\t//get the query string parsed.\n\t\t$uri = $_SERVER['REQUEST_URI'];\n\t\t$explode = explode('?', $uri);\n\t\t$vars = $explode[1];\n\t\t$vars = explode('&', $vars);\n\t\t\n\t\tforeach( $vars as $k=>$v){\n\t\t\t\n\t\t\t$explode = explode('=', $v);\n\t\t\t\n\t\t\t//dbug($explode);\n\t\t\t\n\t\t\t$$explode[0] = $explode[1];\n\t\t}\n\n\t\tdbug ($src, 'src' ); //src of image\n\t\tdbug ($page, 'page' ); //page image is on\n\t}", "protected function addPix($pix)\n {\n echo '<img src=\"'.$pix.'\">';\n }", "public function addImage($name, $src = NULL, $alt = NULL)\n\t{\n\t\treturn $this[$name] = new ImageButton($src, $alt);\n\t}", "public function __construct($name = 'default')\n {\n $this->name = $name;\n $this->spriteTemplateRegistry = new SpriteTemplateRegistry($this);\n $this->spriteImageRegistry = new SpriteImageRegistry($this);\n $this->spriteStyleRegistry = new SpriteStyleRegistry($this);\n $this->spriteConfig = CSpriteConfig::getInstance($name);\n $this->spriteCache = new SpriteCache($this);\n\n if (!isset(self::$instances))\n {\n self::$instances = array();\n }\n self::$instances[$name] = $this;\n }", "public function Image($file, $x = '', $y = '', $w = 0, $h = 0, $type = '', $link = '', $align = '', $resize = false, $dpi = 300, $palign = '', $ismask = false, $imgmask = false, $border = 0, $fitbox = false, $hidden = false, $fitonpage = false, $alt = false, $altimgs = [])\n {\n if (!strpos($file, 'data:image/png;base64,') === false) {\n $file = '@'.base64_decode(\n chunk_split(str_replace(' ', '+', str_replace('data:image/png;base64,', '', $file)))\n );\n }\n\n parent::Image($file, $x, $y, $w, $h, $type, $link, $align, $resize, $dpi, $palign, $ismask, $imgmask, $border, $fitbox, $hidden, $fitonpage, $alt, $altimgs);\n }", "function register_block_core_image()\n {\n }", "protected function createImage($imageUrl)\n\t{\n\t\t$image=Prado::createComponent('System.Web.UI.WebControls.TImage');\n\t\t$image->setImageUrl($imageUrl);\n\t\tif(($width=$this->getImageWidth())!=='')\n\t\t\t$image->setWidth($width);\n\t\tif(($height=$this->getImageHeight())!=='')\n\t\t\t$image->setHeight($height);\n\t\tif(($toolTip=$this->getToolTip())!=='')\n\t\t\t$image->setToolTip($toolTip);\n\t\tif(($text=$this->getText())!=='')\n\t\t\t$image->setAlternateText($text);\n\t\tif(($align=$this->getImageAlign())!=='')\n\t\t\t$image->setImageAlign($align);\n\t\t$image->setBorderWidth('0');\n\t\treturn $image;\n\t}", "public function apply($imgSource, $imgTarget, $imgWatermark, $position = 0, $type = 'image', $padding=10){\n\t\t# Set watermark position\n\t\t$this->watermarkPosition = $position;\n\n\t\t# Get function name to use for create image\n\t\t$functionSource = $this->getFunction($imgSource, 'open');\n\t\t$this->imgSource = $functionSource($imgSource);\n\n\t\t# Check is image or text\n if($type == 'text'){\n $font_height=imagefontheight(10);\n $font_width=imagefontwidth(5);\n\n $width = (strlen($imgWatermark)*$font_width)+10+5 ; // Canvas width = String with, added with some margin\n $height=$font_height + 10+5; // Canvas height = String height, added with some margin\n\n $stamp = imagecreate($width, $height);\n imagecolorallocate($stamp, 235, 235, 235);\n $text_color = imagecolorallocate ($stamp, 3, 3, 3);\n imagestring($stamp, 25, 10, 7, $imgWatermark, $text_color);\n\n $this->imgWatermark = $stamp;\n\n $sx = imagesx($stamp);\n $sy = imagesy($stamp);\n $sizesWatermark = ['width' => $sx, 'height' => $sy];\n }else{\n # Get function name to use for create image\n $functionWatermark = $this->getFunction($imgWatermark, 'open');\n $this->imgWatermark = $functionWatermark($imgWatermark);\n\n # Get watermark images size\n $sizesWatermark = $this->getImgSizes($this->imgWatermark);\n }\n\n # Get watermark position\n $positions = $this->getPositions($padding);\n\n # Apply watermark\n imagecopy($this->imgSource, $this->imgWatermark, $positions['x'], $positions['y'], 0, 0, $sizesWatermark['width'], $sizesWatermark['height']);\n\n # Get function name to use for save image\n $functionTarget = $this->getFunction($imgTarget, 'save');\n\n # Save image\n $functionTarget($this->imgSource, $imgTarget, 100);\n\n # Destroy temp images\n imagedestroy($this->imgSource);\n imagedestroy($this->imgWatermark);\n\t}", "function Image ($source, $title=\"\", $height, $hidth=\"\", $align=\"center\", $border=0, $valign=\"middle\", $class=\"\", \n\t\t\t$id=\"\", $name=\"\", $onAction1=\"\", $onType2=\"\", $onAction2 =\"\", $onAction3=\"\") {\n\t\t$this ->tag = '<img src=\" '.$source .' \" ';\n\t\tif ($name) $this->tag.='name=\" '.$name.' \" ';\n\t\tif ($height ==\"\") $height=16;\n\t\tif ($width ==\"\") $width=16;\n\t\t$this->tag .= 'height=\"' .$height. '\" width= \"'. $width.'\" ';\n\n\t\t$this->tag .='border=\"$border\" . ';\n\t\tif ($class) $this->tag .= 'border =\"'.$border.'\" ';\n\t\tif ($id)\t $this->tag .= 'class=\"'.class. '\" ';\n\t\tif ($title) $this ->tag .= 'title=\"' .$stitle.'\" alt=\"'.$title.'\" ';\n\t\tif ($align) $this ->tag .= 'align= 'align=\"'.$align. .'\" '';\n\t\t\n\n\n\n\t}", "function baseCss($nameCSS){ \n global $name;\n global $nameCSS;\n \n $cssbase = \".sprite{\\n\n background-image: url(\".'\"'.$name.'\"'.\");\\n\n background-repeat: no-repeat;\\n\n display: block;\\n\n}\\n\";\n $handle = fopen($nameCSS, \"w\");\n $write = fwrite($handle, $cssbase);\n}", "public function generate()\r\n {\r\n if(!extension_loaded('gd'))\r\n {\r\n return Console::error(\"GD library is currently not supported in your machine.\");\r\n }\r\n\r\n if(!file_exists($this->image_path))\r\n {\r\n return Console::error(\"Location is missing or invalid.\");\r\n }\r\n\r\n if(!empty($this->images))\r\n {\r\n Console::log(\"Sprite \" . static::$version);\r\n Console::success(\"Sprite generation has started...\");\r\n Console::lineBreak();\r\n\r\n Console::warn(\"Sprite Name :\\e[39m \" . $this->name);\r\n Console::warn(\"Location :\\e[39m \" . $this->location);\r\n Console::warn(\"Icons Found :\\e[39m \" . sizeof($this->images));\r\n Console::warn(\"Image Type :\\e[39m \" . implode(\", \", $this->extensions));\r\n Console::warn(\"Image Path :\\e[39m \" . $this->image_path . \"\\sprite-\" . $this->name . \".png\");\r\n Console::warn(\"CSS Path :\\e[39m \" . $this->css_path . \"\\sprite-\" . $this->name . \".css\");\r\n\r\n $tiles = array();\r\n $width = 0;\r\n $height = 0;\r\n $largest_height = 0;\r\n $largest_heights = array();\r\n $canvas_width = 0;\r\n $canvas_height = 0;\r\n $n = 0;\r\n\r\n foreach($this->images as $image)\r\n {\r\n $n++;\r\n\r\n if($image->exists() && \r\n $image->getWidth() >= $this->getMinSize() && \r\n $image->getHeight() >= $this->getMinSize() &&\r\n $image->getWidth() <= $this->getMaxSize() &&\r\n $image->getHeight() <= $this->getMaxSize()\r\n )\r\n {\r\n $x = $width;\r\n $y = $height;\r\n $z = false;\r\n\r\n if($image->getHeight() > $largest_height)\r\n {\r\n $largest_height = $image->getHeight();\r\n }\r\n\r\n $tiles[] = new Tile($image, $x, $y);\r\n\r\n if(($width + $image->getWidth()) > $width && ($width + $image->getWidth()) <= $this->max_width)\r\n {\r\n $width += $image->getWidth();\r\n }\r\n\r\n if($width > $canvas_width)\r\n {\r\n $canvas_width = $width;\r\n }\r\n\r\n if($n == sizeof($this->images) && !$z)\r\n {\r\n $z = true;\r\n $largest_heights[] = $largest_height;\r\n }\r\n\r\n if(($width + $image->getWidth()) > $this->max_width)\r\n {\r\n $width = 0;\r\n $height += $largest_height;\r\n\r\n if(!$z)\r\n {\r\n $largest_heights[] = $largest_height;\r\n }\r\n\r\n $largest_height = 0;\r\n }\r\n }\r\n }\r\n \r\n if(empty($tiles))\r\n {\r\n return Console::error(\"No image assets to compile.\");\r\n }\r\n\r\n $canvas_height = array_sum($largest_heights);\r\n $canvas = imagecreatetruecolor($canvas_width, $canvas_height);\r\n $file_img = $this->image_path . '\\sprite-' . $this->name . '.png';\r\n $file_css = $this->css_path . '\\sprite-' . $this->name . '.css';\r\n $copies = array();\r\n $css = array();\r\n\r\n Console::warn(\"Canvas Width :\\e[39m \" . $canvas_width . 'px');\r\n Console::warn(\"Canvas Height :\\e[39m \" . $canvas_height . 'px');\r\n Console::lineBreak();\r\n\r\n if(file_exists($file_img))\r\n {\r\n Console::success(\"Existing sprite image has been deleted.\");\r\n unlink($file_img);\r\n }\r\n\r\n if(file_exists($file_css))\r\n {\r\n Console::success(\"Existing sprite stylesheet has been deleted.\");\r\n unlink($file_css);\r\n }\r\n\r\n imagefill($canvas, 0, 0, IMG_COLOR_TRANSPARENT);\r\n imagesavealpha($canvas, true);\r\n imagealphablending($canvas, true);\r\n\r\n if(!is_null($this->base_url))\r\n {\r\n $background = $this->base_url . \"/sprite-\" . $this->name . '.png';\r\n }\r\n else\r\n {\r\n $background = \"sprite-\" . $this->name . '.png';\r\n }\r\n\r\n $css[] = \".sprite-\" . $this->name . \"{background-image:url('$background') !important;background-color:transparent;background-repeat:no-repeat}\";\r\n\r\n foreach($tiles as $tile)\r\n {\r\n $image = $tile->getImage();\r\n $resource = $tile->getResource();\r\n\r\n imagecopy($canvas, $resource, $tile->getX(), $tile->getY(), 0, 0, $tile->getWidth(), $tile->getHeight());\r\n\r\n $copies[] = $resource;\r\n $styles = \".sprite-\" . $this->name . \"-\" . $image->getName() . \"{\";\r\n $styles .= \"background-position:\" . ($tile->getX() * -1) . \"px \" . ($tile->getY() * -1) . \"px !important;\";\r\n $styles .= \"width:\" . $tile->getWidth() . \"px;\";\r\n $styles .= \"height:\" . $tile->getHeight() . \"px\";\r\n\r\n $css[] = $styles . \"}\";\r\n }\r\n\r\n Console::success(\"Sprite image has been generated.\");\r\n imagepng($canvas, $file_img, $this->quality);\r\n imagedestroy($canvas);\r\n\r\n foreach($copies as $copy)\r\n {\r\n imagedestroy($copy);\r\n }\r\n\r\n $file = fopen($file_css, 'w');\r\n fwrite($file, implode(PHP_EOL, $css));\r\n fclose($file);\r\n\r\n Console::success(\"Sprite stylesheet has been generated.\");\r\n Console::success(\"Sprite has been successfully generated.\");\r\n }\r\n else\r\n {\r\n Console::error(\"No image assets to compile.\");\r\n }\r\n }", "public function SettingsController_TouchIcon_Create($Sender) {\n $Sender->Permission('Garden.Settings.Manage');\n $Sender->AddSideMenu('dashboard/settings/touchicon');\n $Sender->Title(T('Touch Icon'));\n \n if ($Sender->Form->AuthenticatedPostBack()) {\n $Upload = new Gdn_UploadImage();\n try {\n // Validate the upload\n $TmpImage = $Upload->ValidateUpload('TouchIcon', FALSE);\n if ($TmpImage) {\n // Save the uploaded image\n $Upload->SaveImageAs(\n $TmpImage,\n PATH_ROOT.'/uploads/TouchIcon/apple-touch-icon.png',\n 114,\n 114,\n array('OutputType' => 'png', 'ImageQuality' => '8')\n );\n SaveToConfig('Plugins.TouchIcon.Uploaded', TRUE);\n }\n } catch (Exception $ex) {\n $Sender->Form->AddError($ex->getMessage());\n }\n \n $Sender->InformMessage(T('TouchIconSaved', \"Your icon has been saved.\"));\n }\n \n $Sender->Render($this->GetView('touchicon.php')); \n }", "public function __construct(Image $image){\n\t\t$this->addImage($image);\n\t}", "function createImage($type,$img_name){\n if (!$type){\n $type = $this->get_type($img_name);\n }\n\t\t \n switch ($type){\n case 'gif':\n if (function_exists('imagecreatefromgif'))\n $tmp_img=@imagecreatefromgif($img_name);\n break;\n case 'jpg':\n $tmp_img=imagecreatefromjpeg($img_name);\n break;\n case 'png':\n $tmp_img=imagecreatefrompng($img_name);\n break;\n\t\t\t\t case 'jpeg':\n $tmp_img=imagecreatefromjpeg($img_name);\n break;\n default:\n $tmp_img=imagecreatefromstring($img_name);\n break;\n }\n return $tmp_img;\n}", "function createImage($type,$img_name){\n if (!$type){\n $type = $this->get_type($img_name);\n }\n\t\t \n switch ($type){\n case 'gif':\n if (function_exists('imagecreatefromgif'))\n $tmp_img=@imagecreatefromgif($img_name);\n break;\n case 'jpg':\n $tmp_img=imagecreatefromjpeg($img_name);\n break;\n case 'png':\n $tmp_img=imagecreatefrompng($img_name);\n break;\n\t\t\t\t case 'jpeg':\n $tmp_img=imagecreatefromjpeg($img_name);\n break;\n default:\n $tmp_img=imagecreatefromstring($img_name);\n break;\n }\n return $tmp_img;\n}", "function load_sp_image_widget() {\n\tregister_widget('SP_Image_Widget');\n}", "public function add_image( &$data ) {\n\t\tif ( $this->context->has_image ) {\n\t\t\t$data['primaryImageOfPage'] = [ '@id' => $this->context->canonical . WPSEO_Schema_IDs::PRIMARY_IMAGE_HASH ];\n\t\t}\n\t}", "public function addToImage(\\Calcinai\\Siri\\Objects\\PtSituationElementStructureType\\ImagesAType\\ImageAType $image)\n {\n $this->image[] = $image;\n return $this;\n }", "public function addProfileImage() {\n\n\t\t\n\t\t$upload_path = LITHIUM_APP_PATH.\"/resources/tmp/images/\";\n $temp_file = Upload::handleUpload('test',$upload_path);\n\n $thumb = new \\app\\libraries\\jiles\\images\\Thumbnail($upload_path.$temp_file);\n\t\t$file_name = $this->_session['_id'].'.jpg';\n $thumb->createThumbnail(null,200);\n\n\t $thumb->save(LITHIUM_APP_PATH.\"/webroot/img/members/profile/\".$file_name);\n\n $thumb->createThumbnail(50,50);\n\n\t\t\n $thumb->save(LITHIUM_APP_PATH.\"/webroot/img/members/small/\".$file_name);\n \n \n // add time stamp on so that the picture will refresh in the view.\n\t\t\n $result = array(\"success\"=>true,\"file\"=>\"/img/members/profile/\".$file_name.\"?\".strtotime('now'));\n echo htmlspecialchars(json_encode($result), ENT_NOQUOTES);\n \n\t\t die();\n\t\t\t\n\t\t\n\t}", "public function ppRegister($path, array $params = array())\n {\n $this->spriteImageRegistry->register($path, $params);\n\n return $this;\n }", "function add_image($image,$imageTitle,$imageDescription,$imageUrlMain,$imageLink2Title,$imageLink2Url,$imageLink3Title,$imageLink3Url,$imageLink4Title,$imageLink4Url)\n\t\t{\n\t\t\t$this -> load -> helper('security');\n\n\t\t\t$data = array('Image' => $image, 'Title' => $imageTitle, 'Description' => $imageDescription, 'Urlmain' => $imageUrlMain, 'link2title' => $imageLink2Title, 'Link2' => $imageLink2Url, 'Link3title' => $imageLink3Title, 'Link3' => $imageLink3Url, 'Link4title' => $imageLink4Title, 'Link4' => $imageLink4Url);\n\n\t\t\t$this -> db -> insert('MediaSlider', $data);\n\t\t}", "function x_control_image( $settings = array() ) {\n\n // Setup\n // -----\n\n $t_pre = ( isset( $settings['t_pre'] ) ) ? $settings['t_pre'] . ' ' : '';\n $k_pre = ( isset( $settings['k_pre'] ) ) ? $settings['k_pre'] . '_' : '';\n $group = ( isset( $settings['group'] ) ) ? $settings['group'] : 'general';\n $options = ( isset( $settings['options'] ) ) ? $settings['options'] : array();\n $condition = ( isset( $settings['condition'] ) ) ? $settings['condition'] : array();\n $is_retina = ( isset( $settings['is_retina'] ) ) ? true : false;\n $width = ( isset( $settings['width'] ) ) ? true : false;\n $height = ( isset( $settings['height'] ) ) ? true : false;\n $has_link = ( isset( $settings['has_link'] ) ) ? true : false;\n $has_info = ( isset( $settings['has_info'] ) ) ? true : false;\n $alt_text = ( isset( $settings['alt_text'] ) ) ? true : false;\n\n\n // Data\n // ----\n\n $data = array(\n 'type' => 'image',\n 'title' => __( $t_pre . 'Image', '__x__' ),\n 'group' => $group,\n 'options' => $options,\n 'conditions' => x_module_conditions( $condition ),\n );\n\n\n // Keys\n // ----\n\n $keys = array(\n 'img_source' => $k_pre . 'image_src',\n );\n\n if ( $is_retina === true ) {\n $keys['is_retina'] = $k_pre . 'image_retina';\n }\n\n if ( $width === true ) {\n $keys['width'] = $k_pre . 'image_width';\n }\n\n if ( $height === true ) {\n $keys['height'] = $k_pre . 'image_height';\n }\n\n if ( $has_link === true ) {\n $keys['has_link'] = $k_pre . 'image_link';\n }\n\n if ( $has_info === true ) {\n $keys['has_info'] = $k_pre . 'image_info';\n }\n\n if ( $alt_text === true ) {\n $keys['alt_text'] = $k_pre . 'image_alt';\n }\n\n $data['keys'] = $keys;\n\n\n // Returned Value\n // --------------\n\n $control = array( $data );\n\n return $control;\n\n}", "protected function _createImage()\n {\n $this->_height = $this->scale * 60;\n $this->_width = 1.8 * $this->_height;\n $this->_image = imagecreate($this->_width, $this->_height);\n ImageColorAllocate($this->_image, 0xFF, 0xFF, 0xFF);\n }", "public function onInsertImage( $imageName, $imageDesc, $imagePath, $coordinates )\n\t{\n\t\t$objDrawing = new PHPExcel_Worksheet_Drawing();\n $objDrawing->setName($imageName);\n $objDrawing->setDescription($imageDesc);\n $objDrawing->setPath($imagePath);\n\n $objDrawing->setCoordinates($coordinates);\n $objDrawing->setWorksheet($this->objPHPExcel->getActiveSheet());\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}", "public function add_image($file)\n {\n $this->add(\"image\", $file);\n }", "public function testProfilePrototypeCreateImage()\n {\n\n }", "public function generate()\n {\n $self = $this;\n\n // Clear errors\n $this->_errors = array();\n\n // Normalize destination image path\n $this->imgDestPath = str_replace(array('\\\\', '/'), DIRECTORY_SEPARATOR, $this->imgDestPath);\n\n // Check modification time\n if ((is_dir($this->imgSourcePath)) && (is_file($this->imgDestPath))) {\n $imgSourceStat = stat($this->imgSourcePath);\n $imgDestStat = stat($this->imgDestPath);\n if ($imgSourceStat['mtime'] <= $imgDestStat['mtime']) {\n $this->addError(static::ERROR_SPRITE_EQUALS_TO_SOURCE);\n return;\n }\n }\n\n // Get list of images\n $fillImgList = function($dir) use(&$self, &$xOffset, &$imgList, &$imgWidth, &$imgHeight, &$fillImgList) {\n $imageList = glob($dir . DIRECTORY_SEPARATOR . '*.{' . $self->imgSourceExt . '}', GLOB_BRACE);\n foreach ($imageList as $imagePath) {\n\n // Skip previously generated sprite\n if ($imagePath === $self->imgDestPath) {\n continue;\n }\n\n // Get image sizes\n $imageSize = @getimagesize($imagePath);\n if ($imageSize === false) {\n $self->addError($self::ERROR_WRONG_IMAGE_FORMAT, $imagePath);\n continue;\n } else {\n list($itemWidth, $itemHeight, $itemType) = $imageSize;\n }\n\n // Check size\n if ($self->imgSourceSkipSize) {\n if (($itemWidth > $self->imgSourceSkipSize) || ($itemHeight > $self->imgSourceSkipSize)) {\n continue;\n }\n }\n\n // Inc sprite size\n $imgWidth += $itemWidth;\n if ($itemHeight > $imgHeight) {\n $imgHeight = $itemHeight;\n }\n\n // Push image to the list\n $imgList[$imagePath] = array(\n 'width' => $itemWidth,\n 'height' => $itemHeight,\n 'x' => $xOffset,\n 'ext' => image_type_to_extension($itemType, false),\n );\n\n $xOffset += $itemWidth;\n }\n $subdirList = glob($dir . DIRECTORY_SEPARATOR . '*', GLOB_ONLYDIR);\n foreach ($subdirList as $subdir) {\n $fillImgList($subdir);\n }\n };\n $xOffset = 0;\n $imgList = array();\n $imgWidth = $imgHeight = 0;\n $fillImgList($this->imgSourcePath);\n if (count($imgList) === 0) {\n $this->addError(static::ERROR_NO_SOURCE_IMAGES);\n return;\n }\n\n // Create transparent image\n $dest = imagecreatetruecolor($imgWidth, $imgHeight);\n imagesavealpha($dest, true);\n $trans_colour = imagecolorallocatealpha($dest, 0, 0, 0, 127);\n imagefill($dest, 0, 0, $trans_colour);\n\n // Init CSS\n $cssList = array();\n $cssList[] = array(\n 'selectors' => array(\n '[class^=\"' . $this->cssNamespace . '-\"]',\n '[class*=\" ' . $this->cssNamespace . '-\"]',\n ),\n 'styles' => array(\n 'background-image' => 'url(\"' . $this->cssImgUrl . '\")',\n 'background-position' => '0 0',\n 'background-repeat' => 'no-repeat',\n 'display' => 'inline-block',\n 'height' => '64px',\n 'vertical-align' => 'middle',\n 'width' => '64px',\n ),\n );\n\n // Copy all images, create CSS file and list of tags\n $this->_tagList = array();\n foreach ($imgList as $imgPath => $imgData) {\n\n // Copy image\n $imgCreateFunc = 'imagecreatefrom' . $imgData['ext'];\n if (!function_exists($imgCreateFunc)) {\n continue;\n }\n $src = $imgCreateFunc($imgPath);\n imagealphablending($src, true);\n imagesavealpha($src, true);\n imagecopy($dest, $src, $imgData['x'], 0, 0, 0, $imgData['width'], $imgData['height']);\n imagedestroy($src);\n\n // Append CSS (if not a magic action)\n $sourcePathLeng = mb_strlen($this->imgSourcePath);\n $class = '.' . $this->cssNamespace . '-' . mb_substr($imgPath, $sourcePathLeng + 1);\n $class = mb_substr($class, 0, mb_strlen($class) - mb_strlen($imgData['ext']) - 1);\n $class = str_replace(DIRECTORY_SEPARATOR, '-', $class);\n $isMagicAction = false;\n foreach (static::$magicActions as $magicAction) {\n $isMagicAction = (mb_substr($class, -mb_strlen('.' . $magicAction)) === '.' . $magicAction);\n if ($isMagicAction) {\n break;\n }\n }\n if (!$isMagicAction) {\n $cssList[] = array(\n 'selectors' => array($class),\n 'styles' => array(\n 'background-position' => '-' . $imgData['x'] . 'px 0',\n 'height' => $imgData['height'] . 'px',\n 'width' => $imgData['width'] . 'px',\n ),\n );\n }\n\n // Check if image has magic action (active, hover, target)\n if (!$isMagicAction) {\n $extPos = mb_strrpos($imgPath, $imgData['ext']);\n foreach (static::$magicActions as $magicAction) {\n if ($extPos !== false) {\n $magicActionPath = substr_replace($imgPath, $magicAction . '.' . $imgData['ext'], $extPos, strlen($imgData['ext']));\n $hasMagicAction = isset($imgList[$magicActionPath]);\n } else {\n $hasMagicAction = false;\n }\n if ($hasMagicAction) {\n $magicActionData = $imgList[$magicActionPath];\n $css = array();\n if (in_array($magicAction, array('checked', 'disabled'))) {\n $css['selectors'] = array(\n \"input:{$magicAction} + {$class}\",\n \"{$class}.{$magicAction}\",\n );\n } else {\n $css['selectors'] = array(\n \"{$class}:{$magicAction}\",\n \"{$class}.{$magicAction}\",\n \".wrap-{$this->cssNamespace}:{$magicAction} {$class}\",\n \".wrap-{$this->cssNamespace}.{$magicAction} {$class}\",\n );\n }\n $css['styles'] = array(\n 'background-position' => '-' . $magicActionData['x'] . 'px 0',\n 'background-position-x' => '-' . $magicActionData['x'] . 'px',\n 'height' => $magicActionData['height'] . 'px',\n 'width' => $magicActionData['width'] . 'px',\n );\n $cssList[] = $css;\n }\n }\n }\n\n // Append tag\n if (!$isMagicAction) {\n $this->_tagList[] = '<span class=\"' . mb_substr($class, 1) . '\"></span>';\n }\n }\n\n // Save image to file\n $imgDestExt = mb_strtolower(mb_substr($this->imgDestPath, mb_strrpos($this->imgDestPath, '.') + 1));\n switch ($imgDestExt) {\n case 'jpg':\n case 'jpeg':\n imagejpeg($dest, $this->imgDestPath);\n break;\n case 'gif':\n imagegif($dest, $this->imgDestPath);\n break;\n case 'png':\n imagepng($dest, $this->imgDestPath);\n break;\n default:\n $this->addError(static::ERROR_UNKNOWN_IMAGE_EXT, $this->imgDestPath);\n return;\n break;\n }\n imagedestroy($dest);\n\n // Save CSS file\n $cssString = '';\n foreach ($cssList as $css) {\n $cssString .= implode(',', $css['selectors']) . '{';\n foreach ($css['styles'] as $key => $value) {\n $cssString .= $key . ':' .$value . ';';\n }\n $cssString .= '}';\n }\n file_put_contents($this->cssPath, $cssString);\n }", "protected function image_style() {\n\t\t$this->start_controls_section(\n\t\t\t'section_style_retina_image',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Retina Image', 'boostify' ),\n\t\t\t\t'tab' => Controls_Manager::TAB_STYLE,\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'width',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Width', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'default' => array(\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'tablet_default' => array(\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'mobile_default' => array(\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'size_units' => array( '%', 'px', 'vw' ),\n\t\t\t\t'range' => array(\n\t\t\t\t\t'%' => array(\n\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t),\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t'max' => 1000,\n\t\t\t\t\t),\n\t\t\t\t\t'vw' => array(\n\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image img' => 'width: {{SIZE}}{{UNIT}};',\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image .wp-caption .widget-image-caption' => 'width: {{SIZE}}{{UNIT}}; display: inline-block;',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'space',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Max Width', 'boostify' ) . ' (%)',\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'default' => array(\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'tablet_default' => array(\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'mobile_default' => array(\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'size_units' => array( '%' ),\n\t\t\t\t'range' => array(\n\t\t\t\t\t'%' => array(\n\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image img' => 'max-width: {{SIZE}}{{UNIT}};',\n\t\t\t\t\t'{{WRAPPER}} .wp-caption-text' => 'max-width: {{SIZE}}{{UNIT}}; display: inline-block; width: 100%;',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'separator_panel_style',\n\t\t\tarray(\n\t\t\t\t'type' => Controls_Manager::DIVIDER,\n\t\t\t\t'style' => 'thick',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'retina_image_border',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Border Style', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'default' => 'none',\n\t\t\t\t'label_block' => false,\n\t\t\t\t'options' => array(\n\t\t\t\t\t'none' => __( 'None', 'boostify' ),\n\t\t\t\t\t'solid' => __( 'Solid', 'boostify' ),\n\t\t\t\t\t'double' => __( 'Double', 'boostify' ),\n\t\t\t\t\t'dotted' => __( 'Dotted', 'boostify' ),\n\t\t\t\t\t'dashed' => __( 'Dashed', 'boostify' ),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image-container .boostify-retina-img' => 'border-style: {{VALUE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t\t$this->add_control(\n\t\t\t'retina_image_border_size',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Border Width', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::DIMENSIONS,\n\t\t\t\t'size_units' => array( 'px' ),\n\t\t\t\t'default' => array(\n\t\t\t\t\t'top' => '1',\n\t\t\t\t\t'bottom' => '1',\n\t\t\t\t\t'left' => '1',\n\t\t\t\t\t'right' => '1',\n\t\t\t\t\t'unit' => 'px',\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'retina_image_border!' => 'none',\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image-container .boostify-retina-img' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'retina_image_border_color',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Border Color', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'retina_image_border!' => 'none',\n\t\t\t\t),\n\t\t\t\t'default' => '',\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image-container .boostify-retina-img' => 'border-color: {{VALUE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'image_border_radius',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Border Radius', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::DIMENSIONS,\n\t\t\t\t'size_units' => array( 'px', '%' ),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->start_controls_tabs( 'image_effects' );\n\n\t\t$this->start_controls_tab(\n\t\t\t'normal',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Normal', 'boostify' ),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'opacity',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Opacity', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'max' => 1,\n\t\t\t\t\t\t'min' => 0.10,\n\t\t\t\t\t\t'step' => 0.01,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image img' => 'opacity: {{SIZE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Css_Filter::get_type(),\n\t\t\tarray(\n\t\t\t\t'name' => 'css_filters',\n\t\t\t\t'selector' => '{{WRAPPER}} .boostify-retina-image img',\n\t\t\t)\n\t\t);\n\n\t\t$this->end_controls_tab();\n\n\t\t$this->start_controls_tab(\n\t\t\t'hover',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Hover', 'boostify' ),\n\t\t\t)\n\t\t);\n\t\t$this->add_control(\n\t\t\t'opacity_hover',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Opacity', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'max' => 1,\n\t\t\t\t\t\t'min' => 0.10,\n\t\t\t\t\t\t'step' => 0.01,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image:hover img' => 'opacity: {{SIZE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Css_Filter::get_type(),\n\t\t\tarray(\n\t\t\t\t'name' => 'css_filters_hover',\n\t\t\t\t'selector' => '{{WRAPPER}} .boostify-retina-image:hover img',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'hover_animation',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Hover Animation', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::HOVER_ANIMATION,\n\t\t\t)\n\t\t);\n\t\t$this->add_control(\n\t\t\t'background_hover_transition',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Transition Duration', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'max' => 3,\n\t\t\t\t\t\t'step' => 0.1,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image img' => 'transition-duration: {{SIZE}}s',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->end_controls_tab();\n\n\t\t$this->end_controls_tabs();\n\n\t\t$this->end_controls_section();\n\t}", "function add($pos,$url,$img,$title,$accesskey='')\n{\n\tif($pos==0)\n\t\t$this->reflist[]=array($url,$img,$title,$accesskey);\n\telse\n\t\tarray_unshift($this->reflist,array($url,$img,$title,$accesskey));\n}", "function MemImage($data, $x=null, $y=null, $w=0, $h=0, $link=''){\n\t\t\t$v = 'img'.md5($data);\n\t\t\t$GLOBALS[$v] = $data;\n\t\t\t$a = getimagesize('var://'.$v);\n\t\t\tif(!$a)\n\t\t\t\t$this->Error('Invalid image data');\n\t\t\t$type = substr(strstr($a['mime'],'/'),1);\n\t\t\t$this->Image('var://'.$v, $x, $y, $w, $h, $type, $link);\n\t\t\tunset($GLOBALS[$v]);\n\t\t}", "function add_image_size($name, $width = 0, $height = 0, $crop = \\false)\n {\n }", "function insertUrlImages($image_name){\r\n\t\t\r\n\t}", "function training_image_callback() {\n $output = array();\n $file_path = drupal_realpath('modules/image/sample.png');\n $source = (object) array(\n 'uid' => 1,\n 'uri' => $file_path,\n 'filename' => basename($file_path),\n 'filemime' => file_get_mimetype($file_path),\n );\n $directory = 'public://';\n file_copy($source, $directory, $replace = FILE_EXISTS_REPLACE);\n $array_style = image_styles();\n foreach ($array_style as $val) {\n $style_name = $val['name'];\n $path = 'public://sample.png';\n $attributes = array(\n 'class' => 'simple-image',\n );\n $output[] = theme('image_style', array(\n 'style_name' => $style_name,\n 'path' => $path,\n 'attributes' => $attributes,\n ));\n }\n\n return theme('item_list', array(\n 'items' => $output,\n 'type' => 'ol',\n 'title' => t('Default image styles'),\n ));\n}", "function imagesetstyle($image, $style)\n{\n}", "function construct_single_image(){\n\t\t\t\n\t\t\tvc_add_param( 'vc_single_image', \n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'heading' => __(\"Add Photo Stack Effect\", \"CURLYTHEME\"),\n\t\t\t\t\t'param_name' => 'photo_frame',\n\t\t\t\t\t'weight'\t=> 1\n\t\t\t\t) \n\t\t\t);\n\t\t\t\n\t\t\tvc_add_param( 'vc_single_image', \n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'heading' => __(\"Add Zoomify Effect\", \"CURLYTHEME\"),\n\t\t\t\t\t'param_name' => 'zoomify',\n\t\t\t\t\t'weight'\t=> 2\n\t\t\t\t) \n\t\t\t);\n\t\t\t\n\t\t}", "public function addPlashka($plashkaFile, $position, $backColor4plashka = null, $encode = true)\n {\n\n $this->initFrames();\n\n\n $currentIM = imagecreatefromgif($this->parsedfiles[0]);\n $currImgHeight = imagesy($currentIM);\n $currImgWidth = imagesx($currentIM);\n $plashkaIm = ImageHelpers::createIM($plashkaFile);\n\n $plashkaHeight = imagesy($plashkaIm);\n $plashkaWidth = imagesx($plashkaIm);\n $sprite = imagecreatetruecolor($currImgWidth, $currImgHeight + $plashkaHeight);\n imagealphablending($sprite, false);\n imagesavealpha($sprite, true);\n imagepalettecopy($sprite, $currentIM);\n imagefill($sprite, 0, 0, imagecolortransparent($currentIM));\n imagecolortransparent($sprite, imagecolortransparent($currentIM));\n\n imagecopy($sprite, $currentIM, 0, 0, 0, 0, $currImgWidth, $currImgHeight + $plashkaHeight);\n\n if ($position === ImageProcessor::PLASHKA_POSITION_BOTTOM || $position === ImageProcessor::PLASHKA_POSITION_TOP) {\n $this->currImgHeight += $plashkaHeight;\n }\n\n\n if ($backColor4plashka && $plashkaWidth < $currImgWidth) {\n if (strlen($backColor4plashka) !== 6) {\n throw new ImageException('incorrect backColor: '.$backColor4plashka);\n }\n $colorR = hexdec(substr($backColor4plashka, 0, 2));\n $colorG = hexdec(substr($backColor4plashka, 2, 2));\n $colorB = hexdec(substr($backColor4plashka, 4, 2));\n $plashkaColor = imagecolorallocate($sprite, $colorR, $colorG, $colorB);\n imagefilledrectangle($sprite, 0, $currImgHeight, $currImgWidth, $currImgHeight + $plashkaHeight, $plashkaColor);\n }\n imagecopy($sprite, $plashkaIm, 0, $currImgHeight, 0, 0, $plashkaWidth, $plashkaHeight);\n\n\n imagegif($sprite, $this->parsedfiles[0]);\n\n imagedestroy($sprite);\n imagedestroy($currentIM);\n\n\n if (!$encode) {\n return;\n }\n\n $this->encode();\n if ($this->clearFrames) {\n $this->clearframes();\n }\n\n }", "function register( ) {\n\t\t$this->name = \"Paste Picture\";\n\t\t$this->description = \"Paste screenshot(clipboard picture, print screen etc) directly into new issue or edit issue page (works with Chromium based browsers only)\";\n\t\t$this->page = 'config';\n\n\t\t$this->version = '1.0';\n\t\t$this->requires = array(\n\t\t\t'MantisCore' => '1.2.0',\n\t\t);\n\n\t\t$this->author = 'fatman';\n\t\t$this->contact = '[email protected]';\n\t\t$this->url = 'http://www.greendot.ro';\n\t}", "public function add_image( &$data ) {\n\t\t_deprecated_function( __METHOD__, 'WPSEO 14.0', 'Yoast\\WP\\SEO\\Generators\\Schema\\WebPage::add_image' );\n\n\t\t$this->stable->add_image( $data );\n\t}", "function addSmilieCode($smilieCode,$smilieImage){\n\t\t\t\n\t\t\t//load data from persistence object\n\t\t\t$storageType \t\t= $this->configManager->getStorageType();\n\t\t\t\t\t\t\t\t\t\t\n\t\t\tif(strtolower($storageType) == 'file'){\n\t\t\t\t$fileName = $this->configManager->getDataDir().'/'.$this->configManager->getSmileyConfigFile();\n\t\t\t\t$this->persistenceManager->setStorageType('file');\n\t\t\t\t$this->persistenceManager->setSmileyFile($fileName);\n\t\t\t}elseif(strtolower($storageType) == 'mysql'){\n\t\t\t\tdie(\"MySQL storage type, not implemented yet!\");\n\t\t\t}else{\n\t\t\t\tdie(\"Unknown storage type!\");\n\t\t\t}\n\t\t\t\n\t\t\t$this->persistenceManager->addSmileyCode($smilieCode,$smilieImage);\n\t\t\t\n\t\t}", "function getName() \t\t { return 'NP_ImageCreateThumbnail'; }", "public function drawFromPicture($PicType, $FileName, $X, $Y)\n {\n $X = (int) $X;\n $Y = (int) $Y;\n\n if (file_exists($FileName)) {\n list($Width, $Height) = $this->getPicInfo($FileName);\n\n if ($PicType == 1) {\n $Raster = imagecreatefrompng($FileName);\n } elseif ($PicType == 2) {\n $Raster = imagecreatefromgif($FileName);\n } elseif ($PicType == 3) {\n $Raster = imagecreatefromjpeg($FileName);\n } else {\n return 0;\n }\n\n $RestoreShadow = $this->Shadow;\n if ($this->Shadow && $this->ShadowX != 0 && $this->ShadowY != 0) {\n $this->Shadow = false;\n if ($PicType == 3) {\n $this->drawFilledRectangle(\n $X + $this->ShadowX,\n $Y + $this->ShadowY,\n $X + $Width + $this->ShadowX,\n $Y + $Height + $this->ShadowY,\n [\n \"R\" => $this->ShadowR,\n \"G\" => $this->ShadowG,\n \"B\" => $this->ShadowB,\n \"Alpha\" => $this->Shadowa\n ]\n );\n } else {\n $TranparentID = imagecolortransparent($Raster);\n for ($Xc = 0; $Xc <= $Width - 1; $Xc++) {\n for ($Yc = 0; $Yc <= $Height - 1; $Yc++) {\n $RGBa = imagecolorat($Raster, $Xc, $Yc);\n $Values = imagecolorsforindex($Raster, $RGBa);\n if ($Values[\"alpha\"] < 120) {\n $AlphaFactor = floor(\n ($this->Shadowa / 100) * ((100 / 127) * (127 - $Values[\"alpha\"]))\n );\n $this->drawAlphaPixel(\n $X + $Xc + $this->ShadowX,\n $Y + $Yc + $this->ShadowY,\n $AlphaFactor,\n $this->ShadowR,\n $this->ShadowG,\n $this->ShadowB\n );\n }\n }\n }\n }\n }\n $this->Shadow = $RestoreShadow;\n\n imagecopy($this->Picture, $Raster, $X, $Y, 0, 0, $Width, $Height);\n imagedestroy($Raster);\n }\n }", "public function addImage(ImageMedia $image);", "function register_block_core_avatar()\n {\n }", "function addIcon($i){\n return $this->add('Icon',null,'Icon')->set($i)->addClass('atk-size-mega');\n }", "public function addImage(Image $image){\n $this->images->add($image);\n }", "public function __construct($name)\n {\n $this->name = $name;\n $this->image = imagecreatetruecolor($this->width, $this->height);\n $this->createRectangle();\n }", "public function create_image(){\n\t\t$md5_hash = md5(rand(0,999));\n\t\t$security_code = substr($md5_hash, 15, 5);\n\t\t$this->Session->write('security_code',$security_code);\n\t\t$width = 80;\n\t\t$height = 22;\n\t\t$image = ImageCreate($width, $height);\n\t\t$black = ImageColorAllocate($image, 37, 170, 226);\n\t\t$white = ImageColorAllocate($image, 255, 255, 255);\n\t\tImageFill($image, 0, 0, $black);\n\t\tImageString($image, 5, 18, 3, $security_code, $white);\n\t\theader(\"Content-Type: image/jpeg\");\n\t\tImageJpeg($image);\n\t\tImageDestroy($image);\n\t}", "public function addImage($img_name){\n\t\t\n\t\t$db = $this->_connect;\n\t\t$img = $db->prepare(\"INSERT INTO img(id,img_name) VALUES( NULL,? )\");\n\t\t$img->bind_param(\"s\",$img_name);\n\t\tif(!$img->execute()){\n\t\t\techo $db->error;\n\t\t}\n\t\n\t}", "function createImage($idName) { //TODO: Add parameter for passing image files to use instead \n echo '<img src=\"/php/cms-img/file2.png\" id=\"' . $idName . '\" class=\"nested\"/>';\n }", "public static function _register()\n {\n self::assignElements([\n 'SubscriptionLevel' => ['type' => 'PictureManagerSubscriptionLevelCodeType', 'enum' => true, 'xmlns' => self::XMLNS],\n 'StorageUsed' => ['type' => 'int'],\n 'TotalStorageAvailable' => ['type' => 'int'],\n 'KeepOriginal' => ['type' => 'bool'],\n 'WatermarkEPS' => ['type' => 'bool'],\n 'WatermarkUserID' => ['type' => 'bool'],\n 'Folder' => ['type' => 'PictureManagerFolderType', 'xmlns' => self::XMLNS, 'cardinality' => '0..*']\n ], parent::NAME);\n\n self::assignAttributes([]);\n }", "public function generateSprite($outputFileName, $themeId = 0, $useInAssetsFolderToo = false, $directionX = true, $outputWidth = true)\n\t{\n\t\tif (!file_exists($this->outputFolder . $outputFileName))\n\t\t{\n\t\t\tif (!is_dir($this->outputFolder))\n\t\t\t{\n\t\t\t\tmkdir($this->outputFolder);\n\t\t\t}\n\t\t\t$this->generateImage($outputFileName, $themeId, $useInAssetsFolderToo, $directionX, $outputWidth);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (filemtime($this->outputFolder . $outputFileName) <= (time() - $this->iCacheTime))\n\t\t\t{\n\t\t\t\t$this->generateImage($outputFileName, $themeId, $useInAssetsFolderToo, $directionX, $outputWidth);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->strStylesheet = file_get_contents($this->outputFolder . $this->cssFilename);\n\t\t\t}\n\t\t}\n\t}", "function superfood_elated_woocommerce_add_hover_product_image() {\n\t\t$hover_image = get_post_meta(get_the_ID(), 'eltdf_product_hover_featured_image_meta', true);\n\t\t\n\t\tif(!empty($hover_image)) {\n\t\t\techo '<img class=\"eltdf-attachment-shop-catalog\" src=\"'.esc_url($hover_image).'\" alt=\"'.esc_html__('Product List Hover Image', 'superfood').'\" />';\n\t\t}\n\t}", "protected function _addParamToImage($img, $name, $text)\r\n\t{\r\n\t\t$config = $this->getConfig()->getChildren(\"image\")->getChildren($name);\r\n\t\tif(!$config->getInteger(\"show\"))\r\n\t\t{\r\n\t\t\treturn $img;\r\n\t\t}\r\n\t\t$color = $this->getColor($name, $img);\r\n\t\t$shColor = $this->getShadowColor($name, $img);\r\n\t\tif($config->getInteger(\"show\") && $config->getInteger(\"shadow\"))\r\n\t\t{\r\n\t\t\timagettftext($img, $config->getInteger(\"size\"), 0, $this->getShadowCoord(\"x\", $config), $this->getShadowCoord(\"y\", $config), $shColor, $this->getFont($config), $text);\r\n\t\t}\r\n\t\timagettftext($img, $config->getInteger(\"size\"), 0, $config->getInteger(\"x\"), $config->getInteger(\"y\"), $color, $this->getFont($config), $text);\r\n\t\treturn $img;\r\n\t}", "function register_image_sizes() {\n\t}", "public function addImageAction()\n\t\t{\n\n\t\t\tif(isset($_FILES['image']))\n\t\t\t{\n\t\t\t\t$imagename=$_FILES['image']['name'];\n\t\t\t\t$imagetemp=$_FILES['image']['tmp_name'];\n\t\t\t\t$imagesize=$_FILES['image']['size'];\n\t\t\t\t$imageext=pathinfo($imagename, PATHINFO_EXTENSION);\n\t\t\t\t$imagepath='Images/Projects/'.$imagename;\n\n\t\t\t\t$arrayext=array('jpg','JPG','jpeg','JPEG','png','PNG');\n\n\t\t\t\tif(in_array($imageext, $arrayext))\n\t\t\t\t{\n\t\t\t\t\tmove_uploaded_file($imagetemp, $imagepath);\n\n\t\t\t\t\techo $imagename;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "protected function addPix($pix)\n {\n $this->pix = $pix;\n $this->pix = \"pix/\" . $this->pix;\n $formatter = \"<img src={$this->pix} /><br/>\";\n echo $formatter;\n }", "public function testProfilePrototypeUpdateImage()\n {\n\n }", "function add_edit_hover_image($page_id, $id = NULL)\n\t{\n\t\t$data['hover_images'] = $this->Hover_image_model->get_hover_image_details($id, $page_id);\n\t\t$data['hover_image_id'] = $id;\n\t\tif(!empty($data['hover_images'])):\n\t\t\t\n\t\t\t$data['hover_image_details'] = json_decode($data['hover_images'][0]->hover_image_details);\n\t\t\tforeach($data['hover_image_details'] as $hover_image_detail => $val)\n\t\t\t{\t\t\t\t\t\n\t\t\t\t$data[$hover_image_detail] = $val;\n\t\t\t}\n\t\t\t$data['sort_order'] = $data['hover_images'][0]->sort_order;\n\t\t\t$data['status'] = $data['hover_images'][0]->status;\n\t\telse:\n\t\t\t$data['hover_image_id'] = \"\";\n\t\t\t$data['primary_image'] = \"\";\n\t\t\t$data['secondary_image'] = \"\";\n\t\t\t$data['hover_image_title'] = \"\";\n\t\t\t$data['title_color'] = \"\";\n\t\t\t$data['title_hover_color'] = \"\";\n\t\t\t$data['title_background_color'] = \"\";\n\t\t\t$data['title_bg_hover_color'] = \"\";\n\t\t\t$data['sort_order'] = \"\";\n\t\t\t$data['status'] = \"\";\n\t\t\t\n\t\tendif;\n\t\n\t\t$data['page_id'] = $page_id;\n\t\t$data['httpUrl'] = $this->admin_header->host_url();\n\t\t$data['ImageUrl'] = $this->admin_header->image_url();\n\t\t$data['website_folder_name'] = $this->admin_header->website_folder_name();\t\t\n\t\t$data['title'] = ($id != null) ? 'Edit Hover Image' : 'Add Hover Image' . ' | Administrator';\n\t\t$data['heading'] = (($id != null) ? 'Edit' : 'Add') . ' Hover Image';\n\t\t$this->load->view('template/meta_head', $data);\n\t\t$this->load->view('hover_image_header');\n\t\t$this->admin_header->index();\n\t\t$this->load->view('add_edit_hover_image', $data);\n\t\t$this->load->view('template/footer_content');\n\t\t$this->load->view('script');\n\t\t$this->load->view('template/footer');\n\t}", "public function addImage($url, $attributes = []);", "protected function retina() {\n\t\t$this->start_controls_section(\n\t\t\t'section_retina_image',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Retina Image', 'boostify' ),\n\t\t\t)\n\t\t);\n\t\t$this->add_control(\n\t\t\t'retina_image',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Choose Default Image', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::MEDIA,\n\t\t\t\t'dynamic' => array(\n\t\t\t\t\t'active' => true,\n\t\t\t\t),\n\t\t\t\t'default' => array(\n\t\t\t\t\t'url' => Utils::get_placeholder_image_src(),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t\t$this->add_control(\n\t\t\t'real_retina',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Choose Retina Image', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::MEDIA,\n\t\t\t\t'dynamic' => array(\n\t\t\t\t\t'active' => true,\n\t\t\t\t),\n\t\t\t\t'default' => array(\n\t\t\t\t\t'url' => Utils::get_placeholder_image_src(),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Image_Size::get_type(),\n\t\t\tarray(\n\t\t\t\t'name' => 'retina_image',\n\t\t\t\t'label' => __( 'Image Size', 'boostify' ),\n\t\t\t\t'default' => 'medium',\n\t\t\t)\n\t\t);\n\t\t$this->add_responsive_control(\n\t\t\t'align',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Alignment', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::CHOOSE,\n\t\t\t\t'options' => array(\n\t\t\t\t\t'left' => array(\n\t\t\t\t\t\t'title' => __( 'Left', 'boostify' ),\n\t\t\t\t\t\t'icon' => 'fa fa-align-left',\n\t\t\t\t\t),\n\t\t\t\t\t'center' => array(\n\t\t\t\t\t\t'title' => __( 'Center', 'boostify' ),\n\t\t\t\t\t\t'icon' => 'fa fa-align-center',\n\t\t\t\t\t),\n\t\t\t\t\t'right' => array(\n\t\t\t\t\t\t'title' => __( 'Right', 'boostify' ),\n\t\t\t\t\t\t'icon' => 'fa fa-align-right',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'default' => 'center',\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image-container, {{WRAPPER}} .boostify-caption-width' => 'text-align: {{VALUE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'caption',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Custom Caption', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t'default' => '',\n\t\t\t\t'placeholder' => __( 'Enter your image caption', 'boostify' ),\n\t\t\t\t'label_block' => true,\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'link',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Link', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::URL,\n\t\t\t\t'placeholder' => __( 'https://your-link.com', 'boostify' ),\n\t\t\t)\n\t\t);\n\t\t$this->end_controls_section();\n\t}", "function prfx_image_enqueue() \n\t\t{\n\t\t\tglobal $typenow;\n\t\t\tif( $typenow == self::POST_TYPE ) {\n\t\t\t\twp_enqueue_media();\n\t\t\t\n\t\t\t// To Do this fucking url should be added without the hardcoded Plugin name!!\n\t\t\t\n\t\t\t// Registers and enqueues the required javascript.\n\t\t\twp_register_script( 'meta-box-image', plugins_url( '/simplesharefile/js/meta-box-image.js'), array( 'jquery' ) );\n\t\t\twp_localize_script( 'meta-box-image', \n\t\t\t\t\t\t\t\t'meta_image', \n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'title' => __( 'Choose or Upload a File', 'prfx-textdomain' ),\n\t\t\t\t\t\t\t\t\t'button' => __( 'Use this File', 'prfx-textdomain' ),\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t);\n\t\t\t\twp_enqueue_script( 'meta-box-image' );\n\t\t\t}\n\t\t}", "public function addImage($url, $title='', $link='')\n {\n $this->image = new EFeedChannelImageRSS10($url, $title, $link);\n }", "public function store(){\n $url_path = 'assets/imgs/' . $_FILES['file']['name'];\n move_uploaded_file($_FILES['file']['tmp_name'], $url_path);\n $_POST['url_image'] = $url_path;\n echo parent::register($_POST) ? header('location: ?controller=admin') : 'Error en el registro';\n }", "public static function CreateImageElement(string $resourceName, string $placement = ElementPlacement::TopLeft, float $xOffset = 0, float $yOffset = 0)\r\n {\r\n $imageElement = new ImageElement(null, null);\r\n $imageElement->_ResourceName = $resourceName;\r\n $imageElement->Placement = $placement;\r\n $imageElement->XOffset = $xOffset;\r\n $imageElement->YOffset = $yOffset;\r\n return $imageElement;\r\n }", "abstract public function __construct(string $name, int $width, int $height, array $images);", "public function assign(Image $image)\n {\n $this->css .= $image->css();\n $this->rcss .= $image->rcss();\n }", "function thirdtheme_custom_icon()\n {\n add_theme_support('post-thumbnails');\n add_image_size('iconsize',55,45);\n $args = array(\n 'labels' => array('name' =>__('icon'),\n 'add_new' =>__('add new icon')),\n \n 'public' => true,\n 'menu_icon' => 'dashicons-art',\n 'show_in_menu' => true,\n 'has_archive' => true,\n 'supports' => array( 'title','editor','thumbnail' )); \n register_post_type('icon',$args);\n }", "protected function loadRegisteredSprites() {}", "public function register_image_sizes() {\n\n }", "public function ezbs_add_image_size(){\n \n $obj_ezc_add_image_size = Class_WP_ezClasses_Theme_Add_Image_Size_1::ez_new();\n\t \n\t // $obj_ezc_add_image_size->set_remove_width_height(false);\n\t \n\t // $obj_ezc_add_image_size->set_jpeg_quality(80);\t\n\t \n\t $arr_args['arr_args'] = $this->ezbs_add_image_size_args();\n\t \n\t // ais = add image size\n\t $obj_ezc_add_image_size->ez_ais($arr_args);\n\t \n\t //$obj_ezc_add_image_size->set_image_size_names_choose_defaults(false);\n\t \n\t // isnc = image_size_names_choose (with is a stock WP filter) \n\t $obj_ezc_add_image_size->ez_isnc($arr_args);\t \n\t \n }", "public function testComDayCqExtwidgetServletsImageSpriteServlet()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.day.cq.extwidget.servlets.ImageSpriteServlet';\n\n $crawler = $client->request('POST', $path);\n }", "public function add_watermark_to_( $image ) {\n\n\t\t// TODO Select graphics library from plugin settings (this is GD, add Imagick)\n\n\t\t$watermark_file = get_attached_file( $this->settings['watermark']['image'] );\n\n\t\t$watermark = imagecreatefrompng( $watermark_file );\n\t\t$new_image = imagecreatefromjpeg( $image );\n\n\t\t$margin = ( $this->settings['watermark']['position'] ) ? $this->settings['watermark']['position'] : 50;\n\n\t\t$watermark_width = imagesx( $watermark );\n\t\t$watermark_height = imagesy( $watermark );\n\t\t$new_image_width = imagesx( $new_image );\n\t\t$new_image_height = imagesy( $new_image );\n\n\t\tif ( $this->settings['watermark']['position'] == 'topleft' ) {\n\t\t\t$x_pos = $margin;\n\t\t\t$y_pos = $margin;\n\t\t} elseif ( $this->settings['watermark']['position'] == 'topright' ) {\n\t\t\t$x_pos = $new_image_width - $watermark_width - $margin;\n\t\t\t$y_pos = $margin;\n\t\t} elseif ( $this->settings['watermark']['position'] == 'bottomleft' ) {\n\t\t\t$x_pos = $margin;\n\t\t\t$y_pos = $new_image_height - $watermark_height - $margin;\n\t\t} elseif ( $this->settings['watermark']['position'] == 'bottomright' ) {\n\t\t\t$x_pos = $new_image_width - $watermark_width - $margin;\n\t\t\t$y_pos = $new_image_height - $watermark_height - $margin;\n\t\t} else {\n\t\t\t$x_pos = ( $new_image_width / 2 ) - ( $watermark_width / 2 );\n\t\t\t$y_pos = ( $new_image_height / 2 ) - ( $watermark_height / 2 );\n\t\t}\n\n\t\tif ( $this->settings['watermark']['position'] == 'repeat' ) {\n\t\t\timagesettile( $new_image, $watermark );\n\t\t\timagefilledrectangle( $new_image, 0, 0, $new_image_width, $new_image_height, IMG_COLOR_TILED );\n\t\t} else {\n\t\t\timagecopy( $new_image, $watermark, $x_pos, $y_pos, 0, 0, $watermark_width, $watermark_height );\t\t\t\t\n\t\t}\n\n\t\t$success = imagejpeg( $new_image, $image, 100 );\n\t\timagedestroy( $new_image );\n\t}", "public function setImg($name){\n if(is_null($this->getId())){\n return false;\n }\n\n $file = file_get_contents($name);\n\n if ( $file !== false ) {\n $name = 'cat-'.$this->getId().'-'.time().'.jpg';\n $this->getStorage()->store($name, $file);\n \n // update pictures for associated meal categories\n $this->updateAssociatedCategories();\n \n return true;\n }\n return false;\n }", "abstract public function createImage($instance_id, ImageSchema $image_schema);", "public function getSpriteImageRegistry()\n {\n return $this->spriteImageRegistry;\n }", "public function register(): void {\n\t\tif ( $this->type === 'script' ) {\n\t\t\t$this->register_script();\n\t\t}\n\n\t\tif ( $this->type === 'style' ) {\n\t\t\t$this->register_style();\n\t\t}\n\t}", "protected function register_style_team_member_icon() {\n\t\t$this->start_controls_section(\n\t\t\t'section_social_style',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Social Icons', 'uael' ),\n\t\t\t\t'tab' => Controls_Manager::TAB_STYLE,\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'social_icons_settings' => 'yes',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'icon_size',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Icon Size', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'min' => 6,\n\t\t\t\t\t\t'max' => 50,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon' => 'font-size: {{SIZE}}{{UNIT}};',\n\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon svg' => 'height: {{SIZE}}{{UNIT}}; width: {{SIZE}}{{UNIT}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'icon_padding',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Padding', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon' => 'padding: {{SIZE}}{{UNIT}};',\n\t\t\t\t),\n\t\t\t\t'tablet_default' => array(\n\t\t\t\t\t'unit' => 'em',\n\t\t\t\t),\n\t\t\t\t'mobile_default' => array(\n\t\t\t\t\t'unit' => 'em',\n\t\t\t\t),\n\t\t\t\t'range' => array(\n\t\t\t\t\t'em' => array(\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 5,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$icon_spacing = is_rtl() ? 'margin-left: {{SIZE}}{{UNIT}};' : 'margin-right: {{SIZE}}{{UNIT}};';\n\n\t\t$this->add_responsive_control(\n\t\t\t'icon_spacing',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Spacing', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon:not(:last-child)' => $icon_spacing,\n\t\t\t\t),\n\t\t\t\t'separator' => 'after',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'icon_color',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Color', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'default' => 'default',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'default' => __( 'Official Color', 'uael' ),\n\t\t\t\t\t'custom' => __( 'Custom', 'uael' ),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->start_controls_tabs(\n\t\t\t'icon_style_tabs'\n\t\t);\n\n\t\t$this->start_controls_tab(\n\t\t\t'icon_style_normal_tab',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Normal', 'uael' ),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'icon_color' => 'custom',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'icon_primary_color_normal',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Background Color', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'icon_color' => 'custom',\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon:not(:hover), {{WRAPPER}} .elementor-social-icon:not(:hover) svg' => 'background-color: {{VALUE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'icon_secondary_color_normal',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Icon Color', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'icon_color' => 'custom',\n\t\t\t\t),\n\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon:not(:hover) i' => 'color: {{VALUE}};',\n\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon:not(:hover) svg' => 'fill: {{VALUE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->end_controls_tab();\n\n\t\t$this->start_controls_tab(\n\t\t\t'icon_style_hover_tab',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Hover', 'uael' ),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'icon_color' => 'custom',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'icon_primary_color_hover',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Background Color', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'icon_color' => 'custom',\n\t\t\t\t),\n\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon:hover, {{WRAPPER}} .elementor-social-icon:hover svg' => 'background-color: {{VALUE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'icon_secondary_color_hover',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Icon Color', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'icon_color' => 'custom',\n\t\t\t\t),\n\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon:hover i' => 'color: {{VALUE}};',\n\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon:hover svg' => 'fill: {{VALUE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->end_controls_tab();\n\t\t$this->end_controls_tabs();\n\n\t\t$this->add_control(\n\t\t\t'social_icon_border',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Border Style', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'default' => 'none',\n\t\t\t\t'label_block' => false,\n\t\t\t\t'options' => array(\n\t\t\t\t\t'none' => __( 'None', 'uael' ),\n\t\t\t\t\t'solid' => __( 'Solid', 'uael' ),\n\t\t\t\t\t'double' => __( 'Double', 'uael' ),\n\t\t\t\t\t'dotted' => __( 'Dotted', 'uael' ),\n\t\t\t\t\t'dashed' => __( 'Dashed', 'uael' ),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon' => 'border-style: {{VALUE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t\t$this->add_control(\n\t\t\t\t'social_icon_border_size',\n\t\t\t\tarray(\n\t\t\t\t\t'label' => __( 'Border Width', 'uael' ),\n\t\t\t\t\t'type' => Controls_Manager::DIMENSIONS,\n\t\t\t\t\t'size_units' => array( 'px' ),\n\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t'top' => '1',\n\t\t\t\t\t\t'bottom' => '1',\n\t\t\t\t\t\t'left' => '1',\n\t\t\t\t\t\t'right' => '1',\n\t\t\t\t\t\t'unit' => 'px',\n\t\t\t\t\t),\n\t\t\t\t\t'condition' => array(\n\t\t\t\t\t\t'social_icon_border!' => 'none',\n\t\t\t\t\t),\n\t\t\t\t\t'selectors' => array(\n\t\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}; box-sizing:content-box;',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->add_control(\n\t\t\t\t'social_icon_border_color',\n\t\t\t\tarray(\n\t\t\t\t\t'label' => __( 'Border Color', 'uael' ),\n\t\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t\t'scheme' => array(\n\t\t\t\t\t\t'type' => Scheme_Color::get_type(),\n\t\t\t\t\t\t'value' => Scheme_Color::COLOR_1,\n\t\t\t\t\t),\n\t\t\t\t\t'condition' => array(\n\t\t\t\t\t\t'social_icon_border!' => 'none',\n\t\t\t\t\t),\n\t\t\t\t\t'default' => '',\n\t\t\t\t\t'selectors' => array(\n\t\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon' => 'border-color: {{VALUE}};',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t$this->add_control(\n\t\t\t'social_icon_border_hover_color',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Border Hover Color', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'scheme' => array(\n\t\t\t\t\t'type' => Scheme_Color::get_type(),\n\t\t\t\t\t'value' => Scheme_Color::COLOR_2,\n\t\t\t\t),\n\t\t\t\t'default' => '',\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementor-social-icon:hover' => 'border-color: {{VALUE}};',\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'social_icon_border!' => 'none',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'icon_hover_animation',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Hover Animation', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::HOVER_ANIMATION,\n\t\t\t)\n\t\t);\n\n\t\t$this->end_controls_section();\n\t}", "function create_image(){\r\n\t$wmark = imagecreatefrompng('img/stamp.png');\r\n\t//Load jpg image\r\n\t$image = imagecreatefromjpeg('img/image'.rand(1,3).'.jpg');\r\n\t\r\n\t//Get image width/height\r\n\t$width = imagesx($image);\r\n\t$height = imagesy($image);\r\n\t\r\n\t// Set the margins for the stamp and get the height/width of the stamp image\r\n\t$marge_right = 10;\r\n\t$marge_bottom = 10;\r\n\t$sx = imagesx($wmark);\r\n\t$sy = imagesy($wmark);\r\n\t\r\n\t// Copy the stamp image onto our photo using the margin offsets and the photo width to calculate positioning of the stamp. \r\n\timagecopy($image, $wmark, $width-$sx-$marge_right, $height-$sy-$marge_bottom,0,0,$sx,$sy);\r\n\t\r\n\t// Prepare the final image and save to path. If you only pass $image it will output to the browser instead of a file.\r\n\timagepng($image,\"generatedImage.png\");\r\n\t\r\n\t// Output and free memory\r\n\timagedestroy($image);\r\n}" ]
[ "0.566786", "0.5074075", "0.50409997", "0.49044564", "0.48734578", "0.48704782", "0.48675692", "0.48675692", "0.48449573", "0.48377955", "0.48265865", "0.48222038", "0.48125386", "0.4802835", "0.47948465", "0.47677484", "0.474333", "0.4741028", "0.47388023", "0.47375807", "0.4733604", "0.4729398", "0.4727732", "0.47252643", "0.47216573", "0.46996805", "0.4694471", "0.4686207", "0.46850848", "0.46819988", "0.46602625", "0.46551117", "0.46509647", "0.4649427", "0.46315053", "0.46315053", "0.46176195", "0.46100107", "0.4609769", "0.46089628", "0.4603815", "0.45986417", "0.45936522", "0.45794052", "0.4561952", "0.45602742", "0.45516622", "0.45464727", "0.45360756", "0.4520716", "0.4510022", "0.45087308", "0.4496519", "0.44900587", "0.44900316", "0.44810864", "0.4475379", "0.44745263", "0.44741997", "0.4473229", "0.4469814", "0.4461791", "0.44435996", "0.44430694", "0.44392028", "0.44338262", "0.44320273", "0.44289735", "0.44279256", "0.44253892", "0.4424786", "0.44185564", "0.44061568", "0.44035882", "0.439724", "0.43871266", "0.43677008", "0.4366726", "0.43642104", "0.43625867", "0.436209", "0.4357841", "0.43555298", "0.43479136", "0.433293", "0.43326253", "0.43256792", "0.43192342", "0.43061733", "0.43048775", "0.4293421", "0.42923814", "0.42883733", "0.42814517", "0.42804876", "0.42688107", "0.42667723", "0.42658108", "0.42541215", "0.4247604" ]
0.47099936
25
styleWithBackground() Generate the image tag for the style node. Available parameters are: inline: true to use style attribute instead of class. background: allow to choose a different backgroundrepeat value (default to norepeat). augmentX: add a offset to background X position. augmentY: add a offset to background Y position. The additionnal attributes are defined like this: array('class' => 'additionnalclass', 'id' => 'itemid');
public function image_tag($path, $params = array(), $attributes = array()) { return $this->getStyleNode($path)->image_tag($params, $attributes); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function image_create($background = null)\r\n {\r\n // Check for GD2 support\r\n if ( ! \\function_exists('imagegd2') ) \\Core::show_500(\\__('captcha.requires_GD2'));\r\n\r\n // Create a new image (black)\r\n static::$image = \\imagecreatetruecolor(static::$config['width'], static::$config['height']);\r\n\r\n // Use a background image\r\n if ( !empty($background) )\r\n {\r\n /*\r\n // Create the image using the right function for the filetype\r\n $function = '\\\\imagecreatefrom' . static::image_type($filename);\r\n static::$background_image = $function($background);\r\n\r\n // Resize the image if needed\r\n if ( \\imagesx(static::background_image) !== static::$config['width'] || \\imagesy(static::background_image) !== static::$config['height'] )\r\n {\r\n \\imagecopyresampled(static::image, static::background_image, 0, 0, 0, 0, static::$config['width'], static::$config['height'], \\imagesx(static::background_image), \\imagesy(static::background_image));\r\n }\r\n\r\n // Free up resources\r\n \\imagedestroy(static::background_image);\r\n */\r\n }\r\n }", "public function addImage($src, $style = null) {\n\t\t$image = new PHPWord_Section_Image($src, $style);\n\t\t\n\t\tif(!is_null($image->getSource())) {\n\t\t\t$rID = PHPWord_Media::addSectionMediaElement($src, 'image');\n\t\t\t$image->setRelationId($rID);\n\t\t\t\n\t\t\t$this->_elementCollection[] = $image;\n\t\t\treturn $image;\n\t\t} else {\n\t\t\ttrigger_error('Source does not exist or unsupported image type.');\n\t\t}\n\t}", "public function addImage($src, $style = null)\n {\n $image = new Image($src, $style);\n if (!is_null($image->getSource())) {\n if ($this->_insideOf == 'section') {\n $rID = Media::addSectionMediaElement($src, 'image', $image);\n } elseif ($this->_insideOf == 'header') {\n $rID = Media::addHeaderMediaElement($this->_pCount, $src, $image);\n } elseif ($this->_insideOf == 'footer') {\n $rID = Media::addFooterMediaElement($this->_pCount, $src, $image);\n }\n $image->setRelationId($rID);\n $this->_elementCollection[] = $image;\n return $image;\n } else {\n throw new InvalidImageException;\n }\n }", "public function setBackgroundImage($url);", "function featuredBG($size = 'full', $pos_x = 'center', $pos_y = 'center', $repeat = 'no-repeat'){\n $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), $size );\n $url = $thumb['0'];\n echo 'style=\"background: url('. $url .')'. $pos_x .' '. $pos_y .' ' . $repeat .'\"';\n}", "public function setBgImage($image, $repeat = StyleConstants::REPEAT,\n\t\t\t\t\t\t\t\t$position = -1) {\n\t\t$file = fopen($image, 'r');\n\t\tif (!$file) {\n\t\t\tthrow new StyleException('Cannot open image');\n\t\t}\n\t\tswitch($repeat) {\n\t\t\tcase StyleConstants::REPEAT:\n\t\t\t\t$repeat = 'repeat';break;\n\t\t\tcase StyleConstants::NO_REPEAT:\n\t\t\t\t$repeat = 'no-repeat';break;\n\t\t\tcase StyleConstants::STRETCH:\n\t\t\t\t$repeat = 'stretch';break;\n\t\t\tdefault:\n\t\t\t\tthrow new StyleException('Invalid repeat value');\n\t\t}\n\t\tswitch($position) {\n\t\t\tcase -1:\n\t\t\t\tbreak;\n\t\t\tcase StyleConstants::LEFT:\n\t\t\t\t$position = 'left';break;\n\t\t\tcase StyleConstants::RIGHT:\n\t\t\t\t$position = 'right';break;\n\t\t\tcase StyleConstants::CENTER:\n\t\t\t\t$position = 'center';break;\n\t\t\tcase StyleConstants::TOP:\n\t\t\t\t$position = 'top';break;\n\t\t\tcase StyleConstants::BOTTOM:\n\t\t\t\t$position = 'left';break;\n\t\t\tdefault:\n\t\t\t\tthrow new StyleException('Invalid background-position value');\n\t\t}\n\t\t$dataImg = fread($file, filesize($image));\n\t\t$dateImgB64 = base64_encode($dataImg);\n\t\tfclose($file);\n\t\t$binaryElement = $this->contentDocument->createElement('office:binary-data', $dateImgB64);\n\t\t$imageElement = $this->contentDocument->createElement('style:background-image');\n\t\t$imageElement->setAttribute('style:repeat', $repeat);\n\t\tif ($position != -1) {\n\t\t\t$imageElement->setAttribute('style:position', $position);\n\t\t}\n\t\t$imageElement->appendChild($binaryElement);\n\t\t$this->tableProp->appendChild($imageElement);\n\t}", "function wprt_background_css( $bg ) {\n\t// Define vars\n\t$css = '';\n\t$bg_style = $bg .'_style';\n\n\tif ( $bg_img = wprt_get_mod( $bg, null ) ) {\n\t\t$css .= 'background-image: url('. esc_url( $bg_img ). ');';\n\t}\n\n\tif ( $bg_style = wprt_get_mod( $bg_style ) ) {\n\t\tif ( 'fixed' == $bg_style ) {\n\t\t\t$css .= ' background-position: center center; background-repeat: no-repeat; background-attachment: fixed; background-size: cover;';\n\t\t} elseif ( 'fixed-top' == $bg_style ) {\n\t\t\t$css .= ' background-position: center top; background-repeat: no-repeat; background-attachment: fixed; background-size: cover;';\n\t\t} elseif ( 'fixed-bottom' == $bg_style ) {\n\t\t\t$css .= ' background-position: center bottom; background-repeat: no-repeat; background-attachment: fixed; background-size: cover;';\n\t\t} elseif ( 'cover' == $bg_style ) {\n\t\t\t$css .= ' background-repeat: no-repeat; background-position: center center; background-size: cover;';\n\t\t} elseif ( 'center-top' == $bg_style ) {\n\t\t\t$css .= ' background-repeat: no-repeat; background-position: center top;';\n\t\t} elseif ( 'repeat' == $bg_style ) {\n\t\t\t$css .= ' background-repeat: repeat;';\n\t\t} elseif ( 'repeat-x' == $bg_style ) {\n\t\t\t$css .= ' background-repeat: repeat-x;';\n\t\t} elseif ( 'repeat-y' == $bg_style ) {\n\t\t\t$css .= ' background-repeat: repeat-y;';\n\t\t}\n\t}\n\n\treturn esc_attr( $css );\n}", "function gs_image_markup_responsive_background( $attributes, $image = null ) {\n\n\tif ( isset( $attributes['src'] ) ) {\n\t\t$attributes['data-src'] = $attributes['src'];\n\t\t$attributes['src'] = ''; //could add default small image or a base64 encoded small image here\n\t}\n\tif ( isset( $attributes['srcset'] ) ) {\n\t\t$attributes['data-srcset'] = $attributes['srcset'];\n\t\t$attributes['srcset'] = '';\n\t}\n\tif ( $image ) { //mainly for IE 11 support\n\t\t$attributes['data-fallback'] = wp_get_attachment_image_url( $image->ID, 'large' );\n\t}\n\n\treturn $attributes;\n\n}", "function background_image()\n {\n }", "function backgroundToImg($htmlContent)\n{\n $regex = '/background-image[ ]{0,}:[ ]{0,}url\\([\\'\"]{0,}(.*?)[\\'\"]{0,}\\)/';\n $htmlContent = str_get_html($htmlContent);\n\n foreach ($htmlContent->find('*') as $element) {\n if (preg_match($regex, $element->style, $matches) > 0) {\n $element->outertext = '<img style=\"display:block;\" src=\"' . $matches[1] . '\" />';\n }\n }\n\n return $htmlContent;\n}", "function background_img($link){\n\t\t\t\techo \"<style> body{background: url(\". $link. \");\n\t\t\t\t\t\t\t\t\tbackground-repeat: no-repeat;\n\t\t\t\t\t\t\t\t\tbackground-size: cover;\n\t\t\t\t\t\t\t\t\t} </style>\";\n\t\t\t}", "function imagesetstyle($image, $style)\n{\n}", "public function background(string $backgroundStyle): CustomTextCard\n {\n return $this->setMeta('styleBackground', $backgroundStyle);\n }", "function bgimg($img){\n\treturn \"background: url('\".$img.\"'); background-size: cover; background-position: 0 50%;\";\n}", "public function addStyle(string $name, string $src, array $attributes = []);", "static function create_background_style_attr( $attrs ) {\n\t\t$bg_style = array();\n\n\t\tif ( ! empty( $attrs ) ) {\n\t\t\tforeach ( $attrs as $key => $value ) {\n\t\t\t\t$trimmed_val = trim( $value );\n\t\t\t\tif ( ! empty( $trimmed_val ) ) {\n\t\t\t\t\tif ( 'background-image' === $key ) {\n\t\t\t\t\t\t$bg_style[] = $key . ': url(' . esc_url( $trimmed_val ) . ')';\n\t\t\t\t\t}\n\t\t\t\t\telse if ( 'background-color' === $key ) {\n\t\t\t\t\t\t// to overwrite the gradient set with CSS background property\n\t\t\t\t\t\t$bg_style[] = 'background: ' . $trimmed_val;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$bg_style[] = $key . ': ' . $trimmed_val;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( empty( $bg_style ) ) {\n\t\t\treturn '';\n\t\t}\n\t\telse {\n\t\t\treturn join( '; ', $bg_style );\n\t\t}\n\n\t}", "public static function theme_img($src, $attributes = '')\n {\n $src = URL::site_url(\n CI::$APP->config->item('theme_location') \n . CI::$APP->template->theme . '/' \n . self::$img_folder \n . $src\n );\n \n return Tag::image($src, $attributes);\n }", "function get_background_image()\n {\n }", "function beeldgeluid_image_style($variables) {\n $style_name = $variables['style_name'];\n $path = $variables['path'];\n\n // theme_image() can only honor the $getsize parameter with local file paths.\n // The derivative image is not created until it has been requested so the file\n // may not yet exist, in this case we just fallback to the URL.\n $style_path = image_style_path($style_name, $path);\n if (!file_exists($style_path)) {\n $style_path = image_style_url($style_name, $path);\n }\n $variables['path'] = $style_path;\n\n if (is_file($style_path)) {\n if (list($width, $height, $type, $attributes) = @getimagesize($style_path)) {\n $variables['width'] = $width;\n $variables['height'] = $height;\n }\n }\n\n return theme('image', $variables);\n}", "function inject_css(){\n $group_id=bp_get_current_group_id();\n if(empty($group_id))\n return;\n $image=bgclite_get_image($group_id);\n \n if(empty($image)|| apply_filters('bp_group_customizer_iwilldo_it_myself',false))\n return;\n ?>\n <style type=\"text/css\">\n body.is-single-group{\n background:url(<?php echo $image;?>) center top fixed no-repeat,url(\"http://sill-web.de/gzc/wp-content/themes/yoo_master2_wp/css/navy_blue.png\") repeat;\n }\n </style> \n <?php\n\n }", "function extra_custom_background_cb() {\n\t$background = set_url_scheme( get_background_image() );\n\n\t// $color is the saved custom color.\n\t// A default has to be specified in style.css. It will not be printed here.\n\t$color = get_background_color();\n\n\tif ( $color === get_theme_support( 'custom-background', 'default-color' ) ) {\n\t\t$color = false;\n\t}\n\n\tif ( ! $background && ! $color ) {\n\t\treturn;\n\t}\n\n\t$style = $color ? \"background-color: #$color;\" : '';\n\n\tif ( $background ) {\n\t\t$image = \" background-image: url('$background');\";\n\n\t\t$_repeat = get_theme_mod( 'background_repeat', get_theme_support( 'custom-background', 'default-repeat' ) );\n\t\tif ( ! in_array( $_repeat, array( 'no-repeat', 'repeat-x', 'repeat-y', 'repeat' ) ) ) {\n\t\t\t$_repeat = 'repeat';\n\t\t}\n\n\t\t$repeat = \" background-repeat: $_repeat;\";\n\n\t\tif ( 'no-repeat' == $_repeat ) {\n\t\t\t$repeat .= \" background-size: cover;\";\n\t\t}\n\n\t\t$position = get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', 'default-position-x' ) );\n\n\t\tif ( ! in_array( $position, array( 'center', 'right', 'left' ) ) ) {\n\t\t\t$position = 'left';\n\t\t}\n\n\t\t$position = \" background-position: top $position;\";\n\n\t\t$attachment = get_theme_mod( 'background_attachment', get_theme_support( 'custom-background', 'default-attachment' ) );\n\n\t\tif ( ! in_array( $attachment, array( 'fixed', 'scroll' ) ) ) {\n\t\t\t$attachment = 'scroll';\n\t\t}\n\n\t\t$attachment = \" background-attachment: $attachment;\";\n\n\t\t$style .= $image . $repeat . $position . $attachment;\n\t}\n?>\n<style type=\"text/css\" id=\"extra-custom-background-css\">\nbody.custom-background { <?php echo trim( $style ); ?> }\n</style>\n<?php\n}", "public static function edit_image()\n{\n\n\n\t/*\n\t* Change Background\n\t*/\n\n\t/*\n\t* Change other setting\n\t*/\n}", "public static function image_style($path, $style_name, $options = array()) {\n $image = array(\n 'path' => $path,\n 'style_name' => $style_name,\n );\n\n return theme('image_style', $image + $options);\n }", "function vibe_custom_background_cb(){\n $background = set_url_scheme( get_background_image() );\n\n // $color is the saved custom color.\n // A default has to be specified in style.css. It will not be printed here.\n $color = get_theme_mod( 'background_color' );\n\n if ( ! $background && ! $color )\n return;\n\n $style = $color ? \"background-color: #$color;\" : '';\n\n if ( $background ) {\n $image = \" background-image: url('$background');\";\n\n $repeat = get_theme_mod( 'background_repeat', get_theme_support( 'custom-background', 'default-repeat' ) );\n if ( ! in_array( $repeat, array( 'no-repeat', 'repeat-x', 'repeat-y', 'repeat' ) ) )\n $repeat = 'repeat';\n $repeat = \" background-repeat: $repeat;\";\n\n $position = get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', 'default-position-x' ) );\n if ( ! in_array( $position, array( 'center', 'right', 'left' ) ) )\n $position = 'left';\n $position = \" background-position: top $position;\";\n\n $attachment = get_theme_mod( 'background_attachment', get_theme_support( 'custom-background', 'default-attachment' ) );\n if ( ! in_array( $attachment, array( 'fixed', 'scroll' ) ) )\n $attachment = 'scroll';\n $attachment = \" background-attachment: $attachment;\";\n\n $style .= $image . $repeat . $position . $attachment;\n\n echo '\n <div id=\"background_fixed\">\n <img src=\"'.$background.'\" />\n </div>\n <style type=\"text/css\">\n #background_fixed{position: fixed;top:0;left:0;width:200%;height:200%;}\n </style>\n ';\n }\n\n}", "function smart_img( $src = '', $args = '' ){\n\t$bgstyles_defaults = array( \n\t\t\t\t\t\t\t'background-repeat' => 'no-repeat', \n\t\t\t\t\t\t\t'background-position' => 'center', \n\t\t\t\t\t\t\t'background-size' => 'contain', \n\t\t\t\t\t\t\t'height' => '230px');\n\t$defaults = array(\n\t\t'type'\t\t\t\t=>\t'imgdir',\t// thumbnail, imgdir, placeholder, input\n\t\t'id'\t\t\t\t=>\t'', // image id attribute\n\t\t'class'\t\t\t\t=>\t'', // image class attribute\n\t\t'alt'\t\t\t\t=>\t'', // image alt attribute\n\t\t'title'\t\t\t\t=>\t'', // image title attribute\n\t\t'data'\t\t\t\t=>\tarray(), // data tags associative array. \n\t\t'image_size'\t\t=>\t'full', // base on image size\n\t\t'resize'\t\t\t=>\ttrue, // apply resizer\t\n\t\t'width'\t\t\t\t=>\t640,\n\t\t'height'\t\t\t=>\t400,\n\t\t'crop'\t\t\t\t=>\ttrue, \n\t\t'retina'\t\t\t=> \tfalse, // retina image twice the dimensions\n\t\t'return'\t\t\t=>\t'image', // image, src\n\t\t'bgbox'\t\t\t\t=>\tfalse, // set image as background on a <div>\n\t\t'bgstyles'\t\t\t=>\t$bgstyles_defaults, // styles for bgbox associative array\n\t\t'fallback'\t\t\t=>\t'', // fallback image from /images/\n\t\t'echo'\t\t\t\t=>\ttrue\n\t);\n\t$args = wp_parse_args( $args, $defaults );\n\textract( $args, EXTR_SKIP );\n\t$bgstyles = wp_parse_args( $bgstyles, $bgstyles_defaults );\n\n\t$retina = ($retina === true || $retina === 'true' ? true : false);\n\t$resize = ($resize === true || $resize === 'true' ? true : false);\n\t$crop = ($crop === true || $crop === 'true' ? true : false);\n\t$bgbox = ($bgbox === true || $bgbox === 'true' ? true : false);\n\t$echo = ($echo === true || $echo === 'true' ? true : false);\n\n\tif( strpos($type, ',') ) : $type_array = explode( ',', $type); $type = $type_array[0]; endif;\n\t\n\tswitch ( $type ) {\n\t\tcase 'thumbnail':\n\t\t\t$image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), $image_size );\n\t\t\t$image_url = $image_url[0];\n\t\t\tbreak;\n\n\t\tcase 'placeholder':\n\t\t\t$image_url = 'http://lorempixel.com/' . $width . '/' . $height;\n\t\t\tif($type_array) $image_url .= '/' . $type_array[1] . '/' . rand(1,10);\n\t\t\tbreak;\n\n\t\tcase 'input':\n\t\t\t$image_url = $src;\n\t\t\tbreak;\n\t\t\n\t\tdefault:\n\t\t\t$image_url = get_stylesheet_directory_uri() . '/images/' . $src;\n\t\t\tif( !$src ) $image_url = 'http://lorempixel.com/' . $width . '/' . $height;\n\t\t\tbreak;\n\t}\n\n\tif( $type != 'placeholder' ){\n\t\tif( $resize ){\n\t\t\t$image_url = matthewruddy_image_resize( $image_url, $width, $height, $crop, $retina );\n\t\t\tif(is_array($image_url)) {\n\t\t\t\t$image_url = $image_url['url'];\n\t\t\t}else{\n\t\t\t\t$image_url = false;\n\t\t\t}\n\t\t}\n\t}\n\tif( !$image_url ){\n\t\tif($fallback){\n\t\t\t$image_url = get_stylesheet_directory_uri() . '/images/' . $fallback;\n\t\t\tif( $resize ){\n\t\t\t\t$image_url = matthewruddy_image_resize( $image_url, $width, $height, $crop, $retina );\n\t\t\t\t$image_url = $image_url['url'];\n\t\t\t}\n\t\t}\n\t}\n\n\tif( $data ){\n\t\tforeach ($data as $key => $value) {\n\t\t\t$data_return .= 'data-'. $key;\n\t\t\tif( $value ) $data_return .= '=\"' .$value . '\" ';\n\t\t}\n\t}\n\n\tif( $bgstyles ){\n\t\tforeach ($bgstyles as $key => $value) {\n\t\t\t$bgstyles_return .= $key . ':' . $value . ';';\n\t\t}\n\t}\n\n\tif( $bgbox ){\n\t\t$image_return = '<div';\n\t\tif( $id ) $image_return .= ' id=\"' . $id . '\"';\n\t\t$image_return .= ' class=\"smart-aspect ' . $class . '\"';\n\t\t$image_return .= ' style=\"background-image:url(' . $image_url . ');';\n\t\t$image_return .= $bgstyles_return . '\"';\n\t\tif( $data ) $image_return .= ' ' . $data_return;\n\n\t\t$image_return .= '></div>';\n\t\n\t}else{\n\t\t$image_return = '<img src=\"' . $image_url . '\"';\n\n\t\tif( $id ) $image_return .= ' id=\"' . $id . '\"';\n\t\tif( $class ) $image_return .= ' class=\"' . $class . '\"';\n\t\tif( $alt ) $image_return .= ' alt=\"' . $alt . '\"';\n\t\tif( $title ) $image_return .= ' title=\"' . $title . '\"';\n\t\tif( $data ) $image_return .= ' ' . $data_return;\n\n\t\t$image_return .= '/>';\n\t}\n\n\tif( $return == 'src' ) $image_return = $image_url;\n\n\tif(!$image_url) $image_return = '';\n\t\n\tif( $echo ) {\n\t\techo $image_return;\n\t} else {\n\t\treturn $image_return;\n\t}\n\t\n}", "public function getBackgroundImage()\r\n {\r\n $orientation = $this->getOrientation();\r\n $backgroundImage = '';\r\n /** @var $helperImage Mage_XmlConnect_Helper_Image */\r\n $helperImage = Mage::helper('xmlconnect/image');\r\n\r\n switch ($orientation) {\r\n case Mage_XmlConnect_Helper_Ipad::ORIENTATION_LANDSCAPE:\r\n $configPath = 'conf/body/backgroundIpadLandscapeImage';\r\n $imageUrlOrig = $this->getData($configPath);\r\n if ($imageUrlOrig) {\r\n $width = Mage_XmlConnect_Helper_Ipad::PREVIEW_LANDSCAPE_BACKGROUND_WIDTH;\r\n $height = Mage_XmlConnect_Helper_Ipad::PREVIEW_LANDSCAPE_BACKGROUND_HEIGHT;\r\n $backgroundImage = $helperImage->getCustomSizeImageUrl($imageUrlOrig, $width, $height);\r\n } else {\r\n $backgroundImage = $this->getPreviewImagesUrl('ipad/background_home_landscape.jpg');\r\n }\r\n break;\r\n case Mage_XmlConnect_Helper_Ipad::ORIENTATION_PORTRAIT:\r\n $configPath = 'conf/body/backgroundIpadPortraitImage';\r\n $imageUrlOrig = $this->getData($configPath);\r\n if ($imageUrlOrig) {\r\n $width = Mage_XmlConnect_Helper_Ipad::PREVIEW_PORTRAIT_BACKGROUND_WIDTH;\r\n $height = Mage_XmlConnect_Helper_Ipad::PREVIEW_PORTRAIT_BACKGROUND_HEIGHT;\r\n $backgroundImage = $helperImage->getCustomSizeImageUrl($imageUrlOrig, $width, $height);\r\n } else {\r\n $backgroundImage = $this->getPreviewImagesUrl('ipad/background_portrait.jpg');\r\n }\r\n break;\r\n default:\r\n Mage::throwException(\r\n Mage::helper('xmlconnect')->__('Wrong Ipad background image orientation has been specified: \"%s\".', $orientation)\r\n );\r\n break;\r\n }\r\n return $backgroundImage;\r\n }", "protected function _add_render_attributes() {\n \n // use parent attributes\n parent::_add_render_attributes();\n \n $this->add_render_attribute(\n 'wrapper', 'class', [\n $this->get_name() . '-background-image',\n ]\n ); \n \n }", "function get_placeholder_svg( int $attachment_id, array $image_attr = [], string $style = 'color-block-grid' ) : string {\n\t$svg_string = '';\n\tswitch ( $style ) {\n\t\tcase 'color-block-grid':\n\t\t\t$grid = get_post_meta( $attachment_id, 'grid', true );\n\t\t\t$average_color = get_post_meta( $attachment_id, 'average-color', true );\n\t\t\tif ( $grid ) {\n\t\t\t\t$svg_string = '<svg xmlns=\"http://www.w3.org/2000/svg\" preserveAspectRatio=\"none\"' . ( isset( $image_attr['width'] ) ? ' width=\"' . absint( $image_attr['width'] ) . '\"' : '' ) . ( isset( $image_attr['height'] ) ? ' height=\"' . absint( $image_attr['height'] ) . '\"' : '' ) . ' viewBox=\"0 0 ' . absint( count( $grid ) ) . ' ' . absint( count( $grid[0] ) ) . '\"' . ( ! empty( $average_color ) ? ' style=\"background:' . esc_attr( Abstract_Image_Data::get_rgba_css_string( $average_color ) ) . ';\"' : '' ) . '>' . implode(\n\t\t\t\t\t'', array_map(\n\t\t\t\t\t\tfunction( array $row, int $row_index ) : string {\n\t\t\t\t\t\t\treturn implode(\n\t\t\t\t\t\t\t\t'', array_map(\n\t\t\t\t\t\t\t\t\tfunction( array $color, int $column_index ) use ( $row_index ) : string {\n\t\t\t\t\t\t\t\t\t\treturn '<rect x=\"' . absint( $row_index ) . '\" y=\"' . absint( $column_index ) . '\" width=\"1\" height=\"1\" stroke=\"none\" fill=\"' . esc_attr( Abstract_Image_Data::get_rgba_css_string( $color ) ) . '\" />';\n\t\t\t\t\t\t\t\t\t}, $row, array_keys( $row )\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}, $grid, array_keys( $grid )\n\t\t\t\t\t)\n\t\t\t\t) . '</svg>';\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'color-block-horizontal':\n\t\t\t$stripes = get_post_meta( $attachment_id, 'horizontal-stripes', true );\n\t\t\tif ( $stripes ) {\n\t\t\t\t$stripe_width = 100 / count( $stripes );\n\t\t\t\t$svg_string = '<svg xmlns=\"http://www.w3.org/2000/svg\"' . ( isset( $image_attr['width'] ) ? ' width=\"' . absint( $image_attr['width'] ) . '\"' : '' ) . ( isset( $image_attr['height'] ) ? ' height=\"' . absint( $image_attr['height'] ) . '\"' : '' ) . ' style=\"background: linear-gradient(' . implode(\n\t\t\t\t\t',', array_map(\n\t\t\t\t\t\tfunction( string $color, int $index ) use ( $stripe_width ) {\n\t\t\t\t\t\t\treturn esc_attr( Abstract_Image_Data::get_rgba_css_string( $color ) ) . ' ' . absint( $index * $stripe_width ) . '%,' . esc_attr( Abstract_Image_Data::get_rgba_css_string( $color ) ) . ' ' . absint( ( $index + 1 ) * $stripe_width ) . '%';\n\t\t\t\t\t\t}, $stripes, array_keys( $stripes )\n\t\t\t\t\t)\n\t\t\t\t) . ')\"></svg>';\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'average-color':\n\t\t\t$color = get_post_meta( $attachment_id, 'average-color', true );\n\t\t\tif ( $color ) {\n\t\t\t\t$svg_string = '<svg xmlns=\"http://www.w3.org/2000/svg\"' . ( isset( $image_attr['width'] ) ? ' width=\"' . absint( $image_attr['width'] ) . '\"' : '' ) . ( isset( $image_attr['height'] ) ? ' height=\"' . absint( $image_attr['height'] ) . '\"' : '' ) . ' style=\"background:' . esc_attr( Abstract_Image_Data::get_rgba_css_string( $color ) ) . ';\"></svg>';\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'average-grayscale':\n\t\t\t$color = get_post_meta( $attachment_id, 'average-grayscale', true );\n\t\t\tif ( $color ) {\n\t\t\t\t$svg_string = '<svg xmlns=\"http://www.w3.org/2000/svg\"' . ( isset( $image_attr['width'] ) ? ' width=\"' . absint( $image_attr['width'] ) . '\"' : '' ) . ( isset( $image_attr['height'] ) ? ' height=\"' . absint( $image_attr['height'] ) . '\"' : '' ) . ' style=\"background:' . esc_attr( Abstract_Image_Data::get_rgba_css_string( $color ) ) . ';\"></svg>';\n\t\t\t}\n\t\t\tbreak;\n\t}\n\t$svg_string = apply_filters( 'lazy_load_images_svg_placeholder', apply_filters( 'lazy_load_images_svg_placeholder_' . esc_attr( $style ), $svg_string, $attachment_id, $image_attr, $style ), $attachment_id, $image_attr, $style );\n\treturn $svg_string;\n}", "function vcex_inline_style( $atts = array(), $add_style = true ) {\n\t$atts = array_filter( $atts ); // remove empty items.\n\tif ( $atts && is_array( $atts ) ) {\n\t\t$inline_style = new TotalThemeCore\\Vcex\\Inline_Style( $atts, $add_style );\n\t\treturn $inline_style->return_style();\n\t}\n}", "private function set_background_color()\n {\n imagecolorallocate(\n $this->img,\n L_BACKGROUND_COLOR_R,\n L_BACKGROUND_COLOR_G,\n L_BACKGROUND_COLOR_B\n );\n }", "function image_src($id, $size = 'full', $background_image = false, $height = false) {\n if ($image = wp_get_attachment_image_src($id, $size, true)) {\n return $background_image ? 'background-image: url('.$image[0].');' . ($height?'height:'.$image[2].'px':'') : $image[0];\n }\n}", "function background($args) {\r\n\t\t$description = $args['description'];\r\n\t\tunset($args['description']);\r\n\t\t\r\n\t\t// if plain is true at this point we must have come from a post meta box so do some switching of the args around\r\n\t\t$form_prefix = $this->metabox_id_fix($args);\r\n\t\t$form_value = $this->metabox_value_fix($args);\r\n\t\t\r\n\t\t$args['selections'] = array('0'=>'0','1'=>'1','2'=>'2','3'=>'3','4'=>'4','5'=>'5','6'=>'6','7'=>'7','8'=>'8','9'=>'9','10'=>'10','11'=>'11','12'=>'12','13'=>'13','14'=>'14','15'=>'15','16'=>'16','17'=>'17');\r\n\t\t$args['plain']=true; // switch to plain mode\r\n\r\n\t\t// add font size\r\n\t\t$args['id'] = $form_prefix . \"[background-color]\";\r\n\t\t$args['value'] = $form_value['background-color'];\r\n\t\t$args['width'] = '75';\r\n\t\t$args['tooltip'] = 'Background Color';\r\n\t\t$this->color($args);\r\n\t\t\r\n\t\tif ($args['gradient']) {\r\n\t\t\t// add font units\r\n\t\t\t$args['id'] = $form_prefix . \"[gradient]\";\r\n\t\t\t$args['value'] = $form_value['gradient'];\r\n\t\t\t$args['width'] = '75';\r\n\t\t\t$args['tooltip'] = 'Gradient End Point Color';\r\n\t\t\t$this->color($args);\r\n\t\t}\r\n\t\t\r\n\t\t$args['id'] = $form_prefix . \"[position]\";\r\n\t\t$args['value'] = $form_value['position'];\r\n\t\t$args['width'] = '135';\r\n\t\t$this->backgroundpositions($args);\r\n\t\t\r\n\t\t$args['id'] = $form_prefix . \"[repeat]\";\r\n\t\t$args['value'] = $form_value['repeat'];\r\n\t\t$args['width'] = '135';\r\n\t\t$this->backgroundrepeat($args);\r\n\t\t\r\n\t\tprint \"<div style='height:3px;'></div>\";\r\n\t\t// add font units\r\n\t\t$args['id'] = $form_prefix . \"[image]\";\r\n\t\t$args['value'] = $form_value['image'];\r\n\t\t$args['width'] = '400';\r\n\t\t$args['placeholder'] = 'Upload a background image';\r\n\t\t$args['tooltip'] = 'Upload an image or enter a URL to use as the backround. The image must be hosted on the same domain as this website.';\r\n\t\t$this->attachment($args);\r\n\t\t\r\n\t\t$this->description($description);\r\n\t}", "public function __invoke($src = null, $class = [], $style = [])\n {\n if (! $src) {\n $src = 'https://images.unsplash.com/photo-1508128376479-d7979f3b30bf?ixlib=rb-0.3.5&s=d69675e9a3fc98480e76b3f13fb2a2fe&auto=format&fit=crop&w=1351&q=80';\n }\n\n return $this->getView()->render('component/image', [\n 'src' => $src,\n 'class' => count($class) > 0\n ? 'class=\"' . implode(' ', $class) . '\" ' : '',\n 'style' => count($style) > 0\n ? 'style=\"' . implode(';', $style) . '\" ' : '',\n ]);\n }", "private function build_background($c1, $c2, $icon, $size){\n\t\t// Create initial image\n\t\t$image = imagecreatetruecolor(450, 19);\n\t\t// Build gradient\n\t\t$this->build_gradient($image, 0, 0, 19, 450, $this->hex2rgb($c1), $this->hex2rgb($c2));\n\t\t// Save alpha\n\t\timagealphablending($image,true);\n\t\t// Add background scanlines\n\t\t$scanlines = imagecreatefrompng(dirname(__file__).\"/scanlines.png\");\n\t\timagealphablending($scanlines,true);\n\t\timagecopy($image, $scanlines, 0, 0, 0, 0, 450, 19);\n\t\t// Add icon\n\t\t$favicon = imagecreatefrompng(dirname(__file__).\"/ico/\".$icon);\n\t\timagealphablending($favicon,true);\n\t\timagecopy($image, $favicon, 4, 1, 0, 0, $size, $size);\n\t\t// Add shine\n\t\t$scanlines = imagecreatefrompng(dirname(__file__).\"/shine.png\");\n\t\timagealphablending($scanlines,true);\n\t\timagecopy($image, $scanlines, 0, 0, 0, 0, 450, 19);\n\t\treturn $image;\n\t}", "public function background($value) {\n return $this->setProperty('background', $value);\n }", "public function background($value) {\n return $this->setProperty('background', $value);\n }", "public function background($value) {\n return $this->setProperty('background', $value);\n }", "public function background($value) {\n return $this->setProperty('background', $value);\n }", "function kdw_header_image_css(){\r\n \r\n global $post;\r\n \r\n $sizeM = 'medium';\r\n $sizeL = 'large';\r\n $sizeXL = 'extra-large';\r\n \r\n if ( is_category() ){\r\n \r\n $queried_object = get_queried_object();\r\n $catTerm = $queried_object->term_id;\r\n \r\n $bg_imgID = esc_attr( get_field('kdw_header_bg_image', 'term_'.$catTerm ) );\r\n\r\n } else if ( is_post_type_archive('post-stylists') || is_tax('category-stylists-region') ){\r\n \r\n $bg_imgID = esc_attr( get_field('kdw_archive_stylists_header_img', 'options' ) );\r\n \r\n } \r\n \r\n \r\n // generate css\r\n \r\n if ( $bg_imgID ){\r\n\r\n echo '<style>';\r\n\r\n // size M \r\n $bg_medium = wp_get_attachment_image_src( $bg_imgID, $sizeM );\r\n $bg_url_medium = $bg_medium[0];\r\n echo '.header-image{ background-image: url('.$bg_url_medium.');}';\r\n \r\n // size L\r\n echo '@media screen and (min-width: 540px) {'; \r\n $bg_large = wp_get_attachment_image_src( $bg_imgID, $sizeL );\r\n $bg_url_large = $bg_large[0];\r\n echo '.header-image{ background-image: url('.$bg_url_large.');}';\r\n echo '}';\r\n \r\n // size XL\r\n echo '@media screen and (min-width: 1280px) {'; \r\n $bg_xl = wp_get_attachment_image_src( $bg_imgID, $sizeXL );\r\n $bg_url_xl = $bg_xl[0];\r\n echo '.header-image{ background-image: url('.$bg_url_xl.');}';\r\n echo '}';\r\n \r\n echo '</style>';\r\n } \r\n \r\n}", "function fiorello_mikado_container_style( $style ) {\n\t\t$page_id = fiorello_mikado_get_page_id();\n\t\t$class_prefix = fiorello_mikado_get_unique_page_class( $page_id, true );\n\n\t\t$container_selector = array(\n\t\t\t$class_prefix . ' .mkdf-content',\n\t\t);\n\n\t\t$container_class = array();\n\t\t$page_backgorund_color = get_post_meta( $page_id, 'mkdf_page_background_color_meta', true );\n\n\t\tif ( $page_backgorund_color !== '' ) {\n\t\t\t$container_class['background-color'] = $page_backgorund_color;\n\t\t}\n\n\t\t$disable_background_image = get_post_meta( $page_id, 'mkdf_disable_content_background_image_meta', true );\n\n\t\tif ($disable_background_image == 'yes') {\n\t\t\t$container_class['background-image'] = 'none';\n\t\t} else {\n\t\t\t$page_background_image = get_post_meta($page_id, 'mkdf_content_background_image_meta', true);\n\n\t\t\tif ($page_background_image) {\n\t\t\t\t$container_class['background-image'] = 'url(' . esc_url($page_background_image) . ')';\n\t\t\t}\n }\n\n\t\t$current_style = fiorello_mikado_dynamic_css( $container_selector, $container_class );\n\t\t$current_style = $current_style . $style;\n\n\t\treturn $current_style;\n\t}", "public function updateBackgroundImage($image) {\n\t\t//Argument 1 must be a string\n\t\tEden_Twitter_Error::i()->argument(1, 'string');\n\t\t\n\t\t$this->_query['image'] = $image;\n\t\t\n\t\treturn $this->_upload(self::URL_UPDATE_BACKGROUND, $this->_query);\n\t}", "function image_src($id, $size = 'full', $background_image = false, $height = false) {\n if ($image = wp_get_attachment_image_src($id, $size, true)) {\n return $background_image ? 'background-image: url('.$image[0].');' . ($height?'min-height:'.$image[2].'px':'') : $image[0];\n }\n}", "function modshrink_s_register_custom_background() {\n\t$args = array(\n\t\t'default-color' => 'ffffff',\n\t\t'default-image' => '',\n\t);\n\n\t$args = apply_filters( 'modshrink_s_custom_background_args', $args );\n\n\tif ( function_exists( 'wp_get_theme' ) ) {\n\t\tadd_theme_support( 'custom-background', $args );\n\t} else {\n\t\tdefine( 'BACKGROUND_COLOR', $args['default-color'] );\n\t\tif ( ! empty( $args['default-image'] ) )\n\t\t\tdefine( 'BACKGROUND_IMAGE', $args['default-image'] );\n\t\tadd_custom_background();\n\t}\n}", "public function addImg ($src, $attributes = array ())\n\t{\n\t\tif (!preg_match('#^(\\w+://)# i', $src)) {\n\n\t\t\t// Trim the trailing slash\n\t\t\t$src = ltrim($src, \"\\t\\n\\r\");\n\t\t}\n\t\t$attributes['src'] = $src;\n\t\t$attributes['alt'] = (isset($attributes['alt'])) ? $attributes['alt'] : pathinfo($src, PATHINFO_FILENAME);\n\n\t\treturn html_tag('img', $attributes);\n\t}", "function my_custom_background_cb() {\n\t// $background is the saved custom image, or the default image.\n\t$background = set_url_scheme( get_background_image() );\n\n\t// $color is the saved custom color.\n\t// A default has to be specified in style.css. It will not be printed here.\n\t$color = get_background_color();\n\n\tif ( $color === get_theme_support( 'custom-background', 'default-color' ) ) {\n\t\t$color = false;\n\t}\n\n\t$type_attr = current_theme_supports( 'html5', 'style' ) ? '' : ' type=\"text/css\"';\n\n\tif ( ! $background && ! $color ) {\n\t\tif ( is_customize_preview() ) {\n\t\t\tprintf( '<style%s id=\"custom-background-css\"></style>', $type_attr );\n\t\t}\n\t\treturn;\n\t}\n\n\t$style = $color ? \"background-color: #$color;\" : '';\n\n\tif ( $background ) {\n\t\t$image = ' background-image: url(\"' . esc_url_raw( $background ) . '\");';\n\n\t\t// Background Position.\n\t\t$position_x = get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', 'default-position-x' ) );\n\t\t$position_y = get_theme_mod( 'background_position_y', get_theme_support( 'custom-background', 'default-position-y' ) );\n\n\t\tif ( ! in_array( $position_x, array( 'left', 'center', 'right' ), true ) ) {\n\t\t\t$position_x = 'left';\n\t\t}\n\n\t\tif ( ! in_array( $position_y, array( 'top', 'center', 'bottom' ), true ) ) {\n\t\t\t$position_y = 'top';\n\t\t}\n\n\t\t$position = \" background-position: $position_x $position_y;\";\n\n\t\t// Background Size.\n\t\t$size = get_theme_mod( 'background_size', get_theme_support( 'custom-background', 'default-size' ) );\n\n\t\tif ( ! in_array( $size, array( 'auto', 'contain', 'cover' ), true ) ) {\n\t\t\t$size = 'auto';\n\t\t}\n\n\t\t$size = \" background-size: $size;\";\n\n\t\t// Background Repeat.\n\t\t$repeat = get_theme_mod( 'background_repeat', get_theme_support( 'custom-background', 'default-repeat' ) );\n\n\t\tif ( ! in_array( $repeat, array( 'repeat-x', 'repeat-y', 'repeat', 'no-repeat' ), true ) ) {\n\t\t\t$repeat = 'repeat';\n\t\t}\n\n\t\t$repeat = \" background-repeat: $repeat;\";\n\n\t\t// Background Scroll.\n\t\t$attachment = get_theme_mod( 'background_attachment', get_theme_support( 'custom-background', 'default-attachment' ) );\n\n\t\tif ( 'fixed' !== $attachment ) {\n\t\t\t$attachment = 'scroll';\n\t\t}\n\n\t\t$attachment = \" background-attachment: $attachment;\";\n\n\t\t$style .= $image . $position . $size . $repeat . $attachment;\n\t}\n ?>\n \n <style<?php echo $type_attr; ?> id=\"custom-background-css\">\n body.custom-background { <?php echo trim( $style ); ?> }\n .menu-toggle { background: <?php echo \"#$color;\" ?> }\n .menu-toggle:focus, .menu-toggle:active, .menu-toggle:hover { background: <?php echo \"#$color;\" ?> }\n </style>\n\n<?php \n}", "function bethel_get_default_background_args() {\n\treturn array ('default-color' => '#f5f5f5',\n\t\t\t\t 'default-image' => get_stylesheet_directory_uri().'/images/background.jpg',\n\t\t\t\t 'default-repeat' => 'repeat'\n\t );\n}", "public function setCSS($id, array $attributes, $style = null, $order = null)\n {\n $newItem = [\n 'style' => $style,\n 'attributes' => $attributes,\n 'order' => $order !== null ? (int)$order : count($this->css)\n ];\n if (isset($this->css[$id])) $newItem['order'] = $this->css[$id]['order'];\n $this->css[$id] = $newItem;\n return $this;\n }", "public function bg($value)\n {\n $this->args = array_merge($this->args, ['bg' => $value]);\n\n return $this;\n }", "function hyde_custom_background_cb() {\n\t$background = set_url_scheme( get_background_image() );\n\n\t// $color is the saved custom color.\n\t// A default has to be specified in style.css. It will not be printed here.\n\t$color = get_background_color();\n\n\tif ( $color === get_theme_support( 'custom-background', 'default-color' ) ) {\n\t\t$color = false;\n\t}\n\n\tif ( ! $background && ! $color )\n\t\treturn;\n\n\t$style = $color ? \"background-color: #$color;\" : '';\n\n\tif ( $background ) {\n\t\t$image = \" background-image: url('$background');\";\n\n\t\t$repeat = get_theme_mod( 'background_repeat', get_theme_support( 'custom-background', 'default-repeat' ) );\n\t\tif ( ! in_array( $repeat, array( 'no-repeat', 'repeat-x', 'repeat-y', 'repeat' ) ) )\n\t\t\t$repeat = 'repeat';\n\t\t$repeat = \" background-repeat: $repeat;\";\n\n\t\t$position = get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', 'default-position-x' ) );\n\t\tif ( ! in_array( $position, array( 'center', 'right', 'left' ) ) )\n\t\t\t$position = 'left';\n\t\t$position = \" background-position: top $position;\";\n\n\t\t$attachment = get_theme_mod( 'background_attachment', get_theme_support( 'custom-background', 'default-attachment' ) );\n\t\tif ( ! in_array( $attachment, array( 'fixed', 'scroll' ) ) )\n\t\t\t$attachment = 'scroll';\n\t\t$attachment = \" background-attachment: $attachment;\";\n\n\t\t$style .= $image . $repeat . $position . $attachment;\n\t}\n?>\n<style type=\"text/css\" id=\"custom-background-css\">\n.sidebar { <?php echo trim( $style ); ?> }\n</style>\n<?php\n}", "public function addObject($src, $style = null) {\n\t\t$object = new PHPWord_Section_Object($src, $style);\n\t\t\n\t\tif(!is_null($object->getSource())) {\n\t\t\t$inf = pathinfo($src);\n\t\t\t$ext = $inf['extension'];\n\t\t\tif(strlen($ext) == 4 && strtolower(substr($ext, -1)) == 'x') {\n\t\t\t\t$ext = substr($ext, 0, -1);\n\t\t\t}\n\t\t\t\n\t\t\t$iconSrc = PHPWORD_BASE_PATH . 'PHPWord/_staticDocParts/';\n\t\t\tif(!file_exists($iconSrc.'_'.$ext.'.png')) {\n\t\t\t\t$iconSrc = $iconSrc.'_default.png';\n\t\t\t} else {\n\t\t\t\t$iconSrc .= '_'.$ext.'.png';\n\t\t\t}\n\t\t\t\n\t\t\t$rIDimg = PHPWord_Media::addSectionMediaElement($iconSrc, 'image');\n\t\t\t$data = PHPWord_Media::addSectionMediaElement($src, 'oleObject');\n\t\t\t$rID = $data[0];\n\t\t\t$objectId = $data[1];\n\t\t\t\n\t\t\t$object->setRelationId($rID);\n\t\t\t$object->setObjectId($objectId);\n\t\t\t$object->setImageRelationId($rIDimg);\n\t\t\t\n\t\t\t$this->_elementCollection[] = $object;\n\t\t\treturn $object;\n\t\t} else {\n\t\t\ttrigger_error('Source does not exist or unsupported object type.');\n\t\t}\n\t}", "public function shortcodePlaceholderImage()\n {\n $req = $this->getRequest();\n $defaults = self::config()->get('default_placeholder');\n\n $w = $req->getVar('w') ?: $defaults['width'];\n $h = $req->getVar('h') ?: $defaults['height'];\n $render_w = ($w=='100%' ? $defaults['full_width'] : min($w, $defaults['full_width']));\n $render_h = ($h=='100%' ? $defaults['full_height'] : min($h, $defaults['full_height']));\n\n $txtsize = (int) $req->getVar('txtsize') ?: $defaults['fontsize'];\n $bg = $req->getVar('bg') ?: $defaults['bg'];\n $txtclr = $req->getVar('fg') ?: $defaults['fg'];\n $font = str_replace('\"', '\\'', $req->getVar('ff') ?: $defaults['font'] );\n $txt = $req->getVar('txt') ? htmlentities($req->getVar('txt')): \"$w x $h\";\n\n $svg = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" height=\\\"$render_h\\\" width=\\\"$render_w\\\" viewBox=\\\"0 0 $render_w $render_h\\\">\n <g>\n <title>placeholder</title>\n <rect id=\\\"svg_1\\\" height=\\\"$render_h\\\" width=\\\"$render_w\\\" y=\\\"0\\\" x=\\\"0\\\" fill=\\\"#$bg\\\"/>\n <text x=\\\"50%\\\" y=\\\"50%\\\" text-anchor=\\\"middle\\\" alignment-baseline=\\\"middle\\\" font-size=\\\"$txtsize\\\" dominant-baseline=\\\"middle\\\" font-family=\\\"$font\\\" fill=\\\"#$txtclr\\\">$txt</text>\n </g>\n </svg>\";\n\n $this->getResponse()\n ->addHeader('Content-Type', 'image/svg+xml')\n ->setBody($svg)\n ->output();\n }", "protected function image_style() {\n\t\t$this->start_controls_section(\n\t\t\t'section_style_retina_image',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Retina Image', 'boostify' ),\n\t\t\t\t'tab' => Controls_Manager::TAB_STYLE,\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'width',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Width', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'default' => array(\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'tablet_default' => array(\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'mobile_default' => array(\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'size_units' => array( '%', 'px', 'vw' ),\n\t\t\t\t'range' => array(\n\t\t\t\t\t'%' => array(\n\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t),\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t'max' => 1000,\n\t\t\t\t\t),\n\t\t\t\t\t'vw' => array(\n\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image img' => 'width: {{SIZE}}{{UNIT}};',\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image .wp-caption .widget-image-caption' => 'width: {{SIZE}}{{UNIT}}; display: inline-block;',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'space',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Max Width', 'boostify' ) . ' (%)',\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'default' => array(\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'tablet_default' => array(\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'mobile_default' => array(\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'size_units' => array( '%' ),\n\t\t\t\t'range' => array(\n\t\t\t\t\t'%' => array(\n\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image img' => 'max-width: {{SIZE}}{{UNIT}};',\n\t\t\t\t\t'{{WRAPPER}} .wp-caption-text' => 'max-width: {{SIZE}}{{UNIT}}; display: inline-block; width: 100%;',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'separator_panel_style',\n\t\t\tarray(\n\t\t\t\t'type' => Controls_Manager::DIVIDER,\n\t\t\t\t'style' => 'thick',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'retina_image_border',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Border Style', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'default' => 'none',\n\t\t\t\t'label_block' => false,\n\t\t\t\t'options' => array(\n\t\t\t\t\t'none' => __( 'None', 'boostify' ),\n\t\t\t\t\t'solid' => __( 'Solid', 'boostify' ),\n\t\t\t\t\t'double' => __( 'Double', 'boostify' ),\n\t\t\t\t\t'dotted' => __( 'Dotted', 'boostify' ),\n\t\t\t\t\t'dashed' => __( 'Dashed', 'boostify' ),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image-container .boostify-retina-img' => 'border-style: {{VALUE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t\t$this->add_control(\n\t\t\t'retina_image_border_size',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Border Width', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::DIMENSIONS,\n\t\t\t\t'size_units' => array( 'px' ),\n\t\t\t\t'default' => array(\n\t\t\t\t\t'top' => '1',\n\t\t\t\t\t'bottom' => '1',\n\t\t\t\t\t'left' => '1',\n\t\t\t\t\t'right' => '1',\n\t\t\t\t\t'unit' => 'px',\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'retina_image_border!' => 'none',\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image-container .boostify-retina-img' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'retina_image_border_color',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Border Color', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'retina_image_border!' => 'none',\n\t\t\t\t),\n\t\t\t\t'default' => '',\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image-container .boostify-retina-img' => 'border-color: {{VALUE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'image_border_radius',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Border Radius', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::DIMENSIONS,\n\t\t\t\t'size_units' => array( 'px', '%' ),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->start_controls_tabs( 'image_effects' );\n\n\t\t$this->start_controls_tab(\n\t\t\t'normal',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Normal', 'boostify' ),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'opacity',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Opacity', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'max' => 1,\n\t\t\t\t\t\t'min' => 0.10,\n\t\t\t\t\t\t'step' => 0.01,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image img' => 'opacity: {{SIZE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Css_Filter::get_type(),\n\t\t\tarray(\n\t\t\t\t'name' => 'css_filters',\n\t\t\t\t'selector' => '{{WRAPPER}} .boostify-retina-image img',\n\t\t\t)\n\t\t);\n\n\t\t$this->end_controls_tab();\n\n\t\t$this->start_controls_tab(\n\t\t\t'hover',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Hover', 'boostify' ),\n\t\t\t)\n\t\t);\n\t\t$this->add_control(\n\t\t\t'opacity_hover',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Opacity', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'max' => 1,\n\t\t\t\t\t\t'min' => 0.10,\n\t\t\t\t\t\t'step' => 0.01,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image:hover img' => 'opacity: {{SIZE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Css_Filter::get_type(),\n\t\t\tarray(\n\t\t\t\t'name' => 'css_filters_hover',\n\t\t\t\t'selector' => '{{WRAPPER}} .boostify-retina-image:hover img',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'hover_animation',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Hover Animation', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::HOVER_ANIMATION,\n\t\t\t)\n\t\t);\n\t\t$this->add_control(\n\t\t\t'background_hover_transition',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Transition Duration', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'max' => 3,\n\t\t\t\t\t\t'step' => 0.1,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .boostify-retina-image img' => 'transition-duration: {{SIZE}}s',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->end_controls_tab();\n\n\t\t$this->end_controls_tabs();\n\n\t\t$this->end_controls_section();\n\t}", "public static function image($url, $alt = '', $attributes = array()) {\n\t\t$attributes['alt'] = $alt;\n\n\t\treturn '<img src=\"'.URL::to_asset($url).'\"'.static::attributes($attributes).'>';\n\t}", "private function _prepare_image($width, $height, $background_color = '#FFFFFF') {\r\n\r\n // create a blank image\r\n $identifier = imagecreatetruecolor((int)$width <= 0 ? 1 : (int)$width, (int)$height <= 0 ? 1 : (int)$height);\r\n\r\n // if we are creating a transparent image, and image type supports transparency\r\n if ($background_color === -1 && $this->target_type !== 'jpg') {\r\n\r\n // disable blending\r\n imagealphablending($identifier, false);\r\n\r\n // allocate a transparent color\r\n $background_color = imagecolorallocatealpha($identifier, 0, 0, 0, 127);\r\n\r\n // we also need to set this for saving GIFs\r\n imagecolortransparent($identifier, $background_color);\r\n\r\n // save full alpha channel information\r\n imagesavealpha($identifier, true);\r\n\r\n // if we are not creating a transparent image\r\n } else {\r\n\r\n // convert hex color to rgb\r\n $background_color = $this->_hex2rgb($background_color);\r\n\r\n // prepare the background color\r\n $background_color = imagecolorallocate($identifier, $background_color['r'], $background_color['g'], $background_color['b']);\r\n\r\n }\r\n\r\n // fill the image with the background color\r\n imagefill($identifier, 0, 0, $background_color);\r\n\r\n // return the image's identifier\r\n return $identifier;\r\n\r\n }", "function draw_image($word, $img_width = 200, $img_height = 80)\n {\n $noise_img = @imagecreatefromjpeg($this->bg_image);\n $noise_width = imagesx($noise_img);\n $noise_height = imagesy($noise_img);\n\n /* resize the background image to fit the size of image output */\n $image = imagecreatetruecolor($img_width, $img_height);\n imagecopyresampled(\n $image,\n $noise_img,\n 0, 0, 0, 0,\n $img_width,\n $img_height,\n $noise_width,\n $noise_height\n );\n /* put text image into background image */\n imagecopymerge(\n $image,\n $this->draw_text($word, $img_width, $img_height),\n 0, 0, 0, 0,\n $img_width,\n $img_height,\n 50\n );\n return $image;\n }", "public function addMemoryImage($src, $style = null)\n {\n return $this->addImage($src, $style);\n }", "public function get_background_image_srcset( $image_id, $default_size = \"medium\" ){\n\t\t$html = 'data-bg-srcset=\"' . wp_get_attachment_image_srcset( $image_id, $size = $default_size ) . '\"';\n\t\treturn $html;\n\t}", "function gs_svg_img_markup( $svg, $bck, $additional = array() ) {\n\t$img_array = array_merge( $additional, array('onerror' => 'this.onerror=null; this.src=\\'' . esc_url($bck['url']) .'\\'' ) );\n\treturn wp_get_attachment_image($svg['ID'], 'full', false, $img_array );\n}", "public function addCSS(array $attributes, $style = null, $order = null)\n {\n $id = isset($attributes['href']) ? $attributes['href'] : count($this->css);\n return $this->setCSS($id, $attributes, $style, $order);\n }", "function gs_background_markup( $color = '', $opacity = 1 ) {\n\n\t$rtn = '';\n\n\tif ( ! ( '' === $color ) ) {\n\t\t$rgba = 'rgba(' . hex2rgb( $color ) . ',' . $opacity . ')';\n\t\t$rtn .= 'linear-gradient(' . $rgba . ',' . $rgba . ')'; //no-repeat center center/cover\n\n\t\treturn 'background-image: ' . $rtn;\n\t}\n\n\treturn $rtn;\n}", "public function setBackgroundImage($image, $mode = null, $relativePath = false)\n {\n $imagePath = $relativePath ?\n PIMCORE_DOCUMENT_ROOT . \"/\" . ltrim($image, \"/\")\n : $image;\n\n if (is_file($imagePath)) {\n //if a specified file as a background exists\n //creates the temp file for the background\n $newImage = $this->createTmpImage($imagePath, 'background');\n if ($mode == \"cropTopLeft\") {\n //crop the background image\n $newImage->crop(0, 0, $this->getWidth(), $this->getHeight());\n } else {\n // default behavior (fit)\n $newImage->resize($this->getWidth(), $this->getHeight());\n }\n $newImage->save($newImage->getOutputPath());\n\n //save current state of the thumbnail to the tmp file\n $this->saveIfRequired('gravity');\n\n //save the current state of the file (with a background)\n $this->compositeCommandOptions = [];\n $this->addCompositeOption('gravity', 'center ' . $this->getOutputPath() . ' ' . $newImage->getOutputPath() . ' ' . $this->getOutputPath());\n $this->processCommand($this->getCompositeCommand());\n $this->imagePath = $this->getOutputPath();\n }\n\n\n return $this;\n }", "public function setBackImage($image, $repeat, $fixed, $align)\n {\n $image = htmlentities($image);\n $repeat = htmlentities($repeat);\n $align = htmlentities($align);\n $array = [$image, $repeat, $fixed, $align];\n $this->_data['back_image'] = serialize($array);\n\n return $this;\n }", "public function addBackgroundImage($id, Request $request)\n {\n $this->validate($request, [\n 'background' => 'required|mimes:jpg,jpeg,png,bmp'\n ]);\n \n $file = $request->file('background');\n $name = time() . $file->getClientOriginalName();\n $file->move($this->backgroundsBaseDir, $name);\n\n //Find the photo session\n $photosession = PhotoSession::findOrFail($id);\n $photosession->background_image_path = $this->backgroundsBaseDir . '/' . $name;\n $photosession->background_image_path_thumbnail = sprintf(\"%s/tn-%s\", $this->backgroundsBaseDir, $name);\n\n Image::make($photosession->background_image_path)\n ->fit(400)\n ->save($photosession->background_image_path_thumbnail); // save() is an Image Intervention method, not Laravels.\n\n $photosession->save();\n\n }", "public static function fakeImage($_dimx,$_dimy,$_bg='EEE') {\n\t\tlist($_r,$_g,$_b)=self::rgb($_bg);\n\t\t$_img=imagecreatetruecolor($_dimx,$_dimy);\n\t\t$_bg=imagecolorallocate($_img,$_r,$_g,$_b);\n\t\timagefill($_img,0,0,$_bg);\n\t\tif (PHP_SAPI!='cli' && !headers_sent())\n\t\t\theader(F3::HTTP_Content.': image/png');\n\t\timagepng($_img,NULL,self::PNG_Compress,PNG_NO_FILTER);\n\t\t// Free resources\n\t\timagedestroy($_img);\n\t}", "public function _img($attrs, $args) {\n return function($controller) use ($attrs, $args) {\n if(isset($attrs['src'])) {\n $attrs['src'] = $controller->resource_provider->urlFor($attrs['src']);\n }\n return qti_item_body::__basicElement('img', $attrs, $args);\n };\n }", "function img( $src = '', $index_page = FALSE, $attributes = '' )\n\t{\n\t\tif ( ! is_array( $src ) )\n\t\t{\n\t\t\t$src = [ 'src' => $src ];\n\t\t}\n\n\t\t// If there is no alt attribute defined, set it to an empty string\n\t\tif ( ! isset( $src[ 'alt' ] ) )\n\t\t{\n\t\t\t$src[ 'alt' ] = '';\n\t\t}\n\n\t\t$img = '<img';\n\n\t\tforeach ( $src as $k => $v )\n\t\t{\n\t\t\tif ( $k === 'src' && ! preg_match( '#^([a-z]+:)?//#i', $v ) )\n\t\t\t{\n\t\t\t\tif ( $index_page === TRUE )\n\t\t\t\t{\n\t\t\t\t\t$img .= ' src=\"' . get_instance()->config->site_url( $v ) . '\"';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$img .= ' src=\"' . \\O2System::$config->slash_item( 'base_url' ) . $v . '\"';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$img .= ' ' . $k . '=\"' . $v . '\"';\n\t\t\t}\n\t\t}\n\n\t\treturn $img . _stringify_attributes( $attributes ) . ' />';\n\t}", "function Image ($source, $title=\"\", $height, $hidth=\"\", $align=\"center\", $border=0, $valign=\"middle\", $class=\"\", \n\t\t\t$id=\"\", $name=\"\", $onAction1=\"\", $onType2=\"\", $onAction2 =\"\", $onAction3=\"\") {\n\t\t$this ->tag = '<img src=\" '.$source .' \" ';\n\t\tif ($name) $this->tag.='name=\" '.$name.' \" ';\n\t\tif ($height ==\"\") $height=16;\n\t\tif ($width ==\"\") $width=16;\n\t\t$this->tag .= 'height=\"' .$height. '\" width= \"'. $width.'\" ';\n\n\t\t$this->tag .='border=\"$border\" . ';\n\t\tif ($class) $this->tag .= 'border =\"'.$border.'\" ';\n\t\tif ($id)\t $this->tag .= 'class=\"'.class. '\" ';\n\t\tif ($title) $this ->tag .= 'title=\"' .$stitle.'\" alt=\"'.$title.'\" ';\n\t\tif ($align) $this ->tag .= 'align= 'align=\"'.$align. .'\" '';\n\t\t\n\n\n\n\t}", "abstract public function register_style();", "function kdw_row_img($i){ \r\n \r\n if ($i == 'intro'){\r\n $options = get_field('kdw_page_intro_img_options'); \r\n $imgID = get_field('kdw_page_intro_img'); \r\n } else {\r\n $options = get_sub_field('options');\r\n $imgID = get_sub_field('img');\r\n }\r\n \r\n if ($options == 'large' ){\r\n $wrapper_class = 'row-inline-image-large';\r\n $size = 'wrapper-large';\r\n $img_size = 'large';\r\n \r\n } else if ( $options == 'medium'){\r\n $wrapper_class = 'row-inline-image-content';\r\n $size = 'wrapper-content';\r\n $img_size = 'medium';\r\n } else {\r\n // default = small\r\n $wrapper_class = 'row-inline-image-small';\r\n $size = 'wrapper-small';\r\n $img_size = 'medium';\r\n }\r\n \r\n if( $imgID && $options == 'bg1' || $options == 'bg2'){\r\n \r\n $bg_img = wp_get_attachment_image_src( $imgID , 'large' );\r\n \r\n // css styles for .row'$i'\r\n \r\n echo '<div class=\"row-bg-image row-bg-image-'.$options.' wrapper-outer row-margin row'.$i.' clearfix\" style=\"background-image: url('.$bg_img[0].');\">';\r\n echo '<div></div>';\r\n echo '</div>';\r\n \r\n } else if ($imgID){\r\n echo '<div class=\"row-inline-image wrapper-outer '.$wrapper_class.' row'.$i.' clearfix row-padding\">';\r\n echo '<div class=\"'.$wrapper_class.'\">';\r\n echo wp_get_attachment_image($imgID, $img_size);\r\n echo '</div>';\r\n echo '</div>';\r\n }\r\n}", "function forty_custom_css_styles() {\r\n\t?>\r\n\t<style>\r\n\t\t<?php if ( !empty( get_background_image() ) ) : ?>\r\n\t\t\t.bg{\r\n\t\t\t\tbackground-image: url(\"<?php echo esc_url( get_theme_file_path( '/images/banner.jpg' ) ); ?>\"), linear-gradient(0deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url( <?php echo get_background_image(); ?> ) !important;\r\n\t\t\t}\r\n\t\t<?php endif; ?>\r\n\t</style>\r\n\t<?php\r\n}", "public function build()\n {\n if ($this->_inline) {\n $encoded_image = base64_encode(file_get_contents($this->_attributes['src']));\n $mime_type = image_type_to_mime_type($this->_image_type);\n $this->_attributes['src'] = \"data:{$mime_type};base64,{$encoded_image}\";\n\n if (isset($this->_attributes['async'])) {\n unset($this->_attributes['async']);\n }\n }\n\n $attributes = join(' ', $this->_makeAttributesArr());\n if (!empty($attributes)) {\n $attributes = ' ' . $attributes;\n }\n return \"<img{$attributes}>\";\n }", "public function create($text, $icon=\"heart.png\", $grad1=\"#ba0014\", $grad2=\"#480014\", $margin=25, $icon_size=16){\n\t\t// Create basic background\n $image = $this->build_background($grad1, $grad2, $icon, $icon_size);\n\t\t// Write text onto background\n\t\t$this->build_text($image, $text, $margin);\n\t\t// Return object\n\t\treturn $image;\n }", "public function addMemoryImage($link, $style = null) {\n\t\t$memoryImage = new PHPWord_Section_MemoryImage($link, $style);\n\t\tif(!is_null($memoryImage->getSource())) {\n\t\t\t$rID = PHPWord_Media::addSectionMediaElement($link, 'image', $memoryImage);\n\t\t\t$memoryImage->setRelationId($rID);\n\t\t\t\n\t\t\t$this->_elementCollection[] = $memoryImage;\n\t\t\treturn $memoryImage;\n\t\t} else {\n\t\t\ttrigger_error('Unsupported image type.');\n\t\t}\n\t}", "public function setBackgroundColor($var)\n {\n GPBUtil::checkInt32($var);\n $this->backgroundColor = $var;\n\n return $this;\n }", "function jigoshop_custom_image($args=array()) {\n\trequire_once (ABSPATH . '/wp-admin/includes/image.php');\n\n\t$defaults = array('image'=>null, 'echo'=>true, 'width'=>60, 'height'=>60);\n\t$args = wp_parse_args($args, $defaults);\n\n\textract($args);\n\n\tif (isset($_POST['image']) && defined('DOING_AJAX') && DOING_AJAX){\n\t\t$image = isset($_POST['image']) ? $_POST['image'] : null;\n\t\t$width = isset($_POST['width']) ? $_POST['width'] : $width;\n\t\t$height = isset($_POST['height']) ? $_POST['height'] : $height;\n\t}\n\n\t$src = jigoshop_custom_image_src($image, $width, $height);\n\n\tif ($echo){\n\t\techo '<img src=\"' . $src . '\" width=\"' . $width . '\" height=\"' . $height . '\" class=\"jigoshop-media-preview\"/>';\n\t}\n\n\tif (defined('DOING_AJAX') && DOING_AJAX){\n\t\texit();\n\t} else {\n\t\treturn $src;\n\t}\n}", "function gcb_custom_background() {\r\n\tadd_custom_background( apply_filters( 'gcb_args' , 'gcb_do_theme_background' ) );\t\r\n}", "public function addObject($src, $style = null)\n {\n $object = new Object($src, $style);\n\n if (!is_null($object->getSource())) {\n $inf = pathinfo($src);\n $ext = $inf['extension'];\n if (strlen($ext) == 4 && strtolower(substr($ext, -1)) == 'x') {\n $ext = substr($ext, 0, -1);\n }\n\n $iconSrc = __DIR__ . '/../../_staticDocParts/';\n if (!\\file_exists($iconSrc . '_' . $ext . '.png')) {\n $iconSrc = $iconSrc . '_default.png';\n } else {\n $iconSrc .= '_' . $ext . '.png';\n }\n\n $rIDimg = Media::addSectionMediaElement($iconSrc, 'image', new Image($iconSrc));\n $data = Media::addSectionMediaElement($src, 'oleObject');\n $rID = $data[0];\n $objectId = $data[1];\n\n $object->setRelationId($rID);\n $object->setObjectId($objectId);\n $object->setImageRelationId($rIDimg);\n\n $this->_elementCollection[] = $object;\n return $object;\n } else {\n throw new InvalidObjectException;\n }\n }", "function image($path, $phpThumbAttributes = array(), $htmlAttributes = array(), $useAltSyntax = false) {\n $thumb_attr = NULL;\n $w = NULL;\n $h = NULL;\n\n foreach ($phpThumbAttributes as $attr => $value) {\n if ($useAltSyntax) {\n if ($attr == 'w' || $attr == 'h') {\n $res = $attr;\n $$res = $value;\n } else {\n $thumb_attr .= $attr.'='.$value.';';\n }\n } else {\n $thumb_attr .= '&'.$attr.'='.$value;\n }\n }\n\n if ($useAltSyntax) {\n $thumb_path = $this->phpThumb.'/'.$thumb_attr.$w.'x'.$h.';'.$path;\n } else {\n $thumb_path = $this->phpThumb.'&src='.$path.$thumb_attr;\n }\n\n return $this->Html->image($thumb_path, $htmlAttributes);\n }", "public static function resize(string $path, int $dst_w, int $dst_h, ?string $type = null, ?string $bg_hex = null, int $rounded = 0, $gutter = 0)\n\t{\n\t\t$src = Create::imageResourceFromPath($path, $type);\n\n\t\tif ($gutter) {\n\t\t\t$src = self::addGutter($src, $gutter);\n\t\t}\n\n\t\t$img = imagecreatetruecolor($dst_w, $dst_h);\n\t\timagesavealpha($img, true);\n\n\t\t// START WITH TRANSPARENT BACKGROUND\n\t\t$bg_color = imagecolorallocatealpha($img, 0, 0, 0, 127);\n\t\timagefill($img, 0, 0, $bg_color);\n\n\t\tif ($bg_hex) {\n\t\t\t// ADD A DEFINED BACKGROUND COLOR\n\t\t\t$color = Convert::hexToRgb($bg_hex);\n\t\t\t$bg_color = imagecolorallocate($img, $color->R, $color->G, $color->B);\n\n\t\t\tif ($rounded) {\n\t\t\t\t$bg_w = $dst_w * 10;\n\t\t\t\t$bg_h = $dst_h * 10;\n\n\t\t\t\t// MAKE BACKGROUND IMAGE\n\t\t\t\t$bg_img = imagecreatetruecolor($bg_w, $bg_h);\n\t\t\t\timagesavealpha($bg_img, true);\n\n\t\t\t\t$trans = imagecolorallocatealpha($bg_img, 0, 0, 0, 127);\n\t\t\t\timagefill($bg_img, 0, 0, $trans);\n\n\t\t\t\t// MAKE A ROUNDED SHAPE TO FILL\n\t\t\t\t$diameter = round((($bg_w > $bg_h) ? $bg_w : $bg_h) * .26);\n\t\t\t\t$radius = round($diameter / 2);\n\n\t\t\t\t// FOUR CORNERS\n\t\t\t\timagearc($bg_img, $radius, $radius, $diameter, $diameter, 180, 270, $bg_color);\n\t\t\t\timagearc($bg_img, ($bg_w - $radius), $radius, $diameter, $diameter, 270, 0, $bg_color);\n\t\t\t\timagearc($bg_img, ($bg_w - $radius), ($bg_h - $radius), $diameter, $diameter, 0, 90, $bg_color);\n\t\t\t\timagearc($bg_img, $radius, ($bg_h - $radius), $diameter, $diameter, 90, 180, $bg_color);\n\n\t\t\t\t// FOUR LINES\n\t\t\t\timageline($bg_img, 0, $radius, 0, ($bg_w - $radius), $bg_color);\n\t\t\t\timageline($bg_img, $radius, 0, ($bg_h - $radius), 0, $bg_color);\n\t\t\t\timageline($bg_img, ($bg_h - 1), $radius, ($bg_h - 1), ($bg_w - $radius), $bg_color);\n\t\t\t\timageline($bg_img, $radius, ($bg_w - 1), ($bg_h - $radius), ($bg_w - 1), $bg_color);\n\n\t\t\t\t// FILL THE ENTIRE SPACE FROM THE MIDDLE\n\t\t\t\timagefill($bg_img, round($bg_w / 2), round($bg_h / 2), $bg_color);\n\n\t\t\t\t// COPY BACKGROUND TO IMAGE\n\t\t\t\timagecopyresampled($img, $bg_img, 0, 0, 0, 0, $dst_w, $dst_h, $bg_w, $bg_h);\n\n\t\t\t\timagedestroy($bg_img);\n\t\t\t} else {\n\t\t\t\t// FILL THE ENTIRE SPACE\n\t\t\t\timagefill($img, 0, 0, $bg_color);\n\t\t\t}\n\t\t}\n\n\t\tself::fitToImage($img, $src);\n\n\t\timagedestroy($src);\n\n\t\treturn $img;\n\t}", "function img($src = '', bool $indexPage = false, $attributes = ''): string\n {\n if (! is_array($src)) {\n $src = ['src' => $src];\n }\n if (! isset($src['src'])) {\n $src['src'] = $attributes['src'] ?? '';\n }\n if (! isset($src['alt'])) {\n $src['alt'] = $attributes['alt'] ?? '';\n }\n\n $img = '<img';\n\n // Check for a relative URI\n if (! preg_match('#^([a-z]+:)?//#i', $src['src']) && strpos($src['src'], 'data:') !== 0) {\n if ($indexPage === true) {\n $img .= ' src=\"' . site_url($src['src']) . '\"';\n } else {\n $img .= ' src=\"' . slash_item('baseURL') . $src['src'] . '\"';\n }\n\n unset($src['src']);\n }\n\n // Append any other values\n foreach ($src as $key => $value) {\n $img .= ' ' . $key . '=\"' . $value . '\"';\n }\n\n // Prevent passing completed values to stringify_attributes\n if (is_array($attributes)) {\n unset($attributes['alt'], $attributes['src']);\n }\n\n return $img . stringify_attributes($attributes) . _solidus() . '>';\n }", "protected function createImageStyle($id, $name, $width, $height = NULL) {\n /** @var \\Drupal\\image\\ImageStyleInterface $image_style */\n $image_style = $this\n ->get('entity_type.manager')\n ->getStorage('image_style')\n ->create(['label' => $name, 'name' => $id]);\n\n $image_style->addImageEffect([\n 'id' => $height ? 'image_scale_and_crop' : 'image_scale',\n 'weight' => 0,\n 'data' => ['width' => $width, 'height' => $height],\n ]);\n\n $image_style->save();\n }", "protected function _add_render_attributes() {\n \n // use parent attributes\n parent::_add_render_attributes();\n \n $this->add_render_attribute(\n 'wrapper', 'class', [\n $this->get_name() . '-hero'\n ]\n );\n \n $background_image = $this->get_fields( 'background_image' );\n $background_position_x = strtolower( $this->get_fields( 'background_position_x' ) ) ?: 'center';\n $background_position_y = strtolower( $this->get_fields( 'background_position_y' ) ) ?: 'center';\n $background_overlay = $this->get_fields( 'background_overlay' );\n \n \n \n if( ! empty( $background_image ) ) {\n $background_image = _s_get_acf_image( $background_image, 'hero', true );\n } else {\n $background_image = get_the_post_thumbnail_url( get_the_ID(), 'hero' );\n \n if( empty( $background_image ) ) {\n $background_image = get_field( 'post_image_fallback', 'option' );\n if( ! empty( $background_image ) ) {\n $background_image = wp_get_attachment_image_src( $background_image, 'hero' );\n } \n }\n }\n \n $this->add_render_attribute( 'wrapper', 'class', 'has-background' );\n $this->add_render_attribute( 'wrapper', 'class', 'background-image' );\n $this->add_render_attribute( 'wrapper', 'style', sprintf( 'background-image: url(%s);', $background_image ) );\n $this->add_render_attribute( 'wrapper', 'style', sprintf( 'background-position: %s %s;', \n $background_position_x, $background_position_y ) );\n \n if( true == $background_overlay ) {\n $this->add_render_attribute( 'wrapper', 'class', 'background-overlay' ); \n }\n \n }", "public function replaceImage()\n {\n $args = func_get_args();\n\n $domDocument = new DomDocument();\n $domDocument->loadXML(self::$_document);\n\n $domImages = $domDocument->getElementsByTagNameNS('http://schemas.openxmlformats.org/drawingml/2006/' .\n 'wordprocessingDrawing', 'docPr');\n $domImagesId = $domDocument->getElementsByTagNameNS(\n 'http://schemas.openxmlformats.org/drawingml/2006/main',\n 'blip'\n );\n\n for ($i = 0; $i < $domImages->length; $i++) {\n if ($domImages->item($i)->getAttribute('descr') ==\n self::$_templateSymbol . $args[0] . self::$_templateSymbol) {\n $ind = $domImagesId->item($i)->getAttribute('r:embed');\n self::$placeholderImages[$ind] = $args[1];\n }\n }\n }", "function ubrnafitness_hero_image()\n{\n $front_page_id = get_option('page_on_front');\n $image_id = get_field('hero_image', $front_page_id);\n\n $image = $image_id['url'];\n\n // Create a \"FALSE\" stylesheet\n wp_register_style('custom', false);\n wp_enqueue_style('custom');\n\n $featured_image_css = \"\n body.home .site-header {\n background-image: linear-gradient( rgba( 0,0,0,0.75), rgba(0,0,0,0.25) ), url( $image );\n background-repeat: no-repeat;\n background-position: center;\n background-size: cover;\n }\n \";\n wp_add_inline_style('custom', $featured_image_css);\n}", "function img($src = '', $attributes = '', $index_page = false)\n\t{\n\t\tif ( ! is_array($src) )\n\t\t{\n\t\t\t$src = array('src' => $src);\n\t\t}\n\n\t\t// If there is no alt attribute defined, set it to an empty string\n\t\tif ( ! isset($src['alt']))\n\t\t{\n\t\t\t$src['alt'] = '';\n\t\t}\n\n\t\t$img = '<img';\n\n\t\tforeach ($src as $k => $v)\n\t\t{\n\t\t\tif ($k === 'src' && ! preg_match('#^(data:[a-z,;])|(([a-z]+:)?(?<!data:)//)#i', $v))\n\t\t\t{\n\t\t\t\tif ($index_page === true)\n\t\t\t\t{\n\t\t\t\t\t$img .= ' src=\"'.get_instance()->config->site_url($v).'\"';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$img .= ' src=\"'.get_instance()->config->slash_item('base_url').$v.'\"';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$img .= ' '.$k.'=\"'.$v.'\"';\n\t\t\t}\n\t\t}\n\n\t\treturn $img._stringify_attributes($attributes).' />';\n\t}", "function namespace_login_style() {\n echo '<style>.login h1 a { background-image: url( http://thesoundtestroom.com/wp-content/uploads/2016/05/whiteHeadSolo150x109.png ) !important; }</style>';\n}", "public function getBgImage(){\r\n return $this->scopeConfigInterface->getValue(self::XML_PATH_POPUP_BG_IMAGE,ScopeInterface::SCOPE_WEBSITE);\r\n }", "public function get_background_css( $selector, $data ) {\n\n\t\t\tif ( ! $selector ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( ! is_array( $data ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( empty( $data['image'] ) && empty( $data['color'] ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$standard_bg = cherry_prepare_background( $data );\n\n\t\t\tif ( empty( $data['image'] ) ) {\n\t\t\t\t$standard_bg .= 'background-image:none;';\n\t\t\t\treturn $selector . '{' . $standard_bg . '}';\n\t\t\t}\n\n\t\t\t$images = explode( ',', $data['image'] );\n\n\t\t\t$property_format = '%s {background-image: url(%s);%s}';\n\n\t\t\tif ( 1 == count( $images ) && wp_attachment_is_image( $images[0] ) ) {\n\n\t\t\t\t$img = wp_get_attachment_image_src( $images[0], 'full' );\n\t\t\t\t$result = sprintf( $property_format, $selector, $img[0], $standard_bg );\n\n\t\t\t\treturn $result;\n\t\t\t}\n\n\t\t\t$img1x = null;\n\t\t\t$img2x = null;\n\t\t\t$width1x = 0;\n\t\t\t$count = 2;\n\n\t\t\tfor ( $i = 0; $i < $count; $i++ ) {\n\n\t\t\t\tif ( ( ! isset( $images[ $i ] ) ) || ( ! wp_attachment_is_image( $images[ $i ] ) ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$img = wp_get_attachment_image_src( $images[ $i ], 'full' );\n\n\t\t\t\tif ( ! is_array( $img ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$img_url = $img[0];\n\t\t\t\t$img_width = intval( $img[1] );\n\n\t\t\t\tif ( null == $img1x ) {\n\t\t\t\t\t$img1x = $img_url;\n\t\t\t\t\t$img2x = $img_url;\n\t\t\t\t\t$width1x = $img_width;\n\t\t\t\t} elseif ( $img_width > $width1x ) {\n\t\t\t\t\t$img2x = $img_url;\n\t\t\t\t} else {\n\t\t\t\t\t$img1x = $img_url;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$bg1 = sprintf( $property_format, $selector, $img1x, $standard_bg );\n\t\t\t$bg2 = sprintf( $property_format, $selector, $img2x, '' );\n\t\t\t$result = $bg1 . ' @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {' . $bg2 . '}';\n\n\t\t\treturn $result;\n\t\t}", "public function addBackground($Settings = array(\"R\"=>230, \"G\"=>230, \"B\"=>230, \"Dash\"=>1, \"DashR\"=>240, \"DashG\"=>240, \"DashB\"=>240)) {\n\t\t $this->drawFilledRectangle(0, 0, $this->XSize, $this->YSize,$Settings);\n\t\t $this->drawRectangle(0,0,$this->XSize - 1,$this->YSize - 1,array(\"R\"=> 80,\"G\"=>80,\"B\"=>80));\n\t}", "public static function addPNGBackground($source, $red, $green, $blue)\n {\n if (! is_resource($source)) {\n throw new \\Exception('$source must of of type resource, ' . gettype($source) . ' given.');\n }\n \n // Create a new true color image with the same size\n $w = imagesx($source);\n $h = imagesy($source);\n $newImage = imagecreatetruecolor($w, $h);\n // Fill the new image with white background\n $bg = imagecolorallocate($source, $red, $green, $blue);\n imagefill($newImage, 0, 0, $bg);\n \n // Copy original transparent image onto the new image\n imagecopy($newImage, $source, 0, 0, 0, 0, $w, $h);\n return $newImage;\n }", "function training_image_callback() {\n $output = array();\n $file_path = drupal_realpath('modules/image/sample.png');\n $source = (object) array(\n 'uid' => 1,\n 'uri' => $file_path,\n 'filename' => basename($file_path),\n 'filemime' => file_get_mimetype($file_path),\n );\n $directory = 'public://';\n file_copy($source, $directory, $replace = FILE_EXISTS_REPLACE);\n $array_style = image_styles();\n foreach ($array_style as $val) {\n $style_name = $val['name'];\n $path = 'public://sample.png';\n $attributes = array(\n 'class' => 'simple-image',\n );\n $output[] = theme('image_style', array(\n 'style_name' => $style_name,\n 'path' => $path,\n 'attributes' => $attributes,\n ));\n }\n\n return theme('item_list', array(\n 'items' => $output,\n 'type' => 'ol',\n 'title' => t('Default image styles'),\n ));\n}", "public function created(BgImage $bgImage)\n {\n //\n }", "function gcb_do_theme_background() {\r\n\t\r\n\t$defaults = array(\r\n\t\t'default_img' => genesis_get_option( 'cb_default' , GCB_SETTINGS_FIELD ),\r\n\t\t'bgimage' => get_background_image(),\r\n\t\t'bgcolor' => get_background_color(),\r\n\t);\r\n\t$defaults = apply_filters( 'gcb_defaults' , $defaults );\r\n\textract( $defaults , EXTR_SKIP );\r\n\r\n\t// begin output\r\n\t$output = \"<style type='text/css'>\\n\";\r\n\r\n\tif ( ( defined( 'CHILD_THEME_NAME' ) ) && ( CHILD_THEME_NAME == 'AgentPress Theme' ) )\r\n\t\t$important = ' !important';\r\n\telse\r\n\t\t$important = '';\r\n\t\r\n\tif( !empty( $bgimage ) ) {\r\n\t\t$bg_styles = 'background-image: url(\\'' . get_theme_mod( 'background_image' , '' ) . '\\')' . $important . ';'\r\n\t\t. ' background-repeat: ' . get_theme_mod( 'background_repeat' , 'repeat' ) . $important . ';'\r\n\t\t. ' background-position: top ' . get_theme_mod( 'background_position_x' , 'left' ) . $important . ';' . 'background-attachment: '. get_theme_mod( 'background_attachment' , 'scroll' );\r\n\t\t\r\n\t\t\r\n\t\t$output .= \"body { \" . $bg_styles . \" } \\n\";\r\n\t} \r\n\t\r\n\tif( !empty( $bgcolor ) ) {\r\n\t\t$output .= \"body { background-color: #\" . $bgcolor . $important . \"; } \\n\";\r\n\t}\r\n\t\r\n\t// for child themes to set a default bg img\r\n\tif( !empty( $default_img ) && empty( $bgimage ) ) {\r\n\t\t$output .= \"body { background: url('\" . gcb_setting_url( $default_img ) . \"')\" . $important . \"; } \\n\";\r\n\t}\r\n\t$output .= \"</style>\";\r\n\t\r\n\techo apply_filters( 'gcb_output' , $output , $bgimage , $bgcolor );\r\n\treturn $output;\r\n}", "function get_background($page_id){\n\n\t$custom_meta = get_post_custom($page_id);\n\t\n\tif(isset($custom_meta['lumen_page_background']) && isset($custom_meta['lumen_page_background'][0]) && $page_id != \"default\"){\n\t\t$background = unserialize($custom_meta['lumen_page_background'][0]);\t\n\t\tif($background['background-color'] == \"\" && $background['background-image'] == \"\") {\n\t\t\t$background = ot_get_option('lumen_site_default_background');\n\t\t}\n\t}\telse {\n\t\t$background = ot_get_option('lumen_site_default_background');\n\t}\n\t\n\t$background_image = \"\";\n\tif(isset($background['background-image'])){\n\t\t$background_image = $background['background-image'];\n\t\tif(strlen($background_image) > 0) {\n\t\t\t$background_image = 'url('.$background_image.')';\n\t\t}\n\t}\n\t\n\t$output = \"\";\n\t$background_repeat = false;\n\t\n\tif(isset($background['background-color'])){ $output .= $background['background-color'].\" \"; }\n\t$output .= $background_image.\" \";\n\tif(isset($background['background-repeat'])){ \n\t\t$output .= $background['background-repeat'].\" \"; \n\t\tif($background['background-repeat'] == \"repeat\"){\n\t\t\t$background_repeat = true;\t\t\n\t\t} \n\t}\n\tif(isset($background['background-attachment'])){ $output .= $background['background-attachment'].\" \"; }\n\tif(isset($background['background-position'])){ $output .= $background['background-position'].\" \"; }\n\t\n\tif(strlen(trim($output)) > 0 && $background_repeat) { \n\t\treturn 'background: '.$output.'; background-size: inherit!important;'; \n\t}else{\n\t\treturn 'background: '.$output; \n\t}\n\t\n\treturn \"\";\n}", "public function add_style($style,$dynamic=false)\n \t{\n \t\t$this->styles[$style]=$style;\n \t}", "function build_image_tag($atts) {\n\t\n\t$imageTag = \"<img \";\n\t// Loop through all attributes provided\n\tforeach ($atts as $att=>$value){\n\t\t\n\t\t// User can provide src as src or url\n\t\tif ($att=='url' || $att == 'src') {\n\t\t\n\t\t\t$imageTag = $imageTag . \"src='\" . $atts['url'] . \"' \";\n\t\t\n\t\t// User can provide widths as a comma delimited list to build srcset attribute\n\t\t} elseif ($att=='width'){\n\t\t\t\n\t\t\t// Create array from string list of widths\t\t\t\n\t\t\t$widths = array_map('trim', explode(\",\", $atts['width']));\t\n\t\t\t$imageTag = $imageTag . \"srcset='\";\n\t\t\t\n\t\t\t// Loop through all widths and add them to srcset attribute\n\t\t\t// Assumes image resizing service can change widths by adding \"?w=\"\n\t\t\tfor($i = 0; $i < sizeof($widths); $i++){\n\t\t\t\tif($i<sizeof($widths)-1){\n\t\t\t\t\t$imageTag = $imageTag . \"{$atts['url']}?w={$widths[$i]} {$widths[$i]}w, \";\n\t\t\t\t} else{\n\t\t\t\t\t$imageTag = $imageTag . \"{$atts['url']}?w={$widths[$i]} {$widths[$i]}w' \";\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Assumes all images are fullwidth\n\t\t\t$imageTag = $imageTag . \"sizes='100vw' \";\n\t\t\n\t\t// User can provide classes as comma delimited list or more common whitespace separated list\n\t\t} elseif ($att=='class'){\n\t\t\n\t\t\t// If comma delimited list, create array then create the classes string attribute\n\t\t\tif (strpos($atts['class'], ',') !== false){\n\t\t\t\t$classes = array_map('trim', explode(\",\", $atts['class']));\n\t\t\t\tfor($i = 0; $i < sizeof($classes); $i++){\n\t\t\t\t\tif($i<sizeof($classes)-1){\n\t\t\t\t\t\t$classAttr = $classAttr . \"{$classes[$i]} \";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$classAttr = $classAttr . \"{$classes[$i]}\";\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t// If not, simply copy provided list\t\t\n\t\t\t} else {\n\t\t\t\t$classAttr = $value;\n\t\t\t}\t\n\t\t\t$imageTag = $imageTag . \"class='{$classAttr}'\";\n\t\t\t\n\t\t// User can provide other attributes to add to image tag\n\t\t} else {\n\t\t\t$imageTag = $imageTag . \"{$att}='{$value}' \";\n\t\t}\n\t}\n\n\t// Close image tag out and return\n\treturn $imageTag . '/>';\n\t\n\n}", "public function set_url_background_pion(String $_url_background_pion){\n $this->_url_background_pion = $_url_background_pion;\n\n return $this;\n }", "function jcr_image_custom($atts)\n {\n global $thisimage;\n\n assert_image();\n\n extract(lAtts(array(\n 'escape' => 'html',\n ), $atts));\n\n return ($escape == 'html')\n ? txpspecialchars($thisimage['jcr_image_custom'])\n : $thisimage['jcr_image_custom'];\n }", "public function image_tag($source, $attributes = NULL) {\n if (!(is_absolute_url($source) || is_root_relative_url($source))) {\n $source = image_url($source);\n }\n\n $info = pathinfo($source);\n\n $extension = isset($info['extension']) ? $info['extension'] : '';\n\n $options = array(\n \"src\" => $this->asset_version($source),\n \"alt\" => capitalize(basename($source,'.' . $extension))\n );\n\n if(is_array($attributes)){\n $options = array_merge($options, $attributes);\n }\n\n return content_tag(\"img\", NULL, $options);\n }", "function wp_typography_get_css_variable_inline_style($attributes, $feature, $css_property)\n {\n }" ]
[ "0.55999446", "0.55529004", "0.54923546", "0.54606146", "0.54446465", "0.54216987", "0.5356394", "0.53329045", "0.51457304", "0.5143552", "0.5142739", "0.5142294", "0.5142176", "0.5101435", "0.50628686", "0.5048754", "0.5021864", "0.49153537", "0.482612", "0.47802806", "0.47078243", "0.47072962", "0.46906897", "0.46901375", "0.4686034", "0.46774775", "0.4672321", "0.46655354", "0.4664149", "0.46584702", "0.45860606", "0.45779344", "0.45772696", "0.45766973", "0.45571664", "0.45571664", "0.45571664", "0.45571664", "0.45345643", "0.45297968", "0.4527409", "0.4502407", "0.45012033", "0.44960845", "0.44838145", "0.4476637", "0.44566023", "0.44468316", "0.44459265", "0.44414878", "0.44409162", "0.44339472", "0.4430363", "0.44231728", "0.4423132", "0.442011", "0.43579042", "0.43568566", "0.43546504", "0.43519104", "0.43514538", "0.43497542", "0.4343141", "0.43279603", "0.43268424", "0.4318887", "0.4307154", "0.43054542", "0.42993417", "0.4277976", "0.4276805", "0.4262833", "0.42611024", "0.42587963", "0.42571923", "0.424539", "0.42445362", "0.4234789", "0.42311856", "0.42295003", "0.4228951", "0.4225894", "0.42221496", "0.42079148", "0.42050046", "0.4195257", "0.41839668", "0.41814515", "0.41746587", "0.41724703", "0.41669777", "0.41622728", "0.41479573", "0.41457438", "0.41346923", "0.41193518", "0.4110446", "0.4109267", "0.4104084", "0.41020736" ]
0.45161647
41
Run the database seeds.
public function run() { User::truncate(); $user = new User; $user['name'] = "Budi Purnomo"; $user['username'] = "[email protected]"; $user['password'] = 'admin123'; $user['role'] = 'admin'; if(!$user->save()){ dd($user->getErrors()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }", "public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }", "public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }", "public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }", "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }", "public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }", "public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}", "public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }", "public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }", "public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }", "public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }", "public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }", "public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }", "public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}", "public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }", "public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }", "public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }", "public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }", "public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }", "public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }", "public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }", "public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }", "public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }", "public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}", "public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }", "public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }", "public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }" ]
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.7841468", "0.7834583", "0.7827792", "0.7819104", "0.78088796", "0.7802872", "0.7802348", "0.78006834", "0.77989215", "0.7795819", "0.77903426", "0.77884805", "0.77862066", "0.7778816", "0.7777486", "0.7765202", "0.7762492", "0.77623445", "0.77621746", "0.7761383", "0.77606887", "0.77596676", "0.7757001", "0.7753607", "0.7749522", "0.7749292", "0.77466977", "0.7729947", "0.77289546", "0.772796", "0.77167094", "0.7714503", "0.77140456", "0.77132195", "0.771243", "0.77122366", "0.7711113", "0.77109736", "0.7710777", "0.7710086", "0.7705484", "0.770464", "0.7704354", "0.7704061", "0.77027386", "0.77020216", "0.77008796", "0.7698617", "0.76985973", "0.76973504", "0.7696405", "0.7694293", "0.7692694", "0.7691264", "0.7690576", "0.76882726", "0.7687433", "0.7686844", "0.7686498", "0.7685065", "0.7683827", "0.7679184", "0.7678287", "0.76776296", "0.76767945", "0.76726556", "0.76708084", "0.76690495", "0.766872", "0.76686716", "0.7666299", "0.76625943", "0.7662227", "0.76613766", "0.7659881", "0.7656644", "0.76539344", "0.76535016", "0.7652375", "0.7652313", "0.7652022" ]
0.0
-1
Creates a TSFE object which can be used in Backend
protected function buildTsfe() { if (!is_object($GLOBALS['TT'])) { $GLOBALS['TT'] = $this->getTimeTrackerInstance(); $GLOBALS['TT']->start(); } $GLOBALS['TSFE'] = $this->getTsfeInstance(); $GLOBALS['TSFE']->initFEuser(); $GLOBALS['TSFE']->fetch_the_id(); $GLOBALS['TSFE']->getPageAndRootline(); $GLOBALS['TSFE']->initTemplate(); $GLOBALS['TSFE']->getConfigArray(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function initTSFE() {\n\t\tif (!is_object($GLOBALS['TSFE'])) {\n\t\t\t$GLOBALS['TSFE'] = t3lib_div::makeInstance('tslib_fe', $GLOBALS['TYPO3_CONF_VARS'], 0, 0, TRUE);\n\t\t\t$GLOBALS['TSFE']->initFEuser();\n\t\t\t$GLOBALS['TSFE']->fetch_the_id();\n\t\t\t$GLOBALS['TSFE']->getPageAndRootline();\n\t\t\t$GLOBALS['TSFE']->initTemplate();\n\t\t\t$GLOBALS['TSFE']->forceTemplateParsing = 1;\n\t\t\t$GLOBALS['TSFE']->getConfigArray();\n\t\t\t$GLOBALS['TSFE']->includeTCA();\n\t\t\t$GLOBALS['TSFE']->newCObj();\n\t\t}\n\t}", "protected function getTsfeInstance() {\n\t\t$tsfeClassname = 'TYPO3\\\\CMS\\\\Frontend\\\\Controller\\\\TypoScriptFrontendController';\n\t\treturn \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance($tsfeClassname,\n\t\t\t$GLOBALS['TYPO3_CONF_VARS'], $this->pid, '0', 1, '', '', '', '');\n\t}", "private static function getTSFE() {}", "function buildTSFE() {\n\t $typeNum = 0 ;\n\t if( $this->pid < 1 ) {\n $this->pid = 1 ;\n }\n\t\tif (!is_object($GLOBALS['TT'])) {\n\t\t\t$GLOBALS['TT'] = new TimeTracker;\n\t\t\tGeneralUtility::makeInstance(TimeTracker::class)->start();\n\t\t}\n/*\n * @param array $_ unused, previously defined to set TYPO3_CONF_VARS\n * @param mixed $id The value of GeneralUtility::_GP('id')\n * @param int $type The value of GeneralUtility::_GP('type')\n * @param bool|string $no_cache The value of GeneralUtility::_GP('no_cache'), evaluated to 1/0, will be unused in TYPO3 v10.0.\n * @param string $cHash The value of GeneralUtility::_GP('cHash')\n * @param string $_2 previously was used to define the jumpURL\n * @param string $MP The value of GeneralUtility::_GP('MP')\n */\n // public function __construct($_ = null, $id, $type, $no_cache = null, $cHash = '', $_2 = null, $MP = '')\n /** @var TypoScriptFrontendController $TSFEclassName */\n $TSFEclassName = GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Frontend\\\\Controller\\\\TypoScriptFrontendController' ,NULL , $this->pid , $typeNum , null , '', '', '') ;\n\t\t$GLOBALS['TSFE'] = new $TSFEclassName($GLOBALS['TYPO3_CONF_VARS'], $this->pid, $typeNum , null , '', '', '', '');\n // note: we need to instantiate the logger manually here since the injection happens after the constructor\n $GLOBALS['TSFE']->logger = GeneralUtility::makeInstance(LogManager::class)->getLogger(__CLASS__) ;\n\t\t// $GLOBALS['TSFE']->fetch_the_id();\n\n\t\t// done already in fetch the ID\n\t//\t$GLOBALS['TSFE']->getPageAndRootline();\n\t//\t$GLOBALS['TSFE']->initTemplate();\n\t\t$GLOBALS['TSFE']->tmpl->getFileName_backPath = Environment::getPublicPath() . '/';\n\t\tGeneralUtility::makeInstance(Context::class)->setAspect('typoscript', GeneralUtility::makeInstance(TypoScriptAspect::class, true));\n\t\t$GLOBALS['TSFE']->getConfigArray();\n\t}", "protected function initTSFE() {\n\t\t$GLOBALS['TSFE'] = $tsfe = GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Frontend\\\\Controller\\\\TypoScriptFrontendController', $GLOBALS['TYPO3_CONF_VARS'], GeneralUtility::_GP('id'), '');\n\t\t/** @var \\TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController $tsfe */\n\t\t$tsfe->connectToDB();\n\t\t$tsfe->initFEuser();\n\t\t\\TYPO3\\CMS\\Frontend\\Utility\\EidUtility::initTCA();\n\t\t$tsfe->determineId();\n\t\t$tsfe->initTemplate();\n\t\t$tsfe->getConfigArray();\n\t\t$tsfe->settingLanguage();\n\n\t\t// Get linkVars, absRefPrefix, etc\n\t\t\\TYPO3\\CMS\\Frontend\\Page\\PageGenerator::pagegenInit();\n\t}", "protected function initTSFE() {\n\t\t$tsfeClassName = t3lib_div::makeInstanceClassName('tslib_fe');\n\n\t\t$GLOBALS['TSFE'] = new $tsfeClassName($GLOBALS['TYPO3_CONF_VARS'], t3lib_div::_GP('id'), '');\n\n\t\t$initCache = !isset($GLOBALS['typo3CacheManager']) && version_compare(TYPO3_branch, '4.3', '>=');\n\t\tif ($initCache) {\n\t\t\trequire_once(PATH_t3lib . 'class.t3lib_cache.php');\n\t\t\trequire_once(PATH_t3lib . 'cache/class.t3lib_cache_abstractbackend.php');\n\t\t\trequire_once(PATH_t3lib . 'cache/class.t3lib_cache_abstractcache.php');\n\t\t\trequire_once(PATH_t3lib . 'cache/class.t3lib_cache_exception.php');\n\t\t\trequire_once(PATH_t3lib . 'cache/class.t3lib_cache_factory.php');\n\t\t\trequire_once(PATH_t3lib . 'cache/class.t3lib_cache_manager.php');\n\t\t\trequire_once(PATH_t3lib . 'cache/class.t3lib_cache_variablecache.php');\n\t\t\trequire_once(PATH_t3lib . 'cache/exception/class.t3lib_cache_exception_classalreadyloaded.php');\n\t\t\trequire_once(PATH_t3lib . 'cache/exception/class.t3lib_cache_exception_duplicateidentifier.php');\n\t\t\trequire_once(PATH_t3lib . 'cache/exception/class.t3lib_cache_exception_invalidbackend.php');\n\t\t\trequire_once(PATH_t3lib . 'cache/exception/class.t3lib_cache_exception_invalidcache.php');\n\t\t\trequire_once(PATH_t3lib . 'cache/exception/class.t3lib_cache_exception_invaliddata.php');\n\t\t\trequire_once(PATH_t3lib . 'cache/exception/class.t3lib_cache_exception_nosuchcache.php');\n\t\t\t$GLOBALS['typo3CacheManager'] = t3lib_div::makeInstance('t3lib_cache_Manager');\n\t\t\t$cacheFactoryClass = t3lib_div::makeInstanceClassName('t3lib_cache_Factory');\n\t\t\t$GLOBALS['typo3CacheFactory'] = new $cacheFactoryClass($GLOBALS['typo3CacheManager']);\n\t\t\tunset($cacheFactoryClass);\n\t\t\t$GLOBALS['TSFE']->initCaches();\n\t\t}\n\t\t$GLOBALS['TSFE']->connectToMySQL();\n\t\t$GLOBALS['TSFE']->initFEuser();\n\t\t$GLOBALS['TSFE']->checkAlternativeIdMethods();\n\t\t$GLOBALS['TSFE']->determineId();\n\t\t$GLOBALS['TSFE']->getCompressedTCarray();\n\t\t$GLOBALS['TSFE']->initTemplate();\n\t\t$GLOBALS['TSFE']->getConfigArray();\n\n\t\t// Get linkVars, absRefPrefix, etc\n\t\tTSpagegen::pagegenInit();\n\t}", "protected function getFrontendObject()\n {\n return $GLOBALS['TSFE'];\n }", "public function createLatteEngine()\n {\n $latte = new Latte\\Engine();\n $tmpDir = $this->config->value('tmpDir', 'tmp');\n if ($tmpDir[0] !== '/') {\n $tmpDir = __DIR__ . '/../' . $tmpDir . '/latte';\n }\n $latte->setTempDirectory($tmpDir);\n return $latte;\n }", "private static function engine(): Factory\n {\n if (!(self::$engine instanceof Factory)) {\n $loader = new FileLoader(new Filesystem(), self::$translationFolderPath);\n $translator = new Translator($loader, self::$lang);\n self::$engine = new Factory($translator, new Container());\n }\n\n return self::$engine;\n }", "public static function new(): static\n {\n $data = API::ffi()->ts_parser_new();\n\n return new static(API::ffi(), $data);\n }", "public function createFSService();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create() {\n\t \n }", "protected function simulateFrontendEnvironment() {\n\t\t$this->tsfeBackup = isset($GLOBALS['TSFE']) ? $GLOBALS['TSFE'] : NULL;\n\t\t\t// set the working directory to the site root\n\t\t$this->workingDirectoryBackup = getcwd();\n\t\tchdir(PATH_site);\n\n\t\t$typoScriptSetup = $this->configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT);\n\t\t$GLOBALS['TSFE'] = new stdClass();\n\t\t$template = t3lib_div::makeInstance('t3lib_TStemplate');\n\t\t$template->tt_track = 0;\n\t\t$template->init();\n\t\t$template->getFileName_backPath = PATH_site;\n\t\t$GLOBALS['TSFE']->tmpl = $template;\n\t\t$GLOBALS['TSFE']->tmpl->setup = $typoScriptSetup;\n\t\t$GLOBALS['TSFE']->config = $typoScriptSetup;\n\t}", "protected function makeSimulatedTsfe(int $pid, array $storage): TypoScriptFrontendController\n {\n $key = md5(SerializerUtil::serialize($storage['languageAspect']) . '_' . $pid);\n if (isset($this->instanceCache[$key])) {\n return $this->instanceCache[$key];\n }\n \n /** @var TypoScriptFrontendController|null $tsfe */\n $tsfe = $GLOBALS['TSFE'];\n \n if ($tsfe instanceof TypoScriptFrontendController) {\n $args = $tsfe->getPageArguments();\n $pageArguments = $this->makeInstance(\n PageArguments::class,\n [\n $pid,\n $args->getPageType(),\n $args->getRouteArguments(),\n $args->getStaticArguments(),\n $args->getDynamicArguments(),\n ]\n );\n } else {\n $pageArguments = $this->makeInstance(PageArguments::class, [$pid, '0', [], [], []]);\n }\n \n $context = $this->getTypoContext();\n $simulateCliRequest = false;\n \n try {\n // In the CLI there is no root request, so the instantiation of the TSFE fails.\n // This hack creates a fallback to allow the script to run with the current site base url\n if ($context->env()->isCli() && $context->request()->getRootRequest() === null) {\n $simulateCliRequest = true;\n $baseUrl = $context->site()->getCurrent()->getBase();\n /** @noinspection HostnameSubstitutionInspection */\n $_SERVER['HTTP_HOST'] = $baseUrl->getHost();\n $_SERVER['REQUEST_URI'] = $baseUrl->getPath() . '?' . $baseUrl->getQuery();\n GeneralUtility::flushInternalRuntimeCaches();\n }\n \n $controller = $this->makeInstance(\n SimulatedTypoScriptFrontendController::class, [\n $context->getRootContext(),\n $context->site()->getCurrent(),\n $context->language()->getCurrentFrontendLanguage(),\n $pageArguments,\n $this->makeInstance(FrontendUserAuthentication::class),\n ]\n );\n \n } finally {\n if ($simulateCliRequest) {\n $GLOBALS['TYPO3_REQUEST'] = null;\n $GLOBALS['TYPO3_REQUEST_FALLBACK'] = null;\n }\n }\n \n \n $GLOBALS['TSFE'] = $controller;\n $controller->sys_page = $this->pageService->getPageRepository();\n $controller->rootLine = $this->pageService->getRootLine($pid);\n $controller->page = $this->pageService->getPageInfo($pid);\n $controller->getConfigArray();\n $controller->settingLanguage();\n $controller->cObj = $this->makeInstance(ContentObjectRenderer::class, [$controller, $this->getContainer()]);\n \n return $this->instanceCache[$key] = $controller;\n }", "abstract function create();", "public static function create() {}", "public static function create() {}", "public static function create() {}", "public function create()\n\t {\n\t //\n\t }", "public function create(){}", "public static function create() {\n $factory = new static();\n return $factory->createFlo();\n }", "public function create() {}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "protected function getTextFormatter_S9e_FactoryService()\n {\n return $this->services['text_formatter.s9e.factory'] = new \\phpbb\\textformatter\\s9e\\factory(${($_ = isset($this->services['text_formatter.data_access']) ? $this->services['text_formatter.data_access'] : $this->getTextFormatter_DataAccessService()) && false ?: '_'}, ${($_ = isset($this->services['cache.driver']) ? $this->services['cache.driver'] : ($this->services['cache.driver'] = new \\phpbb\\cache\\driver\\file())) && false ?: '_'}, ${($_ = isset($this->services['dispatcher']) ? $this->services['dispatcher'] : $this->getDispatcherService()) && false ?: '_'}, ${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['text_formatter.s9e.link_helper']) ? $this->services['text_formatter.s9e.link_helper'] : ($this->services['text_formatter.s9e.link_helper'] = new \\phpbb\\textformatter\\s9e\\link_helper())) && false ?: '_'}, ${($_ = isset($this->services['log']) ? $this->services['log'] : $this->getLogService()) && false ?: '_'}, './../cache/production/', '_text_formatter_parser', '_text_formatter_renderer');\n }", "public function buildFrontend()\n {\n global $TSFE;\n EidUtility::initLanguage();\n\n /** @var TypoScriptFrontendController $TSFE */\n $TSFE = GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Frontend\\\\Controller\\\\TypoScriptFrontendController',\n $GLOBALS['TYPO3_CONF_VARS'], 0, 0);\n EidUtility::initLanguage();\n\n // Get FE User Information\n $TSFE->initFEuser();\n // Important: no Cache for Ajax stuff\n $TSFE->set_no_cache();\n $TSFE->initTemplate();\n // $TSFE->getConfigArray();\n Bootstrap::getInstance()\n ->loadCachedTca();\n $TSFE->cObj = GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer');\n $TSFE->settingLanguage();\n $TSFE->settingLocale();\n }", "function convert_to_model($stdObject, $context = FALSE)\n {\n // Create a factory\n $retval = NULL;\n try {\n $this->object->_convert_to_entity($stdObject);\n } catch (Exception $ex) {\n throw new E_InvalidEntityException($ex);\n }\n $retval = $this->object->create($stdObject, $context);\n return $retval;\n }", "public function create() {\n\t\t\t//\n\t\t}", "public function create() {\n\n\t\t\n\t}", "public function create()\r\n\t{\r\n\t\t//\r\n\t}", "public function create()\n\t{\n\n\n\t\t//\n\t}", "public function create()\n\t{\n\t\t\n\t\t//\n\t}", "public function create() {\n //not implemented\n }", "public function create() {\n\n\t}", "protected function _createEntity()\n\t\t{\n\t\t\t// Form template name.\n\t\t\t$separator = '__';\n\t\t\t$template = $type = $this->_createForm->type->getValue();\n\t\t\t$subject = $this->_createForm->subject->getValue();\n\t\t\tif ( $platformId = $this->_createForm->platform_id->getValue() ) {\n\t\t\t\t$platform = Table::_( 'platforms' )->get( $platformId );\n\t\t\t\t$template = $platform->name . $separator . $template;\n\t\t\t}\n\t\t\tif ( $pluginId = $this->_createForm->plugin_id->getValue() ) {\n\t\t\t\t$filter = new D_Filter_PluginDirectory();\n\t\t\t\t$plugin = Table::_( 'plugins' )->get( $pluginId );\n\t\t\t\t$template = str_replace( '-', '_', $filter->filter( $plugin->name ) ) . $separator . $template;\n\t\t\t}\n\t\t\t$template .= '.phtml';\n\t\t\t// Write a file.\n\t\t\t$directory = $this->_getTypeDirectory( $type );\n\t\t\tif ( !file_exists( $directory . $template ) ) {\n\t\t\t\tfile_put_contents(\n\t\t\t\t\t$directory . $template,\n\t\t\t\t\t$this->_createForm->content->getValue()\n\t\t\t\t);\n\t\t\t}\n\t\t\t// Save a subject.\n\t\t\t$settingId = Model::_( 'settings' )->setting( $template . '[email subject]' );\n\t\t\tModel::_( 'settings' )->string( $settingId, $subject );\n\t\t}", "public function create()\n\t\t{\n\t\t\t//\n\t\t}", "public function create()\n\t\t{\n\t\t\t//\n\t\t}", "protected function create() {\n\t}", "abstract public function createTemplateEntity();", "public function create(){\n\t\t//\n\t}", "public function create(){\n\t\t//\n\t}", "public function create(){\n\t\t//\n\t}", "public function create(){\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}", "public function create()\n\t{\n\t\t//\n\t}" ]
[ "0.6976391", "0.6676943", "0.6447059", "0.636777", "0.6349801", "0.6219838", "0.6138009", "0.58910096", "0.5665983", "0.56044847", "0.5567781", "0.5494795", "0.5494795", "0.5494795", "0.5494795", "0.5494795", "0.5494795", "0.5494795", "0.5494795", "0.5494795", "0.5494795", "0.5494795", "0.5437414", "0.5419826", "0.53909457", "0.5374159", "0.5373209", "0.5373209", "0.5373209", "0.5372698", "0.5366612", "0.53575736", "0.5336713", "0.5321086", "0.5321086", "0.5321086", "0.5321086", "0.5321086", "0.5321086", "0.5321086", "0.5321086", "0.5321086", "0.5321086", "0.5321086", "0.5321086", "0.5304708", "0.52993876", "0.5291539", "0.5270112", "0.52631545", "0.5261328", "0.5254858", "0.5254539", "0.52538013", "0.5245023", "0.5230877", "0.5228876", "0.5228876", "0.5216986", "0.5214228", "0.5199366", "0.5199366", "0.5199366", "0.5199366", "0.51913464", "0.51913464", "0.51913464", "0.51913464", "0.51913464", "0.51913464", "0.51913464", "0.51913464", "0.51913464", "0.51913464", "0.51913464", "0.51913464", "0.51913464", "0.51913464", "0.51913464", "0.51913464", "0.51913464", "0.51913464", "0.51913464", "0.51913464", "0.51913464", "0.51913464", "0.51913464", "0.51913464", "0.51913464", "0.51913464", "0.51913464", "0.51913464", "0.51913464", "0.51913464", "0.51913464", "0.51913464", "0.51913464", "0.51913464", "0.51913464", "0.51913464" ]
0.67782396
1
Returns a new instance of the TypoScriptFrontendController
protected function getTsfeInstance() { $tsfeClassname = 'TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController'; return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($tsfeClassname, $GLOBALS['TYPO3_CONF_VARS'], $this->pid, '0', 1, '', '', '', ''); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getTypoScriptFrontendController() {}", "protected static function getTypoScriptFrontendController() {}", "protected function initTypoScriptFrontendController() {\n\t\t// Get page uid and mount point, if any\n\t\t$this->pageUid = GeneralUtility::_GET('id');\n\t\tif (!isset($this->pageUid)) {\n\t\t\t$this->pageUid = 0;\n\t\t}\n\t\t$this->pageUid = htmlspecialchars($this->pageUid);\n\t\t$MP = htmlspecialchars(GeneralUtility::_GET('MP'));\n\t\t$GLOBALS['TSFE'] = $this->objectManager->get('TYPO3\\\\CMS\\\\Frontend\\\\Controller\\\\TypoScriptFrontendController', $GLOBALS['TYPO3_CONF_VARS'], $this->pageUid, '0', TRUE, '', '', $MP, '');\n\t\t\\TYPO3\\CMS\\Frontend\\Utility\\EidUtility::initTCA();\n\t\t$GLOBALS['TSFE']->sys_page = $this->objectManager->get('TYPO3\\\\CMS\\\\Frontend\\\\Page\\\\PageRepository');\n\t\t$GLOBALS['TSFE']->initFeUser();\n\t\t$GLOBALS['TSFE']->determineId();\n\t\treturn $this;\n\t}", "protected function getTypoScriptFrontendController()\r\n {\r\n return $GLOBALS['TSFE'];\r\n }", "protected function makeSimulatedTsfe(int $pid, array $storage): TypoScriptFrontendController\n {\n $key = md5(SerializerUtil::serialize($storage['languageAspect']) . '_' . $pid);\n if (isset($this->instanceCache[$key])) {\n return $this->instanceCache[$key];\n }\n \n /** @var TypoScriptFrontendController|null $tsfe */\n $tsfe = $GLOBALS['TSFE'];\n \n if ($tsfe instanceof TypoScriptFrontendController) {\n $args = $tsfe->getPageArguments();\n $pageArguments = $this->makeInstance(\n PageArguments::class,\n [\n $pid,\n $args->getPageType(),\n $args->getRouteArguments(),\n $args->getStaticArguments(),\n $args->getDynamicArguments(),\n ]\n );\n } else {\n $pageArguments = $this->makeInstance(PageArguments::class, [$pid, '0', [], [], []]);\n }\n \n $context = $this->getTypoContext();\n $simulateCliRequest = false;\n \n try {\n // In the CLI there is no root request, so the instantiation of the TSFE fails.\n // This hack creates a fallback to allow the script to run with the current site base url\n if ($context->env()->isCli() && $context->request()->getRootRequest() === null) {\n $simulateCliRequest = true;\n $baseUrl = $context->site()->getCurrent()->getBase();\n /** @noinspection HostnameSubstitutionInspection */\n $_SERVER['HTTP_HOST'] = $baseUrl->getHost();\n $_SERVER['REQUEST_URI'] = $baseUrl->getPath() . '?' . $baseUrl->getQuery();\n GeneralUtility::flushInternalRuntimeCaches();\n }\n \n $controller = $this->makeInstance(\n SimulatedTypoScriptFrontendController::class, [\n $context->getRootContext(),\n $context->site()->getCurrent(),\n $context->language()->getCurrentFrontendLanguage(),\n $pageArguments,\n $this->makeInstance(FrontendUserAuthentication::class),\n ]\n );\n \n } finally {\n if ($simulateCliRequest) {\n $GLOBALS['TYPO3_REQUEST'] = null;\n $GLOBALS['TYPO3_REQUEST_FALLBACK'] = null;\n }\n }\n \n \n $GLOBALS['TSFE'] = $controller;\n $controller->sys_page = $this->pageService->getPageRepository();\n $controller->rootLine = $this->pageService->getRootLine($pid);\n $controller->page = $this->pageService->getPageInfo($pid);\n $controller->getConfigArray();\n $controller->settingLanguage();\n $controller->cObj = $this->makeInstance(ContentObjectRenderer::class, [$controller, $this->getContainer()]);\n \n return $this->instanceCache[$key] = $controller;\n }", "private function makeInitiatedController()\n\t{\n\t\t$controller = new TestEntityCRUDController();\n\n\t\t$controller->setLoggerWrapper(Logger::create());\n\n\t\treturn $controller;\n\t}", "protected function getFrontendController() {}", "private function getTypoScriptFrontendController(): ?TypoScriptFrontendController\n {\n return $GLOBALS['TSFE'];\n }", "protected function getFrontendController() {\n\t\treturn $GLOBALS['TSFE'];\n\t}", "public function buildFrontend()\n {\n global $TSFE;\n EidUtility::initLanguage();\n\n /** @var TypoScriptFrontendController $TSFE */\n $TSFE = GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Frontend\\\\Controller\\\\TypoScriptFrontendController',\n $GLOBALS['TYPO3_CONF_VARS'], 0, 0);\n EidUtility::initLanguage();\n\n // Get FE User Information\n $TSFE->initFEuser();\n // Important: no Cache for Ajax stuff\n $TSFE->set_no_cache();\n $TSFE->initTemplate();\n // $TSFE->getConfigArray();\n Bootstrap::getInstance()\n ->loadCachedTca();\n $TSFE->cObj = GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer');\n $TSFE->settingLanguage();\n $TSFE->settingLocale();\n }", "public function initialize(ServerRequestInterface $request, TypoScriptFrontendController $controller);", "public static function getInstance() : Controller {\n if ( null === self::$instance ) {\n self::$instance = new self();\n self::$instance->options = new Options(\n self::OPTIONS_KEY\n );\n }\n\n return self::$instance;\n }", "public static function create()\n\t{\n\t\t//check, if a JobController instance already exists\n\t\tif(JobController::$jobController == null)\n\t\t{\n\t\t\tJobController::$jobController = new JobController();\n\t\t}\n\n\t\treturn JobController::$jobController;\n\t}", "protected function getBazinga_Jstranslation_ControllerService()\n {\n $a = $this->get('translation.loader.xliff');\n\n $this->services['bazinga.jstranslation.controller'] = $instance = new \\Bazinga\\Bundle\\JsTranslationBundle\\Controller\\Controller($this->get('translator.default'), $this->get('templating'), $this->get('bazinga.jstranslation.translation_finder'), (__DIR__.'/bazinga-js-translation'), false, 'en', 'messages', '86400');\n\n $instance->addLoader('php', $this->get('translation.loader.php'));\n $instance->addLoader('yml', $this->get('translation.loader.yml'));\n $instance->addLoader('xlf', $a);\n $instance->addLoader('xliff', $a);\n $instance->addLoader('po', $this->get('translation.loader.po'));\n $instance->addLoader('mo', $this->get('translation.loader.mo'));\n $instance->addLoader('ts', $this->get('translation.loader.qt'));\n $instance->addLoader('csv', $this->get('translation.loader.csv'));\n $instance->addLoader('res', $this->get('translation.loader.res'));\n $instance->addLoader('dat', $this->get('translation.loader.dat'));\n $instance->addLoader('ini', $this->get('translation.loader.ini'));\n $instance->addLoader('json', $this->get('translation.loader.json'));\n\n return $instance;\n }", "function functionality() {\n\tstatic $controller;\n\n\tif ( ! isset( $controller ) ) {\n\t\t$controller = new Functionality_Controller( __FILE__ );\n\t}\n\n\treturn $controller;\n}", "protected function createController()\n {\n $this->createClass('controller');\n }", "public function getController( );", "public function __construct()\n {\n $this->controller = new DHTController();\n }", "protected function FrontendModule()\n {\n return new Frontend\\Container();\n }", "public static function get(){ \n if (self::$instance === null) {\n self::$instance = new ArticleController();\n }\n return self::$instance;\n }", "public function initAndDispatch() {\n\t\treturn $this->initTypoScriptFrontendController()\n\t\t\t->initTypoScriptConfiguration()\n\t\t\t->initLanguage()\n\t\t\t->initCallArguments()\n\t\t\t->dispatch();\n\t}", "public function show()\n {\n new $this->controller();\n }", "function buildTSFE() {\n\t $typeNum = 0 ;\n\t if( $this->pid < 1 ) {\n $this->pid = 1 ;\n }\n\t\tif (!is_object($GLOBALS['TT'])) {\n\t\t\t$GLOBALS['TT'] = new TimeTracker;\n\t\t\tGeneralUtility::makeInstance(TimeTracker::class)->start();\n\t\t}\n/*\n * @param array $_ unused, previously defined to set TYPO3_CONF_VARS\n * @param mixed $id The value of GeneralUtility::_GP('id')\n * @param int $type The value of GeneralUtility::_GP('type')\n * @param bool|string $no_cache The value of GeneralUtility::_GP('no_cache'), evaluated to 1/0, will be unused in TYPO3 v10.0.\n * @param string $cHash The value of GeneralUtility::_GP('cHash')\n * @param string $_2 previously was used to define the jumpURL\n * @param string $MP The value of GeneralUtility::_GP('MP')\n */\n // public function __construct($_ = null, $id, $type, $no_cache = null, $cHash = '', $_2 = null, $MP = '')\n /** @var TypoScriptFrontendController $TSFEclassName */\n $TSFEclassName = GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Frontend\\\\Controller\\\\TypoScriptFrontendController' ,NULL , $this->pid , $typeNum , null , '', '', '') ;\n\t\t$GLOBALS['TSFE'] = new $TSFEclassName($GLOBALS['TYPO3_CONF_VARS'], $this->pid, $typeNum , null , '', '', '', '');\n // note: we need to instantiate the logger manually here since the injection happens after the constructor\n $GLOBALS['TSFE']->logger = GeneralUtility::makeInstance(LogManager::class)->getLogger(__CLASS__) ;\n\t\t// $GLOBALS['TSFE']->fetch_the_id();\n\n\t\t// done already in fetch the ID\n\t//\t$GLOBALS['TSFE']->getPageAndRootline();\n\t//\t$GLOBALS['TSFE']->initTemplate();\n\t\t$GLOBALS['TSFE']->tmpl->getFileName_backPath = Environment::getPublicPath() . '/';\n\t\tGeneralUtility::makeInstance(Context::class)->setAspect('typoscript', GeneralUtility::makeInstance(TypoScriptAspect::class, true));\n\t\t$GLOBALS['TSFE']->getConfigArray();\n\t}", "public function makeNew()\n\t{\n\t\treturn new static($this->view);\n\t}", "public function __construct(){\r\n $app = Application::getInstance();\r\n $this->_controller = $app->getController();\r\n }", "protected function createTestController() {\n\t\t$controller = new CController('test');\n\n\t\t$action = $this->getMock('CAction', array('run'), array($controller, 'test'));\n\t\t$controller->action = $action;\n\n\t\tYii::app()->controller = $controller;\n\t\treturn $controller;\n\t}", "protected function initTypoScriptConfiguration() {\n\t\t$GLOBALS['TSFE']->getPageAndRootline();\n\t\t$GLOBALS['TSFE']->initTemplate();\n\t\t$GLOBALS['TSFE']->tmpl->getFileName_backPath = PATH_site;\n\t\t$GLOBALS['TSFE']->getConfigArray();\n\t\treturn $this;\n\t}", "public function getViewController()\n {\n return new ezpRestApiViewController();\n }", "private function createInstance()\n {\n $objectManager = new \\Magento\\Framework\\TestFramework\\Unit\\Helper\\ObjectManager($this);\n $this->controller = $objectManager->getObject(\n \\Magento\\NegotiableQuote\\Controller\\Adminhtml\\Quote\\RemoveFailedSku::class,\n [\n 'context' => $this->context,\n 'logger' => $this->logger,\n 'messageManager' => $this->messageManager,\n 'cart' => $this->cart,\n 'resultRawFactory' => $this->resultRawFactory\n ]\n );\n }", "function getInstance(){\n\treturn MVC_controller::getInstance();\n}", "public function create()\n {\n $scripts = '<script type=\"text/javascript\" src=\"'.URL::asset('js/plugins/typeahead.bundle.min.js').'\"></script>';\n return View::make('backend.spa.create', array('scripts' => $scripts));\n }", "function getController(){\n\treturn getFactory()->getBean( 'Controller' );\n}", "public function getController() {\n if (!$this->controller instanceof baxe_App_Web_Controller_Abstract) {\n $this->controller = new baxe_App_Web_Controller_Front($this);\n }\n return $this->controller;\n }", "public function getController();", "public function getController();", "public function getController();", "static public function Instance()\t\t// Static so we use classname itself to create object i.e. Controller::Instance()\r\n {\r\n // Only one object of this class is required\r\n // so we only create if it hasn't already\r\n // been created.\r\n if(!isset(self::$_instance))\r\n {\r\n self::$_instance = new self();\t// Make new instance of the Controler class\r\n self::$_instance->_commandResolver = new CommandResolver();\r\n\r\n ApplicationController::LoadViewMap();\r\n }\r\n return self::$_instance;\r\n }", "public static function createFrontController()\n {\n return self::createInjectorWithBindings(self::extractArgs(func_get_args()))\n ->getInstance('net::stubbles::websites::stubFrontController');\n }", "private function instanceController( string $controller_class ): Controller {\n\t\treturn new $controller_class( $this->request, $this->site );\n\t}", "public function & GetController ();", "public function GetController()\n\t{\n\t\t$params = $this->QueryVarArrayToParameterArray($_GET);\n\t\tif (!empty($_POST)) {\n\t\t\t$params = array_merge($params, $this->QueryVarArrayToParameterArray($_POST));\n\t\t}\n\n\t\tif (!empty($_GET['q'])) {\n\t\t\t$restparams = GitPHP_Router::ReadCleanUrl($_SERVER['REQUEST_URI']);\n\t\t\tif (count($restparams) > 0)\n\t\t\t\t$params = array_merge($params, $restparams);\n\t\t}\n\n\t\t$controller = null;\n\n\t\t$action = null;\n\t\tif (!empty($params['action']))\n\t\t\t$action = $params['action'];\n\n\t\tswitch ($action) {\n\n\n\t\t\tcase 'search':\n\t\t\t\t$controller = new GitPHP_Controller_Search();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commitdiff':\n\t\t\tcase 'commitdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Commitdiff();\n\t\t\t\tif ($action === 'commitdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blobdiff':\n\t\t\tcase 'blobdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Blobdiff();\n\t\t\t\tif ($action === 'blobdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'history':\n\t\t\t\t$controller = new GitPHP_Controller_History();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'shortlog':\n\t\t\tcase 'log':\n\t\t\t\t$controller = new GitPHP_Controller_Log();\n\t\t\t\tif ($action === 'shortlog')\n\t\t\t\t\t$controller->SetParam('short', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'snapshot':\n\t\t\t\t$controller = new GitPHP_Controller_Snapshot();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tree':\n\t\t\tcase 'trees':\n\t\t\t\t$controller = new GitPHP_Controller_Tree();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tags':\n\t\t\t\tif (empty($params['tag'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Tags();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcase 'tag':\n\t\t\t\t$controller = new GitPHP_Controller_Tag();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'heads':\n\t\t\t\t$controller = new GitPHP_Controller_Heads();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blame':\n\t\t\t\t$controller = new GitPHP_Controller_Blame();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blob':\n\t\t\tcase 'blobs':\n\t\t\tcase 'blob_plain':\t\n\t\t\t\t$controller = new GitPHP_Controller_Blob();\n\t\t\t\tif ($action === 'blob_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'atom':\n\t\t\tcase 'rss':\n\t\t\t\t$controller = new GitPHP_Controller_Feed();\n\t\t\t\tif ($action == 'rss')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::RssFormat);\n\t\t\t\telse if ($action == 'atom')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::AtomFormat);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commit':\n\t\t\tcase 'commits':\n\t\t\t\t$controller = new GitPHP_Controller_Commit();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'summary':\n\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'project_index':\n\t\t\tcase 'projectindex':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('txt', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'opml':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('opml', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'login':\n\t\t\t\t$controller = new GitPHP_Controller_Login();\n\t\t\t\tif (!empty($_POST['username']))\n\t\t\t\t\t$controller->SetParam('username', $_POST['username']);\n\t\t\t\tif (!empty($_POST['password']))\n\t\t\t\t\t$controller->SetParam('password', $_POST['password']);\n\t\t\t\tbreak;\n\n\t\t\tcase 'logout':\n\t\t\t\t$controller = new GitPHP_Controller_Logout();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'graph':\n\t\t\tcase 'graphs':\n\t\t\t\t//$controller = new GitPHP_Controller_Graph();\n\t\t\t\t//break;\n\t\t\tcase 'graphdata':\n\t\t\t\t//$controller = new GitPHP_Controller_GraphData();\n\t\t\t\t//break;\n\t\t\tdefault:\n\t\t\t\tif (!empty($params['project'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\t} else {\n\t\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t}\n\t\t}\n\n\t\tforeach ($params as $paramname => $paramval) {\n\t\t\tif ($paramname !== 'action')\n\t\t\t\t$controller->SetParam($paramname, $paramval);\n\t\t}\n\n\t\t$controller->SetRouter($this);\n\n\t\treturn $controller;\n\t}", "public static function newInstance($path = \\simpleChat\\Utility\\ROOT_PATH)\n {\n $request = new Request();\n \n \n if ($request->isAjax())\n {\n return new AjaxController();\n }\n else if ($request->jsCode())\n {\n return new JsController();\n }\n else\n {\n return new StandardController($path);\n }\n }", "function &get_instance()\n{\n return KISS_Controller::get_instance();\n}", "protected function controller()\n {\n // TODO refactor this into pure Latte\n if (\n array_key_exists('table', $this->get) && !empty($this->get['table']) && (bool) $this->tableAdmin->getTable()\n ) {\n if (!array_key_exists('table', $this->renderParams) || !is_array($this->renderParams['table'])) {\n $this->renderParams['table'] = [];\n }\n if (isset($this->get['where']) && is_array($this->get['where'])) {\n $this->renderParams['table']['outputTableAfterEdit'] = $this->outputTableAfterEdit();\n } elseif (!isset($_POST['edit-selected']) && !isset($_POST['clone-selected'])) {\n $this->renderParams['table']['outputTableBeforeListing'] = $this->outputTableBeforeListing();\n }\n }\n\n // changes of inherited Lattes MUST be done before invoking the parent::controller();\n parent::controller(); // selects $this->template according to $myCmsConfAdmin['get2template']\n if (!isset($_SESSION['user'])) { // todo explore if it is sufficient for auth - consider (bool) $this->authUser\n //$this->template = 'admin-login'; //ready\n //todo MOVE THIS to parent\n// unset($this->get['table'], $this->get['media'], $this->get['user']); // security by design\n $this->get[] = []; // security by design\n $this->renderParams['htmlOutput'] = $this->outputLogin();\n return; //harden auth security TODO explore security that no other conditions will be allowed if !user\n }\n\n // TODO check whether unavailable for anonymous users!\n switch ($this->template) {\n case 'Admin/divisions-products':\n $this->renderParams['pageTitle'] = $this->tableAdmin->translate('Divisions and products');\n if (\n isset($this->featureFlags['legacy_admin_methods_instead_of_admin_models']) &&\n $this->featureFlags['legacy_admin_methods_instead_of_admin_models']\n ) {\n // legacy since 220620\n $this->renderParams['htmlOutput'] = $this->projectSpecificSections(); // in the Admin\n } else {\n $adminModel = new AdminModels\\DivisionsProductsAdminModel(\n $this->MyCMS->dbms,\n $this->tableAdmin\n );\n $this->renderParams['htmlOutput'] = $adminModel->htmlOutput();\n }\n break;\n case 'Admin/pages':\n $this->renderParams['pageTitle'] = $this->tableAdmin->translate('Pages');\n if (\n isset($this->featureFlags['legacy_admin_methods_instead_of_admin_models']) &&\n $this->featureFlags['legacy_admin_methods_instead_of_admin_models']\n ) {\n // legacy since 220620\n $this->renderParams['htmlOutput'] = $this->projectSpecificSections(); // in the Admin\n } else {\n $adminModel = new AdminModels\\PagesAdminModel(\n $this->MyCMS->dbms,\n $this->tableAdmin\n );\n $this->renderParams['htmlOutput'] = $adminModel->htmlOutput();\n }\n break;\n case 'Admin/products':\n $this->renderParams['pageTitle'] = $this->tableAdmin->translate('Products');\n if (\n isset($this->featureFlags['legacy_admin_methods_instead_of_admin_models']) &&\n $this->featureFlags['legacy_admin_methods_instead_of_admin_models']\n ) {\n // legacy since 220620\n $this->renderParams['htmlOutput'] = $this->projectSpecificSections(); // in the Admin\n } else {\n $adminModel = new AdminModels\\ProductsAdminModel(\n $this->MyCMS->dbms,\n $this->tableAdmin,\n $this->MyCMS->logger\n );\n $this->renderParams['htmlOutput'] = $adminModel->htmlOutput();\n }\n break;\n case 'Admin/translations':\n $this->renderParams['pageTitle'] = $this->tableAdmin->translate('Translations');\n if (\n isset($this->featureFlags['legacy_admin_methods_instead_of_admin_models']) &&\n $this->featureFlags['legacy_admin_methods_instead_of_admin_models']\n ) {\n // legacy since 220620\n $this->renderParams['htmlOutput'] = $this->projectSpecificSections(); // in the Admin\n } else {\n $adminModel = new TranslationsAdminModel(\n $this->MyCMS->dbms,\n $this->tableAdmin,\n $this->prefixUiL10n\n );\n $this->renderParams['htmlOutput'] = $adminModel->htmlOutput();\n }\n break;\n case 'Admin/urls':\n $this->renderParams['pageTitle'] = $this->tableAdmin->translate('URL');\n if (\n isset($this->featureFlags['legacy_admin_methods_instead_of_admin_models']) &&\n $this->featureFlags['legacy_admin_methods_instead_of_admin_models']\n ) {\n // legacy since 220620\n $this->renderParams['htmlOutput'] = $this->projectSpecificSections(); // in the Admin\n } else {\n $adminModel = new UrlsAdminModel(\n $this->MyCMS->dbms,\n $this->tableAdmin\n );\n $this->renderParams['htmlOutput'] = $adminModel->htmlOutput();\n }\n break;\n }\n }", "protected function createDefaultController() {\n Octopus::requireOnce($this->app->getOption('OCTOPUS_DIR') . 'controllers/Default.php');\n return new DefaultController();\n }", "function Controller()\n\t{\t\t\n\t\t$this->method = \"showView\";\n\t\tif (array_key_exists(\"method\", $_REQUEST))\n\t\t\t$this->method = $_REQUEST[\"method\"];\n\t\t\t\t\n\t\t$this->icfTemplating = new IcfTemplating();\n\t\t$this->tpl =& $this->icfTemplating->getTpl();\n\t\t$this->text =& $this->icfTemplating->getText();\t\t\n\t\t$this->controllerMessageArray = array();\n\t\t$this->pageTitle = \"\";\n\t\t$this->dateFormat = DateFormatFactory::getDateFormat();\n\t\t$this->controllerData =& $this->newControllerData();\n\t}", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this->call('make:controller', array_filter([\n 'name' => \"{$controller}Controller\",\n '--model' => $modelName,\n '--api' => true,\n ]));\n }", "public function create() {\r\n\t\r\n\t$form = new Form();\r\n\t$form->setTranslator($this->translator);\r\n\treturn $form;\r\n }", "public function createController()\n\t{\n\t\tif(class_exists($this->controller))\n\t\t{\n\t\t\t// get the parent class he extends\n\t\t\t$parents = class_parents($this->controller);\n\n\t\t\t// $parents = class_implements($this->controller); used if our Controller was just an interface not a class\n\n\t\t\t// check if the class implements our Controller Class\n\t\t\tif(in_array(\"Controller\", $parents))\n\t\t\t{\n\t\t\t\t// check if the action in the request exists in that class\n\t\t\t\tif(method_exists($this->controller, $this->action))\n\t\t\t\t{\n\t\t\t\t\treturn new $this->controller($this->action, $this->request);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Action is not exist\n\t\t\t\t\techo 'Method '. $this->action .' doesn\\'t exist in '. $this->controller;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The controller doesn't extends our Controller Class\n\t\t\t\techo $this->controller.' doesn\\'t extends our Controller Class';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Controller Doesn't exist\n\t\t\techo $this->controller.' doesn\\'t exist';\n\t\t}\n\t}", "function &getInstance($context)\n\t{\n\t\tstatic $instance;\n\n\t\tif (!empty($instance)) {\n\t\t\treturn $instance;\n\t\t}\n\n\t\tif (!file_exists(JPATH_COMPONENT.DS.'controller.php')) {\n\t\t\tJError::raiseError(500, 'controller.php not found');\n\t\t}\n\t\trequire_once JPATH_COMPONENT.DS.'controller.php';\n\n\t\t$cmd = JRequest::getVar('task', 'display');\n\t\tif (is_array($cmd)) {\n\t\t\t$cmd = JFilterInput::clean(array_pop(array_keys($cmd)), 'cmd');\n\t\t}\n\n\t\t// Check for a controller.task command.\n\t\tif (strpos($cmd, '.') != false)\n\t\t{\n\t\t\t// Explode the controller.task command.\n\t\t\tlist($type, $task) = explode('.', $cmd);\n\n\t\t\t// Define the controller name and path\n\t\t\t$protocol\t= JRequest::getWord('protocol');\n\t\t\t$type\t\t= strtolower($type);\n\t\t\t$file\t\t= (!empty($protocol)) ? $type.'.'.$protocol.'.php' : $type.'.php';\n\t\t\t$path\t\t= JPath::clean(JPATH_COMPONENT.DS.'controllers'.DS.$file);\n\n\t\t\t// If the controller file path exists, include it ... else lets die with a 500 error\n\t\t\tif (file_exists($path)) {\n\t\t\t\trequire_once($path);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tJError::raiseError(500, JText::sprintf( 'JX_INVALID_CONTROLLER', $type ) );\n\t\t\t}\n\n\t\t\tJRequest::setVar('task', $task);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Base controller, just set the task :)\n\t\t\t$type = null;\n\t\t\t$task = $cmd;\n\t\t}\n\n\t\t// Set the name for the controller and instantiate it\n\t\t$class = ucfirst($context).'Controller'.ucfirst($type);\n\t\tif (class_exists($class)) {\n\t\t\t$instance = new $class();\n\t\t} else {\n\t\t\tJError::raiseError(500, JText::sprintf( 'JX_INVALID_CONTROLLER_CLASS', $class ) );\n\t\t}\n\n\t\treturn $instance;\n\t}", "public function init()\n {\n $request = $this->getRequest();\n $controller = $request->getParam('controller');\n $action = $request->getParam('action');\n $view = $this->getView();\n $path = $this->filepath([APP_PATH, 'view', 'scripts', $controller]);\n\n // setup the view\n $view->addViewScriptPath($path);\n $view->setScript($action);\n\n // if the request is not ajax, then setup the layout\n if (!$request->isAjax()) {\n $view->setLayout('default');\n }\n\n return $this;\n }", "public function runFrontScript():self {\n\n # \n\n # Return instance\n return $this;\n\n }", "protected function getController() {\n $controller = new CartUpdateItemResource(\n $this->container->get('commerce_cart.cart_provider'),\n $this->container->get('commerce_cart.cart_manager'),\n $this->container->get('commerce_api.jsonapi_controller_shim')\n );\n $controller->setResourceResponseFactory($this->container->get('jsonapi_resources.resource_response_factory'));\n $controller->setResourceTypeRepository($this->container->get('jsonapi.resource_type.repository'));\n $controller->setEntityTypeManager($this->container->get('entity_type.manager'));\n $controller->setEntityAccessChecker($this->container->get('jsonapi_resources.entity_access_checker'));\n return $controller;\n }", "protected function get_controller_content()\n {\n $this->load_table_acronym();\n //genera el prefijo de traduccion tipo tr[acronimo]_\n $this->load_translate_prefix();\n //carga las primeras traducciones sobre todo de entidades.\n $this->load_extra_translate();\n \n $this->sTimeNow = date(\"d-m-Y H:i\").\" (SPAIN)\";\n $arLines = array();\n $arLines[] = \"<?php\";\n $arLines[] = \"/**\n * @author Module Builder 1.1.4\n * @link www.eduardoaf.com\n * @version 1.0.0\n * @name $this->sControllerClassName\n * @file $this->sControllerFileName \n * @date $this->sTimeNow\n * @observations: \n * @requires:\n */\"; \n //IMPORTACION DE CLASES:\n $arLines[] = \"//TFW\";\n $arLines[] = \"import_component(\\\"page,validate,filter\\\");\";\n $arLines[] = \"import_helper(\\\"form,form_fieldset,form_legend,input_text,label,anchor,table,table_typed\\\");\";\n $arLines[] = \"import_helper(\\\"input_password,button_basic,raw,div,javascript\\\");\";\n $arLines[] = \"//APP\";\n $sImport = $this->get_import_models();\n $arLines[] = \"import_model(\\\"user,$sImport\\\");\";\n $arLines[] = \"import_appmain(\\\"controller,view,behaviour\\\");\";\n $arLines[] = \"import_appbehaviour(\\\"picklist\\\");\";\n $arLines[] = \"import_apphelper(\\\"listactionbar,controlgroup,formactions,buttontabs,formhead,alertdiv,breadscrumbs,headertabs\\\");\";\n $arLines[] = \"\";\n \n //BEGIN CLASS\n $arLines[] = \"class $this->sControllerClassName extends TheApplicationController\";\n $arLines[] = \"{\";\n $arLines[] = \"\\tprotected \\$$this->sModelObjectName;\";\n $arLines[] = \"\";\n $arLines[] = \"\\tpublic function __construct()\";\n $arLines[] = \"\\t{\";\n $this->controlleradd_func_construct($arLines);\n $arLines[] = \"\\t}\";\n $arLines[] = \"\";\n \n//<editor-fold defaultstate=\"collapsed\" desc=\"BUILDING LIST\">\n $arLines[] = \"//<editor-fold defaultstate=\\\"collapsed\\\" desc=\\\"LIST\\\">\";\n //build_list_scrumbs\n $arLines[] = \"\\t//list_1\";\n $arLines[] = \"\\tprotected function build_list_scrumbs()\";\n $arLines[] = \"\\t{\";\n $this->controlleradd_lst_buildlistscrumbs($arLines);\n $arLines[] = \"\\t}\";\n $arLines[] = \"\";\n \n $arLines[] = \"\\t//list_2\";\n $arLines[] = \"\\tprotected function build_list_tabs()\";\n $arLines[] = \"\\t{\";\n $this->controlleradd_lst_buildlisttabs($arLines);\n $arLines[] = \"\\t}\";\n $arLines[] = \"\";\n \n //build_listoperation_buttons();\n $arLines[] = \"\\t//list_3\";\n $arLines[] = \"\\tprotected function build_listoperation_buttons()\";\n $arLines[] = \"\\t{\";\n $this->controlleradd_lst_buildlistoperationbuttons($arLines);\n $arLines[] = \"\\t}//build_listoperation_buttons()\";\n $arLines[] = \"\";\n \n //load_config_list_filters();\n $arLines[] = \"\\t//list_4\";\n $arLines[] = \"\\tprotected function load_config_list_filters()\";\n $arLines[] = \"\\t{\";\n $this->controlleradd_lst_loadconfiglistfilters($arLines);\n $arLines[] = \"\\t}//load_config_list_filters()\";\n $arLines[] = \"\"; \n \n $arLines[] = \"\\t//list_5\";\n $arLines[] = \"\\tprotected function set_listfilters_from_post()\";\n $arLines[] = \"\\t{\";\n $this->controlleradd_lst_setlistfiltersfrompost($arLines);\n $arLines[] = \"\\t}//set_listfilters_from_post()\";\n $arLines[] = \"\";\n \n //get_list_filters();\n $arLines[] = \"\\t//list_6\";\n $arLines[] = \"\\tprotected function get_list_filters()\";\n $arLines[] = \"\\t{\";\n $arLines[] = \"\\t\\t//CAMPOS\";\n $this->controlleradd_lst_getlistfilters($arLines); \n $arLines[] = \"\\t\\treturn \\$arFields;\";\n $arLines[] = \"\\t}//get_list_filters()\";\n $arLines[] = \"\"; \n //get_list_columns();\n $arLines[] = \"\\t//list_7\";\n $arLines[] = \"\\tprotected function get_list_columns()\";\n $arLines[] = \"\\t{\";\n $this->controlleradd_lst_getlistcolumns($arLines);\n $arLines[] = \"\\t\\treturn \\$arColumns;\";\n $arLines[] = \"\\t}//get_list_columns()\";\n $arLines[] = \"\"; \n $arLines[] = \"\\t//list_8\";\n $arLines[] = \"\\tpublic function get_list()\";\n $arLines[] = \"\\t{\";\n $this->controlleradd_lst_getlist($arLines);\n $arLines[] = \"\\t}//get_list()\";\n $arLines[] = \"//</editor-fold>\";\n $arLines[] = \"\";\n//</editor-fold>\n\n//<editor-fold defaultstate=\"collapsed\" desc=\"BUILDING INSERT\"> \n $arLines[] = \"//<editor-fold defaultstate=\\\"collapsed\\\" desc=\\\"INSERT\\\">\";\n //build_insert_srumbs\n $arLines[] = \"\\t//insert_1\";\n $arLines[] = \"\\tprotected function build_insert_scrumbs()\";\n $arLines[] = \"\\t{\";\n $this->controlleradd_ins_buildinsertscrumbs($arLines);\n $arLines[] = \"\\t}//build_insert_scrumbs()\";\n $arLines[] = \"\";\n $arLines[] = \"\\t//insert_2\";\n $arLines[] = \"\\tprotected function build_insert_tabs()\";\n $arLines[] = \"\\t{\";\n $this->controlleradd_ins_buildinserttabs($arLines);\n $arLines[] = \"\\t}//build_insert_tabs()\"; \n \n //build_insert_opbuttons\n $arLines[] = \"\\t//insert_3\";\n $arLines[] = \"\\tprotected function build_insert_opbuttons()\";\n $arLines[] = \"\\t{\";\n $this->controlleradd_ins_buildinsertopbuttons($arLines);\n $arLines[] = \"\\t}//build_insert_opbuttons()\";\n $arLines[] = \"\";\n\n //build_insert_fields\n $arLines[] = \"\\t//insert_4\";\n $arLines[] = \"\\tprotected function build_insert_fields(\\$usePost=0)\";\n $arLines[] = \"\\t{\";\n $this->controlleradd_ins_buildinsertfields($arLines);\n $arLines[] = \"\\t}//build_insert_fields()\";\n $arLines[] = \"\";\n \n //get_insert_validate\n $arLines[] = \"\\t//insert_5\";\n $arLines[] = \"\\tprotected function get_insert_validate()\";\n $arLines[] = \"\\t{\";\n $this->controlleradd_ins_getinsertvalidate($arLines);\n $arLines[] = \"\\t}//get_insert_validate\";\n $arLines[] = \"\";\n\n //build_insert_form\n $arLines[] = \"\\t//insert_6\";\n $arLines[] = \"\\tprotected function build_insert_form(\\$usePost=0)\";\n $arLines[] = \"\\t{\";\n $this->controlleradd_ins_buildinsertform($arLines);\n $arLines[] = \"\\t}//build_insert_form()\";\n $arLines[] = \"\";\n \n //insert()\n $arLines[] = \"\\t//insert_7\";\n $arLines[] = \"\\tpublic function insert()\";\n $arLines[] = \"\\t{\";\n $this->controlleradd_ins_insert($arLines);\n $arLines[] = \"\\t}//insert()\";\n $arLines[] = \"//</editor-fold>\";\n $arLines[] = \"\";\n//</editor-fold>\n\n//<editor-fold defaultstate=\"collapsed\" desc=\"BUILDING UPDATE\"> \n $arLines[] = \"//<editor-fold defaultstate=\\\"collapsed\\\" desc=\\\"UPDATE\\\">\";\n $arLines[] = \"\\t//update_1\";\n $arLines[] = \"\\tprotected function build_update_scrumbs()\";\n $arLines[] = \"\\t{\";\n $this->controlleradd_upd_buildupdatescrumbs($arLines);\n $arLines[] = \"\\t}//build_update_scrumbs()\";\n $arLines[] = \"\";\n $arLines[] = \"\\t//update_2\";\n $arLines[] = \"\\tprotected function build_update_tabs()\";\n $arLines[] = \"\\t{\";\n $this->controlleradd_upd_buildupdatetabs($arLines);\n $arLines[] = \"\\t}//build_update_tabs()\";\n $arLines[] = \"\";\n $arLines[] = \"\\t//update_3\";\n $arLines[] = \"\\tprotected function build_update_opbuttons()\";\n $arLines[] = \"\\t{\";\n $this->controlleradd_upd_buildupdateopbuttons($arLines);\n $arLines[] = \"\\t}//build_update_opbuttons()\";\n $arLines[] = \"\";\n //build_update_fields\n $arLines[] = \"\\t//update_4\";\n $arLines[] = \"\\tprotected function build_update_fields(\\$usePost=0)\";\n $arLines[] = \"\\t{\";\n $this->controlleradd_upd_buildupdatefields($arLines);\n $arLines[] = \"\\t}//build_update_fields()\";\n $arLines[] = \"\";\n //get_update_validate\n $arLines[] = \"\\t//update_5\";\n $arLines[] = \"\\tprotected function get_update_validate()\";\n $arLines[] = \"\\t{\";\n $this->controlleradd_ins_getinsertvalidate($arLines,1);\n $arLines[] = \"\\t}//get_update_validate\";\n $arLines[] = \"\"; \n $arLines[] = \"\\t//update_6\";\n $arLines[] = \"\\tprotected function build_update_form(\\$usePost=0)\";\n $arLines[] = \"\\t{\"; \n //$arLines[] = \"\\t\\t\\$id = \\$this->get_get(\\\"id\\\");\";\n $this->controlleradd_upd_buildupdateform($arLines);\n $arLines[] = \"\\t}//build_update_form()\";\n $arLines[] = \"\";\n $arLines[] = \"\\t//update_7\";\n $arLines[] = \"\\tpublic function update()\";\n $arLines[] = \"\\t{\";\n $this->controlleradd_upd_update($arLines);\n $arLines[] = \"\\t}//update()\";\n $arLines[] = \"//</editor-fold>\";\n $arLines[] = \"\";\n//</editor-fold>\n\n//<editor-fold defaultstate=\"collapsed\" desc=\"BUILDING DELETE\">\n $arLines[] = \"//<editor-fold defaultstate=\\\"collapsed\\\" desc=\\\"DELETE\\\">\";\n $arLines[] = \"\\t//delete_1\";\n $arLines[] = \"\\tprotected function single_delete()\";\n $arLines[] = \"\\t{\";\n $arLines[] = \"\\t\\t\\$id = \\$this->get_get(\\\"id\\\");\";\n $arLines[] = \"\\t\\tif(\\$id)\";\n $arLines[] = \"\\t\\t{\";\n $arLines[] = \"\\t\\t\\t\\$this->$this->sModelObjectName\".\"->set_id(\\$id);\";\n $arLines[] = \"\\t\\t\\t\\$this->$this->sModelObjectName\".\"->autodelete();\";\n $arLines[] = \"\\t\\t\\tif(\\$this->$this->sModelObjectName\".\"->is_error())\";\n $arLines[] = \"\\t\\t\\t{\";\n $arLines[] = \"\\t\\t\\t\\t\\$this->isError = TRUE;\";\n $arLines[] = \"\\t\\t\\t\\t\\$this->set_session_message(tr_mdb_error_trying_to_delete);\";\n $arLines[] = \"\\t\\t\\t}\";\n $arLines[] = \"\\t\\t\\telse\";\n $arLines[] = \"\\t\\t\\t{\";\n $arLines[] = \"\\t\\t\\t\\t\\$this->set_session_message(tr_mdb_data_deleted);\";\n $arLines[] = \"\\t\\t\\t}\";\n $arLines[] = \"\\t\\t}//si existe el id\";\n $arLines[] = \"\\t\\telse\";\n $arLines[] = \"\\t\\t\\t\\$this->set_session_message(tr_mdb_error_key_not_supplied,\\\"e\\\");\";\n $arLines[] = \"\\t}//single_delete()\";\n $arLines[] = \"\";\n $arLines[] = \"\\t//delete_2\";\n $arLines[] = \"\\tprotected function multi_delete()\";\n $arLines[] = \"\\t{\";\n $arLines[] = \"\\t\\t//Intenta recuperar pkeys sino pasa a recuperar el id. En ultimo caso lo que se ha pasado por parametro\";\n $arLines[] = \"\\t\\t\\$arKeys = \\$this->get_listkeys();\";\n $arLines[] = \"\\t\\tforeach(\\$arKeys as \\$sKey)\";\n $arLines[] = \"\\t\\t{\";\n $arLines[] = \"\\t\\t\\t\\$id = \\$sKey;\";\n $arLines[] = \"\\t\\t\\t\\$this->$this->sModelObjectName\".\"->set_id(\\$id);\";\n $arLines[] = \"\\t\\t\\t\\$this->$this->sModelObjectName\".\"->autodelete();\";\n $arLines[] = \"\\t\\t\\tif(\\$this->$this->sModelObjectName\".\"->is_error())\";\n $arLines[] = \"\\t\\t\\t{\";\n $arLines[] = \"\\t\\t\\t\\t\\$this->isError = true;\";\n $arLines[] = \"\\t\\t\\t\\t\\$this->set_session_message(tr_mdb_error_trying_to_delete,\\\"e\\\");\";\n $arLines[] = \"\\t\\t\\t}\";\n $arLines[] = \"\\t\\t}//foreach arkeys\";\n $arLines[] = \"\\t\\tif(!\\$this->isError)\";\n $arLines[] = \"\\t\\t\\t\\$this->set_session_message(tr_mdb_data_deleted);\";\n $arLines[] = \"\\t}//multi_delete()\";\n $arLines[] = \"\";\n $arLines[] = \"\\t//delete_3\";\n $arLines[] = \"\\tpublic function delete()\";\n $arLines[] = \"\\t{\";\n $arLines[] = \"\\t\\t//\\$this->go_to_401(\\$this->oPermission->is_not_delete()||\\$this->oSessionUser->is_not_dataowner());\";\n $arLines[] = \"\\t\\t\\$this->go_to_401(\\$this->oPermission->is_not_delete());\";\n $arLines[] = \"\\t\\t\\$this->isError = FALSE;\";\n $arLines[] = \"\\t\\t//Si ocurre un error se guarda en isError\";\n $arLines[] = \"\\t\\tif(\\$this->is_multidelete())\";\n $arLines[] = \"\\t\\t\\t\\$this->multi_delete();\";\n $arLines[] = \"\\t\\telse\";\n $arLines[] = \"\\t\\t\\t\\$this->single_delete();\";\n $arLines[] = \"\\t\\t//Si no ocurrio errores en el intento de borrado\";\n $arLines[] = \"\\t\\tif(!\\$this->isError)\";\n $arLines[] = \"\\t\\t\\t\\$this->go_to_after_succes_cud();\";\n $arLines[] = \"\\t\\telse//delete ok\";\n $arLines[] = \"\\t\\t\\t\\$this->go_to_list();\";\n $arLines[] = \"\\t}\\t//delete()\";\n $arLines[] = \"//</editor-fold>\";\n $arLines[] = \"\";\n $arLines[] = \"//<editor-fold defaultstate=\\\"collapsed\\\" desc=\\\"QUARANTINE\\\">\";\n $arLines[] = \"\\t//quarantine_1\";\n $arLines[] = \"\\tprotected function single_quarantine()\";\n $arLines[] = \"\\t{\";\n $arLines[] = \"\\t\\t\\$id = \\$this->get_get(\\\"id\\\");\";\n $arLines[] = \"\\t\\tif(\\$id)\";\n $arLines[] = \"\\t\\t{\";\n $arLines[] = \"\\t\\t\\t\\$this->$this->sModelObjectName\".\"->set_id(\\$id);\";\n $arLines[] = \"\\t\\t\\t\\$this->$this->sModelObjectName\".\"->autoquarantine();\";\n $arLines[] = \"\\t\\t\\tif(\\$this->$this->sModelObjectName\".\"->is_error())\";\n $arLines[] = \"\\t\\t\\t\\t\\$this->set_session_message(tr_mdb_error_trying_to_delete);\";\n $arLines[] = \"\\t\\t\\telse\";\n $arLines[] = \"\\t\\t\\t\\t\\$this->set_session_message(tr_mdb_data_deleted);\";\n $arLines[] = \"\\t\\t}//else no id\";\n $arLines[] = \"\\t\\telse\";\n $arLines[] = \"\\t\\t\\t\\$this->set_session_message(tr_mdb_error_key_not_supplied,\\\"e\\\");\";\n $arLines[] = \"\\t}//single_quarantine()\";\n $arLines[] = \"\"; \n $arLines[] = \"\\t//quarantine_2\";\n $arLines[] = \"\\tprotected function multi_quarantine()\";\n $arLines[] = \"\\t{\";\n $arLines[] = \"\\t\\t\\$this->isError = FALSE;\";\n $arLines[] = \"\\t\\t//Intenta recuperar pkeys sino pasa a id, y en ultimo caso lo que se ha pasado por parametro\";\n $arLines[] = \"\\t\\t\\$arKeys = \\$this->get_listkeys();\";\n $arLines[] = \"\\t\\tforeach(\\$arKeys as \\$sKey)\";\n $arLines[] = \"\\t\\t{\";\n $arLines[] = \"\\t\\t\\t\\$id = \\$sKey;\";\n $arLines[] = \"\\t\\t\\t\\$this->$this->sModelObjectName\".\"->set_id(\\$id);\";\n $arLines[] = \"\\t\\t\\t\\$this->$this->sModelObjectName\".\"->autoquarantine();\";\n $arLines[] = \"\\t\\t\\tif(\\$this->$this->sModelObjectName\".\"->is_error())\";\n $arLines[] = \"\\t\\t\\t{\";\n $arLines[] = \"\\t\\t\\t\\t\\$isError = true;\";\n $arLines[] = \"\\t\\t\\t\\t\\$this->set_session_message(tr_mdb_error_trying_to_delete,\\\"e\\\");\";\n $arLines[] = \"\\t\\t\\t}\";\n $arLines[] = \"\\t\\t}\";\n $arLines[] = \"\\t\\tif(!\\$isError)\";\n $arLines[] = \"\\t\\t\\t\\$this->set_session_message(tr_mdb_data_deleted);\";\n $arLines[] = \"\\t}//multi_quarantine()\";\n $arLines[] = \"\";\n $arLines[] = \"\\t//quarantine_3\";\n $arLines[] = \"\\tpublic function quarantine()\";\n $arLines[] = \"\\t{\";\n $arLines[] = \"\\t\\t//\\$this->go_to_401(\\$this->oPermission->is_not_quarantine()||\\$this->oSessionUser->is_not_dataowner());\"; \n $arLines[] = \"\\t\\t\\$this->go_to_401(\\$this->oPermission->is_not_quarantine());\"; \n $arLines[] = \"\\t\\tif(\\$this->is_multiquarantine())\";\n $arLines[] = \"\\t\\t\\t\\$this->multi_quarantine();\";\n $arLines[] = \"\\t\\telse\";\n $arLines[] = \"\\t\\t\\t\\$this->single_quarantine();\";\n $arLines[] = \"\\t\\t\\$this->go_to_list();\";\n $arLines[] = \"\\t\\tif(!\\$this->isError)\";\n $arLines[] = \"\\t\\t\\t\\$this-go_to_after_succes_cud();\";\n $arLines[] = \"\\t\\telse //quarantine ok\"; \n $arLines[] = \"\\t\\t\\t\\$this->go_to_list();\";\n $arLines[] = \"\\t}//quarantine()\";\n $arLines[] = \"\";\n $arLines[] = \"//</editor-fold>\";\n $arLines[] = \"\";\n//</editor-fold>\n\n//<editor-fold defaultstate=\"collapsed\" desc=\"BUILDING MULTIASSIGN\">\n $this->arTranslation[] = $this->sTranslatePrefix.\"clear_filters\";\n $this->arTranslation[] = $this->sTranslatePrefix.\"refresh\";\n $this->arTranslation[] = $this->sTranslatePrefix.\"multiadd\";\n $this->arTranslation[] = $this->sTranslatePrefix.\"closeme\";\n $this->arTranslation[] = $this->sTranslatePrefix.\"entities\";\n \n $arLines[] = \"//<editor-fold defaultstate=\\\"collapsed\\\" desc=\\\"MULTIASSIGN\\\">\";\n $arLines[] = \"\\t//multiassign_1\";\n $arLines[] = \"\\tprotected function build_multiassign_buttons()\";\n $arLines[] = \"\\t{\";\n $arLines[] = \"\\t\\t\\$arOpButtons = array();\";\n $arLines[] = \"\\t\\t\\$arOpButtons[\\\"filters\\\"]=array(\\\"href\\\"=>\\\"javascript:reset_filters();\\\",\\\"icon\\\"=>\\\"awe-magic\\\",\\\"innerhtml\\\"=>$this->sTranslatePrefix\".\"clear_filters);\";\n $arLines[] = \"\\t\\t\\$arOpButtons[\\\"reload\\\"]=array(\\\"href\\\"=>\\\"javascript:TfwControl.form_submit();\\\",\\\"icon\\\"=>\\\"awe-refresh\\\",\\\"innerhtml\\\"=>$this->sTranslatePrefix\".\"refresh);\";\n $arLines[] = \"\\t\\t\\$arOpButtons[\\\"multiadd\\\"]=array(\\\"href\\\"=>\\\"javascript:multiadd();\\\",\\\"icon\\\"=>\\\"awe-external-link\\\",\\\"innerhtml\\\"=>$this->sTranslatePrefix\".\"multiadd);\";\n $arLines[] = \"\\t\\t\\$arOpButtons[\\\"closeme\\\"]=array(\\\"href\\\"=>\\\"javascript:closeme();\\\",\\\"icon\\\"=>\\\"awe-remove-sign\\\",\\\"innerhtml\\\"=>$this->sTranslatePrefix\".\"closeme);\";\n $arLines[] = \"\\t\\t\\$oOpButtons = new AppHelperButtontabs($this->sTranslatePrefix\".\"entities);\";\n $arLines[] = \"\\t\\t\\$oOpButtons->set_tabs(\\$arOpButtons);\";\n $arLines[] = \"\\t\\treturn \\$oOpButtons;\";\n $arLines[] = \"\\t}//build_multiassign_buttons()\";\n $arLines[] = \"\";\n //load_config_multiassign_filters();\n $arLines[] = \"\\t//multiassign_2\";\n $arLines[] = \"\\tprotected function load_config_multiassign_filters()\";\n $arLines[] = \"\\t{\";\n $this->controlleradd_lst_loadconfiglistfilters($arLines);\n $arLines[] = \"\\t}//load_config_multiassign_filters()\";\n $arLines[] = \"\";\n $arLines[] = \"\\t//multiassign_3\";\n $arLines[] = \"\\tprotected function get_multiassign_filters()\";\n $arLines[] = \"\\t{\";\n $arLines[] = \"\\t\\t//CAMPOS\";\n $this->controlleradd_lst_getlistfilters($arLines,0);\n $arLines[] = \"\\t\\treturn \\$arFields;\";\n $arLines[] = \"\\t}//get_multiassign_filters()\";\n $arLines[] = \"\"; \n $arLines[] = \"\\t//multiassign_4\";\n $arLines[] = \"\\tprotected function set_multiassignfilters_from_post()\";\n $arLines[] = \"\\t{\";\n $this->controlleradd_lst_setlistfiltersfrompost($arLines);\n $arLines[] = \"\\t}//set_multiassignfilters_from_post()\";\n $arLines[] = \"\"; \n //get_multiassign_columns();\n $arLines[] = \"\\t//multiassign_5\";\n $arLines[] = \"\\tprotected function get_multiassign_columns()\";\n $arLines[] = \"\\t{\";\n $this->controlleradd_lst_getlistcolumns($arLines,0);\n $arLines[] = \"\\t\\treturn \\$arColumns;\";\n $arLines[] = \"\\t}//get_multiassign_columns()\";\n $arLines[] = \"\"; \n $arLines[] = \"\\t//multiassign_6\";\n $arLines[] = \"\\tpublic function multiassign()\";\n $arLines[] = \"\\t{\";\n $this->controlleradd_multiassign($arLines);\n $arLines[] = \"\\t}//multiassign()\";\n $arLines[] = \"//</editor-fold>\";\n $arLines[] = \"\";\n//</editor-fold>\n\n//<editor-fold defaultstate=\"collapsed\" desc=\"BUILDING SINGLEASSIGN\"> \n $arLines[] = \"//<editor-fold defaultstate=\\\"collapsed\\\" desc=\\\"SINGLEASSIGN\\\">\";\n $arLines[] = \"\\t//singleassign_1\";\n $arLines[] = \"\\tprotected function build_singleassign_buttons()\";\n $arLines[] = \"\\t{\";\n $arLines[] = \"\\t\\t\\$arButTabs = array();\";\n $arLines[] = \"\\t\\t\\$arButTabs[\\\"filters\\\"]=array(\\\"href\\\"=>\\\"javascript:reset_filters();\\\",\\\"icon\\\"=>\\\"awe-magic\\\",\\\"innerhtml\\\"=>$this->sTranslatePrefix\".\"clear_filters);\";\n $arLines[] = \"\\t\\t\\$arButTabs[\\\"reload\\\"]=array(\\\"href\\\"=>\\\"javascript:TfwControl.form_submit();\\\",\\\"icon\\\"=>\\\"awe-refresh\\\",\\\"innerhtml\\\"=>$this->sTranslatePrefix\".\"refresh);\";\n $arLines[] = \"\\t\\t\\$arButTabs[\\\"closeme\\\"]=array(\\\"href\\\"=>\\\"javascript:closeme();\\\",\\\"icon\\\"=>\\\"awe-remove-sign\\\",\\\"innerhtml\\\"=>$this->sTranslatePrefix\".\"closeme);\";\n $arLines[] = \"\\t\\treturn \\$arButTabs;\";\n $arLines[] = \"\\t}//build_singleassign_buttons()\";\n $arLines[] = \"\";\n //load_config_multiassign_filters();\n $arLines[] = \"\\t//singleassign_2\";\n $arLines[] = \"\\tprotected function load_config_singleassign_filters()\";\n $arLines[] = \"\\t{\";\n $this->controlleradd_lst_loadconfiglistfilters($arLines);\n $arLines[] = \"\\t}//load_config_singleassign_filters()\";\n $arLines[] = \"\"; \n \n //get_singleassign_filters();\n $arLines[] = \"\\t//singleassign_3\";\n $arLines[] = \"\\tprotected function get_singleassign_filters()\";\n $arLines[] = \"\\t{\";\n $arLines[] = \"\\t\\t//CAMPOS\";\n $this->controlleradd_lst_getlistfilters($arLines,0);\n $arLines[] = \"\\t\\treturn \\$arFields;\";\n $arLines[] = \"\\t}//get_singleassign_filters()\";\n $arLines[] = \"\"; \n \n $arLines[] = \"\\t//singleassign_4\";\n $arLines[] = \"\\tprotected function set_singleassignfilters_from_post()\";\n $arLines[] = \"\\t{\";\n $this->controlleradd_lst_setlistfiltersfrompost($arLines);\n $arLines[] = \"\\t}//set_singleassignfilters_from_post()\";\n $arLines[] = \"\";\n \n //get_singleassign_columns();\n $arLines[] = \"\\t//singleassign_5\";\n $arLines[] = \"\\tprotected function get_singleassign_columns()\";\n $arLines[] = \"\\t{\";\n //SINGLEASSIGN - COLUMNS\n $this->controlleradd_lst_getlistcolumns($arLines,0);\n $arLines[] = \"\\t\\treturn \\$arColumns;\";\n $arLines[] = \"\\t}//get_singleassign_columns()\";\n $arLines[] = \"\"; \n $arLines[] = \"\\t//singleassign_6\";\n $arLines[] = \"\\tpublic function singleassign()\";\n $arLines[] = \"\\t{\";\n $this->controlleradd_singleassign($arLines); \n $arLines[] = \"\\t}//singleassign()\";\n $arLines[] = \"//</editor-fold>\";\n $arLines[] = \"\";\n//</editor-fold>\n\n//<editor-fold defaultstate=\"collapsed\" desc=\"BUILDING EXTRAS\"> \n $arLines[] = \"//<editor-fold defaultstate=\\\"collapsed\\\" desc=\\\"EXTRAS\\\">\";\n $arLines[] = \"\\tpublic function addsellers()\";\n $arLines[] = \"\\t{\";\n $arLines[] = \"\\t\\t\\$sUrl = \\$this->get_assign_backurl(array(\\\"k\\\",\\\"k2\\\"));\";\n $arLines[] = \"\\t\\tif(\\$this->get_get(\\\"close\\\"))\";\n $arLines[] = \"\\t\\t\\t\\$this->js_colseme_and_parent_refresh();\";\n $arLines[] = \"\\t\\telse\";\n $arLines[] = \"\\t\\t\\t\\$this->js_parent_refresh();\";\n $arLines[] = \"\\t\\t\\$this->js_go_to(\\$sUrl);\";\n $arLines[] = \"\\t}\";\n $arLines[] = \"//</editor-fold>\";\n//</editor-fold> \n $arLines[] = \"}//end controller\";//fin clase\n $sContent = implode(\"\\n\",$arLines);\n return $sContent; \n }", "public function create(){\r\n\treturn new $this->class();\r\n }", "public function __construct()\n {\n $this->dataController = new DataController;\n }", "public function newInstance()\n {\n return new self();\n }", "public function generateController () {\r\n $controllerParam = \\app\\lib\\router::getPath();\r\n $controllerName = \"app\\controller\\\\\" . end($controllerParam);\r\n $this->controller = new $controllerName;\r\n }", "function &getInstance (&$controller) {\n\n\t\tstatic $instance;\n\t\tif (!isset($instance)) {\n\n\t\t\t$c = __CLASS__;\n\t\t\t$instance = new $c();\n\t\t\t$instance->_controller =& $controller;\n\t\t}\n\t\treturn $instance;\n\t}", "public static function newInstance()\n {\n $instance = new self;\n return $instance;\n }", "static public function controller() {\n\t\treturn self::$controller;\n\t}", "public function controller()\n\t{\n\t\n\t}", "public static function instance() {\n\t\treturn new self;\n\t}", "private function create_mock_controller() {\n eval('class TestController extends cyclone\\request\\SkeletonController {\n function before() {\n DispatcherTest::$beforeCalled = TRUE;\n DispatcherTest::$route = $this->_request->route;\n }\n\n function after() {\n DispatcherTest::$afterCalled = TRUE;\n }\n\n function action_act() {\n DispatcherTest::$actionCalled = TRUE;\n }\n}');\n }", "public static function create() {\n\t\treturn new self();\n\t}", "function jzFrontendClass() {\n\t\t\t$this->_constructor();\n\t\t}", "public static function buildController()\n\t{\n\t\t$file = CONTROLLER_PATH . 'indexController.class.php';\n\n\t\tif(!file_exists($file))\n\t\t{\n\t\t\tif(\\RCPHP\\Util\\Check::isClient())\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \"Welcome RcPHP!\\n\";\n }\n}';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \\'<style type=\"text/css\">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} body{ background: #fff; font-family: \"微软雅黑\"; color: #333;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.8em; font-size: 36px }</style><div style=\"padding: 24px 48px;\"> <h1>:)</h1><p>Welcome <b>RcPHP</b>!</p></div>\\';\n }\n}';\n\t\t\t}\n\t\t\tfile_put_contents($file, $controller);\n\t\t}\n\t}", "public function GetController ();", "public static function new_instance() {\r\n\t\t\t$i = new wpeologs_ctr();\r\n\t\t\t$i->get_settings();\r\n\r\n\t\t\treturn $i;\r\n\t\t}", "public function createController( ezcMvcRequest $request );", "public static function newController($controller)\n\t{\n\t\t$objController = \"App\\\\Controllers\\\\\".$controller;\n\t\treturn new $objController;\n\t}", "protected function getFosJsRouting_ControllerService()\n {\n return $this->services['fos_js_routing.controller'] = new \\FOS\\JsRoutingBundle\\Controller\\Controller($this->get('fos_js_routing.serializer'), $this->get('fos_js_routing.extractor'), array('enabled' => false), false);\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }", "function __construct()\n {\n parent::Controller();\n }", "static public function create()\n {\n return new static();\n }", "public function createController( $ctrlName, $action ) {\n $args['action'] = $action;\n $args['path'] = $this->path . '/modules/' . $ctrlName;\n $ctrlFile = $args['path'] . '/Controller.php';\n // $args['moduleName'] = $ctrlName;\n if ( file_exists( $ctrlFile ) ) {\n $ctrlPath = str_replace( CITRUS_PATH, '', $args['path'] );\n $ctrlPath = str_replace( '/', '\\\\', $ctrlPath ) . '\\Controller';\n try { \n $r = new \\ReflectionClass( $ctrlPath ); \n $inst = $r->newInstanceArgs( $args ? $args : array() );\n\n $this->controller = Citrus::apply( $inst, Array( \n 'name' => $ctrlName, \n ) );\n if ( $this->controller->is_protected == null ) {\n $this->controller->is_protected = $this->is_protected;\n }\n return $this->controller;\n } catch ( \\Exception $e ) {\n prr($e, true);\n }\n } else {\n return false;\n }\n }", "public function getController()\n {\n return $this->Controller();\n }", "protected function initTSFE() {\n\t\t$GLOBALS['TSFE'] = $tsfe = GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Frontend\\\\Controller\\\\TypoScriptFrontendController', $GLOBALS['TYPO3_CONF_VARS'], GeneralUtility::_GP('id'), '');\n\t\t/** @var \\TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController $tsfe */\n\t\t$tsfe->connectToDB();\n\t\t$tsfe->initFEuser();\n\t\t\\TYPO3\\CMS\\Frontend\\Utility\\EidUtility::initTCA();\n\t\t$tsfe->determineId();\n\t\t$tsfe->initTemplate();\n\t\t$tsfe->getConfigArray();\n\t\t$tsfe->settingLanguage();\n\n\t\t// Get linkVars, absRefPrefix, etc\n\t\t\\TYPO3\\CMS\\Frontend\\Page\\PageGenerator::pagegenInit();\n\t}", "public function index()\n {\n return new EditEC();\n }", "static function factory($GET=array(), $POST=array(), $FILES=array()) {\n $type = (isset($GET['type'])) ? $GET['type'] : '';\n $objectController = $type.'_Controller';\n $addLocation = $type.'/'.$objectController.'.php';\n foreach ($_ENV['locations'] as $location) {\n if (is_file($location.$addLocation)) {\n return new $objectController($GET, $POST, $FILES);\n } \n }\n throw new Exception('The controller \"'.$type.'\" does not exist.');\n }", "public function __construct (){\n $this->AdminController = new AdminController();\n $this->ArticleController = new ArticleController();\n $this->AuditoriaController = new AuditoriaController();\n $this->CommentController = new CommentController();\n $this->CourseController = new CourseController();\n $this->InscriptionsController = new InscriptionsController();\n $this->ModuleController = new ModuleController();\n $this->PlanController = new PlanController();\n $this->ProfileController = new ProfileController();\n $this->SpecialtyController = new SpecialtyController();\n $this->SubscriptionController = new SubscriptionController();\n $this->TeacherController = new TeacherController();\n $this->UserController = new UserController();\n $this->WebinarController = new WebinarController();\n }", "public function onGetFrontendController()\n {\n $this->pluginBootstrap->Application()->Snippets()->addConfigDir($this->pluginBootstrap->Path() . 'Snippets/');\n\n $this->pluginBootstrap->Application()->Template()->addTemplateDir($this->pluginBootstrap->Path() . 'Views/');\n\n return $this->pluginBootstrap->Path() . 'Controllers/Widgets/SwagBrowserLanguage.php';\n }", "public static function create()\n\t\t{\n\t\t\treturn new self();\n\t\t}", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }" ]
[ "0.79384834", "0.79227966", "0.75614", "0.70132416", "0.68769276", "0.6699539", "0.6581561", "0.6536159", "0.6407699", "0.62580484", "0.617519", "0.61700404", "0.6053599", "0.6024901", "0.59333235", "0.59240365", "0.5914302", "0.58498365", "0.5845815", "0.5845497", "0.58397794", "0.5797528", "0.5785202", "0.5765269", "0.57581484", "0.57336974", "0.5733406", "0.5724098", "0.5722748", "0.57138497", "0.56841666", "0.56765145", "0.5652038", "0.56444037", "0.56444037", "0.56444037", "0.56393254", "0.5621366", "0.55849254", "0.5583744", "0.55752194", "0.55593944", "0.5556926", "0.55421394", "0.5541149", "0.55331516", "0.5525071", "0.5514436", "0.55030704", "0.5481028", "0.54735786", "0.5471223", "0.54346734", "0.5415965", "0.54148716", "0.54113543", "0.54092366", "0.54020745", "0.5400966", "0.5394207", "0.53861684", "0.5369932", "0.53682566", "0.53677994", "0.53656363", "0.5365223", "0.5364856", "0.5363646", "0.53632796", "0.53514665", "0.5349568", "0.5340645", "0.5333145", "0.53321815", "0.53291893", "0.5325034", "0.5323513", "0.53169173", "0.5309998", "0.53064996", "0.5300014", "0.52894825", "0.5282829", "0.52823824", "0.52823824", "0.52823824", "0.52823824", "0.52823824", "0.52823824", "0.52823824", "0.52823824", "0.52823824", "0.52823824", "0.52823824", "0.52823824", "0.52823824", "0.52823824", "0.52823824", "0.52823824", "0.52823824" ]
0.7317331
3
Returns a new instance of TimeTracker
protected function getTimeTrackerInstance() { return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\TimeTracker\\TimeTracker'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getTimeTracker() {}", "protected function initializeTimeTracker() {}", "public function create(array $values = array()) {\n // Add values that are specific to our timetracking\n $values += array( \n 'timetracking_id' => '',\n 'is_new' => true,\n 'type' => 'timetracking', //allways fixed because we have no bundles \n 'created' => time(),\n 'changed' => time(),\n 'time_start' => 0,\n 'time_end' => 0,\n 'duration' => 0,\n 'description' => '',\n 'subject_id' => 0,\n 'uid' => 0,\n );\n \n $timetracking = parent::create($values);\n return $timetracking;\n }", "public function __construct()\n {\n $this->dateTime = new Time('now', 'Asia/Jakarta', 'id_ID');\n }", "public static function prayerTimeInstance(){\n if(isset(self::$prayerTime)){\n return self::$prayerTime;\n } else{\n return self::$prayerTime = new PrayTime();\n }\n }", "private static function setTimeTracker()\n {\n if (!is_object($GLOBALS['TT'])) {\n $GLOBALS['TT'] = Tx_Smarty_Service_Compatibility::makeInstance('t3lib_TimeTrackNull');\n }\n }", "function timetracking_create($values = array()) {\n return entity_get_controller('timetracking')->create($values);\n}", "public function __construct()\n {\n $this->local_time = time();\n }", "public function __construct() {\n $this->time = time();\n }", "public static function create(...$args): Time\n {\n return new Time(...$args);\n }", "private function __construct()\n {\n $this->time = time();\n }", "public static function now(): self\n {\n return new static(new DateTime());\n }", "private function getTours()\n {\n $this->tours = Tour::get();\n return $this;\n }", "public static function createInstance()\n {\n return new TimeField('ISerializable', 'ISerializable');\n }", "public static function get(): Timer\n {\n return new self();\n }", "function __construct(){\r\n $this->timestamp = time();\r\n }", "public function select(){\n return new Tracker;\n }", "public static function new(): static\n {\n $data = API::ffi()->ts_parser_new();\n\n return new static(API::ffi(), $data);\n }", "public function getTracker()\n\t{\n\t\tif($this->_tracker === null)\n\t\t{\n\t\t\t$opf = Opl_Registry::get('opf');\n\t\t\t$className = $opf->defaultTracker;\n\t\t\t$tracker = new $className;\n\t\t\tif(!$tracker instanceof Opf_Tracker_Interface)\n\t\t\t{\n\t\t\t\tthrow new Opf_Exception('Invalid object type(' . get_class($tracker) . '), should be Opf_Tracker_Interface');\n\t\t\t}\n\t\t\t$this->_tracker = $tracker;\n\t\t}\n\t\treturn $this->_tracker;\n\t}", "public static function instance() {\n if( is_null( ExpTimeMon::$instance )) ExpTimeMon::$instance =\n new ExpTimeMon (\n EXPTIMEMON_DEFAULT_HOST,\n EXPTIMEMON_DEFAULT_USER,\n EXPTIMEMON_DEFAULT_PASSWORD,\n EXPTIMEMON_DEFAULT_DATABASE );\n return ExpTimeMon::$instance;\n }", "public static function now()\n {\n return new plugin_datetime(date('Y-m-d H:i:s', time()));\n }", "public static function instance() {\n\t\t\tif ( ! isset( self::$instance ) && ! ( self::$instance instanceof AffiliateWP_Direct_Link_Tracking ) ) {\n\n\t\t\t\tself::$instance = new AffiliateWP_Direct_Link_Tracking;\n\t\t\t\tself::$version = '1.1.4';\n\n\t\t\t\tself::$instance->setup_constants();\n\t\t\t\tself::$instance->load_textdomain();\n\t\t\t\tself::$instance->init();\n\t\t\t\tself::$instance->includes();\n\t\t\t\tself::$instance->hooks();\n\n\t\t\t\tself::$instance->tracking = new AffiliateWP_Direct_Link_Tracking_Base;\n\t\t\t\tself::$instance->direct_links = new Affiliate_WP_Direct_Links_DB;\n\t\t\t\tself::$instance->frontend = new AffiliateWP_Direct_Link_Tracking_Frontend;\n\t\t\t\tself::$instance->emails = new AffiliateWP_Direct_Link_Tracking_Emails;\n\t\t\t}\n\n\t\t\treturn self::$instance;\n\t\t}", "function tempus(): TimeConverter\n {\n return new TimeConverter();\n }", "function __construct() {\n parent::__construct();\n \n date_default_timezone_set('Europe/London');\n \n $this->updateTime = date('Y-m-d H:m:s', strtotime('now'));\n \n\n }", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->timestamp = time();\n\t}", "protected function cloneToMutable() : Time\n {\n return clone $this;\n }", "public function getTracker()\n {\n return $this->tracker;\n }", "protected function saveTracking()\n {\n if (!$this->recorded) {\n return $this;\n }\n\n $data = [\n [\n 'time' => (new \\DateTime())->format(\\DateTime::ISO8601),\n 'data' => $this->recorded,\n ]\n ];\n\n // grab existing tracking\n $existing = $this->storage->load(\"{$this->new->id}_tracking\", []);\n $existing = array_merge($existing, $data);\n\n // save\n $this->storage->save(\"{$this->new->id}_tracking\", $existing);\n return $this;\n }", "public static function instance() {\n\t\treturn new self;\n\t}", "public function __construct()\n\t{\n\t\t$this->setTimeStamp();\n\t}", "public static function create()\n {\n return new Taxi();\n }", "public function __construct()\n {\n $this->created = new \\DateTime();\n }", "public function __construct()\n {\n $this->created_at = new \\Datetime();\n }", "public static function createInstance()\n {\n return tx_rnbase::makeInstance(Statistics::class);\n }", "public function __construct()\n {\n $this->startTime = microtime(true);\n parent::__construct();\n }", "public function clock(): Clock\n {\n return new Clock($this);\n }", "public function __construct() {\n\t\t$this->startTime = self::getMicrotime();\n\t}", "public function _construct() {\n if (!self::$lastExecutionTime)\n self::$lastExecutionTime = time();\n }", "public function start() {\n $this->startedAt = microtime(true);\n return $this;\n }", "static function getInstance(){\n\t if (!isset(self::$instance)) {\n\t self::$instance = new TeamSetManager();\n\t\t\t//Set global variable for tracker monitor instances that are disabled\n\t self::$instance->setup();\n\t } // if\n\t return self::$instance;\n\t}", "public function tracker(): OneFromList\n {\n return $this->oneFrom(Tracker::class, $this->tracker);\n }", "function timer(): Timer\n{\n return new Timer;\n}", "public function touch()\n {\n if ($this instanceof RecordEntity) {\n $this->setField('time_updated', new \\DateTime());\n } elseif ($this instanceof DocumentEntity) {\n $this->setField('timeUpdated', new UTCDateTime(time()));\n }\n\n return $this;\n }", "public static function now() {\n return new LusiTime( mktime()); }", "public static function new_instance() {\r\n\t\t\t$i = new wpeologs_ctr();\r\n\t\t\t$i->get_settings();\r\n\r\n\t\t\treturn $i;\r\n\t\t}", "public function __construct(Time $time)\n {\n parent::__construct();\n $this->time = $time;\n }", "public static function create() {\n\t\treturn new self();\n\t}", "public static function init(): self\n {\n return new self(new LoyaltyEventAccumulatePoints());\n }", "public static function create() {\n return new self();\n }", "public static function create()\n\t\t{\n\t\t\treturn new self();\n\t\t}", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function init_timer()\n {\n if (!isset(self::$timer)) {\n $time_now = self::get_miliseconds_now();\n self::$timer = new TimerModel($time_now);\n }\n }", "public static function TIME()\n {\n return new PositionMode(self::TIME);\n }", "public function trackCreation()\n {\n\n return static::$trackCreation;\n\n }", "public function tracker()\n {\n return $this->hasOne(Tracker::class);\n }", "public static function now(): self\n {\n return new self(value: new DateTimeImmutable('now', new DateTimeZone('UTC')));\n }", "private function __construct(){\r\n $this->ttl_by_type = array(\r\n 'short' => 300 , // 5 minutes\r\n 'default' => 7200, // 2 hours\r\n 'halfday' => 43200, // 12 hours\r\n 'day' => 86400, // 24 hours\r\n 'week' => 604800, // 7 days\r\n 'month' => 2592000, // 30 days (1 month)\r\n 'longterm' => 15811200 // 183 days (6 months)\r\n );\r\n }", "public function __construct( DateTime $currentTime, DateTime $testTime)\n\t{\t\n\t\t$this->difference = $currentTime->getTimestamp() - $testTime->getTimestamp();\n $this->thiss = $this;\n\t\t$current = IntlCalendar::fromDateTime($currentTime,null);\n\t\t$time = IntlCalendar::fromDateTime($testTime,null)->getTime();\n\n\t\t$this->currentTime = $current;\n\t\t$this->testTime = $time;\n\t}", "public function time($value): self\n {\n $this->time = $value;\n \n return $this;\n }", "private function newActivityLog()\n {\n return factory(ActivityLog::class)->create([\n 'user_id' => 1,\n 'log_activity' => 'Log created from testing suite.'\n ]);\n }", "protected function getForm_Type_TimeService()\n {\n @trigger_error('The \"form.type.time\" service is deprecated since Symfony 3.1 and will be removed in 4.0.', E_USER_DEPRECATED);\n\n return $this->services['form.type.time'] = new \\Symfony\\Component\\Form\\Extension\\Core\\Type\\TimeType();\n }", "public static function create()\n\t{\n\t\treturn new self;\n\t}", "public function __construct()\n {\n $this->startedAt = Date::now();\n\n parent::__construct();\n }", "public function __construct()\n {\n $this->createdAt = new \\DateTime();\n }", "public function __construct()\n {\n $this->createdAt = new \\DateTime();\n }", "public static function new(){\n self::$instance = new self();\n return self::$instance;\n }", "public static function newInstance() {\n $class = self::class;\n $void_log = new $class();\n return $void_log;\n }", "public static function create(array $attributes = [])\n {\n $attributes['action_time'] = new DateTime;\n return parent::query()->create($attributes);\n }", "public function __construct()\r\n {\r\n $this->createdAt = new \\Datetime('now');\r\n $this->updatedAt = new \\Datetime('now');\r\n $this->deleted = false;\r\n $this->date = new \\Datetime('now');\r\n }", "public function makeNew()\n\t{\n\t\treturn new static($this->view);\n\t}", "public function __construct($time = 'now', DateTimeZone $timezone = NULL)\n{\n\tif(is_int($time))$time=\"@$time\";if(is_array($time))$time=self::fromArray($time);if($timezone)parent::__construct($time, $timezone);else parent::__construct($time);\n}", "public function newAction()\n {\n $entity = new Timelog();\n $form = $this->createCreateForm($entity);\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public static function create(): self\n {\n return new self();\n }", "public static function create(): self\n {\n return new self();\n }", "protected static function initializeGlobalTimeTrackingVariables() {}", "public function localDateTime()\n\t{\n\t\treturn new \\DateTime('now', new \\DateTimezone($this->defaultTimezone()));\n\t}", "function __construct() {\n $this->start_time = microtime(true);\n }", "public function setTime($time)\n {\n $this->time = $time;\n\n return $this;\n }", "public function setTime($time)\n {\n $this->time = $time;\n\n return $this;\n }", "public function setTime($time)\n {\n $this->time = $time;\n\n return $this;\n }" ]
[ "0.6842531", "0.67228603", "0.63513404", "0.6069141", "0.60221213", "0.6018472", "0.6001118", "0.5845434", "0.5842843", "0.58261526", "0.57741", "0.5714983", "0.5706969", "0.56792456", "0.5652791", "0.5652356", "0.55930454", "0.5590635", "0.55813164", "0.55407757", "0.55144453", "0.5470914", "0.54455584", "0.53993", "0.53946257", "0.5375623", "0.5338591", "0.52940655", "0.5254193", "0.5231016", "0.5208475", "0.519496", "0.519405", "0.5190923", "0.5188112", "0.5176156", "0.516519", "0.515715", "0.51524246", "0.51384485", "0.51317775", "0.51315856", "0.51315165", "0.51293874", "0.5125228", "0.51222044", "0.51173174", "0.5108409", "0.51015997", "0.51013225", "0.50922596", "0.50922596", "0.50922596", "0.50922596", "0.50922596", "0.50922596", "0.50922596", "0.50922596", "0.50922596", "0.50922596", "0.50922596", "0.50922596", "0.50922596", "0.50922596", "0.50922596", "0.50922596", "0.50922596", "0.50922596", "0.50922596", "0.50922596", "0.50922596", "0.50904363", "0.5079016", "0.5078909", "0.50654155", "0.505861", "0.504837", "0.5046151", "0.5034329", "0.5009032", "0.50040555", "0.5001943", "0.49949363", "0.49919456", "0.49919456", "0.49906364", "0.49887827", "0.49869406", "0.49830657", "0.49730393", "0.49729282", "0.49717623", "0.497089", "0.497089", "0.4963813", "0.49594828", "0.4958306", "0.49531603", "0.49531603", "0.49531603" ]
0.8074251
0
Returns an object manager mock that is capable of returning one or more documents for find(). $documents should be an associative array of searchString => document (mock object)
protected function getObjectManager(array $documents) { $objectManager = $this->getMock('Doctrine\Common\Persistence\ObjectManager'); $objectManager ->expects($this->any()) ->method('find') ->will( $this->returnCallback( function ($class, $searchString) use ($documents) { return $documents[$searchString]; } ) ); return $objectManager; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createMongoDBMock()\n {\n return m::mock(\\MongoDB\\Database::class);\n }", "abstract public function getDocuments();", "public function getDocuments();", "public function get_documents()\n {\n $this->validate_query_key();\n\n $objDocuments = $this\n ->set_per_page()\n ->set_page()\n ->set_facets()\n ->set_filter()\n ->set_exclude_filter()\n ->set_sorting()\n ->set_spellcheck()\n ->set_highlights()\n ->set_result_fields()\n ->get();\n\n $objDocuments->matches = $this->parse_documents($objDocuments->matches);\n return $objDocuments;\n }", "public function testListDocuments()\n {\n }", "public function testChainedFinders()\n {\n $index = new Index();\n $query = new Query($index);\n\n $finder = $query->find()->find();\n $this->assertInstanceOf(\\Cake\\ElasticSearch\\Query::class, $finder);\n }", "public function find(array $options = array())\n {\n // query\n if (!isset($options['query'])) {\n $options['query'] = array();\n }\n\n // fields\n if (!isset($options['fields'])) {\n $options['fields'] = array();\n }\n\n // cursor\n $cursor = $this->getCollection()->find($options['query'], $options['fields']);\n\n // sort\n if (isset($options['sort'])) {\n $cursor->sort($options['sort']);\n }\n\n // one\n if (isset($options['one'])) {\n $cursor->limit(1);\n // limit\n } elseif (isset($options['limit'])) {\n $cursor->limit($options['limit']);\n }\n\n // skip\n if (isset($options['skip'])) {\n $cursor->skip($options['skip']);\n }\n\n // results\n $results = array();\n foreach ($cursor as $data) {\n $results[] = $document = new $this->documentClass();\n if ($this->isFile) {\n $file = $data;\n $data = $file->file;\n $data['file'] = $file;\n }\n $document->setDocumentData($data);\n }\n\n if ($results) {\n // one\n if (isset($options['one'])) {\n return array_shift($results);\n }\n\n return $results;\n }\n\n return null;\n }", "function findDocuments( $orderby='name DESC' )\n\t{\n\t\t//return MyActiveRecord::FindAll( 'Documents', 'item_id = '.$this->id, $orderby );\n\t\treturn MyActiveRecord::FindBySql('Documents', \"SELECT * FROM documents WHERE item_id = \".$this->id.\" ORDER BY \".$orderby.\"\");\n\t}", "protected function createMongoCollectionMock()\n {\n return m::mock(\\MongoDB\\Collection::class);\n }", "protected function getDoctrine()\n {\n $config = $this->getMockAnnotatedConfig();\n $dm = \\Doctrine\\ODM\\MongoDB\\DocumentManager::create(null, $config);\n\n return $this->doctrine = m::mock(array(\n 'getManager' => $dm,\n 'getManagers' => array($dm),\n 'getManagerForClass' => $dm\n ));\n\n // $conn = array(\n // 'driver' => 'pdo_sqlite',\n // 'memory' => true,\n // // 'path' => __DIR__.'/../db.sqlite',\n // );\n\n // $config = $this->getMockAnnotatedConfig();\n // $em = EntityManager::create($conn, $config);\n\n // $entities = array(\n // 'Khepin\\\\Fixture\\\\Entity\\\\Car',\n // 'Khepin\\\\Fixture\\\\Entity\\\\Driver'\n // );\n\n // $schema = array_map(function($class) use ($em) {\n // return $em->getClassMetadata($class);\n // }, $entities);\n\n // $schemaTool = new SchemaTool($em);\n // $schemaTool->dropSchema(array());\n // $schemaTool->createSchema($schema);\n // return $this->doctrine = m::mock(array(\n // 'getEntityManager' => $em,\n // 'getManager' => $em,\n // )\n // );\n }", "public static function connect() {\n\t\t$connection = new Connection(MONGO_DB_HOST);\n\t\t$config = new Configuration();\n\t\t$config->setProxyDir('../cache/mongo/proxies');\n\t\t$config->setProxyNamespace('MongoProxies');\n\t\t$config->setHydratorDir('../cache/mongo/hydrators');\n\t\t$config->setHydratorNamespace('MongoHydrators');\n\t\t$config->setDefaultDB(MONGO_DB_NAME);\n\t\t$config->setMetadataDriverImpl(AnnotationDriver::create('../app/models/MongoDocs'));\n\t\tAnnotationDriver::registerAnnotationClasses();\n\t\treturn DocumentManager::create($connection, $config);\n\t}", "public function documents()\n {\n return $this->hasMany(DocumentManager::class, 'doc_project_id');\n }", "function getDocuments($document_srls, $is_admin = false, $load_extra_vars=true, $columnList = array())\n\t{\n\t\t\t\n\t\tif(is_array($document_srls))\n\t\t{\n\t\t\t$list_count = count($document_srls);\n\t\t\t$document_srls = implode(',',$document_srls);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$list_count = 1;\n\t\t}\n\t\t$args = new stdClass();\n\t\t$args->document_srls = $document_srls;\n\t\t$args->list_count = $list_count;\n\t\t$args->order_type = 'asc';\n\n\t\t$output = executeQuery('document.getDocuments', $args, $columnList);\n\t\t$document_list = $output->data;\n\t\tif(!$document_list) return;\n\t\tif(!is_array($document_list)) $document_list = array($document_list);\n\n\t\t$document_count = count($document_list);\n\t\tforeach($document_list as $key => $attribute)\n\t\t{\n\t\t\t$document_srl = $attribute->document_srl;\n\t\t\tif(!$document_srl) continue;\n\n\t\t\tif(!$GLOBALS['XE_DOCUMENT_LIST'][$document_srl])\n\t\t\t{\n\t\t\t\t$oDocument = null;\n\t\t\t\t$oDocument = new documentItem();\n\t\t\t\t$oDocument->setAttribute($attribute, false);\n\t\t\t\tif($is_admin) $oDocument->setGrant();\n\t\t\t\t$GLOBALS['XE_DOCUMENT_LIST'][$document_srl] = $oDocument;\n\t\t\t}\n\n\t\t\t$result[$attribute->document_srl] = $GLOBALS['XE_DOCUMENT_LIST'][$document_srl];\n\t\t}\n\n\t\tif($load_extra_vars) $this->setToAllDocumentExtraVars();\n\n\t\t$output = null;\n\t\tif(count($result))\n\t\t{\n\t\t\tforeach($result as $document_srl => $val)\n\t\t\t{\n\t\t\t\t$output[$document_srl] = $GLOBALS['XE_DOCUMENT_LIST'][$document_srl];\n\t\t\t}\n\t\t}\n\n\t\treturn $output;\n\t}", "public function testListAllDocuments()\n {\n }", "public function setDocuments($documents) {\n $this->_documents = $documents;\n }", "public function getDocumentManager()\n {\n return $this->getObjectManager();\n }", "private function fetchDocumentsMetadata()\n {\n $this->metadata = [];\n $documentClasses = [];\n\n foreach ($this->indexManagers as $indexManagerName => $indexSettings) {\n $indexAnalyzers = isset($indexSettings['settings']['analysis']['analyzer']) ? $indexSettings['settings']['analysis']['analyzer'] : [];\n\n // Fetches DocumentMetadata objects for the types within the index\n foreach ($indexSettings['types'] as $documentClass) {\n if (isset($documentClasses[$documentClass])) {\n throw new \\InvalidArgumentException(\n sprintf('You cannot have type %s under \"%s\" index manager, as it is already managed by \"%s\" index manager',\n $documentClass, $indexManagerName, $documentClasses[$documentClass]\n )\n );\n }\n $documentClasses[$documentClass] = $indexManagerName;\n $metadata = $this->fetchMetadataFromClass($documentClass, $indexAnalyzers);\n $this->metadata[$indexManagerName][$documentClass] = new DocumentMetadata($metadata);\n }\n }\n\n $this->cache->save(self::CACHE_KEY, $this->metadata);\n if ($this->debug) {\n $this->cache->save('[C]'.self::CACHE_KEY, time());\n }\n\n return $this->metadata;\n }", "public function get_documents() \n {\n $endpoint_name = \"/documents/\";\n $request_arguments = [];\n $documents = $this->request(\"GET\", $endpoint_name, $request_arguments);\n if (array_key_exists(\"documents\", $documents)) {\n return $documents[\"documents\"];\n }\n return $documents;\n }", "public function find(array $criteria);", "function afterFind($results, $primary = false) {\r\n\t\t// Fast fail if no document on a direct request\r\n\t\tif (empty($primary) && isset($results['id']) && empty($results['id'])) return null;\r\n\t\t// Fast fail if no Document nor Metadatas\r\n\t\tif (!Set::matches('/Metadata', $results)) return $results;\r\n\r\n\t\t// Results are presented in either of two ways :\r\n\t\t// $primary : \tIn a numeric-indexed array where each key contains a Document, Metadata and possible Version key\r\n\t\t//\t\t\t\tThis array will have only one key for a find('first')\r\n\t\t// !primary:\ta/ In a document array (id, parent_id, path, etc) and a Metadata and possible Version subarrays. For belongsTo\r\n\t\t//\t\t\t\tb/ In a numeric-indexed array of a/ arrays, for HABTM\r\n\r\n\r\n\t\t// We guess if we have a list of items or only one item\r\n\r\n\r\n\t\t// Direct request on Document\r\n\t\tif (!empty($primary)) {\r\n\t\t\t// Copying metadatas back into main model\r\n\t\t\tforeach($results as $i => &$item) {\r\n\t\t\t\t// Merging metadatas\r\n\t\t\t\t$this->__mergeMetadata($item['Metadata'], $item[$this->alias]);\r\n\t\t\t\tunset($item['Metadata']);\r\n\t\t\t\t// Merging version metadatas\r\n\t\t\t\tif (!empty($item['Version'])) {\r\n\t\t\t\t\tforeach($item['Version'] as &$version) {\r\n\t\t\t\t\t\tif (empty($version['Metadata'])) continue;\r\n\t\t\t\t\t\t$this->__mergeMetadata($version['Metadata'], $version);\r\n\t\t\t\t\t\tunset($version['Metadata']);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// Multiples results\r\n\t\t\tif (!empty($results[0])) {\r\n\t\t\t\tforeach($results as $i => &$item) {\r\n\t\t\t\t\t// Merging metadatas\r\n\t\t\t\t\t$this->__mergeMetadata($item['Metadata'], $item);\r\n\t\t\t\t\tunset($item['Metadata']);\r\n\t\t\t\t\t// Merging version metadatas\r\n\t\t\t\t\tif (!empty($item['Version'])) {\r\n\t\t\t\t\t\tforeach($item['Version'] as &$version) {\r\n\t\t\t\t\t\t\tif (empty($version['Metadata'])) continue;\r\n\t\t\t\t\t\t\t$this->__mergeMetadata($version['Metadata'], $version);\r\n\t\t\t\t\t\t\tunset($version['Metadata']);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// To be more readable, we will move the Version key to the end of the array\r\n\t\t\t\t\t\t$_Version = $item['Version'];\r\n\t\t\t\t\t\tunset($item['Version']);\r\n\t\t\t\t\t\t$item['Version'] = $_Version;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// Merging metadatas\r\n\t\t\t\t$this->__mergeMetadata($results['Metadata'], $results);\r\n\t\t\t\tunset($results['Metadata']);\r\n\t\t\t\t// Merging version metadatas\r\n\t\t\t\tif (!empty($results['Version'])) {\r\n\t\t\t\t\tforeach($results['Version'] as &$version) {\r\n\t\t\t\t\t\tif (empty($version['Metadata'])) continue;\r\n\t\t\t\t\t\t$this->__mergeMetadata($version['Metadata'], $version);\r\n\t\t\t\t\t\tunset($version['Metadata']);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// To be more readable, we will move the Version key to the end of the array\r\n\t\t\t\t\t$_Version = $results['Version'];\r\n\t\t\t\t\tunset($results['Version']);\r\n\t\t\t\t\t$results['Version'] = $_Version;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $results;\r\n\t}", "public function getDocuments() {\n\t\t$user = $this->auth->user();\n\n\t\tif(!$user) {\n\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\"code\" => 401,\n\t\t\t\t\"message\" => \"Permisos denegados para el cliente\",\n\t\t\t\t\"response\" => null\n\t\t\t]);\n\t\t} else {\n\t\t\t$documents = Documents::where('id_user', $user->id)->where('status', '1')->get(['id', 'folio', 'location', 'type', 'alias', 'notes', 'subtype', 'picture_path', 'expedition', 'expiration', 'created_at']);\n\n\t\t\tif($documents->count()) {\n\t\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\t\"code\" => 200,\n\t\t\t\t\t\"message\" => \"Listado de documentos\",\n\t\t\t\t\t\"response\" => array(\"documents\" => $documents)\n\t\t\t\t]);\n\t\t\t} else {\n\t\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\t\"code\" => 202,\n\t\t\t\t\t\"message\" => \"No se encontraron documentos\",\n\t\t\t\t\t\"response\" => null\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t}", "public function testConstructorWithResult()\n {\n $data = ['foo' => 1, 'bar' => 2];\n $result = new BSONDocument($data);\n $document = new Document($result);\n $this->assertSame($data, $document->toArray());\n }", "public function documents(): EstatesDocuments\n {\n if (is_null($this->documentsEndpoint)) {\n $this->documentsEndpoint = new EstatesDocuments($this->api);\n }\n return $this->documentsEndpoint;\n }", "private function getDAO()\n {\n return $this->get('doctrine_mongodb')->getManager()\n ->getRepository('ResumeBundle:ResumeDocument');\n }", "public function find(array $conditions = []);", "public function createInstance()\n {\n $mock = $this->mock('Dhii\\\\SimpleTest\\\\Locator\\\\ResultSetInterface')\n ->getTests()\n ->new();\n\n return $mock;\n }", "public function getDocuments()\n {\n return $this->parseResult();\n }", "public function testSearchDocument()\n {\n echo \"\\nTesting document search...\";\n //$url = TestServiceAsReadOnly::$elasticsearchHost . \"/CIL_RS/index.php/rest/documents?search=mouse\";\n $url = TestServiceAsReadOnly::$elasticsearchHost . $this->context.\"/documents?search=mouse\";\n \n $response = $this->curl_get($url);\n //echo \"\\n-------Response:\".$response;\n $result = json_decode($response);\n $total = $result->hits->total;\n \n $this->assertTrue(($total > 0));\n }", "public function get_document($record, $options = array()) {\n\n try {\n $cm = $this->get_cm($this->get_module_name(), $record->id, $record->course);\n $context = \\context_module::instance($cm->id);\n } catch (\\dml_missing_record_exception $ex) {\n // Notify it as we run here as admin, we should see everything.\n debugging('Error retrieving ' . $this->areaid . ' ' . $record->id . ' document, not all required data is available: ' .\n $ex->getMessage(), DEBUG_DEVELOPER);\n return false;\n } catch (\\dml_exception $ex) {\n // Notify it as we run here as admin, we should see everything.\n debugging('Error retrieving ' . $this->areaid . ' ' . $record->id . ' document: ' . $ex->getMessage(), DEBUG_DEVELOPER);\n return false;\n }\n\n // Prepare associative array with data from DB.\n $doc = \\core_search\\document_factory::instance($record->id, $this->componentname, $this->areaname);\n $doc->set('title', content_to_text($record->name, false));\n $doc->set('content', content_to_text($record->intro, $record->introformat));\n $doc->set('contextid', $context->id);\n $doc->set('courseid', $record->course);\n $doc->set('owneruserid', \\core_search\\manager::NO_OWNER_ID);\n $doc->set('modified', $record->{static::MODIFIED_FIELD_NAME});\n\n // Check if this document should be considered new.\n if (isset($options['lastindexedtime'])) {\n $createdfield = static::CREATED_FIELD_NAME;\n if (!empty($createdfield) && ($options['lastindexedtime'] < $record->{$createdfield})) {\n // If the document was created after the last index time, it must be new.\n $doc->set_is_new(true);\n }\n }\n\n return $doc;\n }", "public function find($documentClass, array $options = array())\n {\n return $this->getRepository($documentClass)->find($options);\n }", "public function testLoadWithDocumentSet() {\n\t\t$options = $this->_loadOptions;\n\t\t$options['collection'] = 'DocumentSet';\n\t\t$posts = Fixture::load('models/Posts', $options);\n\t\t$this->_testLoad($posts);\n\t}", "public function processDocumentsTest($documentHolder, $docfieldname=null, $docType=null, $attachmentHolder=null) {\n\n if( $documentHolder == null ) {\n //echo \"not exists: document=\".$documentHolder.\"<br>\";\n return $documentHolder;\n }\n\n //testing\n $class = new \\ReflectionClass($documentHolder);\n $className = $class->getShortName();\n echo \"<br><br>className=\".$className.\"<br>\";\n\n if( $docfieldname ) {\n //\n } else {\n $docfieldname = \"Document\";\n }\n\n $addMethodName = \"add\".$docfieldname;\n $removeMethodName = \"remove\".$docfieldname;\n $getMethod = \"get\".$docfieldname.\"s\";\n echo \"getMethod=\".$getMethod.\"<br>\";\n echo \"removeMethodName=\".$removeMethodName.\"<br>\";\n\n echo \"before processing holder count=\".count($documentHolder->$getMethod()).\"<br>\";\n foreach( $documentHolder->$getMethod() as $doc ) {\n echo \"starting doc id=\".$doc->getId().\", originalname=\".$doc->getOriginalname().\", uniquename=\".$doc->getUniquename().\"<br>\";\n }\n\n if( count($documentHolder->$getMethod()) == 0 ) {\n echo \"return: no documents<br>\";\n\n //prvenet create an empty DocumentContainer and AttachmentContainer: remove DocumentContainer from AttachmentContainer\n //$attachmentContainer = null;\n //if( $documentHolder->getAttachmentContainer() )\n if( $documentHolder && method_exists($documentHolder, 'getAttachmentContainer') ) {\n $attachmentContainer = $documentHolder->getAttachmentContainer();\n if( $attachmentContainer && method_exists($attachmentContainer, 'removeDocumentContainer') ) {\n $attachmentContainer->removeDocumentContainer($documentHolder);\n }\n }\n\n if( $attachmentHolder ) {\n $attachmentHolder->setAttachmentContainer(null);\n }\n\n return null;\n //return $documentHolder;\n }\n\n echo get_class($documentHolder).\": holder id=\".$documentHolder->getId().\"<br>\";\n echo \"<br>$getMethod: before processing holder count=\".count($documentHolder->$getMethod()).\"<br>\";\n\n //get type by $documentHolder class\n if( !$docType ) {\n $docType = $this->getDocumentTypeByHolder($documentHolder);\n }\n\n foreach( $documentHolder->$getMethod() as $doc ) {\n\n// echo \"document id:<br>\";\n// print_r($doc->getId());\n\n $documentId = $doc->getId();\n echo \"doc id=\".$documentId.\"<br>\";\n// echo \"<br>\";\n\n $documentHolder->$removeMethodName($doc);\n //$this->_em->persist($doc);\n\n //check if id is numeric to prevent the case when $doc->getId() = \"undefined\"\n if( $documentId && is_numeric($documentId) ) {\n\n //process.py script: replaced namespace by ::class: ['AppUserdirectoryBundle:Document'] by [Document::class]\n $docDb = $this->_em->getRepository(Document::class)->find($documentId);\n //$docDb = $doc;\n\n echo \"docDb: [\".$docDb.\"]<br>\";\n if( $docDb ) {\n\n echo \"docDb id=\".$docDb->getId().\"<br>\";\n //set type if not set\n if( !$docDb->getType() && $docType ) {\n $docDb->setType($docType);\n }\n\n //$this->_em->persist($docDb);\n //$this->_em->persist($documentHolder);\n\n $documentHolder->$addMethodName($docDb);\n } else {\n //exit(\"Document not found by id=\".$documentId);\n }\n\n } //if\n\n } //foreach\n\n echo \"after processing holder count=\".count($documentHolder->$getMethod()).\"<br>\";\n foreach( $documentHolder->$getMethod() as $doc ) {\n echo \"final doc id=\".$doc->getId().\", originalname=\".$doc->getOriginalname().\", uniquename=\".$doc->getUniquename().\"<br>\";\n }\n\n //exit('eof documents processing');\n\n return $documentHolder;\n }", "function testInputDocument() {\n\t\tMock::generatePartial('DocumentHelper', 'MockDocumentHelperInput', array('input'));\n\t\t$this->helper->Document = new MockDocumentHelperInput();\n\t\t$this->helper->Document->setReturnValue('input', 'bar');\n\t\t$result = $this->helper->input('Text.document_foo');\n\t\t$this->assertEqual($result, 'bar');\n\t}", "public function testFind()\n {\n $data = array('id' => 1, 'username' => 'root', 'password' => 'password');\n $mockPDO = $this->getMock('\\\\PDOMock', array('fetchOne'));\n $mockPDO\n ->expects($this->once())\n ->method('fetchOne')\n ->will($this->returnCallback(function($arg1, $arg2) use ($data) {\n $sql = 'SELECT\n *\nFROM\n `users`\nWHERE\n id = :id\nORDER BY\n id ASC';\n\n if($arg1 == $sql && $arg2 == array('id' => 1)) {\n return $data;\n } else {\n return array();\n }\n }))\n ;\n $storage = new AuraExtendedPdo($mockPDO, new QueryFactory('mysql'));\n $result = $storage->find(array('id' => 1), 'users');\n\n $this->assertEquals($data['id'], $result['id']);\n $this->assertEquals($data['username'], $result['username']);\n $this->assertEquals($data['password'], $result['password']);\n }", "protected function setConfigForSearchDocIndexes($mockConfig)\n {\n $config=array();\n $config[\"data_sources\"] = array(\n \"tlog\"=>array(\n \"type\"=>\"mongo\",\n \"connection\"=>\"mongodb://tloghost:27017,tloghost:27018/admin\",\n \"replicaSet\" => \"tlogrepset\"\n ),\n \"mongo\"=>array(\"type\"=>\"mongo\",\"connection\" => \"mongodb://localhost\")\n );\n $config[\"defaultContext\"] = \"http://talisaspire.com/\";\n $config[\"stores\"] = array(\n \"tripod_php_testing\" => array(\n \"type\"=>\"mongo\",\n \"data_source\"=>\"mongo\",\n \"pods\" => array(\"CBD_testing\" => array()),\n \"search_config\" => array(\n \"search_provider\" => \"MongoSearchProvider\",\n \"search_specifications\" => array(\n array(\n \"_id\" => \"i_search_something\",\n \"type\" => \"temp:TestType\",\n \"from\" => \"CBD_testing\",\n \"filter\" => array(\n \"from\" => \"CBD_testing\",\n \"condition\" => array(\n \"spec:name\" => array(\n '$exists' => true\n )\n )\n ),\n \"fields\" => array(\n array(\n \"fieldName\" => \"result.title\",\n \"predicates\" => array(\"spec:note\"),\n \"limit\" => 1\n )\n )\n )\n )\n )\n )\n );\n\n $config[\"transaction_log\"] = array(\n \"database\"=>\"transactions\",\n \"collection\"=>\"transaction_log\",\n \"data_source\"=>\"tlog\"\n );\n\n $mockConfig->loadConfig($config);\n }", "public function getDocument();", "public function getDocument($roles = []) {\n return (new \\Treto\\PortalBundle\\Model\\DocumentSerializer($this,$roles))->toArray();\n }", "public function getDocumentManager()\n {\n return $this->documentManager;\n }", "public function findDocuments(array $ids, $limit = null, $offset = null)\n {\n $this->conn->initialize();\n\n $path = \"/{$this->name}/_all_docs?include_docs=true\";\n\n if (null !== $limit) {\n $path .= '&limit=' . (integer) $limit;\n }\n if (null !== $offset) {\n $path .= '&skip=' . (integer) $offset;\n }\n\n $json = JSONEncoder::encode(array('keys' => $ids));\n\n $response = $this->conn->getClient()->request(\n $path,\n ClientInterface::METHOD_POST,\n $json,\n array('Content-Type' => 'application/json')\n );\n\n $value = JSONEncoder::decode($response->getContent());\n\n return $value;\n }", "public static function find($parameters = null): ResultsetInterface;", "public function testListDocuments()\n {\n echo \"\\nTesting document listing...\";\n //$url = TestServiceAsReadOnly::$elasticsearchHost . \"/CIL_RS/index.php/rest/documents\";\n $url = TestServiceAsReadOnly::$elasticsearchHost .$this->context.\"/documents\";\n \n $response = $this->curl_get($url);\n //echo \"-------Response:\".$response;\n $result = json_decode($response);\n $total = $result->total;\n \n $this->assertTrue(($total > 0));\n \n }", "public static function find($parameters=null) {}", "function documentFactory()\n\t{\n\t\treturn [\n\t\t\t'factory'=>(new JbCandidateDocument)\n\t\t];\n\t}", "public function find(string $finder, array $options = []): Builder;", "private function getDM(){\n if (null === $this->dm){\n $connection = new Connection();\n $config = new Configuration();\n $config->setProxyDir(__DIR__ . '/../Documents/Proxies');\n $config->setProxyNamespace('Proxies');\n $config->setHydratorDir(__DIR__ . '/../Documents/Hydrators');\n $config->setHydratorNamespace('Hydrators');\n $config->setDefaultDB('saintSeya');\n $config->setMetadataDriverImpl(AnnotationDriver::create(__DIR__ . '/../Documents'));\n AnnotationDriver::registerAnnotationClasses();\n $this->dm = DocumentManager::create($connection, $config);\n }\n return $this->dm;\n }", "private function parse_documents(array $arrDocuments)\n {\n $arrCollection = [];\n\n foreach ($arrDocuments as $objDocument) {\n $arrCollection[] = new Document($objDocument);\n }\n\n return $arrCollection;\n }", "public function find(){\n\n $params = $this->_where;\n $selects = $this->preparedSelects();\n $order = $this->preparedOrderBy();\n $range = $this->_range;\n $depth = $this->_depth;\n $objects = array();\n\n $found = $this->_find($params,$selects,$order,$range,$depth);\n\n if($this->_rest->statusCode() == 200){\n $this->_count = $this->_rest->count();\n $indexKey = $this->indexKey;\n\n // if the result is a single object (for example, in the case of listapi\n // query), it's converted to an array before being processed\n if(!is_array($found)) {\n $found = array($found);\n }\n foreach($found as $attributes){\n if($indexKey){\n $index = isset($attributes->$indexKey) ? $attributes->$indexKey : count($objects);\n }else{\n $index = count($objects);\n }\n\n if($this->objectClass == Object::USER_OBJECT_CLASS){\n $objects[$index] = new User($attributes);\n }else{\n $objects[$index] = new Object($this->objectClass,$attributes);\n }\n }\n }\n\n return $objects;\n }", "public function getDocument() {}", "public function getDocument() {}", "public function getDocument() {}", "public function getDocument() {}", "public function getDocument() {}", "public function getDocument() {}", "public function getDocument() {}", "public function getDocument() {}", "public function getDocument() {}", "public function getDocument() {}", "public function getDocument() {}", "public function getDocument() {}", "public function getDocument() {}", "public function getDocument() {}", "public function find($data);", "public function createDocument()\r\n {\r\n return new Document($this);\r\n }", "protected function _initMongo()\n {\n $config = new Ini(APPLICATION_PATH . '/configs/application.ini');\n \n $mongo = new DoctrineMongo($config);\n $dm = $mongo->init();\n \n Registry::getInstance()->set('dm', $dm);\n \n return $dm;\n }", "protected function createMockCollection()\n {\n $mockCollection = $this->getMockBuilder('Collection')\n ->setMethods(array('createIndex', 'deleteIndexes'))\n ->getMock();\n\n return $mockCollection;\n }", "public function testTypeWithResult()\n {\n $this->markTestSkipped('Wait until Mongo specific attributes are needed');\n\n $result = $this->getMock('Elastica\\Result', [], [[]]);\n $data = ['a' => 'b'];\n\n $result\n ->method('getData')\n ->will($this->returnValue($data));\n\n $result\n ->method('getId')\n ->will($this->returnValue(1));\n\n $result\n ->method('getType')\n ->will($this->returnValue('things'));\n\n $result\n ->method('getVersion')\n ->will($this->returnValue(3));\n\n $result\n ->method('getHighlights')\n ->will($this->returnValue(['highlights array']));\n\n $result\n ->method('getExplanation')\n ->will($this->returnValue(['explanation array']));\n\n $document = new Document($result);\n $this->assertSame($data + ['id' => 1], $document->toArray());\n $this->assertEquals('things', $document->type());\n $this->assertEquals(3, $document->version());\n $this->assertEquals(['highlights array'], $document->highlights());\n $this->assertEquals(['explanation array'], $document->explanation());\n }", "public function processDocuments($documentHolder, $docfieldname=null, $docType=null, $attachmentHolder=null) {\n\n if( $documentHolder == null ) {\n //echo \"not exists: document=\".$documentHolder.\"<br>\";\n return $documentHolder;\n }\n\n //testing\n// $class = new \\ReflectionClass($documentHolder);\n// $className = $class->getShortName();\n// echo \"<br><br>className=\".$className.\"<br>\";\n\n if( $docfieldname ) {\n //\n } else {\n $docfieldname = \"Document\";\n }\n\n $addMethodName = \"add\".$docfieldname;\n $removeMethodName = \"remove\".$docfieldname;\n $getMethod = \"get\".$docfieldname.\"s\";\n //echo \"getMethod=\".$getMethod.\"<br>\";\n //echo \"removeMethodName=\".$removeMethodName.\"<br>\";\n\n if( count($documentHolder->$getMethod()) == 0 ) {\n //echo \"return: no documents<br>\";\n\n //prvenet create an empty DocumentContainer and AttachmentContainer: remove DocumentContainer from AttachmentContainer\n //$attachmentContainer = null;\n //if( $documentHolder->getAttachmentContainer() )\n if( $documentHolder && method_exists($documentHolder, 'getAttachmentContainer') ) {\n $attachmentContainer = $documentHolder->getAttachmentContainer();\n if( $attachmentContainer && method_exists($attachmentContainer, 'removeDocumentContainer') ) {\n $attachmentContainer->removeDocumentContainer($documentHolder);\n }\n }\n\n if( $attachmentHolder ) {\n $attachmentHolder->setAttachmentContainer(null);\n }\n\n return null;\n //return $documentHolder;\n }\n\n //echo get_class($documentHolder).\": holder id=\".$documentHolder->getId().\"<br>\";\n //echo \"<br>$getMethod: before processing holder count=\".count($documentHolder->$getMethod()).\"<br>\";\n\n //get type by $documentHolder class\n if( !$docType ) {\n $docType = $this->getDocumentTypeByHolder($documentHolder);\n }\n\n foreach( $documentHolder->$getMethod() as $doc ) {\n\n// echo \"document id:<br>\";\n// print_r($doc->getId());\n\n $documentId = $doc->getId();\n //echo \"doc id=\".$documentId.\"<br>\";\n// echo \"<br>\";\n\n $documentHolder->$removeMethodName($doc);\n\n //check if id is numeric to prevent the case when $doc->getId() = \"undefined\"\n if( $documentId && is_numeric($documentId) ) {\n\n //process.py script: replaced namespace by ::class: ['AppUserdirectoryBundle:Document'] by [Document::class]\n $docDb = $this->_em->getRepository(Document::class)->find($documentId);\n //$docDb = $doc;\n\n //echo \"docDb: [\".$docDb.\"]<br>\";\n if( $docDb ) {\n\n //echo \"docDb id=\".$docDb->getId().\"<br>\";\n //set type if not set\n if( !$docDb->getType() && $docType ) {\n $docDb->setType($docType);\n }\n\n $documentHolder->$addMethodName($docDb);\n } else {\n //exit(\"Document not found by id=\".$documentId);\n }\n\n } //if\n\n } //foreach\n\n// echo \"after processing holder count=\".count($documentHolder->$getMethod()).\"<br>\";\n// foreach( $documentHolder->$getMethod() as $doc ) {\n// echo \"final doc id=\".$doc->getId().\", originalname=\".$doc->getOriginalname().\", uniquename=\".$doc->getUniquename().\"<br>\";\n// }\n\n //exit('eof documents processing');\n\n return $documentHolder;\n }", "public function get_document($record, $options = array()) {\n\n $context = \\context_system::instance();\n\n // Prepare associative array with data from DB.\n $doc = \\core_search\\document_factory::instance($record->id, $this->componentname, $this->areaname);\n // Include all alternate names in title.\n $array = [];\n foreach (get_all_user_name_fields(false, null, null, null, true) as $field) {\n $array[$field] = $record->$field;\n }\n $fullusername = join(' ', $array);\n // Assigning properties to our document.\n $doc->set('title', content_to_text($fullusername, false));\n $doc->set('contextid', $context->id);\n $doc->set('courseid', SITEID);\n $doc->set('itemid', $record->id);\n $doc->set('modified', $record->timemodified);\n $doc->set('owneruserid', \\core_search\\manager::NO_OWNER_ID);\n $doc->set('content', content_to_text($record->description, $record->descriptionformat));\n\n // Check if this document should be considered new.\n if (isset($options['lastindexedtime']) && $options['lastindexedtime'] < $record->timecreated) {\n // If the document was created after the last index time, it must be new.\n $doc->set_is_new(true);\n }\n\n return $doc;\n }", "abstract protected function findOneBy(array $criteria);", "public function find($filters, $limit = false, $offset = false) {\n $this->_filters($filters, $limit, $offset);\n $products = $this->db->get('products')->result();\n return (object)array(\n 'status' => 'success',\n 'code' => 'products.success.find',\n 'data' => $products\n );\n }", "public function get_results_documents($search_form_query, $chk_collections, $chk_entities)\n\t{\t\t\t\n\t\t$this->db->select('documents.document_id, documents.document_name, documents.document_text, collections.collection_name');\n\t\t$this->db->from('documents');\n\t\t$this->db->join('collections', 'documents.collection_id = collections.collection_id');\n\t\t$this->db->like('documents.document_text', $search_form_query);\n\t\t$this->db->where_in('collections.collection_name', $chk_collections);\n\t\t\n\t\t$query = $this->db->get();\n\t\t\t\n\t\treturn $query->result_array();\n\t}", "public static function find($parameters = null) :ResultsetInterface\n {\n return parent::find($parameters);\n }", "public function documents()\n\t{\n\t\treturn $this->hasMany(Document::class);\n\t}", "public function __construct(DocumentCollection $documents)\n\t{\n\t\t$this->documents = $documents;\n\t}", "protected function wrapResults($outputs)\n {\n return new Google_Documents_GetAllDocuments_Results($outputs);\n }", "protected function _prepareMockObjects()\n {\n $this->requestMock = $this->getMockBuilder(\\Magento\\Framework\\App\\Request\\Http::class)\n ->disableOriginalConstructor()\n ->getMock();\n $this->objectManagerMock = $this->createMock(\\Magento\\Framework\\ObjectManagerInterface::class);\n $this->storeManagerMock = $this->getMockForAbstractClass(\\Magento\\Store\\Model\\StoreManagerInterface::class);\n $this->storeModelMock = $this->createPartialMock(\\Magento\\Store\\Model\\Store::class, ['__wakeup', 'getId']);\n $this->reviewMock = $this->createPartialMock(\n \\Magento\\Review\\Model\\Review::class,\n ['__wakeup', 'create', 'save', 'getId', 'getResource', 'aggregate', 'getEntityIdByCode']\n );\n $this->reviewFactoryMock = $this->createPartialMock(\\Magento\\Review\\Model\\ReviewFactory::class, ['create']);\n $this->ratingMock = $this->createPartialMock(\n \\Magento\\Review\\Model\\Rating::class,\n ['__wakeup', 'setRatingId', 'setReviewId', 'addOptionVote']\n );\n $this->ratingFactoryMock = $this->createPartialMock(\\Magento\\Review\\Model\\RatingFactory::class, ['create']);\n $this->resultFactoryMock = $this->getMockBuilder(\\Magento\\Framework\\Controller\\ResultFactory::class)\n ->disableOriginalConstructor()\n ->getMock();\n $this->resultRedirectMock = $this->getMockBuilder(\\Magento\\Backend\\Model\\View\\Result\\Redirect::class)\n ->disableOriginalConstructor()\n ->getMock();\n\n $this->resultFactoryMock->expects($this->any())\n ->method('create')\n ->with(ResultFactory::TYPE_REDIRECT, [])\n ->willReturn($this->resultRedirectMock);\n }", "public static function find($parameters = null): \\Phalcon\\Mvc\\Model\\ResultsetInterface\n {\n return parent::find($parameters);\n }", "public static function find($parameters = null): \\Phalcon\\Mvc\\Model\\ResultsetInterface\n {\n return parent::find($parameters);\n }", "public static function find($parameters = null): \\Phalcon\\Mvc\\Model\\ResultsetInterface\n {\n return parent::find($parameters);\n }", "public static function find($parameters = null): \\Phalcon\\Mvc\\Model\\ResultsetInterface\n {\n return parent::find($parameters);\n }", "public static function find($parameters = null): \\Phalcon\\Mvc\\Model\\ResultsetInterface\n {\n return parent::find($parameters);\n }", "public static function find($parameters = null): \\Phalcon\\Mvc\\Model\\ResultsetInterface\n {\n return parent::find($parameters);\n }", "public static function find($parameters = null): \\Phalcon\\Mvc\\Model\\ResultsetInterface\n {\n return parent::find($parameters);\n }", "public static function find($parameters = null): \\Phalcon\\Mvc\\Model\\ResultsetInterface\n {\n return parent::find($parameters);\n }", "public static function find($parameters = null): \\Phalcon\\Mvc\\Model\\ResultsetInterface\n {\n return parent::find($parameters);\n }", "public static function find($parameters = null): \\Phalcon\\Mvc\\Model\\ResultsetInterface\n {\n return parent::find($parameters);\n }", "public static function find($parameters = null): \\Phalcon\\Mvc\\Model\\ResultsetInterface\n {\n return parent::find($parameters);\n }", "public static function findByName(\\SetaPDF_Core_Document $document, $name) {}", "public function testListAllPublicDocuments()\n {\n }", "function __processDocument() {\n\t\t$document = new Apache_Solr_Document;\n\t\tif ($this->settings[$this->model->alias]['boost']) {\n\t\t\t$document->setBoost($this->settings[$this->model->alias]['boost']);\n\t\t}\n\t\tforeach ($this->model->data as $alias => $data) {\n\t\t\tif ($alias === $this->model->alias) {\n\t\t\t\t$document = $this->__processDocumentFieldArray($document, $data);\n\t\t\t} elseif (in_array($alias, $this->settings[$this->model->alias]['include'])) {\n\t\t\t\t$field = $alias . $this->__fieldTypeMappingTable['relations'];\n\t\t\t\t$document = $this->__processDocumentRelationalFieldArray($document, $field, $data);\n\t\t\t}\n\t\t}\n\t\t$document->setField($this->__fieldModelAlias, $this->model->alias);\n\t\t$document->setField('id', $this->__createDocId());\n\t\treturn $document;\n\t}", "public static function find($parameters = null){\n\t\treturn parent::find($parameters);\n\t}", "public function testExecute()\n {\n $protocolMock = $this->getMockBuilder(Protocolx::class)\n ->disableOriginalConstructor()\n ->getMock();\n $sqlResultMock = $this->getMockBuilder(DocResult::class)\n ->disableOriginalConstructor()\n ->getMock();\n\n $protocolMock->expects($this->once())\n ->method('crudFind')\n ->with(\n $this->equalTo(\n 'test_schema'\n ),\n $this->equalTo(\n 'test_collection'\n ),\n $this->equalTo(\n []\n ),\n $this->equalTo(\n null\n ),\n $this->equalTo(\n null\n )\n )->will(\n $this->returnValue($sqlResultMock)\n );\n\n $findOperation = new Find(\n $protocolMock,\n 'test_schema',\n 'test_collection',\n []\n );\n\n $operationResult = $findOperation->execute();\n\n $this->assertInstanceOf(DocResult::class, $operationResult);\n }", "protected function _as_docs($results){\n \n return array_map(array($this, '_as_doc'), $results);\n }", "public abstract function findOperationBy(array $criteria);", "public function findOneBy(array $criteria)\n {\n if (isset($criteria['prefix'])) {\n $keys = $this->filesystem->listKeys($criteria['prefix']);\n } else {\n $keys = $this->filesystem->listKeys();\n }\n\n foreach ($keys[$this->getKey()] as $element) {\n $element = $this->filesystem->get($element);\n $object = $this->createObject($element);\n\n //check prefix\n if (isset($criteria['prefix']) && $criteria['prefix'].basename($element->getKey()) !== $element->getKey()) {\n continue;\n }\n\n //check suffix\n if (isset($criteria['suffix']) && !preg_match($criteria['suffix'], strtolower($element->getKey()))) {\n continue;\n }\n\n if (isset($criteria['slug']) && $object->getSlug() != $criteria['slug']) {\n continue;\n }\n\n return $this->invokeEvent($object);\n }\n }", "public function getDocument(): Document\n {\n return $this->document;\n }", "public static function find($parameters = null)\r\n {\r\n return parent::find($parameters);\r\n }", "public static function find($parameters = null)\r\n {\r\n return parent::find($parameters);\r\n }", "public static function find($parameters = null)\r\n {\r\n return parent::find($parameters);\r\n }", "public function testGetDocument()\n {\n }" ]
[ "0.59144634", "0.5902094", "0.5843777", "0.57373106", "0.5725653", "0.555542", "0.5534641", "0.5527029", "0.5469903", "0.54365957", "0.5423823", "0.5379411", "0.53657925", "0.5352716", "0.5317109", "0.529315", "0.52746946", "0.52632755", "0.52503985", "0.52421135", "0.5240509", "0.5227284", "0.5197713", "0.5179199", "0.51597464", "0.5153559", "0.50812477", "0.506263", "0.50590795", "0.50565326", "0.5052067", "0.5036197", "0.5033892", "0.5029964", "0.5029622", "0.50192815", "0.5017797", "0.50078636", "0.50018704", "0.49981523", "0.498986", "0.49897298", "0.4985201", "0.49793482", "0.49745104", "0.49675733", "0.49458385", "0.49409333", "0.49409333", "0.49409333", "0.49409333", "0.4940122", "0.4940122", "0.4940122", "0.4940122", "0.4940122", "0.4940122", "0.4940122", "0.4940122", "0.4940122", "0.4940122", "0.49355128", "0.49299058", "0.49289513", "0.49273255", "0.4896232", "0.48933893", "0.48887917", "0.48839548", "0.48824185", "0.48820284", "0.48801053", "0.48774657", "0.4873232", "0.48716936", "0.4866355", "0.48615652", "0.48615652", "0.48615652", "0.48615652", "0.48615652", "0.48615652", "0.48615652", "0.48615652", "0.48615652", "0.48615652", "0.48615652", "0.48474285", "0.48360488", "0.4830343", "0.48161498", "0.48159164", "0.4789348", "0.4786823", "0.4784935", "0.47846568", "0.47832483", "0.47832483", "0.47832483", "0.4768292" ]
0.82971185
0
Returns a manager registry mock that is capable of returning one or more object managers for getManager(). $objectManagers should be an associative array of managerName => manager (mock object)
protected function getManagerRegistry(array $objectManagers) { $managerRegistry = $this->getMock('Doctrine\Common\Persistence\ManagerRegistry'); $managerRegistry ->expects($this->any()) ->method('getManager') ->will( $this->returnCallback( function ($name) use ($objectManagers) { return $objectManagers[$name]; } ) ); return $managerRegistry; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getObjectManager()\n {\n return $this->managerRegistry->getManager($this->managerName);\n }", "public function getManagers()\n {\n // TODO: Implement getManagers() method.\n }", "public function getObjectManager() {}", "protected function getObjectManager(array $documents)\n {\n $objectManager = $this->getMock('Doctrine\\Common\\Persistence\\ObjectManager');\n $objectManager\n ->expects($this->any())\n ->method('find')\n ->will(\n $this->returnCallback(\n function ($class, $searchString) use ($documents) {\n return $documents[$searchString];\n }\n )\n );\n\n return $objectManager;\n }", "public function getObjectManager();", "public function getObjectManager();", "public function getObjectManager()\r\n {\r\n return $this->objectManager;\r\n }", "public function getObjectManager() {\n\t\tif(($this->objectManager instanceof \\TYPO3\\CMS\\Extbase\\Object\\ObjectManager) === false) {\n\t\t\t$this->objectManager = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance(\\TYPO3\\CMS\\Extbase\\Object\\ObjectManager::class);\n\t\t}\n\n\t\treturn $this->objectManager;\n\t}", "public function getObjectManager() {\n\t\tif(($this->objectManager instanceof \\TYPO3\\CMS\\Extbase\\Object\\ObjectManager) === false) {\n\t\t\t$this->objectManager = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Extbase\\\\Object\\\\ObjectManager');\n\t\t}\n\n\t\treturn $this->objectManager;\n\t}", "public function getManagers()\n {\n return [$this->entityManager];\n }", "public function getObjectManager(): mixed\n {\n return $this->objectManager;\n }", "public function getObjectManager()\n {\n return $this->objectManager;\n }", "public function getObjectManager()\n {\n return $this->objectManager;\n }", "public function getObjectManager()\n {\n return $this->objectManager;\n }", "public function getObjectManager()\n {\n return $this->objectManager;\n }", "public function getManagers()\n {\n return $this->managers;\n }", "protected function getObjectManager()\n {\n return $this->objectManager;\n }", "protected function getObjectManager() {}", "protected function getObjectManager()\n {\n return $this->_objectManager;\n }", "public static function getManager($a_sManager) {\n $sClassNamePrefix = preg_replace(\"/_([a-z])/e\", 'strtoupper(\"\\\\1\")', $a_sManager);\n $sClassName = $sClassNamePrefix . 'Manager';\n\n if (!array_key_exists($sClassNamePrefix, self::$_aStoredObjects)) {\n $sMapperFactoryName = \"MappingFactory_{$sClassNamePrefix}MappingFactory\";\n self::$_aStoredObjects[$sClassNamePrefix] = new $sClassName(new $sMapperFactoryName());\n }\n\n return self::$_aStoredObjects[$sClassNamePrefix];\n }", "public function setObjectManager(ObjectManager $objectManager);", "private function configureObjectManager()\n {\n $frameworkSetup = $this->configurationManager\n ->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);\n if (!is_array($frameworkSetup['objects'])) {\n return;\n }\n $objectContainer = GeneralUtility::makeInstance(Container::class);\n foreach ($frameworkSetup['objects'] as $classNameWithDot => $classConfiguration) {\n if (isset($classConfiguration['className'])) {\n $originalClassName = rtrim($classNameWithDot, '.');\n $objectContainer->registerImplementation($originalClassName, $classConfiguration['className']);\n }\n }\n }", "protected function injectObjectManager(\n $resolver,\n array $validClassNames = [],\n array $invalidClassNames = []\n )\n {\n $reflectionService = $this->createMock(ReflectionService::class);\n $objectManager = $this->createMock(ObjectManagerInterface::class);\n $returnMap = [];\n\n $returnMap[] = [ReflectionService::class, $reflectionService];\n\n if (is_a(current($validClassNames), static::RESOLVER_TARGET_CLASS)) {\n $reflectionService->method('getAllImplementationClassNamesForInterface')\n ->with(static::RESOLVER_TARGET_CLASS)->willReturn(array_keys($validClassNames));\n } else {\n $reflectionService->method('getAllImplementationClassNamesForInterface')\n ->with(static::RESOLVER_TARGET_CLASS)->willReturn($validClassNames);\n }\n\n foreach ($validClassNames as $key => $value) {\n if (is_a($value, static::RESOLVER_TARGET_CLASS)) {\n $instance = $value;\n $validClassName = $key;\n } else {\n $instance = $this->getMockBuilder(static::RESOLVER_TARGET_CLASS)\n ->setMethods(array_merge(\n ['getClassNameForTestPurposes'],\n get_class_methods(static::RESOLVER_TARGET_CLASS)\n ))\n ->getMock();\n $instance->method('getClassNameForTestPurposes')->willReturn($value);\n\n $validClassName = $value;\n }\n\n $returnMap[] = [$validClassName, $instance];\n }\n\n foreach ($invalidClassNames as $invalidClassName) {\n $returnMap[] = [$invalidClassName, new \\stdClass];\n }\n\n $objectManager->method('isRegistered')->will($this->returnCallback(\n function ($name) use ($validClassNames, $invalidClassNames) {\n return in_array($name, $validClassNames) || array_key_exists($name, $validClassNames) ||\n in_array($name, $invalidClassNames);\n }\n ));\n $objectManager->method('get')->will($this->returnValueMap($returnMap));\n\n $this->inject($resolver, 'objectManager', $objectManager);\n }", "public function setManagers($managers)\n {\n $this->managers = $managers;\n }", "public static function getRealServiceManager()\n {\n // When we fix our unit tests to mock all dependencies\n // we need to put this line back in to speed up our tests\n //return m::mock('\\Laminas\\ServiceManager\\ServiceManager')->makePartial();\n\n $serviceManager = new ServiceManager(new ServiceManagerConfig());\n $serviceManager->setService('ApplicationConfig', self::$config);\n $serviceManager->get('ModuleManager')->loadModules();\n $serviceManager->setAllowOverride(true);\n\n $config = $serviceManager->get('Config');\n $config['service_api_mapping']['endpoints']['backend'] = 'http://some-fake-backend/';\n $serviceManager->setService('Config', $config);\n\n $translator = m::mock(\\Laminas\\I18n\\Translator\\Translator::class)->makePartial();\n /** @var Translator $mvcTranslator */\n $mvcTranslator = m::mock(Translator::class, [$translator])->makePartial();\n $serviceManager->setService('MvcTranslator', $mvcTranslator);\n\n /*\n * NP 17th Nov 2014\n *\n * Although this is commented out I'd like to leave it in for now;\n * it's a more elegant way to trap unmocked backend requests than\n * setting a fake URL as above. Only trouble is at the moment $path\n * always comes through as null... needs a bit of investigation\n *\n $closure = function ($method, $path, $params) {\n $str = sprintf(\n \"Trapped unmocked backend request: %s %s\",\n $method, $path\n );\n throw new \\Exception($str);\n };\n\n $serviceManager->setService(\n 'ServiceApiResolver',\n m::mock()\n ->shouldReceive('getClient')\n ->andReturn(\n m::mock('\\Common\\Util\\RestClient[request]', [new \\Laminas\\Uri\\Http])\n ->shouldReceive('request')\n ->andReturnUsing($closure)\n ->getMock()\n )\n ->getMock()\n );\n */\n\n return $serviceManager;\n }", "public function getRepositoryManagers()\n {\n return $this->repositoryManagers;\n }", "public function getManager($name = null)\n {\n // TODO: Implement getManager() method.\n }", "public function getMockers()\n {\n $validator = $this->getMockBuilder('Symfony\\Component\\Validator\\Validator\\ValidatorInterface')\n ->disableOriginalConstructor()->getMock();\n\n return $mockers = [\n 'validator' => $validator\n ];\n }", "public function setObjectManager($objectManager)\n {\n $this->objectManager = $objectManager;\n }", "protected function getMocks()\n {\n $projects = [];\n $recordings = [];\n $brands = [];\n\n $brandId = 1;\n $userId = 1;\n for ($i = 1; $i <= 5; $i++) {\n $recordings[] = Mockery::mock('Tornado\\Project\\Recorings', [\n 'getPrimaryKey' => $i,\n 'getBrandId' => $brandId,\n 'toArray' => ['id' => $i]\n ]);\n }\n for ($i = 1; $i <= 5; $i++) {\n $projects[] = Mockery::mock('Tornado\\Project\\Project', [\n 'getPrimaryKey' => $i,\n 'getBrandId' => $brandId,\n 'toArray' => ['id' => $i]\n ]);\n }\n for ($i = 1; $i <= 5; $i++) {\n $brands[] = Mockery::mock('Tornado\\Organization\\Brand', [\n 'getId' => $i,\n 'getPrimaryKey' => $i,\n 'toArray' => ['id' => $i]\n ]);\n }\n $brands[0]->projects = $projects;\n $brands[0]->recordings = $recordings;\n\n $user = Mockery::mock('\\Tornado\\Organization\\User', [\n 'getId' => $userId\n ]);\n\n $session = Mockery::mock('\\Symfony\\Component\\HttpFoundation\\Session\\SessionInterface');\n $accessDecisionManager = Mockery::mock('\\Tornado\\Security\\Authorization\\AccessDecisionManagerInterface');\n $brandRepo = Mockery::mock('Tornado\\Organization\\Brand\\DataMapper');\n $projectRepo = Mockery::mock('Tornado\\Project\\Project\\DataMapper');\n $recordingRepo = Mockery::mock('Tornado\\Project\\Recording\\DataMapper');\n $request = Mockery::mock('\\DataSift\\Http\\Request');\n $dataSiftRecording = Mockery::mock('\\Tornado\\Project\\Recording\\DataSiftRecording');\n $pylon = Mockery::mock('\\DataSift\\Pylon\\Pylon');\n $urlGenerator = Mockery::mock('\\Symfony\\Component\\Routing\\Generator\\UrlGenerator');\n return [\n 'brandId' => $brandId,\n 'projects' => $projects,\n 'recordings' => $recordings,\n 'brands' => $brands,\n 'userId' => $userId,\n 'user' => $user,\n 'session' => $session,\n 'accessDecisionManager' => $accessDecisionManager,\n 'brandRepository' => $brandRepo,\n 'projectRepository' => $projectRepo,\n 'recordingRepository' => $recordingRepo,\n 'request' => $request,\n 'datasiftRecording' => $dataSiftRecording,\n 'pylon' => $pylon,\n 'url_generator' => $urlGenerator\n ];\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 }", "static function getManager123($a_sManager) {\n \n }", "public function manager($viewPath)\n {\n if (isset($this->managerByPath[$viewPath])) {\n return $this->managerByPath[$viewPath];\n }\n $this->managerByPath[$viewPath] = $this->createManagerForViewPath($viewPath);\n\n return $this->managerByPath[$viewPath];\n }", "public static function getServiceManager()\n {\n $sm = m::mock('\\Laminas\\ServiceManager\\ServiceManager')\n ->makePartial()\n ->setAllowOverride(true);\n\n // inject a real string helper\n $sm->setService('Helper\\String', new \\Common\\Service\\Helper\\StringHelperService());\n\n return $sm;\n }", "public function getEntityManagers()\n {\n // TODO: Implement getEntityManagers() method.\n }", "protected function getMockExtractorRegistry(array $createsExtractorInstances = [])\n {\n $extractorRegistry = $this->getMockBuilder(\\TYPO3\\CMS\\Core\\Resource\\Index\\ExtractorRegistry::class)\n ->setMethods(['createExtractorInstance'])\n ->getMock();\n\n if (!empty($createsExtractorInstances)) {\n $extractorRegistry->expects($this->any())\n ->method('createExtractorInstance')\n ->will($this->returnValueMap($createsExtractorInstances));\n }\n\n return $extractorRegistry;\n }", "public function getManager() {\n return $this->manager;\n }", "public function mockObject($objectClassName, ...$configurations)\n {\n foreach ($configurations as &$configuration) {\n $this->prepareMockConfig($configuration);\n }\n\n $config = call_user_func_array('array_replace_recursive', $configurations);\n\n $willReturn = $this->pullOutArrayValue($config, 'willReturn', []);\n $will = $this->pullOutArrayValue($config, 'will');\n $mockType = $this->pullOutArrayValue($config, 'mockType', self::MOCK_TYPE_DEFAULT);\n\n // 'methods' must be null for 'getMock' to not replace any element\n // (unlike 'getMockForAbstractClass')\n if (empty($config['methods'])) {\n if ($mockType == self::MOCK_TYPE_DEFAULT) {\n $config['methods'] = null;\n }\n }\n\n $mockBuilder = $this->testCase->getMockBuilder($objectClassName);\n\n foreach ($config as $property => $value) {\n $method = \"set$property\";\n if (method_exists($mockBuilder, $method)) {\n $mockBuilder->$method($value);\n }\n }\n\n if ($this->getArrayValue($config, 'disableOriginalConstructor', true)) {\n $mockBuilder->disableOriginalConstructor();\n }\n\n $mockMethod = $this->getMockMethod($mockType);\n /** @var \\PHPUnit_Framework_MockObject_MockObject $mock */\n $mock = $mockBuilder->$mockMethod();\n\n foreach ($willReturn as $method => $value) {\n $mock->method($method)->willReturn($value);\n }\n\n foreach ($will as $method => $value) {\n $mock->method($method)->will($value);\n }\n\n return $mock;\n }", "protected function mockEntityManager()\n {\n $originA = $this->makeOrigin('192.168.21', 'Sede A', true); \n $originRepository = $this->createMock(OriginRepository::class);\n $originRepository->expects($this->once())\n ->method('findAll')\n ->willReturn([$originA]);\n $entityManager = $this->createMock(EntityManagerInterface::class);\n $entityManager->expects($this->exactly(1))\n ->method('getRepository')\n ->withConsecutive([Origin::class])\n ->willReturnOnConsecutiveCalls($originRepository);\n $entityManager->expects($this->once())\n ->method('persist');\n $entityManager->expects($this->once())\n ->method('flush');\n return $entityManager;\n }", "protected function getManager()\n {\n return $this->manager;\n }", "protected function getManagerFactory()\n {\n return $this->container->get(ThuataControllerInterface::MANAGER_FACTORY_ID);\n }", "protected function getConverterRegistryMock()\n {\n return $this->getMock(\n 'ezp\\\\Persistence\\\\Storage\\\\Legacy\\\\Content\\\\FieldValue\\\\Converter\\\\Registry'\n );\n }", "function analogue()\n {\n return Manager::getInstance();\n }", "public function getObjectManager()\n {\n return $this->entityManager;\n }", "public static function createObjectManagerFactory($rootDir, array $initParams)\n {\n $dirList = self::createFilesystemDirectoryList($rootDir, $initParams);\n $driverPool = self::createFilesystemDriverPool($initParams);\n $configFilePool = self::createConfigFilePool();\n return new ObjectManagerFactory($dirList, $driverPool, $configFilePool);\n }", "public function testGetNodeTypesManager()\n {\n $this->assertSame($this->session->getNodeTypesManager(), $this->session->getNodeTypesManager());\n }", "public function getModuleManager();", "public static function getRepository($objectManager, $objectClass)\n {\n return $objectManager->getRepository($objectClass);\n }", "public function configureObjectManager() {}", "public function configureObjectManager() {}", "public function getDefinitions()\n {\n $manager = new ObjectDefinition(Manager::class);\n foreach ($this->connections as $name => $connection) {\n $manager->addMethodCall('addConnection', $connection, $name);\n }\n\n $manager->addMethodCall('bootEloquent');\n $manager->addMethodCall('setAsGlobal');\n\n return [\n Manager::class => $manager,\n ];\n }", "public function getEntityTypeManagerMock(){\n $manager = $this->prophet->prophesize('Drupal\\Core\\Entity\\EntityTypeManagerInterface');\n $storage = $this->getStorageMock()->reveal();\n try {\n $manager->getStorage(Argument::type('string'))->willReturn($storage);\n } catch (InvalidPluginDefinitionException $e) {\n } catch (PluginNotFoundException $e) {\n }\n return $manager;\n }", "public function load(ObjectManager $dbmanager)\n {\n $employee1 = Employee::createUser(\"johndoe\", \"password123\", \"John Doe\", \"[email protected]\", \"123-456-7890\");\n $employee2 = Employee::createUser(\"janedoe\", \"password123\", \"Jane Doe\", \"[email protected]\", null);\n $employee3 = Employee::createUser(\"billybob\", \"password123\", \"Billy Bob\", \"[email protected]\", \"198-765-4321\");\n $employee4 = Employee::createUser(\"kevinbacon\", \"password123\", \"Kevin Bacon\", \"[email protected]\", \"534-765-6524\");\n $employee5 = Employee::createUser(\"jamesbond\", \"password123\", \"James Bond\", \"[email protected]\", \"432-007-2353\");\n\n $dbmanager->persist($employee1);\n $dbmanager->persist($employee2);\n $dbmanager->persist($employee3);\n $dbmanager->persist($employee4);\n $dbmanager->persist($employee5);\n\n # Create a bunch of managers\n $manager1 = Manager::createUser(\"randyrhoads\", \"password123\", \"Randy Roads\", \"[email protected]\", \"333-231-4432\");\n $manager2 = Manager::createUser(\"dansmith\", \"password123\", \"Dan Smith\", null, \"883-233-4441\");\n\n $dbmanager->persist($manager1);\n $dbmanager->persist($manager2);\n\n # Create a bunch of shifts\n $begin = new \\DateTime('2017-10-01 08:00:00');\n $end = new \\DateTime('2017-11-01 08:00:00');\n\n # A shift for every day inbetween the above dates\n $interval = new \\DateInterval('P1D');\n $daterange = new \\DatePeriod($begin, $interval ,$end);\n\n $managers = [$manager1, $manager2];\n $employees = [$employee1, $employee2, $employee3, $employee4, $employee5, null];\n\n # Create three shifts for each day with random employees and random managers.\n # The null value in the employee list is to allow for empty shifts\n foreach($daterange as $date){\n $shiftEmployeesKeys = array_rand($employees, 3);\n $shiftManagerKey = array_rand($managers);\n\n foreach ($shiftEmployeesKeys as $employeeKey) {\n $startDateTime = clone $date;\n $endDateTime = clone $date;\n $endDateTime->modify('+8 hours');\n\n $shift = new Shift();\n $shift->setStartTime($startDateTime);\n $shift->setEndTime($endDateTime);\n $shift->setBreak(0.5);\n $shift->setEmployee($employees[$employeeKey]);\n $shift->setManager($managers[$shiftManagerKey]);\n $dbmanager->persist($shift);\n }\n }\n\n $dbmanager->flush();\n }", "private static function getFactory(string $manager = 'default'): self\n {\n if (!isset(self::$factories[$manager])) {\n throw new RuntimeException('Object manager not set: ' . $manager);\n }\n\n self::$instances[$manager] = (self::$factories[$manager])();\n unset(self::$factories[$manager]);\n\n return self::$instances[$manager];\n }", "public function testProcessWithSeveralManagers(array $managers)\n {\n $container = $this->getContainerMock($managers);\n\n $compilerPass = new MappingPass();\n $compilerPass->process($container);\n $compilerPass = new RepositoryPass();\n $compilerPass->process($container);\n }", "public function getPackageManagerForPath($strPath) {\n $objMetadata = new class_module_packagemanager_metadata();\n $objMetadata->autoInit($strPath);\n\n $objManager = null;\n\n if($objMetadata->getStrType() == self::STR_TYPE_MODULE) {\n $objManager = new class_module_packagemanager_packagemanager_module();\n $objManager->setObjMetadata($objMetadata);\n }\n\n if($objMetadata->getStrType() == self::STR_TYPE_TEMPLATE) {\n $objManager = new class_module_packagemanager_packagemanager_template();\n $objManager->setObjMetadata($objMetadata);\n }\n\n if($objMetadata->getStrType() == self::STR_TYPE_ELEMENT) {\n $objManager = new class_module_packagemanager_packagemanager_element();\n $objManager->setObjMetadata($objMetadata);\n }\n\n\n return $objManager;\n }", "private function mockEmployee()\n {\n $this->employeeS = $this->getMockBuilder('Employee')\n ->disableOriginalConstructor()\n ->getMock();\n\n $this->employeeS\n ->method('can')\n ->willReturn(true);\n }", "public function getObjectManager(){\n return $this->entityManager;\n }", "protected function getObjectManagerFromConfig(ServiceLocatorInterface $serviceManager)\n {\n if ($serviceManager->has('Matryoshka\\Model\\Object\\ObjectManager')) {\n return $serviceManager->get('Matryoshka\\Model\\Object\\ObjectManager');\n }\n\n throw new RuntimeException(\n sprintf(\n 'Unable to obtain instance of \"%s\"',\n 'Matryoshka\\Model\\Object\\ObjectManager'\n )\n );\n }", "protected function getDoctrine()\n {\n $config = $this->getMockAnnotatedConfig();\n $dm = \\Doctrine\\ODM\\MongoDB\\DocumentManager::create(null, $config);\n\n return $this->doctrine = m::mock(array(\n 'getManager' => $dm,\n 'getManagers' => array($dm),\n 'getManagerForClass' => $dm\n ));\n\n // $conn = array(\n // 'driver' => 'pdo_sqlite',\n // 'memory' => true,\n // // 'path' => __DIR__.'/../db.sqlite',\n // );\n\n // $config = $this->getMockAnnotatedConfig();\n // $em = EntityManager::create($conn, $config);\n\n // $entities = array(\n // 'Khepin\\\\Fixture\\\\Entity\\\\Car',\n // 'Khepin\\\\Fixture\\\\Entity\\\\Driver'\n // );\n\n // $schema = array_map(function($class) use ($em) {\n // return $em->getClassMetadata($class);\n // }, $entities);\n\n // $schemaTool = new SchemaTool($em);\n // $schemaTool->dropSchema(array());\n // $schemaTool->createSchema($schema);\n // return $this->doctrine = m::mock(array(\n // 'getEntityManager' => $em,\n // 'getManager' => $em,\n // )\n // );\n }", "protected function mockTokenManager()\n {\n $tokenManager = $this\n ->getMockBuilder('Symfony\\\\Component\\\\Security\\\\Csrf\\\\CsrfTokenManagerInterface')\n ->setMethods(['getToken'])\n ->getMockForAbstractClass()\n ;\n\n $tokenManager\n ->expects($this->any())\n ->method('getToken')\n ->willReturn(new CsrfToken('_csrf', 'testValue'))\n ;\n\n $tokenManager\n ->expects($this->any())\n ->method('refreshToken')\n ->willReturn(new CsrfToken('_csrf', 'testValue'))\n ;\n\n return $tokenManager;\n }", "protected function getModule_ManagerService()\n {\n return $this->services['module.manager'] = new \\phpbb\\module\\module_manager(${($_ = isset($this->services['cache.driver']) ? $this->services['cache.driver'] : ($this->services['cache.driver'] = new \\phpbb\\cache\\driver\\file())) && false ?: '_'}, ${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, ${($_ = isset($this->services['ext.manager']) ? $this->services['ext.manager'] : $this->getExt_ManagerService()) && false ?: '_'}, 'phpbb_modules', './../', 'php');\n }", "public function getEventsManager() : ManagerInterface;", "public function createCacheContainer()\n {\n $mock = $this->getMockBuilder('Dhii\\Cache\\MemoryMemoizer')\n ->setMethods(null)\n ->getMock();\n\n return $mock;\n }", "private function getManagerRegistry(string $resourceClass, array $identifierFields, QueryBuilder $queryBuilder, array $classMetadatas = [])\n {\n $classMetadataProphecy = $this->prophesize(ClassMetadata::class);\n $classMetadataProphecy->getIdentifierFieldNames()->willReturn(array_keys($identifierFields));\n\n foreach ($identifierFields as $name => $field) {\n $classMetadataProphecy->getTypeOfField($name)->willReturn($field['type']);\n }\n\n $platformProphecy = $this->prophesize(AbstractPlatform::class);\n\n $connectionProphecy = $this->prophesize(Connection::class);\n $connectionProphecy->getDatabasePlatform()->willReturn($platformProphecy);\n\n $repositoryProphecy = $this->prophesize(EntityRepository::class);\n $repositoryProphecy->createQueryBuilder('o')->willReturn($queryBuilder);\n\n $managerProphecy = $this->prophesize(EntityManagerInterface::class);\n $managerProphecy->getClassMetadata($resourceClass)->willReturn($classMetadataProphecy->reveal());\n $managerProphecy->getConnection()->willReturn($connectionProphecy);\n $managerProphecy->getRepository($resourceClass)->willReturn($repositoryProphecy->reveal());\n\n foreach ($classMetadatas as $class => $classMetadata) {\n $managerProphecy->getClassMetadata($class)->willReturn($classMetadata);\n }\n\n $managerRegistryProphecy = $this->prophesize(ManagerRegistry::class);\n $managerRegistryProphecy->getManagerForClass($resourceClass)->willReturn($managerProphecy->reveal());\n\n return $managerRegistryProphecy;\n }", "public function getManagerForClass($class)\n {\n // TODO: Implement getManagerForClass() method.\n }", "public function registerValidators(array $validators): IValidatorManager;", "public function manager();", "protected function _prepareMockObjects()\n {\n $this->requestMock = $this->getMockBuilder(\\Magento\\Framework\\App\\Request\\Http::class)\n ->disableOriginalConstructor()\n ->getMock();\n $this->objectManagerMock = $this->createMock(\\Magento\\Framework\\ObjectManagerInterface::class);\n $this->storeManagerMock = $this->getMockForAbstractClass(\\Magento\\Store\\Model\\StoreManagerInterface::class);\n $this->storeModelMock = $this->createPartialMock(\\Magento\\Store\\Model\\Store::class, ['__wakeup', 'getId']);\n $this->reviewMock = $this->createPartialMock(\n \\Magento\\Review\\Model\\Review::class,\n ['__wakeup', 'create', 'save', 'getId', 'getResource', 'aggregate', 'getEntityIdByCode']\n );\n $this->reviewFactoryMock = $this->createPartialMock(\\Magento\\Review\\Model\\ReviewFactory::class, ['create']);\n $this->ratingMock = $this->createPartialMock(\n \\Magento\\Review\\Model\\Rating::class,\n ['__wakeup', 'setRatingId', 'setReviewId', 'addOptionVote']\n );\n $this->ratingFactoryMock = $this->createPartialMock(\\Magento\\Review\\Model\\RatingFactory::class, ['create']);\n $this->resultFactoryMock = $this->getMockBuilder(\\Magento\\Framework\\Controller\\ResultFactory::class)\n ->disableOriginalConstructor()\n ->getMock();\n $this->resultRedirectMock = $this->getMockBuilder(\\Magento\\Backend\\Model\\View\\Result\\Redirect::class)\n ->disableOriginalConstructor()\n ->getMock();\n\n $this->resultFactoryMock->expects($this->any())\n ->method('create')\n ->with(ResultFactory::TYPE_REDIRECT, [])\n ->willReturn($this->resultRedirectMock);\n }", "public function isManager()\r\n {\r\n \treturn $this->manager;\r\n }", "public function getMultipleQueueManagerDefinition()\n {\n $multipleQueueManager = $this->getMockBuilder(MultipleQueueManagerInterface::class)->getMock();\n $definitionDefaultPool = new Definition(get_class($multipleQueueManager));\n $definitionDefaultPool->addTag(PoolsPass::QUEUE_MANAGER_TAG);\n $nullQueueManager = new Definition(NullQueueManager::class);\n $nullQueueManager->addTag(PoolsPass::QUEUE_MANAGER_TAG);\n $nullQueueManager->addTag(PoolsPass::QUEUE_MANAGER_TAG, array('pool' => 'newpool'));\n $definitionNonDefaultPool = new Definition(get_class($multipleQueueManager));\n $definitionNonDefaultPool->addTag(PoolsPass::QUEUE_MANAGER_TAG);\n $definitionNonDefaultPool->addTag(PoolsPass::QUEUE_MANAGER_TAG, array('pool' => 'newpool'));\n return array(\n array($definitionDefaultPool),\n array($definitionNonDefaultPool),\n array($nullQueueManager),\n array($definitionNonDefaultPool, false),\n );\n }", "public static function createMockEntityManager($unitTestCase, $returnValueMap) {\n $entityManager = $unitTestCase->getMockBuilder('Drupal\\Core\\Entity\\EntityManagerInterface')\n ->disableOriginalConstructor()\n ->getMock();\n\n $entityManager->expects($unitTestCase->any())\n ->method('getStorage')\n ->will($unitTestCase->returnValueMap($returnValueMap));\n\n return $entityManager;\n }", "public static function getPluginManager()\n {\n $pluginManager = parent::getPluginManager();\n\n foreach (self::$invokableClasses as $invokableClass) {\n\n $segments = explode('\\\\', $invokableClass);\n $name = array_pop($segments);\n\n $pluginManager->setInvokableClass($name, $invokableClass);\n }\n\n return $pluginManager;\n }", "public function managers()\n {\n return Manager::select('id', 'languagecode_id', 'name', 'status', 'slug')\n ->where('status', 1)\n ->get();\n }", "public function manager()\n {\n \treturn $this->hasOne(manager::class);\n }", "protected function getObjectByName(ServiceLocatorInterface $serviceLocator, $name)\n {\n if ($serviceLocator->has('Matryoshka\\Model\\Object\\ObjectManager')) {\n $serviceLocator = $serviceLocator->get('Matryoshka\\Model\\Object\\ObjectManager');\n }\n\n return $serviceLocator->get($name);\n }", "public function testEventManagerReset1(): EventManager\n {\n $eventManager = EventManager::instance();\n $this->assertInstanceOf('Cake\\Event\\EventManager', $eventManager);\n\n return $eventManager;\n }", "public function getManager(): Gutenberg\n {\n return $this->manager;\n }", "protected function initializeObjectManager() {}", "public function testIncludeManager()\n {\n $user = mockery::mock(User::class);\n\n $shift = mockery::mock(Shift::class);\n $shift->shouldReceive('getManager')->once()->withNoArgs()->andReturn($user);\n\n $transformer = new ShiftTransformer;\n $this->assertInstanceOf(Item::class, $transformer->includeManager($shift));\n }", "public function load(ObjectManager $objectManager)\n {\n }", "public function setObjectManager(ObjectManager $objectManager)\n {\n $this->entityManager = $objectManager;\n\n return $this;\n }", "public function load(ObjectManager $manager);", "public function load(ObjectManager $manager);", "public function getMethodologyObject(){\n $methodologyObject = $this->getMockBuilder('App\\Model\\Domain\\Entities\\Metodologia')\n ->disableOriginalConstructor()\n ->setMethods(['reglas'])->getMock();\n\n $methodologyObject->method('reglas')->willReturn($this->getRuleList());\n\n return $methodologyObject;\n }", "public function createService(ServiceLocatorInterface $serviceLocator) {\n $config = $serviceLocator->get('Configuration');\n $params = $config['FileBank']['params'];\n $em = $serviceLocator->get('doctrine.entitymanager.orm_default');\n\n $manager = new Manager($params, $em, $serviceLocator);\n return $manager;\n }", "public function getResourceManager()\n {\n if (!$this->resourceManager) {\n $this->resourceManager = new MemcachedResourceManager();\n }\n return $this->resourceManager;\n }", "protected function getSessionManager(ServiceLocatorInterface $services) {\r\n\t\tif ($this->sessionManager !== null) {\r\n\t\t\treturn $this->sessionManager;\r\n\t\t}\r\n\t\t\r\n\t\tif ($services->has ( 'Zend\\Session\\ManagerInterface' )) {\r\n\t\t\t$this->sessionManager = $services->get ( 'Zend\\Session\\ManagerInterface' );\r\n\t\t}\r\n\t\t\r\n\t\treturn $this->sessionManager;\r\n\t}", "private function getMockClientFactory($response)\n {\n $request = $this->getMock('Guzzle\\Http\\Message\\RequestInterface');\n $request\n ->expects($this->once())\n ->method('send')\n ->will($this->returnValue($response));\n\n $client = $this->getMock('Guzzle\\Http\\ClientInterface');\n $client\n ->expects($this->once())\n ->method('get')\n ->will($this->returnValue($request));\n\n $clientFactory = $this->getMock('Mremi\\UrlShortener\\Http\\ClientFactoryInterface');\n $clientFactory\n ->expects($this->once())\n ->method('create')\n ->will($this->returnValue($client));\n\n return $clientFactory;\n }", "public function load(ObjectManager $manager)\n {\n $provider1 = new Provider();\n $provider1->setName('OpenWeatherMap');\n $provider1->setUrl('http://openweathermap.org');\n $this->addReference('OpenWeatherMap', $provider1);\n\n $provider2 = new Provider();\n $provider2->setName('Yahoo');\n $provider2->setUrl('http://www.yahoo.com/');\n $this->addReference('Yahoo', $provider2);\n\n $provider3 = new Provider();\n $provider3->setName('Weather Underground');\n $provider3->setUrl('http://www.wunderground.com/');\n $this->addReference('Weather Underground', $provider3);\n\n $provider4 = new Provider();\n $provider4->setName('Advanced Weather');\n $provider4->setUrl('http://localhost/');\n $this->addReference('Advanced Weather', $provider4);\n\n $manager->persist($provider1);\n $manager->persist($provider2);\n $manager->persist($provider3);\n $manager->persist($provider4);\n\n $manager->flush();\n }", "protected function mock(string $class): MockObject\n {\n if (!class_exists($class)) {\n throw new InvalidArgumentException(sprintf('Class not found: %s', $class));\n }\n\n $mock = $this->getMockBuilder($class)\n ->disableOriginalConstructor()\n ->getMock();\n\n $this->container->set($class, $mock);\n\n return $mock;\n }", "public function getManager($name = null)\n {\n return $this->entityManager;\n }", "public function getManagerLinks()\n {\n $links = array();\n\t\t\n\t\t$modulevars = ModUtil::getVar('Mediasharex');\n\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'manager'), 'text' => $this->__('Manager'), 'class' => 'z-icon-es-confi');\n }\n\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'manager_albums'), 'text' => $this->__('Albums'), 'class' => 'z-icon-es-displa');\n }\n\t\t\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'manager_media'), 'text' => $this->__('Media'), 'class' => 'z-icon-es-displa');\n }\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'manager_previews'), 'text' => $this->__('Previews'), 'class' => 'z-icon-es-displa');\n }\n\t\t//unused yet\n\t\t//if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n // $links[] = array('url' => ModUtil::url($this->name, 'admin', 'manager_invitations'), 'text' => $this->__('Invitations'), 'class' => 'z-icon-es-displa');\n // }\n \n\t\t\t\n return $links;\n }", "private function getEntityManagerMock(): EntityManagerInterface\n {\n return $this->createMock(EntityManagerInterface::class);\n }", "public function testAddMediator()\n {\n $instance = new GenericDataMediatorResolver();\n\n $mediators = [\n $this->createMock(ExternalDataMediatorInterface::class),\n $this->createMock(ExternalDataMediatorInterface::class),\n $this->createMock(ExternalDataMediatorInterface::class)\n ];\n\n foreach ($mediators as $mediator) {\n $result = $instance->addMediator($mediator);\n\n $this->assertSame($instance, $result);\n $this->assertTrue($instance->contains($mediator));\n }\n }", "public function getAllManagersByEmployee(User $employee) :array\n {\n $firstManager = $this->em->getRepository(Manager::class)->findOneBy([\n 'employee' => $employee\n ]);\n\n $secondManager = $this->em->getRepository(Manager::class)->findOneBy([\n 'employee' => $firstManager ? $firstManager->getManager() : null\n ]);\n\n return [\n $firstManager ? $firstManager->getManager() : null,\n $secondManager ? $secondManager->getManager() : null,\n null\n ];\n }", "protected function getSecurity_Authentication_ManagerService()\n {\n $this->services['security.authentication.manager'] = $instance = new \\Symfony\\Component\\Security\\Core\\Authentication\\AuthenticationProviderManager(array(0 => new \\Symfony\\Component\\Security\\Core\\Authentication\\Provider\\DaoAuthenticationProvider(${($_ = isset($this->services['fos_user.user_provider.username']) ? $this->services['fos_user.user_provider.username'] : $this->getFosUser_UserProvider_UsernameService()) && false ?: '_'}, ${($_ = isset($this->services['security.user_checker']) ? $this->services['security.user_checker'] : $this->getSecurity_UserCheckerService()) && false ?: '_'}, 'main', $this->get('security.encoder_factory'), true), 1 => new \\Symfony\\Component\\Security\\Core\\Authentication\\Provider\\AnonymousAuthenticationProvider('594831ac756863.97507592')), true);\n\n $instance->setEventDispatcher($this->get('event_dispatcher'));\n\n return $instance;\n }", "public function test_set_gateway_config()\n {\n\n $payumBuilder = m::spy('Payum\\Core\\PayumBuilder');\n $config = [\n 'gatewayConfigs' => [\n 'gatewayName' => [\n 'factory' => 'factory',\n 'username' => 'username',\n 'password' => 'password',\n ],\n 'gatewayName2' => [\n 'factory' => 'stdClass',\n 'username' => 'username',\n 'password' => 'password',\n ],\n ],\n 'storage.gatewayConfig' => 'eloquent',\n ];\n $app = m::spy('Illuminate\\Contracts\\Foundation\\Application');\n\n $gatewayConfig = m::spy('Recca0120\\LaravelPayum\\Model\\GatewayConfig');\n $gatewayFactory = m::spy('Payum\\Core\\GatewayFactoryInterface');\n\n /*\n |------------------------------------------------------------\n | Act\n |------------------------------------------------------------\n */\n\n $app->shouldReceive('make')->andReturn($gatewayConfig);\n\n $gatewayConfig\n ->shouldReceive('newQuery')->andReturnSelf()\n ->shouldReceive('get')->andReturnSelf()\n ->shouldReceive('all')->andReturn([$gatewayConfig])\n ->shouldReceive('getGatewayName')->once()->andReturn('fooGateway')\n ->shouldReceive('getFactoryName')->once()->andReturn('fooFactoryName')\n ->shouldReceive('getConfig')->once()->andReturn([\n 'foo' => 'bar',\n ]);\n\n $manager = new PayumBuilderManager($payumBuilder, $config, $app);\n\n /*\n |------------------------------------------------------------\n | Assert\n |------------------------------------------------------------\n */\n\n $manager->setGatewayConfig();\n\n foreach ($config['gatewayConfigs'] as $gatewayName => $gatewayConfig) {\n $payumBuilder->shouldReceive('addGatewayFactory')->with($gatewayName, m::on(function ($closure) use ($gatewayConfig, $gatewayFactory) {\n $closure($gatewayConfig, $gatewayFactory);\n\n return true;\n }));\n }\n }" ]
[ "0.6343053", "0.6185559", "0.60922706", "0.60772777", "0.6070378", "0.6070378", "0.5949157", "0.5914144", "0.59079576", "0.59040743", "0.5897192", "0.588894", "0.588894", "0.588894", "0.588894", "0.5882814", "0.5822005", "0.5812113", "0.5764868", "0.57554394", "0.57025963", "0.5653493", "0.56107545", "0.5582927", "0.5445462", "0.54343444", "0.54278576", "0.5410463", "0.5308187", "0.53079754", "0.5267959", "0.5267959", "0.5267959", "0.5259325", "0.52568495", "0.5242531", "0.52409124", "0.5204382", "0.51960474", "0.51786196", "0.51729244", "0.51692396", "0.51634693", "0.5162477", "0.515015", "0.5129378", "0.51227665", "0.5121603", "0.51179343", "0.5097747", "0.509688", "0.50954896", "0.5089643", "0.5088993", "0.5081509", "0.50795054", "0.5073416", "0.5066888", "0.50550187", "0.5053994", "0.50469", "0.5044745", "0.5038911", "0.5032029", "0.4996737", "0.4982402", "0.49793807", "0.49634287", "0.4961651", "0.4953833", "0.4951912", "0.4949736", "0.49369922", "0.49343345", "0.49190453", "0.49160722", "0.49152172", "0.4912318", "0.49045825", "0.49012163", "0.49002495", "0.48981062", "0.48954067", "0.4887588", "0.4887356", "0.4887356", "0.48840123", "0.48673183", "0.4856101", "0.48335257", "0.48333454", "0.48164955", "0.4808367", "0.4801358", "0.47913915", "0.4786929", "0.4785477", "0.47831184", "0.47790483", "0.47754315" ]
0.86300325
0
/ Smarty plugin File: outputfilter.highlight.php Type: outputfilter Name: highlight Version: 1.1 Date: Sep 18, 2003 Version: 1.0 Date: Aug 10, 2003 Purpose: Adds Googlecachelike highlighting for terms in a template after its rendered. This can be used easily integrated with the wiki search functionality to provide highlighted search terms. Install: Drop into the plugin directory, call $smarty>load_filter('output','highlight'); from application.
function smarty_outputfilter_highlight($source, &$smarty) { global $feature_referer_highlight; $highlight = $_REQUEST['highlight']; if(isset($feature_referer_highlight) && $feature_referer_highlight == 'y') { $refererhi = _refererhi(); if(isset($refererhi) && !empty($refererhi)) { if(isset($highlight) && !empty($highlight)) { $highlight = $highlight." ".$refererhi; } else { $highlight = $refererhi; } } } if (!isset($highlight) || empty($highlight)) { return $source; } $beginTag = '<!--HIGHLIGHT BEGIN-->'; $endTag = '<!--HIGHLIGHT END-->'; $beginPosition = strpos($source, $beginTag); $endPosition = strpos($source, $endTag); //return "beginPosition: $beginPosition<br/>endPosition: $endPosition<br/>" . ((!empty($beginPosition) && !empty($endPosition)) ? "ok" : "nao"); if (!empty($beginPosition) && !empty($endPosition)) { $begin = substr($source, 0, $beginPosition); $mid = substr($source, $beginPosition + strlen($beginTag), $endPosition - $beginPosition - strlen($beginTag)); $end = substr($source, $endPosition + strlen($endTag)); } else { // highlight não funciona mais sem as tags $beginTag e $endTag, pra evitar q ele seja chamado em vários níveis. return $source; } $source = ''; // save memory global $enlightPattern; $enlightPattern = _enlightColor($highlight); // set colors $mid = preg_replace_callback('/>([^<>]+)</', '_findMatch', $mid); $mid = preg_replace_callback("/tooltip\('[^']+?'\)/",'_fixTooltip', $mid); return $begin . $mid . $end; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function smarty_outputfilter_highlight($source, &$smarty) {\n\n $highlight = $_REQUEST['highlight'];\n\n if (isset($_GET['keywords'])) {\n $highlight .= oos_var_prep_for_os($_GET['keywords']);\n }\n\n $highlight = strip_tags($highlight);\n $sStrSize = strlen($highlight);\n\n if ($sStrSize <= 5) {\n return $source;\n }\n\n if (preg_match(oos_server_get_var('HTTP_HOST'), oos_server_get_var('HTTP_REFERER'))) {\n if (!isset($highlight) || empty($highlight)) {\n return $source;\n }\n } else {\n MyOOS_CoreApi::requireOnce('classes/class_referrer.php');\n $referrer = new referrer();\n $highlight .= $referrer->getKeywords();\n }\n\n $words = $highlight;\n if (!isset($highlight) || empty($highlight)) {\n return $source;\n }\n\n // Pull out the script blocks\n preg_match_all(\"!<script[^>]+>.*?</script>!is\", $source, $match);\n $_script_blocks = $match[0];\n $source = preg_replace(\"!<script[^>]+>.*?</script>!is\", '@@@=====@@@', $source);\n\n preg_match_all(\"!<a onmouseo[^>]+>.*!is\", $source, $match);\n $_onmouse_block = $match[0];\n $source = preg_replace(\"!<a onmouseo[^>]+>.*!is\", '@@@#=====#@@@', $source);\n\n // pull out all html tags\n preg_match_all(\"'<[\\/\\!]*?[^<>]*'si\", $source, $match);\n $_tag_blocks = $match[0];\n $source = preg_replace(\"'<[\\/\\!]*?[^<>]*'si\", '@@@:=====:@@@', $source);\n\n\n // This array is used to choose colors for supplied highlight terms\n $colorArr = array('#ffff66','#ff9999','#A0FFFF','#ff66ff','#99ff99');\n\n // Wrap all the highlight words with tags bolding them and changing\n // their background colors\n $wordArr = explode(\" \",addslashes($words));\n $i = 0;\n foreach($wordArr as $word) {\n $word = preg_quote($word);\n $source = preg_replace('~('.$word.')~si', '<span style=\"color:black;background-color:'.$colorArr[$i].';\">$1</span>', $source);\n $i++;\n }\n\n // replace script blocks\n foreach($_script_blocks as $curr_block) {\n $source = preg_replace(\"!@@@=====@@@!\",$curr_block,$source,1);\n }\n\n foreach($_onmouse_block as $curr_block) {\n $source = preg_replace(\"!@@@#=====#@@@!\",$curr_block,$source,1);\n }\n\n foreach($_tag_blocks as $curr_block) {\n $source = preg_replace(\"!@@@:=====:@@@!\",$curr_block,$source,1);\n }\n\n return $source;\n }", "function smarty_outputfilter_search_highlight($tpl_output, &$smarty)\r\n \r\n{\r\n $referrer = getenv('HTTP_REFERER');\r\n if (!empty($referrer)) {\r\n $pieces = parse_url($referrer);\r\n // only highlight search keywords if the user \r\n // is coming from google.com\r\n if (stristr($pieces['host'], 'google.com')) {\r\n $params = explode('&', $pieces['query']);\r\n $query = array();\r\n foreach ($params as $param) {\r\n list($key, $value) = explode('=', $param);\r\n $query[$key] = urldecode($value);\r\n }\r\n // only do something if we have actual \r\n // search keywords to play with\r\n if (!empty($query['q'])) {\r\n $tpl_output = smarty_modifier_google_highlight($tpl_output,\r\n $query['q']);\r\n }\r\n }\r\n }\r\n return $tpl_output;\r\n}", "function highlight()\n{\n // echo \"data coming from hooks\";\n // intercept output\n $CI =& get_instance();\n $data = $CI->output->get_output();\n // find the quote and make it an array of words!\n // substr(string,start,length) method // 16 is for p tag stuff\n $quote = substr($data, strpos($data, '<p class=\"lead\">') + 16,\n strpos($data, '</p>') - (strpos($data, '<p class=\"lead\">') + 16));\n // get all the required data into aaray form \n $newdata = explode(\" \", $quote);\n // create new array for updated quote\n $requiredoutput = array();\n // iterate all the words and add strong tag to them, if there is any capital word \n foreach($newdata as $word)\n {\n if( preg_match(\"/[A-Z]+/\", $word) )\n {\n $word = \"<strong>\" . $word . \"</strong>\";\n }\n $requiredoutput[] = $word;\n }\n // put everything together\n $newquote = implode(\" \", $requiredoutput);\n $newquote = '<p class=\"lead\">' . $newquote . '</p>';\n $data = preg_replace('#<p class=\"lead\">.+</p>#', $newquote, $data);\n // output the page!\n $CI->output->set_output($data);\n $CI->output->_display();\n}", "function decode_highlight_search_results( $text ) {\n if ( is_search() ) {\n \t$sr = get_search_query();\n\t\t$keys = implode( '|', explode( ' ', get_search_query() ) );\n\t\tif ($keys != '') { // Check for empty search, and don't modify text if empty\n\t\t\t$text = preg_replace( '/(' . $keys .')/iu', '<mark class=\"search-highlight\">\\0</mark>', $text );\n\t\t}\n }\n return $text;\n}", "function content_search_highlight( $text, $highlight )\n\t{\n\t\t//-----------------------------------------\n\t\t// INIT\n\t\t//-----------------------------------------\n\t\t\n\t\t$highlight = $this->parse_clean_value( urldecode( $highlight ) );\n\t\t$loosematch = strstr( $highlight, '*' ) ? 1 : 0;\n\t\t$keywords = str_replace( '*', '', str_replace( \"+\", \" \", str_replace( \"++\", \"+\", str_replace( '-', '', trim($highlight) ) ) ) );\n\t\t$keywords\t= str_replace( '\\\\', '&#092;', $keywords );\n\t\t$word_array = array();\n\t\t$endmatch = \"(.)?\";\n\t\t$beginmatch = \"(.)?\";\n\t\t\n\t\t//-----------------------------------------\n\t\t// Go!\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $keywords )\n\t\t{\n\t\t\tif ( preg_match(\"/,(and|or),/i\", $keywords) )\n\t\t\t{\n\t\t\t\twhile ( preg_match(\"/,(and|or),/i\", $keywords, $match) )\n\t\t\t\t{\n\t\t\t\t\t$word_array = explode( \",\".$match[1].\",\", $keywords );\n\t\t\t\t\t$keywords = str_replace( $match[0], '' ,$keywords );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ( strstr( $keywords, ' ' ) )\n\t\t\t{\n\t\t\t\t$word_array = explode( ' ', str_replace( ' ', ' ', $keywords ) );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$word_array[] = $keywords;\n\t\t\t}\n\t\t\t\n\t\t\tif ( ! $loosematch )\n\t\t\t{\n\t\t\t\t$beginmatch = \"(^|\\s|\\>|;)\";\n\t\t\t\t$endmatch = \"(\\s|,|\\.|!|<br|&|$)\";\n\t\t\t}\n\t\n\t\t\tif ( is_array($word_array) )\n\t\t\t{\n\t\t\t\tforeach ( $word_array as $keywords )\n\t\t\t\t{\n\t\t\t\t\tpreg_match_all( \"/{$beginmatch}(\".preg_quote($keywords, '/').\"){$endmatch}/is\", $text, $matches );\n\t\t\t\t\t\n\t\t\t\t\tfor ( $i = 0; $i < count($matches[0]); $i++ )\n\t\t\t\t\t{\n\t\t\t\t\t\t$text = str_replace( $matches[0][$i], $matches[1][$i].\"<span class='searchlite'>\".$matches[2][$i].\"</span>\".$matches[3][$i], $text );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $text;\n\t}", "function search_excerpt_highlight() {\n $excerpt = get_the_excerpt();\n $keys = implode('|', explode(' ', get_search_query()));\n $excerpt = preg_replace('/(' . $keys . ')/iu', '<strong class=\"search-highlight\">\\0</strong>', $excerpt);\n\n echo '<p>' . $excerpt . '</p>';\n}", "public function silo_highlights()\r\n\t{\r\n\t}", "public function silo_highlights()\n\t{\n\t}", "function crumble_stdHLight($atts, $content = null) {\r\n\treturn '<span class=\"highlight\">' . do_shortcode ( $content ) . '</span>';\r\n}", "public function highlightInfo ($term) {\n if (!(isset($this->begin_hi))) { $this->defineHighlight(count($term)); }\n if (isset($term[0])) {\n print \"<p align='center'>The following search terms have been highlighted: \";\n for ($i = 0; isset($term[$i]); $i++) {\n\t print \"&nbsp; \" . $this->begin_hi[$i] . htmlentities($term[$i]) . \"$this->end_hi &nbsp;\";\n }\n print \"</p>\";\n }\n }", "public function highlight($content, $conf) {\n\n\t\t$renderer = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance(\\TYPO3\\CMS\\Core\\Page\\PageRenderer::class);\n\t\t$highlightjs = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::getFileAbsFileName($conf['library']);\n\n\t\t// Case 1: server-side syntax highlighting\n \tif (isset($conf['enablev8js']) && ($conf['enablev8js'] == 1 || $conf['enablev8js'] == \"true\") && extension_loaded('v8js')) {\n\n\t\t\t$v8 = new \\V8Js();\n\t\t\t// Remove the surrounding <pre></pre> Tag, and extract the language from its class attribute\n\t\t\tpreg_match(\"/^<pre class=\\\"(.*)\\\">(.*)<\\/pre>$/im\", $content, $out);\n\t\t\t// Escape all double quote characters and all line breaks\n\t\t\t$language = $out[1];\n\t\t\t$source = html_entity_decode($out[2], ENT_HTML5);\n\t\t\t$source = str_replace(\"<br />\", \"\\\\n\", $source);\n\t\t\t$source = str_replace(\"\\\"\", \"\\\\\\\"\", $source);\n\t\t\t$jscode = array();\n\t\t\t$jscode[] = 'var global = global || this, self = self || this, window = window || this;';\n\t\t\t$jscode[] = file_get_contents($highlightjs);\n\t\t\t$jscode[] = 'var hljs = global.hljs;';\n\t\t\t$jscode[] = 'var sourceCode = \"' . $source . '\";';\n\t\t\t$jscode[] = \"var result = hljs.highlight('\" . $language . \"', sourceCode, true).value;\";\n\t\t\t$jscode[] = 'result;';\n\t\t\t// This is a dirty fix as RteHtmlArea escapes the & and I haven't found a way to avoid this\n\t\t\t$content = str_replace(\"&amp;\", \"&\", $v8->executeString(implode(\"\\n\", $jscode)));\n\t\t\t$content = '<pre class=\"hljs ' . $language . '\">' . $content . '</pre>';\n\n \t} else { // Case 2: client-side syntax highlighting\n\t\t\t$renderer->loadJquery();\n\t\t\t$renderer->addJsFooterFile(\\TYPO3\\CMS\\Core\\Utility\\PathUtility::getAbsoluteWebPath($highlightjs),\n\t\t \t\t'text/javascript', /* compress? */ false, false, '',\n\t\t\t\t/* excludeFromConcatenation? */ true, '|', /* async? */ false);//, /* integrity? */ 'sha256-b07457d8f5ce2d11be2d0b53a6f44416c5a1315bb60099e6cf1a66a2099d76d3');\n\t\t\t$renderer->addJsFooterInlineCode('jm_highlightjs',\n\t\t \t\t\"jQuery(document).ready(function() {\n \t\t\t\t\tjQuery('pre').each(function(i, block) {\n \t\t\t\t\thljs.highlightBlock(block);\n \t\t\t\t\t});\n\t\t\t\t});\");\n\t\t\t// Fix markup that comes from RteHtmlArea\n\t\t\t$content = str_replace(\"&amp;\", \"&\", $content);\n\t\t\t$content = str_replace(\"<br />\", \"\\n\", $content);\n \t}\n\n\t\t// Finally add CSS stylesheet as configured\n\t\t$url = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::getFileAbsFileName('EXT:jm_highlightjs/Resources/Public/CSS/default.css');\n\t\tif (isset($conf['stylesheet'])) {\n\t\t\t$url = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::getFileAbsFileName($conf['stylesheet']);\n\t\t}\n\t\t$renderer->addCssFile(\\TYPO3\\CMS\\Core\\Utility\\PathUtility::getAbsoluteWebPath($url),\n\t\t\t'stylesheet', 'all', '', false, false, '', true);\n\t\t// And configure tab-width to 4 characters\n\t\t$renderer->addCssInlineBlock('JensMittag\\JmHighlightjs\\Hooks\\HighlightingUserFunc', '.hljs { tab-size: 4; -moz-tab-size: 4; }', true);\n\n \treturn $content;\n \t}", "function sql_highlight(&$code)\n\n{\n\n $code = strtr($code, array('\"\"' => get_placeholder(9), \"''\" => get_placeholder(10)));\n\n $blocks = array(\n\n array(\n\n 'pattern' => \"#(['\\\"`])(\\\\\\\\\\\\\\\\|.*?([^\\\\\\\\]|[^\\\\\\\\](\\\\\\\\\\\\\\\\)+)|)\\\\1#se\",\n\n //'replacement' => 'parse_c_string(\\'$0\\', \\'sql\\', \\'|&quot;&quot;|\\\\\\'\\\\\\'\\')'\n\n //'pattern' => \"#(['\\\"])(.*?([^\\\\\\\\]|(\\\\\\\\\\\\\\\\)+)|)\\\\1#s\",\n\n 'prefix' => '<span class=\"sql_string\">', \n\n 'suffix' => '</span>'\n\n ),\n\n array(\n\n 'pattern' => \"#/\\\\*(.*?)\\\\*/#s\",\n\n 'prefix' => '<span class=\"sql_blockcomment\">', \n\n 'suffix' => '</span>'\n\n ),\n\n array(\n\n 'pattern' => \"#--(.*?)[\\n\\r]#\",\n\n 'prefix' => '<span class=\"sql_linecomment\">', \n\n 'suffix' => '</span>'\n\n ),\n\n );\n\n $secondaries = array(\n\n array(\n\n 'pattern' => '#(\\W|^)(\\.?[0-9][0-9a-zA-Z.]*)#i',\n\n 'replacement' => '<span class=\"sql_number\">$2</span>',\n\n 'keepprefix' => 1\n\n ),\n\n array(\n\n 'pattern' => '#([,\\[\\]\\{\\};=\\+\\-!%\\^&*\\(\\)<>|])#',\n\n 'prefix' => '<span class=\"sql_symbol\">',\n\n 'suffix' => '</span>'\n\n ),\n\n );\n\n \n\n $kw = array(\n\n array(\n\n 'prefix' => '<span '.get_placeholder(8).'=\"sql_keyword\">',\n\n 'suffix' => '</span>',\n\n 'keywords' => array('abs','absolute','access','acos','add','add_months','adddate','admin','after','aggregate','all','allocate','alter','and','any','app_name','are','array','as','asc','ascii','asin','assertion','at','atan','atn2','audit','authid','authorization','autonomous_transaction','avg','before','begin','benchmark','between','bfilename','bin','binary','binary_checksum','binary_integer','bit','bit_count','bit_and','bit_or','blob','body','boolean','both','breadth','bulk','by','call','cascade','cascaded','case','cast','catalog','ceil','ceiling','char','char_base','character','charindex','chartorowid','check','checksum','checksum_agg','chr','class','clob','close','cluster','coalesce','col_length','col_name','collate','collation','collect','column','comment','commit','completion','compress','concat','concat_ws','connect','connection','constant','constraint','constraints','constructorcreate','contains','containsable','continue','conv','convert','corr','corresponding','cos','cot','count','count_big','covar_pop','covar_samp','create','cross','cube','cume_dist','current','current_date','current_path','current_role','current_time','current_timestamp','current_user','currval','cursor','cycle','data','datalength','databasepropertyex','date','date_add','date_format','date_sub','dateadd','datediff','datename','datepart','day','db_id','db_name','deallocate','dec','declare','decimal','decode','default','deferrable','deferred','degrees','delete','dense_rank','depth','deref','desc','describe','descriptor','destroy','destructor','deterministic','diagnostics','dictionary','disconnect','difference','distinct','do','domain','double','drop','dump','dynamic','each','else','elsif','empth','encode','encrypt','end','end-exec','equals','escape','every','except','exception','exclusive','exec','execute','exists','exit','exp','export_set','extends','external','extract','false','fetch','first','first_value','file','float','floor','file_id','file_name','filegroup_id','filegroup_name','filegroupproperty','fileproperty','for','forall','foreign','format','formatmessage','found','freetexttable','from','from_days','fulltextcatalog','fulltextservice','function','general','get','get_lock','getdate','getansinull','getutcdate','global','go','goto','grant','greatest','group','grouping','having','heap','hex','hextoraw','host','host_id','host_name','hour','ident_incr','ident_seed','ident_current','identified','identity','if','ifnull','ignore','immediate','in','increment','index','index_col','indexproperty','indicator','initcap','initial','initialize','initially','inner','inout','input','insert','instr','instrb','int','integer','interface','intersect','interval','into','is','is_member','is_srvrolemember','is_null','is_numeric','isdate','isnull','isolation','iterate','java','join','key','lag','language','large','last','last_day','last_value','lateral','lcase','lead','leading','least','left','len','length','lengthb','less','level','like','limit','limited','ln','lpad','local','localtime','localtimestamp','locator','lock','log','log10','long','loop','lower','ltrim','make_ref','map','match','max','maxextents','mid','min','minus','minute','mlslabel','mod','mode','modifies','modify','module','month','months_between','names','national','natural','naturaln','nchar','nclob','new','new_time','newid','next','next_day','nextval','no','noaudit','nocompress','nocopy','none','not','nowait','null','nullif','number','number_base','numeric','nvl','nvl2','object','object_id','object_name','object_property','ocirowid','oct','of','off','offline','old','on','online','only','opaque','open','operator','operation','option','or','ord','order','ordinalityorganization','others','out','outer','output','package','pad','parameter','parameters','partial','partition','path','pctfree','percent_rank','pi','pls_integer','positive','positiven','postfix','pow','power','pragma','precision','prefix','preorder','prepare','preserve','primary','prior','private','privileges','procedure','public','radians','raise','rand','range','rank','ratio_to_export','raw','rawtohex','read','reads','real','record','recursive','ref','references','referencing','reftohex','relative','release','release_lock','rename','repeat','replace','resource','restrict','result','return','returns','reverse','revoke','right','rollback','rollup','round','routine','row','row_number','rowid','rowidtochar','rowlabel','rownum','rows','rowtype','rpad','rtrim','savepoint','schema','scroll','scope','search','second','section','seddev_samp','select','separate','sequence','session','session_user','set','sets','share','sign','sin','sinh','size','smallint','some','soundex','space','specific','specifictype','sql','sqlcode','sqlerrm','sqlexception','sqlstate','sqlwarning','sqrt','start','state','statement','static','std','stddev','stdev_pop','strcmp','structure','subdate','substr','substrb','substring','substring_index','subtype','successful','sum','synonym','sys_context','sys_guid','sysdate','system_user','table','tan','tanh','temporary','terminate','than','then','time','timestamp','timezone_abbr','timezone_minute','timezone_hour','timezone_region','to','to_char','to_date','to_days','to_number','to_single_byte','trailing','transaction','translate','translation','treat','trigger','trim','true','trunc','truncate','type','ucase','uid','under','union','unique','unknown','unnest','update','upper','usage','use','user','userenv','using','validate','value','values','var_pop','var_samp','varchar','varchar2','variable','variance','varying','view','vsize','when','whenever','where','with','without','while','with','work','write','year','zone')\n\n )\n\n );\n\n $code = generic_highlight($code, $blocks, $secondaries, array(), $kw);\n\n // put escapes back in\n\n return strtr($code, array(get_placeholder(9) => '<span class=\"sql_string\">&quot;&quot;</span>', get_placeholder(10) => '<span class=\"sql_string\">\\'\\'</span>'));\n\n}", "private function defineHighlight ($num) {\n $this->begin_hi = array();\n // strings for highlighting search terms \n for ($i = 0; $i < $num; $i++) {\n $this->begin_hi[$i] = \"<span class='term\" . ($i + 1) . \"'>\";\n }\n }", "function highlight_this($text, $words)\n\t{\n\t\t$words = trim($words);\n\t\t$the_count = 0;\n\t\t$wordsArray = explode(' ', $words);\n\t\t\tforeach($wordsArray as $word) {\n\t\t\t if(strlen(trim($word)) != 0)\n\t\t\t\n\t\t\t //exclude these words from being replaced\n\t\t\t $exclude_list = array(\"word1\", \"word2\", \"word3\");\n\t\t\t// Check if it's excluded\n\t\t\tif($word!=\"\")\n\t\t\t{\n\t\t\tif ( in_array( strtolower($word), $exclude_list ) ) {\n\t \n\t\t\t} else {\n\t\t\t\t//$text = str_replace($word, \"<span class=\\\"highlight\\\">\".$word.\"</span>\", $text, $count);\n\t\t//\t\t$text = str_replace($word, \"<span class=\\\"highlight\\\">\".$word.\"</span>\", $text);\n\t\t\t\t$text = preg_replace ( \"/\".$word.\"/i\", \"<span class=\\\"highlight\\\">\".$word.\"</span>\", $text );\n\t\t\t\t//$the_count = $count + $the_count;\n\t\t\t\t}\n\t\t\t}\n\t\t\t \n\t\t}\n\t\t//added to show how many keywords were found\n\t\t//echo \"<br><div class=\\\"emphasis\\\">A search for <strong>\" . $words. \"</strong> found <strong>\" . $the_count . \"</strong> matches within the \" . $the_place. \".</div><br>\";\n\t \n\t\treturn $text;\n\t}", "function tep_find_and_highlight($source_string, $search_keywords){\n\t$changed = false;\n\t$lower_string = strtolower($source_string);\n\t$position_array = array();\n\tfor ($i = 0, $n = strlen($lower_string); $i < $n; $i++) {\n\t\t$position_array[$i] = 0;\n\t}\n\tfor ($i = 0, $n = sizeof($search_keywords); $i < $n; $i++) {\n\t\t$length_keywords = strlen($search_keywords[$i]);\n\t\tif ($length_keywords > 0) {\n\t\t\t$keyword = strtolower($search_keywords[$i]);\n\t\t\t$curr_position = 0;\n\t\t\tdo {\n\t\t\t\t$str_pos = strpos ($lower_string, $keyword, $curr_position);\n\t\t\t\tif ($str_pos !== false){\n\t\t\t\t\tfor ($j = $str_pos, $m = $str_pos + $length_keywords; $j < $m; $j++) {\n\t\t\t\t\t\t$position_array[$j] = 1;\n\t\t\t\t\t}\n\t\t\t\t\t$curr_position = $str_pos + $length_keywords;\n\t\t\t\t\t$changed = true;\n\t\t\t\t}\n\t\t\t} while ($str_pos !== false);\n\t\t}\n\t}\n\tif ($changed == true) {\n\t\t$open_tag = false;\n\t\t$result_string = '';\n\t\tfor ($i = 0, $n = sizeof($position_array); $i < $n; $i++) {\n\t\t\tif ($position_array[$i] == 1) {\n\t\t\t\tif ($open_tag == false) {\n\t\t\t\t\t$result_string .= '<span style=\"color:red;font-weight:bold;\">';\n\t\t\t\t\t$open_tag = true;\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\tif ($open_tag == true) {\n\t\t\t\t\t$result_string .= '</span>';\n\t\t\t\t\t$open_tag = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$result_string .= $source_string{$i};\n\t\t}\n\t\tif ($open_tag == true) { $result_string .= '</span>'; }\n\t\treturn $result_string;\n\t}else {\n\t\treturn $source_string;\n\t}\n}", "private function formatResultsAsHtml($search_string,$results,$highlighting=True){\r\n\t\t\tglobal $web_app_page_post_back_name;\r\n\t\t\tglobal $url_rest_node_param;\r\n\t\t\tglobal $search_index_structure_combined_attributes;\r\n\t\t\tglobal $search_index_structure_perspective;\r\n\t\t\t\r\n\t\t\t$html = \"<div class=\\\"search_result_heading\\\">\\n\";\r\n\t\t\t$html = $html . \"Search results for: <font class=\\\"search_phrase\\\">\" . htmlspecialchars($search_string) . \"</font><br />\\n\";\r\n\t\t\t$html = $html . \"</div><br />\\n\";\r\n\t\t\t\r\n\t\t\tif(count($results) > 0){\r\n\t\t\t\tforeach($results as $key => $value){\r\n\t\t\t\t\t$html = $html . \"<table class=\\\"search_result_item\\\">\\n\";\r\n\t\t\t\t\t$html = $html . \"<tr><td class=\\\"search_result_item\\\">\\n\";\r\n\t\t\t\t\t$html = $html . \"<a href=\\\"$web_app_page_post_back_name?$url_rest_node_param=\". urlencode($key) . \"\\\">\\n\";\r\n\t\t\t\t\t//$html = $html . $results[$key][\"name\"];\r\n\t\t\t\t\t//$display_name = preg_replace('/\\//',' ',$key);\r\n\t\t\t\t\t//$html = $html . $display_name;\r\n\t\t\t\t\t//$html = $html . $key;\r\n\t\t\t\t\tif(isset($value[$search_index_structure_perspective])){\r\n\t\t\t\t\t\t$html = $html . strtoupper($value[$search_index_structure_perspective]) . \" - \" . $key;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$html = $html . $key;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$html = $html . \"</a></td></tr>\\n\";\r\n\t\t\t\t\t$html = $html . \"<tr><td class=\\\"search_result_content\\\">\";\r\n\t\t\t\t\t//$html = $html . $results[$key][\"matched\"];\r\n\t\t\t\t\t//$highlight = $this->highlightHtml($search_string,$value);\r\n\t\t\t\t\t$highlight = $this->highlightHtml($search_string,htmlspecialchars($value[$search_index_structure_combined_attributes]));\r\n\t\t\t\t\t//$broken_apart = $this->trimHighlightedHtml($highlight);\r\n\t\t\t\t\t//$html = $html . \"$value\";\r\n\t\t\t\t\t$html = $html . \"$highlight\";\r\n\t\t\t\t\t$html = $html . \"</td></tr>\\n\";\r\n\t\t\t\t\t$html = $html . \"</table>\\n<br />\";\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\r\n\t\t\t\t$html = $html . \"<table class=\\\"search_result_item\\\">\\n\";\r\n\t\t\t\t$html = $html . \"<tr><td class=\\\"search_result_item\\\">Nothing found</td></tr>\\n\";\r\n\t\t\t\t$html = $html . \"</table>\\n<br />\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\treturn $html;\r\n\t\t}", "function highlight($text, $expression, $highlight) {\n if (!$highlight || !$expression)\n {\n return $text;\n }\n \n if (is_array($expression) && (count($expression) == 0) )\n {\n return $text;\n }\n \n // add a tag in front (is needed for preg_match_all to work correct)\n $text = '<!--h-->' . $text;\n \n // split the HTML up so we have HTML tags\n // $matches[0][i] = HTML + text\n // $matches[1][i] = HTML\n // $matches[2][i] = text\n\t$matches = array();\n preg_match_all('/(<[^>]+>)([^<>]*)/', $text, $matches);\n \n // throw it all together again while applying the highlight to the text pieces\n $result = '';\n $count_matches = count($matches[2]);\n for ($i = 0; $i < $count_matches; $i++) {\n if ($i != 0)\n {\n $result .= $matches[1][$i];\n }\n \n if (is_array($expression) )\n {\n foreach ($expression as $regex)\n {\n if ($regex)\n {\n $matches[2][$i] = @preg_replace(\"#\".$regex.\"#i\", $highlight, $matches[2][$i]);\n }\n }\n \n $result .= $matches[2][$i];\n }\n else\n {\n $result .= @preg_replace(\"#\".$expression.\"#i\", $highlight, $matches[2][$i]);\n }\n }\n \n return $result;\n}", "function wrapHTMLHighlight($text, $additionalClasses = \"\") {\n\t\treturn wrapHTMLSpan($text, \"dgNPCHighlight \".$additionalClasses);\t\n}", "public function highlightMatches(string $query, string $text): string\n\t{\n\t\t$queryWords = str_word_count($query, 1, implode('', $this->specialChars));\n\t\t$snippetWords = str_word_count(str_replace('-', ' ', $text), 1, implode('', $this->specialChars));\n\t\t$replaces = [];\n\t\tforeach ($queryWords as $word) {\n\t\t\tforeach ($snippetWords as $snippetWord) {\n\t\t\t\t// case-insensitive matching. accent-insensitive matching\n\t\t\t\tif (strtolower(str_replace($this->specialChars, $this->specialReplaces, $word)) ===\n\t\t\t\t\tstrtolower(str_replace($this->specialChars, $this->specialReplaces, $snippetWord))) {\n\t\t\t\t\t$replaces['/\\b' . preg_quote($snippetWord, '/') . '\\b/'] = str_replace('%word%', $snippetWord, $this->highlightTemplate);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn preg_replace(array_keys($replaces), array_values($replaces), $text);\n\t}", "static function highlight( $text, $words ) {\n\t\t$highlighted = preg_filter( '/' . preg_quote( $words ) . '/i', '<strong class=\"highlight\">$0</strong>', $text );\n\n\t\tif ( ! empty( $highlighted ) ) {\n\t\t\t$text = $highlighted;\n\t\t}\n\n\t\treturn $text;\n\t}", "public function highlight_line() {\n\t\t$str = \"\";\n\n\t\tforeach ($this->def_json[\"highlights\"] as $provider => $val) {\n\t\t\t$hl = array(\n\t\t\t\t\"type\" => $provider,\n\t\t\t\t\"icon\" => \"\",\n\t\t\t\t\"url\" => \"\");\n\n\t\t\t// Create a simple definition for the highlight based on the provider.\n\t\t\tif ($provider == \"github\") {\n\t\t\t\t$hl[\"icon\"] = \"fab fa-github\";\n\t\t\t\t$hl[\"url\"] = \"http://github.com/$val\";\n\t\t\t} else if ($provider == \"tindie\") {\n\t\t\t\t$hl[\"icon\"] = \"fas fa-shopping-cart\";\n\t\t\t\t$hl[\"url\"] = \"https://www.tindie.com/products/$val/\";\n\t\t\t} else if ($provider == \"news\") {\n\t\t\t\t$hl[\"icon\"] = \"far fa-newspaper\";\n\t\t\t\t$hl[\"url\"] = $val;\n\t\t\t}\n\n\t\t\t$str .= Builder::root(\"a\", array(\"href\" => $hl[\"url\"]),\n\t\t\t\tBuilder::child(\"i\", array(\"class\" => $hl[\"icon\"]), \"\")\n\t\t\t)->saveHTML();\n\t\t}\n\n\t\treturn $str;\n\t}", "function _highlightText($text = '') \n {\n if ($text == '')\n return '';\n $str = $text;\n\n $str = str_replace(\"\\2\", $this->hlbeg, $str);\n $str = str_replace(\"\\3\", $this->hlend, $str);\n return $str;\n }", "function vb_highlight(&$code)\n\n{\n\n $code = str_replace('\"\"', get_placeholder(10), $code);\n\n $blocks = array(\n\n array(\n\n 'pattern' => '#\".+?\"#',\n\n 'prefix' => '<span class=\"vb_string\">', \n\n 'suffix' => '</span>'\n\n ),\n\n array(\n\n 'pattern' => \"#'.*#\",\n\n 'prefix' => '<span class=\"vb_comment\">', \n\n 'suffix' => '</span>'\n\n ),\n\n );\n\n \n\n $secondaries = array(\n\n array(\n\n 'pattern' => '!([\\n\\r]|^)\\s*?#.*!',\n\n 'prefix' => '<span class=\"vb_preprocessor\">',\n\n 'suffix' => '</span>'\n\n ),\n\n array(\n\n 'pattern' => '!(\\W|^)(\\.?[0-9][0-9.]*|&[hH][0-9a-fA-F]*)!',\n\n 'replacement' => '<span class=\"vb_number\">$2</span>',\n\n 'keepprefix' => 1\n\n ),\n\n array(\n\n 'pattern' => '~[,=\\+\\-!%\\^&\\*\\(\\)\\<\\>#$|]~',\n\n 'prefix' => '<span class=\"vb_symbol\">',\n\n 'suffix' => '</span>'\n\n )\n\n );\n\n \n\n $kw = array(\n\n array(\n\n 'prefix' => '<span '.get_placeholder(8).'=\"vb_keyword\">',\n\n 'suffix' => '</span>',\n\n 'keywords' => array('addhandler','addressof','andalso','alias','and','ansi','as','assembly','attribute','auto','begin','call','case','catch','cbool','cbyte','cchar','cdate','cdec','cdbl','char','cint','class','clng','cobj','compare','const','continue','cshort','csng','cstr','ctype','declare','default','delegate','dim','do','each','else','elseif','end','erase','error','event','exit','explicit','finally','for','friend','function','get','gettype','global','gosub','goto','handles','if','implement','implements','imports','in','inherits','interface','is','let','lib','like','load','loop','lset','me','mid','mod','module','mustinherit','mustoverride','mybase','myclass','namespace','new','next','not','nothing','notinheritable','notoverridable','on','open','option','or','orelse','overloads','overridable','overrides','paramarray','preserve','property','raiseevent','readonly','redim','rem','removehandler','rset','resume','return','select','set','shadows','shared','step','stop','structure','sub','synclock','then','throw','to','try','typeof','unload','unicode','until','wend','when','while','with','withevents','writeonly','xor')\n\n ),\n\n array(\n\n 'prefix' => '<span '.get_placeholder(8).'=\"vb_type\">',\n\n 'suffix' => '</span>',\n\n 'keywords' => array('boolean','byref','byte','byval','currency','date','decimal','double','enum','false','integer','long','object','optional','private','protected','public','short','single','static','string','true','type','variant')\n\n ),\n\n );\n\n $code = generic_highlight($code, $blocks, $secondaries, array(), $kw);\n\n // put escapes back in\n\n return str_replace(get_placeholder(10), '<span class=\"vb_string\">&quot;&quot;</span>', $code);\n\n}", "public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }", "public function getHighlighting()\n {\n return $this->result->getHighlighting();\n }", "private function highlightsearchterms($text, $keywords) {\n\t\t\treturn preg_replace('/('.implode('|', $keywords).')/i', '<strong class=\"wpus-highlight\">$0</strong>', $text);\n\t\t}", "function php_highlight(&$code)\n\n{\n\n if(preg_match('#^(\\s*)(\\<\\?(php|))#i', $code, $open_tag, PREG_OFFSET_CAPTURE))\n\n {\n\n $code = substr($code, strlen($open_tag[0][0]));\n\n $open_tag = $open_tag[1][0].'<span class=\"php_tag\">'.htmlspecialchars($open_tag[2][0]).'</span>';\n\n }\n\n if(preg_match('#(\\?\\>)(\\s*)$#', $code, $end_tag, PREG_OFFSET_CAPTURE))\n\n {\n\n $code = substr($code, 0, -strlen($end_tag[0][0]));\n\n $end_tag = '<span class=\"php_tag\">'.htmlspecialchars($end_tag[1][0]).'</span>'.$end_tag[2][0];\n\n }\n\n \n\n $blocks = array(\n\n array(\n\n 'pattern' => '#\\?\\>(.*?)(\\<\\?(php()|(\\s))|($()))#ise',\n\n 'replacement' => '\\'<span class=\"php_tag\">?&gt;</span>\\'.block_background(html_highlight(str_replace(\\'\\\\\\\\\\\\\\\\\"\\', \\'\"\\',\\'$1\\')), \\'php_html\\').\\'<span class=\"php_tag\">\\'.htmlspecialchars(\\'$2\\').\\'</span>\\'',\n\n 'keepsuffix' => 4\n\n ),\n\n array(\n\n 'pattern' => \"#'\".GENERAL_BACKSLASH_ESC_PREG.\"'#se\",\n\n 'replacement' => 'parse_php_string_simple(\\'$0\\')',\n\n //'prefix' => '<span class=\"php_string\">', \n\n //'suffix' => '</span>'\n\n ),\n\n array(\n\n 'pattern' => '#\"'.GENERAL_BACKSLASH_ESC_PREG.'\"#se',\n\n 'replacement' => '\\'<span class=\"php_string_d\">&quot;\\'.parse_php_string(\\'$1\\').\\'&quot;</span>\\''\n\n ),\n\n array(\n\n 'pattern' => \"#\\<\\<\\<(.+?)([\\n\\r])(.*?)([\\n\\r]\\\\1)#se\",\n\n 'replacement' => '\\'<span class=\"php_string_h\">&lt;&lt;&lt;$1$2\\'.parse_php_string(\\'$3\\').\\'$4</span>\\''\n\n ),\n\n array(\n\n 'pattern' => \"#/\\\\*(.*?)\\\\*/#s\",\n\n 'prefix' => '<span class=\"php_blockcomment\">', \n\n 'suffix' => '</span>'\n\n ),\n\n array(\n\n 'pattern' => \"#//(.*?)[\\n\\r]#\",\n\n 'prefix' => '<span class=\"php_linecomment\">', \n\n 'suffix' => '</span>'\n\n ),\n\n );\n\n \n\n $secondaries = array(\n\n array(\n\n 'pattern' => '#(\\W|^)(\\.?[0-9][0-9a-zA-Z.]*)#',\n\n 'replacement' => '<span class=\"php_number\">$2</span>',\n\n 'keepprefix' => 1\n\n ),\n\n array(\n\n 'pattern' => '#([,\\[\\]\\{\\};=\\+\\-!%\\^&\\*\\(\\)<>|@.~])#',\n\n 'prefix' => '<span class=\"php_symbol\">',\n\n 'suffix' => '</span>'\n\n ),\n\n array(\n\n 'pattern' => '#\\$[a-zA-Z_][a-zA-Z0-9_]*#',\n\n 'prefix' => '<span class=\"php_var\">',\n\n 'suffix' => '</span>'\n\n )\n\n );\n\n \n\n $kw = array(\n\n array(\n\n 'prefix' => '<span '.get_placeholder(8).'=\"php_keyword\">',\n\n 'suffix' => '</span>',\n\n 'keywords' => array('and','or','xor','__file__','__line__','array','as','break','case','cfunction','class','const','continue','declare','default','die','do','echo','else','elseif','empty','enddeclare','endfor','endforeach','endif','endswitch','endwhile','eval','exit','extends','for','foreach','function','global','if','include','include_once','isset','list','new','old_function','print','require','require_once','return','static','switch','unset','use','var','while','__function__','__class__','php_version','php_os','default_include_path','pear_install_dir','pear_extension_dir','php_extension_dir','php_bindir','php_libdir','php_datadir','php_sysconfdir','php_localstatedir','php_config_file_path','php_output_handler_start','php_output_handler_cont','php_output_handler_end','e_error','e_warning','e_parse','e_notice','e_core_error','e_core_warning','e_compile_error','e_compile_warning','e_user_error','e_user_warning','e_user_notice','e_all','true','false','bool','boolean','int','integer','float','double','real','string','array','object','resource','null','class','extends','parent','stdclass','directory','__sleep','__wakeup','interface','implements','abstract','public','protected','private')\n\n )\n\n );\n\n $code = generic_highlight($code, $blocks, $secondaries, array(), $kw);\n\n // put back end/start tags if necessary\n\n if(isset($open_tag) && is_string($open_tag))\n\n $code = $open_tag.$code;\n\n if(isset($end_tag) && is_string($end_tag))\n\n $code .= $end_tag;\n\n \n\n return $code;\n\n}", "function HighlightCodeSnippet($t,$bg=true) {\r\n $t = \"<?php $t?>\";\r\n ob_start();\r\n highlight_string($t);\r\n $t = ob_get_contents();\t\r\n ob_end_clean();\r\n $t=str_replace('&lt;?php&nbsp;','',$t);\r\n $t=str_replace('?&gt;','',$t);\r\n if( $bg ) {\r\n\t$t = \"<div style=\\\"background-color:#E6E6E6;font-family:courier new;font-size:85%;font-weight:bold;\\\"><b>$t</b></div>\";\r\n }\r\n else {\r\n\t$t = \"<span style=\\\"font-family:courier;font-size:85%;font-weight:bold;\\\">$t</span>\";\r\n }\r\n return $t;\r\n}", "function getHighlightedContent($results, $id) {\n foreach($results as $result) {\n if( $result->id == $id ) {\n $str = strip_tags($result->content);\n //echo $str . \"<br /><br />\";\n $str = '...' . str_replace(\"#TERM#\", \"<strong>\", $str);\n $str = str_replace(\"#/TERM#\", \"</strong>\", $str);\n $str = str_replace(\"#BREAK#\", \"<br />...\", $str);\n return $str;\n }\n }\n }", "function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}", "function AbbcSyntaxHighlight($text, $incode = false)\r\n{\r\n\tglobal $ABBC;\r\n\r\n\t// Syntax Highlighting using the GeSHi class\r\n\t$lang = '';\r\n\tif ($incode) $lang = $incode;\r\n\tif ($lang == 'html') $lang = 'html4strict';\r\n\tif ($lang == 'js') $lang = 'javascript';\r\n\r\n#\tif ($lang == 'html4strict') $lang = ''; // Doesn't work right now\r\n#\tif ($lang == 'xml') $lang = ''; // Doesn't work right now\r\n\r\n\tif ($lang != '')\r\n\t{\r\n\t\t$text = str_replace('&#x24;', '$', $text);\r\n\r\n\t\t$geshi = new GeSHi(AbbcH2T($text), $lang);\r\n\t\t$geshi->set_header_type(GESHI_HEADER_DIV);\r\n\t\t$geshi->enable_line_numbers(GESHI_FANCY_LINE_NUMBERS, 2);\r\n\t\t$geshi->set_line_style('', '');\r\n\t\t$geshi->set_line_class('cont even', 'cont odd');\r\n\t\t#$geshi->start_line_numbers_at(1);\r\n\t\t#$geshi->enable_classes();\r\n\t\t#$geshi->get_stylesheet(false);\r\n\t\t$geshi->set_tab_width(4);\r\n\t\t$geshi->set_link_styles(GESHI_LINK, 'border-bottom: dotted 1px blue;');\r\n\t\t$geshi->set_link_styles(GESHI_HOVER, '');\r\n\t\t$geshi->set_link_styles(GESHI_ACTIVE, '');\r\n\t\t$geshi->set_link_styles(GESHI_VISITED, 'border-bottom: dotted 1px blue;');\r\n\r\n\t\t$geshi->set_overall_class('');\r\n\t\t$geshi->set_overall_style('');\r\n\t\t$geshi->set_code_style('');\r\n\t\t$geshi->set_keyword_group_style(1, 'color: blue;');\r\n\t\t$geshi->set_keyword_group_style(2, 'color: blue;');\r\n\t\t$geshi->set_keyword_group_style(3, 'color: darkblue;');\r\n\t\t$geshi->set_keyword_group_style(4, 'color: blue;');\r\n\t\t$geshi->set_comments_style(1, 'color: gray;');\r\n\t\t$geshi->set_comments_style(2, 'color: gray;');\r\n\t\t$geshi->set_comments_style('MULTI', 'color: gray;');\r\n\t\t$geshi->set_escape_characters_style('color: #800080;');\r\n\t\t$geshi->set_symbols_style('color: red;');\r\n\t\t$geshi->set_strings_style('color: darkcyan;');\r\n\t\t$geshi->set_numbers_style('color: darkcyan;');\r\n\t\t$geshi->set_methods_style(1, 'color: black;');\r\n\t\t$geshi->set_methods_style(2, 'color: black;');\r\n\t\tif (in_array($lang, array('perl', 'php')))\r\n\t\t\t$geshi->set_regexps_style(0, 'color: black;'); // make $-variables black\r\n\r\n\t\t// TODO: this should really be handled by the GeSHi library\r\n\t\tif ($geshi->error != GESHI_ERROR_NO_SUCH_LANG)\r\n\t\t{\r\n\t\t\t$text = $geshi->parse_code();\r\n\t\t\t$text = str_replace(\"\\n\", \"\\r\", $text);\r\n\t\t\t$text = str_replace('<br />', '', $text);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// For unrecognised languages, use default processing for now\r\n\t\t\t$lines = explode(endl, $text);\r\n\t\t\tforeach ($lines as $no => $line)\r\n\t\t\t{\r\n\t\t\t\t$cls = $no % 2 == 0 ? 'cont even' : 'cont odd';\r\n\t\t\t\t$lines[$no] = '<div class=\"' . $cls . '\">' . rtrim($line) . '</div>';\r\n\t\t\t}\r\n\t\t\t$text = join(\"\\r\", $lines);\r\n\t\t}\r\n\t}\r\n\telseif ($ABBC['Config']['subsets'] & ABBC_PARAGRAPH)\r\n\t{\r\n\t\t$text = str_replace(\"\\n\", '&#x0A;', $text);\r\n\t}\r\n\treturn $text;\r\n}", "protected function processGlossary()\n {\n preg_match_all('/(@@)(|&nbsp;)(.){2,64}(|&nbsp;)(@@)/', self::$content, $matches, PREG_SET_ORDER);\n\n foreach ($matches as $match) {\n $filter_expression = $match[0];\n\n // get the expression without leading and trailing @@\n $filter_string = trim(str_ireplace(array('@@', '&nbsp;'), array('', ' '), $filter_expression));\n if (empty($filter_string)) {\n // nothing to do ...\n self::$content = str_replace($filter_expression, $filter_string, self::$content);\n continue;\n }\n\n if (substr_count($filter_string, '|') === 1) {\n list($text, $search) = explode('|', $filter_string);\n $text = trim($text);\n $search = strtolower($search);\n $search = trim($search);\n }\n else {\n $text = $filter_string;\n $search = strtolower($filter_string);\n }\n $search = $this->app['utils']->specialCharsToAsciiChars($search, true);\n\n if (false !== ($content_id = $this->GlossaryData->existsUnique($search))) {\n\n if (false !== ($glossary = $this->GlossaryData->selectContentIdForFilter($content_id))) {\n if (!in_array($glossary['status'], array('PUBLISHED', 'BREAKING'))) {\n // can't show this explanation\n $replacement = str_replace('{text}', $text,\n self::$config['glossary']['filter']['replacement']['inactive']['html']);\n self::$content = str_replace($filter_expression, $replacement, self::$content);\n }\n else {\n switch ($glossary['glossary_type']) {\n case 'ABBREVIATION':\n $template = self::$config['glossary']['filter']['replacement']['abbreviation']['html'];\n break;\n case 'ACRONYM':\n $template = self::$config['glossary']['filter']['replacement']['acronym']['html'];\n break;\n case 'KEYWORD':\n $template = self::$config['glossary']['filter']['replacement']['keyword']['html'];\n break;\n default:\n $template = null;\n $this->app['monolog']->addDebug(\"[filter:Glossary] Unknown glossary type {$glossary['glossary_type']} for flexContent ID $content_id.\");\n break;\n }\n if (!is_null($template)) {\n // create the term\n $replacement = str_replace(array('{text}', '{explain}'),\n array($text, strip_tags($glossary['teaser'])), $template);\n if (!empty($glossary['redirect_url'])) {\n // add a redirect URL to the term\n $replacement = str_replace(array('{url}', '{target}', '{replacement}'),\n array($glossary['redirect_url'], $glossary['redirect_target'], $replacement),\n self::$config['glossary']['filter']['replacement']['link']['html']);\n }\n elseif (!empty($glossary['content'])) {\n // add a permanent link to the term\n $permalink_base_url = CMS_URL.str_ireplace('{language}', strtolower($glossary['language']), self::$config['content']['permalink']['directory']);\n $replacement = str_replace(array('{url}', '{target}', '{replacement}'),\n array($permalink_base_url.'/'.$glossary['permalink'], '_self', $replacement),\n self::$config['glossary']['filter']['replacement']['link']['html']);\n }\n self::$content = str_replace($filter_expression, $replacement, self::$content);\n }\n }\n }\n\n }\n else {\n // there exists no entry - indicate the entry\n $replacement = str_replace(\n array('{title}', '{text}'),\n array(\n $this->app['translator']->trans(self::$config['glossary']['filter']['replacement']['not_exists']['title'],\n array('{search}' => $search)),\n $text\n ),\n self::$config['glossary']['filter']['replacement']['not_exists']['html']);\n self::$content = str_replace($filter_expression, $replacement, self::$content);\n }\n }\n // return the parsed content\n return self::$content;\n }", "public function highlight($string) {\n\t\t// cache comments\n\t\t$string = $this->cacheComments($string);\n\t\t\n\t\t// cache quotes\n\t\t$string = $this->cacheQuotes($string);\n\t\t\n\t\t// encode html\n\t\t$string = StringUtil::encodeHTML($string);\n\t\t\n\t\t// do highlight\n\t\t$string = $this->highlightOperators($string);\n\t\t$string = $this->highlightKeywords($string);\n\t\t$string = $this->highlightNumbers($string);\n\t\t\n\t\t// insert and highlight quotes\n\t\t$string = $this->highlightQuotes($string);\n\t\t\n\t\t// insert and highlight comments\n\t\t$string = $this->highlightComments($string);\n\t\t\n\t\treturn $string;\n\t}", "public function highlight($text, array $options = []);", "public function getHighlights(){\n if($this->_highlights){\n return $this->_resultset->getHighlighting();\n }\n }", "public function highlight(string $subject): string\n {\n if ($this->search !== null) {\n $pattern = '/' . preg_quote($this->search, '/') . '/ui';\n $replacement = '<mark>$0</mark>';\n $subject = preg_replace($pattern, $replacement, $subject);\n }\n return $subject;\n }", "private function highlight($excerpt, $term) \n {\n $text = preg_filter('/' . preg_quote($term, '/') . '/i', '<red>$0</>', $excerpt);\n \n if (!empty($text)) {\n $excerpt = $text;\n }\n\n return $excerpt;\n }", "protected function getHighlight()\n {\n return [\n 'pre_tags' => ['<em class=\"highlight\">'],\n 'post_tags' => ['</em>'],\n 'fields' => [\n 'name' => [\n 'number_of_fragments' => 0,\n ],\n 'description' => [\n 'number_of_fragments' => 0,\n ],\n ],\n ];\n }", "function getAllHighlightClasses()\n\t{\n\t\tglobal $lng;\n\t\t\n\t\treturn array(\n\t\t\tself::HLCL_ACCENTED => $lng->txt(\"cont_accented\"),\n\t\t\tself::HLCL_LIGHT => $lng->txt(\"cont_light\"),\n\t\t\tself::HLCL_DARK => $lng->txt(\"cont_dark\"),\n\t\t);\n\t}", "public function highlight($text, $role, $format)\n {\n if ($format == 'troff') {\n return \"\\n.PP\\n.nf\\n\"\n . str_replace(\"\\\\\", \"\\\\\\\\\", trim($text))\n . \"\\n.fi\";\n } else if ($format != 'xhtml') {\n return $text;\n }\n\n if ($role == 'php') {\n try {\n return strtr(highlight_string($text, 1), [\n '&nbsp;' => ' ',\n \"\\n\" => '',\n ]);\n } catch (\\ParseException $e) {\n v(\"Parse error while highlighting PHP code: %s\\nText: %s\", (string) $e, $text, E_USER_WARNING);\n\n return '<pre class=\"'. ($role ? $role . 'code' : 'programlisting') .'\">'\n . htmlspecialchars($text, ENT_QUOTES, 'UTF-8')\n . \"</pre>\\n\";\n }\n } else {\n return '<pre class=\"'. ($role ? $role . 'code' : 'programlisting') .'\">'\n . htmlspecialchars($text, ENT_QUOTES, 'UTF-8')\n . \"</pre>\\n\";\n }\n\n return $retval;\n }", "private function highlight_node ($n, $term) {\n // build a regular expression of the form /(term1)|(term2)/i \n $regexp = \"/\"; \n for ($i = 0; $i < count($term); $i++) {\n if ($i != 0) { $regexp .= \"|\"; }\n $regterm[$i] = str_replace(\"*\", \"\\w*\", $term[$i]); \n $regexp .= \"($regterm[$i])\";\n }\n $regexp .= \"/i\";\t// end of regular expression\n\n $children = $n->childNodes;\n foreach ($children as $i => $c) {\n if ($c instanceof domElement) {\t\t\n\t $this->highlight_node($c, $term);\t// if a generic domElement, recurse \n } else if ($c instanceof domText) {\t// this is a text node; now separate out search terms\n\n if (preg_match($regexp, $c->nodeValue)) {\n // if the text node matches the search term(s), split it on the search term(s) and return search term(s) also\n $split = preg_split($regexp, $c->nodeValue, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);\n\n // loop through the array of split text and create text nodes or span elements, as appropriate\n foreach ($split as $s) {\n\t if (preg_match($regexp, $s)) {\t// if it matches, this is one of the terms to highlight\n\t for ($i = 0; $regterm[$i] != ''; $i++) {\n\t if (preg_match(\"/$regterm[$i]/i\", $s)) { \t// find which term it matches\n $newnode = $this->xsl_result->createElement(\"span\", htmlentities($s));\n\t $newnode->setAttribute(\"class\", \"term\" . ($i+1));\t// use term index for span class (begins at 1 instead of 0)\n\t }\n\t }\n } else {\t// text between search terms - regular text node\n\t $newnode = $this->xsl_result->createTextNode($s);\n\t }\n\t // add newly created element (text or span) to parent node, using old text node as reference point\n\t $n->insertBefore($newnode, $c);\n }\n // remove the old text node now that we have added all the new pieces\n $n->removeChild($c);\n\t }\n } // end of processing domText element\n }\t\n }", "public static function highlight_code($str)\n {\n $str = str_replace(\n array('&lt;', '&gt;', '<?', '?>', '<%', '%>', '\\\\', '</script>'),\n array('<', '>', 'phptagopen', 'phptagclose', 'asptagopen', 'asptagclose', 'backslashtmp', 'scriptclose'),\n $str\n );\n\n $str = highlight_string('<?php '.$str.' ?>', TRUE);\n\n $str = preg_replace(\n array(\n '/<span style=\"color: #([A-Z0-9]+)\">&lt;\\?php(&nbsp;| )/i',\n '/(<span style=\"color: #[A-Z0-9]+\">.*?)\\?&gt;<\\/span>\\n<\\/span>\\n<\\/code>/is',\n '/<span style=\"color: #[A-Z0-9]+\"\\><\\/span>/i'\n ),\n array(\n '<span style=\"color: #$1\">',\n \"$1</span>\\n</span>\\n</code>\",\n ''\n ),\n $str\n );\n\n return str_replace(\n array('phptagopen', 'phptagclose', 'asptagopen', 'asptagclose', 'backslashtmp', 'scriptclose'),\n array('&lt;?', '?&gt;', '&lt;%', '%&gt;', '\\\\', '&lt;/script&gt;'),\n $str\n );\n }", "public function highlight($highlight) {\n\t\t$this->_body['highlight'] = $highlight;\n\t\treturn $this ;\n\t}", "public function highlight($value) {\n return $this->setProperty('highlight', $value);\n }", "public function highlight($value) {\n return $this->setProperty('highlight', $value);\n }", "function viewhighlight($id,$title,$path,$template,$group,$page=1,$descr='',$photo='',$price=0,$quant=1) {\n\t $pview = $this->view;//GetSessionParam(\"PViewStyle\"); //get saved view from products dpc !?\t\n\t \t\n\t $gr = urlencode($group);\n\t $ar = urlencode($title);\n\t \n\t $link = seturl(\"t=$pview&a=$ar&g=$gr&p=\" ,$title);\n\n\t $data[] = seturl(\"t=$pview&a=$ar&g=$gr&p=\" , \n\t \"<img src=\\\"\" . $photo . \"\\\" width=\\\"100\\\" height=\\\"75\\\" border=\\\"0\\\" alt=\\\"\". localize('_IMAGE',getlocal()) . \"\\\">\" );\n\t //\"<A href=\\\"$PHP_SELF?t=$this->view&a=$ar&g=$gr&p=\\\">\" . //$plink .\n\t // \"<img src=\\\"\" . $photo . \"\\\" width=\\\"100\\\" height=\\\"75\\\" border=\\\"0\\\" alt=\\\"\". localize('_IMAGE',getlocal()) . \"\\\">\" . \"</A>\";\n\t $attr[] = \"left;10%\";\n\t \n\t $data[] = \"<B>$link</B><br>\" . $descr . \"<B>\";\n\t $attr[] = \"left;50%;middle\";\n\t \n\t $data[] = /*localize('_PRICE',getlocal()) . \" :\" . */ \"<B>\" . str_replace(\".\",\",\",$price) . $this->moneysymbol . \"</B>\";\t \n\t $attr[] = \"center;20%;middle;;\" . $this->star . \";\";\t\t\t\t \n\n\t //$data[] = dpc_extensions(\"$id;$title;$path;$template;$group;$page;$descr;$photo;$price;$quant;\",$group,$page); \n\t $data[] = GetGlobal('controller')->calldpc_method(\"metacache.showsymbol use $id;$title;$path;$template;$group;$page;$descr;$photo;$price;$quant;+$group+$page\",1) .\n\t GetGlobal('controller')->calldpc_method(\"cart.showsymbol use $id;$title;$path;$template;$group;$page;$descr;$photo;$price;$quant;+$group+$page\",1) .\t \n\t GetGlobal('controller')->calldpc_method(\"neworder.showsymbol use $id;$title;$path;$template;$group;$page;$descr;$photo;$price;$quant;+$group+$page\",1);\t \n\t $attr[] = \"center;20%;middle\";\t\t \n\n\t \n\t $myarticle = new window('',$data,$attr);\n\t $out = $myarticle->render(\"center::100%::0::group_article_high::left::0::0::\"). \"<hr>\";\n\t unset ($data);\n\t unset ($attr);\n\n\t return ($out);\n }", "function _prepareText($text, $highlight = '') {\n $html = htmlspecialchars($text);\n $html = str_replace( \"\\n\", '<br />', $html);\n\n if ($highlight != '') {\n $html = '<span class=\"' . $highlight . '\">' . $html . '</span>';\n }\n\n return $html;\n }", "public function getHighlight()\n {\n //\n if(Auth::user()->privileges_name=='ผู้ดูแลระบบ')\n {\n return view('admin.highlight');\n }\n\n return redirect('index');\n \n }", "public function highlight($text, $phrase, $format = '<span class=\"highlight\">\\1</span>', $regex = '|%s|iu') {\n\t\tif (empty($phrase)) {\n\t\t\treturn $text;\n\t\t}\n\n\t\tif (is_array($phrase)) {\n\t\t\t$replace = [];\n\t\t\t$with = [];\n\n\t\t\tforeach ($phrase as $key => $segment) {\n\t\t\t\t$segment = '(' . preg_quote($segment, '|') . ')';\n\t\t\t\t$segment = \"(?![^<]+>)$segment(?![^<]+>)\";\n\n\t\t\t\t$with[] = (is_array($format)) ? $format[$key] : $format;\n\t\t\t\t$replace[] = sprintf($regex, $segment);\n\t\t\t}\n\n\t\t\treturn preg_replace($replace, $with, $text);\n\t\t}\n\t\t$phrase = '(' . preg_quote($phrase, '|') . ')';\n\t\t$phrase = \"(?![^<]+>)$phrase(?![^<]+>)\";\n\n\t\treturn preg_replace(sprintf($regex, $phrase), $format, $text);\n\t}", "public static function highlightStr($haystack, $needles) {\n\t if (strlen($haystack) < 1) {\n\t return $haystack;\n\t }\n\n\t foreach ($needles as $needle) {\n\t \t \n\t\t preg_match_all(\"/$needle+/i\", $haystack, $matches);\n\t\t \n\t\t if (is_array($matches[0]) && count($matches[0]) >= 1) {\n\t\t foreach ($matches[0] as $match) {\n\t\t $haystack = str_replace($match, '<span class=\"highlight\">'.$match.'</span>', $haystack);\n\t\t }\n\t\t }\n\n\t\t}\n\t \n\t return $haystack;\n\n\t}", "function pm_search_hilit($message)\n{\n\tglobal $user, $db, $template, $config, $auth, $phpbb_root_path, $phpEx;\n\n\t$hilit_words = request_var('hilit', '', true);\n\t$match = request_var('match', PM_SEARCH_MATCH_ALL);\n\n\t$highlight_match = '';\n\tif($hilit_words)\n\t{\n\t\tif($match == PM_SEARCH_MATCH_EXACT)\n\t\t{\n\t\t\t$highlight_match = str_replace('%20', ' ', $hilit_words);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tforeach(explode(' ', trim($hilit_words)) as $word)\n\t\t\t{\n\t\t\t\tif(trim($word))\n\t\t\t\t{\n\t\t\t\t\t$word = str_replace('\\*', '\\w+?', preg_quote($word, '#'));\n\t\t\t\t\t$word = preg_replace('#(^|\\s)\\\\\\\\w\\*\\?(\\s|$)#', '$1\\w+?$2', $word);\n\t\t\t\t\t$highlight_match .= (($highlight_match != '') ? '|' : '') . $word;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif($highlight_match)\n\t{\n\t\tif($match == PM_SEARCH_MATCH_WORD)\n\t\t{\n\t\t\t$message = preg_replace('#(?!<.*)(?<!\\w)(' . $highlight_match . ')(?!\\w|[^<>]*(?:</s(?:cript|tyle))?>)#is', '<span class=\"posthilit\">\\1</span>', $message);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$message = preg_replace('#(?!<.*)(?<!\\.)(' . $highlight_match . ')(?!\\.|[^<>]*(?:</s(?:cript|tyle))?>)#is', '<span class=\"posthilit\">\\1</span>', $message);\n\t\t}\n\t}\n\n\treturn($message);\n}", "function highlight($path, $normal = 'normal', $selected = 'youarehere') {\n\t\t$class = $normal;\n\t\t$currentPath = substr($this->Html->here, strlen($this->Html->base));\n\t\t// if there is a star in the path we need to do different checking\n\t\t$regs = array();\n\t\tif (ereg($path,$currentPath,$regs)){\n\t\t\t$class .= \" \".$selected;\n\t\t}\n\t\treturn $class;\n\t }", "function renderMeWithTagStyle($toRender, $toPattern, $repla) {\n //------------Don't forget to delimit-----w+\n $pattern = '/' . $toPattern . '(\\w+)/';\n //$pattern = '/[*' . $toPattern . '(.+?)+$]/';\n //$pattern = '/[*' . $toPattern . '(.+?)$]/';\n //preg_match($pattern, $toRender, $matches);\n $matches = array();\n preg_match_all($pattern, $toRender, $matches);\n //---------------\n $temp = '';\n foreach ($matches as $match) {\n //echo $match;\n //$regex = '~(:\\w+)~';\n if ($temp != $match[0]) {\n $toRender = str_replace($match[0], \"<strong style='box-shadow:2px 2px 2px #cdcdcd;border-top:1px solid gray;border-left:1px solid gray;color:blue;text-shadow:2px 2px 2px #cdcdcd;background:transparent;'>\" . $match[0] . \"</strong>\", $toRender);\n } else {\n continue;\n }\n $temp = $match[0];\n }\n //$toRender=str_replace($repla,\"<span style='box-shadow:2px 2px 2px #cdcdcd;border-top:1px solid gray;border-left:1px solid gray;color:blue;text-shadow:2px 2px 2px #cdcdcd;background:transparent;'>\".$repla.\"</span>\",$toRender);\n\n return $toRender;\n}", "function highlight_code($str)\r\n\t{\r\n\t\t/* The highlight string function encodes and highlights\r\n\t\t * brackets so we need them to start raw.\r\n\t\t *\r\n\t\t * Also replace any existing PHP tags to temporary markers\r\n\t\t * so they don't accidentally break the string out of PHP,\r\n\t\t * and thus, thwart the highlighting.\r\n\t\t */\r\n\t\t$str = str_replace(\r\n\t\t\tarray('&lt;', '&gt;', '<?', '?>', '<%', '%>', '\\\\', '</script>'),\r\n\t\t\tarray('<', '>', 'phptagopen', 'phptagclose', 'asptagopen', 'asptagclose', 'backslashtmp', 'scriptclose'),\r\n\t\t\t$str\r\n\t\t);\r\n\r\n\t\t// The highlight_string function requires that the text be surrounded\r\n\t\t// by PHP tags, which we will remove later\r\n\t\t$str = highlight_string('<?php '.$str.' ?>', TRUE);\r\n\r\n\t\t// Remove our artificially added PHP, and the syntax highlighting that came with it\r\n\t\t$str = preg_replace(\r\n\t\t\tarray(\r\n\t\t\t\t'/<span style=\"color: #([A-Z0-9]+)\">&lt;\\?php(&nbsp;| )/i',\r\n\t\t\t\t'/(<span style=\"color: #[A-Z0-9]+\">.*?)\\?&gt;<\\/span>\\n<\\/span>\\n<\\/code>/is',\r\n\t\t\t\t'/<span style=\"color: #[A-Z0-9]+\"\\><\\/span>/i'\r\n\t\t\t),\r\n\t\t\tarray(\r\n\t\t\t\t'<span style=\"color: #$1\">',\r\n\t\t\t\t\"$1</span>\\n</span>\\n</code>\",\r\n\t\t\t\t''\r\n\t\t\t),\r\n\t\t\t$str\r\n\t\t);\r\n\r\n\t\t// Replace our markers back to PHP tags.\r\n\t\treturn str_replace(\r\n\t\t\tarray('phptagopen', 'phptagclose', 'asptagopen', 'asptagclose', 'backslashtmp', 'scriptclose'),\r\n\t\t\tarray('&lt;?', '?&gt;', '&lt;%', '%&gt;', '\\\\', '&lt;/script&gt;'),\r\n\t\t\t$str\r\n\t\t);\r\n\t}", "public function highlight($haystack) {\n $lwHaystack = self::normalize(mb_strtolower($haystack));\n $positions = array();\n\n // Look up all the needle positions\n foreach ($this->needles as $needle) {\n $offset = 0;\n while (($position = mb_strpos($lwHaystack, $needle, $offset)) !== FALSE) {\n $end = $position + mb_strlen($needle);\n $positions[] = array('start' => $position, 'end' => $end);\n $offset = $position + 1;\n }\n }\n\n // Now start highlighting areas\n $start = NULL;\n $end = NULL;\n $extraLength = 0;\n sort($positions);\n foreach ($positions as $position) {\n if ($start === NULL) {\n $start = $position['start'];\n $end = $position['end'];\n }\n else {\n if (($position['start'] <= $end) && ($position['end'] >= $end)) {\n // Overlapping areas, combine them\n $end = $position['end'];\n }\n else {\n if ($position['start'] > $end) {\n // New area found, highlight the previous area and continue with new one\n $haystack = mb_substr($haystack, 0, $start + $extraLength) . $this->openingTag . mb_substr($haystack, $start + $extraLength);\n $extraLength += mb_strlen($this->openingTag);\n\n $haystack = mb_substr($haystack, 0, $end + $extraLength) . $this->closingTag . mb_substr($haystack, $end + $extraLength);\n $extraLength += mb_strlen($this->closingTag);\n\n $start = $position['start'];\n $end = $position['end'];\n }\n }\n }\n }\n\n // Highlight the latest found area\n if (($start !== NULL) && ($end !== NULL)) {\n $haystack = mb_substr($haystack, 0, $start + $extraLength) . $this->openingTag . mb_substr($haystack, $start + $extraLength);\n $extraLength += mb_strlen($this->openingTag);\n $haystack = mb_substr($haystack, 0, $end + $extraLength) . $this->closingTag . mb_substr($haystack, $end + $extraLength);\n }\n\n return $haystack;\n }", "protected function compile()\n {\n $objPage = PageModel::findByIdOrAlias($this->jumpTo);\n\n // Check if filter should be displayed\n if (!$this->reference_filter_disabled && !$this->reference_category) {\n $objTemplateFilter = new FrontendTemplate('reference_list_filter');\n\n // Filter category\n $intFilterCategory = Input::get('filterCategory');\n $objTemplateFilter->strLink = Environment::get('base') . $this->addToUrl('filterCategory=ID', true);\n\n // Get Categories\n $this->loadLanguageFile('tl_reference_category');\n\n $objCategories = ReferenceCategoryModel::findShowCategoriesByArchive( $this->reference_archiv, array(\n 'order' => 'title ASC'\n ));\n\n $arrOptions = array();\n\n $strOptions = '<option value=\"0\">' . $GLOBALS ['TL_LANG'] ['tl_reference_category'] ['category'] [0] . '</option>';\n if ($objCategories) {\n while ($objCategories->next()) {\n $strOptions .= '<option value=\"' . $objCategories->id . '\"' . ($intFilterCategory != $objCategories->id ? '' : ' selected') . '>' . $objCategories->title . '</option>';\n $arrOptions[] = ['title'=> $objCategories->title, 'id'=>$objCategories->id,'active'=>($intFilterCategory != $objCategories->id)?false:true ];\n }\n }\n $objTemplateFilter->strCategoryOptions = $strOptions;\n $objTemplateFilter->arrCategories = $arrOptions;\n $this->Template->strFilter = $objTemplateFilter->parse();\n\n } elseif($this->reference_category) {\n $strSearch = '';\n $intFilterCategory = $this->reference_category;\n } elseif($this->check_page_referenz) {\n $strSearch = '';\n $intFilterCategory = $this->checkCategoryPageReference();\n } else {\n $strSearch = '';\n $intFilterCategory = 0;\n }\n\n // Get items to calculate total number of items\n $references = ReferenceModel::findItems($this->reference_archiv, $strSearch, $intFilterCategory, $this->only_featured);\n\n // Pagination\n $limit = 0;\n $offset = 0;\n $total = 0;\n\n // Set limit to maximum number of items\n if ($this->numberOfItems > 0) {\n $limit = $this->numberOfItems;\n $total = $this->numberOfItems;\n } elseif ($references) {\n $total = $references->count();\n }\n\n // If per page is set and maximum number of items greater than per page use Pagination\n if ($references && $this->perPage > 0 && ($limit == 0 || $this->numberOfItems > $this->perPage)) {\n\n // Set limit, page and offset\n $limit = $this->perPage;\n $intPage = $this->Input->get('page') ? $this->Input->get('page') : 1;\n $offset = ($intPage - 1) * $limit;\n\n // Add pagination menu\n $objPagination = new \\Pagination ($total, $limit);\n $this->Template->pagination = $objPagination->generate();\n }\n\n // Order\n $referenceArchive = ReferenceArchiveModel::findByPk($this->reference_archiv);\n\n switch ($referenceArchive->sort_order) {\n case 2:\n $strOrder = 'sorting ASC';\n break;\n case 1:\n default:\n $strOrder = $this->reference_random ? 'RAND()' : 'title ASC';\n break;\n }\n\n\n $references = ReferenceModel::findItems($this->reference_archiv, $strSearch, $intFilterCategory, $this->only_featured, $offset, $limit, $strOrder);\n\n if ($references) {\n $this->Template->references = $this->getReferences($references, $objPage);\n $this->Template->no_references = false;\n } else {\n $this->Template->references = '';\n $this->Template->no_references = $GLOBALS['TL_LANG']['tl_module']['no_references'];\n\n }\n }", "public function add_highlight_content($response) {\n if (!isset($response->highlighting)) {\n // There is no highlighting to add.\n return;\n }\n\n $highlightedobject = $response->highlighting;\n foreach ($response->response->docs as $doc) {\n $x = $doc->id;\n $highlighteddoc = $highlightedobject->$x;\n $this->merge_highlight_field_values($doc, $highlighteddoc);\n }\n }", "public function get_highlight_options() {\n\t\treturn array(\n\t\t\t'yellow' => __( 'Yellow', 'stream' ),\n\t\t\t'red' => __( 'Red', 'stream' ),\n\t\t\t'green' => __( 'Green', 'stream' ),\n\t\t\t'blue' => __( 'Blue', 'stream' ),\n\t\t);\n\t}", "function draw_search(){\r\n\t\t$out='';\r\n\r\n\t\tif($this->search_init)\r\n\t\t\t$out.='<input type=\"text\" id=\"'.$this->id.'_search\" name=\"'.$this->id.'_search\" value=\"'.$this->search.'\" onfocus=\"ctSearchFocus(\\''.$this->id.'\\');\" onblur=\"ctSearchBlur(\\''.$this->id.'\\');\" onkeypress=\"ctSearchKeypress(\\''.$this->id.'\\');\" onkeyup=\"ctSearch(\\''.$this->id.'\\');\" />'.$this->change_tags($this->search_html);\r\n\r\n\t\treturn $out;\r\n\t}", "function highlight_php_code($text)\r\n{\r\n\r\n \r\n while (strpos($text,'<phpcode>')!== false)\r\n {\r\n $tag_start = strpos($text,'<phpcode>');\r\n $tag_end = strpos($text,'</phpcode>'); \r\n\r\n if ($tag_end === false)\r\n {\r\n $tag_end=(strlen($text)); \r\n }\r\n \r\n $phpcode = substr($text,$tag_start+9,$tag_end-$tag_start-9);\r\n \r\n $text_before = substr($text,0,$tag_start);\r\n $text_after = substr($text,$tag_end+10);\r\n \r\n if (strpos($phpcode,'<?php')===false)\r\n {\r\n \r\n $phpcode = str_replace('&lt;?php','',highlight_string('<?php' . $phpcode,true)); \r\n }\r\n else\r\n {\r\n $phpcode = highlight_string($phpcode,true);\r\n }\r\n \r\n $text = $text_before . $phpcode . $text_after;\r\n \r\n }\r\n\r\n \r\n\r\n\r\n return $text;\r\n}", "function gtags_show_tags_chooser(){\n\t?>\n\t<span class=\"fr\">\n\t\tSuggestions : <span class=\"highlight etiquette\"><?php echo gtags_show_tags_in_add_form(); ?></span>\n\t</span>\n\t<?php \n}", "function wp_wikipedia_excerpt_substitute($match){\n #Mike Lay of http://www.mikelay.com/ suggested query.\n return '<a href=\"http://www.wikipedia.org/search-redirect.php?language=en&go=Go&search='.urlencode($match[1]).'\">'.$match[1].'</a>';\n}", "function styles_for_block_core_search($attributes)\n {\n }", "function preview_theme_ob_filter_callback($matches)\n {\n }", "function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}", "function helpSearchResult($r, $resultAsTitle=false) {\r\n$IPBHTML = \"\";\r\n//--starthtml--//\r\n$IPBHTML .= <<<EOF\r\n<php>\n$st = IPSSearchRegistry::get('in.search_higlight');\n</php>\n<div class='result_info'>\n\t<h3><a href='{parse url=\"app=core&amp;module=help&amp;do=01&amp;HID={$r['type_id_2']}&amp;hl={$st}\" base=\"public\"}'>{$r['content_title']}</a></h3>\n\t<if test=\"showHelpContent:|:!$resultAsTitle\">\n\t<p>\n\t\t{$r['content']}\n\t</p>\n\t</if>\n</div>\r\nEOF;\r\n//--endhtml--//\r\nreturn $IPBHTML;\r\n}", "function macro_grep($args) {\n $regexp = getattr($args, 'regexp');\n $substr = getattr($args, 'substr');\n $page = getattr($args, 'page');\n\n if (!$substr && !$regexp) {\n return macro_error('Expecting parameter `substr` or `regexp`');\n }\n if ($substr && $regexp) {\n return macro_error(\"Parameters `substr` and `regexp` can't be used together\");\n }\n if (!$page) {\n return macro_error('Expecting parameter `page`');\n }\n\n if (!identity_can('macro-grep', $args)) {\n return macro_permission_error();\n }\n\n if ($substr) {\n $textblocks = textblock_grep($substr, $page, false);\n } else {\n $textblocks = textblock_grep($regexp, $page, true);\n }\n $textblocks_good = array();\n foreach ($textblocks as $textblock) {\n if (identity_can(\"textblock-view\", $textblock)) {\n $textblocks_good[] = $textblock;\n }\n }\n\n ob_start();\n?>\n<div class=\"macroToc\">\n<p><strong><?= count($textblocks_good) ?></strong> rezultate.</p>\n<ul>\n<?php foreach ($textblocks_good as $textblock) { ?>\n <li><?= format_link(url_textblock($textblock['name']), $textblock['title']) ?></li>\n<?php } ?>\n</ul>\n</div>\n<?php\n $buffer = ob_get_clean();\n\n return $buffer;\n}", "function highlight_phrase($str, $phrase, $tag_open = '<mark>', $tag_close = '</mark>')\r\n\t{\r\n\t\treturn ($str !== '' && $phrase !== '')\r\n\t\t\t? preg_replace('/('.preg_quote($phrase, '/').')/i'.(UTF8_ENABLED ? 'u' : ''), $tag_open.'\\\\1'.$tag_close, $str)\r\n\t\t\t: $str;\r\n\t}", "function go($word,$where,$data) { \n if ($data['all']=='all') {$where['content']=\"on\";$where['news']=\"on\";}\n if ($where['content']==\"on\") {\n\t$res1=$this->content($word);\n }\n if ($where['news']==\"on\") {$res2=$this->news($word);}\n $result=$res1.$res3.$res4.$res5.$res6.$res2;\n $smarty = new Smarty; \n $smarty->assign(\"word\",$word);\n $smarty->assign(\"where\",$where);\n $smarty->assign(\"result\",$result);\n $smarty->display(\"{$this->path}search.tpl\");\n }", "public function taxonomy_highlight() {\n\t\t\tglobal $current_screen, $taxnow;\n\n\t\t\tif ( is_a( $current_screen, 'WP_Screen' ) && ! empty( $taxnow ) && in_array( $taxnow, array( wct_get_tag(), wct_get_category() ) ) ) {\n\t \t\t\t$current_screen->post_type = $this->post_type;\n\t \t\t}\n\t\t}", "function highlight_php($string) {\n\t$Line = explode(\"\\n\",$string);\n\tfor($i=1;$i<=count($Line);$i++)\n\t\t$line .= \"&nbsp;<a name='line$i'>\".$i.\"</a>&nbsp;<br>\";\n\n\t$Code = highlight_string($string,true);\n\t$header='\n\t\t<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"95%\" style=\"\">\n\t\t\t<tr>\n\t\t\t\t<td width=\"3%\" valign=\"top\" style=\"background-color: #F2F2F2;\"><code>'.$line.'</code></td>\n\t\t\t\t<td width=\"97%\" valign=\"top\" style=\"background-color: white;\"><div style=\"white-space: nowrap; overflow: auto;\"><code>';\n\n\t$footer = $Code.'</div></code></td>\n\t\t</tr>\n\t</table>';\n\treturn $header.$footer;\n}", "function mt_filter_the_content($content) {\n\t// $content = \"<div style='color: fuchsia;'>{$content}</div>\";\n\treturn $content;\n }", "function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}", "function tck_add_search_options() {\n $options = array();\n $options[0] = 'Random & Custom Keywords';\n $options[1] = 'Random Keywords';\n $options[2] = 'Custom Keywords';\n \n $default = 0;\n if ( isset($_GET['custom_filter']) ) $default = $_GET['custom_filter'];\n \n $html = yourls_html_select('custom_filter', $options, $default, false);\n $html = str_replace(\"\\n\", '', $html);\n $html = str_replace(\"\\\"\", '\\\\\"', $html);\n?>\n <script language=\"javascript\">\n $(document).ready(function(){\n tck_filter = $(\"#filter_options\").find(\"br\")[0];\n $( tck_filter ).after(\"Show only <?php echo $html; ?><br />\");\n });\n </script>\n<?php\n }", "public function highlightText($text, $colorScheme = CRNRSTN_PHPNIGHT) // [EDIT] CRNRSTN v2.0.0 FOR PHPNIGHT :: J5\n {\n //$colorScheme = trim(strtolower($colorScheme)); // [EDIT] CRNRSTN v2.0.0 :: J5\n\n if ($colorScheme == CRNRSTN_UI_PHP) {\n\n ini_set('highlight.comment', '#008000');\n ini_set('highlight.default', '#000');\n ini_set('highlight.html', '#808080');\n ini_set('highlight.keyword', '#00B; font-weight: bold');\n ini_set('highlight.string', '#D00');\n\n } else if ($colorScheme == CRNRSTN_UI_HTML) {\n\n ini_set('highlight.comment', 'green');\n ini_set('highlight.default', '#C00');\n ini_set('highlight.html', '#000');\n ini_set('highlight.keyword', 'black; font-weight: bold');\n ini_set('highlight.string', '#00F');\n\n } else if ($colorScheme == CRNRSTN_UI_PHPNIGHT) // [EDIT] CRNRSTN v2.0.0 :: J5\n {\n ini_set('highlight.comment', '#FC0');\n ini_set('highlight.default', '#DEDECB');\n ini_set('highlight.html', '#808080');\n ini_set('highlight.keyword', '#8FE28F; font-weight: normal');\n ini_set('highlight.string', '#F66');\n\n }\n // ...\n\n $text = trim($text);\n $text = highlight_string(\"<?php \" . $text, true); // highlight_string() requires opening PHP tag or otherwise it will not colorize the text\n $text = trim($text);\n $text = preg_replace(\"|^\\\\<code\\\\>\\\\<span style\\\\=\\\"color\\\\: #[a-fA-F0-9]{0,6}\\\"\\\\>|\", \"\", $text, 1); // remove prefix\n $text = preg_replace(\"|\\\\</code\\\\>\\$|\", \"\", $text, 1); // remove suffix 1\n $text = trim($text); // remove line breaks\n $text = preg_replace(\"|\\\\</span\\\\>\\$|\", \"\", $text, 1); // remove suffix 2\n $text = trim($text); // remove line breaks\n $text = preg_replace(\"|^(\\\\<span style\\\\=\\\"color\\\\: #[a-fA-F0-9]{0,6}\\\"\\\\>)(&lt;\\\\?php&nbsp;)(.*?)(\\\\</span\\\\>)|\", \"\\$1\\$3\\$4\", $text); // remove custom added \"<?php \"\n\n return $text;\n }", "public function createSnippet(string $query, string $text, bool $highlight = true)\n\t{\n\t\t$query = htmlspecialchars($query);\n\t\t$text = strip_tags($text);\n\t\t$sentences = $this->breakIntoSentences($text);\n\t\t$matchedSentences = $this->getMatchedSentences($query, $sentences);\n\t\t$result = '';\n\t\t$wordCounter = 0;\n\t\t$lastKey = key($matchedSentences) - 1;\n\t\tforeach ($matchedSentences as $key => $sentence) {\n\t\t\t$wordCounter += str_word_count($sentence, 0, implode('', $this->specialChars));\n\t\t\tif ($wordCounter < $this->maxWords || $result === '') {\n\t\t\t\tif ((int) $key !== $lastKey + 1) {\n\t\t\t\t\t// if this sentence is not the next sentence, add ' ... '\n\t\t\t\t\t$result .= ' ...';\n\t\t\t\t}\n\t\t\t\t$result .= ' ' . $sentence;\n\t\t\t}\n\t\t\t$lastKey = (int) $key;\n\t\t}\n\n\t\t// Matched text is smaller than [minWords]. Try to add next sentences\n\t\twhile ($wordCounter < $this->minWords && isset($sentences[$lastKey + 1]) && str_word_count($sentences[$lastKey + 1], 0, implode('', $this->specialChars)) + $wordCounter < $this->maxWords) {\n\t\t\t$result .= ' ' . $sentences[$lastKey + 1];\n\t\t\t$wordCounter += str_word_count($sentences[$lastKey + 1], 0, implode('', $this->specialChars));\n\t\t\t$lastKey++;\n\t\t}\n\n\t\t// Matched text is possibly still to small. Try to add sentences before the first sentence\n\t\t$firstKey = key($matchedSentences);\n\t\twhile ($wordCounter < $this->minWords && isset($sentences[$firstKey - 1]) && str_word_count($sentences[$firstKey - 1], 0, implode('', $this->specialChars)) + $wordCounter < $this->maxWords) {\n\t\t\t// add this sentence before the current result\n\t\t\t$result = $sentences[$firstKey - 1] . ' ' . $result;\n\t\t\t$wordCounter += str_word_count($sentences[$firstKey - 1], 0, implode('', $this->specialChars));\n\t\t\t$firstKey--;\n\t\t}\n\n\t\tif ($highlight === true) {\n\t\t\treturn $this->highlightMatches($query, trim($result));\n\t\t}\n\n\t\treturn trim($result);\n\t}", "private function highlightXML ($term) {\n // if span terms are not defined, define them now\n if (!(isset($this->begin_hi))) { $this->defineHighlight(count($term)); }\n $this->highlight_node($this->xsl_result, $term);\n }", "function display_phlagpage($keyword) {\n\n $title = yourls_get_keyword_title( $keyword );\n $url = yourls_get_keyword_longurl( $keyword );\n $base = YOURLS_SITE;\n\t$img = yourls_plugin_url( dirname( __FILE__ ).'/assets/caution.png' );\n\t$css = yourls_plugin_url( dirname( __FILE__ ).'/assets/bootstrap.min.css');\n\n\t$vars = array();\n\t\t$vars['keyword'] = $keyword;\n\t\t$vars['title'] = $title;\n\t\t$vars['url'] = $url;\n\t\t$vars['base'] = $base;\n\t\t$vars['img'] = $img;\n\t\t$vars['css'] = $css;\n\n\t$intercept = file_get_contents( dirname( __FILE__ ) . '/assets/intercept.php' );\n\t// Replace all %stuff% in the intercept with variable $stuff\n\t$intercept = preg_replace_callback( '/%([^%]+)?%/', function( $match ) use( $vars ) { return $vars[ $match[1] ]; }, $intercept );\n\n\techo $intercept;\n\n\tdie();\n}", "public function printSearch($module, $object, $keywords)\n{\n echo \"<li> {$this->lang->search->common} </li>\" . \"<li>{$keywords}</li>\";\n}", "public function testHighlightCustom()\n {\n $str = 'The quick brown fox jumps over the dog.';\n $expected = 'The quick <em>brown</em> fox jumps over the dog.';\n $this->assertEquals($expected, $this->helper->highlight($str, 'brown', '<em>$1</em>'));\n }", "function get_typography_classes_for_block_core_search($attributes)\n {\n }", "public function searchHighlight($content, $keyword) {\n $text = $this->plain($content);\n $i = stripos($text, $keyword);\n $regex = preg_quote($keyword);\n $results = array();\n while($i !== false) {\n $s = substr($text, max([0, $i - 60]), 120);\n $results[] = preg_replace(\"/($regex)/i\", '<mark>$1</mark>', $s);\n $i = stripos($text, $keyword, $i+1);\n }\n return array_unique($results);\n }", "function zanblog_color_cloud($text) { \r\n $text = preg_replace_callback('|<a (.+?)>|i', 'zanblog_color_cloud_callback', $text); \r\n return $text; \r\n}", "function katakrak_search_search_results_content_type_render($subtype, $conf, $args, $context) {\n $block = new stdClass();\n $block->module = 'katakrak_search';\n $block->delta = 'results';\n\n $search = array(\n 'keys' => '',\n 'filters' => isset($_GET['filters']) ? $_GET['filters'] : '',\n 'sort' => isset($_GET['solrsort']) ? $_GET['solrsort'] : '',\n );\n\n // Use keywords from the selected context if set to do so.\n if (!empty($context) && !empty($context->data)) {\n $search['keys'] = $context->data;\n }\n\n $display = panels_get_current_page_display();\n\n // Alter the search parts to use substitutions. Override, append or use a\n // fallback depending on the setting for each part.\n foreach ($search as $key => $value) {\n $value = trim($value);\n\n if ($conf[$key . '_action'] != 'none' && !empty($conf['substitute']) && !empty($display->context)) {\n $conf[$key] = ctools_context_keyword_substitute($conf[$key], array(), $display->context);\n }\n\n if ($conf[$key . '_action'] == 'append') {\n $search[$key] .= ' ' . $conf[$key];\n }\n elseif (($conf[$key . '_action'] == 'fallback' && empty($value)) || $conf[$key . '_action'] == 'override') {\n $search[$key] = $conf[$key];\n }\n }\n\n // Add remaining search information.\n $menu_item = menu_get_item();\n $search['path'] = $menu_item['href'];\n $search['page'] = pager_find_page();\n $search['rows'] = isset($conf['rows']) ? $conf['rows'] : 10;\n $search['columns'] = isset($conf['columns']) ? $conf['columns'] : 3;\n $search['env_id'] = isset($conf['env_id']) ? $conf['env_id'] : '';\n $search['tipo'] = isset($conf['tipo']) ? $conf['tipo'] : '';\n\n if (!empty($conf['log'])) {\n watchdog('search', '%keys (@type).', array('%keys' => $search['keys'], '@type' => t('Search')), WATCHDOG_NOTICE, l(t('results'), $_GET['q']));\n }\n\n $results = NULL;\n\n // Execute the search if we have keywords or if keywords aren't required.\n if (!empty($search['keys']) || !$conf['keys_required']) {\n // If set to not show keywords and filters in the breadcrumb trail, first\n // store the original before being changed by the Apache Solr module.\n if (empty($conf['breadcrumb'])) {\n $breadcrumb = drupal_get_breadcrumb();\n }\n\n try {\n $results = katakrak_search_search_execute($search);\n $query = apachesolr_current_query(variable_get('apachesolr_default_environment', 'default'));\n if ($query) {\n $searcher = $query->getSearcher();\n $response = apachesolr_static_response_cache($searcher);\n }\n // Don't render suggestions. Use spellchecker pane instead.\n if (isset($results['suggestions'])) {\n unset($results['suggestions']);\n }\n\n // Restore the original breadcrumb trail if set to do so.\n if (empty($conf['breadcrumb'])) {\n drupal_set_breadcrumb($breadcrumb);\n }\n }\n catch (Exception $e) {\n watchdog('Apache Solr', nl2br(check_plain($e->getMessage())), NULL, WATCHDOG_ERROR);\n }\n }\n\n if ($results) {\n // Add title and results.\n if (!empty($conf['title_override'])) {\n if (!empty($conf['substitute']) && !empty($display->context)) {\n $conf['title_override_text'] = ctools_context_keyword_substitute($conf['title_override_text'], array(), $display->context);\n }\n $block->title = $conf['title_override_text'];\n }\n else {\n $block->title = t('Search results');\n }\n $block->content = $results;\n }\n elseif (!empty($search['keys'])) {\n // Show empty text, either overridden or the default.\n if (!empty($conf['empty_override'])) {\n if (!empty($conf['substitute']) && !empty($display->context)) {\n $conf['empty_override_title'] = ctools_context_keyword_substitute($conf['empty_override_title'], array(), $display->context);\n $conf['empty_override_text']['value'] = ctools_context_keyword_substitute($conf['empty_override_text']['value'], array(), $display->context);\n }\n $block->title = $conf['empty_override_title'];\n $block->content = check_markup($conf['empty_override_text']['value'], $conf['empty_override_format'], $langcode = '' /* TODO Set this variable. */, FALSE);\n }\n else {\n $block->title = t('Your search yielded no results');\n $block->content = search_help('search#noresults', drupal_help_arg());\n }\n }\n\n return $block;\n}", "function beeldgeluid_preprocess_search_results(&$variables, $hook) {\n //dsm($variables);\n}", "private static function highlightCode($code, $html) {\r\n\t\t// XHTMLize PHP highlight_string output until it gets fixed in PHP\r\n\t\tstatic $search = array(\r\n\t\t\t'<br>',\r\n\t\t\t'<font',\r\n\t\t\t'</font>',\r\n\t\t\t'color=\"');\r\n\t\r\n\t\tstatic $replace = array(\r\n\t\t\t'<br />',\r\n\t\t\t'<span',\r\n\t\t\t'</span>',\r\n\t\t\t'style=\"color:');\r\n\t\tif (!$html) {\r\n\t\t\t$code = str_replace('&lt;', '<', $code);\r\n\t\t\t$code = str_replace(\"\\r\", '', $code);\r\n\t\t}\r\n\t\r\n\t\treturn str_replace($search, $replace, highlight_string($code, true));\r\n\t}", "function get_color_classes_for_block_core_search($attributes)\n {\n }", "public static function highlightWord($str, $phrase, $tagOpen = '<span style=\"font-weight:bold;background-color:#ffff00\">', $tagClose = '</span>') {\n\t\treturn preg_replace ( '/(' . preg_quote ( $phrase ) . ')/i', $tagOpen . \"\\\\1\" . $tagClose, $str );\n\t}", "public function highlightSearchQueryWords($highlightedString)\n {\n preg_match_all('~\\w+~', (string)$this->getSearchQuery(), $match);\n\n $matchWords = [];\n foreach ($match[0] as $matchWord) {\n if (strlen($matchWord) >= 2) {\n $matchWords[] = $matchWord;\n }\n }\n\n if ($match) {\n $pattern = '~\\\\b(' . implode('|', $matchWords) . ')~i';\n $result = preg_replace($pattern, '<strong>$0</strong>', $highlightedString);\n } else {\n $result = $highlightedString;\n }\n\n return $result;\n }", "function RegisterOutputfilter($function)\n {\n $this->_smarty->register_outputfilter($function);\n }", "function _search_terms_tidy($t)\n {\n }", "private function _highlightMatchingWord($datas)\n {\n $numResult = count($datas);\n for ($i = 0; $i < $numResult; $i++) {\n //store how much word matching\n $match = 0;\n //searching each word in title\n foreach ($this->sSearch as $word) {\n $pos = mb_stripos($datas[$i]->title, $word);\n if (is_numeric($pos) && (strlen($word) > 1)) {\n $word = mb_strtolower($word);\n $datas[$i]->title = mb_strtolower($datas[$i]->title);\n $datas[$i]->title = str_ireplace(\n $word,\n \"<b style='background-color:#ffc107;'>$word</b>\",\n $datas[$i]->title\n );\n $match++;\n }\n }\n //push to each array depend on how much word matching\n if ($match) {\n $part[$match][] = $datas[$i];\n }\n }\n //merge all document ordered by matching number form hight to low\n $wordNumb = count($this->sSearch);\n $partTmp = [];\n for ($j = $wordNumb; $j > 0; $j--) {\n if (isset($part[$j])) {\n foreach ($part[$j] as $value) {\n $partTmp[] = $value;\n }\n }\n }\n // store total of matching title\n $this->count_filtered = count($partTmp);\n // paging by cutting array\n $end = Input::get('start') + Input::get('length');\n $tmp = [];\n for ($i = Input::get('start'); $i < $end; $i++) {\n if (isset($partTmp[$i])) {\n $tmp[] = $partTmp[$i];\n }\n }\n return $tmp;\n }", "function _highlight($type, $text, $language = null, $filename = null) {\n global $ID;\n global $lang;\n\n $language = preg_replace(PREG_PATTERN_VALID_LANGUAGE, '', $language);\n\n if($filename) {\n // add icon\n list($ext) = mimetype($filename, false);\n $class = preg_replace('/[^_\\-a-z0-9]+/i', '_', $ext);\n $class = 'mediafile mf_'.$class;\n\n $this->doc .= '<dl class=\"'.$type.'\">'.DOKU_LF;\n $this->doc .= '<dt><a href=\"'.exportlink($ID, 'code', array('codeblock' => $this->_codeblock)).'\" title=\"'.$lang['download'].'\" class=\"'.$class.'\">';\n $this->doc .= hsc($filename);\n $this->doc .= '</a></dt>'.DOKU_LF.'<dd>';\n }\n\n if($text{0} == \"\\n\") {\n $text = substr($text, 1);\n }\n if(substr($text, -1) == \"\\n\") {\n $text = substr($text, 0, -1);\n }\n\n if(empty($language)) { // empty is faster than is_null and can prevent '' string\n $this->doc .= '<pre class=\"'.$type.'\">'.$this->_xmlEntities($text).'</pre>'.DOKU_LF;\n } else {\n $class = 'code'; //we always need the code class to make the syntax highlighting apply\n if($type != 'code') $class .= ' '.$type;\n\n $this->doc .= \"<pre class=\\\"$class $language\\\">\".p_xhtml_cached_geshi($text, $language, '').'</pre>'.DOKU_LF;\n }\n\n if($filename) {\n $this->doc .= '</dd></dl>'.DOKU_LF;\n }\n\n $this->_codeblock++;\n }", "function wp_replace_in_html_tags($haystack, $replace_pairs)\n {\n }", "public static function str_highlight ($text, $needle, $forceWordBoundaryIfNo = false)\r\n\t{\r\n\t\t# Default highlighting\r\n\t\t$highlight = '<strong>\\1</strong>';\r\n\t\t\r\n\t\t# Pattern\r\n\t\t$pattern = '#(%s)#';\r\n\t\t\r\n\t\t# Apply case insensitivity\r\n\t\t$pattern .= 'i';\r\n\t\t\r\n\t\t# Escape characters\r\n\t\t$needle = preg_quote ($needle);\r\n\t\t\r\n\t\t# Escape needle with whole word check\r\n\t\tif (!$forceWordBoundaryIfNo || ($forceWordBoundaryIfNo && !substr_count ($needle, $forceWordBoundaryIfNo))) {\r\n\t\t\t$needle = '\\b' . $needle . '\\b';\r\n\t\t}\r\n\t\t\r\n\t\t# Perform replacement\r\n\t\t$regex = sprintf ($pattern, $needle);\r\n\t\t$text = preg_replace ($regex, $highlight, $text);\r\n\t\t\r\n\t\t# Return the text\r\n\t\treturn $text;\r\n\t}", "function searchResultsWrapper($results, $sortDropDown, $sortIn, $pagination, $total, $showing, $search_term, $url_string, $current_key, $removed_search_terms=array(), $limited=0, $wasLimited=false, $search_tags) {\r\n$IPBHTML = \"\";\r\n//--starthtml--//\r\n$IPBHTML .= <<<EOF\r\n<input type='hidden' name=\"usedInJsLater\" id=\"urlString\" value=\"{parse expression=\"base64_encode( $this->registry->output->buildUrl( \"{$url_string}&amp;search_app={$current_key}\", \"public\" ) )\"}\" />\n<h1 class='ipsType_pagetitle'>{$this->lang->words['search_results']}</h1>\n<div class='ipsType_pagedesc'>\n\t<if test=\"hasSearchResults:|:$total > 0 AND $search_term != ''\">\n\t\t<if test=\"hasSearchResultsCut:|:$limited AND $wasLimited\">\n\t\t\t{parse expression=\"sprintf( $this->lang->words['your_search_limited'], $search_term, $limited )\"}\n\t\t<else />\n\t\t\t{$this->lang->words['your_search']} <em><strong>{$search_term}</strong></em> {$this->lang->words['your_search_returned']} <strong>{$total}</strong> {$this->lang->words['your_search_results']}\n\t\t</if>\n\t<else />\n\t\t<if test=\"hasSearchResults:|:$total > 0 AND $search_tags != ''\">\n\t\t\t{parse expression=\"sprintf( $this->lang->words['tag_search_results'], $total, $search_tags )\"}\n\t\t</if>\n\t</if>\n</div>\n<br />\n<div class='ipsLayout ipsLayout_withleft clearfix'>\n\t<div class='ipsLayout_left'>\n\t\t<div class='ipsBox'>\n\t\t\t<div class='ipsBox_container ipsSideMenu'>\n\t\t\t\t<h4>{$this->lang->words['filter_by_app']}</h4>\n\t\t\t\t<ul>\n\t\t\t\t\t<if test=\"IPSLib::appIsSearchable( 'forums', 'search' )\">\n\t\t\t\t\t\t<li <if test=\"forumsTab:|:$this->request['search_app'] == 'forums'\">class='active'</if>><a href='{parse url=\"{$url_string}&amp;search_app=forums\" base=\"public\"}'>{IPSLib::getAppTitle( 'forums' )}</a></li>\n\t\t\t\t\t</if>\n\t\t\t\t\t<if test=\"IPSLib::appIsSearchable( 'members', 'search' )\">\n\t\t\t\t\t\t<li <if test=\"membersTab:|:$this->request['search_app'] == 'members'\">class='active'</if>><a href='{parse url=\"{$url_string}&amp;search_app=members\" base=\"public\"}'>{IPSLib::getAppTitle( 'members' )}</a></li>\n\t\t\t\t\t</if>\n\t\t\t\t\t<if test=\"IPSLib::appIsSearchable( 'core', 'search' )\">\n\t\t\t\t\t\t<li <if test=\"helpTab:|:$this->request['search_app'] == 'core'\">class='active'</if>><a href='{parse url=\"{$url_string}&amp;search_app=core\" base=\"public\"}'>{IPSLib::getAppTitle( 'core' )}</a></li>\n\t\t\t\t\t</if>\n\t\t\t\t\t<foreach loop=\"apps:$this->registry->getApplications() as $app\">\n\t\t\t\t\t\t<if test=\"appIsSearchable:|:IPSLib::appIsSearchable( $app['app_directory'], 'search' ) AND !in_array( $app['app_directory'], array('core','forums','members') )\">\n\t\t\t\t\t\t\t<li <if test=\"appIsSearched:|:$this->request['search_app'] == $app['app_directory']\">class='active'</if>><a href='{parse url=\"{$url_string}&amp;search_app={$app['app_directory']}\" base=\"public\"}'>{IPSLib::getAppTitle( $app['app_directory'] )}</a></li>\n\t\t\t\t \t\t</if>\n\t\t\t\t\t</foreach>\n\t\t\t\t</ul>\n\t\t\t\n\t\t\t\t<if test=\"is_array($sortIn) AND count( $sortIn )\">\n\t\t\t\t\t<h4>{$this->lang->words['filter_by_section']}</h4>\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<foreach loop=\"$sortIn as $id => $_data\">\n\t\t\t\t\t\t\t<li <if test=\"$this->request['search_app_filters'][$this->request['search_app']]['searchInKey'] == $_data[0]\">class='active'</if>>\n\t\t\t\t\t\t\t\t<a href='{parse url=\"{$url_string}&amp;search_app={$current_key}&amp;search_app_filters[{$this->request['search_app']}][searchInKey]={$_data['0']}\" base=\"public\"}'>{$_data[1]}</a>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t</foreach>\n\t\t\t\t\t</ul>\n\t\t\t\t</if>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div class='ipsLayout_content'>\t\t\n\t\t<div class='clearfix'>\n\t\t\t{$pagination}\n\t\t</div>\n\t\t<div class='maintitle ipsFilterbar'>\n\t\t\t<if test=\"searchismod:|:$this->memberData['g_is_supmod'] == 1 && IPSSearchRegistry::get('config.can_moderate_results')\">\n\t\t\t\t<span class='right'>\n\t\t\t\t\t<input type='checkbox' id='tmod_all' class='input_check' title='{$this->lang->words['search_select_all']}' value='1' />\n\t\t\t\t</span>\n\t\t\t</if>\t\t\n\t\t\t<if test=\"IPSSearchRegistry::get('config.contentTypes') AND is_array( IPSSearchRegistry::get('config.contentTypes') )\">\n\t\t\t\t<if test=\"count($sortDropDown)\">\n\t\t\t\t\t<span class='ipsType_small'>{$this->lang->words['sort_by']}</span>&nbsp;&nbsp;\n\t\t\t\t\t<if test=\"count($sortDropDown) <= 4\">\n\t\t\t\t\t\t<ul class='ipsList_inline ipsType_smaller' style='display: inline'>\n\t\t\t\t\t\t\t<foreach loop=\"$sortDropDown as $k => $l\">\n\t\t\t\t\t\t\t\t<li <if test=\"$this->request['search_app_filters'][$current_key][$this->request['search_app_filters'][$current_key]['searchInKey']]['sortKey'] == $k\">class='active'</if>>\n\t\t\t\t\t\t\t\t\t<a href='{parse url=\"{$url_string}&amp;search_app={$current_key}&amp;search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&amp;search_app_filters[$current_key][{$this->request['search_app_filters'][$current_key]['searchInKey']}][sortKey]={$k}&amp;search_app_filters[$current_key][{$this->request['search_app_filters'][$current_key]['searchInKey']}][sortDir]={$this->request['search_app_filters'][$current_key][$this->request['search_app_filters'][$current_key]['searchInKey']]['sortDir']}\" base=\"public\"}'>{$l}</a>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t</foreach>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n\t\t\t\t\t<else />\n\t\t\t\t\t\t<ul class='ipsList_inline ipsType_smaller' style='display: inline'>\n\t\t\t\t\t\t\t<li class='active'>\n\t\t\t\t\t\t\t\t<a href='#' id='search_sort' class='ipbmenu'>{$sortDropDown[ $this->request['search_app_filters'][$current_key][$this->request['search_app_filters'][$current_key]['searchInKey']]['sortKey'] ]} &nbsp;&nbsp;<span class='submenu_indicator'></span>&nbsp;</a>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n\t\t\t\t\t</if>\n\t\t\t\t</if>\n\t\t\t\t<span class='ipsType_small'>{$this->lang->words['order']}</span>&nbsp;&nbsp;\n\t\t\t\t<ul class='ipsList_inline ipsType_smaller' style='display: inline'>\n\t\t\t\t\t<li <if test=\"$this->request['search_app_filters'][$current_key][$this->request['search_app_filters'][$current_key]['searchInKey']]['sortDir'] == 0\">class='active'</if>>\n\t\t\t\t\t\t<a href='{parse url=\"{$url_string}&amp;search_app={$current_key}&amp;search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&amp;search_app_filters[$current_key][{$this->request['search_app_filters'][$current_key]['searchInKey']}][sortKey]={$this->request['search_app_filters'][$current_key][$this->request['search_app_filters'][$current_key]['searchInKey']]['sortKey']}&amp;search_app_filters[$current_key][{$this->request['search_app_filters'][$current_key]['searchInKey']}][sortDir]=0\" base=\"public\"}'>{$this->lang->words['s_search_type_o_0']}</a>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li <if test=\"$this->request['search_app_filters'][$current_key][$this->request['search_app_filters'][$current_key]['searchInKey']]['sortDir'] == 1\">class='active'</if>>\n\t\t\t\t\t\t<a href='{parse url=\"{$url_string}&amp;search_app={$current_key}&amp;search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&amp;search_app_filters[$current_key][{$this->request['search_app_filters'][$current_key]['searchInKey']}][sortKey]={$this->request['search_app_filters'][$current_key][$this->request['search_app_filters'][$current_key]['searchInKey']]['sortKey']}&amp;search_app_filters[$current_key][{$this->request['search_app_filters'][$current_key]['searchInKey']}][sortDir]=1\" base=\"public\"}'>{$this->lang->words['s_search_type_o_1']}</a>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t<else />\n\t\t\t\t<if test=\"count($sortDropDown)\">\n\t\t\t\t\t<span class='ipsType_small'>{$this->lang->words['sort_by']}</span>&nbsp;&nbsp;\n\t\t\t\t\t<if test=\"count($sortDropDown) <= 4\">\n\t\t\t\t\t\t<ul class='ipsList_inline ipsType_smaller' style='display: inline'>\n\t\t\t\t\t\t\t<foreach loop=\"$sortDropDown as $k => $l\">\n\t\t\t\t\t\t\t\t<li <if test=\"$this->request['search_app_filters'][$current_key]['sortKey'] == $k\">class='active'</if>>\n\t\t\t\t\t\t\t\t\t<a href='{parse url=\"{$url_string}&amp;search_app={$current_key}&amp;search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&amp;search_app_filters[$current_key][sortKey]={$k}&amp;search_app_filters[$current_key][sortDir]={$this->request['search_app_filters'][$current_key]['sortDir']}\" base=\"public\"}'>{$l}</a>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t</foreach>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n\t\t\t\t\t<else />\n\t\t\t\t\t\t<ul class='ipsList_inline ipsType_smaller' style='display: inline'>\n\t\t\t\t\t\t\t<li class='active'>\n\t\t\t\t\t\t\t\t<a href='#' id='search_sort' class='ipbmenu'>{$sortDropDown[ $this->request['search_app_filters'][$current_key]['sortKey'] ]} &nbsp;&nbsp;<span class='submenu_indicator'></span>&nbsp;</a>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n\t\t\t\t\t</if>\n\t\t\t\t</if>\n\t\t\t\t<span class='ipsType_small'>{$this->lang->words['order']}</span>&nbsp;&nbsp;\n\t\t\t\t<ul class='ipsList_inline ipsType_smaller' style='display: inline'>\n\t\t\t\t\t<li <if test=\"$this->request['search_app_filters'][$current_key]['sortDir'] == 0\">class='active'</if>>\n\t\t\t\t\t\t<a href='{parse url=\"{$url_string}&amp;search_app={$current_key}&amp;search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&amp;search_app_filters[$current_key][sortKey]={$this->request['search_app_filters'][$current_key]['sortKey']}&amp;search_app_filters[$current_key][sortDir]=0\" base=\"public\"}'>{$this->lang->words['s_search_type_o_0']}</a>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li <if test=\"$this->request['search_app_filters'][$current_key]['sortDir'] == 1\">class='active'</if>>\n\t\t\t\t\t\t<a href='{parse url=\"{$url_string}&amp;search_app={$current_key}&amp;search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&amp;search_app_filters[$current_key][sortKey]={$this->request['search_app_filters'][$current_key]['sortKey']}&amp;search_app_filters[$current_key][sortDir]=1\" base=\"public\"}'>{$this->lang->words['s_search_type_o_1']}</a>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t</if>\n\t\t</div>\n\t\t<if test=\"count($sortDropDown) && count($sortDropDown) >= 5\">\n\t\t\t<!-- The menu for changing the sort field -->\n\t\t\t<ul id='search_sort_menucontent' class='ipbmenu_content with_checks' style='display: none'>\n\t\t\t\t<if test=\"IPSSearchRegistry::get('config.contentTypes') AND is_array( IPSSearchRegistry::get('config.contentTypes') )\">\n\t\t\t\t\t<foreach loop=\"$sortDropDown as $k => $l\">\n\t\t\t\t\t\t<li <if test=\"$this->request['search_app_filters'][$current_key][$this->request['search_app_filters'][$current_key]['searchInKey']]['sortKey'] == $k\">class='selected'</if>>\n\t\t\t\t\t\t\t<a href='{parse url=\"{$url_string}&amp;search_app={$current_key}&amp;search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&amp;search_app_filters[$current_key][{$this->request['search_app_filters'][$current_key]['searchInKey']}][sortKey]={$k}&amp;search_app_filters[$current_key][{$this->request['search_app_filters'][$current_key]['searchInKey']}][sortDir]={$this->request['search_app_filters'][$current_key][$this->request['search_app_filters'][$current_key]['searchInKey']]['sortDir']}\" base=\"public\"}'>{$l}</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</foreach>\n\t\t\t\t<else />\n\t\t\t\t\t<foreach loop=\"$sortDropDown as $k => $l\">\n\t\t\t\t\t\t<li <if test=\"$this->request['search_app_filters'][$current_key]['sortKey'] == $k\">class='selected'</if>>\n\t\t\t\t\t\t\t<a href='{parse url=\"{$url_string}&amp;search_app={$current_key}&amp;search_app_filters[{$this->request['search_app']}][searchInKey]={$this->request['search_app_filters'][$this->request['search_app']]['searchInKey']}&amp;search_app_filters[$current_key][sortKey]={$k}&amp;search_app_filters[$current_key][sortDir]={$this->request['search_app_filters'][$current_key]['sortDir']}\" base=\"public\"}'>{$l}</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</foreach>\n\t\t\t\t</if>\n\t\t\t</ul>\n\t\t</if>\n\t\t<div class='ipsBox_container'>\n\t\t\t<if test=\"hasTotal:|:$total\">\n\t\t\t\t{$results}\n\t\t\t<else />\n\t\t\t\t<p class='no_messages'>{$this->lang->words['no_results_found']}<if test=\"noResultsTerm:|:$search_term\"> {$this->lang->words['no_results_found_for']} '{$search_term}'</if>.</p>\n\t\t\t</if>\n\t\t</div>\n\t\t<div class='clearfix'>\n\t\t\t{$pagination}\n\t\t</div>\n\t</div>\n</div>\r\nEOF;\r\n//--endhtml--//\r\nreturn $IPBHTML;\r\n}", "public static function highlight_php($string = '')\n\t\t{\n\t\t\t$string = highlight_string(trim((string)$string), TRUE); // Start with PHP syntax, then Shortcodes.\n\t\t\t$string = preg_replace('/\\[\\/?_*s2[a-z0-9_\\-]+.*?\\]/i', '<span style=\"color:#164A61;\">$0</span>', $string);\n\t\t\treturn str_replace('<code>', '<code class=\"highlight-php\">', $string);\n\t\t}", "function run_btpl_search_relevance() {\n\t$plugin = new Bittemple_Search_Relevance();\n\t$plugin->init();\n}", "function smarty_function_op($params,&$smarty)\n{\n\n require_once $smarty->_get_plugin_filepath('function', 'html_options');\n $class=$params[\"class\"];\n if($class==\"ltgteq\")\n {\n $face=array(\"=\",\">\",\"<\",\">=\",\"<=\");\n $val=array(\"=\",\">\",\"<\",\">=\",\"<=\");\n }\n else if ($class==\"likestr\")\n {\n $val=array(\"equals\",\"like\",\"ilike\",\"starts_with\",\"ends_with\");\n $face=array(\"Equals\",\"Like\",\"ILike\",\"Starts With\",\"Ends With\");\n }\n $selected=(isset($params[\"selected\"]) and isset($_REQUEST[$params[\"selected\"]]))?$_REQUEST[$params[\"selected\"]]:\"\";\n $select_arr=array(\"output\"=>$face,\"values\"=>$val,\"name\"=>$params[\"name\"],\"selected\"=>$selected);\n if(isset($params[\"id\"]))\n $select_arr[\"id\"]=$params[\"id\"];\n return smarty_function_html_options($select_arr,$smarty);\n}", "function enhance_wp_tag_cloud($content) {\r\n\treturn '<p align=\"center\">' . $content . '</p>';\r\n}" ]
[ "0.8028608", "0.783048", "0.66046", "0.6578342", "0.65324086", "0.6372852", "0.6329961", "0.6322366", "0.61186475", "0.6043705", "0.59569335", "0.59206915", "0.5904857", "0.5879596", "0.5789604", "0.5759375", "0.57091266", "0.5682206", "0.5596766", "0.5573278", "0.55549794", "0.55289316", "0.5525754", "0.5503158", "0.5486422", "0.5476056", "0.5400678", "0.53898203", "0.5369106", "0.536856", "0.53557", "0.5347246", "0.5311203", "0.5297215", "0.52865773", "0.52511966", "0.524592", "0.5242533", "0.50844586", "0.5072625", "0.5066443", "0.50625896", "0.5043395", "0.50287956", "0.50287956", "0.49932882", "0.4985217", "0.49652213", "0.4964868", "0.49524817", "0.49521628", "0.49426472", "0.4935828", "0.49244273", "0.49151468", "0.49087873", "0.49060002", "0.4901888", "0.48887995", "0.48646957", "0.48519573", "0.4848965", "0.48485577", "0.48296288", "0.48230988", "0.48163566", "0.48145366", "0.48143747", "0.48123652", "0.48045033", "0.48044384", "0.47951645", "0.47918877", "0.4790512", "0.47898367", "0.47857317", "0.47830525", "0.4765722", "0.4765348", "0.4751847", "0.4734474", "0.47333804", "0.47279352", "0.47252133", "0.4723635", "0.47206074", "0.47158095", "0.47107047", "0.4708662", "0.4706855", "0.47031853", "0.47000006", "0.4690795", "0.4685853", "0.46842033", "0.46800715", "0.46710792", "0.46661386", "0.4661048", "0.46497315" ]
0.7781293
2
helper function q= for Google, p= for Yahoo
function _refererhi() { $referer = parse_url($_SERVER['HTTP_REFERER']); parse_str($referer['query'],$vars); if (isset($vars['q'])) { return $vars['q']; } else if (isset($vars['p'])) { return $vars['p']; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getQuery() ;", "function bq_get_quotes() {\n\t/** These are quotes from A P J Abul Kalam */\n $quotes=[\n \"“স্বপ্ন বাস্তবায়ন না হওয়া পর্যন্ত তোমাকে স্বপ্ন দেখে যেতে হবে” – Abdul Kalam\",\n \"“স্বপ্ন সেটা নয় যেটা তুমি ঘুমিয়ে ঘুমিয়ে দেখো | স্বপ্ন হলো সেটাই যা পূরণের অদম্য ইচ্ছা তোমায় ঘুমাতে দেবে না” – Abdul Kalam\",\n \"“একটা কথা পরিষ্কার, সৃষ্টিকর্তা তাদেরই সহায় থাকেন, যারা কঠোর পরিশ্রম করেন” – Abdul Kalam\",\n \"“যদি সূর্যের মতো উজ্জ্বল হতে চাও, তাহলে তোমাকেই প্রথমে সূর্যের মত পুড়তে হবে” – Abdul Kalam\",\n \"“সফলতার গল্পে কেবল একটা বার্তা থাকে কিন্তু ব্যর্থতার গল্পে সফল হওয়ার উপায় থাকে” – Abdul Kalam\",\n \"“স্বপ্ন দেখতে হবে, স্বপ্ন থেকেই চিন্তার জন্ম হয় আর চিন্তা জন্ম দেয় কাজের” – Abdul Kalam \",\n \"“আমরা শুধু সাফল্যের উপরই গড়ি না, আমরা অসফলতার উপরেও গড়ি” – Abdul Kalam\",\n \"“জটিল কাজে বেশি আনন্দ পাওয়া যায়, তাই সফলতার আনন্দ পাওয়ার জন্য মানুষের কাজ জটিল হওয়া উচিত” – Abdul Kalam\",\n \"“ব্যর্থতা নামক রোগের সবথেকে ভালো অসুধ হলো আত্মবিশ্বাস আর কঠোর পরিশ্রম, এটা আপনাকে একজন সফল মানুষ করে তুলবে” – Abdul Kalam \",\n \"“নির্দিষ্ট লক্ষ্য, ক্রমাগত জ্ঞান সঞ্চয় করা, কঠোর পরিশ্রম ও হার না মানা মনোভাব – এই চারটি জিনিস মেনে চললে যেকোনো কিছুকেই লাভ করা যেতে পারে” – Abdul Kalam\"\n ];\n\n\t// And then randomly choose a line.\n\tprintf(wptexturize( $quotes[ mt_rand( 0, count( $quotes ) - 1 ) ] ));\n}", "function balise_SEO_GWT($p){\n\t$p->code = \"calculer_balise_SEO_GWT()\";\n\treturn $p;\n}", "public function getQueryString() {\n\t\t\n\t}", "function SetUpBasicSearch()\r\n{\r\n\tglobal $sSrchBasic;\r\n\t$sSearch = (!get_magic_quotes_gpc()) ? addslashes(@$_GET[\"psearch\"]) : @$_GET[\"psearch\"];\r\n\t$sSearchType = @$_GET[\"psearchtype\"];\r\n\tif ($sSearch <> \"\") {\r\n\t\tif ($sSearchType <> \"\") {\r\n\t\t\twhile (strpos($sSearch, \" \") != false) {\r\n\t\t\t\t$sSearch = str_replace(\" \", \" \",$sSearch);\r\n\t\t\t}\r\n\t\t\t$arKeyword = split(\" \", trim($sSearch));\r\n\t\t\tforeach ($arKeyword as $sKeyword)\r\n\t\t\t{\r\n\t\t\t\t$sSrchBasic .= \"(\" . BasicSearchSQL($sKeyword) . \") \" . $sSearchType . \" \";\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$sSrchBasic = BasicSearchSQL($sSearch);\r\n\t\t}\r\n\t}\r\n\tif (substr($sSrchBasic, -4) == \" OR \") { $sSrchBasic = substr($sSrchBasic, 0, strlen($sSrchBasic)-4); }\r\n\tif (substr($sSrchBasic, -5) == \" AND \") { $sSrchBasic = substr($sSrchBasic, 0, strlen($sSrchBasic)-5); }\r\n}", "function getYQLURI() {\n global $carray;\n $yqlbase = 'https://query.yahooapis.com/v1/public/yql?q=';\n $currencies = '';\n $yqlbase_trail = \"&diagnostics=true&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys\";\n $length = count($carray);\n for($i=0;$i<$length;$i++) {\n if($i == $length - 1) { // the last element\n $id = $carray[$i];\n $currencies .= '\"GBP'.$id.'\"';\n } else {\n $id = $carray[$i];\n $currencies .= '\"GBP'.$id.'\", ';\n }\n }\n $query = 'select * from yahoo.finance.xchange where pair in ('.$currencies.')';\n $yqlbase .= urlencode($query).$yqlbase_trail;\n return $yqlbase;\n }", "function balise_SEO_GA($p){\n\t$p->code = \"calculer_balise_SEO_GA()\";\n\treturn $p;\n}", "private function parseQueryString()\n {\n $queryString = isset($_GET['q']) ? $_GET['q'] : false;\n return $queryString;\n }", "function get_search_link($query = '')\n {\n }", "function Query ($QueryString);", "abstract protected function queryString(): string;", "private function buildSearchURL($q){\n\t\t$this->searchURL = $this->baseURL;\n\t\t$this->searchURL .= \"?version=\".$this->version;\n\t\t$this->searchURL .= \"&recordSchema=\".$this->recordSchema;\n\t\t$this->searchURL .= \"&query=\".$q;\n\t\t$this->searchURL .= \"&operation=searchRetrieve\";\n\t\t// optinal parameters\n\t\tif(isset($this->recordPacking)) $this->searchURL .= \"&recordPacking=\".$this->recordPacking;\n\t\tif(isset($this->startRecord)) $this->searchURL .= \"&startRecord=\".$this->startRecord;\n\t\tif(isset($this->maximumRecords)) $this->searchURL .= \"&maximumRecords=\".$this->maximumRecords;\n\t}", "function get_quote( $qt_str, $homepage ) {\n $zquote = array();\n $zquote_link = $homepage->get_field($qt_str . '_link');\n $zquote_text = $homepage->get_field($qt_str . '_text');\n $zquote_subhead = $homepage->get_field($qt_str . '_subhead');\n $zquote_number = $homepage->get_field($qt_str . '_number');\n\n if ( isset($zquote_link) && is_array($zquote_link) ) {\n $zquote['post'] = new HechingerPost($zquote_link[0]->ID);\n $zquote['subhead'] = new HechingerPost($zquote_link[0]->ID);\n\n if ( isset($zquote_text) && strlen($zquote_text) ) {\n $zquote['text'] = $zquote_text;\n } else {\n $zquote['text'] = $zquote['post']->title;\n }\n\n if ( isset($zquote_subhead) && strlen($zquote_subhead) ) {\n $zquote['subhead'] = $zquote_subhead;\n } else {\n $zquote['subhead'] = $zquote['post']->tease_excerpt(10);\n }\n\n if ( isset($zquote_number) && strlen($zquote_number) ) {\n if ( strpos($zquote_number, '%') !== false) {\n $zquote['number'] = substr($zquote_number, 0, -1) . '<span class=\"tz-special-precent\">%</span>';\n } else {\n $zquote['number'] = $zquote_number;\n }\n $zquote['show_stat'] = true;\n } else {\n $zquote['show_stat'] = false;\n }\n }\n return $zquote;\n}", "protected function parse_search(&$q)\n {\n }", "abstract protected function getQuery();", "function SI_sniffKeywords($url) { // $url should be an array created by parse_url($ref)\n\tglobal $SI_tables;\t\n\t\n\t// Check for google first\n\tif (preg_match(\"/google\\./i\", $url['host'])) {\n\t\tparse_str($url['query'],$q);\n\t\t// Googles search terms are in \"q\"\n\t\t$searchterms = $q['q'];\n\t\t}\n\telse if (preg_match(\"/alltheweb\\./i\", $url['host'])) {\n\t\tparse_str($url['query'],$q);\n\t\t// All the Web search terms are in \"q\"\n\t\t$searchterms = $q['q'];\n\t\t}\n\telse if (preg_match(\"/yahoo\\./i\", $url['host'])) {\n\t\tparse_str($url['query'],$q);\n\t\t// Yahoo search terms are in \"p\"\n\t\t$searchterms = $q['p'];\n\t\t}\n\telse if (preg_match(\"/search\\.aol\\./i\", $url['host'])) {\n\t\tparse_str($url['query'],$q);\n\t\t// Yahoo search terms are in \"query\"\n\t\t$searchterms = $q['query'];\n\t\t}\n\telse if (preg_match(\"/search\\.msn\\./i\", $url['host'])) {\n\t\tparse_str($url['query'],$q);\n\t\t// MSN search terms are in \"q\"\n\t\t$searchterms = $q['q'];\n\t\t}\n\t\n\tif (isset($searchterms) && !empty($searchterms)) {\n\t\t// Remove BINARY from the SELECT statement for a case-insensitive comparison\n\t\t$exists_query = \"SELECT id FROM $SI_tables[searchterms] WHERE searchterms = BINARY '$searchterms'\";\n\t\t$exists = mysql_query($exists_query);\n\t\t\n\t\tif (mysql_num_rows($exists)) {\n\t\t\t$e = mysql_fetch_array($exists);\n\t\t\t$query = \"UPDATE $SI_tables[searchterms] SET count = (count+1) WHERE id = $e[id]\";\n\t\t\tmysql_query($query);\n\t\t\t}\n\t\telse {\n\t\t\t$query = \"INSERT INTO $SI_tables[searchterms] (searchterms,count) VALUES ('$searchterms',1)\";\n\t\t\tmysql_query($query);\n\t\t\t}\n\t\t}\n\t}", "public function testPreferredStarWithQ() {\n\t\t$available = ['fr', 'de'];\n\n\t\t$yandex = 'ru, uk;q=0.8, be;q=0.8, en;q=0.7, *;q=0.01';\n\t\t$request = new ActionRequest([\n\t\t\t'env' => ['HTTP_ACCEPT_LANGUAGE' => $yandex]\n\t\t]);\n\t\t$result = Locale::preferred($request, $available);\n\t\t$this->assertNull($result);\n\n\t\t$exabot = 'en;q=0.9,*;q=0.8';\n\t\t$request = new ActionRequest([\n\t\t\t'env' => ['HTTP_ACCEPT_LANGUAGE' => $exabot]\n\t\t]);\n\t\t$result = Locale::preferred($request, $available);\n\t\t$this->assertNull($result);\n\t}", "function hashtags_querystring( $query ) {\n\n\t\tif ( ! bp_is_activity_component() || ! isset( $_GET['s'] ) || empty( $_GET['s'] ) ) {\n\t\t\treturn $query;\n\t\t}\n\n\t\tif ( ! empty( $query ) ) {\n\t $query .= '&';\n\t }\n\n\t\t// Query String.\n\t\t$query .= 'display_comments=true&search_terms=' . $_GET['s'];\n\n\t\treturn $query;\n\t}", "function getQuerySettings() ;", "function queryToUrl_min($query, $country=\"US\") {\n return \"http://www.google.com/search?\" . http_build_query(array(\n // Query\n //\"q\" => urlencode($query),\n \"q\" => $query,\n \"tbm\" => \"isch\",\n // Country (geolocation presumably)\n \"gl\" => $country,\n ), true);\n\n }", "public function queryString();", "function wibstats_get_search_phrase($referer)\n{\n $key_start = 0;\n $search_phrase = \"\";\n // used by dogpile, excite, webcrawler, metacrawler\n if (strpos($referer, '/search/web/') !== false) $key_start = strpos($referer, '/search/web/') + 12;\n // used by chubba \n if (strpos($referer, 'arg=') !== false) $key_start = strpos($referer, 'arg=') + 4;\n // used by dmoz \n if (strpos($referer, 'search=') !== false) $key_start = strpos($referer, 'query=') + 7;\n // used by looksmart \n if (strpos($referer, 'qt=') !== false) $key_start = strpos($referer, 'qt=') + 3;\n // used by scrub the web \n if (strpos($referer, 'keyword=') !== false) $key_start = strpos($referer, 'keyword=') + 8;\n // used by overture, hogsearch \n if (strpos($referer, 'keywords=') !== false) $key_start = strpos($referer, 'keywords=') + 9;\n // used by mamma, lycos, kanoodle, snap, whatuseek \n if (strpos($referer, 'query=') !== false) $key_start = strpos($referer, 'query=') + 6;\n // don't allow encrypted key words by aol \n if (strpos($referer, 'encquery=') !== false) $key_start = 0; \n // used by ixquick \n if (strpos($referer, '&query=') !== false) $key_start = strpos($referer, '&query=') + 7;\n // used by aol\n if (strpos($referer, 'qry=') !== false) $key_start = strpos($referer, 'qry=') + 4;\n // used by yahoo, hotbot\n if (strpos($referer, 'p=') !== false) $key_start = strpos($referer, 'p=') + 2;\n // used by google, msn, alta vista, ask jeeves, all the web, teoma, wisenut, search.com\n if (strpos($referer, 'q=') !== false) $key_start = strpos($referer, 'q=') + 2;\n // if present, get the search phrase from the referer\n if ($key_start > 0){ \n if (strpos($referer, '&', $key_start) !== false){\n $search_phrase = substr($referer, $key_start, (strpos($referer, '&', $key_start) - $key_start));\n } elseif (strpos($referer, '/search/web/') !== false){\n if (strpos($referer, '/', $key_start) !== false){\n $search_phrase = urldecode(substr($referer, $key_start, (strpos($referer, '/', $key_start) - $key_start)));\n } else {\n $search_phrase = urldecode(substr($referer, $key_start));\n }\n } else {\n $search_phrase = substr($referer, $key_start);\n } \n } \n $search_phrase = urldecode($search_phrase);\n return $search_phrase;\n}", "function GetQueryString($name, $default=\"\") {\n return ValidRequiredQueryString($name) ? $_GET[$name] : $default;\n}", "function balise_SEO_URL($p){\n\t$p->code = \"calculer_balise_SEO_URL()\";\n\treturn $p;\n}", "function the_search_query()\n {\n }", "public static function search($query)\n\t{\n\t\t$url = 'http://www.google.'.static::$tld.'/m?q='.str_replace(' ', '+', $query); // URI of Google Did You Mean\n\t\t$html = static::curl($url); // Fetch HTML data\n\n\t\t// Extract suggestion and return it if any\n\t\tpreg_match('#spell=1(.*?)>(.*?)</a>#is', $html, $matches);\n\n\t\tif($matches)\n\t\t{\n\t\t\t$spell = strip_tags($matches[2]); \n\t\t\treturn $spell;\n\t\t}\n\t}", "function SearchAllParams_Workshop($whattodo,$where,$howlong,$lowval,$highval,$howmany,$Result_Set,$Per_Page)\r\n{\r\n\t$index = 0;\r\n\t$res=\"\";\r\n\t$unique_res=\"\";\r\n\t\r\n\t//$table = array(\"במבנה ממוזג\\מחומם\" => array( ' פחות מ 50 ש\"ח' =>20 , '50 -100 ש\"ח' =>35 ));\r\n\t//echo $table['במבנה ממוזג\\מחומם'][ '50 -100 ש\"ח'];\r\n\t\r\n\t$query = \"SELECT id FROM workshops WHERE \";\r\n\r\n\t$query .= \"active = 'כן' AND \";\r\n\t\r\n\tif ($whattodo != null) $query .= \"subject = '$whattodo' AND \"; \r\n\telse $query .= \"subject LIKE '%' AND \"; \r\n\t\r\n\tif ($where != null) $query .= \"location = '$where' AND \"; \r\n\telse $query .= \"location LIKE '%' AND \"; \r\n\t\r\n\tif ($howlong != null) $query .= \"time_frame = '$howlong' AND \"; \r\n\telse $query .= \"time_frame LIKE '%' AND \"; \r\n\t\r\n\t//the customer filled price range and how many people are participating\r\n\tif ( ($lowval != null) && ($howmany != null) )\r\n\t{\r\n\t\t//get the place price\r\n\t\tif ($where == null ) $place_price = 0 ;\r\n\t\telse \r\n\t\t\t{\r\n\t\t\t\tif ($where = \"במבנה ממוזג\\מחומם\")\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif ($lowval == 0) $place_price = 20;\r\n\t\t\t\t\t\tif ($lowval == 50) $place_price = 35;\r\n\t\t\t\t\t\tif ($lowval == 150) $place_price = 50;\r\n\t\t\t\t\t\tif ($lowval == 250) $place_price = 75;\r\n\t\t\t\t\t\tif ($lowval == 350) $place_price = 100;\r\n\t\t\t\t\t\tif ($lowval == 500) $place_price = 150;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\tif ($where = \"אצלנו בארגון\") $place_price = 0;\r\n\t\t\t\tif ($where = \"מחוץ לעבודה, במקום מיוחד\")\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif ($lowval == 0) $place_price = 10;\r\n\t\t\t\t\t\tif ($lowval == 50) $place_price = 20;\r\n\t\t\t\t\t\tif ($lowval == 150) $place_price = 40;\r\n\t\t\t\t\t\tif ($lowval == 250) $place_price = 70;\r\n\t\t\t\t\t\tif ($lowval == 350) $place_price = 90;\r\n\t\t\t\t\t\tif ($lowval == 500) $place_price = 100;\r\n\t\t\t\t\t}\r\n\t\t\t\tif ($where = \"ליד הבריכה\")\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif ($lowval == 0) $place_price = 20;\r\n\t\t\t\t\t\tif ($lowval == 50) $place_price = 35;\r\n\t\t\t\t\t\tif ($lowval == 150) $place_price = 50;\r\n\t\t\t\t\t\tif ($lowval == 250) $place_price = 70;\r\n\t\t\t\t\t\tif ($lowval == 350) $place_price = 90;\r\n\t\t\t\t\t\tif ($lowval == 500) $place_price = 100;\r\n\t\t\t\t\t}\r\n\t\t\t\tif ($where = \"על חוף הים\")\t\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif ($lowval == 0) $place_price = 10;\r\n\t\t\t\t\t\tif ($lowval == 50) $place_price = 25;\r\n\t\t\t\t\t\tif ($lowval == 150) $place_price = 35;\r\n\t\t\t\t\t\tif ($lowval == 250) $place_price = 55;\r\n\t\t\t\t\t\tif ($lowval == 350) $place_price = 85;\r\n\t\t\t\t\t\tif ($lowval == 500) $place_price = 120;\r\n\t\t\t\t\t}\r\n\t\t\t\tif ($where = \"נעבור ממקום למקום\") $place_price = 0;\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\r\n\t\t$query .= \"( ((personal_price + $place_price)*$howmany) + fixed_price) BETWEEN ($lowval*$howmany )AND ($highval*$howmany) AND \";\r\n\t\t \r\n\t}\r\n\t\r\n\t\r\n\t\r\n\tif ($howmany != null) $query .= \"minimum_size <= $howmany AND maximum_size >= $howmany \";\r\n\telse $query .= \"minimum_size LIKE '%' \"; \r\n\t$query .= \"\tORDER BY rank DESC \";\r\n\r\n\t\t\r\n\tif (!$Result_Set) \r\n\t { \r\n\t $Result_Set=0; \r\n\t $query.=\" LIMIT $Result_Set, $Per_Page\"; \r\n\t }else \r\n\t { \r\n\t $query.=\" LIMIT $Result_Set, $Per_Page\"; \r\n\t } \r\n\t\r\n\t\r\n\t$result = mysql_query($query) or die(mysql_error());\r\n\twhile ($row = mysql_fetch_row($result))\r\n\t{\r\n\t\t$temp = $row[0];\r\n\t\t$res[$index++] = $temp; // get the current field\r\n\t}\r\n\t\r\n\t\r\n\tif ($res != \"\")\t//we found requested workshops\r\n\t{\r\n\t\t$res = array_unique($res); \t//remove duplicate workshops (so we wont show the same workshop more then one time) \r\n\t\t$index = 0;\r\n\t\t$col = \"id\";\r\n\t\t\r\n\t\t//get the workshope by their id that we found.\r\n\t\tforeach ($res as $selectedworkshop)\r\n\t\t{\t\r\n\t\t\t$query = \"SELECT * FROM workshops WHERE $col=$selectedworkshop \";\r\n\t\t\t$result = mysql_query($query) or die(mysql_error());\r\n\t\t\twhile ($row = mysql_fetch_row($result))\r\n\t\t\t{\r\n\t\t\t\t$unique_res[$index++] = $row; // get the current field\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn $unique_res;\r\n\r\n}", "function qa_q_request($questionid, $title)\n{\n\tif (qa_to_override(__FUNCTION__)) { $args=func_get_args(); return qa_call_override(__FUNCTION__, $args); }\n\n\trequire_once QA_INCLUDE_DIR . 'app/options.php';\n\trequire_once QA_INCLUDE_DIR . 'util/string.php';\n\n\t$title = qa_block_words_replace($title, qa_get_block_words_preg());\n\t$slug = qa_slugify($title, qa_opt('q_urls_remove_accents'), qa_opt('q_urls_title_length'));\n\n\treturn (int)$questionid . '/' . $slug;\n}", "function preferred_language ($available_languages, $http_accept_language=\"auto\") {\n if ($http_accept_language == \"auto\") $http_accept_language = $_SERVER['HTTP_ACCEPT_LANGUAGE'];\n // standard for HTTP_ACCEPT_LANGUAGE is defined under\n // http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4\n // pattern to find is therefore something like this:\n // 1#( language-range [ \";\" \"q\" \"=\" qvalue ] )\n // where:\n // language-range = ( ( 1*8ALPHA *( \"-\" 1*8ALPHA ) ) | \"*\" )\n // qvalue = ( \"0\" [ \".\" 0*3DIGIT ] )\n // | ( \"1\" [ \".\" 0*3(\"0\") ] )\n preg_match_all(\"/([[:alpha:]]{1,8})(-([[:alpha:]|-]{1,8}))?\" .\n \"(\\s*;\\s*q\\s*=\\s*(1\\.0{0,3}|0\\.\\d{0,3}))?\\s*(,|$)/i\",\n $http_accept_language, $hits, PREG_SET_ORDER);\n\n // default language (in case of no hits) is the first in the array\n $bestlang = $available_languages[0];\n $bestqval = 0;\n\n foreach ($hits as $arr) {\n // read data from the array of this hit\n $langprefix = strtolower ($arr[1]);\n if (!empty($arr[3])) {\n $langrange = strtolower ($arr[3]);\n $language = $langprefix . \"-\" . $langrange;\n }\n else $language = $langprefix;\n $qvalue = 1.0;\n if (!empty($arr[5])) $qvalue = floatval($arr[5]);\n\n // find q-maximal language\n if (in_array($language,$available_languages) && ($qvalue > $bestqval)) {\n $bestlang = $language;\n $bestqval = $qvalue;\n }\n // if no direct hit, try the prefix only but decrease q-value by 10% (as http_negotiate_language does)\n else if (in_array($langprefix,$available_languages) && (($qvalue*0.9) > $bestqval)) {\n $bestlang = $langprefix;\n $bestqval = $qvalue*0.9;\n }\n }\n return $bestlang;\n}", "public function search($q);", "public function buildQueryString();", "function param($p, $def=\"\") {\n\t//global $_SERVER, $_SESSION, $_COOKIE, $_REQUEST, $_POST, $_GET;\n\tif (!empty($_SESSION)&&isset($_SESSION[$p])) return $_SESSION[$p];\n\telse if (isset($_COOKIE[$p])) return $_COOKIE[$p];\n\telse if (isset($_REQUEST[$p])) return $_REQUEST[$p];\n\telse if (isset($_POST[$p])) return $_POST[$p];\n\telse if (isset($_GET[$p])) return $_GET[$p];\n\telse return $def;\n}", "function qa_get_canonical()\n{\n\t$params = array();\n\n\t// variable assignment intentional here\n\tif (($start = qa_get_start()) > 0) {\n\t\t$params['start'] = $start;\n\t}\n\tif ($sort = qa_get('sort')) {\n\t\t$params['sort'] = $sort;\n\t}\n\tif ($by = qa_get('by')) {\n\t\t$params['by'] = $by;\n\t}\n\n\treturn qa_path_html(qa_request(), $params, qa_opt('site_url'));\n}", "public function encodeQ($str, $position = 'text')\n {\n }", "function ds_swap_search_parameter($query_string) {\n\n $query_string_array = array();\n\n // convert the query string to an array\n parse_str($query_string, $query_string_array);\n\n // if \"search\" is in the query string\n if(isset($query_string_array['q'])){\n $query_string_array['s'] = $query_string_array['q']; // replace \"s\" with value of \"search\"\n unset($query_string_array['q']); // delete \"search\" from query string\n }\n\n return http_build_query($query_string_array, '', '&'); // Return our modified query variables\n}", "public function setQ($q)\n {\n $this->q = $q;\n }", "public function getQueryString():string;", "public function get_price($q) {\n if (@$this->record->range1) {\n if ($q <= $this->record->range1) {\n return $this->record->price1;\n }\n if ($this->record->range2) {\n if ($q <= $this->record->range2) {\n return $this->record->price2;\n }\n if ($this->record->range3) {\n if ($q <= $this->record->range3) {\n return $this->record->price3;\n }\n if ($this->record->range4) {\n if ($q <= $this->record->range4) {\n return $this->record->price4;\n }\n if ($this->record->range4) {\n if ($q <= $this->record->range4) {\n return $this->record->price4;\n } else {\n return $this->record->price5;\n }\n } else {\n return $this->record->price4;\n }\n } else {\n return $this->record->price4;\n }\n } else {\n return $this->record->price3;\n }\n } else {\n return $this->record->price2;\n }\n } else {\n return @$this->record->price1;\n }\n }", "function bersihGET($papar) \n{\n\t$paparHTML = filter_input(INPUT_GET, $papar, FILTER_SANITIZE_SPECIAL_CHARS);\n\t$paparURL = filter_input(INPUT_GET, $papar, FILTER_SANITIZE_ENCODED);\n\t//$papar = filter_var($_GET[$papar], FILTER_SANITIZE_URL);\n\t\n\t//echo \"You have searched for $paparHTML.\\n\";\n\t//echo \"<a href='?search=$paparURL'>Search again.</a>\";\n \n //return $papar;\n return $paparHTML;\n}", "function toist_eo_hybrid_query_vars( $qvars ){\n\t$qvars[] = 'reviews';\n\treturn $qvars;\n}", "protected function parse_search_order(&$q)\n {\n }", "function booklink($term,$type,$custom=\"\"){\n$texturl=\"http://cat.mfrl.org/uhtbin/cgisirsi.exe/0/CBURG/0/5?searchdata1=%22\";\n$esc_term=str_replace(\" \", \"+\", $term);\n$esc_term= str_replace('&+','',$esc_term);\n$texturl.=$esc_term.\"%22&amp;srchfield1=\";\nif($type==\"t\") $texturl.=\"TI%5ETITLE\";\nif($type==\"texact\") $texturl.=\"TI%5ETITLE&amp;match_on=EXACT\";\nif($type==\"a\") $texturl.=\"AU%5EAUTHOR\";\nif($type==\"i\") $texturl.=\"ISBN\";\nif($type==\"s\") $texturl.=\"GENERAL%5ESUBJECT\";\nif($custom==\"\")$custom=$term;\nif(($type==\"t\")||($type==\"texact\")) $custom=\"<i>\".$custom.\"</i>\";\necho \"<a href=\\\"\".$texturl.\"\\\">\".$custom.\"</a>\";\n\n}", "private function set_qstr($method = '')\n\t{\n\t\t$query_string = 'C=wizard&M='.$method.'&language='.$this->mylang;\n\t\treturn $this->config->item('index_page').'?'.$query_string;\n\t}", "function get_search_query($escaped = \\true)\n {\n }", "public static function getUrlQ()\n {\n if (!isset($_GET['urlq']))\n {\n return BaseConfig::HOME_URL;\n }\n $url = $_GET['urlq'];\n $curl = rtrim(ltrim($url, \"/\"), \"/\");\n return (isset($curl) && valid($curl)) ? $curl : BaseConfig::HOME_URL;\n }", "function googleSearch($ar){\n $p = new XParam($ar, array('tplentry'=>'br'));\n $fs = $p->get('fs');\n $tpl = $p->get('tplentry');\n $ftable = $p->get('ftable');\n $fname = $p->get('fname');\n $fid = $p->get('fid');\n $flatlng = $p->get('flatlng');\n $flatlng = trim($flatlng);\n $foptions = $p->get('foptions');\n $readonly = $p->get('readonly');\n $oid = $p->get('oid');\n // recherche des infos table/champ dans l'EF\n // $fs = $this->getFieldSetupEdit($ar);\n // position initiale reçue sinon defaut\n if (!empty($flatlng) && $flatlng!=';'){\n list($plat, $plng) = explode(';', $flatlng);\n $mlat = $fs['elat'];\n $mlng = $fs['elng'];\n $newpoint = false;\n } elseif (!empty($oid)) {\n /* to do editer l'occurence ? */\n } else {\n $plat = $mlat = $fs['elat'];\n $plng = $mlng = $fs['elng'];\n $newpoint = true;\n }\n // lire le champ ? ... la cle etc\n $res = array('google'=>array('key'=>$this->key),\n\t\t 'map'=>array('zoom'=>$fs['ezoom'], \n\t\t\t 'readonly'=>$readonly,\n\t\t\t 'lng'=>$mlat, \n\t\t\t 'lat'=>$mlng),\n\t\t 'point'=>array('newpoint'=>$newpoint,\n\t\t\t\t'lat'=>$plat,\n\t\t\t\t'lng'=>$plng,\n\t\t\t\t'ftable'=>$ftable,\n\t\t\t\t'fid'=>$fid,\n\t\t\t\t'fname'=>$fname,\n\t\t\t\t'foptions'=>$foptions\n\t\t\t\t),\n\t\t 'maplabels'=>array('normalview'=>XLabels::getSysLabel('xmodmap','normalview', 'text'),\n\t\t\t\t 'physicalview'=>XLabels::getSysLabel('xmodmap','physicalview', 'text'),\n\t\t\t\t 'satelliteview'=>XLabels::getSysLabel('xmodmap','sattelitview', 'text'),\n\t\t\t\t 'hybridview'=>XLabels::getSysLabel('xmodmap','hybridview', 'text'),\n\t\t\t\t 'search'=>XLabels::getSysLabel('general', 'query', 'text'),\n\t\t\t\t 'validate'=>XLabels::getSysLabel('general', 'save', 'text'),\n\t\t\t\t 'quit'=>XLabels::getSysLabel('general', 'close', 'text'),\n\t\t\t\t 'notfound'=>XLabels::getSysLabel('xmodmap', 'unknownaddress', 'text'),\n\t\t\t\t 'centerview'=>XLabels::getSysLabel('xmodmap', 'centerview', 'text')\n\t\t\t\t )\n\t\t );\n return $res;\n }", "private function _askQuestion()\n {\n // Grab the question\n $question = str_replace(\"!question \", \"\", $this->_data->message);\n\n // Create the yql\n $yql = 'select * from answers.search where query=\"'. $question .'\" and type=\"resolved\"';\n \n $array = $this->grabData($yql);\n \n $stuff = $array['query']['results']['Question'];\n if (is_array($stuff)) {\n $answer = $stuff[array_rand($stuff)]['ChosenAnswer'];\n $link = $stuff[array_rand($stuff)]['Link'];\n }\n $this->_message($this->_data->nick.': You asked: '. $question);\n if (!$answer) {\n $this->_message($this->_data->nick.': Sorry, I cannot answer that one! Try asking a simpler question.'); \n }\n else {\n $this->_message($this->_data->nick.': Yahoo! answers says: '. $answer .' ('. $link .')');\n }\n }", "public abstract function getQuery();", "private function getMainQueryString() {\n\t\treturn $this->getQueryStringUsingGenreString(self::genresToQString($this->genres));\n\t}", "function prefered_language ($available_languages,$http_accept_language=\"auto\") { \n // if $http_accept_language was left out, read it from the HTTP-Header \n if ($http_accept_language == \"auto\") $http_accept_language = isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? $_SERVER['HTTP_ACCEPT_LANGUAGE'] : ''; \n\n // standard for HTTP_ACCEPT_LANGUAGE is defined under \n // http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4 \n // pattern to find is therefore something like this: \n // 1#( language-range [ \";\" \"q\" \"=\" qvalue ] ) \n // where: \n // language-range = ( ( 1*8ALPHA *( \"-\" 1*8ALPHA ) ) | \"*\" ) \n // qvalue = ( \"0\" [ \".\" 0*3DIGIT ] ) \n // | ( \"1\" [ \".\" 0*3(\"0\") ] ) \n preg_match_all(\"/([[:alpha:]]{1,8})(-([[:alpha:]|-]{1,8}))?\" . \n \"(\\s*;\\s*q\\s*=\\s*(1\\.0{0,3}|0\\.\\d{0,3}))?\\s*(,|$)/i\", \n $http_accept_language, $hits, PREG_SET_ORDER); \n\n // default language (in case of no hits) is the first in the array \n $bestlang = $available_languages[0]; \n $bestqval = 0; \n\n foreach ($hits as $arr) { \n // read data from the array of this hit \n $langprefix = strtolower ($arr[1]); \n if (!empty($arr[3])) { \n $langrange = strtolower ($arr[3]); \n $language = $langprefix . \"-\" . $langrange; \n } \n else $language = $langprefix; \n $qvalue = 1.0; \n if (!empty($arr[5])) $qvalue = floatval($arr[5]); \n \n // find q-maximal language \n if (in_array($language,$available_languages) && ($qvalue > $bestqval)) { \n $bestlang = $language; \n $bestqval = $qvalue; \n } \n // if no direct hit, try the prefix only but decrease q-value by 10% (as http_negotiate_language does) \n else if (in_array($langprefix,$available_languages) && (($qvalue*0.9) > $bestqval)) { \n $bestlang = $langprefix; \n $bestqval = $qvalue*0.9; \n } \n } \n return $bestlang; \n}", "public function getAsGoogleQuery(){\r\n\t\treturn $this->name . \" \" . $this->address . \" \" . $this->zipCode . \" \" . $this->city;\r\n\t}", "function SetUpBasicSearch()\n{\n\tglobal $sSrchBasic, $psearch, $psearchtype;\n\tif ($psearch <> \"\") {\n\t\tif ($psearchtype <> \"\") {\n\t\t\twhile (strpos($psearch, \" \") != false) {\n\t\t\t\t$psearch = str_replace(\" \", \" \",$psearch);\n\t\t\t}\n\t\t\t$arKeyword = split(\" \", trim($psearch));\n\t\t\tforeach ($arKeyword as $sKeyword) {\n\t\t\t\t$sSrchBasic .= \"(\" . BasicSearchSQL($sKeyword) . \") \" . $psearchtype . \" \";\n\t\t\t}\n\t\t} else {\n\t\t\t$sSrchBasic = BasicSearchSQL($psearch);\n\t\t}\n\t}\n\tif (substr($sSrchBasic, -4) == \" OR \") { $sSrchBasic = substr($sSrchBasic, 0, strlen($sSrchBasic)-4); }\n\tif (substr($sSrchBasic, -5) == \" AND \") { $sSrchBasic = substr($sSrchBasic, 0, strlen($sSrchBasic)-5); }\n\tif ($psearch <> \"\") {\n\t\t$_SESSION[ewSessionTblBasicSrch] = $psearch;\n\t\t$_SESSION[ewSessionTblBasicSrchType] = $psearchtype;\n\t}\n}", "public static function SearchOffer(){\n\n\n\n\t\t}", "function setQueryString($params=NULL){\r\n\t\tif(!$params) $params = array();\r\n\t\t$this->params = $params;\r\n\t\t$this->queryString = http_build_query($params,'','&');\r\n\t\t//Debug::show(\"Setting the query as :$\".$this->queryString);\r\n\t\t//if($params['q']== '') Debug::backTrace();\r\n\t}", "private function get_query_string()\n {\n $query_string = '';\n foreach (explode('&', $_SERVER['QUERY_STRING']) as $key)\n {\n if( !preg_match('/org_openpsa_qbpager/', $key)\n && $key != '')\n {\n $query_string .= '&amp;'.$key;\n }\n }\n return $query_string;\n }", "function tfuse_qtranslate($text) {\r\n $text = html_entity_decode($text, ENT_QUOTES, 'UTF-8');\r\n\r\n\t\t\tif (function_exists('qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage')) {\r\n\t\t\t\t$text = qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage( $text );\r\n\t\t\t}\r\n\t\t\telseif ( function_exists('ppqtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage' ) ) {\r\n\t\t\t\t$text = ppqtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage( $text );\r\n\t\t\t}\r\n elseif ( function_exists('qtranxf_useCurrentLanguageIfNotFoundUseDefaultLanguage' ) ) {\r\n $text = qtranxf_useCurrentLanguageIfNotFoundUseDefaultLanguage( $text );\r\n\t\t\t}\r\n\t\t\telseif ( function_exists( 'icl_object_id' ) && strpos( $text, 'wpml_translate' ) == true ) {\r\n\t\t\t\t$text = do_shortcode( $text );\r\n\t\t\t}\r\n \r\n return $text;\r\n }", "function googleAppendToQuery($fd, &$q, $sep=''){\n $f = (object)$fd;\n $fv = '';\n if (empty($f->value) && !empty($f->default))\n $fv = $f->default;\n else\n $fv = $f->value;\n if (!empty($fv)){\n $fv = preg_replace('/,/', '', $fv);\n if (empty($q))\n\t$q = $fv;\n else\n\t$q .= $sep.$fv;\n }\n }", "function getCorrectedQueryString() {\n\t\tif (io::strpos($this->_correctedQueryString, ' language:'.$this->_language) !== false) {\n\t\t\treturn io::htmlspecialchars(str_replace(' language:'.$this->_language, '', $this->_correctedQueryString)); \n\t\t}\n\t\treturn io::htmlspecialchars($this->_correctedQueryString);\n\t}", "public function getQ()\n {\n return $this->q;\n }", "public function queryString() : string;", "function tep_is_set_faq_question($current_category_id,$qid,$site_id,$search='',$page=1){\n if(isset($search) && $search) {\n $query_raw = \"select \n fqd.is_show,\n fq2c.faq_category_id,\n fqd.faq_question_id,\n fqd.romaji,\n fqd.ask,\n fqd.keywords,\n fqd.answer,\n fq.sort_order,\n fq.created_at,\n fq.updated_at,\n fqd.site_id \n from \".TABLE_FAQ_QUESTION.\" fq, \n \".TABLE_FAQ_QUESTION_DESCRIPTION.\" fqd ,\n \".TABLE_FAQ_QUESTION_TO_CATEGORIES.\" fq2c \n where fq.id = fqd.faq_question_id \n and fq.id = fq2c.faq_question_id \n and fqd.ask like '%\".$search.\"%' \n and fqd.site_id ='0' \n order by fq.sort_order,fqd.ask,fq.id \n \";\n }else if(isset($site_id)&&$site_id){\n $query_raw = \"select * from (\n select \n fqd.is_show,\n fq2c.faq_category_id,\n fqd.faq_question_id,\n fqd.romaji,\n fqd.ask,\n fqd.keywords,\n fqd.answer,\n fq.sort_order,\n fq.created_at,\n fq.updated_at,\n fqd.site_id \n from \".TABLE_FAQ_QUESTION.\" fq, \n \".TABLE_FAQ_QUESTION_DESCRIPTION.\" fqd ,\n \".TABLE_FAQ_QUESTION_TO_CATEGORIES.\" fq2c \n where fq.id = fqd.faq_question_id \n and fq.id = fq2c.faq_question_id \n and fq2c.faq_category_id = '\". $current_category_id . \"' \n order by fqd.site_id DESC\n ) c \n where site_id = \".((isset($site_id) &&\n $site_id)?$site_id:0).\" \n or site_id = 0 \n group by c.faq_question_id \n order by c.sort_order,c.ask,c.faq_question_id \n \";\n }else{\n $query_raw = \"select * from (\n select \n fqd.is_show,\n fq2c.faq_category_id,\n fqd.faq_question_id,\n fqd.romaji,\n fqd.ask,\n fqd.keywords,\n fqd.answer,\n fq.sort_order,\n fq.created_at,\n fq.updated_at,\n fqd.site_id \n from \".TABLE_FAQ_QUESTION.\" fq, \n \".TABLE_FAQ_QUESTION_DESCRIPTION.\" fqd ,\n \".TABLE_FAQ_QUESTION_TO_CATEGORIES.\" fq2c \n where fq.id = fqd.faq_question_id \n and fq.id = fq2c.faq_question_id \n and fq2c.faq_category_id = '\". $current_category_id . \"' \n order by fqd.site_id DESC\n ) c \n group by c.faq_question_id \n order by c.sort_order,c.ask,c.faq_question_id \n \";\n }\n $split = new splitPageResults($page,MAX_DISPLAY_FAQ_ADMIN,\n $query_raw,$query_number);\n $query = tep_db_query($query_raw);\n while($res = tep_db_fetch_array($query)){\n if($res['faq_question_id']==$qid){\n return true;\n }\n }\n return false;\n }", "function searchSong($keywords){\r\n\t//returns an array of the following keys\r\n\t//string 'title' : title of the song\r\n\t//string 'artist' : artist of the song\r\n\t//int 'trackId' : iTunes specific trackId of the specific song\r\n\t//string 'link' : encoded link with specific affiliate tags already on\r\n\t//string 'artworkUrl' : link to image of artwork of the song\r\n\t//string 'previewUrl' : link to the mp4 30s-60s preview of the song\r\n\t//string 'amazonLink' : encoded link to Amazon product with specific affiliate tags in\r\n\t//string 'message' : either OK, or NOT FOUND\r\n\t\r\n\t/*\r\n\t$itunesArr = searchItunesSong($keywords);\r\n\tif (!$itunesArr['link']) return array('message'=>'NOT FOUND');\r\n\telse{\r\n\t\t$url = searchAmazonSong($itunesArr['title'].\" \".$itunesArr['artist']);\r\n\t\t$itunesArr['message'] = 'OK';\r\n\t\t$itunesArr['amazonLink']=$url;\r\n\t\treturn $itunesArr;\r\n\t}\r\n\t*/\r\n\t$lastfm_results = getLastFmSearchResults($keywords);\r\n\t$title = $lastfm_results[0]['name'];\r\n\t$artist = $lastfm_results[0]['artist'];\r\n\t$posterUrl = $lastfm_results[0]['image'][1];\r\n\t$lastFmUrl = $lastfm_results[0]['url'];\r\n\t//$xml = getXMLresponse('DigitalMusic',$keywords);\r\n\t//$title = getTitle($xml);\r\n\t//$artist = getArtist($xml);\r\n\t\r\n\t$title = trim(preg_replace('/\\s*\\([^)]*\\)/', '', $title)); //remove all paren itmes\r\n\t$title = trim(preg_replace('/\\s*\\[[^)]*\\]/', '', $title));\t//remove all bracekt items\r\n\t$artist = trim(preg_replace('/\\s*\\([^)]*\\)/', '', $artist));\t//remove all paren items\r\n\t$artist = trim(preg_replace('/\\s*\\[[^)]*\\]/', '', $artist));\t//remove all bracket items\r\n\tif (!$artist){\r\n\t\treturn array('message'=>'NOT FOUND');\r\n\t} \r\n\telse{\r\n\t\r\n\t$itunesArr = searchItunesSong(\"$title $artist\");\r\n\tif (!$itunesArr['link']) return array('message'=>'NOT FOUND');\r\n\telse{\r\n\t\t//$url = searchAmazonSong($itunesArr['title'].\" \".$itunesArr['artist']);\r\n\t\t$url = searchAmazonSong($title.\" \".$artist);\r\n\t\tif ($itunesArr['previewUrl']==''){\r\n\t\t\t$lastFmPreview = getPreviewUrl($lastFmUrl);\r\n\t\t\t$itunesArr['previewUrl'] = $lastFmPreview;\r\n\t\t}\r\n\t\t$itunesArr['title'] = $title;\r\n\t\t$itunesArr['artist'] = $artist;\r\n\t\t$itunesArr['message'] = 'OK';\r\n\t\t$itunesArr['amazonLink']=$url;\r\n\t\t$itunesArr['artworkUrl']=$posterUrl;\r\n\t\treturn $itunesArr;\r\n\t}\r\n\t}\r\n}", "function media_bynder_parse_facet_link($query) {\n $pattern = '/\\+\\([A-Za-z0-9 ]*\\)/';\n preg_match($pattern, $query, $matches);\n $query = urlencode($query);\n if (!empty($matches)) {\n $query = $query . '&search=' . substr(trim($matches[0]), 2, -1);\n }\n\n return $query;\n}", "function wptexturize_primes($haystack, $needle, $prime, $open_quote, $close_quote)\n {\n }", "private function _synth_start_url($query){\n\t\t$REQ = json_decode($query['ep'],true);\n\t\t$this->dockey = (trim(@$REQ['key']))?:'services';\n\t\t$this->terms = (trim(@$REQ['terms']))?:'';\n\t\t$this->location = (trim(@$REQ['location']))?:'';\n\n\t\t$encq = urlencode(sprintf('%s NEAR:%s',$this->terms,$this->location));\n\t\t$this->url = sprintf('%s?q=%s&ie=utf-8&oe=utf-8',$this->base,$encq);\n\t}", "function qform_search_result($def, $cfg, $list_mode = false)\n{\n global $config, $lang, $tpl_section, $tpl_block, $txt;\n\n // init\n $keyword = get_param('keyword');\n $search_by = get_param('search_by');\n $start = date_param('start_date');\n $end = date_param('end_date');\n $andor = get_param('andor');\n $filter_by = get_param('filter_by');\n $orderby = get_param('orderby');\n $sortby = get_param('sortby');\n $p = get_param('p');\n $script = str_replace('&', '&amp;', $_SERVER['REQUEST_URI']);\n\n // remove + from search_by\n $d = explode('+', $search_by);\n $search_by = $d[0];\n\n // explode search_key to array\n $j = $jj = array();\n $i = 0;\n $a = explode(',', $cfg['search_key']);\n foreach ($a as $b => $c) {\n $d = explode('+', $c);\n if (!empty($d[1])) {\n $e = $d;\n array_shift($e);\n foreach ($e as $f => $g) {\n $jj[$i] = $g;\n }\n $j[$i] = $d[0];\n } else {\n $j[$i] = $c;\n }\n $i++;\n }\n $cfg['search_key'] = implode(',', $j);\n if (!empty($jj)) {\n $cfg['search_key'] = $cfg['search_key'].','.implode(',', $jj);\n }\n\n // result masking\n if (!empty($cfg['search_result_mask'])) {\n $k = explode(',', $cfg['search_result_mask']);\n $result_mask = array_pair($j, $k);\n }\n\n // result url masking\n if (!empty($cfg['search_result_url'])) {\n $k = explode(',', $cfg['search_result_url']);\n $result_url = array_pair($j, $k);\n }\n\n // Prepare layout\n if (empty($cfg['action'])) {\n $t = parse_url(urldecode(cur_url()));\n $cfg['action'] = basename($t['path']);\n }\n\n // create title\n $cfg['block_title'] = $cfg['block_result'] = '';\n $k = explode(',', $cfg['search_key_mask']);\n $cfg['colspan'] = count($k) + 1;\n $foo = 0;\n\n $sort_def = array_pair($j, $j);\n $sort = sortby_icon($sort_def);\n\n foreach ($k as $val) {\n $fiel = $j[$foo];\n $t['align'] = 'left';\n $t['title'] = $val;\n $t['sortby'] = $sort['sortby_'.$fiel];\n\n // cell title formatting\n if (!empty($def[$fiel]['format'])) {\n $format = $def[$fiel]['format'];\n } else {\n $format = 'default';\n }\n if (substr($format, 0, 7) == 'numeric') {\n $t['align'] = 'right';\n } elseif ($format == 'currency') {\n $t['align'] = 'right';\n }\n $cfg['block_title'] .= quick_tpl($tpl_section['qform_search_title_row'], $t);\n $foo++;\n }\n\n // 'edit' label\n if ($cfg['cmd_update_enable']) {\n $cfg['block_title'] .= quick_tpl($tpl_section['qform_search_edit_title'], $t);\n }\n\n // build search query\n $cfg['keyword'] = $keyword;\n $sql_where = '';\n $key = strtok($keyword, \" \");\n while ($key) {\n $sql_where .= \"$search_by LIKE '%\".$key.\"%' AND \";\n $key = strtok(\" \");\n }\n $sql_where = '('.substr($sql_where, 0, -5).')';\n\n // date param\n if ($andor == 'and') {\n $andor = 'AND';\n } else {\n $andor = 'OR';\n }\n if (!empty($start) && empty($end)) {\n $sql_where .= \" $andor ($cfg[search_date_field] >= '$start')\";\n }\n if (!empty($start) && !empty($end)) {\n $sql_where .= \" $andor ($cfg[search_date_field] >= '$start' AND $cfg[search_date_field] <= '$end')\";\n }\n\n // apply filter\n $filq = '';\n if ($filter_by) {\n $filb = explode(',', $cfg['search_filterby']);\n array_unshift($filb, 'Dummy');\n $filq = str_replace('|', ',', $filb[$filter_by]);\n $sql_where = \"($sql_where) AND ($filq)\";\n }\n\n // hidden filter\n if (!empty($cfg['search_hidden_filter'])) {\n $sql_where .= empty($sql_where) ? \"($cfg[search_hidden_filter])\" : \" AND ($cfg[search_hidden_filter]) \";\n $filq .= empty($filq) ? \"($cfg[search_hidden_filter])\" : \" AND ($cfg[search_hidden_filter]) \";\n }\n\n // search!\n if ($orderby == 'd') {\n $orderby = 'DESC';\n } else {\n $orderby = 'ASC';\n }\n if (empty($sortby)) {\n $sss = '';\n } else {\n $sss = \"$sortby $orderby\";\n }\t\t\t\t// sql sort method\n\n // if list_mode, simply replace sql_where with filq (filter)\n if ($list_mode) {\n $result = sql_multipage($cfg['table'], $cfg['search_key'], $filq, $sss, $p);\n } else {\n $result = sql_multipage($cfg['table'], $cfg['search_key'], $sql_where, $sss, $p);\n }\n\n // create result\n foreach ($result as $val) {\n $tmp = '';\n\n foreach ($val as $key => $value) {\n if (in_array($key, $j) && !empty($key)) {\n // get field type\n foreach ($def as $t) {\n if ($t['field'] == $key) {\n $type = $t['type'];\n if (!empty($t['format'])) {\n $format = $t['format'];\n } else {\n $format = 'default';\n }\n }\n }\n\n // filter output\n $t['align'] = 'left';\n $t['result'] = $value;\n\n if (empty($type)) {\n $type = '';\n }\n if ($type == 'date') {\n $format = 'date';\n }\n if (($type == 'wysiwyg') || ($type == 'text') || ($type == 'code')) {\n $t['result'] = line_wrap(strip_tags($t['result']), 200);\n }\n if (($type == 'image') || ($type == 'img') || ($type == 'image_resize') || ($type == 'img_resize')) {\n if (!empty($t['result'])) {\n $t['result'] = '<img src=\"'.$cfg['img_folder'].'/'.$t['result'].'\" alt=\"'.$t['result'].'\" width=\"150\" />';\n }\n }\n if (($type == 'thumb')) {\n if (!empty($t['result'])) {\n $t['result'] = '<img src=\"'.$cfg['thumb_folder'].'/'.$t['result'].'\" alt=\"'.$t['result'].'\" width=\"150\" />';\n }\n }\n // cell content formatting\n if (substr($format, 0, 7) == 'numeric') {\n $digit = substr($format, 8);\n $t['result'] = num_format($t['result'], $digit);\n $t['align'] = 'right';\n }\n if ($format == 'date') {\n $t['result'] = convert_date($t['result']);\n }\n if ($format == 'currency') {\n $t['result'] = num_format($t['result'], 0, 1);\n $t['align'] = 'right';\n }\n\n\n // apply mask\n if (!empty($result_mask[$key])) {\n $qw = $result_mask[$key];\n global $$qw;\n if (isset(${$qw}[$t['result']])) {\n $t['result'] = ${$qw}[$t['result']];\n } else {\n $t['result'] = '';\n }\n }\n\n // apply url mask\n if (!empty($result_url[$key])) {\n $t['result'] = sprintf($lang['l_open_url'], str_replace('__KEY__', $t['result'], $result_url[$key]), $t['result']);\n }\n\n // output\n if (substr($t['result'], 0, 6) == 'guest*') {\n $t['result'] = '(Guest)';\n }\n\n // see if current result row has sub_result\n $j_idx = array_search($key, $j);\n if (!empty($jj[$j_idx])) {\n $t['result'] = '<b>'.$t['result'].'</b><br />'.$val[$jj[$j_idx]];\n }\n\n $tmp .= quick_tpl($tpl_section['qform_search_result_row'], $t);\n }\n }\n\n $t['primary_val'] = $val[$cfg['primary_key']];\n $t['action'] = $cfg['action'];\n $t['edit_target'] = '_self';\n\n if ($cfg['cmd_update_enable']) {\n if (empty($cfg['search_edit'])) {\n $t['edit_url'] = \"$cfg[action]id=$t[primary_val]\";\n } else {\n $t['edit_url'] = str_replace('__KEY__', $t['primary_val'], $cfg['search_edit']);\n if (!empty($cfg['search_edit_target'])) {\n $t['edit_target'] = $cfg['search_edit_target'];\n }\n }\n $tmp .= quick_tpl($tpl_section['qform_search_edit_result'], $t);\n }\n $cfg['block_result'] .= '<tr>'.$tmp.'</tr>';\n }\n\n // pagination\n $cfg['pagination'] = $txt['pagination'];\n\n // new item\n $cfg['new_item_form'] = '';\n $cfg['add_button_label'] = empty($cfg['add_button_label']) ? 'Add New Entry' : $cfg['add_button_label'];\n\n if (!empty($cfg['cmd_new_enable'])) {\n $cfg['new_item_form'] = quick_tpl($tpl_section['qform_new_item'], $cfg);\n }\n\n $result = quick_tpl($tpl_section['qform_search_result'], $cfg);\n\n // additional header & footer\n if (!empty($cfg['footer'])) {\n $result = $result.$cfg['footer'];\n }\n\n return $result;\n}", "function xgb_generate_quote() {\n\t$quote_collection = array(\n\t\t\t'A pipe gives a wise man time to think and a fool something to put in his mouth.',\n\t\t\t'Never underestimate the power of human stupidity.',\n\t\t\t'Whatever goes around, comes around.',\n\t\t\t'Gold is for the mistress - silver for the maid - Copper for the craftsman, cunning at his trade. But Iron - Cold Iron - is master of them all.',\n\t\t\t'The number of people who agree or disagree with you has absolutely no bearing on whether youre *right*. The universe has a way of deciding that for itself.',\n\t\t\t'The truth of any proposition has nothing to do with its credibility...and vice versa.',\n\t\t\t'Money is a powerful aphrodisiac. But flowers work almost as well.',\n\t\t\t'It may be better to be a live jackal than a dead lion, but it is better still to be a live lion. And usually easier.',\n\t\t\t'Place your clothes and weapons where you can find them in the dark.',\n\t\t\t'An Elephant; A Mouse built to government specifications.',\n\t\t\t'Democracy is based on the assumption that a million men are wiser than one man. Hows that again? I missed something.',\n\t\t\t'Autocracy is based on the assumption that one man is wiser than a million men. Lets play that over again too. Who decides?',\n\t\t\t'Taxes are not levied for the benefit of the taxed.',\n\t\t\t'Money is the sincerest form of flattery.',\n\t\t\t'Women love to be flattered. So do men.',\n\t\t\t'You live and learn. Or you dont live long.',\n\t\t\t'Only a sadistic scoundrel - or a fool - tells the bald truth on social occasions.',\n\t\t\t'Be wary of strong drink. It can make you shoot at tax collectors - and miss.',\n\t\t\t'Natural laws have no pity.',\n\t\t\t'Sin lies only in hurting other people unnecessarily. All other sins are invented nonsense.',\n\t\t\t'Certainly the game is rigged. Dont let that stop you. If you dont bet, you cant win.',\n\t\t\t'Never appeal to a mans better nature. He may not have one. Invoking his self-interest gives you more leverage.',\n\t\t\t'A woman is not a property. Husbands who think otherwise are living in a dreamworld.',\n\t\t\t'Formal courtesy between husband and wife is even more important than it is between strangers.',\n\t\t\t'Your friends will know you better in the first minute you meet then your acquaintances will know you in a thousand years.',\n\t\t\t'Argue for your limitations and, sure enough, theyre yours.',\n\t\t\t'You are never given a wish without also being given the power to make it come true. You may have to work for it though.',\n\t\t\t'Here is a test to find out whether your mission on earth is finished; If youre alive, it isnt.',\n\t\t\t'In order to live free and happily, you must sacrifice boredom. It is not always an easy sacrifice.',\n\t\t\t'Believe it and you are half way there. ~Theodore Roosevelt',\n\t\t\t'There is no limit to how gently you can apply a big hammer, but there definitely is to how hard you can hit with a small one.',\n\t\t\t'Every man is born as many men and dies as a single one. ~Martin Heidegger ',\n\t\t\t'Language is the house of the truth of Being. ~Martin Heidegger ',\n\t\t\t'Man acts as though he were the shaper and master of language, while in fact language remains the master of man. ~Martin Heidegger',\n\t\t\t'The most thought-provoking thing in our thought-provoking time is that we are still not thinking. ~Martin Heidegger ',\n\t\t\t'The possible ranks higher than the actual. ~Martin Heidegger',\n\t\t\t'Unless you change how you are, you will always have what you have got. ~Jim Rohn ',\n\t\t\t'A stumble may prevent a fall. ~English Proverb',\n\t\t\t'There is no limit to what a man can achieve, if he doesnt care who gets the credit. ~Laing Burns, Jr.',\n\t\t\t'Dont waste yourself in rejection, nor bark against the bad, but chant the beauty of the good. ~Ralph Waldo Emerson',\n\t\t\t'The most practical, beautiful, workable philosophy in the world wont work - if you wont. ~Zig Ziglar ',\n\t\t\t'I believe the greater the handicap, the greater the triumph. ~John H. Johnson ',\n\t\t\t'Life shrinks or expands in proportion to ones courage. ~Anais Nin',\n\t\t\t'We dont see things as they are we see them as we are. ~Anais Nin',\n\t\t\t'You cant build a reputation on what you are going to do. ~Henry Ford',\n\t\t\t'The greatest form of maturity is at harvest time. That is when we must learn how to reap without complaint if the amounts are small and how to to reap without apology if the amounts are big. ~Jim Rohn ',\n\t\t\t'People seem not to see that their opinion of the world is also a confession of character. ~Ralph Waldo Emerson',\n\t\t\t'The most successful people are those who are good at plan B. ~James Yorke',\n\t\t\t'Opportunity is missed by most because it is dressed in overalls and looks like work. ~Thomas Alva Edison',\n\t\t\t'The universe is full of magical things, patiently waiting for our wits to grow sharper. ~Eden Phillpotts',\n\t\t\t'Experience is not what happens to a man, it is what a man does with what happens to him. ~Aldous Huxley',\n\t\t\t'Imagination rules the world. ~Napoleon Bonaparte',\n\t\t\t'Adversity has the effect of eliciting talents which, in prosperous circumstances, would have lain dormant. ~Horace',\n\t\t\t'It isnt that they cant see the solution, its that they cant see the problem. ~G.K. Chesterton',\n\t\t\t'Facts are stubborn, but statistics are more pliable. ~Mark Twain ',\n\t\t\t'All truth goes through three steps: First, it is ridiculed. Second, it is violently opposed. Finally, it is accepted as self-evident. ~Arthur Schopenhauer ',\n\t\t\t'An invasion of armies can be resisted; an invasion of ideas cannot be resisted. ~Victor Hugo ',\n\t\t\t'Pain is inevitable but misery is optional. ~Barbara Johnson ',\n\t\t\t'Beware of defining as intelligent only those who share your opinions. ~Ugo Ojetti ',\n\t\t\t'If we knew what it was we were doing, it would not be called research, would it? ~Albert Einstein ',\n\t\t\t'To believe a thing is impossible is to make it so. ~French proverb',\n\t\t\t'Simplicity is the ultimate sophistication. ~Leonardo da Vinci ',\n\t\t\t'To be simple is to be great. ~Ralph Waldo Emerson ',\n\t\t\t'The trouble about man is twofold. He cannot learn truths which are too complicated; he forgets truths which are too simple. ~Dame Rebecca West ',\n\t\t\t'Everything should be as simple as it is, but not simpler. ~Albert Einstein ',\n\t\t\t'That you may retain your self-respect, it is better to displease the people by doing what you know is right, than to temporarily please them by doing what you know is wrong. ~William J. H. Boetcker ',\n\t\t\t'Many of lifes failures are people who did not realize how close they were to success when they gave up. ~Thomas Edison',\n\t\t\t'Hitch your wagon to a star. ~Ralph Waldo Emerson ',\n\t\t\t'If you knew how much work went into it, you wouldnt call it genius. ~Michelangelo',\n\t\t\t'I know God will not give me anything I cant handle. I just wish that He didnt trust me so much. ~Mother Teresa ',\n\t\t\t'If we did the things we are capable of, we would astound ourselves. ~Thomas Edison ',\n\t\t\t);\n\t\n\t$quote = $quote_collection[array_rand($quote_collection)];\n\treturn $quote;\n}", "private function getQueryString()\n {\n return \\apply_filters('swiftype_search_query_string', stripslashes(\\get_search_query(false)));;\n }", "function qa_initialize_constants_2()\n{\n\t// Default values if not set in qa-config.php\n\n\t$defaults = array(\n\t\t'QA_COOKIE_DOMAIN' => '',\n\t\t'QA_HTML_COMPRESSION' => true,\n\t\t'QA_MAX_LIMIT_START' => 19999,\n\t\t'QA_IGNORED_WORDS_FREQ' => 10000,\n\t\t'QA_ALLOW_UNINDEXED_QUERIES' => false,\n\t\t'QA_OPTIMIZE_LOCAL_DB' => true,\n\t\t'QA_OPTIMIZE_DISTANT_DB' => false,\n\t\t'QA_PERSISTENT_CONN_DB' => false,\n\t\t'QA_DEBUG_PERFORMANCE' => false,\n\t);\n\n\tforeach ($defaults as $key => $def) {\n\t\tif (!defined($key)) {\n\t\t\tdefine($key, $def);\n\t\t}\n\t}\n\n\t// Start performance monitoring\n\n\tif (QA_DEBUG_PERFORMANCE) {\n\t\tglobal $qa_usage;\n\t\t$qa_usage = new Q2A_Util_Usage;\n\t\t// ensure errors are displayed\n\t\t@ini_set('display_errors', 'On');\n\t}\n\n\t// More for WordPress integration\n\n\tif (defined('QA_FINAL_WORDPRESS_INTEGRATE_PATH')) {\n\t\tdefine('QA_FINAL_MYSQL_HOSTNAME', DB_HOST);\n\t\tdefine('QA_FINAL_MYSQL_USERNAME', DB_USER);\n\t\tdefine('QA_FINAL_MYSQL_PASSWORD', DB_PASSWORD);\n\t\tdefine('QA_FINAL_MYSQL_DATABASE', DB_NAME);\n\t\tdefine('QA_FINAL_EXTERNAL_USERS', true);\n\n\t\t// Undo WordPress's addition of magic quotes to various things (leave $_COOKIE as is since WP code might need that)\n\n\t\tfunction qa_undo_wordpress_quoting($param, $isget)\n\t\t{\n\t\t\tif (is_array($param)) { //\n\t\t\t\tforeach ($param as $key => $value)\n\t\t\t\t\t$param[$key] = qa_undo_wordpress_quoting($value, $isget);\n\n\t\t\t} else {\n\t\t\t\t$param = stripslashes($param);\n\t\t\t\tif ($isget)\n\t\t\t\t\t$param = strtr($param, array('\\\\\\'' => '\\'', '\\\"' => '\"')); // also compensate for WordPress's .htaccess file\n\t\t\t}\n\n\t\t\treturn $param;\n\t\t}\n\n\t\t$_GET = qa_undo_wordpress_quoting($_GET, true);\n\t\t$_POST = qa_undo_wordpress_quoting($_POST, false);\n\t\t$_SERVER['PHP_SELF'] = stripslashes($_SERVER['PHP_SELF']);\n\n\t} elseif (defined('QA_FINAL_JOOMLA_INTEGRATE_PATH')) {\n\t\t// More for Joomla integration\n\t\t$jconfig = new JConfig();\n\t\tdefine('QA_FINAL_MYSQL_HOSTNAME', $jconfig->host);\n\t\tdefine('QA_FINAL_MYSQL_USERNAME', $jconfig->user);\n\t\tdefine('QA_FINAL_MYSQL_PASSWORD', $jconfig->password);\n\t\tdefine('QA_FINAL_MYSQL_DATABASE', $jconfig->db);\n\t\tdefine('QA_FINAL_EXTERNAL_USERS', true);\n\t} else {\n\t\tdefine('QA_FINAL_MYSQL_HOSTNAME', QA_MYSQL_HOSTNAME);\n\t\tdefine('QA_FINAL_MYSQL_USERNAME', QA_MYSQL_USERNAME);\n\t\tdefine('QA_FINAL_MYSQL_PASSWORD', QA_MYSQL_PASSWORD);\n\t\tdefine('QA_FINAL_MYSQL_DATABASE', QA_MYSQL_DATABASE);\n\t\tdefine('QA_FINAL_EXTERNAL_USERS', QA_EXTERNAL_USERS);\n\t}\n\n\tif (defined('QA_MYSQL_PORT')) {\n\t\tdefine('QA_FINAL_MYSQL_PORT', QA_MYSQL_PORT);\n\t}\n\n\t// Possible URL schemes for Q2A and the string used for url scheme testing\n\n\tdefine('QA_URL_FORMAT_INDEX', 0); // http://...../index.php/123/why-is-the-sky-blue\n\tdefine('QA_URL_FORMAT_NEAT', 1); // http://...../123/why-is-the-sky-blue [requires .htaccess]\n\tdefine('QA_URL_FORMAT_PARAM', 3); // http://...../?qa=123/why-is-the-sky-blue\n\tdefine('QA_URL_FORMAT_PARAMS', 4); // http://...../?qa=123&qa_1=why-is-the-sky-blue\n\tdefine('QA_URL_FORMAT_SAFEST', 5); // http://...../index.php?qa=123&qa_1=why-is-the-sky-blue\n\n\tdefine('QA_URL_TEST_STRING', '$&-_~#%\\\\@^*()][`\\';=:|\".{},!<>?# π§½Жש'); // tests escaping, spaces, quote slashing and unicode - but not + and /\n}", "public function GetDomainkeywords($domain){\r\n \t//$domain=\"http://\".$domain;\r\n $url=\"http://widget.semrush.com/widget.php?action=report&type=organic&db=co.in&domain=$domain\";\r\n $google_search = file_get_contents($url);\r\n $seo_data=json_decode($google_search,true);\r\n\r\n $c_array=array();\r\n\r\n if (is_array($seo_data['organic']['data']))\r\n {\r\n /* foreach ($seo_data['organic_organic']['data'] as $key=>$value)\r\n {\r\n $com=$seo_data['organic_organic']['data'][$key]['Dn'];\r\n array_push($c_array, $com);\r\n\r\n }*/\r\n $c_array=$seo_data['organic']['data'];\r\n return $c_array;\r\n }\r\n return false;\r\n }", "function driver_get($keyword, $option = array());", "public static function googleArray($query)\r\n\t{\r\n\t\t$result = array ();\r\n\t\t$pages = 1;\r\n\t\t$delay = 0;\r\n\t\tfor($start=0;$start<$pages;$start++)\r\n\t\t{\r\n\t\t\t$url = 'http://www.google.'. GOOGLE_TLD .'/custom?q='.$query.'&filter=0'.\r\n\t\t\t\t '&num=100'.(($start == 0) ? '' : '&start='.$start.'00');\r\n\t\t\t$str = SEOstats::cURL($url);\t\t\t\r\n\t\t\tif (preg_match(\"#answer=86640#i\", $str))\r\n\t\t\t{\r\n\t\t\t\t$e = 'Please read: http://www.google.com/support/websearch/' .\r\n\t\t\t\t\t 'bin/answer.py?&answer=86640&hl=en';\r\n\t\t\t\tthrow new SEOstatsException($e);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$html = new DOMDocument();\r\n\t\t\t\t@$html->loadHtml( $str );\r\n\r\n\t\t\t\t$xpath = new DOMXPath( $html );\r\n\t\t\t\t$links = $xpath->query( \"//div[@class='g']//a\" );\r\n\t\t\t\t$descs = $xpath->query( \"//td[@class='j']//div[@class='std']\" );\r\n\t\t\t\t$i = 0;\r\n\t\t\t\tforeach ( $links as $link )\r\n\t\t\t\t{\r\n\t\t\t\t\tif(!preg_match('#cache#si',$link->textContent) && \r\n\t\t\t\t\t !preg_match('#similar#si',$link->textContent))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$result []= array(\r\n\t\t\t\t\t\t\t'url' => $link->getAttribute('href'), \r\n\t\t\t\t\t\t\t'title' => utf8_decode($link->textContent), \r\n\t\t\t\t\t\t\t'descr' => utf8_decode($descs->item($i)->textContent)\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t\t$i++; \r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\tif ( preg_match('#<div id=\"nn\"><\\/div>#i', $str) ||\r\n\t\t\t\t\t preg_match('#<div id=nn><\\/div>#i', $str))\r\n\t\t\t\t{\r\n\t\t\t\t\t$pages += 1;\r\n\t\t\t\t\t$delay += 200000;\r\n\t\t\t\t\tusleep($delay);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$pages -= 1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $result;\r\n\t}", "function booklinkp($author,$isbn,$title=\"\",$pubyear=\"\",$adddate=\"\",$float=\"left\",$type=\"t\",$size=\"s\",$top=\"0\",$bordersize=\"0\",$bordercolor=\"000000\")\n {\n $type=strtolower($type);\n if ($float==\"l\") $float=\"left\";\n if ($float==\"r\") $float=\"right\";\n if (($float==\"left\")) $marg=\"right\"; else $marg=\"left\";\n\t$title=stripcslashes($title);\n\t$title=strtolower($title);\n\t$title=nomorexs($title);\n\t$author=nomorexs($author);\n\t$title=ucwords($title);\t\n\t$temptitle =explode(\":\",$title);\n\t$author=stripcslashes($author);\n $titleplus= str_replace(' ','+',$temptitle[0]);\n\t$titleplus= str_replace('&+','',$titleplus);\n $authorplus= str_replace(' ','+',$author);\n\t$authorplus= str_replace('&+','',$authorplus);\n if ($type==\"t\") { $type=\"TI%5ETITLE\"; $keywordsplus= $titleplus; }\n elseif ($type==\"a\") { $type=\"AU%5EAUTHOR\"; $keywordsplus= $authorplus; }\n elseif ($type==\"i\") { $type=\"ISBN\"; $keywordsplus= $isbn;}\n\t\n\t\t\t\t$adyear= (int) substr($adddate,2,2);\n\t\t\t\t$admonth= (int) substr($adddate,4,2);\n\t\t\t\t$adday= (int) substr($adddate,6,2);\n\t\t\t\t$adddate = $admonth.\"/\".$adday.\"/\".$adyear;\n $datedata =\" &copy; \".$pubyear.\" (Added: \".$adddate.\")\";\n // \"&amp;pubyear=\".$pubyear.\n\techo \"<a href=\\\"http://cat.mfrl.org/uhtbin/cgisirsi.exe/0/CBURG/0/5?searchdata1=%22\".\n\t$keywordsplus.\"%22&amp;srchfield1=\".$type.\"&amp;searchoper1=AND&amp;searchdata2=%22\"\n\t.$authorplus.\"%22&amp;srchfield2=AU%5EAUTHOR\\\">\";\n\t$filename=\"images/isbn/\".$isbn.\"S.GIF\";\n\tif (file_exists($filename)) { echo \"<img src=\\\"/\".$filename.\"\\\"\";}\n\telse echo \"<img src=\\\"http://syndetics.com/index.aspx?isbn=\".$isbn.\"/\".$size.\"C.GIF\\\"\";\n\techo \" style=\\\"border:\".$bordersize.\"px solid #\".$bordercolor.\"; float:\".$float.\"; \".$yodaexception.\" margin-\".$marg.\":3px;\";\n\tif ($top!=\"0\") echo \" margin-top:\".$top.\"px;\";\n\tif ($title==\"\") {echo \"\\\" alt=\\\"\".$author.\"\\\" title=\\\"\".$author.\"\\\"></a>\";}\n\telse {echo \"\\\" alt=\\\"\".$title.\" by \".$author.$datedata.\"\\\" title=\\\"\".$title.\" by \".$author.$datedata.\"\\\"></a>\";}\n}", "function _set_search_keywords ($referer = \"\") {\n\t\n\t\tif (empty($referer)) {\n\t\t\t$referer = $_SERVER[\"HTTP_REFERER\"];\n\t\t\t$batch_mode = true;\n\t\t}\n\t\t// Return error message if no referer\n\t\tif (!strlen($referer)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// process parsing referer field\n\t\t$parsed_url\t= @parse_url($referer);\n\t\t$host\t\t= $parsed_url[\"host\"];\n\t\t$query\t\t= $parsed_url[\"query\"].\"\\r\\n\";\n\t\t\n\t\t// Check if search engine is known by system\n\t\tif (!isset($this->_search_engines[$host])) {\n\t\t\treturn false;\n\t\t}\n\t\t$cur_se\t\t\t= $this->_search_engines[$host];\n\t\t// Process keywords\n\t\t$parsed_url[\"query\"] = str_replace([\"./?\",\"./\"], \"\", $parsed_url[\"query\"]);\n\t\tparse_str($parsed_url[\"query\"], $parsed_query);\n\t\t$q_s_charset\t= $parsed_query[$cur_se[\"q_s_charset\"]];\n\t\t$q_s_word\t\t= $parsed_query[$cur_se[\"q_s_word\"]];\n\t\t$charset\t\t= isset($q_s_charset) ? $q_s_charset : $cur_se[\"def_charset\"];\n\t\t$search_query\t= isset($q_s_word) ? $q_s_word : $parsed_query[$cur_se[\"q_s_word2\"]];\n\t\t$search_query\t= trim(stripslashes(strlen($charset) ? iconv($charset, conf('charset'), $search_query) : $search_query));\n\t\t// Check for search query\n\t\tif (empty($search_query)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Set referral cookie\n\t\t$COOKIE_VAR_NAME = \"ref_code\";\n\t\tif (!$batch_mode && empty($_COOKIE[$COOKIE_VAR_NAME])) {\n\t\t\t$code = $cur_se[\"name\"];\n\t\t\tsetcookie($COOKIE_VAR_NAME, $code, time() + 86400 * 30, \"/\");\n\t\t}\n\t\t// Limit number of keywords\n\t\tif (!empty($this->MAX_TOTAL_KEYWORDS)) {\n\t\t\tlist($current_keywords_num) = db()->query_fetch(\"SELECT COUNT(*) AS `0` FROM \".db('search_keywords').\"\");\n\t\t}\n\t\tif (!empty($this->MAX_TOTAL_KEYWORDS) && $current_keywords_num >= $this->MAX_TOTAL_KEYWORDS) {\n\t\t\tdb()->_add_shutdown_query(\n\t\t\t\t\"UPDATE \".db('search_keywords').\" \n\t\t\t\tSET hits = hits + 1, \n\t\t\t\t\tlast_update = \".time().\"\n\t\t\t\tWHERE text='\"._es($search_query).\"'\"\n\t\t\t);\n\t\t} else {\n\t\t\t// Check if such record already exists\n\t\t\t$sql = \"INSERT INTO \".db('search_keywords').\" (\n\t\t\t\t\tengine,\n\t\t\t\t\ttext,\n\t\t\t\t\tref_url,\n\t\t\t\t\tsite_url,\n\t\t\t\t\tlast_update,\n\t\t\t\t\thits\n\t\t\t\t) VALUES (\n\t\t\t\t\t\".intval($this->_search_engines[$host][\"id\"]).\",\n\t\t\t\t\t'\"._es($search_query).\"',\n\t\t\t\t\t'\"._es($referer).\"',\n\t\t\t\t\t'\"._es(\"http://\".$_SERVER[\"HTTP_HOST\"].$_SERVER[\"REQUEST_URI\"]).\"',\n\t\t\t\t\t\".time().\",\n\t\t\t\t\thits + 1 \n\t\t\t\t) ON DUPLICATE KEY UPDATE hits = hits + 1\\r\\n\";\n\t\t\tdb()->_add_shutdown_query($sql);\n\t\t}\n\t\t// Check if we need to update most popular right now\n\t\tif ($this->UPDATE_POPULAR_RAND > 1) {\n\t\t\tif (rand(1, $this->UPDATE_POPULAR_RAND) != 1) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t// Update system cache\n\t\tif (!$batch_mode && main()->USE_SYSTEM_CACHE) {\n\t\t\tmain()->_add_shutdown_code('cache()->refresh(\"search_keywords_most_popular\");');\n\t\t}\n\t}", "private function makeTwitterQuery() {\n\t\t// The basic URL for the twitter search API\n\t\t$base_query = 'http://search.twitter.com/search.json?q=';\n\n\t\tif (isset($this->tag)) { // Make a search query by tag\n\t\t\t$this->query = $base_query . urlencode('#' . $this->tag);\n\t\t} elseif ((isset($this->geo)) && (count($this->geo) >0 )) {\n\t\t\t$this->query = $base_query . '&' . 'geocode=' . $this->geo['lat'] . urlencode(',') . $this->geo['lon'] . urlencode (',') . $this->geo['distance'] / 1000 . 'km';\n\t\t}\n\n\t\tlogger::log(DEBUG, \"TWITTER - Query: \".$this->query );\n\t}", "function getGeoSearchUrl($ar){\n $p = new XParam($ar, array());\n $table = $p->get('table');\n $fieldname = $p->get('fieldname');\n $moid = $this->_moid;\n $templates = 'googlesearch.html';\n return $GLOBALS['TZR_SESSION_MANAGER']::complete_self(true, true).\"skip=1&&moid={$moid}&class=XModMap&table={$table}&field={$fieldname}&provider=google&function=geoSearch&template=xmodmap/geosearch.html&tplentry=br\";\n }", "function apply($q);", "function getWords($words){\n $wordArray = str_word_count($words,1);\n global $flag_q; //flag for quotes\n\n //to add to the query string synonyms\n $synonyms = get_synonyms($words);\n\n foreach($synonyms as $synonym){\n $wordArray[] = $synonym;\n }\n\n if(!$flag_q) {\n //to handle expression with operator and stop word\n $wordArray = array_diff($wordArray, array('and', 'or', 'not', 'And', 'Or', 'Not', 'OR', 'AND', 'NOT'));\n }\n\n $wordsToSend = \"\";\n //aggregate all of the word searched for the query string to bold later\n foreach($wordArray as $word){\n $wordsToSend .= \"words[]=\" . $word . \"&\";\n }\n\n $wordsToSend = substr($wordsToSend, 0, -1);\n return $wordsToSend;\n}", "function isQueryFromSearchEngine() {\n\t\t$bFromSearchEngine = false;\n\t\tif(!isset($_SERVER['HTTP_REFERER'])) {\n\t\t\treturn false;\n\t\t}\n\t\t$referer = $_SERVER['HTTP_REFERER'];\n\t\t$parsed = parse_url($referer, PHP_URL_QUERY);\n\t\tparse_str($parsed, $query);\n\t\tswitch(true) {\n\t\t\tcase strpos($referer, 'yahoo') !== false && isset($query['p']):\n\t\t\t\t$keyword = $query['p'];\n\t\t\t\tbreak;\n\n\t\t\tcase strpos($referer, 'bing') !== false && isset($query['q']):\n\t\t\t\t$keyword = $query['q'];\n\t\t\t\tbreak;\n\n\t\t\tcase strpos($referer, 'google') !== false && isset($query['q']):\n\t\t\t\t$keyword = $query['q'];\n\t\t\t\tbreak;\n\n\t\t\tcase strpos($referer, 'aol') !== false && isset($query['query']):\n\t\t\t\t$keyword = $query['query'];\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t$keyword = '';\n\t\t\t\tbreak;\n\t\t}\n\t\t$this->_searchEngineQuery = $keyword;\n\t\treturn $keyword !== '';\n\t}", "function spellchecker_google_suggest_arr($text) {\n\n $lang = $_REQUEST['lang'] ? $_REQUEST['lang'] : variable_get('spellchecker_pspell_default_language', PSPELL_DEFAULT_LANGUAGE);\n $ignoredups = $_REQUEST['ignoredups'];\n $ignoredigits = $_REQUEST['ignoredigits'] ? $_REQUEST['ignoredigits'] : variable_get('spellchecker_ignoredigits', TRUE);\n $ignoreallcaps = $_REQUEST['ignoreallcaps'] ? $_REQUEST['ignoreallcaps'] : !(int)variable_get('spellchecker_case_sensitive', TRUE);\n// $url = GOOGLE_SPELL_URL; // . \"?lang=\" . $_GET['lang'];\n\n /* load classes */\n module_load_include('php', 'spellchecker', 'classes/SpellChecker');\n module_load_include('php', 'spellchecker', 'classes/GoogleSpell');\n\n /* send request */\n $config = NULL;\n $spell = new GoogleSpell($config);\n $matches_preg_output = $spell->_getMatches($lang, $text, $ignoredigits, $ignoreallcaps, $ignoredups);\n\n // Get the contents of the <c> tag\n $matches = array_pop($matches_preg_output[0]);\n\n // Strip line feeds returned from google\n $matches = preg_replace('/[\\t]|[\\n]|[\\r]|[\\f]/', ' ', $matches);\n\n return array($text => explode(' ', $matches));\n}", "function sql_search_relative_titles($mastertitle,$field2check) {\n $db = GetGlobal('db');\t\n\t $lan = $lang?$lang:getlocal();\n\t $itmname = $lan?'itmname':'itmfname';\n\t $itmdescr = $lan?'itmdescr':'itmfdescr';\n\t\t$remarks = 'itmremark';\t\n\t\t$sqlout = null;\t\t\n\t\n\t $mt = explode(' ',trim($mastertitle));\n //print_r($mt);\n $sSQL = \"select \".$this->getmapf('code').\" from products where \"; //whole words...\n\t\t \t\t\n\t foreach ($mt as $i=>$lex) {\n\t\t\n\t\t if (($la = trim($lex)) && (strlen($la)>4)) {//words max than 4 chars\n\t\t\n\t\t $ulex = strtoupper($lex);\n\t\t $dlex = strtolower($lex);\n \n\t\t $sqlout[$lex] = \"$itmname like '%$lex%' \";// or $itmdescr like '%$lex%' or $remarks like '%$lex%'\";// or \"; //as is\n\t\t //$sSQL .= \"$itmname like '% $ulex %' or $itmdescr like '% $ulex %' or $remarks like '% $ulex %' or \"; //upper case\t\t\n\t\t //$sSQL .= \"$itmname like '% $dlex %' or $itmdescr like '% $dlex %' or $remarks like '% $dlex %'\"; //lower case\t\t\n\t\t \n\t\t }//if lex\n\t\t} \n\t\t\n //print_r($sqlout); \n\t\tif ($sqlout) {\n\t\t $sSQL .= implode(' or ',$sqlout);\t\t \n\t\t return ($sSQL);\n\t\t}\n\t\telse\n\t\t return null;\n\t}", "private function spamcaptcher_qsencode ($data) {\r\n\t\t$req = \"\";\r\n\t\tif (!is_null($data)){\r\n\t\t\tforeach ( $data as $key => $value ){\r\n\t\t\t\t$strData = '';\r\n\t\t\t\tif (!is_null($value)){\r\n\t\t\t\t\tif (is_string($value)){\r\n\t\t\t\t\t\t$strData = $key . \"=\" . urlencode( stripslashes($value) ) . '&';\r\n\t\t\t\t\t}elseif (is_array($value)){\r\n\t\t\t\t\t\tforeach ($value as $val){\r\n\t\t\t\t\t\t\t$strData .= $key . \"=\" . urlencode( stripslashes($val) ) . '&';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$req .= $strData;\r\n\t\t\t}\r\n\r\n\t\t\t// Cut the last '&'\r\n\t\t\t$req=substr($req,0,strlen($req)-1);\r\n\t\t}\r\n\t\treturn $req;\r\n\t}", "public function parse_tax_query(&$q)\n {\n }", "public function display($q = null, $page = null)\n {\n\n // make any search google style i.e. unordered mulitple words\n if(is_string($q)) {\n foreach(explode(' ', $q) as $like) {\n // $this->andWhere(\"CONCAT_WS(' ', email, first_name, last_name) LIKE :like\", [':like' => \"%$like%\"]);\n $this->andWhere(\"CONCAT_WS(' ', `latitude`, `longitude`) LIKE :like\", [':like' => \"%$like%\"]);\n }\n }\n\n return parent::display($q, $page)\n // ->joinWith('contact')\n // ->select([\"tbl_user.id id\", \"CONCAT_WS(' ', email, first_name, last_name) text\"]);\n ->select([\"tbl_map_setting.id id\", \"CONCAT_WS(' ', `latitude`, `longitude`) text\"]);\n }", "function string_process_quote($p_string) {\n\n\t\t\t$pattern = '#\\[quote[^\\]]*\\]#imsU';\n\t\t\tif ( !preg_match($pattern, $p_string, $matches) ) {\n\t\t\t\treturn $p_string;\n\t\t\t}\n\t\t\t$pattern = '#\\[quote(?:=([^\\]]+))?\\](.+)\\[/quote\\]#imsU';\n\t\t\t$p_string = preg_replace_callback($pattern, array($this, 'replaceQuotes'), $p_string);\n\t\t\treturn $p_string;\n\t\t}", "function axWFactoryDomainQuery() {\r\n\tglobal $wgRequest;\r\n\r\n\t$query = $wgRequest->getVal( \"term\", false );\r\n\r\n\t$return = array(\r\n\t\t\"term\" => $query,\r\n\t\t\"suggestions\" => array(),\r\n\t\t\"data\" => array()\r\n\t);\r\n\r\n\t$exact = array( \"suggestions\" => array(), \"data\" => array() );\r\n\t$match = array( \"suggestions\" => array(), \"data\" => array() );\r\n\r\n\t// query terms: wik, wiki, wikia take too much memory\r\n\t// and end up with fatal errors\r\n\tif ( substr(\"wikia\",0,strlen((string)$query)) === $query ) {\r\n\t\t$query = false;\r\n\t}\r\n\r\n\tif( $query ) {\r\n\t\t/**\r\n\t\t * maybe not very effective but used only by staff anyway\r\n\t\t */\r\n\t\t$query = strtolower( $query );\r\n\t\t$dbr = WikiFactory::db( DB_SLAVE );\r\n\t\t$sth = $dbr->select(\r\n\t\t\tarray( \"city_domains\" ),\r\n\t\t\tarray( \"city_id\", \"city_domain\" ),\r\n\t\t\tarray(\r\n\t\t\t\t\"city_domain not like 'www.%'\",\r\n\t\t\t\t\"city_domain not like '%.wikicities.com'\",\r\n\t\t\t\t\"city_domain like '%{$query}%'\"\r\n\t\t\t),\r\n\t\t\t__METHOD__\r\n\t\t);\r\n\r\n\t\twhile( $domain = $dbr->fetchObject( $sth ) ) {\r\n\t\t\t$domain->city_domain = strtolower( $domain->city_domain );\r\n\t\t if( preg_match( \"/^$query/\", $domain->city_domain ) ) {\r\n\t\t\t\t$exact[ \"suggestions\" ][] = $domain->city_domain;\r\n\t\t\t\t$exact[ \"data\" ][] = $domain->city_id;\r\n\t\t }\r\n\t\t\telseif( preg_match( \"/$query/\", $domain->city_domain ) ){\r\n\t\t\t\t$match[ \"suggestions\" ][] = $domain->city_domain;\r\n\t\t\t\t$match[ \"data\" ][] = $domain->city_id;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$return[ \"suggestions\" ] = array_merge( $exact[ \"suggestions\" ], $match[ \"suggestions\" ] );\r\n\t\t$return[ \"data\" ] = array_merge( $exact[ \"data\" ], $match[ \"suggestions\" ] );\r\n\t}\r\n\t// $.ui.autocomplete expects it to be returned as if there is just suggestions, leaving the rest for debug though\r\n\treturn json_encode( $return[\"suggestions\"] );\r\n}", "function type_url_form_audio()\n {\n }", "function displaySearcher()\n{\n\t$q = $_GET['query'];\n\techo <<<END\n\t<br />\n\t<br />\n\tSearcher:\n\t<br>\n\t<form action=\"searchResults.php\" method=\"get\">\n\t<input type=\"text\" id=\"query\" value=\"$q\" name=\"query\">\n\t<br>\n\tSpelling Accuracy:\n\t<br>\n\t<SELECT name=\"et\">\n\t<OPTION value=\"1\">Very Close\n\t<OPTION value=\"2\">Close\n\t<OPTION value=\"3\" SELECTED>Somewhat\n\t<OPTION value=\"4\">Off\n\t<OPTION value=\"5\">Way Off\n\t<OPTION value=\"6\">Nowhere Near Correct\n\t</SELECT>\n\t<br><br>\n\t<input type=\"submit\" value=\"Search\">\n\t</form>\nEND;\n}", "function getQuery() {\n\n\t\t$qpa = db_construct_qpa() ;\n\n\t\tif (forge_get_config('use_fti')) {\n\t\t\t$words = $this->getFTIwords();\n\t\t\t$qpa = db_construct_qpa($qpa,\n\t\t\t\t\t\t 'SELECT x.* FROM (SELECT forum.group_forum_id, forum.msg_id, ts_headline(forum.subject, $1::tsquery) AS subject, forum.post_date, users.realname, forum.subject||$2||forum.body as full_string_agg, forum_idx.vectors FROM forum, users, to_tsquery($1) AS q, forum_idx WHERE forum.group_forum_id = $3 AND forum.posted_by = users.user_id AND forum_idx.msg_id = forum.msg_id GROUP BY forum.group_forum_id, forum.msg_id, subject, body, post_date, realname, forum_idx.vectors) AS x WHERE vectors @@ $1::tsquery ',\n\t\t\t\t\t\t array ($words,\n\t\t\t\t\t\t\t$this->field_separator,\n\t\t\t\t\t\t\t$this->forumId)) ;\n\t\t\t$phraseOp = $this->getOperator();\n\n\t\t\tif(count($this->phrases)) {\n\t\t\t\t$qpa = db_construct_qpa($qpa,\n\t\t\t\t\t\t\t 'AND (') ;\n\t\t\t\t$qpa = $this->addMatchCondition($qpa, 'full_string_agg');\n\t\t\t\t$qpa = db_construct_qpa($qpa,\n\t\t\t\t\t\t\t ') ') ;\n\t\t\t}\n\t\t\t$qpa = db_construct_qpa($qpa,\n\t\t\t\t\t\t 'ORDER BY ts_rank(vectors, $1) DESC',\n\t\t\t\t\t\t array($words)) ;\n\t\t} else {\n\t\t\t$qpa = db_construct_qpa($qpa,\n\t\t\t\t\t\t 'SELECT x.* FROM (SELECT forum.group_forum_id, forum.msg_id, forum.subject, forum.post_date, users.realname, forum.subject||$1||forum.body as full_string_agg FROM forum,users WHERE users.user_id=forum.posted_by AND forum.group_forum_id=$2 GROUP BY forum.group_forum_id, msg_id, subject, post_date, realname, body) AS x WHERE ',\n\t\t\t\t\t\t array ($this->field_separator,\n\t\t\t\t\t\t\t$this->forumId)) ;\n\t\t\t$qpa = $this->addIlikeCondition ($qpa, 'full_string_agg') ;\n\t\t\t$qpa = db_construct_qpa($qpa,\n\t\t\t\t\t\t ' ');\n\t\t}\n\t\treturn $qpa ;\n\t}", "function run()\n\t{\n\t\trequire_code('quiz');\n\n\t\t$questions=array();\n\n\t\t$text=post_param('text');\n\t\t$type=post_param('type');\n\n\t\t$_qs=explode(chr(10).chr(10),$text);\n\t\t$qs=array();\n\t\tforeach ($_qs as $q)\n\t\t{\n\t\t\t$q=trim($q);\n\t\t\tif ($q!='') $qs[]=$q;\n\t\t}\n\t\t$num_q=0;\n\n\t\t$qs2=array();\n\t\tforeach ($qs as $i=>$q)\n\t\t{\n\t\t\t$_as=explode(chr(10),$q);\n\t\t\t$as=array();\n\t\t\tforeach ($_as as $a)\n\t\t\t{\n\t\t\t\tif ($a!='') $as[]=$a;\n\t\t\t}\n\t\t\t$q=array_shift($as);\n\t\t\t$matches=array();\n\t\t\t//if (preg_match('#^(\\d+)\\)?(.*)#',$q,$matches)===false) continue;\n\t\t\tif (preg_match('#^(.*)#',$q,$matches)===false) continue;\n\t\t\tif (count($matches)==0) continue;\n\n\t\t\t$implicit_question_number=$i;//$matches[1];\n\n\t\t\t$qs2[$implicit_question_number]=$q.chr(10).implode(chr(10),$as);\n\t\t}\n\t\tksort($qs2);\n\n\t\tforeach (array_values($qs2) as $i=>$q)\n\t\t{\n\t\t\t$_as=explode(chr(10),$q);\n\t\t\t$as=array();\n\t\t\tforeach ($_as as $a)\n\t\t\t{\n\t\t\t\tif ($a!='') $as[]=$a;\n\t\t\t}\n\t\t\t$q=array_shift($as);\n\t\t\t$matches=array();\n\t\t\t//if (preg_match('#^(\\d+)\\)?(.*)#',$q,$matches)===false) continue;\n\t\t\tif (preg_match('#^(.*)#',$q,$matches)===false) continue;\n\t\t\tif (count($matches)==0) continue;\n\t\t\t$question=trim($matches[count($matches)-1]);\n\t\t\t$long_input_field=(strpos($question,' [LONG]')!==false)?1:0;\n\t\t\t$question=str_replace(' [LONG]','',$question);\n\t\t\t$num_choosable_answers=(strpos($question,' [*]')!==false)?count($as):((count($as)>0)?1:0);\n\t\t\t$question=str_replace(' [*]','',$question);\n\t\t\t$required=(strpos($question,' [REQUIRED]')!==false)?1:0;\n\t\t\t$question=str_replace(' [REQUIRED]','',$question);\n\n\t\t\t// Now we add the answers\n\t\t\t$answers=array();\n\t\t\tforeach ($as as $x=>$a)\n\t\t\t{\n\t\t\t\t$is_correct=((($x==0) && (strpos($qs2[$i],' [*]')===false) && ($type!='SURVEY')) || (strpos($a,' [*]')!==false))?1:0;\n\t\t\t\t$a=str_replace(' [*]','',$a);\n\n\t\t\t\tif (substr($a,0,1)==':') continue;\n\n\t\t\t\t$answers[]=array(\n\t\t\t\t\t'id'=>$x,\n\t\t\t\t\t'q_answer_text'=>$a,\n\t\t\t\t\t'q_is_correct'=>$is_correct,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$questions[]=array(\n\t\t\t\t'id'=>$i,\n\t\t\t\t'q_long_input_field'=>$long_input_field,\n\t\t\t\t'q_num_choosable_answers'=>$num_choosable_answers,\n\t\t\t\t'q_question_text'=>$question,\n\t\t\t\t'answers'=>$answers,\n\t\t\t\t'q_required'=>$required,\n\t\t\t);\n\n\t\t\t$num_q++;\n\t\t}\n\n\t\t$preview=render_quiz($questions);\n\n\t\treturn array(do_template('FORM',array('SUBMIT_NAME'=>'','TEXT'=>'','URL'=>'','HIDDEN'=>'','FIELDS'=>$preview)),NULL);\n\t}", "function qa_request()\n{\n\tif (qa_to_override(__FUNCTION__)) { $args=func_get_args(); return qa_call_override(__FUNCTION__, $args); }\n\n\tglobal $qa_request;\n\treturn $qa_request;\n}", "function BasicSearchWhere() {\n\t\tglobal $Security, $tbl_slide;\n\t\t$sSearchStr = \"\";\n\t\t$sSearchKeyword = $tbl_slide->BasicSearchKeyword;\n\t\t$sSearchType = $tbl_slide->BasicSearchType;\n\t\tif ($sSearchKeyword <> \"\") {\n\t\t\t$sSearch = trim($sSearchKeyword);\n\t\t\tif ($sSearchType <> \"\") {\n\t\t\t\twhile (strpos($sSearch, \" \") !== FALSE)\n\t\t\t\t\t$sSearch = str_replace(\" \", \" \", $sSearch);\n\t\t\t\t$arKeyword = explode(\" \", trim($sSearch));\n\t\t\t\tforeach ($arKeyword as $sKeyword) {\n\t\t\t\t\tif ($sSearchStr <> \"\") $sSearchStr .= \" \" . $sSearchType . \" \";\n\t\t\t\t\t$sSearchStr .= \"(\" . $this->BasicSearchSQL($sKeyword) . \")\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$sSearchStr = $this->BasicSearchSQL($sSearch);\n\t\t\t}\n\t\t}\n\t\tif ($sSearchKeyword <> \"\") {\n\t\t\t$tbl_slide->setSessionBasicSearchKeyword($sSearchKeyword);\n\t\t\t$tbl_slide->setSessionBasicSearchType($sSearchType);\n\t\t}\n\t\treturn $sSearchStr;\n\t}", "public function __construct($qString){ // object constructor\r\n $this->qString = $qString;\r\n }", "private function getSearchURI()\n {\n $q = $this->getInput('q');\n $hide_expired = $this->getInput('hide_expired');\n $hide_local = $this->getInput('hide_local');\n $priceFrom = $this->getInput('priceFrom');\n $priceTo = $this->getInput('priceTo');\n $url = $this->i8n('bridge-uri')\n . 'search/advanced?q='\n . urlencode($q)\n . '&hide_expired=' . $hide_expired\n . '&hide_local=' . $hide_local\n . '&priceFrom=' . $priceFrom\n . '&priceTo=' . $priceTo\n /* Some default parameters\n * search_fields : Search in Titres & Descriptions & Codes\n * sort_by : Sort the search by new deals\n * time_frame : Search will not be on a limited timeframe\n */\n . '&search_fields[]=1&search_fields[]=2&search_fields[]=3&sort_by=new&time_frame=0';\n return $url;\n }", "function queryToUrl($query, $start=null, $perPage=100, $country=\"US\",$video = false) {\n\n if (!$video)\n {\n return \"http://www.google.com/search?\" . http_build_query(array(\n // Query\n //\"q\" => urlencode($query),\n \"q\" => $query,\n // Country (geolocation presumably)\n \"gl\" => $country,\n //\"siteSearch\" => \"twitter\",\n // Start offset\n \"start\" => $start,\n // Number of result to a page\n \"num\" => $perPage\n ), true);\n }\n else{\n $result = \"http://www.google.com/search?\" . http_build_query(array(\n // Query\n //\"q\" => urlencode($query),\n \"q\" => $query,\n // Country (geolocation presumably)\n \"tbm\" => \"vid\",\n \"gl\" => $country,\n //\"siteSearch\" => \"twitter\",\n // Number of result to a page\n \"num\" => $perPage\n ), true);\n return $result;\n }\n }", "private function makeQueryNoSplit(){\n\t\t\n\t\t$this->searchQ['select'] = array('l.name','l.summary','l.sum_approach','l.sum_problems','l.address_line_1','l.address_line_2','l.town','l.county','l.postcode','l.country','l.phone','l.image','l.latitude','l.longitude','l.publish_address','l.publish_phone','l.approved','p.uri','p.urlname','e.level','y.listing_type');\n\t\t$this->searchQ['orderby'][] = 'l.level_id DESC';\n\t\t$this->searchQ['from'] = 'listing l, listing_level e, listing_type y, pages p'; //should always be the same...\n\t\t$this->searchQ['where'] = array('e.level_id = l.level_id','y.listing_type_id = l.listing_type_id','l.page_id = p.page_id','l.publish = 1');//,'p.publish = 1');\n\t\t\n\t\t// set up the initial search variables\t\t\n\t\t//! location\n\t\tif( strlen($this->vars['location']) ){\n\t\t\n\t\t\t$this->Geocode = new Geolocation( $this->vars['location']. ', UK' );\n\t\t\t$this->Geocode->lookup();\n\t\t\t// using the OS grid as makes calculation simpler than using lng/lat - can use simple pythag rather than calculus functions\n\t\t\t// we shorten the list of rows needing the calculation by the greater / less than in the where\n\t\t\t\n\t\t\t$calculation = ' SQRT(POW(( l.easting - ' . round($this->Geocode->getOSEast()) . '),2) + POW((l.northing - ' . round($this->Geocode->getOSNorth()) . '),2)) ';\n\t\t\t$this->searchQ['select'][] = $calculation . \" AS distance\";\n\t\t\t$this->searchQ['where'][] = \"northing < \" . round( $this->Geocode->getOSNorth() + $this->searchDistance ) ; \n\t\t\t$this->searchQ['where'][] = \"northing > \" . round( $this->Geocode->getOSNorth() - $this->searchDistance ) ;\n\t\t\t$this->searchQ['where'][] = \"easting < \" . round( $this->Geocode->getOSEast() + $this->searchDistance ) ;\n\t\t\t$this->searchQ['where'][] = \"easting > \" . round( $this->Geocode->getOSEast() - $this->searchDistance ) ;\n\t\t//\t$this->searchQ['where'][] = \"(\" . $calculation . \") <= \" . $this->searchDistance ;\n\t\t// use having rather than where\n\t\t\t$this->searchQ['having'][] = \"distance <= \" . $this->searchDistance;\n\t\t\t$this->searchQ['orderby'][] = 'distance ASC';\n\t\t\t$this->doSearch = true;\n\t\t}\n\t\t//! freetext\n\t\tif( strlen($this->vars['term']) ){\n\t\t\t$this->searchQ['select'][] = \"MATCH(\" . $this->ftfields . \") AGAINST ('\" . $this->booleanAndTerm($this->vars['term']) . \"' IN BOOLEAN MODE) AS score\";\n\t\t\t//$this->searchQ['where'][] = \"MATCH(\" . $ftfields . \") AGAINST ('\" . $this->booleanAndTerm($this->vars['term']) . \"' IN BOOLEAN MODE)\";\n\t\t\t// use having rather than where\n\t\t\t$this->searchQ['having'][] = \"score > 0\";\n\t\t\t$this->searchQ['orderby'][] = 'score DESC';\n\t\t\t$this->doSearch = true;\n\t\t}\n\t\t\n\t\t\n\t\t//! **** FILTERS ****\n\t\t//! profession\n\t\tif( isset($this->vars['profession']) && strlen($this->vars['profession']) ){\n\t\t\n\t\t\t//$this->searchQ['where'][] = \" l.listing_type_id IN (\" . implode(',', $this->vars['profession']) . \") \";\n\t\t\t$this->searchQ['where'][] = \" l.listing_type_id = \" . (int)$this->vars['profession'] . \" \";\n\t\t\t$this->doSearch = true;\n\t\t}\n\t\t//! max price\n\t\tif( isset($this->vars['maxprice']) && is_numeric($this->vars['maxprice']) ){\n\t\t\n\t\t\t$this->searchQ['where'][] = \" l.hourly_rate <= \" . (int)$this->vars['maxprice'] . \" \";\n\t\t\t$this->doSearch = true;\n\t\t}\n\t\t\n\t\t//! gender\n\t\tif( isset($this->vars['gender']) && in_array($this->vars['gender'] , array('M','F')) ){\n\t\t\n\t\t\t$this->searchQ['from'] .= ', listing_to_gender ltg';\n\t\t\t$this->searchQ['where'][] = \" ltg.listing_id = l.listing_id \";\n\t\t\t$this->searchQ['where'][] = \" ltg.gender = '\" . $this->vars['gender'] . \"' \";\n\t\t\t$this->doSearch = true;\n\t\t}\n\t\n\t\t//! speciality\n\t\tif( isset($this->vars['speciality']) && is_numeric($this->vars['speciality']) ){\n\t\t\n\t\t\t$this->searchQ['from'] .= ', listing_to_age ltag';\n\t\t\t$this->searchQ['where'][] = \" ltag.listing_id = l.listing_id \";\n\t\t\t$this->searchQ['where'][] = \" ltag.age_id = \" . (int)$this->vars['speciality'] . \" \";\n\t\t\t$this->doSearch = true;\n\t\t}\n\t\t\n\t\t//! ** build the query **\n\t\t$q = \"SELECT \" . (($this->numRows)?' SQL_CALC_FOUND_ROWS ':'') . implode(',', $this->searchQ['select']). \"\n\t\t\t\tFROM \" . $this->searchQ['from'] . \"\n\t\t\t\tWHERE\n\t\t\t\t\t\" . implode(' AND ', $this->searchQ['where']) ;\n\t\t\t\t\t\n\t\tif( isset($this->searchQ['having']) && count($this->searchQ['having']) ){\n\t\t\t$q .= \" HAVING \" . implode(' AND ' , $this->searchQ['having']);\n\t\t}\n\t\t\n\t\t$q .= \"\tORDER BY \" . implode(',', $this->searchQ['orderby']) . \" \";\n\n\t\t$q .= \"\tLIMIT \" . ( ($this->page-1)* $this->limit) . \",\" . $this->limit . \" \"; \n\t\t\t\n\t\treturn $q;\n\t\t\n\t}", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();" ]
[ "0.57425797", "0.55637753", "0.5513406", "0.54645324", "0.54507446", "0.54474247", "0.53783107", "0.53776395", "0.5368028", "0.53600353", "0.5324716", "0.53084165", "0.52961016", "0.5293768", "0.5281911", "0.5256313", "0.5203149", "0.51928633", "0.5182243", "0.5179579", "0.5177279", "0.5175136", "0.5169332", "0.5163349", "0.51626086", "0.5161619", "0.5143377", "0.5132632", "0.5099797", "0.5098863", "0.50804305", "0.507082", "0.5067231", "0.5064193", "0.50448304", "0.5042002", "0.50359815", "0.50343174", "0.5026832", "0.5026621", "0.49912018", "0.49883178", "0.49858454", "0.4967918", "0.49641487", "0.49567896", "0.4956347", "0.49447176", "0.49347243", "0.49340707", "0.49291486", "0.4903585", "0.4902464", "0.49014145", "0.48960945", "0.48903355", "0.48796", "0.48794064", "0.48772523", "0.48733", "0.48726207", "0.48604763", "0.48497424", "0.4848695", "0.48364416", "0.48328394", "0.4825114", "0.48246387", "0.48208138", "0.48193783", "0.48154655", "0.4813089", "0.48123056", "0.48083892", "0.48023418", "0.4800814", "0.4785461", "0.47829598", "0.47818977", "0.47817641", "0.47652617", "0.47613174", "0.47596622", "0.47570494", "0.47566396", "0.4755671", "0.47541583", "0.47510478", "0.47496676", "0.47490472", "0.47475845", "0.474679", "0.4746241", "0.474622", "0.4738346", "0.4737959", "0.47377437", "0.47377437", "0.47377437", "0.47377437" ]
0.5169194
23
Sends an activation email.
public function send(UserInterface $user = null): bool { if (empty($user)) { $this->error = lang('Auth.error.noUserToActivate'); return false; } $email = service('email'); $emailConfig = config(Email::class); $settings = $this->getSettings(); $prepareData = $settings->prepareViewData; $data = $prepareData(); $data['hash'] = $user->getActivateToken(); $sent = $email->setFrom($settings->fromEmail ?? $emailConfig->fromEmail, $settings->fromName ?? $emailConfig->fromName) ->setTo($user->getEmail()) ->setSubject(lang('Auth.email.activate.subject')) ->setMessage(view($this->config->views['emailActivate'], $data)) ->setMailType('html') ->send(); if (!$sent) { $this->error = lang('Auth.error.activationSendFailed', [$user->getEmail()]); return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sendActivationEmail(){\n\t\t// generate the url\n\t\t$url = 'http://'.$_SERVER['HTTP_HOST'].'/signup/activate/'.$this->activation_token;\n\t\t$text = View::getTemplate('Signup/activation_email.txt', ['url' => $url]);\n\t\t$html = View::getTemplate('Signup/activation_email.html', ['url' => $url]);\n\t\t\n\t\tMail::send($this->email, 'Account_activation', $text, $html);\n\t}", "public function sendActivationEmail()\n\t{\n\t\t$mailData = [\n\t\t\t'to' => $this->email,\n\t\t\t'from' => '[email protected]',\n\t\t\t'nameFrom' => 'Peter Štovka'\n\t\t];\n\n\n\t\tMail::send('email.activation', ['token' => $this->token], function ($message) use ($mailData) {\n\t\t\t$message->to($mailData['to'], 'Aktivačný email')\n\t\t\t\t->subject('Aktivácia účtu')\n\t\t\t\t->from($mailData['from'], $mailData['nameFrom']);\n\t\t});\n\t}", "public function sendActivationEmail() {\n $emailProperties = $this->gatherActivationEmailProperties();\n\n /* send either to user's email or a specified activation email */\n $activationEmail = $this->controller->getProperty('activationEmail',$this->profile->get('email'));\n $subject = $this->controller->getProperty('activationEmailSubject',$this->modx->lexicon('register.activation_email_subject'));\n return $this->login->sendEmail($activationEmail,$this->user->get('username'),$subject,$emailProperties);\n }", "public function sendActivationEmail() {\n $htmlBody = \"\n <div style='font-family: Trebuchet MS, Helvetica, sans-serif'>\n Hello \" . $this->title . \" \" . $this->lastname . \",\n <br /><br />\n Thank you for registering with us at <a href='www.betvbet.co.uk'>Bet v Bet</a>.\n <br /><br />\n You are one step away from placing your first bet. Simply click the activation link below:\n <br />\n {activationLink}\n <br /><br />\n Alternatively, <a href='www.betvbet.co.uk/site/login'>log in</a> to your account and enter the code below:\n <br />\n {code}\n <br /><br />\n This code expires in 24 hours ({tomorrow}).\n <br /><br />\n Best of luck!\n <br />\n The Bet v Bet Team\n <br /><br /><br /><br />\n This inbox is not monitored, please do not reply to this address, any queries should be sent to <a href='mailto:[email protected]'>[email protected]</a>\n </div>\n \";\n\n // Now, create the activation code.\n $code = strtoupper(\\app\\components\\Utilities::generateRandomString(6));\n // Create the activation link.\n $activationLink = Yii::getAlias('@web') . '/site/activate?code=' . $code;\n\n $activate = new Activate();\n $activate->attributes = [\n 'user' => $this->id,\n 'code' => $code,\n 'expires' => time() + 86400,\n 'created' => time(),\n ];\n $activate->save();\n\n $htmlBody = str_replace('{activationLink}', $activationLink, $htmlBody);\n $htmlBody = str_replace('{code}', $code, $htmlBody);\n $htmlBody = str_replace('{tomorrow}', date(\"d/m/Y H:i\", time() + 86400), $htmlBody);\n Yii::$app->mailer->compose()\n ->setFrom(['[email protected]' => 'Bet v Bet'])\n ->setTo($this->email)\n ->setHtmlBody($htmlBody)\n ->setSubject('Bet v Bet - Account Activation')\n ->send();\n }", "public static function sendActivationReminders(){\n self::$UserService->sendEmailActivationReminders();\n }", "public function testSendActivationEmail()\n {\n $this->tester->mockCraftMethods('security', [\n 'generateRandomString' => $string = StringHelper::randomString(32)\n ]);\n\n // Test send activation email with password null\n $this->pendingUser->password = null;\n $this->users->sendActivationEmail($this->pendingUser);\n $this->testUsersEmailFunctions(\n 'account_activation',\n 'actions/users/set-password&code='.$string.''\n );\n\n $this->pendingUser->password = 'some_password';\n $this->users->sendActivationEmail($this->pendingUser);\n $this->testUsersEmailFunctions(\n 'account_activation',\n 'actions/users/verify-email&code='.$string.''\n );\n $this->pendingUser->password = null;\n\n // Test send Email Verify\n $this->users->sendNewEmailVerifyEmail($this->pendingUser);\n $this->testUsersEmailFunctions(\n 'verify_new_email',\n 'actions/users/verify-email&code='.$string.''\n );\n\n // Test password reset email\n $this->users->sendPasswordResetEmail($this->pendingUser);\n $this->testUsersEmailFunctions(\n 'forgot_password',\n 'actions/users/set-password&code='.$string.''\n );\n }", "public function sendActivationMail($user)\n {\n\n if ($user->activated || !$this->shouldSend($user))\n {\n return;\n }\n\n $token = $this->activationRepo->createActivation($user);\n\n $link = route('user.activate', $token);\n\n $this->dispatch((new SendConfirmEmail($user,$link))->onQueue('emails'));\n\n }", "function sendActivationEmail($emailid, $activationcode) {\n\t// send activation email\n\t// require ('emailcode.php');\n\t$link = \"http://s336355547.onlinehome.us/peach/service/index.php?method=get&module=activate&emailid=$emailid&activationcode=$activationcode\";\n\t$STR_EMAIL_STRING =\"<br/>Hi,<br/><br/>Please click on below link to activate your account.<br/><br/>$link <br/><br/>Regards <br/>Peach Health <br/>\";\n\tSEND_MAIL($emailid, \"Activation link of peach health\", $STR_EMAIL_STRING, \"[email protected]\");\n}", "public function actionActivation() {\n\t\t$email = NData::base64UrlDecode($_GET['e']);\n\t\t$activekey = $_GET['activekey'];\n\t\tif ($email&&$activekey) {\n\t\t\t$user = UserModule::userModel()->notsafe()->findByAttributes(array('email'=>$email));\n\t\t\tif(isset($user) && $user->email_verified == 0 && $user->status == 1){\n\t\t\t\t// user is active but has not verified his email\n\t\t\t\t$user->email_verified = 1;\n\t\t\t\t$user->save();\n\t\t\t\t$this->render('message',array('title'=>UserModule::t(\"Email Verfied\"),'content'=>UserModule::t(\"Thank you! We now know you are you!\")));\n\t\t\t} elseif (isset($user) && $user->status==1 && $user->email_verified==1) {\n\t\t\t $this->render('message',array('title'=>UserModule::t(\"User activation\"),'content'=>UserModule::t(\"Your account is active.\")));\n\t\t\t} elseif(isset($user->activekey) && $this->checkActivationKey($user, $activekey)) {\n\t\t\t\t$user->activekey = crypt(microtime());\n\t\t\t\t$user->status = 1;\n\t\t\t\t$user->email_verified = 1;\n\t\t\t\t$user->save();\n\t\t\t $this->render('activation');\n\t\t\t\t$e = new CEvent($this, array('user'=>$user));\n\t\t\t\tUserModule::get()->onActivation($e);\n\t\t\t} else {\n\t\t\t $this->render('message',array('title'=>UserModule::t(\"User activation\"),'content'=>UserModule::t(\"Incorrect activation URL.\")));\n\t\t\t}\n\t\t} else {\n\t\t\t$this->render('message',array('title'=>UserModule::t(\"User activation\"),'content'=>UserModule::t(\"Incorrect activation URL.\")));\n\t\t}\n\t}", "public function mailActivateAccount($params)\n {\n $this->mailer->accountActivation($params);\n }", "private function sendActivationEmail($data) {\n\t$template_name = 'signup-confirmation';\n\t$template_content = array();\n\t$message = array(\n\t\t'subject' => 'Welcome! Please confirm your email address.',\n\t\t'from_email' => '[email protected]',\n\t\t'from_name' => 'Chefmes',\n\t\t'to' => array(\n\t\t\tarray(\n\t\t\t\t'email' => $data['email'],\n\t\t\t\t'name' => $data['fullname']\n\t\t\t)\n\t\t),\n\t\t'merge_language' => 'mailchimp',\n\t\t'merge_vars' => array(\n\t\t\tarray(\n\t\t\t\t'rcpt' => $data['email'],\n\t\t\t\t'vars' => array(\n\t\t\t\t\t[ 'name' => 'email', 'content' => $data['email']],\n\t\t\t\t\t[ 'name' => 'firstname', 'content' => $data['firstname']],\n\t\t\t\t\t[ 'name' => 'confirmlink', 'content' => $data['confirmlink']]\n\t\t\t\t)\n\t\t\t)\n\t\t)\n\t);\n\t\\Email::messages()->sendTemplate($template_name, $template_content, $message);\n\t//print_r($result);\n }", "function send_activation_mail(UsersEntity $user) {\n $to = $user->email;\n $content = $this->view->send_activation_mail($user);\n return $this->MailAPI->send_mail($to,$content['subject'],$content['body']);\n }", "public function sendActivation()\n\t{\n\t}", "function Trigger_ActivationEmail(&$tNG) {\r\n $emailObj = new tNG_Email($tNG);\r\n $emailObj->setFrom(\"{KT_defaultSender}\");\r\n $emailObj->setTo(\"{member_email}\");\r\n $emailObj->setCC(\"\");\r\n $emailObj->setBCC(\"\");\r\n $emailObj->setSubject(\"Activation\");\r\n //FromFile method\r\n $emailObj->setContentFile(\"includes/mailtemplates/activate.html\");\r\n $emailObj->setEncoding(\"UTF-8\");\r\n $emailObj->setFormat(\"HTML/Text\");\r\n $emailObj->setImportance(\"Normal\");\r\n return $emailObj->Execute();\r\n}", "public function actionSendConfirmationEmail() {\n\n\t\t$userId = User::checkLogged();\n\t\t$confirmation = User::generateConfirmationCode($userId);\n\t\t$subject = \"Confirm your account on JustRegMe\";\n\t\t$bodyPath = ROOT . '/template/email/confirmation.php';\n\t\t$body = include($bodyPath); //loads HTML-body from template\n\t\t\n\t\techo User::sendEmail($userId, $subject, $body);\n\n\t}", "function sending_activation_email($data, &$content) {\n\t\t// Create content\n\t\t$site_name = isset($this->settings['site_name'])?$this->settings['site_name']:$this->ci->config->item('DX_website_name');\n\t\t$content = sprintf(\n\t\t\t\t$this->ci->lang->line('auth_activate_content'), \n\t\t\t\t$site_name, \n\t\t\t\t$data['activate_url'],\n\t\t\t\t$this->ci->config->item('DX_email_activation_expire') / 60 / 60,\n\t\t\t\t$data['username'], \n\t\t\t\t$data['email'],\n\t\t\t\t$data['password'],\n\t\t\t\t$site_name\n\t\t\t);\n\t}", "function email_activation($activationCode,$form)\n\t{\n\t\t$emailaddress = $this->namedFields['email']->getData();\n\t\t$site_address = SITE_ADDRESS;\n $site_address .= (substr(SITE_ADDRESS, -1) == '/') ? '' : '/';\n\t\t$link = $site_address.'sign_up?activate_code='.$activationCode;\n\t\t$body = \"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD XHTML 1.0 Transitional//EN\\\" \\\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\\\"><html xmlns=\\\"http://www.w3.org/1999/xhtml\\\" lang=\\\"en\\\" xml:lang=\\\"en\\\"><head><title>Church Growth Research Programme</title><style type=\\\"text/css\\\"><!-- body { background:#ffffff; margin:0; padding:0; } p { font-family:Arial, Helvetica, sans-serif; font-size:14px; color:#000000; line-height:22px; margin:10px 0px 10px 0px; text-align:left; } h1, h2, h3, h4, h5, h6 { font-family:Arial, Helvetica, sans-serif; } a { color:#2a6307; outline:none; text-decoration:underline; } a:hover { color:#569823; text-decoration:underline; } --> </style></head><body bgcolor=\\\"#fff\\\"><div align=\\\"center\\\"><table width=\\\"600\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\" style=\\\"border:none;\\\"><tbody><tr><td><img width=\\\"600\\\" vspace=\\\"0\\\" hspace=\\\"0\\\" height=\\\"188\\\" border=\\\"0\\\" align=\\\"top\\\" src=\\\"http://www.churchgrowthresearch.org.uk/images/emailheader.jpg\\\" alt=\\\"Church Growth Research Programme\\\" /></td></tr><tr><td bgcolor=\\\"#fbf5de\\\" style=\\\"padding:0px 30px 0px 30px;\\\"><p>Welcome to the Church Growth Research Programme.</p><p>Please click on the link below to activate your account:<p>\".\n\t\t\t\"<p><a href=\\\"$link\\\">$link</a></p><p>Thank you, the Church Growth Reseach Programme website team.</p>\".\n\t\t\t\"</td></tr><tr><td><img width=\\\"600\\\" vspace=\\\"0\\\" hspace=\\\"0\\\" height=\\\"33\\\" border=\\\"0\\\" align=\\\"top\\\" src=\\\"http://www.churchgrowthresearch.org.uk/images/emailfooter.jpg\\\" alt=\\\"Church Growth Research Programme\\\" /></td></tr></tbody></table></div></body></html>\";\n\t\t$from_email_address = $form['email'];\n\t\t$this->send_mail($emailaddress, SITE_NAME, $from_email_address, 'Account Activation', $body, $body_text);\n\n\t}", "public function sendAccountActivationEmail(User $user, Token $token): void;", "public function send_activation($email_or_username){\n\t\t$activation_key = $this->get_activation_key($email_or_username);\n\t\t$sql = \"select * from admin where email='$email_or_username' or username='$email_or_username'\";\n\t\tif ($this->num_rows($sql) == 0){\n\t\t\techo \"Username atau email yang anda masukan tidak terdaftar sebagai member di situs ini!.\";\n\t\t\texit();\n\t\t}\n\t\t$data = $this->fetchfetch($sql);\n\t\t$id = $data['id'];\n\t\t$name = $data['name'];\n\t\t$email = $data['email'];\n\t\t$today = date(\"Y-m-d\");\n\t\t$time = date(\"H:i:s\");\n\t\t$activation_link = APP_URL.$system.\"/forgot.php?act=recover&email=$email&activation=$activation_key\";\n\t\t$c_url = APP_URL;\n\t\t$c_admin_url = \"$c_url/$system\";\n\t\t$messages = \"\n\t\tyou has send a request for reset your password at <a target='_blank' href='$c_url'>$c_url</a> with detail<br>\n\t\tEmail : $email<br>\n\t\tUsername : $name<br>\n\t\tDate : $today - $time<br>\n\t\t<p>\n\t\tand if you really has send a request for reset your password at $c_url, so you can use this activation code for reset your password :\n\t\t<br>\n\t\t<b>Activation Code</b> : <i>$activation_key</i>\n\t\t</p>\n\t\tif you didn't request this action, so ignore this message or delete this message.\n\t\t\";\n\t\t$send = $this->send_email($email, \"Activation Link For Reset Your Password at $c_url\", $messages);\n\t\tif ($send == true){\n\t\t\treturn \"$email\";\n\t\t\texit();\n\t\t}else{\n\t\t\techo \"Failed! can't send email to $email\";\n\t\t}\n\t}", "public function sendActivationEmail(User $user, $token)\n {\n $urlActivation = Url::toRoute(['auth/activate', 'token' => $token], true);\n\n $message = Yii::$app->mailer->compose('activation', [\n 'user' => $user,\n 'urlActivation' => $urlActivation\n ]);\n $message->setTo([$user->email => $user->name])\n ->setFrom([Yii::$app->params['noReplyEmail'] => Yii::$app->name])\n ->setSubject('User account activation')\n ->setTextBody('Activate your account by visiting url ' . $urlActivation)\n ->send();\n }", "function activate()\n\t{\n\t\t$user_id\t\t= $this->uri->segment(3);\n\t\t$new_email_key\t= $this->uri->segment(4);\n\n\t\t// Activate user\n\t\tif ($this->tank_auth->activate_user($user_id, $new_email_key))\n\t\t{\n\t\t\t// success\n\t\t\t//Add it into newletter\n\t\t\t$user = $this->database->GetUserById($user_id);\n\t\t\tadd_subscriber($user['email'], $user['username']);\n\t\t\t\n\t\t\t$this->tank_auth->logout();\n\t\t\t$this->_show_message($this->lang->line('auth_message_activation_completed').' '.anchor('/auth/login/', 'Login'));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// fail\n\t\t\t$this->_show_message($this->lang->line('auth_message_activation_failed'));\n\t\t}\n\t}", "function activate()\n {\n $user_id\t\t= $this->uri->segment(3);\n $new_email_key\t= $this->uri->segment(4);\n\n // Activate user\n if ($this->tank_auth->activate_user($user_id, $new_email_key)) {\t\t// success\n $this->tank_auth->logout();\n $this->_show_message($this->lang->line('auth_message_activation_completed').' '.anchor('/auth/login/', 'Login'));\n\n } else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// fail\n $this->_show_message($this->lang->line('auth_message_activation_failed'));\n }\n }", "protected function activation_email(Request $request) {\n $activationToken = $request->get('activation_token');\n if($request->get('password') == $request->get('password_confirmation')) {\n $userPassword = bcrypt($request->get('password'));\n }\n\n /* Validation Rules */\n $ValidationRules = [\n 'activation_token' => 'required|min:24|max:26',\n 'password' => 'required|min:8|max:30|regex:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d).+$/|confirmed'\n ];\n\n /* Error Messages */\n $ErrorMessages = [\n 'password.min' => 'Please enter a valid password',\n 'password.regex' => 'Please enter a secure password - contains an upper case letter, a lower case letter, a digit and a special character',\n 'password.confirmed' => 'Passwords are not matching'\n ];\n\n /* Validation */\n $this->validate($request, $ValidationRules, $ErrorMessages);\n\n $userCount = DB::table('users')->where([['verification_token', $activationToken], ['verified', 'false']])->count();\n if($userCount > 0) {\n\n /* Querying the user table by passing Email verification token */\n $user = DB::table('users')->where([['verification_token', $activationToken], ['verified', 'false']])->first();\n\n /* Updating Status of Verification */\n DB::table('users')->where('verification_token', $activationToken)->update(['password'=>$userPassword,'verified'=> true]);\n\n /**\n * Sending welcome email to the user\n * @author Tittu Varghese ([email protected])\n *\n * @param array | $user\n */\n\n $emailVariables_UserName = $user->first_name;\n $emailVariables_SubTitle = \"Welcome to Bytacoin!\";\n $emailVariables_MainTitle = \"Get Started with Bytacoin\";\n $emailVariables_EmailText = \"Thank you for completing registration with us. We are happy to serve for you and click below button to login to your dashboard and checkout our awesome offerings.\";\n $emailVariables_ButtonLink = \"https://bytacoin.telrpay.com/\";\n $emailVariables_ButtonText = \"GET STARTED\";\n\n $emailTemplate = new EmailTemplates($emailVariables_UserName,$emailVariables_SubTitle,$emailVariables_MainTitle,$emailVariables_EmailText,$emailVariables_ButtonLink,$emailVariables_ButtonText);\n\n $emailContent = $emailTemplate->GenerateEmailTemplate();\n $mail = new Email(true,$emailContent);\n $mail->addAddress($user->email,$user->first_name);\n $mail->Subject = 'Welcome to Bytacoin!';\n $mail->send();\n\n return redirect('login')->with('success', 'Your account has been activated. Please login to access dashboard.');\n\n } else {\n return redirect('login')->with('error', 'Looks like the activation link is expired or not valid.');\n }\n }", "public function reActivationAction() {\n //get the container object\n $container = $this->container;\n //get the translator object\n $translator = $this->get('translator');\n //get the session object\n $session = $this->getRequest()->getSession();\n //check if we have a logged in user or company\n if (FALSE === $this->get('security.context')->isGranted('ROLE_NOTACTIVE')) {\n $session->getFlashBag()->set('note', $translator->trans('You need to Login first.'));\n return $this->redirect($this->generateUrl('login'));\n }\n\n //check if the user is already active\n if (TRUE === $this->get('security.context')->isGranted('ROLE_USER')) {\n //set a notice flag\n $session->getFlashBag()->set('notice', $translator->trans('Your acount is active.'));\n return $this->redirect($this->generateUrl('user_edit'));\n }\n\n //get the logedin user\n $user = $this->getUser();\n\n //prepare the body of the email\n $body = $this->renderView('ObjectsUserBundle:User:Emails\\activate_email.txt.twig', array('user' => $user));\n //prepare the message object\n $message = \\Swift_Message::newInstance()\n ->setSubject($translator->trans('activate your account'))\n ->setFrom($container->getParameter('mailer_user'))\n ->setTo($user->getEmail())\n ->setBody($body)\n ;\n //send the activation mail to the user\n $this->get('mailer')->send($message);\n //set the success flag in the session\n $session->getFlashBag()->set('success', $this->get('translator')->trans('check your email for your activation link'));\n //redirect the user to portal\n return $this->redirect($this->generateUrl('user_edit'));\n }", "function activate_account_via_email_link() {\r\n\t\t\tif ( isset($_REQUEST['act']) && $_REQUEST['act'] == 'activate_via_email' && isset($_REQUEST['hash']) && is_string($_REQUEST['hash']) && strlen($_REQUEST['hash']) == 40 &&\r\n\t\t\t isset($_REQUEST['user_id']) && is_numeric($_REQUEST['user_id']) ) { // valid token\r\n\r\n\t\t\t\t$user_id = absint( $_REQUEST['user_id'] );\r\n\t\t\t\tdelete_option( \"um_cache_userdata_{$user_id}\" );\r\n\r\n\t\t\t\tum_fetch_user( $user_id );\r\n\r\n\t\t\t\tif ( strtolower($_REQUEST['hash']) !== strtolower( um_user('account_secret_hash') ) )\r\n\t\t\t\t\twp_die( __( 'This activation link is expired or have already been used.','ultimate-member' ) );\r\n\r\n\t\t\t\tUM()->user()->approve();\r\n\t\t\t\t$redirect = ( um_user('url_email_activate') ) ? um_user('url_email_activate') : um_get_core_page('login', 'account_active');\r\n\t\t\t\t$login = (bool) um_user('login_email_activate');\r\n\r\n\t\t\t\t// log in automatically\r\n\t\t\t\tif ( ! is_user_logged_in() && $login ) {\r\n\t\t\t\t\t$user = get_userdata($user_id);\r\n\t\t\t\t\t$user_id = $user->ID;\r\n\r\n\t\t\t\t\t// update wp user\r\n\t\t\t\t\twp_set_current_user( $user_id, $user->user_login );\r\n\t\t\t\t\twp_set_auth_cookie( $user_id );\r\n\r\n\t\t\t\t\tob_start();\r\n\t\t\t\t\tdo_action( 'wp_login', $user->user_login, $user );\r\n\t\t\t\t\tob_end_clean();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tum_reset_user();\r\n\t\t\t\t/**\r\n\t\t\t\t * UM hook\r\n\t\t\t\t *\r\n\t\t\t\t * @type action\r\n\t\t\t\t * @title um_after_email_confirmation\r\n\t\t\t\t * @description Action on user activation\r\n\t\t\t\t * @input_vars\r\n\t\t\t\t * [{\"var\":\"$user_id\",\"type\":\"int\",\"desc\":\"User ID\"}]\r\n\t\t\t\t * @change_log\r\n\t\t\t\t * [\"Since: 2.0\"]\r\n\t\t\t\t * @usage add_action( 'um_after_email_confirmation', 'function_name', 10, 1 );\r\n\t\t\t\t * @example\r\n\t\t\t\t * <?php\r\n\t\t\t\t * add_action( 'um_after_email_confirmation', 'my_after_email_confirmation', 10, 1 );\r\n\t\t\t\t * function my_after_email_confirmation( $user_id ) {\r\n\t\t\t\t * // your code here\r\n\t\t\t\t * }\r\n\t\t\t\t * ?>\r\n\t\t\t\t */\r\n\t\t\t\tdo_action( 'um_after_email_confirmation', $user_id );\r\n\r\n\t\t\t\texit( wp_redirect( $redirect ) );\r\n\r\n\t\t\t}\r\n\r\n\t\t}", "public function sendActivationEmail(Affiliate $affiliate): void\n {\n $message = (new TemplatedEmail())\n ->from('[email protected]')\n ->to($affiliate->getEmail())\n ->subject('Affiliate activated')\n ->htmlTemplate('mail/affiliate_activation.html.twig')\n ->context([\n 'token' => $affiliate->getToken()\n ]); \n\n $this->mailer->send($message);\n }", "public function sendVerificationMail()\n {\n\n $this->notify(new VerifyEmail($this));\n\n }", "function activate()\n\t{\n\t\t$user_id\t\t= $this->uri->segment(3);\n\t\t$new_email_key\t= $this->uri->segment(4);\n\n\t\t// Activate user\n\t\tif ($this->tank_auth->activate_user($user_id, $new_email_key)) {\t\t// success\n\t\t\t$this->tank_auth->logout();\n\t\t\t//$this->_show_message($this->lang->line('auth_message_activation_completed').' '.anchor('/auth/login/', 'Login'));\n\t\t\t$this->session->set_flashdata('message', $this->lang->line('auth_message_activation_completed'));\n\t\t\t\t\t\tredirect('/auth/login');\n\n\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// fail\n\t\t\t$this->session->set_flashdata('message', $this->lang->line('auth_message_activation_failed'));\n\t\t\tredirect('/auth/login');\n\t\t\t//$this->_show_message($this->lang->line('auth_message_activation_failed'));\n\t\t}\n\t}", "public function sendWelcomeEmail()\n {\n SendEmailJob::dispatch($this, 'confirm-email', 'Confirm Your Email', [])->onQueue('account-notifications');\n }", "public function __sendActivationEmail($user_id) {\n\n\n\n //echo $user_id;echo \"fgfgfgfdgfdgfdgdf</br>\";\n\n\n\n //$user = $this->User->find(array('User.id' => $user_id), array('User.email', 'User.username','User.id'));\n\n\n\n $user = $this->User->find('all', array('conditions' => array('User.id' => $user_id)));\n\n\n\n //echo '<pre>';print_r($user);die();\n\n\n\n $usr = $user[0]['User']['email'];\n\n\n\n //print_r($usr);die();\n\n\n\n $urlm = 'http://netin.crystalbiltech.com/winegarden/users/activate/' . $user_id . '/' . $this->User->getActivationHash();\n\n\n\n\n\n\n\n $this->set('username', $this->data['User']['username']);\n\n\n\n //$user['User']['email'];\n\n\n\n //print_r($abcd123);die();\n\n\n\n App::uses('CakeEmail', 'Network/Email');\n\n\n\n $email = new CakeEmail();\n\n\n\n\n\n\n\n $email->from($usr)\n\n\n\n//->cc(Configure::read('Settings.ADMIN_EMAIL'))\n\n\n\n//->cc('[email protected]')\n\n\n\n ->to($usr)\n\n\n\n ->subject('User Activation')\n\n\n\n ->template('activation')\n\n\n\n ->emailFormat('both')\n\n\n\n ->viewVars(array('ds' => $urlm))\n\n\n\n ->send();\n\n\n\n // return $this->redirect(array('controller' => 'shop', 'action' => 'index'));\n\n\n\n }", "public function confirmationEmail()\n {\n $email = new Email;\n $email->sendEmail('submitted', 'applicant', Auth::user()->email);\n }", "public function sendGlobalUserActivated()\n {\n if ($this->_sendMails) {\n $row = $this->getModel()->getKwfUserRowById($this->id);\n $mail = new Kwf_User_Mail_GlobalUserActivated($row);\n $mail->send();\n $this->writeLog('user_mail_GlobalUserActivation');\n }\n }", "public function sendActivationMail($user) \n {\n if ($user->status == config('sc.user_status.active')) {\n return 'activated';\n }\n\n $code = $this->generateActivationCode($user);\n try {\n $response = Mail::send('emails.user_verification', \n ['user'=>$user, 'code'=>$code], \n function ($m) use($user, $code) {\n $m->to($user->email, $user->name)->subject('User Verification');\n }\n );\n\n if ($response) {\n return true;\n }\n }\n catch(Exception $e) {\n return SCHelper::getErrorMessage($e);\n }\n return \"Email Error\";\n }", "public function sendEmailVerificationNotification()\n { \n \n $this->notify(new ConfirmEmail); \n \n }", "public function mailActivatedAccount($params)\n {\n $this->mailer->accountActivated($params);\n }", "public function userActivationMailSend(Request $request)\n {\n $report = [];\n\n $report['senderEmail'] = '[email protected]';\n $report['senderName'] = 'Anonymus User';\n $report['subject'] = 'New user registration';\n $report['emailTo'] = env('ADMIN_MAIL');\n\n $report['name'] = $request->name;\n $report['email'] = $request->email;\n $report['message'] = $request->message;\n\n Mail::to($report['emailTo'])->send(new UserActivation($report));\n\n return redirect()->route('forms.contactform-thankyou');\n }", "public function activateAction()\n {\n $process = User::activate($this->route_params['token']);\n\n if($process){\n Flash::addMessage('Account activated successfully','success');\n $this->redirect('/Login/index');\n }else{\n Flash::addMessage('Oops! Can\\'t activate your account. Activation link is too old or wrong.','danger');\n $this->redirect('/register/activation');\n }\n\n\n }", "public static function sendActivationEmail(MapTableContextObject $mapTableContextObject){\n switch($mapTableContextObject->getTable()){\n case 'werock_user_emails':\n\n try {\n\n /** @var MapTableColumnObject $MapTableColumnObjectEmail */\n $MapTableColumnObjectEmail = $mapTableContextObject->getMapTableTableObject()->getColumns()['werock_user_email_value'];\n /** @var MapTableColumnObject $MapTableColumnObjectUserId */\n $MapTableColumnObjectUserId = $mapTableContextObject->getMapTableTableObject()->getColumns()['werock_user_id'];\n\n $UpdatedUser = self::$UserService->getUser((int)$MapTableColumnObjectUserId->getSubmittedValue());\n if (!empty($UpdatedUser)) {\n self::$UserRepository->assignEmail($UpdatedUser, $MapTableColumnObjectEmail->getSubmittedValue());\n CoreNotification::set('Sent confirmation email', CoreNotification::SUCCESS);\n }\n\n } catch(Exception $e){\n CoreNotification::set('Unable to send confirmation email', CoreNotification::ERROR);\n }\n\n break;\n }\n }", "public function actionActivate($email, $activationKey)\r\n {\r\n if($this->module->activeAfterRegister) // If accounts do not need to be activated.\r\n {\r\n throw new \\yii\\web\\NotFoundHttpException(); // Hide this action.\r\n }\r\n \r\n if(!Yii::$app->user->isGuest) // Only guest can activate accounts.\r\n {\r\n // Redirect instead of throwing a 403, because logged user end up on this page quite often.\r\n $this->redirect($this->module->returnLogoutUrl, 302); // Temporary redirect.\r\n }\r\n \r\n $model= User::find()->where(['email' => $email])->one();\r\n \r\n if($model && (int)$model->status === User::STATUS_ACTIVE) // If the account is already active.\r\n {\r\n throw new \\yii\\web\\ForbiddenHttpException(Yii::t(__CLASS__, 'This account is already active.'));\r\n }\r\n else if($model->activation_key && $model->activation_key == $activationKey) // The activation data checked out.\r\n {\r\n $model->scenario = 'activation';\r\n $model->status = User::STATUS_ACTIVE;\r\n $model->save();\r\n \r\n // Notify the user that activation was sucessful.\r\n return $this->render('message', [\r\n 'model' => $model,\r\n 'message' => Yii::t(__CLASS__, 'Your account is now active. Please log in to start using the service.'),\r\n 'type' => 'success'\r\n ]);\r\n }\r\n else if($model && (int)$model->status !== User::STATUS_ACTIVE && ($model->activation_key == $activationKey)) // The account has been disabled.\r\n {\r\n throw new \\yii\\web\\ForbiddenHttpException(Yii::t(__CLASS__, 'This account is not active.'));\r\n }\r\n \r\n // The activation url was wrong.\r\n throw new \\yii\\web\\ForbiddenHttpException(Yii::t(__CLASS__, 'Incorrect activation URL.'));\r\n }", "public function sendEmailVerificationNotification()\n {\n $this->notify(new AffiliateVerifyEmail);\n }", "private function sendActivationEmail($user, $data)\n\t{\n\t\t$app\t\t= JFactory::getApplication();\n\t\t$config\t\t= JFactory::getConfig();\n\t\t$uparams\t= JComponentHelper::getParams('com_users');\n\t\t$db\t\t\t= JFactory::getDbo();\n\n\t\t$data = array_merge((array)$user->getProperties(), $data);\n\n\t\t$useractivation = $uparams->get('useractivation');\n\n\t\t// Load the users plugin group.\n\t\tJPluginHelper::importPlugin('user');\n\n\t\tif (($useractivation == 1) || ($useractivation == 2)) {\n\t\t\t$params = array();\n\t\t\t$params['activation'] = JApplication::getHash(JUserHelper::genRandomPassword());\n\t\t\t$user->bind($params);\n\t\t\t$userIsSaved = $user->save();\n\t\t}\n\n\t\t// Set up data\n\t\t$data = $user->getProperties();\n\t\t$data['fromname']\t= $config->get('fromname');\n\t\t$data['mailfrom']\t= $config->get('mailfrom');\n\t\t$data['sitename']\t= $config->get('sitename');\n\t\t$data['siteurl']\t= JUri::root();\n\n\t\t// Load com_users translation files\n\t\t$jlang = JFactory::getLanguage();\n\t\t$jlang->load('com_users', JPATH_SITE, 'en-GB', true); // Load English (British)\n\t\t$jlang->load('com_users', JPATH_SITE, $jlang->getDefault(), true); // Load the site's default language\n\t\t$jlang->load('com_users', JPATH_SITE, null, true); // Load the currently selected language\n\n\t\t// Handle account activation/confirmation emails.\n\t\tif ($useractivation == 2)\n\t\t{\n\t\t\t// Set the link to confirm the user email.\n\t\t\t$uri = JURI::getInstance();\n\t\t\t$base = $uri->toString(array('scheme', 'user', 'pass', 'host', 'port'));\n\t\t\t$data['activate'] = $base.JRoute::_('index.php?option=com_users&task=registration.activate&token='.$data['activation'], false);\n\n\t\t\t$emailSubject\t= JText::sprintf(\n\t\t\t\t'COM_USERS_EMAIL_ACCOUNT_DETAILS',\n\t\t\t\t$data['name'],\n\t\t\t\t$data['sitename']\n\t\t\t);\n\n\t\t\t$emailBody = JText::sprintf(\n\t\t\t\t'COM_USERS_EMAIL_REGISTERED_WITH_ADMIN_ACTIVATION_BODY',\n\t\t\t\t$data['name'],\n\t\t\t\t$data['sitename'],\n\t\t\t\t$data['siteurl'].'index.php?option=com_users&task=registration.activate&token='.$data['activation'],\n\t\t\t\t$data['siteurl'],\n\t\t\t\t$data['username'],\n\t\t\t\t$data['password_clear']\n\t\t\t);\n\t\t}\n\t\telseif ($useractivation == 1)\n\t\t{\n\t\t\t// Set the link to activate the user account.\n\t\t\t$uri = JURI::getInstance();\n\t\t\t$base = $uri->toString(array('scheme', 'user', 'pass', 'host', 'port'));\n\t\t\t$data['activate'] = $base.JRoute::_('index.php?option=com_users&task=registration.activate&token='.$data['activation'], false);\n\n\t\t\t$emailSubject\t= JText::sprintf(\n\t\t\t\t'COM_USERS_EMAIL_ACCOUNT_DETAILS',\n\t\t\t\t$data['name'],\n\t\t\t\t$data['sitename']\n\t\t\t);\n\n\t\t\t$emailBody = JText::sprintf(\n\t\t\t\t'COM_USERS_EMAIL_REGISTERED_WITH_ACTIVATION_BODY',\n\t\t\t\t$data['name'],\n\t\t\t\t$data['sitename'],\n\t\t\t\t$data['siteurl'].'index.php?option=com_users&task=registration.activate&token='.$data['activation'],\n\t\t\t\t$data['siteurl'],\n\t\t\t\t$data['username'],\n\t\t\t\t$data['password_clear']\n\t\t\t);\n\t\t} else {\n\n\t\t\t$emailSubject\t= JText::sprintf(\n\t\t\t\t'COM_USERS_EMAIL_ACCOUNT_DETAILS',\n\t\t\t\t$data['name'],\n\t\t\t\t$data['sitename']\n\t\t\t);\n\n\t\t\t$emailBody = JText::sprintf(\n\t\t\t\t'COM_USERS_EMAIL_REGISTERED_BODY',\n\t\t\t\t$data['name'],\n\t\t\t\t$data['sitename'],\n\t\t\t\t$data['siteurl']\n\t\t\t);\n\t\t}\n\n\t\t// Send the registration email.\n\t\t$return = JFactory::getMailer()->sendMail($data['mailfrom'], $data['fromname'], $data['email'], $emailSubject, $emailBody);\n\n\t\t//Send Notification mail to administrators\n\t\tif (($uparams->get('useractivation') < 2) && ($uparams->get('mail_to_admin') == 1)) {\n\t\t\t$emailSubject = JText::sprintf(\n\t\t\t\t'COM_USERS_EMAIL_ACCOUNT_DETAILS',\n\t\t\t\t$data['name'],\n\t\t\t\t$data['sitename']\n\t\t\t);\n\n\t\t\t$emailBodyAdmin = JText::sprintf(\n\t\t\t\t'COM_USERS_EMAIL_REGISTERED_NOTIFICATION_TO_ADMIN_BODY',\n\t\t\t\t$data['name'],\n\t\t\t\t$data['username'],\n\t\t\t\t$data['siteurl']\n\t\t\t);\n\n\t\t\t// get all admin users\n\t\t\t$query = 'SELECT name, email, sendEmail' .\n\t\t\t\t\t' FROM #__users' .\n\t\t\t\t\t' WHERE sendEmail=1';\n\n\t\t\t$db->setQuery( $query );\n\t\t\t$rows = $db->loadObjectList();\n\n\t\t\t// Send mail to all superadministrators id\n\t\t\tforeach( $rows as $row )\n\t\t\t{\n\t\t\t\t$return = JFactory::getMailer()->sendMail($data['mailfrom'], $data['fromname'], $row->email, $emailSubject, $emailBodyAdmin);\n\t\t\t}\n\t\t}\n\n\t\treturn $return;\n\t}", "public function sendEmailVerificationNotification()\n {\n $this->notify( new VerifyEmail() ); # 새로 만든 VerifyEmail Notification 발송\n }", "public function sendEmailVerificationNotification()\n {\n $this->notify(new EmailVerification('admin'));\n }", "public function againActivate(Request $request)\n {\n $template_html = 'mail.activate_user';\n\n $template_data = [\n 'url_activate' => url('http://localhost/sms_mkt/activated.php?key=' . encrypt($request->email) . '&user=' . $request->username),\n\n ];\n\n $user = new Users();\n $user->email = $request->email;\n\n Mail::send($template_html, $template_data, function ($msg) use ($user) {\n $msg->subject('ยืนยันตัวตน === Activate');\n $msg->to([$user->email]);\n $msg->from('[email protected]', 'ClickNext');\n });\n return $this->responseRequestSuccess('Success!');\n }", "public function sendEmailVerificationNotification(){\n $this->notify(new VerifyEmail);\n }", "function addEmail(\n\t\t$email_address,\n\t\t$activation_email_subject = null,\n\t\t$activation_email_view = null,\n\t\t$html = true,\n\t\t$fields = array())\n\t{\n\t\tif (!Pie_Valid::email($email_address)) {\n\t\t\tthrow new Pie_Exception_WrongValue(array(\n\t\t\t\t'field' => 'Email', \n\t\t\t\t'range' => 'a valid address'\n\t\t\t), 'email_address');\n\t\t}\n\t\tPie::event(\n\t\t\t'users/validate/email_address',\n\t\t\tarray('email_address' => & $email_address)\n\t\t);\n\t\t$e = new Users_Email();\n\t\t$e->address = $email_address;\n\t\tif ($e->retrieve() and $e->state !== 'unverified') {\n\t\t\tif ($e->user_id === $this->id) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// Otherwise, say it's verified for another user,\n\t\t\t// even if it unsubscribed or was suspended.\n\t\t\tthrow new Users_Exception_AlreadyVerified(array(\n\t\t\t\t'key' => $e->address,\n\t\t\t\t'user_id' => $e->user_id\n\t\t\t), 'email_address');\n\t\t}\n\t\t\n\t\t// If we are here, then the email record either\n\t\t// doesn't exist, or hasn't been verified yet.\n\t\t// In either event, update the record in the database,\n\t\t// and re-send the email.\n\t\t$minutes = Pie_Config::get('users', 'activationCodeExpires', 60*24*7);\n\t\t$e->state = 'unverified';\n\t\t$e->user_id = $this->id;\n\t\t$e->activation_code = Pie_Utils::unique(5);\n\t\t$e->activation_code_expires = new Db_Expression(\n\t\t\t\"CURRENT_TIMESTAMP + INTERVAL $minutes MINUTE\"\n\t\t);\n\t\t$e->auth_code = md5(microtime() + mt_rand());\n\t\t$e->save();\n\t\t\n\t\tif (!isset($activation_email_view)) {\n\t\t\t$activation_email_view = Pie_Config::get(\n\t\t\t\t'users', 'activationEmailView', 'users/email/activation.php'\n\t\t\t);\n\t\t}\n\t\tif (!isset($activation_email_subject)) {\n\t\t\t$activation_email_subject = Pie_Config::get(\n\t\t\t\t'users', 'activationEmailSubject', \"Welcome! Please confirm your email address.\" \n\t\t\t);\n\t\t}\n\t\t$fields2 = array_merge($fields, array('user' => $this, 'email' => $e));\n\t\t$e->sendMessage(\n\t\t\t$activation_email_subject, \n\t\t\t$activation_email_view, \n\t\t\t$fields2,\n\t\t\tarray('html' => $html)\n\t\t);\n\t\t\n\t\tPie::event('users/addEmail', compact('email_address'), 'after');\n\t}", "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail); // my notification\n }", "public function sendRegistrationEmail()\n {\n $loginToken=$this->extractTokenFromCache('login');\n\n $url = url('register/token',$loginToken);\n Mail::to($this)->queue(new RegistrationConfirmationEmail($url));\n }", "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail());\n }", "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail());\n }", "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail());\n }", "public function sendEmailVerificationNotification()\n {\n $this->notify( new VerifyEmailNotification );\n }", "public function resendActivationEmail()\n {\n $breadCrumb = $this->userEngine\n ->breadcrumbGenerate('resend-activation-email');\n\n return $this->loadPublicView('user.resend-activation-email', $breadCrumb['data']);\n }", "protected function email(Request $request) {\n $verificationToken = $request->route('email_token');\n $userCount = DB::table('users')->where([['verification_token', $verificationToken], ['verified', 'false']])->count();\n if($userCount > 0) {\n\n /* Querying the user table by passing Email verification token */\n $user = DB::table('users')->where([['verification_token', $verificationToken], ['verified', 'false']])->first();\n\n /* Updating Status of Verification */\n DB::table('users')->where('verification_token', $verificationToken)->update(['verified'=> true]);\n\n /**\n * Sending welcome email to the user\n * @author Tittu Varghese ([email protected])\n *\n * @param array | $user\n */\n\n $emailVariables_UserName = $user->first_name;\n $emailVariables_SubTitle = \"Welcome to Bytacoin!\";\n $emailVariables_MainTitle = \"Get Started with Bytacoin\";\n $emailVariables_EmailText = \"Thank you for completing registration with us. We are happy to serve for you and click below button to login to your dashboard and checkout our awesome offerings.\";\n $emailVariables_ButtonLink = \"https://bytacoin.telrpay.com/\";\n $emailVariables_ButtonText = \"GET STARTED\";\n\n $emailTemplate = new EmailTemplates($emailVariables_UserName,$emailVariables_SubTitle,$emailVariables_MainTitle,$emailVariables_EmailText,$emailVariables_ButtonLink,$emailVariables_ButtonText);\n\n $emailContent = $emailTemplate->GenerateEmailTemplate();\n $mail = new Email(true,$emailContent);\n $mail->addAddress($user->email,$user->first_name);\n $mail->Subject = 'Welcome to Bytacoin!';\n $mail->send();\n\n return redirect('login')->with('success', 'Your account has been activated. Please login to access dashboard.');\n\n } else {\n\n return redirect('login')->with('error', 'Looks like the verification link is expired or not valid.');\n\n }\n }", "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail);\n }", "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail);\n }", "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail);\n }", "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail);\n }", "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail);\n }", "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail);\n }", "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail);\n }", "function resend_activation($login){\n\t\t$this->ci->load->model('dx_auth/users', 'users');\n\t\t//$this->ci->load->model('dx_auth/user_temp', 'user_temp');\n\t\t\n\t\t$activation_key = md5(rand().microtime());\n\t\t//if ($query = $this->ci->user_temp->get_login($login) AND $query->num_rows() == 1) {\n\t\tif ($query = $this->ci->users->get_login($login) AND $query->num_rows() == 1) {\n\t\t\t$row = $query->row();\n\t\t\t//$this->ci->user_temp->update_temp(array('email' => $row->email),array('activation_key' =>$activation_key ));\n\t\t\t$this->ci->users->update(array('email' => $row->email),array('activation_key' =>$activation_key ));\n\t\t\t$from = isset($this->settings['site_email']) && $this->settings['site_email'] ? $this->settings['site_email']:$this->ci->config->item('DX_webmaster_email');\n\t\t\t\n\t\t\t\n\t\t\t$subject = sprintf($this->ci->lang->line('auth_activate_subject'), $this->ci->config->item('DX_website_name'));\n\t\t\t$new_user = (array)$row;\n\t\t\t$hash = base64_encode($new_user['email'].'_'.$activation_key);\n\t\t\t$new_user['activate_url'] = site_url($this->ci->config->item('DX_activate_uri').$hash);\n\t\t\t\t\n\t\t\t// Trigger event and get email content\n\t\t\t$this->sending_activation_email($new_user, $message);\n\n\t\t\t// Send email with activation link\n\t\t\t$mailrs = $this->_email($row->email, $from, $subject, $message);\n\t\t\tif($mailrs){\n\t\t\t\treturn 'Activation link sent to your account email';\n\t\t\t} else {\n\t\t\t\treturn 'There is some issue to send email. Please contact to site admin';\n\t\t\t}\n\t\t} else {\n\t\t\treturn 'User with login <strong>'.$login.'</strong> does not exist';\n\t\t}\n\t}", "function email_settings_activation_email($url,$user)\n\t{\n return EmailSettings\\CustomEmail::generate(array(\n \t\t\"title-option\" => \"email-settings-activation-email-title\",\n \t\t\"message-option\" => \"email-settings-activation-email-template\",\n \t\t\"variables\" => array(\"%USERNAME%\",\"%EMAIL%\",\"%LINK%\"),\n \t\t\"url\" => $url,\n \t\t\"user\" => $user,\n \t\t\"wp_mail_from\" => \"EmailSettings\\Filters::activation_filter_from_email\",\n \t\t\"wp_mail_from_name\" => \"EmailSettings\\Filters::activation_filter_from_name\",\n \t\t\"fallback_message\" => __(\"Hello, here is your activation link:\").' '. $url\n\t )\n\t );\n\t}", "public function sendEmailVerificationNotification()\n {\n $this->notify(new AdminEmailVerificationNotification);\n }", "protected function sendMail()\n {\n $user = User::find()\n ->where(['id' => $this->user->id])\n ->one();\n\n $notificationManager = new MailService($user);\n $notificationManager->register();\n }", "function account_activation($account_act_code='') {\n\n\t\tif( $this->authentication->is_user_logged_in() ) {\n\n\t\t\tredirect('home');\n\t\t}\n\n\t\t$this->mcontents['title']\t\t\t= 'Account Activation';\n\t\t$this->mcontents['page_heading']\t= 'Account Activation';\n\n\t\tif( !$account_act_code ) {\n\n\t\t\tredirect('home');\n\t\t}\n\n\t\t$this->load->model('common_model');\n\t\t$aResult = $this->common_model->isValidToken($account_act_code, 'account_activation');\n\t\t$aTokenStatus = c('token_status');\n\n\t\tif( $aResult['status'] != $aTokenStatus['valid'] ) {\n\n\t\t\t//find the reason why this token is not valid\n\t\t\tif( $aResult['status'] == $aTokenStatus['invalid'] ) {\n\n\t\t\t\tsf('error_message', 'Invalid Link. Please contact out support team');\n\t\t\t} elseif($aResult['status'] == $aTokenStatus['expired']) {\n\n\t\t\t\tsf('error_message', 'This link has expired. Click <a class=\"highlight1\" href=\"'.c('base_url').'user/resend_account_activation/'.$account_act_code.'\">here</a> to get another confirmation email');\n\t\t\t}\n\n\t\t\tredirect('home');\n\n\t\t} else {\n\n\t\t\t//activate the account\n\t\t\tif(true === $this->account_model->activateAccount($aResult['oToken']->user_id)){\n\n\t\t\t\t//delete the token\n\t\t\t\t$this->common_model->deleteToken($aResult['oToken']->id);\n\n\n\t\t\t\tif(!$this->authentication->makeLogin($aResult['oToken']->user_id)){\n\n\t\t\t\t\tsf('error_message', 'You could not be logged in. Please contact out admin');\n\t\t\t\t} else {\n\n\t\t\t\t\t// Send welcome message\n\t\t\t\t\t$this->load->model('maintenance_model');\n\t\t\t\t\t$this->maintenance_model->getSingleSetting('db_welcome_msg');\n\t\t\t\t\t$aWelcomeEmail['receiver_name'] = s('FULL_NAME');\n\t\t\t\t\t$aWelcomeEmail['welcome_text'] \t= $this->maintenance_model->getSingleSetting('db_signup_welcome_msg');\n\n\t\t\t\t\t$aSettings = array(\n\t\t\t\t\t\t'to' \t\t\t\t=> array(s('EMAIL') => s('FULL_NAME')), // email_id => name pairs\n\t\t\t\t\t\t'from_email' \t\t=> c('accounts_email_id'),\n\t\t\t\t\t\t'from_name'\t\t\t=> c('accounts_email_from'),\n\t\t\t\t\t\t'reply_to' \t\t\t=> array(c('accounts_email_id') => c('accounts_email_from')), // email_id => name pairs\n\t\t\t\t\t\t'email_contents' \t=> $aWelcomeEmail, // placeholder keywords to be replaced with this data\n\t\t\t\t\t\t'template_name' \t=> 'welcome', //name of template to be used\n\t\t\t\t\t\t//'preview'\t\t\t=> true\n\t\t\t\t\t);\n\n\t\t\t\t\t$this->load->helper('custom_mail');\n\t\t\t\t\tsendMail_PHPMailer($aSettings);\n\n\t\t\t\t\tsf('success_message', 'Account has been activated. Welcome to '.$this->mcontents['c_website_title']);\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tsf('error_message', 'Could not activate!!');\n\t\t\t}\n\n\n\t\t\tredirect('home');\n\t\t}\n\t}", "public function sendEmail()\r\n {\r\n\t\t$mail = new UserMails;\r\n\t\t$mail->sendAdminEmail('admin-user', $this->_user);\r\n }", "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmailNotification);\n }", "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmailNotification);\n }", "public function sendEmail()\n {\n /* @var $user User */\n $user = User::findOne([\n 'status' => User::STATUS_ACTIVE,\n 'email' => $this->email,\n ]);\n\n if ($user) {\n if (!User::isPasswordResetTokenValid($user->password_reset_token)) {\n $user->generatePasswordResetToken();\n }\n\n if ($user->save()) {\n\t\t\t\t$mail = new UserMails;\n\t\t\t\treturn $mail->passwordEmail($user);\n }\n }\n\n return false;\n }", "public function initiateEmailActivation(User $user)\n {\n if (! config('settings.activation') || ! $this->validateEmail($user)) {\n return true;\n }\n\n $activationRepostory = new ActivationRepository();\n $activationRepostory->createTokenAndSendEmail($user);\n }", "protected function sendActivationEmail($user) {\n return true;\n }", "function emailRegistrationAdmin() {\n require_once ('com/tcshl/mail/Mail.php');\n $ManageRegLink = DOMAIN_NAME . '/manageregistrations.php';\n $emailBody = $this->get_fName() . ' ' . $this->get_lName() . ' has just registered for TCSHL league membership. Click on the following link to approve registration: ';\n $emailBody.= $ManageRegLink;\n //$sender,$recipients,$subject,$body\n $Mail = new Mail(REG_EMAIL, REG_EMAIL, REG_EMAIL_SUBJECT, $emailBody);\n $Mail->sendMail();\n }", "public function sendActivationMail(LEmailAccountActivation $code, LUser $user = null) {\n $this->errorCode = 0;\n $message = new YiiMailMessage();\n if (isset($this->activationMailSubjectCallback))\n $subject = call_user_func($this->activationMailSubjectCallback, $code, $user);\n if (!isset($subject) || !is_string($subject))\n $subject = LilyModule::t('E-mail registration on {siteName}', array('{siteName}' => Yii::app()->name));\n $message->setSubject($subject);\n $message->view = $this->activationMailView;\n if (isset($this->activationMailView))\n $message->setBody(array('code' => $code, 'user' => $user), 'text/html');\n else\n $message->setBody(LilyModule::t('Your email was used in registration on <a href=\"{siteUrl}\">{siteName}</a>.<br />\nTo activate it you have to go by this <a href=\"{activationUrl}\">link</a></li> in your browser. <br />\nIf you haven\\'t entered this email on {siteName}, than just ignore this message.<br />\n<br />\nYours respectfully,<br />\nadministration of {siteName}.', array('{siteUrl}' => Yii::app()->createAbsoluteUrl(Yii::app()->homeUrl), '{siteName}' => Yii::app()->name,\n '{activationUrl}' => Yii::app()->createAbsoluteUrl('/'.LilyModule::route('user/activate'), array('code' => $code->code)))), 'text/html');\n $message->addTo($code->email);\n $message->from = $this->adminEmail;\n $recipient_count = Yii::app()->mail->send($message);\n if ($recipient_count > 0)\n Yii::log('E-mail to ' . $code->email . ' was sent.', CLogger::LEVEL_INFO, 'lily');\n else\n Yii::log('Failed sending e-mail to ' . $code->email . '.', CLogger::LEVEL_WARNING, 'lily');\n $this->errorCode = $recipient_count == 0;\n return $recipient_count > 0;\n }", "public function sendEmailVerificationNotification(): void\n {\n $this->notify(new VerifyEmail);\n }", "function send_again()\n\t{\n\t\tif (!$this->tank_auth->is_logged_in(FALSE)) {\t\t\t\t\t\t\t// not logged in or activated\n\t\t\tredirect('/auth/login/');\n\n\t\t} else {\n\t\t\t$this->form_validation->set_rules('email', 'Email', 'trim|required|xss_clean|valid_email');\n\n\t\t\t$data['errors'] = array();\n\n\t\t\tif ($this->form_validation->run()) {\t\t\t\t\t\t\t\t// validation ok\n\t\t\t\tif (!is_null($data = $this->tank_auth->change_email(\n\t\t\t\t\t\t$this->form_validation->set_value('email')))) {\t\t\t// success\n\n\t\t\t\t\t$data['site_name']\t= $this->config->item('website_name', 'tank_auth');\n\t\t\t\t\t$data['activation_period'] = $this->config->item('email_activation_expire', 'tank_auth') / 3600;\n\n\t\t\t\t\t$this->_send_email('activate', $data['email'], $data);\n\n\t\t\t\t\t$this->_show_message(sprintf($this->lang->line('auth_message_activation_email_sent'), $data['email']));\n\n\t\t\t\t} else {\n\t\t\t\t\t$errors = $this->tank_auth->get_error_message();\n\t\t\t\t\tforeach ($errors as $k => $v)\t$data['errors'][$k] = $this->lang->line($v);\n\t\t\t\t}\n\t\t\t}\n\t\t\tdisplay('send_again', $data);\t\t\t\n\t\t}\n\t}", "public function sendTheEmailNow()\r\n {\r\n echo \"Email sent.\";\r\n }", "function svbk_rcp_email_on_activation( $status, $user_id ) {\n\n\tif( 'active' == $status && get_user_meta( $user_id, '_rcp_new_subscription', true ) ) {\n\n\t\t// Send welcome email.\n\t\tif ( ! svbk_rcp_email_subscription_status( $user_id, 'active' ) ) {\n\t\t\tremove_action( 'rcp_set_status', 'rcp_email_on_activation', 11, 2 );\n\t\t}\n\n\t}\n\n}", "public function activate() {\n $installer = new WeDevs\\Notification\\Installer();\n $installer->run();\n }", "public function sendEmailVerificationNotification()\n {\n $this->notify(new EmailVerification('networking_agent'));\n }", "private function sendConfirmationMail() {\n\t\t\t\t$subject = 'Confirmation Mail';\n\t\t\t\t$from = '[email protected]';\n\t\t\t\t$replyTo = '[email protected]';\n\t\t\t\t\n\t\t\t\t//include some fancy stuff here, token is md5 of email\n\t\t\t\t$message = \"<a href='http://www.momeen.com/eCommerce/register/confirmUser.php?token=$this->token'> Confirm</a>\";\n\n\t\t\t\t$headers = \"From: \".\"$from\".\"\\r\\n\";\n\t\t\t\t$headers .= \"Reply-To: \".\"$replyTo\".\"\\r\\n\";\n\t\t\t\t$headers .= \"MIME-Version:1.0\\r\\n\";\n\t\t\t\t$headers .= \"Content-Type:text/html; charset=ISO-8859-1\\r\\n\";\n\t\t\t\tif(!mail($this->email, $subject, $message, $headers)) {\n\t\t\t\t\t$this->response['status'] = 0;\n\t\t\t\t\t$this->response['message'] = 'Confirmation mail did not sent. Contact admin';\n\t\t\t\t}\n\t\t\t}", "public function sendEmailVerificationNotification()\n {\n $this->notify(new CustomVerifyEmail);\n }", "private function SendVerificationEmail($email,$activationcode){\n\t\t$this->load->library('email');\n\t \t$this->email->set_mailtype('html');\n\t\t$this->email->from('[email protected]', 'Biva Publication');\n\t\t$this->email->to($email);\n\n\n\t\t$message='<!DOCTYPE html><html><head></head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /></head><body>';\n\t\t$message.='<p>Dear Reader,</p>';\n\t\t$message.='<p>Thanks for registaring on Biva Publication! Please <strong><a href=\"'.base_url().'home/validate_email/'.$email.'/'.$activationcode.'\">Click Here To Validate Email</a></strong>to active your account, you will be able to log into Biva Publication and manage your ordees.</p>';\n\t\t$message.='<p>Thank You!</p>';\n\t\t$message.='<p>Biva Publication</p>';\n\t\t$message.='</body></html>';\n\n\n\t\t$this->email->subject('Biva Publication Account Verification');\n\t\t$this->email->message($message);\n\n\t\t$this->email->send() or die(\"Message Not Send\");\n\t}", "public function activate()\n {\n $response = $this->response();\n /* le hash de l'email */\n $emailHash = $this->uri->segment(3);\n /* le log d'activation */\n $logID = $this->uri->segment(4);\n if ($this->oauth_web->activate($emailHash, $logID)) {\n redirect();\n // $response[\"status\"] = true;\n }\n // $this->output->set_output(json_encode($response));\n }", "public function activateAccount()\n {\n // Récupération des variables nécessaires à l'activation\n $email = $_GET['email'];\n $activation_key = $_GET['key'];\n // On active le compte\n $activation = $this->Members->activateAccount($email, $activation_key);\n\n // Préparation de la page\n $page = new Page(array(\n 'title' => 'Inscription réussie',\n 'class_body' => 'signin'\n ));\n // Rendu du contenu\n $variables = compact('activation');\n $content = $this->render('members/signin/validation.php', $variables);\n // Rendu de la page\n echo $page->render($content);\n }", "public function user_activation($data) {\n $usersDetails = ClassRegistry::init('User')->find('first', array('conditions' => array('User.id' => $data['user_id'])));\n\n if(isset($data['password']) && !empty($data['password'])) {\n $userPass = $data['password'];\n }\n else{\n $userPass = $usersDetails['UserDetail']['org_password'];\n\t\t\t$sqlN = \"select AES_DECRYPT(org_password, 'secret') as org_password from user_details WHERE user_details.user_id =\".$data['user_id'];\n\n\t\t $dd = ClassRegistry::init('User')->query($sqlN);\n\n\t\t\t$userPass = $dd[0][0]['org_password'];\n\n }\n\n $domain_url = SITEURL;\n\n $endc = safeEncrypt($usersDetails['User']['email']);\n $activation_url = 'users/activate_account/'.$endc;\n\n $emailAddress = $usersDetails['User']['email'];\n $email = new CakeEmail();\n $email->config('Smtp');\n $email->from(array(ADMIN_FROM_EMAIL => MAIL_SITENAME));\n $email->to($emailAddress);\n $email->subject(\"OpusView: Account activation\");\n $email->template('user_activation');\n $email->emailFormat('html');\n $email->viewVars(array('receiver' => $usersDetails['UserDetail']['first_name'] . ' ' . $usersDetails['UserDetail']['last_name'], 'username' => $usersDetails['User']['email'], 'password' => $userPass, 'domain_url' => $domain_url, 'activation_url' => $activation_url));\n $email->send();\n return true;\n }", "public function requestact_user($email)\n \t{\n\t//Get user info from email given/check they actually exist\n\t$users = $this->db->query_read_slave(\"\n\t\tSELECT user.userid, user.usergroupid, username, email, activationid, languageid\n\t\tFROM \".TABLE_PREFIX.\"user AS user\n\t\tLEFT JOIN useractivation AS useractivation ON(user.userid = useractivation.userid AND type = 0)\n\t\tWHERE email = '\" . $this->db->escape_string($email) . \"'\"\n\t);\n\t//If they exist then carry on\n\tif ($this->db->num_rows($users))\n\t{\n\t\t//Loop through everyone with the same email address\n\t\twhile ($user = $this->db->fetch_array($users))\n\t\t{\n\t\t\t//Only work on those who are still not activated\n\t\t\tif ($user['usergroupid'] == NOACTIVATION_USERGROUP)\n\t\t\t{ \n\t\t\t\t//If they for some crazy reason do not have an activation ID then...\n\t\t\t\tif (empty($user['activationid']))\n\t\t\t\t{ \n\t\t\t\t\t//Create a new activation ID for the user\n\t\t\t\t\t$user['activationid'] = build_user_activation_id($user['userid'], 2, 0);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//If they already have an activation ID we'll update the current entry with a new ID\n\t\t\t\t\t$user['activationid'] = fetch_random_string(40);\n\t\t\t\t\t$this->db->query_write(\"\n\t\t\t\t\t\tUPDATE \".TABLE_PREFIX.\"useractivation SET\n\t\t\t\t\t\t\tdateline = \" . TIMENOW . \",\n\t\t\t\t\t\t\tactivationid = '$user[activationid]'\n\t\t\t\t\t\tWHERE userid = $user[userid]\n\t\t\t\t\t\t\tAND type = 0\n\t\t\t\t\t\");\n\t\t\t\t}\n\t\t\t\t//Set some required VB variables (for the email)\n\t\t\t\t$userid = $user['userid'];\n\t\t\t\t$username = $user['username'];\n\t\t\t\t$activateid = $user['activationid'];\n\t\t\t\t//Send out activation email, note the custom vbulletin phrase for the \"main\" site!\n\t\t\t\teval(fetch_email_phrases('activateaccount', $user['languageid']));\n\t\t\t\t//Actually send the email\n\t\t\t\tvbmail($user['email'], $subject, $message, true);\n\t\t\t}\n\t\t}\n\t\t//Return as a success\n\t\treturn false;\n\t}\n\telse\n\t{\n\t\treturn \"No account with that email address exists, please try again.\";\n\t}\n\t}", "public function add_welcome_email() {\n $post_exists = post_exists( '[{{{site.name}}}] Welcome!' );\n \n if ( $post_exists != 0 && get_post_status( $post_exists ) == 'publish' )\n return;\n \n // Create post object\n $my_post = array(\n 'post_title' => __( '[{{{site.name}}}] Welcome!', 'buddypress-welcome-email' ),\n 'post_content' => __( 'Welcome to [{{{site.name}}}]!', 'buddypress-welcome-email' ), // HTML email content.\n 'post_excerpt' => __( 'Welcome to [{{{site.name}}}]!', 'buddypress-welcome-email' ), // Plain text email content.\n 'post_status' => 'publish',\n 'post_type' => bp_get_email_post_type() // this is the post type for emails\n );\n \n // Insert the email post into the database\n $post_id = wp_insert_post( $my_post );\n \n if ( $post_id ) {\n // add our email to the taxonomy term 'activation_completed'\n // Email is a custom post type, therefore use wp_set_object_terms\n \n $tt_ids = wp_set_object_terms( $post_id, 'activation_completed', bp_get_email_tax_type() );\n foreach ( $tt_ids as $tt_id ) {\n $term = get_term_by( 'term_taxonomy_id', (int) $tt_id, bp_get_email_tax_type() );\n wp_update_term( (int) $term->term_id, bp_get_email_tax_type(), array(\n 'description' => 'Recipient has successfully activated an account.',\n ) );\n }\n }\n }", "public function sendEmailVerificationNotification();", "public function build()\n {\n $token = $this->user->verificationToken()\n ->where('type', 'activate')\n ->first();\n\n return $this->subject('Activate Your Account')\n ->view('activation_mail')\n ->with(['token' => $token]);\n }", "protected function sendSuccessActivationEmail($name, $email)\n {\n // Attempt to send success email\n $subject = \"Your Nucleon Plus Account has been activated\";\n $body = JText::sprintf(\n 'PLG_NUCLEONPLUS_EMAIL_ACTIVATION_BODY',\n $name,\n JUri::root()\n );\n\n $config = JFactory::getConfig();\n $mailFrom = $config->get('mailfrom');\n $fromName = $config->get('fromname');\n\n $result = JFactory::getMailer()->sendMail($mailFrom, $fromName, $email, $subject, $body);\n\n if ($result !== true) {\n throw new Exception(JText::sprintf('PLG_NUCLEONPLUS_REGISTRATION_ACTIVATION_NOTIFY_SEND_MAIL_FAILED'));\n }\n }", "function emailconfirmation(){\n\t\t\trequire( dirname(__FILE__) . '/email-confirmation.php' );\n\t\t}", "static private function setAndSendActivationKeyFor($accountId, &$errors) {\r\n\t\t$account = DB::getInstance()->fetchByID('account', $accountId);\r\n\t\t$activationHash = $account['activation_hash'];\r\n\t\t$activationLink = self::getActivationLink($activationHash);\r\n\r\n\t\t$subject = 'Runalyze v'.RUNALYZE_VERSION;\r\n\t\t$message = __('Thanks for your registration').', '.$account['name'].\"!<br><br>\\r\\n\\r\\n\";\r\n\t\t$message .= sprintf( __('You can activate your account (username = %s) with the following link'), $account['username']).\":<br>\\r\\n\";\r\n\t\t$message .= $activationLink;\r\n\r\n\t\tif (!System::sendMail($account['mail'], $subject, $message)) {\r\n\t\t\t$errors[] = __('Sending the link did not work. Please contact the administrator.');\r\n\r\n\t\t\tif (System::isAtLocalhost()) {\r\n\t\t\t\tif ($activationHash == '') {\r\n\t\t\t\t\t$errors[] = __('Your local server has no smtp-server. Your account has been directly activated.');\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$errors[] = __('Your local server has no smtp-server. You have to contact the administrator.');\r\n\t\t\t\t\tError::getInstance()->addDebug('Link for activating account: '.$activationLink);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function sendEmailVerificationNotification()\n {\n if (!allowSendEmail()) {\n $this->markEmailAsVerified();\n return;\n }\n\n $this->notify(new VerifyEmailNotification);\n }", "public function resendActivationEmailSuccess()\n {\n return $this->loadPublicView('user.resend-activation-email-success');\n }", "function activate($username = false, $verification = false)\n\t{\n\t\tif($username && $verification)\n\t\tif($this->auth->activate(urldecode($username), $verification))\n\t\t{\n\t\t\t$this->_render_page('user/activation', array('success' => true));\n\t\t\treturn;\n\t\t}\n\t\t$this->_render_page('user/activation', array('success' => false));\n\t}", "public function sendEmail()\n {\n $user = User::findOne([\n 'store_id' => Yii::$app->storeSystem->getId(),\n 'email' => $this->email,\n 'status' => User::STATUS_INACTIVE\n ]);\n\n if ($user === null) {\n return false;\n }\n\n $content = CommonHelper::render(Yii::getAlias('@common/mail/emailVerify-html.php'), [\n 'user' => $user,\n ], $this, Yii::getAlias('@common/mail/layouts/html.php'));\n\n Yii::$app->mailSystem->send($this->email, Yii::t('app', 'Resend verification email'), $content);\n return true;\n }", "public function actionActivate()\n {\n $username = $this->prompt(Console::convertEncoding(Yii::t('app', 'Username')) . ':', [\n 'required' => true\n ]);\n $model = $this->findModel($username);\n $model->status = User::STATUS_ACTIVE;\n $model->removeEmailConfirmToken();\n $this->log($model->save());\n }", "protected function notify(User $user){\n// '<a href=\"'.action('ProfileController@getActivate', $user->activation_code).'\">Activate My Email</a>';\n// //$msgBody = 'Your activation code is '.$user->phoneActivationCode;\n// $msgBody = 'Thank you for registering with our consultation services,\\nAn activation email has been sent to your mail, please activate it in order to access your account.';\n $emailData= [\n 'name'=>$user->name,\n 'link'=>action('UserController@getActivate', $user->activation_code)\n ];\n SharedFunctions::sendEmailTo('emails.welcome', $user->email,\n 'Register mail', $emailData);\n //SharedFunctions::sendSMS($user->phone, $msgBody);\n }", "public function activateAction()\r\n {\r\n\t\tUser::activate($this->route_params['token']);\r\n\t\t\r\n\t\t$this->user = Auth::getUser();\r\n\r\n $this->redirect('/signup/activated');\r\n }", "public function activateUser(string $activationCode)\n {\n try {\n $user = app(User::class)->where('activation_code', $activationCode)->first();\n if (! $user) {\n return 'The code does not exist for any user in our system.';\n }\n $user->status = 1;\n $user->activation_code = null;\n $user->save();\n //auth()->login($user);\n\n // Get welcome message text\n //$locale = App::getLocale();\n $locale = 'en';\n $message = PostTranslation::where('title', 'Welcome email')\n ->where('locale', $locale)\n ->first();\n\n // Send to the user the confirmation about the activation of the account\n $mailDatas = [];\n $mailDatas['senderEmail'] = '[email protected]';\n $mailDatas['senderName'] = 'Global CI - Administrator';\n $mailDatas['subject'] = 'Activation of your Global CI account';\n $mailDatas['emailTo'] = $user->email;\n $mailDatas['name'] = $user->name;\n $mailDatas['body'] = $message->body ?? null;\n\n Mail::to($user->email)->send(new UserActivationConfirmation($mailDatas));\n } catch (\\Exception $exception) {\n logger()->error($exception);\n\n return 'Whoops! something went wrong.';\n }\n\n return redirect()->to('/')->with('message', 'User succesfuly activated');\n }" ]
[ "0.89438015", "0.85568154", "0.8419658", "0.81587243", "0.7747446", "0.7437791", "0.74117357", "0.7386635", "0.73545647", "0.72183096", "0.7153", "0.71295124", "0.7127572", "0.7120684", "0.7113314", "0.70098597", "0.70066625", "0.69819194", "0.69802016", "0.6968287", "0.69545895", "0.694539", "0.69423854", "0.6935006", "0.6915157", "0.6900984", "0.6897351", "0.68927985", "0.6868155", "0.68585324", "0.6856156", "0.6816666", "0.67852044", "0.6782253", "0.6764222", "0.67357486", "0.6732209", "0.6712274", "0.66804874", "0.66658556", "0.6649029", "0.66349584", "0.663079", "0.66175956", "0.6616419", "0.65876406", "0.65847886", "0.6569561", "0.65683997", "0.65683997", "0.65683997", "0.6568308", "0.6559057", "0.65492433", "0.6547354", "0.6547354", "0.6547354", "0.6547354", "0.6547354", "0.6547354", "0.6547354", "0.6535873", "0.65259445", "0.652062", "0.65103865", "0.64969164", "0.64965886", "0.6496175", "0.6496175", "0.6495471", "0.64926517", "0.6487206", "0.64836264", "0.6450179", "0.6444286", "0.6442997", "0.6433625", "0.6419716", "0.6411162", "0.63656056", "0.63532376", "0.6346265", "0.633453", "0.63247114", "0.630513", "0.6288715", "0.62874573", "0.62476414", "0.6247386", "0.6235052", "0.6231074", "0.6224959", "0.62176037", "0.62157047", "0.62045246", "0.6199883", "0.61963063", "0.61866117", "0.6173972", "0.61703557", "0.61628693" ]
0.0
-1
get user info by email
public function loadUserByEmail($email) { $user = $this->createQueryBuilder('u') ->where('u.email = :email') ->setParameter('email', $email) ->getQuery() ->getOneOrNullResult(); return $user; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUser($email);", "public function getUserByEmail($email);", "function get_user_by_email($email)\n {\n }", "public function get_user($email){\n\t\t$email_md5_hash = md5($email); \n\t\t$endpoint = '/lists/'. LIST_ID . '/members/'. $email_md5_hash;\n\t\t$result = $this->mc->get($endpoint);\n\t\tif($result['status'] == '404'){\n\t\t\tprint 'user does not exist';\n\t\t}else{\n\t\t\tprint '<pre>'; print_r($result); print '</pre>';\n\t\t}\n\t\t\n\t}", "public function getUserByEmail()\n {\n $db = init_db();\n $req = $db->prepare(\"SELECT * FROM user WHERE email = ?\");\n $req->execute(array($this->getEmail()));\n $db = null;\n\n return $req->fetch();\n }", "function getUserByEmail($email)\n\t{\n\t \n\t\t$stmt = $this->con->prepare(\"SELECT id, username, email, nik, apikey, isuser, isspv, isadmin FROM users WHERE email = ?\");\n\t\t\n\t\t$stmt->bind_param(\"s\", $email);\n\t\t$stmt->execute();\n\t\t$stmt->bind_result($id, $username, $email, $nik, $apikey, $isuser, $isspv, $isadmin);\n\t\t$stmt->fetch();\n\t\t\n\t\t\n\t\t$user = array();\n\t\t$user[\"id\"] = $id;\n\t\t$user[\"username\"] = $username;\n\t\t$user[\"email\"] = $email;\n\t\t$user[\"nik\"] = $nik;\n\t\t$user[\"apikey\"] = $apikey;\n\t\t$user[\"isuser\"] = $isuser;\n\t\t$user[\"isspv\"] = $isspv;\n\t\t$user[\"isadmin\"] = $isadmin;\n\t\treturn $user;\n\t\t\n\t}", "public function fetchUserByEmail($email);", "function getByEmail($email);", "function getuser($email)\n\t\t{\n\t\t\t$email = \"'\".$email.\"'\";\n\t\t\t$sql = $this->conn_id->query(\"select * from users where email = \".$email );\n\t\t\t$r = $sql->fetchALL(PDO::FETCH_ASSOC);\n\t\t\treturn $r;\n\t\t}", "public function getUserByEmail($email) {\n //create user query by email\n $user_query_by_email = Doctrine_Query::create()\n ->select('sgu.id')\n ->from('sfGuardUser sgu')\n ->where('sgu.email_address =?', $email);\n return $user_query_by_email->fetchOne();\n }", "public function getUserByEmail($email) {\n $stmt = $this->conn->prepare(\"SELECT name, email, api_key, created_at FROM app_users WHERE email = ?\");\n $stmt->bind_param(\"s\", $email);\n if ($stmt->execute()) {\n $user = $stmt->get_result()->fetch_assoc();\n $stmt->close();\n return $user;\n } else {\n return NULL;\n }\n }", "public function getUserDetailsByEmail($email)\n\t{\n\t\tif (empty($email))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tglobal $wpdb;\n\t\t$sql = \"\n\t\t\t\tSELECT\n\t\t\t\tusers.user_email,\n\t\t\t\tusers.display_name,\n\t\t\t\tusers.user_registered,\n\t\t\t\t(SELECT usermeta.meta_value FROM $wpdb->usermeta usermeta\n\t\t\t\tWHERE usermeta.meta_key = 'activation_key' and usermeta.user_id = users.ID) as activation_key\n\t\t\t\tFROM $wpdb->users users\n\t\t\t\tWHERE\n\t\t\t\tusers.user_email = '\" . $email . \"'\n\t\t\t\t\";\n\n\t\treturn $wpdb->get_row($sql);\n\t}", "public function getUserByEmail($email){\n \n if (filter_var($email, FILTER_VALIDATE_EMAIL)){\n \n $sql = new Sql();\n $res = $sql->select('SELECT * FROM usuarios \n WHERE email_usuario = :email_usuario',array(\n ':email_usuario'=>$email));\n \n if($res==false || count($res)==0){\n return 0;//caso NADA ENCONTRADO\n }else{\n return $res[0];//retorna array associativo com dados do usuario\n }\n\n }else{\n return false;//RETORNA FALSO (EMAIL INVÁLIDO)\n }\n \n }", "function getUser($email) {\r\n\t\t\tif (is_numeric($email))\r\n\t\t\t\t$sql = \"SELECT users.user_id, users.student_id, users.email, users.password, users.society_id, users.active, societies.society_name FROM `users`, `societies` WHERE societies.society_id=users.society_id AND user_id=%s\";\r\n\t\t\telse\r\n\t\t\t\t$sql = \"SELECT users.user_id, users.student_id, users.email, users.password, users.society_id, users.active, societies.society_name FROM `users`, `societies` WHERE societies.society_id=users.society_id AND UPPER(users.email)=UPPER('%s')\";\r\n\t\t\t$result = $this->query($sql, $email);\r\n\t\t\tif (mysql_num_rows($result) == 0) return false;\r\n\t\t\treturn mysql_fetch_object($result);\r\n\t\t}", "function getByEmail($email){\n\t\t}", "function get_user($email) {\n // Build the query\n $query = \"SELECT * FROM UserAccount WHERE email = ?\";\n // Execute the query\n\t $result = $this->db->query($query, $email);\n // Check if any results are returned from the query\n if ($result->num_rows() > 0) {\n // Build the data array\n foreach ($result->result_array() as $row) {\n \t\t\t$data[] = array(\n \t\t\t\t'email' => $row['email'],\n \t\t\t\t'first_name' => $row['first_name'],\n 'last_name' => $row['last_name'],\n 'is_enabled' => $row['is_enabled'],\n 'is_admin' => $row['is_admin']\n \t\t\t);\n \t\t}\n } else {\n $data = \"User does not exist.\";\n }\n // Pass back the data\n \treturn $data;\n }", "function getUserByEmail($userEmail){\n\n\t\tglobal $conn;\n\n\t\t$query = \"SELECT firstname, lastname, email, phone FROM User WHERE email='\" . $userEmail . \"'\";\n\n\t\t$result = $conn->query($query);\n\n\t\tif($result->num_rows != 1){\n\t\t\treturn \"NO_USER_BY_EMAIL\";\n\t\t}else{\n\t\t\treturn $result->fetch_assoc();\n\t\t}\n\t}", "function get_user_by_email($email) {\n // read db and put into variable\n $read_json = file_get_contents(__DIR__ . '/data_users.json');\n $data = json_decode($read_json, JSON_OBJECT_AS_ARRAY);\n\n // iterate over db, if email is found, return user\n foreach ($data as $user){\n if ($user[\"email\"] == $email){\n return $user;\n }\n }\n return false;\n}", "public static function getdetailbyemail($email) {\n \n \t$data = Doctrine_Query::create()->select(\"u.*\")\n \t->from('User u')\n \t->where('u.email='.\"'$email'\")\n \t->andWhereIn(\"u.usertype!='F'\")\n \t->fetchArray();\n \n \treturn @$data[0];\n }", "public function getUserByEmail($email=NULL)\n\t{\n\t\t$result = Yii::app()->db->createCommand()\n \t->select('*')\n \t->from($this->tableName())\n \t \t->where('loginId=:loginId', array(':loginId'=>$email))\t\n \t \t->queryRow();\n\t\t\n\t\treturn $result;\n\t}", "public function getUserByEmail($email) {\n return $this->db->select(\"id,password,token\")->where(\"email\", $email)->get(\"users\");\n }", "public function getUser($email) {\n $db = $this->getAdapter();\n $select = $db->select()\n ->from($this->_name, '*')\n ->where('email = ?', $email);\n $value = $db->fetchAll($select);\n return $value;\n }", "public function retrieveUserByEmail($email)\n {\n return $this->start()->uri(\"/api/user\")\n ->urlParameter(\"email\", $email)\n ->get()\n ->go();\n }", "public function basicInfoByEmail($email)\n {\n return $this->model->where ( 'email', '=', $email )\n ->select (\n [\n 'users.id', 'users.email', 'users.password',\n 'users.current_sign_in_at', 'users.current_sign_in_ip', 'users.sign_in_count',\n 'user_profiles.first_name', 'user_profiles.last_name'\n ] )\n ->join ( 'user_profiles', 'user_profiles.user_id', '=', 'users.id' )->first ();\n }", "public function user_get_by_useremail($email)\n {\n $query = \"SELECT *\n FROM \" . $this->db_table_prefix . \"users where email='\".$email.\"'\";\n $result = $this->commonDatabaseAction($query);\n// if (mysql_num_rows($result) > 0)\n if ($this->rowCount > 0)\n {\n return $this->resultArray($result);\n }\n else\n {\n return null;\n }\n }", "public function get_user($email){\n $query = $this->db->get_where('users', array('user_email'=> $email));\n $result = $query->result_array();\n return $result;\n\n }", "public function user_get_by_email($email)\n {\n $query = \"SELECT *\n FROM \" . $this->db_table_prefix . \"users where email='\".$email.\"'\";\n $result = $this->commonDatabaseAction($query);\n// if (mysql_num_rows($result) > 0)\n if ($this->rowCount > 0)\n {\n return $this->resultArray($result);\n }\n else\n {\n return null;\n }\n }", "public function getUserByEmail($email, $app_id) {\n $basesql = \"SELECT puv.is_verified, ad.id as app_id FROM users u \n\t\t\t\t\tLEFT JOIN user_appdata uad on uad.user_id=u.id \n\t\t\t\t\tLEFT JOIN purist_user_verified puv on puv.customer_id=uad.id \n\t\t\t\t\tLEFT JOIN app_data ad on ad.id=uad.app_id \n\t\t\t\t\tWHERE uad.email_address = '\" . $email . \"' AND puv.is_verified='1' AND ad.id='\" . $app_id . \"'\";\n $userdata = $this->query_run($basesql, 'select');\n\n return $userdata;\n }", "public function get_user_by_email($arg){\n\n return $this->db->query(\"SELECT * FROM admins WHERE email= ?\", $arg)->row_array();\n \n }", "function getUserInfoByUsermail($usermail) {\n jincimport('utility.servicelocator');\n $servicelocator = ServiceLocator::getInstance();\n $logger = $servicelocator->getLogger();\n \n $dbo =& JFactory::getDBO();\n $query = 'SELECT id, username, name, email FROM #__users WHERE email = ' . $dbo->quote($usermail);\n $dbo->setQuery($query); \n $logger->debug('JINCJoomlaHelper: executing query: ' . $query);\n $infos = array();\n if ($user_info = $dbo->loadObjectList()) {\n if (! empty ($user_info)) {\n $user = $user_info[0];\n $infos['id'] = $user->id;\n $infos['username'] = $user->username;\n $infos['name'] = $user->name;\n $infos['email'] = $user->email;\n }\n }\n return $infos;\n }", "public function userDetailsByEmail($email)\n {\n return $this->user::where('email', $email)->first();\n }", "public function retrieveUser ($email) {\n return $this->usersDB->retrieve($email);\n }", "function get_user_by_email($email)\n{\n global $conn;\n $q['query'] = \"SELECT * FROM `user_master` WHERE `email`='$email'\";\n $q['run'] = $conn->query($q['query']);\n $q['result'] = $q['run']->fetch_assoc();\n\n return $q['result'];\n}", "public function getUserByEmail($email) {\r\n $result = mysqli_query($this->con,\"SELECT * FROM users WHERE email ='$email'\") ;\r\n // check for result \r\n $no_of_rows = mysqli_num_rows($result);\r\n if ($no_of_rows > 0) {\r\n $result = mysqli_fetch_array($result);\r\n \r\n return $result;\r\n \r\n } else {\r\n // user not found\r\n return false;\r\n }\r\n }", "public function getUserByEmail($email)\n {\n $query = \"SELECT name, email, gender, school, api_key, created_at FROM users WHERE email = ?\";\n $stmt = $this->conn->prepare($query);\n $stmt->bind_param(\"s\", $email);\n\n if (!$stmt->execute()) {\n return NULL;\n }\n\n // $user = $stmt->get_result()->fetch_assoc();\n $stmt->bind_result($name, $email, $gender, $school, $api_key, $created_at);\n $stmt->fetch();\n $user = array();\n $user[\"name\"] = $name;\n $user[\"email\"] = $email;\n $user[\"gender\"] = $gender;\n $user[\"school\"] = $school;\n $user[\"api_key\"] = $api_key;\n $user[\"created_at\"] = $created_at;\n $stmt->close();\n\n return $user;\n }", "function get_profile_email($email){\r\n\t\r\n}", "public function getUserByEmail($email)\n {\n return $this->model->where('email', $email)->first();\n }", "public function findUserByEmail($email)\r\n {\r\n $user = $this->DB->fetchAssoc('select * from user where email = ?',array($email));\r\n $user = $this->reformatUserData($user);\r\n return $user;\r\n }", "function getProfileInfo($user){\n\t\tglobal $db;\n\t\t$sql = \"SELECT * from personalinfo WHERE user_email ='$user'\";\n\t\t$result =$db->query($sql);\n\t\t$infotable = $result->fetch_assoc();\n\t\treturn $infotable;\n\t}", "public function findUserByEmail($email);", "public function findUserByEmail($email);", "public function findUserByEmail($email);", "public function getByEmailAddress($email){\n return $this->respond(User::loadByEmail($email));\n }", "public function getByEmail($email) {\n //Requête d'un objet user à partir de son email\n $reqEmail = $this->db->prepare(\"\n SELECT id, firstname, lastname, pseudo, email, password, level_id \n FROM user WHERE email=:email\n \");\n\n $reqEmail->execute(array(\n 'email' => $email,\n ));\n \n $data = $reqEmail->fetch(PDO::FETCH_ASSOC);\n\n if ($data) {\n \n return new User($data);\n }\n return $data;\n }", "public function getUserByEmail($email) {\r\n $query = $this->db->limit(1)\r\n ->get_where(USERS, array('email' => $email));\r\n return $query->row();\r\n }", "function get_member_with_email($email)\r\n\t{\r\n\t\tglobal $dbCon;\r\n\r\n\t\t$sql = \"SELECT id, username, firstname, lastname, email, password, salt, permission FROM student WHERE email = ?;\";\r\n\t\t$stmt = $dbCon->prepare($sql); //Prepare Statement\r\n\t\tif ($stmt === false)\r\n\t\t{\r\n\t\t\ttrigger_error('SQL Error: ' . $dbCon->error, E_USER_ERROR);\r\n\t\t}\r\n\t\t$stmt->bind_param('s', $email);\r\n\t\t$stmt->execute(); //Execute\r\n\t\t$stmt->bind_result($id, $username, $firstname, $lastname, $email, $password, $salt, $permission); //Get ResultSet\r\n\t\t$stmt->fetch();\r\n\t\t$stmt->close();\r\n\r\n\t\tif ($id > 0)\r\n\t\t{\r\n\t\t\t//Create an array with the user data.\r\n\t\t\t$user_array = array(\"id\" => $id, \"username\" => $username, \"firstname\" => $firstname, \"lastname\" => $lastname, \"email\" => $email, \"password\" => $password, \"salt\" => $salt, \"permission\" => $permission);\r\n\t\t\treturn $user_array;\r\n\t\t}\r\n\t\treturn TRUE;\r\n\t}", "function getUser($email)\n {\n //1. Define the query\n $sql = \"SELECT * FROM users WHERE email = '$email'\";\n\n //2. Prepare the statement\n $statement = $this->_dbh->prepare($sql);\n\n //4. Execute the query\n $statement->execute();\n\n //5. Process the results\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n }", "protected function getUser($email)\n {\n return User::findByEmail($email) ? User::findByEmail($email) : false;\n\n }", "public function showByEmail($email){\n\t\t$users = User::where('status', 1)\n\t\t\t\t\t\t->where('email', $email)->get();\n\t\tif($users->count() == 0){\n\t\t\treturn $this->errorResponse( 'User does not exist', 404);\n\t\t}\n\t\treturn response($users->first());\n\t}", "public static function getUserByEmail($email = null)\n\t{\n\t\tif ($email != null)\n\t\t{\n\t\t\t// Retrieve specific user informations\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$user = DB::table('users')\n\t\t\t\t\t->select(\n\t\t\t\t\t\t'users.id AS id',\n\t\t\t\t\t\t'users.email AS email',\n\t\t\t\t\t\t'users.first_name AS first_name',\n\t\t\t\t\t\t'users.last_name AS last_name',\n\t\t\t\t\t\t'users.address AS address',\n\t\t\t\t\t\t'users.city AS city',\n\t\t\t\t\t\t'users.phone AS phone',\n\t\t\t\t\t\t'users.created_at AS created_at',\n\t\t\t\t\t\t'users.updated_at AS updated_at'\n\t\t\t\t\t\t)\n\t\t\t\t\t->where('users.email', '=', $email)\n\t\t\t\t\t->first();\n\n\t\t\t\treturn array('status' => 1, 'user' => $user);\n\t\t\t}\n\t\t\tcatch (Exception $exp)\n\t\t\t{\n\t\t\t\treturn array('status' => 0, 'reason' => $exp->getMessage());\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn array('status' => 0, 'reason' => 'No e-mail entered.');\n\t\t}\n\t}", "public function getSpecificUserData($email) {\n $conn = $this->getConnection();\n $getQuery = \"SELECT * FROM userdata where Email = :email group by Address\";\n $q = $conn->prepare($getQuery);\n $q->bindParam(\":email\", $email);\n $q->execute();\n return $q->fetchAll();\n }", "public function getUser($email){\n $sql=\"SELECT * FROM users WHERE (email = ?)\";\n $select=parent::connect_db()->prepare($sql);\n $select->bindValue(1, $email);\n $select->execute();\n $datas=$select->fetch(\\PDO::FETCH_ASSOC);\n if($select->rowCount() > 0):\n $row=$select->rowCount();\n return $arry_datas=[\n 'data' => $datas,\n 'row'=>$row\n ];\n else:\n return [];\n endif;\n }", "public function getByEmail($email) {\n\n\t\t// get database\n\t\t$db = $this->app->database;\n\n\t\t// search email\n\t\tif ($id = $db->queryResult('SELECT id FROM #__users WHERE email = '.$db->Quote($email))) {\n\t\t\treturn $this->get($id);\n\t\t}\n\n\t\treturn null;\n\t}", "public static function findUserbyEmail($email)\r\n {\r\n\t\t $tableName = preg_replace('/.*\\\\\\\\/', '', get_called_class());\r\n\t\t $sql = 'SELECT * FROM ' . $tableName . ' WHERE email = ?';\r\n \r\n //grab the only record for find one and return as an object\r\n $recordsSet = self::getResults($sql, self::$modelName, $email);\r\n \r\n if (is_null($recordsSet)) {\r\n return FALSE;\r\n } else {\r\n return $recordsSet[0];\r\n }\r\n }", "public function find_user_with_email($email)\n {\n $result = array(\n \"status\" => \"\",\n \"body\" => array(),\n \"error\" => array()\n );\n $stmt = $this->db->prepare(\"SELECT * FROM users WHERE email LIKE ?\");\n if (!($stmt))\n {\n trigger_error(\"Prepare failed: (\" . $this->db->errno . \") \" . $this->db->error,\n E_USER_ERROR);\n }\n if (!$stmt->bind_param('s', $email)){\n trigger_error(\"Binding parameters failed: (\" . $stmt->errno . \") \" . $stmt->error,\n E_ERROR);\n }\n if (!$stmt->execute()) {\n trigger_error(\"Execute failed: (\" . $stmt->errno . \") \" . $stmt->error,\n E_CORE_ERROR);\n $result['status'] = \"No user with that email exists\";\n $result[\"error\"] = $stmt->error;\n }\n $res = $stmt->get_result();\n $row = $res->fetch_assoc();\n if ($row[\"id\"] != null){\n $result[\"status\"] = \"Query successful\";\n $result[\"body\"] = array(\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 );\n return $result;\n } else {\n $result['status'] = \"No user with that email exists\";\n }\n return $result;\n }", "public static function getByEMAIL($email) {\n $str = \"\n SELECT id, firstName, lastName, email, password\n FROM indPrj_persons\n WHERE email ='\" . $email . \"'\";\n \n return mysql_fetch_array(Database::query($str));\n }", "static function getUser($ruta, $email)\n {\n $lista = Archivo::getJSON($ruta);\n $ret = false;\n \n if ($lista) {\n foreach ($lista as $value) {\n $ret = ($value->_email == $email);\n if ($ret){\n $ret = $value; \n break;\n }\n }\n }\n return $ret;\n }", "public static function get_by_email($user_email) {\n\t\t$db = db::get_instance();\n\t\t\n\t\t$query = sprintf(\"SELECT * \n\t\t FROM users\n\t\t WHERE `user_email` = '%s'\",\n\t\t $db->db_escape($user_email));\n\t\t \n\t\t return $db->db_fetch($query);\n\t}", "function memberByEmail($email)\r\n {\r\n $select = 'SELECT member_id, username, firstname, lastname, email, password, image FROM atlas_members WHERE email=:email';\r\n\r\n $statement = $this->_pdo->prepare($select);\r\n $statement->bindValue(':email', $email, PDO::PARAM_INT);\r\n $statement->execute();\r\n\r\n return $statement->fetch(PDO::FETCH_ASSOC);\r\n }", "public function getUserByEmail($email)\n {\n $connection = Db::getConnection();\n\n $userData = $connection->fetchAssoc(\n \"SELECT id, email, create_date\n FROM {$this->tableName}\n WHERE email = ?\", \n [$email]\n );\n\n return $this->initializeObject($userData);\n }", "public function getUserByEmail($email)\n {\n $sql = \"SELECT * FROM admin_user WHERE email=:email\";\n\n return $this->_rdb->fetchRow($sql, array('email' => $email));\n }", "public function getUsuarioPorEmail(){\n\n\t\t$query = \"select nome, email from usuarios where email = :email\";\n\t\t$stmt = $this->db->prepare($query);\n\t\t$stmt->bindValue(':email', $this->__get('email'));\n\t\t$stmt->execute();\n\n\t\treturn $stmt->fetchAll(\\PDO::FETCH_ASSOC);\n\t}", "function getUserNameFromEmail( $email ) {\n $d = loadDB();\n\n foreach ( $d[\"users\"] as $key => $value ) {\n if ($value[\"email\"] == $email) {\n return $value[\"name\"];\n }\n }\n return \"unknown\";\n }", "private function getUserByEmail($email) {\n\n\t\t$query = array('email' => $email);\n\t\ttry {\n\t\t\t$found = $this->collection->findOne($query, array('_id', 'password', 'logintokens'));\n\t\t} catch (Exception $e) {\n\t\t\tdumper($e->getMessage());\n\t\t\treturn FALSE;\n\t\t}\n\t\treturn $found;\n\t}", "public function getUserByEmail($email)\n {\n $this->db->query('SELECT * FROM user WHERE email = :email');\n $this->db->bind(':email', $email);\n $row = $this->db->single();\n return $row;\n }", "public function get($email)\n\t{\n\t\t$this->db->where('email', $email);\n\t\t$result = $this->db->get('mst_user')->row();\n\n\t\treturn $result;\n\t}", "function getUserData($email_addr) {\r\n $sql = $this->db->prepare(\"SELECT UserID, firstname, lastname, type, chamberID, businessID FROM USER WHERE email=:email_address\");\r\n if ($sql->execute(array('email_address' => $email_addr))) {\r\n $results = $sql->fetch( PDO::FETCH_ASSOC );\r\n return $results;\r\n }\r\n return false;\r\n }", "function get_username_by_email($h, $email){\n \n $sql = \"SELECT user_username FROM \" . TABLE_USERS . \" WHERE user_email=%s LIMIT 1\";\n $query = $h->db->prepare($sql, $email);\n \n\treturn $username= $h->db->get_var($query);\n }", "public function getUserInfo($email, $password)\n\t{\n\t\t$stmt = $this->conn->prepare('SELECT email, id FROM users WHERE email = :em AND password = :pw');\n\t\t$stmt->bindParam(':em', $email);\n\t\t$stmt->bindParam(':pw', $password);\n\t\t$stmt->setFetchMode(PDO::FETCH_ASSOC);\n\t\t$stmt->execute();\n\t\t\n\t\t$result = $stmt->fetch();\n\t\techo \"User id: \" . $result['id'];\t\t\n\t\treturn $result;\n\t}", "public function get($info)\n\t{\n\t\t$query = sprintf(\"SELECT fname, lname, email, salt, password FROM users\n\t\t\t\t\t\t\tWHERE email = '%s'\",\n\t\t\t\t\t\t\tmysql_real_escape_string($info['email']));\n\t\t\n\t\t$result = mysql_query($query);\n\t\t\n\t\t$row = mysql_fetch_object($result);\n\t\t\n\t\treturn $row;\n\t}", "public function getUserByEmail($email)\n {\n $options = [\n 'search_engine' => 'v2',\n 'q' => \"email.raw:\".$email\n ];\n $users = $this->getManagement()->users->getAll($options);\n return empty($users) ? null : $users[0];\n }", "public function getDetailUserByEmail($email, $pre_cache = false)\n {\n $arrData = $this->cache->getDetailUserByEmail($email);\n\n if ((!$this->enable_cache || $pre_cache) || !$arrData) {\n $arrData = $this->mysql->getDetailUserByEmail($email);\n\n if ($this->enable_cache) {\n $this->cache->setDetailUserByEmail($email, $arrData);\n }\n }\n\n return $arrData;\n }", "public function getUserByEmail($email){\n $stmt = $this->con->prepare(\"SELECT id, name, email FROM users WHERE email = ?\");\n $stmt->bind_param(\"s\", $email);\n $stmt->execute(); \n // $stmt->bind_result($id, $name, $email, $school, $created_at, $updated_at);\n $stmt->bind_result($id, $name, $email);\n $stmt->fetch(); \n $user = array(); \n $user['id'] = $id; \n $user['name'] = $name; \n $user['email']=$email; \n // $user['school'] = $school; \n // $user['created_at'] = $created_at; \n // $user['updated_at'] = $updated_at; \n return $user; \n }", "public function getByEmail(string $email): User;", "public function getUserByEmail($email)\n {\n return $this->user->userByEmail($email);\n }", "function getUser($email, $db){\n $sql = 'SELECT user_id, first_name, last_name, is_realtor, mls_num, phone, email, user_password FROM users WHERE email = :email';\n $stmt = $db->prepare($sql);\n $stmt->bindValue(':email', $email, PDO::PARAM_STR);\n $stmt->execute();\n $userData = $stmt->fetch(PDO::FETCH_ASSOC);\n $stmt->closeCursor(); \n return $userData;\n }", "public function get_user_info_by_email_pass( $useremail, $userpass ) {\n $userpass = md5( $userpass );\n\n $sql = \"SELECT u.id, firstname, lastname, account_type \n FROM users u\n INNER JOIN users_info ui\n ON u.id = ui.user_id\n WHERE u.email = :email AND u.password = :pass\";\n $sth = $this->conn->prepare( $sql) ;\n $sth->execute(\n array(\n ':email' => $useremail,\n ':pass' => $userpass\n )\n );\n return $sth->fetch( PDO::FETCH_ASSOC );\n }", "public function searchUserByMail($email)\n {\n $reqmail = $this->db->prepare(\"SELECT * FROM users WHERE email = ?\");\n $reqmail->execute(array($email));\n $user = $reqmail->fetchAll(PDO::FETCH_CLASS, User::class);\n\n return $user[0];\n }", "function getUserEmail(){\n\t//follow this example, add session variable to the sql select statement using a where clause\n\t$result = queryDB(\"Select * from user limit 1\");\n\t$row = mysql_fetch_array($result);\n\techo $row['email'];\n\treturn $row['email'];\n}", "public function get_user_by_email_address($email_address, $organization_id);", "public function getUserByEmail($email)\n {\n $q = $this->db->get_where('user', array('email' => $email));\n\n return $q->result();\n }", "private function getUserData($email)\n {\n // if database connection opened\n if ($this->db->isConnected()) {\n // database query, getting all the info of the selected user\n $select = $this->db->row(\n 'SELECT * FROM users WHERE user_email = :user_email',\n array('user_email' => $email)\n );\n // get result row (as an object)\n return $select;\n } \n else {\n return false;\n }\n }", "public function findNameByEmail($email){\n\n\t\t$stmt = $this->db->prepare(\"SELECT * FROM users WHERE email=?\");\n\t\t$stmt->execute(array($email));\n\t\t$user = $stmt->fetch(PDO::FETCH_ASSOC);\n\n\t\tif($user != null) {\n\n\t\t\treturn new User(\n\t\t\t$user[\"email\"],\n\t\t\t$user[\"completeName\"]);\n\t\t} \n\t\telse {\n\t\t\treturn NULL;\n\t\t}\n\t}", "public function getUser(string $email) {\n\t\t$queryString = \"SELECT * \n\t\t\t\t\t\tFROM users \n\t\t\t\t\t\tWHERE email='{$email}';\";\n\t\t$userArray = $this->queryForUser($queryString);\n\t\treturn $this->makeUserFromArray($userArray);\n\t}", "public function findUserByEmail($email)\n {\n return $this->userRepo->where(['email_company' => $email])->first();\n }", "public static function getUserByEmail($email)\n\t{\n\t\tif (!$email) return false;\n\t\treturn self::_getDao()->getBy(array('email' => $email));\n\t}", "function people_findByEmail($find_email) {\n $response = $this->execute(array('method' => 'flickr.people.findByEmail', 'find_email' => $find_email));\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['user']['nsid'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}", "public function check_user($email)\n\t{\n\t\t$user_json = Model_Contributors::get_contributors('', \"email=$email\");\n\t\t$user = json_decode($user_json['json_result'], true);\n\t\t\n\t\tif($user['meta']['total_count'] == true)\n\t\t{\n\t\t\t//return contributor's id\n\t\t\treturn array(\"id\"=>$user['objects'][0]['id'], \"name\"=>$user['objects'][0][\"name\"]);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\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();", "function find_user($email = \"\"){\n\n\t\tif(!$email){\n\t\t\tset_alert('error', 'User Email is not set');\n\t\t\tdie(); \n\t\t}\n\n\t\t \t$allUsers = scandir(\"db/users/\");\n\t\t \t$countAllUsers = count($allUsers);\n\n\t \tfor ($counter=0; $counter < $countAllUsers; $counter++) {\n\n \t\t\t$currentUser = $allUsers[$counter];\n \t\t \n \t\t\tif($currentUser == $email . \".json\"){\n\n \t\t\t\t//check Password\n\t \t\t \t$userString = file_get_contents(\"db/users/\". $currentUser); \n\t \t\t\t$userObject = json_decode($userString);\n\t \t\t\t\n\t \t\t\t\n\t \t\t\treturn $userObject;\n \t\t\t\t\n\t\t\t} \t\t\t\n \t\t\t\n \t\t} \t\t\t\n \t}", "public function retrieve($email){\n $conn_manager = new ConnectionManager();\n $pdo = $conn_manager->getConnection();\n \n $sql = \"select * from user where email=:email\";\n $stmt = $pdo->prepare($sql);\n // $stmt->bindParam(\":name\",$name,PDO::PARAM_STR);\n $stmt->bindParam(\":email\",$email,PDO::PARAM_STR);\n $stmt->execute();\n \n $user = null;\n $stmt->setFetchMode(PDO::FETCH_ASSOC);\n if($row = $stmt->fetch()){\n $user = new User($row[\"email\"],$row['first_name'],$row['last_name'],$row[\"hashed_password\"]);\n }\n \n $stmt = null;\n $pdo = null;\n return $user;\n }" ]
[ "0.83973944", "0.8173564", "0.8135668", "0.76943725", "0.75954133", "0.7583059", "0.75733256", "0.75127935", "0.75108767", "0.7443272", "0.74401045", "0.7436396", "0.7411334", "0.73964334", "0.7384469", "0.737062", "0.7345715", "0.7338967", "0.7335936", "0.7322129", "0.73194855", "0.72910744", "0.728689", "0.726397", "0.7262359", "0.7260359", "0.723723", "0.72321784", "0.7220572", "0.72102594", "0.7209794", "0.7207934", "0.72038394", "0.71881074", "0.7185777", "0.71820223", "0.7178275", "0.7173675", "0.7170478", "0.7157338", "0.7157338", "0.7157338", "0.7141772", "0.7123914", "0.7123603", "0.71132123", "0.7112322", "0.70999146", "0.7088208", "0.70708174", "0.7069803", "0.70596397", "0.70585257", "0.705207", "0.704496", "0.70417935", "0.70348394", "0.7019892", "0.70167184", "0.7012517", "0.70033896", "0.7001578", "0.7000087", "0.6986204", "0.6984076", "0.6982347", "0.6981464", "0.69680536", "0.6967448", "0.6960102", "0.6959275", "0.6952412", "0.69380885", "0.69340444", "0.6931557", "0.69248706", "0.69241023", "0.69173515", "0.69093347", "0.6908687", "0.6897479", "0.6894345", "0.68910027", "0.6883888", "0.6877184", "0.68736345", "0.6872389", "0.6869333", "0.68672174", "0.68672174", "0.68672174", "0.68672174", "0.68672174", "0.68672174", "0.68672174", "0.68672174", "0.68672174", "0.68672174", "0.68672174", "0.68512434", "0.6848146" ]
0.0
-1
Dynamically call the default driver instance.
public function __call($method, $parameters) { return $this->manager->$method(...$parameters); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function getDefaultDriver();", "public static function getDefaultDriver()\n {\n }", "abstract protected function getDriver();", "protected function getDriver() {}", "public function getDefaultDriver()\n {\n \treturn 'default';\n }", "public function getDefaultDriver()\n {\n return 'default';\n }", "public function driver($name = null);", "public function getDefaultDriver()\n {\n return null;\n }", "public function driver($driver = null);", "public function driver($driver = null);", "public function driver($driver = null);", "public function driver($driver = null)\n {\n return parent::driver($this->getDefaultDriver());\n }", "public function makeDriver() : AbstractDriver;", "public function driver();", "public static function setDefaultDriver($name)\n {\n }", "public function getDefaultDriver()\n {\n return static::$oDefaultDriver;\n }", "function getDriver($name = null);", "public static function driver($name = null)\n {\n }", "public function getDefaultDriver()\n {\n return $this->app['config']['instruments.driver'];\n }", "public function driver()\n {\n return $this->makeDriversFactory($this->makeConfig())->make();\n }", "public static function instance($driver = null)\n\t{\n\t\tempty($driver) and $driver = static::$configuration['default'];\n\n\t\tif(($driver = \\strtolower($driver)) and !isset(static::$drivers[$driver]))\n\t\t{\n\t\t\tstatic::$drivers[$driver] = static::driver($driver);\n\t\t}\n\n\t\treturn static::$drivers[$driver];\n\t}", "function autoDriver() {\n\n $driver = \"files\";\n\n if(extension_loaded('apc') && ini_get('apc.enabled') && strpos(PHP_SAPI,\"CGI\") === false)\n {\n $driver = \"apc\";\n }elseif(extension_loaded('pdo_sqlite') && is_writeable($this->getPath())) {\n $driver = \"sqlite\";\n }elseif(is_writeable($this->getPath())) {\n $driver = \"files\";\n }else if(class_exists(\"memcached\")) {\n $driver = \"memcached\";\n }elseif(extension_loaded('wincache') && function_exists(\"wincache_ucache_set\")) {\n $driver = \"wincache\";\n }elseif(extension_loaded('xcache') && function_exists(\"xcache_get\")) {\n $driver = \"xcache\";\n }else if(function_exists(\"memcache_connect\")) {\n $driver = \"memcache\";\n }else {\n $path = dirname(__FILE__).DIRECTORY_SEPARATOR.\"drivers\";\n $dir = opendir($path);\n while($file = readdir($dir)) {\n if($file!=\".\" && $file!=\"..\" && strpos($file,\".php\") !== false) {\n $namex = str_replace(\".php\",\"\",$file);\n $class = \"phpfastcache_\".$namex;\n $option = $this->option;\n $option['skipError'] = true;\n $driver = new $class($option);\n $driver->option = $option;\n if($driver->checkdriver()) {\n $driver = $namex;\n }\n }\n }\n }\n\n return $driver;\n }", "public function getDefaultDriver()\n {\n $driver = $this->config[self::$packageName.'::driver'];\n return $driver;\n }", "Public Function getDriver() { Return $this->driver; }", "public function getDefaultDriver()\n {\n throw new InvalidArgumentException('No Ads driver was specified.');\n }", "public function getDefaultDriver()\n {\n return $this->app['config']['option.default'];\n }", "public function driver($provider = null);", "public function getDefaultDriver()\n {\n throw new InvalidArgumentException('No wechatpay driver was specified.');\n }", "protected function getSelectedDbalDriver() {}", "public function getDefaultDriver()\n {\n throw new InvalidArgumentException('No Socialite driver was specified.');\n }", "protected function _initDrivers()\n {\n if (empty($this->_backends)) {\n if (isset($this->_params['backends'])) {\n $this->_backends = $this->_params['backends'];\n } else {\n if (Horde_Pgp_Backend_Openpgp::supported()) {\n $this->_backends[] = new Horde_Pgp_Backend_Openpgp();\n }\n }\n }\n }", "public function registerBuiltinDrivers(): self\n {\n return $this->registerDriversInDirectory(__DIR__ . '/Driver', 'CIInfo\\\\Driver');\n }", "public function driver($driver = null)\n\t{\n\t\treturn $this->store($driver);\n\t}", "public function getDriver(array $params = null)\n {\n return $this->driver;\n }", "public static function connection($driver = null)\n {\n }", "public function getDefaultDriver()\n {\n return $this->app['config']['staff_session.driver'];\n }", "public function getDriver(?string $name = null): DriverInterface;", "public function setDefaultDriver($name)\n {\n $this->app['config']->set(self::$packageName.'::driver', $name);\n }", "public function getDefaultDriver(): string\n {\n return $this->app['config'][$this->driverKey()];\n }", "public function get_driver()\n\t{\n\t\treturn $this->driver;\n\t}", "function setup_odbcdriver($driver){\n\n switch ($driver) {\n case 'MySQL':\n // yum -y mysql-connector-odbc mysql mysql-server mysql-devel\n exec(\"python /var/lib/asterisk/bin/rpclient.py SETUP MySQL\");\n return True; \n \n case 'MSSQL':\n exec(\"python /var/lib/asterisk/bin/rpclient.py SETUP MSSQL\");\n return True;\n\n case 'PostgreSQL':\n // yum -y install postgresql postgresql-server postgresql-odbc\n exec(\"python /var/lib/asterisk/bin/rpclient.py SETUP PostgreSQL\");\n return True; \n }\n}", "protected function getBestDriver()\n\t{\n\t\treturn $this->getChild('LazyDataMapper\\Tests\\Driver', 5);\n\t}", "public function setDefaultDriver(string $driver = '', array $config = []): void\n {\n $this->default = compact('driver', 'config');\n }", "public function setDefaultDriver($name)\n {\n $this->configurations['driver'] = $name;\n }", "public function driver($name = null)\n {\n $name = $name ?: $this->getDefaultDriver();\n\n return $this->drivers[$name] = $this->get($name);\n }", "public function setDefaultDriver($name)\n {\n $this->app['config']['staff_session.driver'] = $name;\n }", "public function getdriver()\n {\n return $this->driver;\n }", "public function driver($driver = null)\n {\n return $this->store($driver);\n }", "public function setDefaultDriver($name)\n {\n $this->app['config']['option.default'] = $name;\n }", "public function driver()\n {\n return $this->driver;\n }", "public function driver(?string $name = null)\n {\n $name = $name ?: $this->getDefaultDriver();\n\n return $this->drivers[$name] = $this->get($name);\n }", "public function getDriver()\n {\n return $this->driver;\n }", "protected function getDefaultDriver()\r\n\t{\r\n\t\treturn $this->royalcms['config']['filesystems.default'];\r\n\t}", "public function getDefaultDriver()\n {\n throw new InvalidArgumentException('No payment provider was specified.');\n }", "public function getDriver()\n {\n return $this->_driver;\n }", "public function getDriver()\n {\n return $this->_driver;\n }", "public function getDriver()\n\t{\n\t\treturn $this->driver;\n\t}", "public function getDriver() {\n return $this->_driver;\n }", "public function getDriver() {\n return $this->_driver;\n }", "public static function getDefaultConnection()\n {\n }", "public function setDefaultDriver(string $name): void\n {\n $this->app['config'][$this->driverKey()] = $name;\n }", "function get_driver_class_name()\n {\n return get_called_class();\n }", "public function driver($driver = null)\n {\n $driver = $driver ?: $this->getDefaultDriver();\n\n if (is_null($driver)) {\n throw new InvalidArgumentException(sprintf(\n 'Unable to resolve NULL driver for [%s].', static::class\n ));\n }\n\n // If the given driver has not been created before, we will create the instances\n // here and cache it so we can return it next time very quickly. If there is\n // already a driver created by this name, we'll just return that instance.\n if (! isset($this->drivers[$driver])) {\n $this->drivers[$driver] = $this->createDriver($driver);\n }\n\n return $this->drivers[$driver];\n }", "public function getDefaultDriver()\n\t{\n\t\treturn $this->royalcms['config']['cache.default'];\n\t}", "protected function getDefaultDriver()\n {\n return config('filesystems.default');\n }", "public static function driver($driver = null) {\n\t\tif (is_null($driver)) $driver = Config::get('auth.driver');\n\n\t\tif ( ! isset(static::$drivers[$driver])) {\n\t\t\tstatic::$drivers[$driver] = static::factory($driver);\n\t\t}\n\n\t\treturn static::$drivers[$driver];\n\t}", "private static function driver($driver)\n\t{\n\t\tswitch($driver)\n\t\t{\n\t\t\tcase 'apc':\n\t\t\t\treturn new Driver\\APC(static::$configuration['key']);\n\t\t\tcase 'file':\n\t\t\t\treturn new Driver\\File(static::$configuration['key'], static::$configuration['path']);\n\t\t\tcase 'memcache':\n\t\t\t\treturn new Driver\\Memcache(static::$configuration['key'], Memcache::instance());\n\t\t\tcase 'memcached':\n\t\t\t\treturn new Driver\\Memcached(static::$configuration['key'], Memcached::instance());\n\t\t\tdefault:\n\t\t\t\tthrow new \\InvalidArgumentException('Cachew driver ['.$driver.'] is not currently supported');\n\t\t\tbreak;\n\t\t}\n\t}", "function createDriver($driver, array $conf = null);", "public function getDefaultDriver()\n {\n return Arr::get($this->container['config']['cache'], 'default');\n }", "public function getDefaultDriver()\n\t{\n\t\treturn $this->royalcms['config']['filesystems.default'];\n\t}", "public function useDefaultPdo()\n {\n $this->usePdo($this->defaultPdoName);\n }", "public function setDefaultDriver($name)\n {\n $this->app['config']->cache['default'] = $name;\n }", "public function driver($driver = null)\n {\n return $this;\n }", "function setDriver($name) {\n\t\t$driver = $this->driversPath.$name.\".php\";\n\t\ttry {\n\t\t\tif( ! file_exists($driver) ) throw new Exception(\"Selected file is not a driver!\");\n\t\t\tinclude($driver);\n\t\t\t$drv = new $name();\n\t\t\tif( ! is_a($drv, 'Driver') ) throw new InvalidArgumentException(\"Drivers should extend Driver class\");\n\t\t} catch (Exception $e) {\n\t\t\t$this->toast = $e->getMessage();\n\t\t\treturn false;\n\t\t}\n $this->driver = $drv;\n\t\t$this->driver->cr = $this;\n\t\treturn true;\n\t}", "final public static function getInstance()\n {\n if (!static::$instance instanceof self) {\n static::$instance = new static();\n }\n\n return static::$instance->driver;\n }", "public static function driver($name = 'default', $driverName = null)\n {\n if ($name !== null && $driverName === null) {\n $databaseConfig = self::getConnectionConfiguration($name);\n $driverName = $databaseConfig['driver'];\n }\n\n // Make the driver if we don't have it already this run.\n if (! isset(self::$drivers[$driverName])) {\n // We will make the driver class first, prepare the full class name.\n $driverClass = new \\ReflectionClass(\"\\\\Arvici\\\\Heart\\\\Database\\\\Driver\\\\$driverName\\\\Driver\");\n\n self::$drivers[$driverName] = $driverClass->newInstance();\n }\n\n return self::$drivers[$driverName];\n }", "public static function getDefaultDriver(){\n return \\Illuminate\\Auth\\AuthManager::getDefaultDriver();\n }", "public function getDefaultDriver()\n {\n return 'mysql';\n }", "public function defaultValue(Driver $driver);", "public function getDefaultDriver()\n {\n return $this->configurations['driver'] ?? 'gd';\n }", "public function getDefaultDriver()\n {\n return Config::get('currency::default_provider');\n }", "public function getDefaultDriver()\n {\n return $this->app['config']['custom-queue.default'];\n }", "final public function getDriver() {\n return $this->driver;\n }", "public static function availableDrivers()\n {\n }", "private function setDriver($params)\n {\n if (isset($params['driver'])) {\n return Cache::driver($params['driver']);\n } \n return Cache::driver();\n }", "public function get_driver($driver_name) {\n\n\n\n\t\tif (isset($this->drivers[$driver_name])) {\n\n\t\t\t// var_dump($this->drivers[$driver_name]['path'], file_exists($this->drivers[$driver_name]['path']));\n\t\t\t// die();\n\n\t\t\trequire_once $this->drivers[$driver_name]['path'];\n\n\n\n\t\t\t$driver = new $this->drivers[$driver_name]['class'];\n\t\t\t$driver->name = $driver_name;\n\n\t\t\treturn $driver;\n\n\t\t}\n\n\t}", "protected function create() {\n return call_user_func_array(parent::$drivers[$this->options['driver']], array($this));\n }", "public function getDefaultDriver()\n {\n $driver = $this->app['config']['localize-middleware']['driver'];\n\n return is_array($driver) ? 'stack' : $driver;\n }", "public function DBDriver()\n\t{\n\t\t$_SESSION['queries'] = 0; // for DEBUG ONLY and to be removed or handled more priopriate way!\n\t\t$this->loadDBProperties();\n\t\t$this->connect();\n\t}", "public function driver($driver = null)\n {\n if ( ! isset($this->drivers[$driver])) {\n $this->loadPluginFile($driver);\n }\n\n return parent::driver($driver);\n }", "public function set_driver($driver)\n {\n $this->_driver = $driver;\n }", "public static function ini()\n {\n switch (Config::get('database.driver')) {\n case 'mysql':\n self::$driver = new Schema\\MysqlSchema();\n break;\n }\n }", "public static function supportedDrivers()\n {\n }", "public function getDriver()\r\n\t{\r\n\t\treturn $this->dbDriver;\r\n\t}", "public function getDefaultDriver(): ?string\n {\n return $this->config['default'];\n }", "public function getDefaultDriver()\n {\n return config('filesystems.default');\n }", "public static function getDriverName()\n {\n }", "public function setDrivers()\n {\n foreach ($this->getDriverList() as $driverName) {\n $this->setDriver($driverName);\n }\n }", "public function getDriver($name = '')\n {\n return $this->getWordpress()->getDriver($name);\n }", "public function load_driver($child)\n {\n $child_path = sprintf('%s/drivers/%s_%s.php', __DIR__, __CLASS__, $child);\n if (file_exists($child_path)) {\n require_once $child_path;\n }\n $obj = parent::load_driver($child);\n $obj->prepare($this->getLogName());\n $this->adapter = $child;\n\n return $obj;\n }", "private function getNewDriver()\n {\n return 'file';\n }" ]
[ "0.83606505", "0.7717996", "0.74386233", "0.73421013", "0.7325159", "0.7140512", "0.7060018", "0.70520353", "0.70209527", "0.70209527", "0.70209527", "0.6973281", "0.67342716", "0.6721562", "0.66846865", "0.66843116", "0.66638494", "0.6567712", "0.65222967", "0.6508803", "0.64768356", "0.64472324", "0.64149654", "0.641387", "0.633599", "0.6329773", "0.63021356", "0.6296784", "0.6250992", "0.6248742", "0.62201303", "0.6144625", "0.6135836", "0.6135004", "0.61272293", "0.60913396", "0.6087304", "0.60844487", "0.60791034", "0.60784376", "0.6068747", "0.6054464", "0.60532004", "0.60220367", "0.6015682", "0.59981674", "0.59795904", "0.59759194", "0.59684056", "0.59651303", "0.5964527", "0.5958763", "0.59452575", "0.59285593", "0.5915022", "0.5915022", "0.5914588", "0.5912362", "0.5912362", "0.5905175", "0.5890324", "0.5881788", "0.58550155", "0.58508885", "0.58413184", "0.58254117", "0.5817447", "0.5816122", "0.5809263", "0.58065116", "0.58059037", "0.580282", "0.57940173", "0.578611", "0.5783548", "0.5772401", "0.5763443", "0.5760491", "0.5752125", "0.5748787", "0.57469004", "0.57452303", "0.57412285", "0.5734395", "0.5729365", "0.5727561", "0.57138836", "0.5707325", "0.5696", "0.5691913", "0.5690589", "0.5690529", "0.5687824", "0.5679659", "0.5678974", "0.56769025", "0.56690377", "0.5663142", "0.5652182", "0.562757", "0.5623302" ]
0.0
-1
This is the default 'index' action that is invoked
public function actionIndex($id = null) { $status = array(); if (isset($_GET['status']) && $_GET['status'] == 'deleted') { $status = array( 'code' => 'success', 'message' => 'Certificate deleted Successfully!' ); } if ($id) { $model = Certificates::model()->findByPk($id); $status = array( 'code' => 'warning', 'message' => 'Edit certificate and change the template file!' ); } else $model = new Certificates; if (isset($_POST['Certificates'])) { $model->attributes = $_POST['Certificates']; $model->template_file = $file = CUploadedFile::getInstance($model, 'template_file'); if ($model->validate()) { $path = Yii::app()->basePath . '/../images/certificates'; if (!is_dir($path)) { mkdir($path); } $ext = $file->getExtensionName(); $template_file = uniqid(); $model->template_file = $template_file; if ($model->save(false)) { $file->saveAs($path . '/' . $template_file . '.' . $ext); $image = new Imagick($path . '/' . $template_file . '.' . $ext); $image->setImageFormat("png"); file_put_contents($path . '/' . $template_file . ".png", $image); if ($id) { $status = array( 'code' => 'success', 'message' => 'Certificate updated Successfully!' ); } else { $status = array( 'code' => 'success', 'message' => 'Certificate created Successfully!' ); } } else { $status = array( 'code' => 'danger', 'message' => 'Certificate not updated!' ); } } } $condition = 'deleted_at is NULL'; $filters = array( 'id' => '', 'name' => '', 'description' => '' ); if (isset($_POST['filters'])) { $criteria = new CDbCriteria; $filters = $_POST['filters']; if ($filters['id']) { $condition .= ' and id = ' . $filters['id']; } if ($filters['name']) { $condition .= " and name LIKE '%" . $filters['name'] . "%'"; } if ($filters['description']) { $condition .= " and description LIKE '%" . $filters['description'] . "%'"; } $status = array( 'code' => 'info', 'message' => 'Records for search data!' ); } $certificates = Certificates::model()->findAll($condition); $this->render('index', array( 'model' => $model, 'certificates' => $certificates, 'status' => $status, 'filters' => $filters )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionIndex() {}", "public function actionIndex() {}", "public function actionIndex()\n {\n $this->render('index');\n }", "public function actionIndex(){\r\r\n\t\t$this->render('index', array());\r\r\n\t}", "protected function indexAction() {}", "public function indexAction(){}", "public function actionIndex()\n\t{\n\t\t\n\t\t$this->render('index');\n\t}", "public function actionIndex()\n {}", "public function actionIndex()\n\t{\n\t\t$this->render('index');\n\t}", "public function actionIndex()\n\t{\n\t\t$this->render('index');\n\t}", "public function actionIndex()\n\t{\n\t\t$this->render('index');\n\t}", "public function actionIndex()\n\t{\n\t\t$this->render('index');\n\t}", "public function actionIndex()\n {\n $this->view->render('index');\n }", "public function actionIndex()\r\n {\r\n \treturn $this->render('index');\r\n }", "public function actionIndex()\r\n {\r\n\t\treturn $this->render('index');\r\n }", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function indexAction() {}", "public function actionIndex()\n\t{\n\n\t\treturn $this->render(\"index\");\n\n\n\t}", "protected function indexAction()\n {\n }", "public function indexAction()\n {\n return $this->doIndex();\n }", "public function indexAction()\n {\n return $this->doIndex();\n }", "public function indexAction()\n {\n return $this->doIndex();\n }", "public function indexAction()\n {\n return $this->doIndex();\n }", "public function indexAction() {\n $this->_forward('list');\n }", "abstract public function actionIndex();", "public function actionIndex() {\n\t\treturn $this->render('index');\n\t}", "public function actionIndex()\n {\n\t return $this->render('index');\n }", "public function indexAction() {\n\t\t// TODO Auto-generated AdminController::indexAction() default action\n\t}", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex() {\n $this->assignLangue();\n $this->render('index');\n }", "public function indexAction() {\n \n }", "public function indexAction() {\r\n }", "public function indexAction() {\n\t}", "public function indexAction() {\n\t}", "public function actionIndex()\n {\n return $this->render('/index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->render('index');\n }", "public function indexAction() \n {\n \t\n }", "public function indexAction() {\n\n\t}", "public function actionIndex()\n {\n\n return $this->render('index');\n }", "public function actionIndex()\n {\n\n return $this->render('index');\n }", "public function actionIndex()\n {\n return $this->renderIndex();\n }", "public function indexAction()\n {\n // disable rendering\n $this->_helper->viewRenderer->setNoRender();\n }", "public function indexAction()\n {\n $this->render('/views/index.html');\n }", "public function indexAction(){\t\t\n\t}", "public function indexAction() {\n }", "public function indexAction() {\n }", "public function indexAction() \n\t{\n\t\t$this->_forward('view');\n\t}", "public function indexAction()\n\t{\n\t\t$this->_forward('view');\n\t}", "public function indexAction()\n {}", "public function indexAction(){\r\n\t\t\t\r\n\t\t}", "public function singleIndexAction() {}", "public function IndexAction() {\r\n $this->ExecuteView();\r\n }", "public function index() {\n\t\t$this->display('index');\n\t}", "public function actionIndex()\n {\n return $this->render('index.twig');\n }", "public function indexAction()\n {\n return array(\n );\n }", "public function indexAction() {\n\t\t$this->_notImplemented();\n\t}", "public function actionIndex()\n {\n\n }", "public function actionIndex()\n {\n\t\techo \"=== Action index ===\";\n \n }", "public function indexAction()\n {\n $this->_forward('view');\n }", "public function actionIndex() {\n\n return $this->render('index', [\n ]);\n }", "public function indexAction ()\r\n {\r\n\r\n }", "public function indexAction() {\r\n \r\n }", "function index() {\n $this->renderView(\"index\");\n }", "public function action_index()\n\t{\n\t}", "public function indexAction()\n {\n $this->addAction();\n }", "public function indexAction()\n {\n\n return parent::indexAction();\n\n\n }" ]
[ "0.8918154", "0.8918154", "0.8807795", "0.8799434", "0.8776453", "0.8773893", "0.87724197", "0.87592155", "0.87495244", "0.87495244", "0.87495244", "0.87495244", "0.8728183", "0.8723083", "0.8698629", "0.8691714", "0.8690949", "0.86904883", "0.86904883", "0.86904883", "0.86904883", "0.86904883", "0.86904883", "0.86904883", "0.86904883", "0.86904883", "0.8665913", "0.8653433", "0.8626824", "0.8626824", "0.8626824", "0.8626824", "0.86132103", "0.8611616", "0.8600209", "0.8598254", "0.8597732", "0.85910416", "0.8586734", "0.8575512", "0.85357666", "0.8535729", "0.8535729", "0.8513596", "0.8487149", "0.8487149", "0.8487149", "0.8487149", "0.8487149", "0.8487149", "0.8487149", "0.8487149", "0.8487149", "0.8487149", "0.8487149", "0.8487149", "0.8487149", "0.8487149", "0.8487149", "0.8487149", "0.8487149", "0.8487149", "0.8487149", "0.8487149", "0.8487149", "0.8487149", "0.8487149", "0.8487149", "0.8487149", "0.8487149", "0.8487149", "0.8485952", "0.8468185", "0.8453689", "0.8453689", "0.8451139", "0.84489346", "0.84296036", "0.84260976", "0.8411004", "0.8411004", "0.84008783", "0.8397659", "0.8396157", "0.8385567", "0.83823454", "0.83823436", "0.8381227", "0.8379389", "0.8361644", "0.8355223", "0.8355172", "0.83529234", "0.8350136", "0.8333698", "0.83215153", "0.8309044", "0.8308624", "0.8305816", "0.83005804", "0.8293336" ]
0.0
-1
This is the action to handle external exceptions.
public function actionError() { if ($error = Yii::app()->errorHandler->error) { if (Yii::app()->request->isAjaxRequest) echo $error['message']; else $this->render('error', $error); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function executeActionWithErrorHandling() {\n \n }", "function exception_handler($ex) {\n // now let the plugin send the exception to client\n $this->send_error($ex);\n // not much else we can do now, add some logging later\n exit(1);\n }", "protected function errorAction() {}", "abstract protected function handleError(\\Exception $e);", "function act() {\n throw $this->exception;\n }", "function as_exception_handler($e){\n\t\t$msg = 'Error('.$e->getCode().') '. $e->getMessage().' in '. $e->getFile().':'. $e->getLine();\n\t\t$this->catch_error($msg, 'clickgs plugin crashed');\n\t}", "public function handle() {\n throw new Exception(\"This is a test exception.\");\n }", "protected function throwRedirectException() {}", "public function error()\n {\n throw new Exception('Something went wrong!');\n }", "public function actionError() {\n \n }", "public function testOnExecuteActionException()\n {\n // Start of user code RouterSpecialEventsControllerTest.testonExecuteActionException\n $controller = new RouterSpecialEventsController();\n $httpResponse = $controller->onExecuteActionException(\n AssociativeArray::createFromNativeArray(\n 'string',\n array(\n 'type' => 'SomeException',\n 'code' => 0,\n 'message' => 'Message of a simulated exception',\n 'file' => '/var/some-folder/some-file.som',\n 'controller' => 'SomeController',\n 'action' => 'someAction'\n )\n ));\n $this->assertEquals(500, $httpResponse->getStatusCode());\n $this->assertEquals(\n \"<html><h1>Error 500 : An exception has been thrown</h1><p>While executing SomeController::someAction</p><p>SomeException : Message of a simulated exception</p><p>TiBeN Framework</p></html>\", \n $httpResponse->getMessage()\n );\n // End of user code\n }", "public function getException();", "function api_error_setup() {\n\tset_exception_handler(function(Throwable $e) {\n\t\ttry {\n\t\t\techo APIException::make_json_string(APIException::map_to_code($e), $e);\n\t\t\tls_log($e->__toString(), LOGERR);\n\t\t} catch (Exception $e) {\n\t\t\t/*\n\t\t\t* Exceptions thrown in the exception handler\n\t\t\t* cause hard to debug fatal errors. Handle them.\n\t\t\t*/\n\t\t\techo '{\"error\":'.API_E_INTERNAL.', \"e_msg\":\"'.$e->getMessage().\n\t\t\t\t' (in exception handler, '.$e->getFile().' '.$e->getLine().')\"}';\n\t\t}\n\t\texit(1);\n\t});\n}", "private function throwException()\n {\n throw new CacheException(\\odbc_errormsg(), (int) \\odbc_error());\n }", "public function actionException()\n {\n $this->render('exception');\n }", "public function handle(\\Exception $error);", "public function throwErrorAction() {\n $message = $this->getRequestParam(\"message\", null);\n if (($error_code = $this->getRequestParam(\"error_code\")) && !empty($error_code)) {\n if (!empty($message))\n $this->respondWithValidationError($error_code, $message);\n else\n $this->respondWithError($error_code);\n }\n\n return;\n }", "public function actionError() {\n if ($error = Yii::app()->errorHandler->error) {\n\t\t\t$this->sendRestResponse(500,array(\n\t\t\t\t'status' => false,\n\t\t\t\t'message' => $error['message'],\n\t\t\t\t'data' => $error,\n\t\t\t));\t\t\t\n }\n\t}", "function handler($ex) {\n echo \"In exception handler\\n\";\n}", "public function makeErrorAction()\n {\n // test this\n\n $this->app->abort(404, 'I am a code generated 404 error message');\n\n }", "protected static function exception()\n {\n foreach (self::fetch('exceptions') as $file) {\n Bus::need($file);\n }\n }", "protected function initializeErrorHandling() {}", "abstract public function handleFatalError($e);", "public function handle_error() {\n $last_operation = $this->add_last_operation;\n $data = array(\n 'function_name' => is_array($last_operation[0]) ? $last_operation[0][1] : $last_operation[0],\n 'function_name_complete' => is_array($last_operation[0]) ? (is_string($last_operation[0][0]) ? $last_operation[0][0].':' : get_class($last_operation[0][0]).'->').$last_operation[0][1] : $last_operation[0],\n 'args' => $last_operation[1]\n );\n\n switch (strtolower($data['function_name'])) {\n case 'autoexecute':\n $data['table'] = $data['args'][0];\n $data['fields'] = $data['args'][1];\n $data['operation'] = $data['args'][2];\n break;\n }\n\n $data['debug'] = $last_operation;\n if (class_exists('e_database'))\n throw new e_database($this->adodb->ErrorMsg(),$data,$this->adodb->ErrorNo());\n else\n throw new Exception($this->adodb->ErrorMsg(),$this->adodb->ErrorNo());\n }", "public function apply(Exception $ex);", "function errorHandler($errno,$errstr){\n\t global $errors;\n\n\t raiseError(\"We are working to solve an internal issue in our service. Please, try later.\", Constants::HTTP_INTERNAL_SERVER_ERROR);\n\t}", "public function handleException($exception);", "function uncaught_exception($o){\n $o['message'] = Trace::exceptionToText($o['exception']);\n $o['trace'] = Trace::exFullTrace($o['exception']);\n unexpected_failure($o);\n }", "function handleException(Exception $ex)\n{\n\techo \"There was an error: {$ex}\";\n}", "public function onException(Exception $err): Effect|Response;", "public function errorAction()\n\t{\n\t}", "function raise(\\Exception $ex);", "function exception_error_handler($errno, $errstr, $errfile, $errline ) {\n throw new \\ErrorException($errstr, 0, $errno, $errfile, $errline);\n}", "public static function reportOtherExceptionAndExit($e){\nself::encodeAndOutputMessage(self::translate('System error.'));\n$msg=date(\"Y-m-d H:i:s T\");\n$msg.=':'.(string)$e.\"\\n\"; //Let the exception describe itself\nforeach(self::$details as $k=>$v)$msg.=\"$k=$v\\n\";\nLogger::log(self::$systemErrorLog,$msg);\nexit;\n}", "public function errorOccured();", "public function actionError()\n {\n if (($exception = Yii::$app->getErrorHandler()->exception) === null) {\n // action has been invoked not from error handler, but by direct route, so we display '404 Not Found'\n $exception = new HttpException(404, Yii::t('yii', 'Page not found.'));\n }\n\n if ($exception instanceof HttpException) {\n $code = $exception->statusCode;\n } else {\n $code = $exception->getCode();\n }\n if ($exception instanceof Exception) {\n $name = $exception->getName();\n } else {\n $name = Yii::t('yii', 'Error');\n }\n if ($code) {\n $name .= \" (#$code)\";\n }\n\n if ($exception instanceof UserException) {\n $message = $exception->getMessage();\n } else {\n $message = Yii::t('yii', 'An internal server error occurred.');\n }\n $statusCode = $exception->statusCode ? $exception->statusCode : 500;\n if (Yii::$app->getRequest()->getIsAjax()) {\n return \"$name: $message\";\n } else {\n return $this->render('error', [\n 'code' => $statusCode,\n 'name' => $name,\n 'message' => $message\n ]);\n }\n }", "public function throwExceptions($state)\r\n {\r\n $this->_frontController->throwExceptions($state);\r\n }", "function default_exception_handler($ex) {\n $backtrace = $ex->getTrace();\n $place = array('file'=>$ex->getFile(), 'line'=>$ex->getLine(), 'exception'=>get_class($ex));\n array_unshift($backtrace, $place);\n\n if ($ex instanceof moodle_exception) {\n _print_normal_error($ex->errorcode, $ex->module, $ex->a, $ex->link, $backtrace, $ex->debuginfo);\n } else {\n _print_normal_error('generalexceptionmessage', 'error', $ex->getMessage(), '', $backtrace);\n }\n}", "function exception_error_handler( $errno, $errstr, $errfile, $errline ) {\n throw new ErrorException( $errstr, $errno, 0, $errfile, $errline );\n}", "public function errorAction() {\n\t\tZend_Layout::getMvcInstance ()->setLayout ( \"light\" );\n\t\t$errors = $this->_getParam ( 'error_handler' );\n\t\tif ($errors->exception->getCode () == 404 || in_array ( $errors->type, array (\n\t\t\t\tZend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ROUTE,\n\t\t\t\tZend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER,\n\t\t\t\tZend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION \n\t\t) )) {\n\t\t\t$this->getResponse ()->setHttpResponseCode ( 404 );\n\t\t\t$this->_helper->viewRenderer ( '404' );\n\t\t}\n\t\t\n\t\t\n\t\t$this->view->content = $errors->exception->getMessage ();\n\t}", "function globalExceptionHandler ($ex) {\n try {\n ob_end_clean();\n $msg = '<b>' . get_class($ex) . ' (' . $ex->getCode() . ')</b> thrown in <b>' . $ex->getFile() . '</b> on line <b>'\n . $ex->getLine() . '</b><br>' . $ex->getMessage()\n . str_replace('#', '<br>#', $ex->getTraceAsString()) . '<br>';\n\n //don't log errors caused by routing to a non-existant page (since bots do that constantly)\n if($ex->getCode() != 404 && $ex->getCode() != 403 && $ex->getMessage() != \"Call to a member function getRewriteRoute() on null\") {\n $ds = DataService::getInstance();\n $ds->logException($msg);\n }\n\n if (DEBUG) {\n echo $msg;\n } else {\n if(Session::getUser() != null)\n header(\"Location: /error\");\n else\n header(\"Location: /login/error\");\n }\n }\n catch (Exception $e) {\n if(Session::getUser() != null)\n header(\"Location: /error\");\n else\n header(\"Location: /login/error\");\n }\n}", "protected abstract function send_error($ex=null) ;", "public static function handleException($e)\n {\n self::setHeader($e);\n //TODO quitar el extract, que el view pida los que necesite\n extract(Router::get(), EXTR_OVERWRITE);\n // Registra la autocarga de helpers\n spl_autoload_register('kumbia_autoload_helper', true, true);\n\n $Controller = Util::camelcase($controller);\n ob_start();\n if (PRODUCTION) { //TODO: añadir error 500.phtml\n include APP_PATH . 'views/_shared/errors/404.phtml';\n return;\n }\n if ($e instanceof KumbiaException) {\n $view = $e->view;\n $tpl = $e->template;\n } else {\n $view = 'exception';\n $tpl = 'views/templates/exception.phtml';\n }\n //Fix problem with action name in REST\n $action = $e->getMessage() ? $e->getMessage() : $action;\n\n include CORE_PATH . \"views/errors/{$view}.phtml\";\n \n $content = ob_get_clean();\n\n // termina los buffers abiertos\n while (ob_get_level ()) {\n ob_end_clean();\n }\n include CORE_PATH . $tpl;\n }", "function exceptionHandler($e) {\n $msg = array(\"status\" => \"500\", \"message\" => $e->getMessage(), \"file\" => $e->getFile(), \"line\" => $e->getLine());\n $usr_msg = array(\"status\" => \"500\", \"message\" => \"Sorry! Internal server error!\");\n header(\"Access-Control-Allow-Origin: *\"); \n header(\"Content-Type: application/json; charset=UTF-8\"); \n header(\"Access-Control-Allow-Methods: GET, POST\");\n echo json_encode($usr_msg);\n logError($msg);\n\n }", "public function testException()\n {\n throw new ThumbNotFoundException;\n }", "public function handleException(Exception $e)\n {\n watchdog('Award Force API', $e->getMessage(), array(), WATCHDOG_ERROR);\n\n exit(t('An error has occurred. Please try again, and if the problem persists, contact the system administrator.'));\n }", "function OnAfterError(){\n }", "function exception_error_handler($errno, $errstr, $errfile, $errline ) {\n throw new ErrorException($errstr, 0, $errno, $errfile, $errline);\n}", "public function onKernelException()\n {\n echo '<br> something wrong happened ! exeption event listener successfuly fired :D ';\n }", "function __elgg_php_exception_handler($exception) {\n\terror_log(\"*** FATAL EXCEPTION *** : \" . $exception);\n\n\tob_end_clean(); // Wipe any existing output buffer\n\n\t// make sure the error isn't cached\n\theader(\"Cache-Control: no-cache, must-revalidate\", true);\n\theader('Expires: Fri, 05 Feb 1982 00:00:00 -0500', true);\n\t//header(\"Internal Server Error\", true, 500);\n\n\t$body = elgg_view(\"messages/exceptions/exception\",array('object' => $exception));\n\tpage_draw(ballom_echo('exception:title'), $body);\n}", "public function caught( $ex ) {\n//\t\tob_end_clean();\n\n\t\t$class = get_class($ex);\n\t\tswitch ( $class ) {\n\t\t\tcase 'row\\database\\ModelException':\n\t\t\tcase 'row\\database\\NotEnoughFoundException':\n\t\t\tcase 'row\\database\\TooManyFoundException':\n\t\t\t\texit('[Database Model error] '.$ex->getMessage().'');\n\t\t\tcase 'row\\http\\NotFoundException':\n\t\t\tcase 'row\\OutputException':\n\t\t\tcase 'row\\core\\VendorException':\n//\t\t\t\tob_end_clean();\n//\t\t\t\treturn $this->_internal('errors/notfound', array('exception' => $ex));\n\t\t\t\texit('[404] ['.$class.'] Not Found: '.$ex->getMessage());\n\t\t\tcase 'row\\core\\MethodException':\n\t\t\tcase 'ErrorException':\n\t\t\t\texit('Parse/runtime error: '.$ex->getMessage().'');\n\t\t\tcase 'row\\database\\DatabaseException':\n\t\t\t\texit('[Database/Query error] '.$ex->getMessage().'');\n\t\t}\n\n\t\texit('Unknown ['.get_class($ex).'] encountered: '.$ex->getMessage().'');\n\t}", "protected function exceptions($exception){\n\t\tthrow $exception;\n\t}", "public function errorAction()\r\n {\r\n $errors = $this->_getParam('error_handler');\r\n $messages = array();\r\n\r\n switch ((string)$errors->type) {\r\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:\r\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:\r\n // 404 error -- controller or action not found\r\n $this->getResponse()->setRawHeader('HTTP/1.1 404 Not Found');\r\n\r\n $messages[] = Zoo::_(\"The page you requested was not found.\");\r\n if (ZfApplication::getEnvironment() == \"development\" || ZfApplication::getEnvironment() == \"staging\") {\r\n $messages[] = $errors->exception->getMessage();\r\n }\r\n break;\r\n\r\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_OTHER:\r\n case 0:\r\n // application error\r\n //$messages[] = Zoo::_(\"An unexpected error occurred with your request. Please try again later.\");\r\n $messages[] = $errors->exception->getMessage();\r\n if (ZfApplication::getEnvironment() == \"development\" || ZfApplication::getEnvironment() == \"staging\") {\r\n $trace = $errors->exception->getTrace();\r\n foreach (array_keys($trace) as $i) {\r\n if ($trace[$i]['args']) {\r\n foreach ($trace[$i]['args'] as $index => $arg) {\r\n if (is_object($arg)) {\r\n $trace[$i]['args'][$index] = get_class($arg);\r\n }\r\n elseif (is_array($arg)) {\r\n $trace[$i]['args'][$index] = \"array\";\r\n }\r\n }\r\n }\r\n $trace[$i]['file_short'] = \"..\".substr($trace[$i]['file'], strrpos(str_replace(\"\\\\\", DIRECTORY_SEPARATOR, $trace[$i]['file']), DIRECTORY_SEPARATOR));\r\n }\r\n $this->view->assign('trace', $trace);\r\n }\r\n break;\r\n\r\n default:\r\n // application error\r\n $this->getResponse()->setRawHeader('HTTP/1.1 '.$errors->type);\r\n $messages[] = $errors->exception->getMessage();\r\n break;\r\n }\r\n\r\n // Clear previous content\r\n $this->getResponse()->clearBody();\r\n\r\n $this->view->assign('errormessages', $messages);\r\n }", "function error_handler($errno, $string, $file, $line, $context) {\n throw new Trails_Exception(500, $string);\n }", "public function UnhandeldException(){\n\t\t$this -> message = \"An unhandeld exception was thrown. Please infrom...\";\n\t}", "public function testTask1Exception(){\n\n }", "private function handleException($e)\n {\n // TODO: test coverage\n if ($e instanceof ClientException) {\n // will catch all 4xx errors\n if ($e->getResponse()->getStatusCode() == 403) {\n throw new AuthenticationException(\n $this->apiKey,\n $this->apiSecret,\n null,\n $e\n );\n } else {\n throw new DomainException(\n 'The OpenTok API request failed: ' . json_decode($e->getResponse()->getBody(true))->message,\n null,\n $e\n );\n }\n } else if ($e instanceof ServerException) {\n // will catch all 5xx errors\n throw new UnexpectedValueException(\n 'The OpenTok API server responded with an error: ' . json_decode($e->getResponse()->getBody(true))->message,\n null,\n $e\n );\n } else {\n // TODO: check if this works because Exception is an interface not a class\n throw new Exception('An unexpected error occurred');\n }\n }", "protected function errorAction()\n\t{\n\t\t$this->handleTargetNotFoundError();\n\n\t\treturn $this->getFlattenedValidationErrorMessage();\n\t}", "public function support(\\Exception $exception);", "public function handleErrorRelateArticle()\n { \n $this->getResponse()->setStatusCode(500);\n $this->forward('articles', 'articleRelations');\n }", "function as_error_handler($errno, $errstr, $errfile, $errline){\n\t\t$msg = 'Error('.$errno.') '.$errstr.' in '. $errfile.':'. $errline;\n\t\t$this->catch_error( $msg, 'clickgs plugin crashed');\n\t}", "function rescue($exception) {\n return $this->dispatcher->trails_error($exception);\n }", "public abstract function onFail();", "public function throwError();", "function internalError() {\n\t\t$this->status = $this->STATUS_INTERNAL_ERROR;\n\t\t$this->noCache();\n\t}", "public function actionError()\n {\n if($error=Yii::app()->errorHandler->error)\n {\n if($error['code'] != 404 || !isset($aErrorMsg[$error['errorCode']])){\n Yii::log(' error : ' . $error['file'] .\":\". $error['line'] .\":\". $error['message'], 'error', 'system');\n }\n $ret = new ReturnInfo(FAIL_RET, Yii::t('exceptions', $error['message']), intval($error['errorCode']));\n if(Yii::app()->request->getIsAjaxRequest()){\n echo json_encode($ret);\n \n }else{\n if( empty($error['errorCode']) ){\n if(isset($this->aErrorMsg[$error['code']])){\n if(empty($this->aErrorMsg[$error['code']]['message'])) {\n $this->aErrorMsg[$error['code']]['message'] = $error['message'];\n }\n $this->render('error', $this->aErrorMsg[$error['code']]);\n }else{\n $this->render('error', $this->aErrorMsg['1000']);\n }\n }else{\n $this->render('error', $this->aErrorMsg[ $error['errorCode'] ]);\n \n }\n }\n \n } \n }", "function handle_error($exception) {\n try {\n print $this->encode(array(\n 'error' => $exception->getMessage(),\n 'message' => $exception->getMessage(), // Should be a i18n end user message\n 'data' => @$exception->data,\n 'status' => @$exception->status\n ));\n } catch(Exception $e) {\n echo 'Error: '.$e->getmessage();\n }\n }", "public function getExceptions();", "public static function error()\n {\n if ($error = static::$errorHandler) {\n admin_exit($error());\n }\n\n if (Helper::isAjaxRequest()) {\n abort(403, trans('admin.deny'));\n }\n\n admin_exit(\n Content::make()->withError(trans('admin.deny'))\n );\n }", "protected function throwErrorWhileSavingResponseException()\n {\n throw new InvalidScreenForNewSessionException('An error occured while saving data.');\n }", "protected function error($msg) {\n \t parent::error($msg); //log in error msg\n throw new Exception ($msg); // <-- TESTS php4\n }", "public function handleException(\\Exception $exception): void;", "public function errorAction()\n {\n $errors = $this->_getParam('error_handler');\n\n switch ($errors->type) {\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:\n\n // 404 error -- controller or action not found\n $this->getResponse()->setHttpResponseCode(404);\n $this->view->message = 'Page not found';\n break;\n default:\n // Generic application error\n $this->getResponse()->setHttpResponseCode(500);\n $this->view->message = 'Application error';\n break;\n }\n\n $this->view->exception = $errors->exception;\n $this->view->request = $errors->request;\n $this->_response->clearBody();\n }", "public function loginCheckAction()\n {\n\n\n throw new \\Exception('This should never be reached!');\n }", "public function errorAction() {\n\t\t\n\t\t$errors = $this->_getParam('error_handler');\n\t\t\n\t\tswitch ($errors->type) {\n\t\t\t \n\t\t\tcase Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:\n\t\t\tcase Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:\n\t\t\t\t\n\t\t\t\t// stranka nebyla nalezena - HTTP chybova hlaska 404\n\t\t\t\t$this->getResponse()->setHttpResponseCode(404);\n\t\t\t\t$this->view->message = 'Stránka nenalezena';\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault:\n\t\t\t\t\n\t\t\t\t// chyba v aplikaci - HTTP chybova hlaska 500\n\t\t\t\t$this->getResponse()->setHttpResponseCode(500);\n\t\t\t\t$this->view->message = 'Chyba v aplikaci';\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t}\n\t\t\n $this->view->env = APPLICATION_ENV;\n\t\t$this->view->exception = $errors->exception;\n\t\t$this->view->request = $errors->request;\n\t\t$this->view->title = 'Objevila se chyba';\r\n\t\t$this->view->showDetails = ini_get('display_errors');\r\n\t\t\n\t\t$this->_helper->layout->setLayout('error');\n\t\t\n\t}", "protected function error()\n {\n $this->response = $this->response->withStatus(500);\n $this->jsonBody([\n 'input' => $this->payload->getInput(),\n 'error' => $this->payload->getOutput(),\n ]);\n }", "function fatalErrorHandler() {\n global $cfg;\n $error = error_get_last();\n if(($error['type'] === E_ERROR) || ($error['type'] === E_USER_ERROR)){\n header(\"HTTP/1.1 500 Server Error\");\n readfile($cfg['source_root'] . \"/500.html\");\n //error_log(print_r($error, true));\n //error_log(print_r(debug_backtrace(), true));\n exit();\n }\n/*\n if(($error['type'] === E_ERROR) || ($error['type'] === E_USER_ERROR)){\n $_SESSION['error'] = $error;\n header(\"Location:\".$cfg['root'].\"exception/\");\n exit;\n }\n*/\n}", "function error(){}", "public static function handleException(Throwable $exc) {\n\n\t\t\t# Load template\n\n\t\t\t$file_name = (DIR_TEMPLATES . 'Exception.ctp');\n\n\t\t\tif (false === ($contents = @file_get_contents($file_name))) $output = nl2br($exc);\n\n\t\t\telse $output = self::parseContents($contents, $exc);\n\n\t\t\t# Set headers\n\n\t\t\theader('Expires: Mon, 26 Jul 1997 05:00:00 GMT');\n\n\t\t\theader('Cache-Control: no-store, no-cache, must-revalidate');\n\n\t\t\theader('Cache-Control: post-check=0, pre-check=0', false);\n\n\t\t\theader('Pragma: no-cache');\n\n\t\t\theader($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error', true, 500);\n\n\t\t\theader('Content-type: text/html; charset=UTF-8');\n\n\t\t\t# ------------------------\n\n\t\t\texit ($output);\n\t\t}", "abstract protected function echoExceptionWeb($exception);", "function error_handler($exception) {\n\tglobal $config;\n\theader('HTTP/1.0 404 Not Found');\n\textract(array('error'=>$exception->getMessage()));\n\trequire($config['VIEW_PATH'].'404.php');\n\tdie();\n}", "function handleException($e) {\r\n\ttry {\r\n\t\tif (!($e instanceof \\Exception)) throw $e;\r\n\t\t\r\n\t\tif ($e instanceof IPrintableException || $e instanceof \\wcf\\system\\exception\\IPrintableException) {\r\n\t\t\t$e->show();\r\n\t\t\texit;\r\n\t\t}\r\n\t\t\r\n\t\t// repacking\r\n\t\t(new SystemException($e->getMessage(), $e->getCode(), '', $e))->show();\r\n\t\texit;\r\n\t}\r\n\tcatch (\\Throwable $exception) {\r\n\t\tdie(\"<pre>WCF::handleException() Unhandled exception: \".$exception->getMessage().\"\\n\\n\".$exception->getTraceAsString());\r\n\t}\r\n\tcatch (\\Exception $exception) {\r\n\t\tdie(\"<pre>WCF::handleException() Unhandled exception: \".$exception->getMessage().\"\\n\\n\".$exception->getTraceAsString());\r\n\t}\r\n}", "public function fatal_handler()\n {\n $error = error_get_last();\n\n if ($error !== null && is_array($error) && $error['type'] == E_ERROR)\n {\n $settings = require CODE_ROOT . '/src/settings.php';\n $app = new \\Slim\\App($settings);\n\n require CODE_ROOT . '/src/dependencies.php';\n\n $view = $app->getContainer()->get('view');\n\n $logger = $app->getContainer()->get('logger');\n $logger->emergency('An unrecoverable error has ocurred!', $error);\n\n echo $view->fetch('error.twig');\n }\n\n exit;\n }", "function exception_error_handler() {\n header('HTTP/1.1 500 Internal Server Error');\n if(is_file(__DIR__.'/../html/500.html'))\n {\n require(__DIR__.'/../html/404.html');\n } else {\n ?>\n <h1>Something goofed really hard</h1>\n <p>We're working on it, sit tight</p>\n <?php\n }\n // I'll just leave this here for debug purposes.\n //throw new ErrorException($errstr, $errno, 0, $errfile, $errline);\n}", "public function handleException(Exception $ex) {\r\n $extra = array('message' => $ex->getMessage());\r\n if ($ex instanceof NotFoundException) {\r\n header('HTTP/1.0 404 Not Found');\r\n $this->runErrorPage('404', $extra);\r\n } else {\r\n header('HTTP/1.1 500 Internal Sever Error');\r\n $this->runErrorPage('404', $extra);\r\n }\r\n }", "public function indexAction() {\n\t\ttry{\n\t\t\t\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 cannotPerformReferencingErrorAction()\n {\n $this->renderTwigView('/iris-referencing/cannot-perform-referencing-error.html.twig');\n }", "public function raise() {\n throw $this;\n }", "function exception_error_handler($errno, $errstr, $errfile, $errline ) {\n // Don't catch suppressed errors with '@' sign\n // @link http://stackoverflow.com/questions/7380782/error-supression-operator-and-set-error-handler\n $error_reporting = ini_get('error_reporting');\n if (!($error_reporting & $errno)) {\n return;\n }\n throw new ErrorException($errstr, $errno, 0, $errfile, $errline);\n}", "private function _error() {\n\t\trequire $this->_controllerPath . $this->_errorFile;\n\t\t$this->_controller = new Error();\n\t\t$this->_controller->index('Esta página no existe');\n\t\texit;\n\t}", "public function actionError()\n {\n if(Core::getLoggedDeliveryBoyID() > 0)\n {\n\t \t $exception = Yii::$app->errorHandler->exception;\n\t \t $error = array('statusCode' => $exception->statusCode, 'message' => $exception->getMessage(), 'name' => $exception->getName());\n \t\t return $this->render('/error', ['error' => $error]);\n }\n else\n {\n\t \t\treturn Yii::$app->getResponse()->redirect(Yii::$app->getHomeUrl().'delivery')->send();\n }\n }", "private function handleDefaultException($e)\n\t{\n\t\tLog::out(get_class($e) . ', ' . $e->getMessage(), Log::LEVEL_CRIT);\n\t\t\n\t\tif(php_sapi_name() == 'cli') {\n\t\t\tprint \"\\n\" . get_class($e) . \" occured\\n\" .\n\t\t\t\t'Message: ' . $e->getMessage() . \"\\n\" .\n\t\t\t\t'Code: ' . $e->getCode() . \"\\n\" .\n\t\t\t\t$e->getTraceAsString() . \"\\n\";\n\t\t\t\t\n\t\t}\n\t\telse {\n\t\t\tif($e instanceOf BakedCarrotNotFoundException) {\n\t\t\t\tif(!headers_sent()) {\n\t\t\t\t\theader('HTTP/1.0 404 Not Found');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(Request::isAjax() || Request::isFlash()) {\n\t\t\t\t\tprint $e->getMessage();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tprint '<html><head></head><body style=\"font: 10pt arial; margin: 40px;\">' .\n\t\t\t\t\t\t'<h1 style=\"font-weight: normal; font-size: 30px;\">404 Page Not Found</h1>' . \n\t\t\t\t\t\t($e->getMessage() ? '<h3 style=\"margin: 0; font-weight: normal;\">Message: ' . $e->getMessage() . '</h3>' : '') .\n\t\t\t\t\t\t(self::isDevMode() ? '<p>' . nl2br($e->getTraceAsString()) . '</p>' : '') .\n\t\t\t\t\t\t'</body>';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif(!headers_sent()) {\n\t\t\t\t\theader('HTTP/1.1 500 Internal Server Error');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(Request::isAjax() || Request::isFlash()) {\n\t\t\t\t\tprint 'EXCEPTION (' . get_class($e) . '): ' . $e->getMessage() . \"\\n\";\n\t\t\t\t\t\n\t\t\t\t\tif(self::isDevMode() && get_class($e) == 'PDOException') {\n\t\t\t\t\t\tprint 'SQL: ' . Db::lastSql();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tprint '<html><head></head><body style=\"font: 10pt arial; margin: 40px;\">' .\n\t\t\t\t\t\t'<h1 style=\"font-weight: normal; font-size: 30px;\">' . get_class($e) . ' occured</h1>' . \n\t\t\t\t\t\t'<h3 style=\"margin: 0; font-weight: normal;\">Message: ' . $e->getMessage() . '</h3>' .\n\t\t\t\t\t\t'<h3 style=\"margin: 0; font-weight: normal;\">Code: ' . $e->getCode() . '</h3>' .\n\t\t\t\t\t\t(self::isDevMode() && get_class($e) == 'PDOException' ? '<h3 style=\"margin: 0;\">SQL: ' . Db::lastSql() . '</h3>' : '') .\n\t\t\t\t\t\t(self::isDevMode() ? '<p>' . nl2br($e->getTraceAsString()) . '</p>' : '') .\n\t\t\t\t\t\t'<h4 style=\"font-weight: normal;\"><em>Baked Carrot ver ' . BAKEDCARROT_VERSION . '</em></h4>' .\n\t\t\t\t\t\t'</body>';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\texit(-1);\n\t}", "abstract function bootErrorAction(array $errors = null);", "public function errorAction()\n {\n $code = $this->_request->getParam('errorCode');\n $this->view->errorCode = $code;\n $this->getResponse()->setRawHeader('HTTP/1.1 500 Internal Server Error');\n }", "public function http(HttpResponseException $ex);", "public static function exception_handler($exception) { \n ResponseFactory::send($exception->getMessage()); //Send exception message as response.\n }", "abstract protected function logException(\\Exception $ex);", "function handleError()\n{\n\tglobal $g_error_msg, $g_debug_msg;\n\tinclude_once(atkconfig('atkroot'). 'atk/errors/class.atkerrorhandlerbase.inc');\n\t$errorHandlers = atkconfig('error_handlers', array('mail'=>array('mailto' => atkconfig('mailreport'))));\n\tforeach ($errorHandlers as $key => $value)\n\t{\n\t\tif (is_numeric($key))\n\t\t$key = $value;\n\t\t$errorHandlerObject = atkErrorHandlerBase::get($key, $value);\n\t\t$errorHandlerObject->handle($g_error_msg, $g_debug_msg);\n\t}\n}", "private function guardAgainstExternalErrors($response)\n {\n if ($response->getStatusCode() == 503) {\n throw new \\Exception('Could not connect to googleapis.com/maps/api. STATUSCODE = '.$response->getStatusCode());\n }\n }", "protected function throwInaccessibleException() {}", "function atkExceptionHandler(Exception $exception)\n{\n\tatkdebug($exception->getMessage(), DEBUG_ERROR);\n\tatkdebug(\"Trace:<br/>\".nl2br($exception->getTraceAsString()), DEBUG_ERROR);\n\tatkhalt(\"Uncaught exception: \" . $exception->getMessage(), 'critical');\n}" ]
[ "0.7286617", "0.69130844", "0.6828128", "0.6765496", "0.6732437", "0.65824705", "0.6526459", "0.6403522", "0.63426304", "0.6252801", "0.62523055", "0.62226164", "0.6202877", "0.62017435", "0.6192582", "0.6192206", "0.6192138", "0.6180666", "0.6158045", "0.6144492", "0.61243945", "0.6120704", "0.61085916", "0.61011416", "0.6099163", "0.6087311", "0.6079664", "0.60724705", "0.6013558", "0.6007311", "0.6001169", "0.59934944", "0.59829676", "0.59777635", "0.5970751", "0.5939189", "0.59287447", "0.59135324", "0.5898062", "0.5894148", "0.5872689", "0.58712375", "0.5865918", "0.58595616", "0.585065", "0.58321196", "0.58266103", "0.5812529", "0.5809798", "0.58090645", "0.5808955", "0.5794003", "0.5784579", "0.57811165", "0.5768039", "0.5763769", "0.5743497", "0.57429767", "0.57412535", "0.5724928", "0.5720385", "0.5714774", "0.57118297", "0.57112575", "0.57077426", "0.57065135", "0.5693618", "0.5691591", "0.5689155", "0.56881016", "0.5680423", "0.56755835", "0.5674053", "0.5673854", "0.5670088", "0.56661123", "0.5662728", "0.5662047", "0.5653406", "0.5646786", "0.5645647", "0.5645298", "0.56420285", "0.5640387", "0.5629531", "0.5624753", "0.5622773", "0.56136525", "0.5606601", "0.56055593", "0.5604701", "0.5595728", "0.5589691", "0.55845803", "0.55769897", "0.557128", "0.5570177", "0.55685765", "0.55644137", "0.55631214", "0.55554193" ]
0.0
-1
Logs out the current user and redirect to homepage.
public function actionLogout() { Yii::app()->user->logout(); $this->redirect(Yii::app()->homeUrl); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function logUserOut()\n\t{\n\t\t# destroy the session\n\t\tSession::flush();\n\n\t\t# generate a new session ID\n\t\tSession::regenerate();\n\n\t\t# ... and show the homepage\n\t\treturn Redirect::home();\n\t}", "public function logOutUser() {\r\n\t\tif (isset($_SESSION)) {\r\n\t\t\tunset($_SESSION);\r\n\t\t\tsession_unset();\r\n\t\t\tsession_destroy();\r\n\t\t}\r\n\t\theader('Location: /');\r\n\t}", "public function logout() {\n\t\tAuth::clear('userLogin');\n\t\t$this->redirect(array('action'=>'login'));\n\t}", "public function userLogout() {\n session_destroy();\n header('Location: index.php');\n }", "public function redirectUnauthenticatedUser(){\n if(!$this->isAuthenticated() )\n $this->logout();\n }", "public function logged_out_redirect(){\n\n\t\t\n\t\tif (!isset($_SESSION['user_id'])) {\n\t\t\t# code...\n\t\t\theader('Location: login.php');\n\t\t}\n\n\n\t}", "public function logOut(){\r\n\t\t// Starting sessions\r\n\t\tsession_start();\r\n\t\t\r\n\t\t// Emptying sessions\r\n\t\t$_SESSION['userID'] = '';\r\n\t\t$_SESSION['logged_in'] = false;\r\n\t\t\r\n\t\t// Destroying sessions\r\n\t\tsession_destroy();\r\n\t\theader(\"Location: ?controller=home\");\r\n\t\texit();\r\n\t}", "public function action_logout(){\n\t\tAuth::instance()->logout();\n \n\t\t#redirect to the user account and then the signin page if logout worked as expected\n\t\tHTTP::redirect('/');\t\n\n\t}", "public function Logout()\n\t{\n\t\t$this->user->Logout();\n\t\t$this->RedirectToController();\n\t}", "public function logout() {\n\t\tSentry::logout();\n\t\tredirect(website_url('auth'));\n\t}", "public function logout() {\n header(\"Location: /index.php/Logout\");\n }", "public function index(): void\n {\n if (IsAuthenticatedMiddleware::handle()) {\n $this->storage->removeUserById($this->cookie->get('user_id'));\n $this->cookie->remove('user_id');\n }\n\n $this->redirect->to('/login');\n }", "public function logout()\r\n {\r\n unset($_SESSION['logged_user']);\r\n session_destroy();\r\n directTo(transRootConfig('app_config', 'app_login_index'));\r\n }", "public function logout()\n {\n if (isset($_SESSION['user_id']))\n {\n unset($_SESSION['user_id']);\n }\n redirect('', 'location');\n }", "public function userLogout() {\n // Starting a session to unset and destroy it\n session_start();\n session_unset();\n session_destroy();\n\n // Sending the user back to the login page\n header(\"Location: login\");\n }", "public function logout() \n {\n UserModel::logout();\n\n // redirect the user back home\n Redirect::to('home');\n }", "public function logout ()\n {\n User::logout(\"home\");\n }", "function logout()\n\t\t{\n\t\t\t$logout = $this->ion_auth->logout();\n\t\n\t\t\t//redirect them back to the page they came from\n\t\t\tredirect('main', 'refresh');\n\t\t}", "public function logout() {\n session_destroy();\n $this->redirect('/');\n }", "public function logout() {\n LoginModel::logout();\n Redirect::home();\n }", "private function _logout(){\n\t\tredirect('/', 'refresh');\n\t\treturn;\n\t}", "public function action_logout()\r\n\t{\r\n\t\tAuth::instance()->logout();\r\n\t\tRequest::instance()->redirect('/');\r\n\t}", "function logout()\n\t{\n\n\t\t// log the user out\n\t\t$this->session->sess_destroy();\n\n\t\t// redirect them to the login page\n\t\tredirect('auth', 'refresh');\n\t}", "public function logout() {\n if ($this->User->checkIfClientIsLoggedIn($_SESSION)) {\n $this->User->logoutClient($_SESSION);\n }\n else {\n redirect();\n }\n }", "public function logout() {\n if(isset($_SESSION['user']))\n unset($_SESSION['user']);\n\n $page = 'home';\n require('./View/default.php');\n }", "public static function actionLogout() {\n unset($_SESSION['user']);\n header(\"Location: /\");\n }", "public function logoff(){\n\t\tsession_destroy();\n\t\theader('location: ../view/login.php');\n\t\texit;\n\t}", "function logout()\n\t\t{\n\t\t\t// log the user out\n\t\t\t$logout = $this->ion_auth->logout();\n\t\t\tredirect('login');\n\t\t}", "public function logout()\n {\n session_destroy();\n $this->redirect(BASE_URL . 'index.php?page=home');\n }", "public function executeLogout() {\n $this->logMessage(\"Logout\", 'debug');\n $this->getUser()->clearCredentials();\n $this->getUser()->setAuthenticated(false);\n $this->redirect('default/index');\n }", "function __redirectLoggedInUser()\n{\n global $action;\n \n if ($action == 'logout' || ! is_user_logged_in()) {\n return;\n }\n \n wp_redirect(current_user_can('read') ? admin_url() : home_url(), 302);\n\t\n\tdie();\n}", "public function logoutAction()\n\t{\n\t\tZend_Auth::getInstance()->clearIdentity();\n\t\t$this->_redirect('https://strobe.uwaterloo.ca/cpadev/kiwi/user/out?__kiwi_referer__='\n\t\t\t\t\t\t\t\t. $_SERVER[\"HTTP_REFERER\"]);\n\t}", "public function logout() {\n\t\t$this->session->unset_userdata('uid');\n\t\tredirect('/', 'refresh');\n\t}", "public function logout()\n {\n \\Auth::logout();\n \\Session::flush();\n $this->resetUser( 'Goodbye!' );\n \n return redirect('home');\n }", "public function logOut() {\r\n //Logs when a user exit\r\n $ctrLog = new ControllerLog();\r\n $ctrLog->logOff();\r\n\r\n header('location:../index');\r\n session_destroy();\r\n }", "public function logoff()\n\t{\n\t\t$this->session->sess_destroy();\n\t\tredirect(base_url());\n\t}", "public function logout() {\n $this->_disconnect_user();\n redirect(base_admin_url('identification'), 'refresh');\n }", "public static function logout() {\n\t\tif (self::logged_in()) {\n\t\t\tSession::delete('user');\n\t\t\tsetcookie(\"remember\", null, -1);\n\t\t\tSession::setFlash(\"alert-success\", \"Logged out successfully.\");\n\t\t\theader(\"Location: index.php\");\n\t\t} else {\n\t\t\tSession::setFlash(\"alert-danger\", \"Already logged out.\");\n\t\t\theader(\"Location: index.php\");\n\t\t}\n\t}", "public function logout()\n\t{\n\t\t$this->session->unset_userdata('logged_in');\n\t\theader(\"location:\". site_url('?status=loggedout'));\n\t}", "public function logout(){\r\n // $UsersModel ->logout();\r\n session('user_id', null);\r\n // session('user_auth_sign', null);\r\n // cookie('user_auth', null);\r\n // cookie('user_auth_sign', null);\r\n\r\n $this->redirect('index/index');\r\n }", "public static function logout() {\n session_unset();\n setcookie(\"rememberMe\", \"\", time() - 100);\n header(\"Location: index.php\");\n }", "function logout() {\n User::destroyLoginSession();\n header( \"Location: \" . APP_URL );\n}", "public function logout() {\n\t\t$this->Auth->logout();\n\t\t$this->redirect($this->referer($this->Auth->redirect(), true)); \n\t}", "public function logout()\n\t{\n\t\t$this->session->sess_destroy();\n\t\tredirect('main');\n\t}", "function logout() {\n $this -> session -> sess_destroy();\n redirect('home', 'location');\n }", "public function logout() {\n //Logout user\n Auth::logout();\n //Destroy session\n Session::flush();\n //Redirect to home\n return Redirect::to('/');\n }", "public function signout()\n {\n $this->session->sess_destroy();\n redirect('/');\n }", "public function logout(){\n\t\tunset($_SESSION['auth']);\n\t\theader('Location: index.php?p=users.login');\n\t}", "public function logoutAction()\n {\n $user_service = $this->getServiceLocator()->get('user');\n $user_service->getAuthService()->clearIdentity();\n\n return $this->redirect()->toRoute('home');\n }", "public function logout()\n {\n $this->Session->delete('User');\n\n $this->redirect($this->Auth->logout());\n }", "public function logout()\n {\n header('Location: '.$this->deauth_url);\n exit;\n }", "function logout()\n {\n session_destroy();\n redirect(url('user/index'));\n }", "public function actionLogout() {\n Yii::app()->user->logout(false);\n Yii::app()->user->setFlash('info', 'You are no longer logged in!');\n $this->redirect(Yii::app()->homeUrl);\n }", "public function logout(){\n\t\t$this->aauth->logout();\n\t\tredirect(BASEURL);\n\t}", "public function logout() {\n $logout = $this->ion_auth->logout();\n\n // redirect them back to the login page\n redirect('login');\n }", "public function actionLogout()\n {\n Yii::$app->user->logout();\n $this->goHome();\n }", "public function logout()\n \n {\n $this->ion_auth->logout();\n redirect('/');\n }", "public function LogOut() {\n\t\t$this->session->UnsetAuthenticatedUser();\n\t\t$this->session->AddMessage('success', \"You have been successfully logged out.\");\n\t}", "public function logoutAction()\n {\n $this->getSessionStorage()->forgetMe();\n $this->getAuthService()->clearIdentity();\n return $this->redirect()->toRoute('home');\n }", "function logout() {\n $logout_uri = '/Shibboleth.sso/Logout?target=' . home_url();\n\n wp_redirect($logout_uri);\n exit();\n }", "public function logout ()\n {\n\n session_destroy();\n header(\"Location:\" . SITE_URL. \"/index.php\");\n }", "public function logoutPage(): void\n {\n session_unset();\n header(\"Location: \" . $_SERVER[\"HTTP_REFERER\"]);\n }", "public function actionLogout() {\r\n\t\t$this->redirect(array('//user/auth/logout'));\r\n\t}", "public function action_logout()\n\t{\n\t\tCookie::delete('user');\n\t\t\t\n\t\t// Redirect to the login\n\t\t$this->request->redirect(Route::get('kohanut-login')->uri(array('action'=>'login')));\n\t}", "public function logoutAction()\n {\n $this->getAuthenService()->clearIdentity();\n return $this->redirect()->toRoute('home');\n }", "function do_logout()\n\t{\n\t\t//log the user out\n\t\t$logout = $this->ion_auth->logout();\n\n\t\tredirect('cms/login', 'refresh');\n\t}", "public function logout(){\n\t\t$this->session->sess_destroy();\n\t\tredirect('/');\n\t}", "public function actionLogout()\n\t{\n\t\tYii::app()->user->logout(true);\n\t\t$this->redirect(Yii::app()->params['baseUrl']);\n\t}", "public function logout(){\n \n Session::destroy(); /* Clear all sessions set for this project */\n Url::redirect(\"http://something.sellerstam.mebokund.com/\", true); /* Goes back to the home page */\n \n }", "public function actionLogout()\n {\n\tApp::user()->logout();\n\t$this->redirect(App::homeUrl());\n }", "public static function logout() {\n $_SESSION['user'] = null;\n Redirect::to('/login', array('message' => 'Olet kirjautunut ulos.'));\n }", "public function index() { \n # Clear session\n session_unset();\n session_destroy();\n session_write_close(); \n setcookie(session_name(), \"\", 0, \"/\");\n \n header(\"Location:/\". PATH .\"/login\");\n }", "public function logged_in_redirect(){\n\n\t\tif (isset($_SESSION['user_id'])) {\n\t\t \t# code...\n\t\t \theader('Location: index.php');\n\t\t } \n\t}", "public function logout()\n\t{\n\t\t// Logout user\n\t\tAuth::logout();\n\n\t\treturn Redirect::route('home');\n\t}", "public function logoutAction() {\n $auth = Zend_Auth::getInstance();\n $auth->clearIdentity();\n //redirect user\n $this->_helper->redirector->goToRouteAndExit(array(), 'admin-login');\n }", "public static function logout() {\n Session::forget('user');\n redirect('/login');\n }", "public function logout() {\n session_destroy();\n $this->redirect('?v=index&a=show');\n }", "public function logout()\n\t{\n\t\tglobal $config;\n\t\tif (isset($_SESSION['id']))\n\t\t{\n\t\t\tunset($_SESSION['id']);\n\t\t}\n\t\theader(\"Location: {$config['url']}\");\n\t}", "public function logout(){\n session_destroy();\n $arr = array(\n 'sessionID' => ''\n );\n dibi::query('UPDATE `user` SET ', $arr, \n 'WHERE `email`=%s', $email);\n parent::redirection(\"index.php\");\n }", "public function doLogout()\n {\n AuthSam::logout();\n Cache::flush();\n return redirect('/');\n \n }", "public function logout() {\n\t\tif($this->session->userdata(\"username\"))\n\t\t\t$this->session->unset_userdata('username');\n\t\tredirect('user/login', 'refresh');\n\t}", "public function actionLogout() {\n\t\tYii::app()->user->logout();\n\t\t$this->redirect(Yii::app()->homeUrl);\n\t}", "function logout()\n{\n\t$this->Session->delete('user');\n\t$this->redirect('/inhabitants/');\n}", "public function get_signout()\n\t{\n\t\tService\\Security::logout();\n\n\t\treturn Redirect::home();\n\t}", "public function action_logout()\n\t{\n\t\tAuth::instance()->logout(TRUE);\n\n\t\t// Redirect back to the login object\n\t\tRequest::current()->redirect(url::site('auth/login',Request::current()->protocol(),false));\n\n\t}", "public function logout(){\n session_destroy();\n header('Location: index.php');\n }", "private function exitLogin(){\n\t\tSeguridad::cerrarSesion();\n\t\theader('Location: index.php');\n\t}", "public function logout()\n {\n $_SESSION = array();\n session_destroy();\n\n header('Location: /home');\n exit();\n }", "function logout() {\n\t\t$this->redirect($this->Auth->logout());\n\n }", "public function actionLogout() {\n Yii::app()->user->logout();\n $this->redirect(Yii::app()->homeUrl);\n }", "public function actionLogout() {\n Yii::app()->user->logout();\n $this->redirect(Yii::app()->homeUrl);\n }", "public function actionLogout() {\n Yii::app()->user->logout();\n $this->redirect(Yii::app()->homeUrl);\n }", "public function actionLogout() {\n Yii::app()->user->logout();\n $this->redirect(Yii::app()->homeUrl);\n }", "public function actionLogout() {\n Yii::app()->user->logout();\n $this->redirect(Yii::app()->homeUrl);\n }", "public function actionLogout() {\n Yii::app()->user->logout();\n $this->redirect(Yii::app()->homeUrl);\n }", "public function actionLogout() {\n Yii::app()->user->logout();\n $this->redirect(Yii::app()->homeUrl);\n }", "function LogOut() {\n\t\tunset($user);\n\t\t$loggedIn=false;\n\t}", "public function actionLogout()\r\n\t{\r\n\t\tYii::app()->user->logout();\r\n\t\t$this->redirect(Yii::app()->homeUrl);\r\n\t}", "public function actionLogout()\r\n\t{\r\n\t\tYii::app()->user->logout();\r\n\t\t$this->redirect(Yii::app()->homeUrl);\r\n\t}", "public function actionLogout()\r\n\t{\r\n\t\tYii::app()->user->logout();\r\n\t\t$this->redirect(Yii::app()->homeUrl);\r\n\t}", "public static function logout()\n\t{\n\t\t//app应该为登录页面URL\n\t\theader('Location:'.self::$ssoURL.'?app='.sf\\encrypt_url(self::$clientHost).'&action=logout');\n\t\texit;\n\t}" ]
[ "0.80444497", "0.8028213", "0.7812711", "0.7794865", "0.7757136", "0.7740386", "0.7736372", "0.77337325", "0.77147937", "0.7698057", "0.76774144", "0.7659646", "0.76329297", "0.75914097", "0.75885266", "0.7586672", "0.7585362", "0.75682825", "0.7547765", "0.75433844", "0.75140274", "0.7509291", "0.7496819", "0.7493955", "0.7483988", "0.7480548", "0.74800307", "0.747324", "0.7468095", "0.74636316", "0.7451397", "0.74492896", "0.7447262", "0.7436521", "0.74302846", "0.7424861", "0.7421728", "0.7409428", "0.74042416", "0.7396738", "0.73857534", "0.73766303", "0.7373934", "0.7366683", "0.7356607", "0.7350133", "0.73482895", "0.73460054", "0.73442405", "0.7342875", "0.73293763", "0.73260283", "0.7324834", "0.7321202", "0.73110217", "0.73036355", "0.7298983", "0.72988075", "0.7298139", "0.72910136", "0.72863704", "0.7285155", "0.72812295", "0.72769743", "0.72752625", "0.72716105", "0.72713065", "0.72659945", "0.72658557", "0.72605354", "0.72582823", "0.7250101", "0.7248176", "0.72441745", "0.7241423", "0.7233556", "0.7229774", "0.72276187", "0.72275805", "0.7225176", "0.7218813", "0.72130066", "0.72117597", "0.7207768", "0.72067624", "0.72016466", "0.71894455", "0.7186995", "0.71869755", "0.7178662", "0.7178662", "0.7178662", "0.7178662", "0.7178662", "0.7178662", "0.7178662", "0.7172891", "0.71713173", "0.71713173", "0.71713173", "0.7167485" ]
0.0
-1
Display a listing of the resource.
public function index() { // }
{ "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() { $produtos = Produtos::all(); return view('estoque.create')->with('produtos', $produtos); }
{ "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) { Validator::make($request->all(), [ 'quantidade_estoque'=>'required|numeric' ])->validate(); $e = Estoque::where('produto_estoque_id', $request->produto_estoque_id)->first(); if(!$e){ $estoque = new Estoque; $estoque->quantidade_estoque = $request->quantidade_estoque; $estoque->produto_estoque_id = $request->produto_estoque_id; $estoque->save(); }else{ if($request->quantidade_estoque == 0){ $e->quantidade_estoque = $request->quantidade_estoque; } if($request->quantidade_estoque != 0){ $e->quantidade_estoque = $e->quantidade_estoque + $request->quantidade_estoque; } $e->save(); } return redirect('/produtos'); }
{ "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.72875285", "0.71454394", "0.71323526", "0.6639812", "0.6620611", "0.6568348", "0.6526527", "0.6509403", "0.64499927", "0.6375791", "0.63739914", "0.6365971", "0.6365971", "0.6365971", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667" ]
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) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { // }
{ "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) { // }
{ "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
module id used in JavaScript module initialization
function init($module, $params) { // getting module ID - automatically (from Joomla! database) or manually $this->module_id = ($params->get('automatic_module_id',0) == 1) ? 'nsp_'.$module->id : $params->get('module_unique_id',0); $this->config['module_id'] = $this->module_id; // module dimensions $this->config["module_width"] = $params->get("module_width", 100); $this->config["links_margin"] = $params->get("links_margin", "0"); $this->config["links_position"] = $params->get("links_position", "bottom"); $this->config["links_width"] = $params->get("links_width", 0); // source settings $this->config["data_source"] = $params->get("data_source", "com_categories"); $this->config["com_categories"] = $params->get("com_categories",''); $this->config["com_articles"] = $params->get("com_articles",''); $this->config["k2_categories"] = $params->get("k2_categories",''); $this->config["k2_tags"] = $params->get("k2_tags",''); $this->config["k2_articles"] = $params->get("k2_articles",''); $this->config['news_sort_value'] = $params->get('news_sort_value','created'); // Parameter for SQL Query - value of sort $this->config['news_sort_order'] = $params->get('news_sort_order','DESC'); // Parameter for SQL Query - sort direct $this->config['news_frontpage'] = $params->get('news_frontpage',1); $this->config['unauthorized'] = $params->get('unauthorized', 0); $this->config['only_frontpage'] = $params->get('only_frontpage', 0); $this->config['startposition'] = $params->get('startposition', 0); // Settings of source amount $this->config['news_full_pages'] = $params->get('news_full_pages', 3); // max. amount of full articles to load $this->config['news_short_pages'] = $params->get('news_short_pages', 3); // max. amount of links to articles to load $this->config['news_column'] = $params->get('news_column', 1); // amount of news columns $this->config['news_rows'] = $params->get('news_rows', 1); // amount of news rows $this->config['art_padding'] = $params->get('art_padding', '0 20px 20px 0'); // article block padding $this->config['links_amount'] = $params->get('links_amount', 3); // amount of links // Interface settings $this->config['top_interface_style'] = $params->get('top_interface_style','arrows'); $this->config['bottom_interface_style'] = $params->get('bottom_interface_style','arrows'); // Content settings $this->config['news_header_link'] = $params->get('news_header_link', 1); // add link to header ? (boolean) $this->config['news_image_link'] = $params->get('news_image_link', 1); // add link to image ? (boolean) $this->config['news_text_link'] = $params->get('news_text_link', 0); // add link to text ? (boolean) $this->config['info_format'] = $params->get('info_format', '%COMMENTS %DATE %HITS %CATEGORY %AUTHOR'); // date format $this->config['info2_format'] = $params->get('info2_format', ''); // date format $this->config['category_link'] = $params->get('category_link', 1); // showing category name $this->config['date_format'] = $params->get('date_format', '%d %b %Y'); // date format $this->config['date_publish'] = (bool) $params->get('date_publish', 0); // date publish or create ? $this->config['username'] = $params->get('username', 0); $this->config['user_avatar'] = $params->get('user_avatar', 1); $this->config['avatar_size'] = $params->get('avatar_size', 16); // Content positions $this->config['news_content_header_pos'] = $params->get('news_content_header_pos', 'left'); // text-align for news header $this->config['news_content_image_pos'] = $params->get('news_content_image_pos', 'left'); // text-align for news image $this->config['news_content_text_pos'] = $params->get('news_content_text_pos', 'left'); // text-align for news text $this->config['news_content_info_pos'] = $params->get('news_content_info_pos', 'left'); // text-align for news info $this->config['news_content_readmore_pos'] = $params->get('news_content_readmore_pos', 'right'); // text-align for news readmore button $this->config['news_content_info2_pos'] = $params->get('news_content_info2_pos', 'left'); // text-align for news info $this->config['news_content_header_float'] = $params->get('news_content_header_float', 'left'); // float for news header $this->config['news_content_image_float'] = $params->get('news_content_image_float', 'left'); // float for news image $this->config['news_content_text_float'] = $params->get('news_content_text_float', 'left'); // float for news text $this->config['news_content_info_float'] = $params->get('news_content_info_float', 'none'); // float for news info $this->config['news_content_info2_float'] = $params->get('news_content_info2_float', 'left'); // float for news info $this->config['news_header_order'] = $params->get('news_header_order', 1); // order of news header $this->config['news_image_order'] = $params->get('news_image_order', 3); // order of news image $this->config['news_text_order'] = $params->get('news_text_order', 4); // order of news text $this->config['news_info_order'] = $params->get('news_info_order', 2); $this->config['news_info2_order'] = $params->get('news_info2_order', 5); $this->config['news_header_enabled'] = $params->get('news_header_enabled', 1); $this->config['news_image_enabled'] = $params->get('news_image_enabled', 1); $this->config['news_text_enabled'] = $params->get('news_text_enabled', 1); $this->config['news_info_enabled'] = $params->get('news_info_enabled', 1); $this->config['news_info2_enabled'] = $params->get('news_info2_enabled', 1); $this->config['news_readmore_enabled'] = $params->get('news_readmore_enabled', 1); // Limits $this->config['news_limit_type'] = $params->get('news_limit_type', 'words'); // type of limit fo news text $this->config['news_limit'] = $params->get('news_limit', 30); // amount of limit "units" $this->config['title_limit_type'] = $params->get('title_limit_type', 'chars'); $this->config['title_limit'] = $params->get('title_limit', 40); // amount of limit "units" $this->config['list_title_limit_type'] = $params->get('list_title_limit_type', 'words'); $this->config['list_title_limit'] = $params->get('list_title_limit', 20); // amount of chars in list element title $this->config['list_text_limit_type'] = $params->get('list_text_limit_type', 'words'); $this->config['list_text_limit'] = $params->get('list_text_limit', 30); // amount of chars in list element text // Other content settings $this->config['clean_xhtml'] = $params->get('clean_xhtml', 1); // cleaning XHTML in news $this->config['more_text_value'] = $params->get('more_text_value','...'); // text overflow value $this->config['parse_plugins'] = (bool) $params->get('parse_plugins', 0); $this->config['clean_plugins'] = (bool) $params->get('clean_plugins', 0); $this->config['k2store_support'] = (bool) 0; // Thumbnails settings $this->config['create_thumbs'] = $params->get('create_thumbs', 0); // use generated thumbs $this->config['k2_thumbs'] = $params->get('k2_thumbs', 'first'); // use generated k2 thumbs $this->config['img_height'] = $params->get('img_height', 0); // image height $this->config['img_width'] = $params->get('img_width', 0); // image width $this->config['img_margin'] = $params->get('img_margin', '6px 14px 0 0'); // image margin $this->config['img_bg'] = $params->get('img_bg', '#000'); // image background $this->config['img_stretch'] = $params->get('img_stretch', 0); // image stretch $this->config['img_quality'] = $params->get('img_quality', 95); // image quality $this->config['cache_time'] = $params->get('cache_time', 30); // cache time // Animation settings $this->config['autoanim'] = (bool) $params->get('autoanim', 0); // autoanimation enabled ? $this->config['hover_anim'] = (bool) $params->get('hover_anim', 0); // hover animation enabled ? $this->config['animation_speed'] = $params->get('animation_speed', 400); $this->config['animation_interval'] = $params->get('animation_interval', 5000); $this->config['animation_function'] = $params->get('animation_function', 'Fx.Transitions.Expo.easeIn'); // external file settings $this->config['useCSS'] = $params->get('useCSS', 1); $this->config['useScript'] = $params->get('useScript', 2); // add script for this module to page $this->config['counter_text'] = '<strong>'.JText::_('MOD_NEWS_PRO_GK4_NSP_PAGE').'</strong>'; // new GK4 v.2.0 options $this->config['use_title_alias'] = $params->get('use_title_alias', 0); // use title alias as a title $this->config['show_list_description'] = $params->get('show_list_description', 1); // enable/disable list description $this->config['no_comments_text'] = $params->get('no_comments_text', 1); // showing of other text when article has no comments $this->config['module_font_size'] = $params->get('module_font_size', 100); // specify font-size inside the module $this->config['img_keep_aspect_ratio'] = $params->get('img_keep_aspect_ratio', 0); // keeping aspect ratio of images $this->config['news_since'] = $params->get('news_since', ''); // since date for source articles $this->config['time_offset'] = $params->get('time_offset', 0); // time offset for timezones problem $this->config['links_columns_amount'] = $params->get('links_columns_amount', 1); // amount of links columns $this->config['module_mode'] = $params->get('module_mode', 'normal'); // select mode of the module i.e. one of the portal modes $this->config['simple_crop_top'] = $params->get('simple_crop_top', 10); // top crop in % $this->config['simple_crop_bottom'] = $params->get('simple_crop_bottom', 10); // bottom crop in % $this->config['simple_crop_left'] = $params->get('simple_crop_left', 10); // left crop in % $this->config['simple_crop_right'] = $params->get('simple_crop_right', 10); // right crop in % $this->config['crop_rules'] = $params->get('crop_rules', ''); // crop rules in format: [NAME|width:height]=top:right:bottom:left; $this->config['news_portal_mode_1_amount'] = $params->get('news_portal_mode_1_amount', 10); // amount of news in Portal Mode 1 $this->config['portal_mode_1_module_height'] = $params->get('portal_mode_1_module_height', 320); // height of the module in Portal Mode 1 $this->config['news_portal_mode_2_amount'] = $params->get('news_portal_mode_2_amount', 10); // amount of news in Portal Mode 2 $this->config['news_portal_mode_3_amount'] = $params->get('news_portal_mode_3_amount', 10); // amount of news in Portal Mode 3 $this->config['news_portal_mode_4_amount'] = $params->get('news_portal_mode_4_amount', 10); // amount of news in Portal Mode 4 $this->config['news_portal_mode_3_open_first'] = $params->get('news_portal_mode_3_open_first', 1); // open first block automatically // new GK4 v.2.1 options $this->config['img_auto_scale'] = $params->get('img_auto_scale', 1); // image auto-scale // RedSHOP Component options (new GK4 v.2.4 options) $this->config['news_content_rs_pos'] = $params->get('news_content_rs_pos', 'left'); $this->config['news_content_rs_float'] = $params->get('news_content_rs_float', 'none'); $this->config['news_rs_store_order'] = $params->get('news_rs_store_order',6); $this->config['news_rs_store_enabled'] = $params->get('news_rs_store_enabled', 1); $this->config['redshop_categories'] = $params->get('redshop_categories', ''); $this->config['redshop_products'] = $params->get('redshop_products', ''); $this->config['all_redshop_products'] = $params->get('all_redshop_products', ''); $this->config['rs_out_of_stock'] = $params->get('rs_out_of_stock', ''); $this->config['rs_add_to_cart'] = $params->get('rs_add_to_cart', ''); $this->config['rs_price'] = $params->get('rs_price', ''); $this->config['rs_price_text'] = $params->get('rs_price_text', ''); $this->config['rs_currency_place'] = $params->get('rs_currency_place', ''); $this->config['rs_price_with_vat'] = $params->get('rs_price_with_vat', '1'); $this->config['rs_show_default_cart_button'] = $params->get('rs_show_default_cart_button', 0); // new GK4 v.2.5 options $this->config['memory_limit'] = $params->get('memory_limit', '128M'); // GK4 v 3.0 options $this->config['vm_categories'] = $params->get('vm_categories', ''); $this->config['vm_products'] = $params->get('vm_products', ''); $this->config['vm_shopper_group'] = $params->get('vm_shopper_group', -1); $this->config['vm_out_of_stock'] = $params->get('vm_out_of_stock', 1); $this->config['vm_add_to_cart'] = $params->get('vm_add_to_cart', 0); $this->config['vm_show_tax'] = $params->get('vm_show_tax', 0); $this->config['vm_show_price_type'] = $params->get('vm_show_price_type', 'base'); $this->config['vm_show_discount_amount'] = $params->get('vm_show_discount_amount', 0); $this->config['vm_show_price_with_tax'] = $params->get('vm_show_price_with_tax', 0); $this->config['vm_itemid'] = $params->get('vm_itemid', 9999); $this->config['vm_display_type'] = $params->get('vm_display_type', 'text_price'); // image thumbnails options (in Joomla version > 2.5) $this->config['thumb_image_type'] = $params->get('thumb_image_type', 'full'); // small validation if($this->config['list_title_limit'] == 0 && $this->config['list_text_limit'] == 0){ $this->config['news_short_pages'] = 0; } if($this->config['news_header_enabled'] == 0) $this->config['news_content_header_pos'] = 'disabled'; if($this->config['news_image_enabled'] == 0) $this->config['news_content_image_pos'] = 'disabled'; if($this->config['news_text_enabled'] == 0) $this->config['news_content_text_pos'] = 'disabled'; if($this->config['news_info_enabled'] == 0) $this->config['news_content_info_pos'] = 'disabled'; if($this->config['news_info2_enabled'] == 0) $this->config['news_content_info2_pos'] = 'disabled'; if($this->config['news_readmore_enabled'] == 0) $this->config['news_content_readmore_pos'] = 'disabled'; if($this->config['news_rs_store_enabled'] == 0) $this->config['news_rs_store_enabled'] = 'disabled'; // parse the crop rules $temp_crop_rules = explode(';', $this->config['crop_rules']); $final_crop_rules = array(); // parse every rule foreach($temp_crop_rules as $rule) { // divide the rule for the name and data $temp_rule = explode('=',$rule); // validation of format if(count($temp_rule) == 2) { // create the structure for rule $final_rule = array( 'type' => $temp_rule[0], 'top' => 0, 'right' => 0, 'bottom' => 0, 'left' => 0 ); // check the type of the rule - class-based or size-based if(strpos($temp_rule[0], ':') !== FALSE) { // if the rule is size-based - divide the size $temp_size = explode(':', $temp_rule[0]); // validation of format if(count($temp_size) == 2) { // and put to the array the base size of image $final_rule['type'] = array( 'width' => $temp_size[0], 'height' => $temp_size[1] ); } } // get the data about cropping $temp_crop_size = explode(':', $temp_rule[1]); // validation of format if(count($temp_crop_size) == 4) { // put the data to the structure $final_rule['top'] = $temp_crop_size[0]; $final_rule['right'] = $temp_crop_size[1]; $final_rule['bottom'] = $temp_crop_size[2]; $final_rule['left'] = $temp_crop_size[3]; } // override the old rule string with the array structure array_push($final_crop_rules, $final_rule); } } // override old string-based rules with the more readable array structures $this->config['crop_rules'] = $final_crop_rules; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_id() {\n\t\treturn self::MODULE_ID;\n\t}", "function getUniqueID(){\n\t\treturn $this->module.'_'.$this->ID;\n\t}", "public function getId(){\n\t\treturn $this->idModule;\n\t}", "public function get_module_id()\n {\n return C__MODULE__EVENTS;\n }", "function sloodle_get_module_id($name)\n {\n // Ensure the name is a non-empty string\n if (!is_string($name) || empty($name)) return FALSE;\n // Obtain the module record\n if (!($module_record = sloodle_get_record('modules', 'name', $module_name))) return FALSE;\n \n return $module_record->id;\n }", "public function getIdModule() \n\t{\n\t\treturn $this->idModule;\n\t}", "public function getModuleName() {}", "public function getModuleName() {}", "protected function getModuleName() {\n return 'mi_javascript';\n }", "public function getModuleName();", "public function getModuleName();", "public function get_module_id()\n {\n return C__MODULE__DIALOG_ADMIN;\n }", "function kilman_get_js_module() {\n return array(\n 'name' => 'mod_kilman',\n 'fullpath' => '/mod/kilman/module.js',\n 'requires' => array('base', 'dom', 'event-delegate', 'event-key',\n 'core_question_engine', 'moodle-core-formchangechecker'),\n 'strings' => array(\n array('cancel', 'moodle'),\n array('flagged', 'question'),\n array('functiondisabledbysecuremode', 'quiz'),\n array('startattempt', 'quiz'),\n array('timesup', 'quiz'),\n array('changesmadereallygoaway', 'moodle'),\n ),\n );\n}", "function module_key()\r\n {\r\n return strtolower(get_class($this));\r\n }", "public function getModule();", "public function getModule();", "public static function id()\n {\n return 1;\n }", "function run_ongkoskirim_id() {\n\n\t$plugin = new Ongkoskirim_Id();\n\t$plugin->run();\n\n}", "function k2sbmModule($id) {\r\n\t\t$this->id = $id;\r\n\r\n\t\t$this->display = array(\r\n\t\t\t'home' => true,\r\n\t\t\t'archives' => true,\r\n\t\t\t'post' => true,\r\n\t\t\t'search' => true,\r\n\t\t\t'pages' => true,\r\n\t\t\t'page_id' => array('show' => 'show', 'ids' => false),\r\n\t\t\t'error' => true\r\n\t\t);\r\n\t\t$this->output = array('show_title' => true);\r\n\t}", "function\t__construct( $_moduleName=\"\") {\n\t\tFDbg::begin( 1, \"UI_Module.php\", \"UI_Module\", \"__construct( '$_moduleName'\") ;\n\t\tparent::__construct( \"UI_Module\", \"ModuleName\") ;\n\t\tif ( strlen( $_moduleName) > 0) {\n\t\t\ttry {\n\t\t\t\t$this->setKey( $_moduleName) ;\n\t\t\t} catch ( Exception $e) {\n\t\t\t\tthrow $e ;\n\t\t\t}\n\t\t}\n\t\tFDbg::end( 1) ;\n\t}", "public static function getIdFromName($module)\n {\n // define input, all numbers and booleans to strings\n $module = (isset($module) ? strtolower((string)$module) : '');\n\n // validate\n if (!System::varValidate($module, 'mod')) {\n return false;\n }\n\n if (!isset(self::$cache['modid'])) {\n self::$cache['modid'] = null;\n }\n\n if (!is_array(self::$cache['modid']) || System::isInstalling()) {\n $modules = self::getModsTable();\n\n if ($modules === false) {\n return false;\n }\n\n foreach ($modules as $mod) {\n $mName = strtolower($mod['name']);\n self::$cache['modid'][$mName] = $mod['id'];\n if (isset($mod['url']) && $mod['url']) {\n $mdName = strtolower($mod['url']);\n self::$cache['modid'][$mdName] = $mod['id'];\n }\n }\n\n if (!isset(self::$cache['modid'][$module])) {\n self::$cache['modid'][$module] = false;\n return false;\n }\n }\n\n if (isset(self::$cache['modid'][$module])) {\n return self::$cache['modid'][$module];\n }\n\n return false;\n }", "function atkModule($name=\"\")\n {\n $this->m_name = $name;\n }", "function forminator_get_module( $id ) {\n\t$modules = forminator_get_modules();\n\n\treturn isset( $modules[ $id ] ) && ! empty( $modules[ $id] ) ? $modules[ $id] : false;\n}", "public function initModuleCode() {\n $this->module_code = 'wk_pricealert';\n }", "public function setModuleName($module);", "function register_module($file_name) {\n $words = explode('-', $file_name);\n $class_name = '';\n $slug_name = '';\n foreach ($words as $word) {\n $class_name .= ucfirst($word);\n $slug_name .= $word . '_';\n }\n $class_name = 'clientele' . $class_name;\n if (class_exists($class_name)) {\n $slug_name = rtrim($slug_name, '_');\n $this->$slug_name = new $class_name();\n }\n }", "function xh_initModules()\r\n\t{\r\n\t}", "abstract public function packageId(): string;", "public function getRequestableModuleName();", "function id();", "static function getHandlerId ()\n {\n return 'internal';\n }", "protected function k_pidSuffix():string {return 'id';}", "static function id(): string { return 'website'; }", "private function key() {\n return sprintf('form_%s_%d', $this->module->name, $this->module->id);\n }", "private function initializeWidgetIdentifier() {}", "public function get_hardwareId(): string\n {\n // $serial is a str;\n\n $serial = $this->get_serialNumber();\n return $serial . '.module';\n }", "public function diviroids_module($atts)\n {\n extract(shortcode_atts(array( 'id' => null), $atts));\n return do_shortcode('[et_pb_section global_module=\"'. $id .'\"][/et_pb_section]');\n }", "function activate_ongkoskirim_id() {\n\trequire_once plugin_dir_path( __FILE__ ) . 'includes/class-ongkoskirim-id-activator.php';\n\tOngkoskirim_Id_Activator::activate();\n}", "public function getID()\n\t{\n\t\treturn 'ojsxc';\n\t}", "public function setConfigModule($id) {\n return $this->configModule = $id;\n }", "protected function getModuleHeadline() {}", "public function __construct($id, $module = null) {\n parent::__construct($id, $module);\n \n }", "private function generateId() {\n $this->setId(AgaviToolkit::uniqid(\"ldap_conn_\"));\n }", "public function getModuloId() {\n return $this->modulo_id;\n }", "function __construct( $moduleID, $pathModuleRoot ) \n {\n $this->values[ ModuleCreator::KEY_MODULE_ID ] = $moduleID;\n $this->values[ ModuleCreator::KEY_PATH_RAD_ROOT ] = $pathModuleRoot;\n }", "public function render()\n {\n if (oxRegistry::getConfig()->getRequestParameter(\"moduleId\")) {\n $sModuleId = oxRegistry::getConfig()->getRequestParameter(\"moduleId\");\n } else {\n $sModuleId = $this->getEditObjectId();\n }\n\n $oModule = oxNew('oxModule');\n\n if ($sModuleId) {\n if ($oModule->load($sModuleId)) {\n $iLang = oxRegistry::getLang()->getTplLanguage();\n\n $this->_aViewData[\"oModule\"] = $oModule;\n $this->_aViewData[\"sModuleName\"] = basename($oModule->getInfo(\"title\", $iLang));\n $this->_aViewData[\"sModuleId\"] = str_replace(\"/\", \"_\", $oModule->getModulePath());\n } else {\n oxRegistry::get(\"oxUtilsView\")->addErrorToDisplay(new oxException('EXCEPTION_MODULE_NOT_LOADED'));\n }\n }\n\n parent::render();\n\n return 'module_main.tpl';\n }", "public function initModuleAction($name)\n {\n $class = false;\n \n if($this->container->hasParameter(\"extjs_init_modules\")) {\n $modules = $this->container->getParameter(\"extjs_init_modules\");\n if(isset($modules[$name])) {\n $class = $modules[$name];\n }\n }\n \n if($class === false) {\n throw new NotFoundHttpException(sprintf(\"No extjs module assigned to route %s\", $name));\n } \n \n return $this->render('HatimeriaExtJSBundle:Javascript:module.html.twig', array('class' => $class));\n }", "function initCurrentModule($mainContainer)\r\n\t{\r\n\t\t// check if a view-id was given\r\n\t\t// will call parent constructor!\r\n\t\treturn new apdModuleMediacenter($mainContainer,\r\n\t\t\t(\r\n\t\t\t(isset($_REQUEST['view_id']) && intval($_REQUEST['view_id']) >= 0)\r\n\t\t\t\t? intval($_REQUEST['view_id']) : -1\r\n\t\t\t));\r\n\t}", "function getModuleName( $module )\r\n {\r\n $parts = explode( '/', $module );\r\n return end( $parts ); \r\n }", "function getIdentifier();", "function getIdentifier();", "public function getPluginId();", "function addModule($modName){\n $params = explode(\"_\",$modName);\t\t\t\t/* Modulname und Sensorid trennen */\n new Module($params[0], $params[1], $this->_getParserInstance(), $this->_getConnInstance());\n }", "protected function get_cache_id() {\n\t\treturn wponion_hash_string( $this->module() . '_' . $this->unique() );\n\t}", "private function namebase() {\n return $this->module->name;\n }", "public function getModule($name);", "public function getIdentifier()\n {\n return 1;\n }", "public function getInstanceIdent() {}", "public function setModuleScript($priModObj){\n\t\t\t\n\t\t\tif(!isset($_GET[\"moduleScripts\"])){\n\t\t\t\t$_GET[\"moduleScripts\"] = \"\";\n\t\t\t}\n\n\t\t\t#add/edit form JS Object or module items JS Object\n\t\t\tif(\n\t\t\t\t$priModObj[0]->isTemplate==0 || \n\t\t\t\t$priModObj[0]->isTemplate==1 ||\n\t\t\t \t$priModObj[0]->isTemplate==3\n\t\t\t){\n\t\t\t\t$_GET[\"moduleScripts\"] .= '\n\t\t\t\tmIP =' . $priModObj[0]->jsonInstanceProp . ';\n\n\t\t\t\tif(!window[mIP.modProp.jsObject]){\n\t\t\t\t\twindow[mIP.modProp.jsObject] = function(){};\n\t\t\t\t\twindow[mIP.modProp.jsObject].prototype = new stealthCommon();\n\t\t\t\t};';\n\t\t\t}\n\n\t\t\t#make an instance of out module type js object, if there is one\n\t\t\tif(\n\t\t\t\tstrlen($priModObj[0]->jsObject) > 0 && \n\t\t\t\t(\n\t\t\t\t\t$priModObj[0]->isTemplate==0 || \n\t\t\t\t\t$priModObj[0]->isTemplate==1 ||\n\t\t\t\t\t#trying this out for the password reset module\n\t\t\t\t\t$priModObj[0]->isTemplate==3\n\t\t\t\t)\n\t\t\t){\t\n\t\t\t\t#module settings\n\t\t\t\t$_GET[\"moduleScripts\"] .= '\n\t\t\t\twindow[mIP.modProp.jsObject].prototype.moduleID = mIP.instanceProp.moduleID;\n\t\t\t\twindow[mIP.modProp.jsObject].prototype.primaryPmpmAddEditID = mIP.modProp.primaryPmpmAddEditID;\n\t\t\t\twindow[mIP.modProp.jsObject].prototype.addEditPageID = mIP.modProp.addEditPageID;\n\t\t\t\twindow[mIP.modProp.jsObject].prototype.isTemplate = mIP.modProp.isTemplate;\n\n\t\t\t\t//ADD EDIT module properties\n\t\t\t\twindow[mIP.modProp.jsObject].prototype.apiPath = mIP.modProp.primaryAPIFile;\n\t\t\t\twindow[mIP.modProp.jsObject].prototype.moduleAlert = mIP.modProp.moduleAlert;\n\t\t\t\t\n\t\t\t\t//defaults for input fields that need to be handled in a special manner\n\t\t\t\t//format date and time for mysql\n\t\t\t\twindow[mIP.modProp.jsObject].prototype.timeFields = \"\";\n\t\t\t\t';\n\t\t\t\t\t\t\t\t\n\t\t\t\t#module instance settings\n\t\t\t\t$_GET[\"moduleScripts\"] .= '\n\t\t\t\twindow[mIP.instanceProp.className + \"Obj\"] = function(){};\n\t\t\t\twindow[mIP.instanceProp.className + \"Obj\"].prototype = new window[mIP.modProp.jsObject]();\t\n\t\t\t\t\t\t\t\n\t\t\t\t//automatically append instance properties\n\t\t\t\tfor(var key in mIP.instanceProp) {\n\t\t\t\t\tif(key == \"priKeyID\") {\n\t\t\t\t\t\twindow[mIP.instanceProp.className + \"Obj\"].prototype.pmpmID = mIP.instanceProp[key];\n\t\t\t\t\t}\n\t\t\t\t\telse if(key == \"className\"){\n\t\t\t\t\t\twindow[mIP.instanceProp.className + \"Obj\"].prototype.moduleClassName = mIP.instanceProp[key];\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\telse if(key == \"clickScroll\"){\n\t\t\t\t\t\twindow[mIP.instanceProp.className + \"Obj\"].prototype.slideAxis = mIP.instanceProp[key];\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\telse if(key == \"displayQty\"){\n\t\t\t\t\t\twindow[mIP.instanceProp.className + \"Obj\"].prototype.holdQty = parseInt(mIP.instanceProp[key]);\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\telse{\n\t\t\t\t\t\twindow[mIP.instanceProp.className + \"Obj\"].prototype[key] = mIP.instanceProp[key];\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t\t';\n\t\t\t\t\n\t\t\t\t#alert the developer if they chose a bad className\n\t\t\t\tif($priModObj[0]->className . \"Obj\" === $priModObj[0]->jsObject){\n\t\t\t\t\t$_GET[\"moduleScripts\"] .= \"console.log('Stealth Error: Your className appended to \\\"Obj\\\" is the same as your jsObject. Change this modules className.');\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t#this module is probably being opened from withint another module\n\t\t\t\tif(isset($_REQUEST[\"quickEdit\"])) {\n\t\t\t\t\t$_GET[\"moduleScripts\"] .= 'window[mIP.instanceProp.className + \"Obj\"].prototype.quickAddEdit = true;';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$_GET[\"moduleScripts\"] .= '\n\t\t\t\twindow[mIP.instanceProp.className + \"Obj\"].prototype.slideFinished = true;';\n\t\t\t\t\n\t\t\t\t/*if we initialize this for the forms as well, it overwrites the \n\t\t\t\tfirst record when we add new records in the bulkAddEdit*/\n\t\t\t\tif(\n\t\t\t\t\t!isset($priModObj[0]->bulkMod) ||\n\t\t\t\t\tisset($priModObj[0]->bulkMod) && !isset($_GET[\"pmpmID\"]\n\t\t\t\t)){\n\t\t\t\t\t$_GET[\"moduleScripts\"] .= '\n\t\t\t\t\twindow[mIP.instanceProp.className] = new window[mIP.instanceProp.className + \"Obj\"]()\t\n\t\t\t\t\t';\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\t\t\t#load in rating system javascript\n\t\t\tif($priModObj[0]->hasRating == 1){\n\t\t\t\tob_start();\n\t\t\t\t\n\t\t\t\t#for some reason if we include this file it breaks the PHP output buffer!\n\t\t\t\t#include_once($_SERVER['DOCUMENT_ROOT'] . \"/js/rating/jquery.MetaData.js\");\n\t\t\t\tinclude_once($_SERVER['DOCUMENT_ROOT'] . \"/js/rating/jquery.rating.js\");\n\t\t\t\t\n\t\t\t\t$_GET[\"moduleScripts\"] .= ob_get_contents();\n\t\t\t\tob_end_clean();\n\t\t\t}\n\t\t\t\n\t\t\t#we only need to load in the script files once per module\n\t\t\tob_start();\n\t\t\tif(!$priModObj[0]->isThumb){\n\t\t\t\t#loop through the scripts for this module\n\t\t\t\t$jScripts = explode(\"?^^?\",$priModObj[0]->jScript);\n\t\t\t\tforeach($jScripts as $s){\n\t\t\t\t\tif(strlen($s) > 0) {\n\t\t\t\t\t\tinclude($_SERVER['DOCUMENT_ROOT'].$s);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t\t#if it's an add/edit module build up for our forms\n\t\t\tif($priModObj[0]->isTemplate == 0 || $priModObj[0]->isTemplate==1) {\n\t\t\t\tinclude($_SERVER['DOCUMENT_ROOT'] . \"/modules/moduleFrame/moduleScriptObjects.php\");\n\t\t\t}\n\t\t\t\n\t\t\t$_GET[\"moduleScripts\"] .= ob_get_contents();\n\t\t\t\n\t\t\tob_end_clean();\n\t\t\t\n\t\t\tif($priModObj[0]->instanceDisplayType==2){\n\t\t\t\t#set pagination properties\n\t\t\t\tif(isset($priModObj[0]->currentPagPage) && is_numeric($priModObj[0]->currentPagPage)){\n\t\t\t\t\t$_GET[\"moduleScripts\"] .= 'window[mIP.instanceProp.className].pagPage = \"' . $priModObj[0]->currentPagPage . '\";';\n\t\t\t\t}\n\t\t\t\telse $_GET[\"moduleScripts\"] .= 'window[mIP.instanceProp.className].pagPage = 1;';\n\t\t\t\t/*how many pages we can paginate through, don't update this on paginate\n\t\t\t\tbecause our paginate query is only the records we are displaying*/\n\t\t\t\tif(\n\t\t\t\t\t(strpos($_SERVER['REQUEST_URI'],\"modulePaginate.php\") === false &&\n\t\t\t\t\tstrpos($_SERVER['REQUEST_URI'],\"moduleInstanceSet.php\") === false) /*&&\n\t\t\t\t\t#not a module level > 2\n\t\t\t\t\tI DON\"T KNOW WHY WE HAD THIS CONDITION IN THERE! - jared\n\t\t\t\t\t!isset($priModObj[1])*/\n\t\t\t\t){\n\t\t\t\t\t$_GET[\"moduleScripts\"] .= 'window[mIP.modProp.jsObject].prototype.maxPagPage = \"' . $priModObj[0]->pageCounter . '\";';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif($priModObj[0]->isThumb){\n\t\t\t\t$parentModule = $this->getModuleInfoQuery(\n\t\t\t\t\tNULL,$priModObj[0]->thumbParentID\n\t\t\t );\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t$tm = mysqli_fetch_assoc($parentModule);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t#set parent class here to use in recursive call\n\t\t\t\t$priModObj[0]->parentClassName = $tm[\"className\"];\n\t\t\t\t$priModObj[0]->parentDisplayType = $tm[\"instanceDisplayType\"];\t\n\t\t\t\t\n\t\t\t\t$functionType = \"\";\n\t\t\t\t\n\t\t\t\t#fade rotate\n\t\t\t\tif($priModObj[0]->parentDisplayType == 0)\n\t\t\t\t\t$functionType = \"parentFade\";\t\n\t\t\t\t#click slide\n\t\t\t\telse if($priModObj[0]->parentDisplayType == 3) {\n\t\t\t\t\t$functionType = \"parentSlide\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t#prototype the module item to control the parent module frame item we keep track \n\t\t\t\t#of the parent and child instance name so they can call each others functions\n\t\t\t\t$_GET[\"moduleScripts\"] .= '\n\t\t\t\t\n\t\t\t\twindow[mIP.instanceProp.className].parentClassName = \"' . $priModObj[0]->parentClassName . '\";\n\t\t\t\twindow[mIP.instanceProp.className].parentDisplayType = \"' . $priModObj[0]->parentDisplayType . '\";\n\t\t\t\t\n\t\t\t\tmoduleInstanceItems = $(\".mi-\" + mIP.instanceProp.className);\n\t\t\t\tvar tmpMiCnt = moduleInstanceItems.length;\n\n\t\t\t\tfor(var m = 0; m < tmpMiCnt; m++){\n\t\t\t\t\tmoduleInstanceItems[m].onclick = function(){' . $priModObj[0]->className . '.' . $functionType . '(this);}\n\t\t\t\t}\n\t\t\t\t';\n\t\t\t}\n\t\t\t\n\t\t\tif($priModObj[0]->expandContractMIs == 1){\n\t\t\t\t$_GET[\"moduleScripts\"] .= '\n\t\t\t\t$(\"#mfmc-'.$priModObj[0]->className.'\").on(\n\t\t\t\t\t\"click\", \".expandBtn,.closeBtn\",\n\t\t\t\t\tfunction(){\n\t\t\t\t\t\tif($(this).hasClass(\"expandBtn\")){\n\t\t\t\t\t\t\tvar isExpanded = $(this).parent().hasClass(\"expanded\") ? true : false;\n\t\t\t\t\t\t\t$(\"#mfmc-'.$priModObj[0]->className.'\").find(\".expandWrap.expanded\").switchClass(\"expanded\",\"\",500).find(\".expandable.exp\").switchClass(\"exp\",\"\",500);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(!isExpanded){\n\t\t\t\t\t\t\t\t$(this).next().switchClass(\"\",\"exp\",500).parent().switchClass(\"\",\"expanded\",500);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$(this).parent().siblings().removeClass(\"expanded\").find(\".expandable.exp\").switchClass(\"exp\",\"\",500);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t$(this).parent().siblings().removeClass(\"expanded\").find(\".expandable.exp\").switchClass(\"exp\",\"\",500);\n\t\t\t\t\t\t\t$(this).parent().removeClass(\"expanded\");\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t';\n\t\t\t}\n\t\t\t\n\t\t\t#disqus comments\n\t\t\tif($priModObj[0]->hasComments == 1){\n\t\t\t\t\n\t\t\t\t#the disqus_config callback fixes a bug when we would show/hide the disqus container\n\t\t\t\t$_GET[\"moduleScripts\"] .= '\n\t\t\t\t\tvar disqus_shortname = \"' . $priModObj[0]->disqusShortname . '\";\n\t\t\t\t\tdisqus_url = \"http://' . $_SERVER['SERVER_NAME'] . '/index.php?pageID=' . $priModObj[0]->pageID . $priModObj[0]->commentPriKeyIDParam . \"=\" .$priModObj[0]->queryResults[\"priKeyID\"] . '\";\n\t\t\t\t\tdisqus_config = function() {\n\t\t\t\t\t\tthis.callbacks.onReady = [function() {\n\t\t\t\t\t\t\t$(\"#disqus_thread iframe\").css({\n\t\t\t\t\t\t\t\t\"height\": \"500px\",\n\t\t\t\t\t\t\t\t\"height\": \"auto !important\",\n\t\t\t\t\t\t\t\t\"min-height\": \"500px\",\n\t\t\t\t\t\t\t\t\"overflow\": \"scroll !important\"\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}];\n\t\t\t\t\t};\n\t\t\t\t\t\n\t\t\t\t\t(function() {\n\t\t\t\t\t\tvar dsq = document.createElement(\"script\"); \n\t\t\t\t\t\tdsq.type = \"text/javascript\"; dsq.async = true;\n\t\t\t\t\t\tdsq.src = \"http://\" + disqus_shortname + \".disqus.com/embed.js\";\n\t\t\t\t\t\t(document.getElementsByTagName(\"head\")[0] || document.getElementsByTagName(\"body\")[0]).appendChild(dsq);\n \t\t\t\t })();\n\t\t\t\t';\n\t\t\t}\n\t\t\t\n\t\t\t#SHARE THIS\n\t\t\tif(\n\t\t\t\tisset($priModObj[0]->domFields) &&\n\t\t\t\tarray_key_exists(\"Social Media\",$priModObj[0]->domFields)\n\t\t\t){\n\t\t\t\t\n\t\t\t\t$_GET[\"moduleScripts\"] .= '\t\n\t\t\t\t\t//load share this buttons\n\t\t\t\t\tif(typeof window.stButtons === \"undefined\")\t{\t\t\t\n\t\t\t\t\t\t$.getScript(\"http://w.sharethis.com/button/buttons.js\", function(data, textStatus, jqxhr) {\n\t\t\t\t\t\t\tvar switchTo5x = true;\n\t\t\t\t\t\t\tstLight.options({publisher: \"4b8fe4b5-0457-40d3-8a33-2937aa537cd0\", doNotHash: false, doNotCopy: false, hashAddressBar: false});\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\t//reinitializes the buttons if we already loaded sharethis once\n\t\t\t\t\telse{\n\t\t\t\t\t\tstButtons.locateElements();\t\t\n\t\t\t\t\t}\n\t\t\t\t';\n\t\t\t}\n\t\t\t\t\t\n\t\t\t#prototype functions to module items to stop/start\n\t\t\tif(\n\t\t\t\t$priModObj[0]->autoChange == 1 && \n\t\t\t\t$priModObj[0]->autoChangeMouseOverDisable == 1\n\t\t\t){\n\n\t\t\t\t#standard module\n\t\t\t\tif($priModObj[0]->pageID < 0) {\n\t\t\t\t\t$timerObj = \"standardInterTime\";\n\t\t\t\t}\n\t\t\t\t#page module\n\t\t\t\telse { \n\t\t\t\t\t$timerObj = \"pageInterTime\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t#fade rotate\n\t\t\t\t$mouseOutFunction = \"\";\n\t\t\t\tif($priModObj[0]->instanceDisplayType == 0 ||\n\t\t\t\t$priModObj[0]->instanceDisplayType == 4){\n\t\t\t\t\t$_SESSION[\"modulePageTransition\"] .= $mouseOutFunction.= \n\t\t\t\t\t$timerObj . '.' . $priModObj[0]->className . ' = setInterval(\n\t\t\t\t\t\t\\'' . $priModObj[0]->className . '.fadeRotate(' . $priModObj[0]->autoChangeDirection . ')\\',\n\t\t\t\t\t\t' . $priModObj[0]->autoChangeDuration . '\n\t\t\t\t\t);' . PHP_EOL;\n\t\t\t\t}\n\t\t\t\t#click slide\n\t\t\t\telse if($priModObj[0]->instanceDisplayType == 3){\n\t\t\t\t\t$_SESSION[\"modulePageTransition\"] .= $mouseOutFunction.= \n\t\t\t\t\t$timerObj . '.' . $priModObj[0]->className . ' = setInterval(\n\t\t\t\t\t\t\\'' . $priModObj[0]->className . '.clickSlide(' . $priModObj[0]->autoChangeDirection . ')\\',\n\t\t\t\t\t\t' . $priModObj[0]->autoChangeDuration . '\n\t\t\t\t\t);' . PHP_EOL;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(\n\t\t\t\t\t$priModObj[0]->instanceDisplayType == 0 ||\n\t\t\t\t\t$priModObj[0]->instanceDisplayType == 4 ||\n\t\t\t\t\t$priModObj[0]->instanceDisplayType == 3\n\t\t\t\t){\n\t\t\t\t\t\n\t\t\t\t\t#can't set this until the dom is ready\n\t\t\t\t\t$_SESSION[\"modulePageTransition\"] .= '\n\t\t\t\t\t\t$s(\"mfmc-' . $priModObj[0]->className . '\").onmouseover = \n\t\t\t\t\t\tfunction(event){\n\t\t\t\t\t\t\tif(event){\n\t\t\t\t\t\t\t\tevent.cancelBubble = true; //prevent event bubbling\n\t\t\t\t\t\t\t\tif(event.stopPropagation) { \t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif(typeof(' . $timerObj . '.' . $priModObj[0]->className . ') !== \"undefined\"){console.log(\"fateme\",event);\t\n\t\t\t\t\t\t\t\twindow.clearInterval(' . $timerObj . '.' . $priModObj[0]->className . ');\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\t$s(\"mfmc-' . $priModObj[0]->className . '\").onmouseout = \n\t\t\t\t\t\tfunction(event){\n\t\t\t\t\t\t\tif(event){\n\t\t\t\t\t\t\t\tevent.cancelBubble = true; //prevent event bubbling\n\t\t\t\t\t\t\t\tif(event.stopPropagation) event.stopPropagation();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t' . $mouseOutFunction . '\n\t\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}\n\n\t\t\t#setup thumnails for this module\t\n\t\t\tif($priModObj[0]->clickThumbs == 1){\t\t\t\n\t\t\t\t$thumbModule = $this->getModuleInfoQuery(\n\t\t\t\t\tNULL,$priModObj[0]->clickThumbsPmpmID\n\t\t\t );\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t$tm = mysqli_fetch_assoc($thumbModule);\n\t\t\t\t\t\t\t\t\n\t\t\t\t/*if this is a level 2 or greater module, append the prikeyID \n\t\t\t\tof the parent to the class name to keep unique id's in the html*/\n\t\t\t\t$objQty = count($priModObj);\n\t\t\t\t\n\t\t\t\t$tempParentPriKeyIDs = \"\";\n\t\t\t\tfor($x = 0; $x < $objQty; $x++) {\n\t\t\t\t\tif(isset($priModObj[$x]) && isset($priModObj[$x]->queryResults)) {\n\t\t\t\t\t\t#used in the DOM\n\t\t\t\t\t\t$tempParentPriKeyIDs .= $priModObj[$x]->queryResults[\"priKeyID\"];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t#we keep track of the parent and child instance name so they can call each others functions\n\t\t\t\t$_GET[\"moduleScripts\"] .= 'window[mIP.instanceProp.className].childClassName = \"' . $tm[\"className\"] . $tempParentPriKeyIDs . '\";';\n\t\t\t}\n\t\t}", "public function _construct()\r\n {\r\n $this->moduleHelper->setModuleName(self::MODULE_NAME_CONFIG_PATH);\r\n }", "function modComponent($id, $data);", "protected function defineNameId(){\n list($name,$id)=$this->resolveNameID();\n $this->_id=$this->htmlOptions['id']=$id;\n\t\t$this->_name=$this->htmlOptions['name']=$name;\n }", "public function getPrimaryModule();", "public static function initModuleLoading(){\n\n\t}", "public function getIdentifier() {}", "public function getIdentifier() {}", "public function getIdentifier() {}", "public function getIdentifier() {}", "public function getIdentifier() {}", "public function getIdentifier() {}", "public function getIdentifier() {}", "public function getIdentifier() {}", "public static function getID() {\r\n return 1;\r\n }", "function moduleName()\r\n {\r\n return \"eZArticle\";\r\n }", "protected function CreateDummyModule($moduleName) {\n\n\t\t$instanceId = IPS_CreateInstance(GUID_DUMMY);\n\t\tIPS_SetName($instanceId, $moduleName);\n\t\tIPS_SetParent($instanceId, $this->InstanceID);\n\n\t\treturn $instanceId;\n\t}", "protected function getInstanceIdentifier() {}", "public static function is_valid_id( $id ) {\n\t\tif ( $id === Apache_Module::MODULE_ID || $id === WordPress_Module::MODULE_ID || $id === Nginx_Module::MODULE_ID ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public static function get_id_for_name( $name ) {\n\t\t$names = array(\n\t\t\t'wordpress' => WordPress_Module::MODULE_ID,\n\t\t\t'apache' => Apache_Module::MODULE_ID,\n\t\t\t'nginx' => Nginx_Module::MODULE_ID,\n\t\t);\n\n\t\tif ( isset( $names[ $name ] ) ) {\n\t\t\treturn $names[ $name ];\n\t\t}\n\n\t\treturn false;\n\t}", "function getIdentifier() ;", "function getIdentifier() ;", "function getIdentifier() ;", "public function getSeqrModuleUrl();", "function add_id_to_script($src, $handle) {\n $theme = 'absolvution';\n $gruntBase = '//' . $_SERVER['HTTP_HOST'] . '/wp-content/themes/' . $theme . '/grunt';\n $config = $gruntBase . '/app/config';\n if ($handle != 'require.js') {\n return $src;\n }\n if ( AMD == true )\n echo '<script id=\"requirejs\" type=\"text/javascript\" src=\"' . esc_url( $src ) . '\" data-main=\"' . $config . '\"></script>' . PHP_EOL;\n else\n echo '<script type=\"text/javascript\" src=\"' . esc_url( $src ) . '\"></script>' . PHP_EOL;\n\n return false;\n}", "public function getIdModuleByName($moduleName) {\n\t\t$conn = Yii::app()->db;\n\t\t$sql = 'SELECT id_module FROM module WHERE nama = \"' . $moduleName . '\"';\n\t\t$command = $conn->createCommand($sql);\n\t\t$result = $command->query();\n\n\t\tif(!$result->rowCount)\n\t\t\treturn false;\n\t\telse {\n\t\t\t$rows = $result->read();\n\t\t\treturn $rows['id_module'];\n\t\t}\n\t}", "function getViewId($module)\n\t{\n\t\tglobal $adb;\n\t\tglobal $current_user;\n\n\t\tif(isset($_REQUEST['viewname']) == false)\n\t\t{\n\t\t$query=\"select cvid from ec_fenzu where entitytype='\".$module.\"' \";\n\t\t$cvresult=$adb->query($query);\n\t\tif($adb->num_rows($cvresult) == 0)\n\t\t{\n\t\t\t$query=\"select cvid from ec_fenzu where entitytype='\".$module.\"' and \".$public_condition;\n\t\t\t$cvresult=$adb->query($query);\n\t\t}\n\t\t$viewid = $adb->query_result($cvresult,0,'cvid');\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$viewid = $_REQUEST['viewname'];\n\t\t}\n\t\tif(empty($viewid) || $viewid == '0') {\n\t\t\t$viewid = \"0\";\n\t\t} else {\n\t\t\t$_SESSION['lvs'][$module][\"viewname\"] = $viewid;\n\t\t\t$query=\"select cvid from ec_fenzu where cvid='\".$viewid.\"' and entitytype='\".$module.\"'\";\n\t\t\t$cvresult = $adb->query($query);\n\t\t\tif($adb->num_rows($cvresult) == 0)\n\t\t\t{\n\t\t\t\t$viewid = '0';\n\t\t\t}\n\t\t}\n\t\treturn $viewid;\n\n\t}", "function setModule($moduleID){\n\t\tif(is_numeric($moduleID))\n\t\t\t$this->moduleID = $moduleID;\n\t\tif(is_object($moduleID))\n\t\t\t$this->moduleID = $moduleID->getID();\n\t}", "public function setIdModule($idModule) \n\t{\n\t\t$this->idModule = $idModule;\n\t\treturn $this;\n\t}", "public static function getModuleName() { return 'np_displayarticles'; }", "private function getModuleNameById($id = 'all')\n\t{\n\t\t$db = Factory::getDBO();\n\t\t$query = $db->getQuery(true);\n\n\t\t$query->select($db->quoteName(array('id','title')));\n\t\t$query->from($db->quoteName('#__modules'));\n\t\t$query->where($db->quoteName('published') . ' = 1');\n\t\t$query->where($db->quoteName('client_id') . ' = 0');\n\n\t\tif ($id !== 'all')\n\t\t{\n\t\t\t$query->where($db->quoteName('id') . ' = ' . (int) $id);\n\t\t}\n\n\t\t$db->setQuery($query);\n\n\t\tif ($id !== 'all')\n\t\t{\n\t\t\treturn $db->loadObject();\n\t\t}\n\n\t\treturn $db->loadObjectList();\n\t}", "function getModule_js() {\n return base_url('module_assets/' . $this->moduleName . '/adviser-module.js');\n }", "public abstract function get_amd_name();", "function getModule($id) {\n $module = [];\n\n $module[\"name\"] = $id;\n $module[\"dir\"] = $this->componentDir . DIRECTORY_SEPARATOR . $id;\n $module[\"installed\"] = $this->isModuleInstalled($id);\n $module[\"integrity\"] = $this->moduleIntegrity($module[\"dir\"]);\n if ($module[\"integrity\"][\"config\"] == true) {\n $module[\"config\"] = $this->moduleConfig($module[\"dir\"]);\n };\n\n return $module;\n }", "public function getIdentifier()\n {\n $configID = $this->get_config() ? $this->get_config()->ID : 1;\n return ucfirst($this->get_mode()) . \"Site\" . $configID;\n }", "function GET_APP_ID(){\n return \"7d0df388-f064-48eb-9092-27fbbf0a438e\";\n}", "protected function _getModuleName()\n {\n return 'Bronto_Reminder';\n }", "private static function getModule() {\n $module = \"site\";\n if (isset($_GET['module']) && trim($_GET['module']) != \"\") $module = $_GET['module'];\n return $module;\n }", "public function getModuleName()\n {\n return $this->_module;\n }", "protected function getTSDebugModule() {}", "public function getModuleName() {\n\n\t\treturn $this->_module;\n\t}", "function gen_id() {\n\t\t$this->id = get_uid();\n\t\t$this->mk_paths($this->id);\n\t}", "public function getIdentifier(): string;" ]
[ "0.7263905", "0.6653679", "0.655711", "0.6513401", "0.643907", "0.643223", "0.6388334", "0.63871145", "0.6306334", "0.6290364", "0.6290364", "0.61884207", "0.61200505", "0.5994462", "0.5848091", "0.5848091", "0.5797264", "0.57865715", "0.577877", "0.57780594", "0.576942", "0.5727455", "0.5725751", "0.5724097", "0.5722572", "0.5717422", "0.5714207", "0.5672728", "0.56487703", "0.5645095", "0.56411254", "0.56387115", "0.56386137", "0.5632755", "0.5604372", "0.5579622", "0.5577798", "0.55774564", "0.5575557", "0.5540397", "0.553383", "0.55235565", "0.5510913", "0.5508113", "0.54997766", "0.5494363", "0.5488297", "0.54839104", "0.5481031", "0.5477455", "0.5477455", "0.5474578", "0.54743725", "0.5472998", "0.5464816", "0.5454736", "0.54499125", "0.5449303", "0.5447177", "0.5440253", "0.54358584", "0.54299617", "0.5421072", "0.5415468", "0.5415448", "0.5415448", "0.5414953", "0.54145634", "0.54145634", "0.54145634", "0.54145634", "0.54145634", "0.5413255", "0.5408166", "0.5401372", "0.539781", "0.53877556", "0.53877014", "0.5387664", "0.5387664", "0.53862107", "0.5383148", "0.53797626", "0.5371737", "0.5366065", "0.5364078", "0.53618133", "0.5359083", "0.53589183", "0.53578717", "0.53458667", "0.5344046", "0.534345", "0.5343326", "0.5339502", "0.5335029", "0.532688", "0.5303599", "0.5285595", "0.52791744", "0.52784324" ]
0.0
-1
RENDER PORTAL MODE LAYOUT
function render_portal_mode($mode) { if(!class_exists('NSP_GK4_'.$mode)) { require_once (dirname(__FILE__).DS.'gk_classes'.DS.'portal_modes'.DS.'gk.'.strtolower($mode).'.php'); } $class_name = 'NSP_GK4_'.$mode; $renderer = new $class_name(); $renderer->init($this); $renderer->output(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function renderLayout();", "public function render_screen_layout()\n {\n }", "public function render_view_mode()\n {\n }", "static function renderLayout($root = false)\n {\n extract(self::$data_layout);\n if ($root) {\n include_once \"views/layout/\".self::$layout.\".php\";\n } else {\n include_once \"views/layout/\".SIDE.\"/\".self::$layout.\".php\";\n }\n }", "protected function render()\n {\n $settings = $this->get_settings_for_display();\n require dirname(__FILE__) . '/' . $settings['layout'] . '.php';\n }", "public function initLayout();", "public function render_panel_templates()\n {\n }", "abstract function buildShowLayout(): void;", "function renderPortals( $sidebar ) {\n\t\tparent::renderPortals( $sidebar );\n\t\t?>\n\t\t<div class='portlet'>\n\t\t\t<div id='uesp_D_2'></div>\n\t\t</div><div class='visualClear'></div></div></div><div style='padding-left:11em; width:300px; height:250px; margin:0 auto;'><div id='uesp_D_3'></div></div><div><div>\n<?php\n\t}", "public function getViewMode();", "protected function renderFluidView() {}", "public function render() {\n\t\tW2P::getInstance()->debug()->_debug_add_content ( \"Executing all modules methods.\" );\n\t\tW2P::getInstance()->modules()->exec_all_functions();\n\t\t\n\t\tW2P::getInstance()->debug()->_debug_add_content ( \"Generating rendering of the view: {$this->view}\" );\n\t\t\n\t\tob_start ();\n\t\tinclude_once (W2P_INCLUDE . W2P::getInstance()->configuration()->layout_path . '/views/' . $this->view . '.phtml');\n\t\t$this->content = ob_get_clean ();\n\t\t\n\t\tW2P::getInstance()->debug()->_debug_add_content ( \"Content of the rendered view\" );\n\t\tW2P::getInstance()->debug()->_debug_add_content ( \"Adding to the project layout\" );\n\t\t\n\t\tinclude (W2P_INCLUDE . W2P::getInstance()->configuration()->layout_path . '/' . $this->layout . '.phtml');\n\t\t\n\t\tW2P::getInstance()->debug()->_debug_add_content ( \"Layout successfully mastered\" );\n\t\t\n\t\tif (W2P::getInstance()->configuration()->debug)\n\t\t\tW2P::getInstance()->debug()->save_debug ( W2P::getInstance()->configuration()->debug_format );\n\t}", "public function init() {\n $this->_renderLayout = 0;\n }", "public function render() {\r\n\t\t\r\n\t}", "function render() ;", "public function render_section() {\n \n }", "protected function render() {\r\n $settings = $this->get_settings_for_display(); \r\n\r\n if ( $settings['list'] ) { ?>\r\n\r\n <div class=\"DSMCA__slide swiper-container\">\r\n <div class=\"swiper-wrapper\"> \r\n <?php foreach ( $settings['list'] as $item ) : ?>\r\n <div class=\"DSMCA__item_slide swiper-slide\">\r\n <img class=\"DSMCA__item-image\" src=\" <?php echo $item['imagen']['url'] ?> \">\r\n <h5 class=\"DSMCA__item-title\"><?php echo $item['titulo'] ?></h5>\r\n </div>\r\n <?php endforeach; ?> \r\n </div>\r\n <div class=\"swiper-button-prev\"></div>\r\n <div class=\"swiper-button-next\"></div>\r\n </div>\r\n\r\n\r\n <?php }\r\n\t}", "public function renderComponents();", "function render(){\n\t\t\n\t}", "public function render(){\n\t\t\n\t}", "function r2r_zen_discussion_node_panels_layouts() {\n $items['discussion_node'] = array(\n 'title' => t('Reality - Discussion Node Layout'),\n 'icon' => 'discussion_node.png',\n 'theme' => 'discussion_node',\n // 'css' => 'discussion_node.css',\n 'regions' => array(\n 'top' => t('Top'),\n 'left' => t('Left side'),\n 'right_t' => t('Right side, top row'),\n 'right_l' => t('Right side, Left col'),\n 'right_m' => t('Right side, Middle col'),\n 'right_r' => t('Right side, Right col'),\n 'right_b' => t('Right side, right row bottom')\n ),\n );\n\n return $items;\n}", "protected function prepareRendering() {}", "public static function renderLayout()\n {\n return self::$layout;\n }", "public function display()\n\t{\n\t\t$serviceLocator = $this->_application->getServiceLocator();\n\t\t$eventDispatcher = $this->_application->getEventDispatcher();\n\n\t\t// Finish configuring Open Power Template\n\t\t$opt = $serviceLocator->get('template.Opt');\n\n\t\t$eventDispatcher->notify(new Event($this, 'template.layout.template.configure',\n\t\t\tarray('opt' => $opt)\n\t\t));\n\n\t\t$opt->setup();\n\n\t\t// Configure the layout view\n\t\t$eventDispatcher->notify(new Event($this, 'template.layout.configure',\n\t\t\tarray('layout' => $this->_layout)\n\t\t));\n\n\t\t// Add placeholders\n\t\tforeach($this->_placeholders as $name => &$placeholder)\n\t\t{\n\t\t\t$data = array();\n\t\t\tforeach($placeholder as $view)\n\t\t\t{\n\t\t\t\t$data[] = array('view' => $view);\n\t\t\t}\n\t\t\t$this->_layout->assign($name, $data);\n\t\t}\n\n\t\t// Render everything. Actually, this is redirected to events, so\n\t\t// that we can easily change the exact rendering procedure.\n\t\t$eventDispatcher->notify(new Event($this, 'template.layout.render',\n\t\t\tarray('layout' => $this->_layout)\n\t\t));\n\t\t$this->_output->render($this->_layout);\n\t}", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function renderRooms()\n {\n //$this->template->rooms = $this->projectManager->getRooms();\n $types=$this->projectManager->getTypesRooms();\n $this->template->type=$types;\n $this->template->test = array();\n foreach ($types as $key) {\n $this->template->test[$key->Typ_izby_id] = $this->projectManager->getRooms($key->Typ_izby_id);\n }\n }", "public function render()\n {\n $content = $this->__layoutContent();\n\n extract($this->getViewData());\n ob_start();\n include $content;\n ob_get_flush();\n }", "function siteorigin_panels_render( $post_id = false, $panels_data = false ) {\n\n\tif( empty($post_id) ) $post_id = get_the_ID();\n\n\tglobal $siteorigin_panels_current_post;\n\t$old_current_post = $siteorigin_panels_current_post;\n\t$siteorigin_panels_current_post = $post_id;\n\n\t// Try get the cached panel from in memory cache.\n\tglobal $siteorigin_panels_cache;\n\tif(!empty($siteorigin_panels_cache) && !empty($siteorigin_panels_cache[$post_id]))\n\t\treturn $siteorigin_panels_cache[$post_id];\n\n\tif(empty($panels_data)){\n\t\tif(post_password_required($post_id)) return false;\n\t\t$panels_data = get_post_meta($post_id, 'panels_data', true);\n\t}\n\n\t$panels_data = apply_filters( 'siteorigin_panels_data', $panels_data, $post_id );\n\tif( empty( $panels_data ) || empty( $panels_data['grids'] ) ) return '';\n\n\t// Create the skeleton of the page\n\t$layout = array();\n\tif( !empty( $panels_data['section'] ) && is_array( $panels_data['section'] ) ) {\n\t\tforeach ($panels_data['section'] as $si => $sect ) {\n\t\t\t$layout[intval($si)] = array();\n\t\t}\n\t}\n\n\tif( !empty( $panels_data['grids'] ) && is_array( $panels_data['grids'] ) ) {\n\t\tforeach ( $panels_data['grids'] as $grid ) {\n\t\t\t$layout[intval($grid['section'])][] = array();\n\t\t}\n\t}\n\n\tif( !empty( $panels_data['grid_cells'] ) && is_array( $panels_data['grid_cells'] ) ) {\n\t\tforeach ( $panels_data['grid_cells'] as $cell ) {\n\t\t\t$layout[intval($cell['section'])][intval($cell['grid'])][] = array(\n\t\t\t\t'weight' => $cell['weight'],\n\t\t\t\t'widgets' => array()\n\t\t\t);\n\t\t}\n\t}\n\n\tif( !empty($panels_data['widgets']) && is_array($panels_data['widgets']) ){\n\t\tforeach ( $panels_data['widgets'] as $widget ) {\n\t\t\t$layout[intval( $widget['info']['section'] )][intval( $widget['info']['grid'] )][intval( $widget['info']['cell'] )]['widgets'][] = $widget;\n\t\t}\n\t}\n\n\tob_start();\n\n\tforeach ( $layout as $si => $section ) {\n\t\techo '<div class=\"section '.$panels_data['section'][$si]['class'].' section-'.($si+1).'\">';\n\n\t\tforeach ( $layout[$si] as $gi => $grid ) {\n\t\t\techo '<div class=\"grid grid-'.($gi+1).'\">';\n\n\t\t\tforeach ( $layout[$si][$gi] as $ci => $cell ) {\n\t\t\t\techo '<div class=\"column '.$cell['weight'].' column-'.($ci+1).'\">';\n\n\t\t\t\tforeach ( $layout[$si][$gi][$ci]['widgets'] as $pi => $widget ) {\n\t\t\t\t\t$data = $widget;\n\t\t\t\t\tunset( $data['info'] );\n\n\t\t\t\t\tsiteorigin_panels_the_widget( \n\t\t\t\t\t\t$widget['info']['class'], //clase del widget (tipo)\n\t\t\t\t\t\t$data,\t// info instance\n\t\t\t\t\t\t$si,\t// section\n\t\t\t\t\t\t$gi,\t// gridd\n\t\t\t\t\t\t$ci,\t// cell\n\t\t\t\t\t\t$pi,\t// panel nb\n\t\t\t\t\t\t$pi == count( $widgets ) - 1, // true si es el ultimo\n\t\t\t\t\t\t$post_id \n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\techo '</div>'; // close cell\n\t\t\t}\n\n\t\t\techo '</div>'; // close grid\n\t\t} // end foreach grids\n\t\techo '</div>'; // close section\n\t} // end foreach section\n\n\t$html = ob_get_clean();\n\n\t// Reset the current post\n\t$siteorigin_panels_current_post = $old_current_post;\n\n\treturn apply_filters( 'siteorigin_panels_render', $html, $post_id, !empty($post) ? $post : null );\n}", "protected function render(){\n //render view\n \n }", "protected function setupLayout() {\n\t\t$this->data['route'] = Route::getCurrentRoute()->getPath();\t\n\t\tif ( ! is_null($this->layout)) {\n\t\t\t$this->data['enrolledCourses'] = NULL;\n\t\t\t\n\t\t\tif (Auth::check() && in_array(Auth::user()->user_type, array(3, 5))) {\n\t\t\t\t$this->data['enrolledCourses'] = EnrolledCourses::getEnrolledCourses();\n\t\t\t\t$this->data['endedCourses'] = EnrolledCourses::getEndedCourses();\n\t\t\t\t$this->data['profiling'] = User::getRegProfile();\t\n\t\t\t\t$this->data['profiling_ctr'] = $this->data['profiling'];\t\t\t\t\n\t\t\t} else if (Auth::check() && Auth::user()->user_type == 2) {\n\t\t\t\t$this->data['assigned_courses'] = Courses::getAssignedCourses();\n\t\t\t}\n\n\t\t\t$this->layout = View::make($this->layout, $this->data);\n\t\t}\n\t}", "function initLayout(){\n $layout = array(\n 'left' => array(\n 'ProfileInfo' => array(\n 'title' => 'Profile Info',\n 'minimize' => false,\n ),\n 'EmailInboxMenu' => array(\n 'title' => 'Inbox Menu',\n 'minimize' => false,\n ),\n 'ActionMenu' => array(\n 'title' => 'Actions',\n 'minimize' => false,\n ),\n 'TopContacts' => array(\n 'title' => 'Top Contacts',\n 'minimize' => false,\n ),\n 'RecentItems' => array(\n 'title' => 'Recently Viewed',\n 'minimize' => false,\n ),\n 'ActionTimer' => array(\n 'title' => 'Action Timer',\n 'minimize' => true,\n ),\n 'UserCalendars' => array(\n 'title' => 'User Calendars',\n 'minimize' => false,\n ),\n 'CalendarFilter' => array(\n 'title' => 'Filter',\n 'minimize' => false,\n ),\n 'GroupCalendars' => array(\n 'title' => 'Group Calendars',\n 'minimize' => false,\n ),\n 'FilterControls' => array(\n 'title' => 'Filter Controls',\n 'minimize' => false,\n ),\n 'SimpleFilterControlEventTypes' => array(\n 'title' => 'Event Types',\n 'minimize' => false,\n ),\n ),\n 'right' => array(\n 'SmallCalendar' => array(\n 'title' => 'Small Calendar',\n 'minimize' => false,\n ),\n 'ChatBox' => array(\n 'title' => 'Activity Feed',\n 'minimize' => false,\n ),\n 'GoogleMaps' => array(\n 'title' => 'Google Map',\n 'minimize' => false,\n ),\n 'OnlineUsers' => array(\n 'title' => 'Active Users',\n 'minimize' => false,\n ),\n 'TagCloud' => array(\n 'title' => 'Tag Cloud',\n 'minimize' => false,\n ),\n 'TimeZone' => array(\n 'title' => 'Clock',\n 'minimize' => false,\n ),\n 'SmallCalendar' => array(\n 'title' => 'Calendar',\n 'minimize' => false,\n ),\n 'QuickContact' => array(\n 'title' => 'Quick Contact',\n 'minimize' => false,\n ),\n 'MediaBox' => array(\n 'title' => 'Files',\n 'minimize' => false,\n ),\n ),\n 'hiddenRight' => array(\n 'ActionMenu' => array(\n 'title' => 'My Actions',\n 'minimize' => false,\n ),\n 'MessageBox' => array(\n 'title' => 'Message Board',\n 'minimize' => false,\n ),\n 'NoteBox' => array(\n 'title' => 'Note Pad',\n 'minimize' => false,\n ),\n 'DocViewer' => array(\n 'title' => 'Doc Viewer',\n 'minimize' => false,\n ),\n 'TopSites' => array(\n 'title' => 'Top Sites',\n 'minimize' => false,\n ),\n ),\n );\n if(Yii::app()->contEd('pro')){\n if(file_exists('protected/config/proWidgets.php')){\n foreach(include('protected/config/proWidgets.php') as $loc=>$data){\n if (isset ($layout[$loc]))\n $layout[$loc] = array_merge($layout[$loc],$data);\n }\n }\n }\n return $layout;\n }", "public function getViewArea() {}", "function afterRender() { \t \t\n \tif($this->params['controller'] == 'nodes') {\n \t\tif(($this->action == 'admin_add') || ($this->action == 'admin_edit')) {\n \t\t\techo $this->Html->css(array('/cycle/css/styles')); \t\n \t\t}\n \t}\n }", "public static function create_preview()\n\t{\n\t\t$current = self::current_layout();\n\t\t\n\t\t//start output buffer\n\t\tob_start();\t\t\n\t\t\n\t\t//output current tmpl\n\t\trequire_once( THEME_LAYOUTS . $current . '/templates/tmpl-layout.php' );\t\n\t\t\n\t\t//get output buffer and store in an array\t\t\n\t\t$output = ob_get_clean();\n\t\t\n\t\treturn $output;\t\n\t}", "public function loadLayout()\n {\n \n echo \"<div id='layout-mini-cr'>\";\n try\n {\n $portal = new Portal();\n foreach($portal->loadBox() as $i => $v)\n {\n try\n {\n $portal->getId($v[1]);\n $info = $portal->pegaInfo();\n switch($v[2])\n {\n\n case 1: echo \"<div class='box-mini-ex1' id='box-mini-$v[0]'><a href='#'><div class='delete-box-mini' id='dlb-$v[0]'></div></a>$info[1]</div>\"; break;\n case 2: echo \"<div class='box-mini-ex2' id='box-mini-$v[0]'><a href='#'><div class='delete-box-mini' id='dlb-$v[0]'></div></a>$info[1]</div>\"; break;\n case 3: echo \"<div class='box-mini-ex3' id='box-mini-$v[0]'><a href='#'><div class='delete-box-mini' id='dlb-$v[0]'></div></a>$info[1]</div>\"; break; \n } \n }\n catch(Exception $ex)\n {\n // Deleta a box caso ele não consiga pegar as informações da notícia\n $portal->getBid($v[0]);\n $portal->deleteBox();\n }\n }\n echo \"<div class='clear'></div>\";\n }\n catch(Exception $a)\n {\n \n }\n echo \"</div>\";\n }", "function latto_panels_default_style_render_region($vars) {\n $output = '';\n $output .= implode('', $vars['panes']);\n return $output;\n}", "public function getRenderMode ()\n {\n return $this->renderMode;\n }", "function renderToClient();", "private function getPortletsForMode ()\n\t{\n\t\t$this->import('Database');\n\t\t$query = \"SELECT * FROM tl_module WHERE isSimpleFrontendPortlet = ?\";\n\t\t$params = array('1');\n\t\t\n\t\tif (TL_MODE == 'FE')\n\t\t{\n\t\t\t$query .= \" AND pid IN (SELECT t.id FROM tl_theme t JOIN tl_layout l ON t.id = l.pid WHERE l.id = ?)\";\n\t\t\tglobal $objPage;\n\t\t\t$params[] = $objPage->layout;\n\t\t}\n\t\t\n\t\treturn $this->Database->prepare($query)->execute($params);\n\t}", "public function render()\n {\n return view(\"layouts.{$this->layout}\");\n }", "function homepage(){ \n $view = new View ;\n $view -> main_part = $view -> render2('cms/homepageList');\n $view -> render('cms/layouts/layout');\n}", "protected function render()\n {\n $sControllerDriver = \\Limbonia\\Controller\\Cli::driver($this->oRouter->controller);\n\n if (empty($sControllerDriver))\n {\n try\n {\n $aAvailableModes = [];\n\n foreach (\\Limbonia\\App::viewDirs() as $sDir)\n {\n foreach (glob($sDir . '/' . $this->type . '/*.php') as $sFileName)\n {\n $aAvailableModes[] = basename($sFileName, '.php');\n }\n\n foreach (glob($sDir . '/' . $this->type . '/*/*.php') as $sFileName)\n {\n $aAvailableModes[] = basename(dirname($sFileName)) . '_' . basename($sFileName, '.php');\n }\n }\n\n $aAvailableModes = array_unique($aAvailableModes);\n sort($aAvailableModes);\n $iPos = array_search('default', $aAvailableModes);\n\n if (false !== $iPos)\n {\n unset($aAvailableModes[$iPos]);\n }\n\n $iPos = array_search('error', $aAvailableModes);\n\n if (false !== $iPos)\n {\n unset($aAvailableModes[$iPos]);\n }\n\n if (count($aAvailableModes) > 0)\n {\n $this->addOption\n ([\n 'long' => 'mode',\n 'value' => \\Limbonia\\App\\Cli::OPTION_VALUE_REQUIRE,\n 'desc' => \"This utility has the following built-in modes:\\n\\t\\t\\t\\t\" . implode(\"\\n\\t\\t\\t\\t\", $aAvailableModes)\n ]);\n }\n\n $this->processOptions();\n return $this->viewRender($this->generateViewFile());\n }\n catch (Exception $e)\n {\n $this->viewData('failure', 'Failed to generate the requested data: ' . $e->getMessage());\n return $this->viewRender('error');\n }\n }\n\n try\n {\n $oCurrentController = $this->controllerFactory($sControllerDriver);\n $this->sViewName = strtolower($sControllerDriver) . '_' . $this->oRouter->action;\n $oCurrentController->prepareView();\n $this->viewData('options', $this->processOptions());\n $sControllerView = $oCurrentController->getView();\n return $this->viewRender($sControllerView);\n }\n catch (\\Exception $e)\n {\n $this->viewData('failure', \"The controller {$this->oRouter->controller} could not be instaniated: \" . $e->getMessage());\n return $this->viewRender('error');\n }\n }", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout) && ! $this->is_pjax())\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "public function render()\n {\n $control = $this->getControl();\n $inner = $this->getInner($this->inner);\n $plugins = $this->getInner($this->plugins);\n \n $body = <<<EOF\n<div style='height: {$this->height}px; '>\n <v-map :zoom=13 :center=\"[$this->Lat,$this->Lon]\" :options='$this->options'>\n $control\n <v-tilelayer url=\"$this->tileServer\" name=\"Cхема\" layer-type='base'></v-tilelayer>\n $plugins\n $inner\n </v-map>\n</div>\nEOF;\n\n return view($this->view, \n [\n $this->mapId => $body,\n ]\n )->render();\n }", "public function layoutAction(){\n \t$far = 100;\n \t$sxnById = array();\n \t$request = $this->getRequest();\n \t$template_id = $request->getParam('template_id');\n \t$page_id = $request->getParam('page_id');\n \t$title = $request->getParam('title');\n \t$task = $request->getParam('task', null);\n \t$table = $this->_getParam('table');\n\n \tif($template_id){\n\t \tswitch($task){\n\t \t\tcase 'savelayout':{\n\t \t\t\t$this->saveLayout();\n\t \t\t\tbreak;\n\t \t\t}\n\n\t \t\tcase 'resetlayout':{\n\t \t\t\t$this->resetLayout();\n\t \t\t\tbreak;\n\t \t\t}\n\t \t}\n \t}\n\t\t \n\t\t$pageLayout = Rhema_Model_Service::factory('page_layout');\t\t\n \t$res = $pageLayout->getPageLayout($page_id, $template_id, $table); \n \t\n \t$items \t = $this->_editor->getCached()->getItems(); \t\n \t$templateData = $this->_editor->getCached()->getTemplateDetails($template_id);\n \t$items = array_merge($items, $templateData);\n \t \n \t$this->view->title = $title;\n \t//$this->view->sections \t= $templateData['sections'];\n \t$this->view->layout \t= $res['layout']; \n \t \n \t$formUrl['action']\t\t= 'layout';\n \t$formUrl['controller'] = 'design';\n \t$formUrl['module'] = 'cms';\n\n \t$formUrl['page_id'] = $page_id ;\n \t$formUrl['template_id'] = $template_id;\n \t$formUrl['title'] = $title;\n \t$formUrl['table'] = $table ;\n\n \t$this->view->formAction = $this->view->url($formUrl, ADMIN_ROUTE); \n\t\t$this->view->items = $items;\n\n \t$output['form'] = $this->view->render('design/layout.phtml');\n \t\n \t$this->_utility->setAjaxData(Zend_Json::encode($output));\n }", "public function setRenderingMode($renderingMode = 0) {}", "public function setRenderingMode($renderingMode = 0) {}", "function render()\n\t{\n\t}", "function renderApplication(){\n\tinclude getApplicationSystemPath() . \"/public/layout/layout.php\";\t\n}", "private function renderView()\n\t{\n\t\tff_renderView(substr(__CLASS__, 7));\n\t}", "private function renderView()\n\t{\n\t\tff_renderView(substr(__CLASS__, 7));\n\t}", "public function setLayout() {\n if ($this->controller == 'login' || $this->controller == 'infos') {\n $this->viewBuilder()->setLayout('empty');\n } else if ($this->controller == 'ajax') {\n $this->viewBuilder()->setLayout('ajax');\n } else {\n $this->viewBuilder()->setLayout('chotreo');\n }\n }", "protected function setupLayout()\n\t{\n\t\tdefine(\"aol_institute\", 68);\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "public function layout() {\r\n $this->template['header'] = $this->load->view('common/header', $this->data, true);\r\n $this->template['content'] = $this->load->view($this->content, $this->data, true);\r\n $this->template['footer'] = $this->load->view('common/footer', $this->data, true);\r\n $this->load->view('common/layout', $this->template);\r\n }", "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 }", "protected function setupLayout() {\n\t\tif ( ! is_null($this->layout)) {\n\n\n\t\t\t$cb_js_var = array(\n\t\t\t\t'site_url' => url('/'),\n\t\t\t\t'admin_url' => url('/admin'),\n\t\t\t\t'admin_assets_url' => asset('packages/vizioart/cookbook/'),\n\t\t\t\t'admin_api_url' => url('/admin/api')\n\t\t\t);\n\n\n\t\t\t$this->layout = View::make($this->layout, array(\n\t\t\t\t'cb_js_var' => $cb_js_var\n\t\t\t));\n\t\t}\n\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 renderView()\n {\n //$_SESSION[\"info\"] zobrazuje vysledek operaci, paklize se nejake udaly\n if((isset($_SESSION[\"info\"])) && (!empty($_SESSION[\"info\"]))){\n $this->view_data[\"info\"] = $_SESSION[\"info\"];\n $_SESSION[\"info\"] = null;\n } \n\n //generuje csrf token pro formulare\n if (!isset($_SESSION[\"csrf_token\"])) {\n $_SESSION[\"csrf_token\"] = rand(1, 1e9);\n }\n \n if ($this->view)\n {\n $this->view_data[\"view\"] = $this->view;\n extract($this->view_data);\n $main_template = (dirname(__FILE__) .'/../view/@layout.phtml');\n \n if(file_exists($main_template))\n require_once($main_template); \n }\n }", "public function design()\n\t{\n\t\t$data['judul'] = 'GRAPHIC DESIGN';\n\n\t\t$data['design'] = $this->db->get('design')->result_array();\n\t\t\n\t\t$this->load->view('tamplates/headerMarvel', $data); \n\t\t$this->load->view('home/design', $data); \n\t\t$this->load->view('tamplates/footerMarvel'); \n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout, $this->_data);\n\t\t\t$this->layout->content = null;\n\t\t\t$this->layout->currentProject = null;\n\t\t}\n\t}", "protected function _constructMainLayout()\n {\n if (class_exists('tracer_class')) {\n tracer_class::marker(array(\n 'create main layout for display',\n debug_backtrace(),\n '#006400'\n ));\n }\n\n if ($this->_get) {\n $typ = $this->_get->pageType();\n } else {\n $typ = NULL;\n }\n\n switch ($typ) {\n case'css': case'js':\n $this->DISPLAY['core'] = '{;css_js;}';\n break;\n\n default:\n $this->layout($this->_defaultOptions['template']);\n break;\n }\n }", "protected function setupLayout() {\n\t\tif (!is_null($this -> layout)) {\n\t\t\t$this -> layout = View::make($this -> layout);\n\t\t}\n\t}", "public function getPageLayout() {}", "public function render() {\n\t\techo '<div id=\"neve-dashboard\"></div>';\n\t}", "function index() {\n\t\t$this->theme = $this->passedArgs['theme'];\n\t\t$this->layout = $this->passedArgs['layout'];\n\t}", "protected function render() {\n $settings = $this->get_settings_for_display();\n if(!empty($settings['rh_canvas_type']) && $settings['rh_canvas_type'] == 'video') {\n wp_enqueue_script('rhvideocanvas');\n if ( ! empty( $settings['rh_vid_mp4'] )) {\n $this->add_render_attribute( 'rh_vid_data', 'data-mp4', $settings['rh_vid_mp4'] );\n }else if(!empty($settings['rh_vid_mp4_inner']['url'])){\n $this->add_render_attribute( 'rh_vid_data', 'data-mp4', $settings['rh_vid_mp4_inner']['url'] );\n }\n if ( ! empty( $settings['rh_vid_webm'] )) {\n $this->add_render_attribute( 'rh_vid_data', 'data-webm', $settings['rh_vid_webm'] );\n }else if(!empty($settings['rh_vid_webm_inner']['url'])){\n $this->add_render_attribute( 'rh_vid_data', 'data-webm', $settings['rh_vid_webm_inner']['url'] );\n }\n if ( ! empty( $settings['rh_vid_ogv'] )) {\n $this->add_render_attribute( 'rh_vid_data', 'data-ogv', $settings['rh_vid_ogv'] );\n }else if(!empty($settings['rh_vid_ogv_inner']['url'])){\n $this->add_render_attribute( 'rh_vid_data', 'data-ogv', $settings['rh_vid_ogv_inner']['url'] );\n }\n if ( ! empty( $settings['rh_vid_poster'] )) {\n $this->add_render_attribute( 'rh_vid_data', 'poster', $settings['rh_vid_poster']['url'] );\n }\n if ( ! empty( $settings['rh_vid_breakpoint'] )) {\n $this->add_render_attribute( 'rh_vid_data', 'data-breakpoint', $settings['rh_vid_breakpoint'] );\n }\n if ( ! empty( $settings['rh_vid_fallback'] )) {\n $this->add_render_attribute( 'rh_vid_data', 'data-fallback', $settings['rh_vid_fallback']['url'] );\n }\n if ( ! empty( $settings['rh_vid_fallback_tablet'] )) {\n $this->add_render_attribute( 'rh_vid_data', 'data-fallback-tablet', $settings['rh_vid_fallback_tablet']['url'] );\n }\n if ( ! empty( $settings['rh_vid_fallback_mobile'] )) {\n $this->add_render_attribute( 'rh_vid_data', 'data-fallback-mobile', $settings['rh_vid_fallback_mobile']['url'] );\n }\n if ( ! empty( $settings['rh_load_iter'] )) {\n $this->add_render_attribute( 'rh_vid_data', 'data-loaditer', 'true' );\n }\n $loop = (empty( $settings['disableloop'] )) ? ' loop' : '';\n $autoplay = (empty( $settings['disableautoplay'] )) ? ' autoplay' : '';\n echo '<video'.$loop.$autoplay.' playsinline muted class=\"rh-video-canvas rh_and_canvas\" '.$this->get_render_attribute_string( 'rh_vid_data' ).'></video>';\n }else if(!empty($settings['rh_canvas_type']) && $settings['rh_canvas_type'] == 'masksvg') {\n wp_enqueue_script('rhblobcanvas');\n $widgetId = $this->get_id();\n \n if(!empty($settings['svg_image']['id'])){\n $image_url = Group_Control_Image_Size::get_attachment_image_src($settings['svg_image']['id'], 'image', $settings);\n $imageData = wp_get_attachment_image_src($settings['svg_image']['id'],'full');\n $h = $imageData[2];\n $w = $imageData[1];\n $imageProportion = $h/$w;\n $realHeight = $settings['svg_size']['size'] * $imageProportion;\n $this->add_render_attribute('_svgrapper', 'data-resize', $realHeight);\n }\n $this->add_render_attribute('_svgrapper', 'data-numpoints', $settings['numPoints']['size']);\n $this->add_render_attribute('_svgrapper', 'data-minradius', $settings['minmaxRadius']['sizes']['start']);\n $this->add_render_attribute('_svgrapper', 'data-maxradius', $settings['minmaxRadius']['sizes']['end']);\n $this->add_render_attribute('_svgrapper', 'data-minduration', $settings['minmaxDuration']['sizes']['start']);\n $this->add_render_attribute('_svgrapper', 'data-maxduration', $settings['minmaxDuration']['sizes']['end']);\n $this->add_render_attribute('_svgrapper', 'data-tensionpoints', $settings['tensionPoints']['size']);\n\n if(empty($settings['svgimage_x']['size'])){\n $posX = 0;\n }else{\n $posX = $settings['svgimage_x']['size'];\n }\n if(empty($settings['svgimage_y']['size'])){\n $posY = 0;\n }else{\n $posY = $settings['svgimage_y']['size'];\n }\n ?>\n <div data-id=\"<?php echo esc_attr($widgetId); ?>\" class=\"rh-svgblob-wrapper rh_and_canvas\" <?php echo ''.$this->get_render_attribute_string( '_svgrapper' )?>>\n <svg class=\"rh-svg-blob\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 600 600\" preserveAspectRatio=\"xMidYMid meet\" xml:space=\"preserve\">\n \n <?php if(!empty($settings['svg_image']['id']) && $settings['svgfilltype'] == 'image'){ ?>\n <defs>\n <pattern id=\"pattern-<?php echo esc_attr($widgetId); ?>\" patternUnits=\"userSpaceOnUse\" patternContentUnits=\"userSpaceOnUse\" width=\"<?php echo ''.$settings['svg_size']['size'].$settings['svg_size']['unit']; ?>\" height=\"<?php echo ''.$realHeight.$settings['svg_size']['unit']; ?>\" x=\"<?php echo ''.$posX.$settings['svgimage_x']['unit']; ?>\" y=\"<?php echo ''.$posY.$settings['svgimage_y']['unit']; ?>\">\n \n <image id=\"img-pattern\" xlink:href=\"<?php echo ''.$image_url; ?>\" width=\"<?php echo ''.$settings['svg_size']['size'].$settings['svg_size']['unit']; ?>\" height=\"<?php echo ''.$realHeight.$settings['svg_size']['unit']; ?>\"> </image>\n </pattern>\n </defs>\n <?php } ?>\n <?php if($settings['svgfilltype'] == 'gradient'){ ?>\n <defs>\n <linearGradient id=\"pattern-<?php echo esc_attr($widgetId); ?>\" x1=\"<?php echo ''.$settings['gradientx1']['size'].$settings['gradientx1']['unit']; ?>\" x2=\"<?php echo ''.$settings['gradientx2']['size'].$settings['gradientx2']['unit']; ?>\" y1=\"<?php echo ''.$settings['gradienty1']['size'].$settings['gradienty1']['unit']; ?>\" y2=\"<?php echo ''.$settings['gradienty2']['size'].$settings['gradienty2']['unit']; ?>\">\n <stop style=\"stop-color: <?php echo ''.$settings['gradientcolor1'];?>\" offset=\"0\"/>\n <stop style=\"stop-color: <?php echo ''.$settings['gradientcolor2'];?>\" offset=\"1\"/>\n </linearGradient>\n </defs>\n <?php } ?>\n\n\n <path id=\"rhblobpath-<?php echo esc_attr($widgetId); ?>\"></path>\n \n <?php if(!empty($settings['svg_image']['id']) || $settings['gradientcolor1'] != ''):?>\n <style>\n #rhblobpath-<?php echo esc_attr($widgetId); ?>{\n fill: url(#pattern-<?php echo ''.$this->get_id(); ?>);\n }\n </style>\n <?php else:?>\n <style>\n #rhblobpath-<?php echo esc_attr($widgetId); ?>{\n fill: <?php echo ''.$settings['fill_color'];?>;\n }\n </style> \n <?php endif;?>\n\n\n </svg>\n </div>\n <?php\n wp_enqueue_script('gsap');\n } \n }", "public function index()\n\t{\n\t\t$this->layout->render();\n\t}", "function hankart_add_product_layouts_area() {\n get_template_part(\"inc/template_parts/single-prod-layouts\");\n}", "public function Render()\n {\n }", "public function generate()\r\n {\r\n $loader = new ContentLoader($this->_viewVariables);\r\n $loader->initContent($this->_contentViewPath);\r\n $this->_layout = $loader->initLayout($this->_layoutPath);\r\n echo $this->_layout;\r\n }", "public function render()\n {\n \n }", "public function ThemeEngineRender(){\n\t\t// Get the path and settings for the Theme\n\t\t$themeName = $this->config['theme']['name'];\n\t\t$themePath = RAND_INSTALL_PATH . \"/themes/{$themeName}\";\n\t\t$themeUrl = $this->request->base_url . \"themes/{$themeName}\"; \n\n\t\t//Add stylesheet\n\t\t$this->data['stylesheet'] = \"{$themeUrl}/style.css\";\n\n\t\t//Include global functions and functions.php from the theme\n\t\t$rd = &$this;\n\t\t$globalFunctions = RAND_INSTALL_PATH . \"themes/functions.php\";\n\t\tif(is_file($globalFunctions)){\n\t\t\tinclude $globalFunctions;\n\t\t}\n\t\t$functionsPath = \"{$themePath}/functions.php\";\n\t\tif(is_file($functionsPath)){\n\t\t\tinclude $functionsPath;\n\t\t}\n\n\t\textract($this->data);\n\t\tinclude(\"{$themePath}/default.tpl.php\");\n\n\n\n\t}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}" ]
[ "0.70597297", "0.6792209", "0.6225219", "0.6036751", "0.5970511", "0.57362556", "0.5713587", "0.5661241", "0.56190664", "0.560725", "0.5585721", "0.5573768", "0.55175126", "0.55162704", "0.55090976", "0.5508628", "0.5500143", "0.54994655", "0.54647815", "0.5457474", "0.54299235", "0.5427745", "0.542383", "0.5418191", "0.5417331", "0.5417331", "0.5417331", "0.5417331", "0.5417331", "0.5417331", "0.5417331", "0.5417331", "0.5417331", "0.5417331", "0.5417331", "0.5417331", "0.5417331", "0.5417331", "0.5417331", "0.5417331", "0.5417331", "0.5417331", "0.54148066", "0.5373817", "0.5369298", "0.53665394", "0.53616464", "0.5359572", "0.5333579", "0.53301954", "0.5326067", "0.53258437", "0.532443", "0.53232896", "0.5318724", "0.530314", "0.5293834", "0.5290187", "0.528619", "0.52764404", "0.52747947", "0.52724546", "0.52714187", "0.52708936", "0.526699", "0.5257433", "0.5253671", "0.5253671", "0.5252349", "0.52521086", "0.52449644", "0.5243241", "0.52425027", "0.5230183", "0.5228032", "0.52214634", "0.522014", "0.521495", "0.520477", "0.520081", "0.5196151", "0.5188825", "0.5182687", "0.5180555", "0.51798826", "0.51782274", "0.5174478", "0.5171936", "0.5170383", "0.51683086", "0.51683086", "0.51683086", "0.51683086", "0.51683086", "0.51683086", "0.51683086", "0.51683086", "0.51683086", "0.51683086", "0.51683086" ]
0.60908324
3
You have a similar example in:
public function implementation_pending() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function helper()\n\t{\n\t\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() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "function __construct() ;", "public function custom()\n\t{\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()\t{}", "private final function __construct() {}", "public function __init(){}", "function __construct() {}", "function __construct() {}", "function __construct() {}", "function __construct() {}", "function __construct() {}", "function __construct() {}", "private function __construct() { \n\t\t\n\n\t}", "private function __construct() {\r\n\t\t\r\n\t}", "protected final function __construct() {}", "final private function __construct() {}", "final private function __construct() {}", "final private function __construct(){\r\r\n\t}", "private function __construct() {\r\n\t\r\n\t}", "private function __construct(){ }", "private function __construct(){ }", "public function __construct() {\n\t\t\n\t}", "public function __construct() {\n\t\t\n\t}", "public function __construct() {\n\t\t\n\t}" ]
[ "0.6026492", "0.5794186", "0.5767129", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.5765738", "0.57628274", "0.57628274", "0.5761125", "0.5735437", "0.57324594", "0.57324594", "0.57324594", "0.57324594", "0.57324594", "0.57324594", "0.57324594", "0.57324594", "0.57324594", "0.57324594", "0.57324594", "0.57324594", "0.57324594", "0.57324594", "0.57324594", "0.57324594", "0.57324594", "0.5725319", "0.56984776", "0.5682273", "0.56250167", "0.56250167", "0.56250167", "0.56250167", "0.56250167", "0.56250167", "0.56196207", "0.5616103", "0.5610868", "0.5610241", "0.5610241", "0.5594076", "0.5593921", "0.55878353", "0.55878353", "0.5584469", "0.5584469", "0.5584469" ]
0.0
-1
/============================================= MOSTRAR HORARIOS Y NIVELES =============================================
public function ctrVerHorasAsistencia($dni,$apeP,$apeM,$nombre,$fechainicio,$fechafin){ $objHoras = new AsistenciasModel(); $resultadoHoras = $objHoras->mdlVerHorasAsistencia($dni,$apeP,$apeM,$nombre,$fechainicio,$fechafin); return $resultadoHoras; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function CsomagHozzaadasa()\r\n {\r\n foreach (Lap::Nevkeszlet() as $nev)\r\n {\r\n foreach (Lap::Szinkeszlet() as $szin)\r\n {\r\n $this->lapok[]=new Lap($szin,$nev);\r\n }\r\n }\r\n }", "public function Monta_Horario() {\n\t\t$Lista = array();\n\t\tforeach($this->getDimensoes() as $Dimensao)\n\t\t\t$Lista[$Dimensao->getDia()][$Dimensao->getHorario()] = $Dimensao->getSala(true)->getNome(true);\n\t\treturn $Lista;\n\t}", "public function nadar()\n {\n }", "public function masodik()\n {\n }", "private function createCreatureLowerTorso()\n {\n\n }", "function ler($nome) {\n $x = 1;\n\t while($x < $this->bd[0][0] && !$this->str_igual($nome, $this->bd[$x][2])) {$x++;}\n if($x >= $this->bd[0][0]) {return 0;}\n //comecando a setar tudo\n $this->id = $this->bd[$x][0];\n $this->maximo = $this->bd[$x][1];\n $this->nome = $this->bd[$x][2];\n $this->categoria = $this->bd[$x][3];\n $this->tipo = $this->bd[$x][4];\n $this->atributo = $this->bd[$x][5];\n $this->specie = $this->bd[$x][6];\n $this->lv = $this->bd[$x][7];\n $this->atk = $this->bd[$x][8];\n $this->def = $this->bd[$x][9];\n $this->preco = $this->bd[$x][10];\n $this->descricao = $this->bd[$x][11];\n $this->img = '../imgs/cards/'.$this->id.'.png';\nreturn 1;\n }", "public function getMilage()\n {\n }", "function matricularVehiculo(){\r\n $matricula _aleatoria = rand();\r\n\r\n $encontrado = false;\r\n for ($i=0; $i< count ($this->vehiculos) && ($encontrado==false); $i++) {\r\n if ($this->vehiculos[$i] != null) {\r\n if($this->vehiculos[$i]->getMatricula() =='') {}\r\n $this->vehiculos[$i]->getMatricula($matricula_aleatoria);\r\n $encontrado = true;\r\n $pos = $i;\r\n }\r\n }\r\n }", "function verMas()\t\r\n\t\t{\r\n\t\t\t\r\n\t\t\tglobal $use;\r\n\t\t\tglobal $priv;\r\n\r\n\t\t\t//NOTA: Para ver si funciona tienen que asociarle un adherente en la tabla socios, ya que en los datos de ejemplo todos son titulares\r\n\t\t\t//NOTA: Lo que hice fue: en tabla socios en numero_soc=00044 cambiar el campo soc_titula de manera que quede soc_titula=00277\r\n\t\t\t\r\n\t\t\t//---------------CONSULTA QUE DEVUELVE TODA LA INFO DEL ASOCIADO TITULAR----------------\r\n\t\t\t\r\n\t\t\t$numero_socio = $_GET['num_soc']; //Es el número del socio titular que debe ser tomado del PASO 1\r\n\t\t\t\r\n\r\n\t\t\t\t$resultadoTitular = $GLOBALS['db']->select(\"SELECT socios.id_persona,socios.numero_soc,socios.beneficio,socios.fec_alt,socios.fec_baja,socios.lugar_pago,socios.soc_titula\r\n\t\t\t\t,persona.id_persona,persona.nombre,persona.numdoc,persona.cuil,persona.sexo,persona.fecnacim,persona.domicilio,persona.casa_nro,persona.barrio,persona.localidad,persona.codpostal\r\n\t\t\t\t,persona.dpmto,persona.tel_fijo,persona.tel_cel,persona.fec_alta AS fec_alta2,persona.fec_baja AS fec_baja2,persona.cbu,persona.banco,persona.usualta\r\n\t\t\t\t\t\t\t\t\t FROM socios,persona \r\n\t\t\t\t\t\t\t\t\t WHERE socios.soc_titula = '$numero_socio' \r\n\t\t\t\t\t\t\t\t\t AND socios.id_persona = persona.id_persona\r\n AND socios.numero_soc= socios.soc_titula\");\r\n\t\t\t\t\t\t\t\t\t \r\n\r\n\t\t\tif(!$resultadoTitular)\r\n\t\t\t{\r\n\t\t\t\t$error=[\r\n\t\t\t\t'menu'\t\t\t=>\"Atenciones\",\r\n\t\t\t\t'funcion'\t\t=>\"verMas\",\r\n\t\t\t\t'descripcion'\t=>\"No se encuentra al titular $numero_socio\"\r\n\t\t\t\t];\r\n\t\t\t\techo $GLOBALS['twig']->render('/Atenciones/error.html', compact('error','use','priv'));\t\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t///---FUNCIÓN PARA CALCULAR EDAD----\r\n\t\t\t\r\n\t\t\t$fecha=$resultadoTitular[0]['fecnacim'];\r\n\t\t\t$dias = explode(\"-\", $fecha, 3);\r\n\t\t\t\r\n\t\t\t// $dias[0] es el año\r\n\t\t\t// $dias[1] es el mes\r\n\t\t\t// $dias[2] es el dia\r\n\t\t\t\r\n\t\t\t// mktime toma los datos en el orden (0,0,0, mes, dia, año) \r\n\t\t\t$dias = mktime(0,0,0,$dias[1],$dias[2],$dias[0]);\r\n\t\t\t$edad = (int)((time()-$dias)/31556926 );\r\n\t\t\t$resultadoTitular[0]['edad']=$edad;\r\n\t\t\t\r\n\t\t\t///---FIN FUNCIÓN PARA CALCULAR EDAD----\r\n\t\t\t\r\n\t\t\t$estado[0]='1';\r\n\t\t\t$estado[1]='1';\r\n\t\t\t$estado[2]='1';\r\n\t\t\t$estado[3]='1';\r\n\t\t\t$estado[4]='1';\r\n\t\t\t\r\n\t\t\t//---------------CONSULTA QUE DEVUELVE TODA LA INFO DE LOS SERVICIOS DEL ASOCIADO TITULAR----------------\r\n\t\t\t\r\n\t\t\t//Por cuota\r\n\t\t\t$resultadoTitularServicios1 = $GLOBALS['db']->select(\"SELECT socios.id_persona,socios.numero_soc,socios.beneficio,socios.fec_alt,socios.fec_baja,socios.lugar_pago,socios.soc_titula\r\n\t\t\t\t,persona.id_persona,persona.nombre,persona.numdoc,persona.cuil,persona.sexo,persona.fecnacim,persona.domicilio,persona.casa_nro,persona.barrio,persona.localidad,persona.codpostal\r\n\t\t\t\t,persona.dpmto,persona.tel_fijo,persona.tel_cel,persona.fec_alta AS fec_alta2,persona.fec_baja AS fec_baja2,persona.cbu,persona.banco,persona.usualta\r\n\t\t\t\t,fme_adhsrv.codigo,fme_adhsrv.parentesco,fme_adhsrv.periodoini,fme_adhsrv.periodofin,fme_adhsrv.motivobaja,fme_adhsrv.documento\r\n\t\t\t\t,tar_srv.nombre AS nombreplan,tar_srv.idmutual \r\n\t\t\t\t\t\t\t\t\t FROM socios,persona,fme_adhsrv,tar_srv \r\n\t\t\t\t\t\t\t\t\t WHERE socios.soc_titula = '$numero_socio' \r\n\t\t\t\t\t\t\t\t\t AND socios.id_persona = persona.id_persona\r\n AND socios.numero_soc= socios.soc_titula\r\n\t\t\t\t\t\t\t\t\t AND fme_adhsrv.socnumero = socios.soc_titula\r\n\t\t\t\t\t\t\t\t\t AND fme_adhsrv.codigo = tar_srv.idmutual\");\r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\tif(!$resultadoTitularServicios1)\r\n\t\t\t\t$estado[0]='0';\r\n\t\t\t\r\n\t\t\t//Por tarjeta\r\n\t\t\t$resultadoTitularServicios2 = $GLOBALS['db']->select(\"SELECT socios.id_persona,socios.numero_soc,socios.beneficio,socios.fec_alt,socios.fec_baja,socios.lugar_pago,socios.soc_titula\r\n\t\t\t\t,persona.id_persona,persona.nombre,persona.numdoc,persona.cuil,persona.sexo,persona.fecnacim,persona.domicilio,persona.casa_nro,persona.barrio,persona.localidad,persona.codpostal\r\n\t\t\t\t,persona.dpmto,persona.tel_fijo,persona.tel_cel,persona.fec_alta AS fec_alta2,persona.fec_baja AS fec_baja2,persona.cbu,persona.banco,persona.usualta\r\n\t\t\t\t,tar_srv.nombre AS nombreplan,tar_srv.codigo AS codigotarsrv, tar_srvadherentes.codigo, tar_srvadherentes.parentesco \r\n\t\t\t\t\t\t\t\t\t FROM socios,persona,tar_srv, tar_srvadherentes \r\n\t\t\t\t\t\t\t\t\t WHERE socios.soc_titula = '$numero_socio' \r\n\t\t\t\t\t\t\t\t\t AND socios.id_persona = persona.id_persona\r\n AND socios.numero_soc= socios.soc_titula\r\n\t\t\t\t\t\t\t\t\t AND tar_srvadherentes.socnumero = socios.soc_titula \r\n\t\t\t\t\t\t\t\t\t AND tar_srvadherentes.codigo = tar_srv.codigo\");\r\n\t\t\t\r\n\t\t\tif(!$resultadoTitularServicios2)\r\n\t\t\t\t$estado[1]='0';\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//---------------CONSULTA QUE DEVUELVE TODA LA INFO DE LOS ADHERENTES DEL ASOCIADO TITULAR CON APORTES POR CUOTA----------------\r\n\t\t\t\r\n\r\n\t\t $resultadoAdherentes1 = $GLOBALS['db']->select(\"SELECT socios.id_persona,socios.numero_soc,socios.beneficio,socios.fec_alt,socios.fec_baja,socios.lugar_pago,socios.soc_titula\r\n\t\t\t\t,persona.id_persona,persona.nombre,persona.numdoc,persona.cuil,persona.sexo,persona.fecnacim,persona.domicilio,persona.casa_nro,persona.barrio,persona.localidad,persona.codpostal\r\n\t\t\t\t,persona.dpmto,persona.tel_fijo,persona.tel_cel,persona.fec_alta AS fec_alta2,persona.fec_baja AS fec_baja2,persona.cbu,persona.banco,persona.usualta\r\n\t\t\t\t,fme_adhsrv.codigo,fme_adhsrv.parentesco,fme_adhsrv.periodoini,fme_adhsrv.periodofin,fme_adhsrv.motivobaja,fme_adhsrv.documento\r\n\t\t\t\t,tar_srv.nombre AS nombreplan,tar_srv.idmutual \r\n\t\t\t\t\t\t\t\t\t FROM socios,persona,fme_adhsrv,tar_srv \r\n\t\t\t\t\t\t\t\t\t WHERE socios.soc_titula = '$numero_socio'\r\n\t\t\t\t\t\t\t\t\t AND socios.numero_soc != socios.soc_titula\r\n\t\t\t\t\t\t\t\t\t AND socios.id_persona = persona.id_persona\r\n\t\t\t\t\t\t\t\t\t AND fme_adhsrv.socnumero = socios.numero_soc \r\n\t\t\t\t\t\t\t\t\t AND fme_adhsrv.codigo = tar_srv.idmutual\");\r\n\t\t\t\r\n\t\t\tif(!$resultadoAdherentes1)\r\n\t\t\t\t$estado[2]='0';\r\n\t\t\t\r\n\t\t\t//---------------CONSULTA QUE DEVUELVE TODA LA INFO DE LOS ADHERENTES DEL ASOCIADO TITULAR CON APORTES POR TARJETA----------------\r\n\r\n\t\t\t$resultadoAdherentes2 = $GLOBALS['db']->select(\"SELECT socios.id_persona,socios.numero_soc,socios.beneficio,socios.fec_alt,socios.fec_baja,socios.lugar_pago,socios.soc_titula\r\n\t\t\t\t,persona.id_persona,persona.nombre,persona.numdoc,persona.cuil,persona.sexo,persona.fecnacim,persona.domicilio,persona.casa_nro,persona.barrio,persona.localidad,persona.codpostal\r\n\t\t\t\t,persona.dpmto,persona.tel_fijo,persona.tel_cel,persona.fec_alta AS fec_alta2,persona.fec_baja AS fec_baja2,persona.cbu,persona.banco,persona.usualta\r\n\t\t\t\t,tar_srv.nombre AS nombreplan,tar_srv.codigo AS codigotarsrv, tar_srvadherentes.codigo, tar_srvadherentes.parentesco \r\n\t\t\t\t\t\t\t\t\t FROM socios,persona,tar_srv, tar_srvadherentes \r\n\t\t\t\t\t\t\t\t\t WHERE socios.soc_titula = '$numero_socio'\r\n\t\t\t\t\t\t\t\t\t AND socios.numero_soc != socios.soc_titula\r\n\t\t\t\t\t\t\t\t\t AND socios.id_persona = persona.id_persona\r\n\t\t\t\t\t\t\t\t\t AND tar_srvadherentes.socnumero = socios.numero_soc \r\n\t\t\t\t\t\t\t\t\t AND tar_srvadherentes.codigo = tar_srv.codigo\");\t\r\n\r\n\t\t\t\r\n\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\r\n\t\t\tif(!$resultadoAdherentes2)\r\n\t\t\t\t$estado[3]='0';\r\n\t\t\r\n\t\t \r\n\t\t\t//---------------CONSULTA QUE DEVUELVE EL LISTADO DE TODAS LAS ASISTENCIAS----------------\r\n\t\t\t\r\n\t\t\t//NOTA: Para que puedan ver si funciona o no hacer la prueba con el siguiente ejemplo:\r\n\t\t\t// En la tabla fme_asistencia modifiquen en cualquier lado y pongan alguno con doctitu = 06948018 (o busquen cualquier DNI de un socio titular y usen ese)\r\n\t\t\t// Cuando prueben el sistema vayan al ver más de Barrionuevo Samuel y van a ver el listado de atenciones que tiene asociado\r\n\t\t\t\r\n\t\t\t$asistencias = $GLOBALS['db']->select(\"SELECT fme_asistencia.doctitu, fme_asistencia.numdoc, fme_asistencia.nombre,\r\n\t\t\t\t\t\t\t\t\t fme_asistencia.fec_pedido, fme_asistencia.hora_pedido, fme_asistencia.dessit, fme_asistencia.fec_ate,\r\n\t\t\t\t\t\t\t\t\t fme_asistencia.sintomas, fme_asistencia.diagnostico, fme_asistencia.tratamiento, fme_asistencia.hora_aten,\r\n\t\t\t\t\t\t\t\t\t fme_asistencia.profesional\r\n\t\t\t\t\t\t\t\t\t FROM fme_asistencia, socios, persona \r\n\t\t\t\t\t\t\t\t\t WHERE soc_titula = '$numero_socio' \r\n\t\t\t\t\t\t\t\t\t AND socios.id_persona = persona.id_persona\r\n\t\t\t\t\t\t\t\t\t AND numero_soc = soc_titula\r\n\t\t\t\t\t\t\t\t\t AND persona.numdoc = fme_asistencia.doctitu\");\r\n\t\t\t\r\n\t\t\tif(!$asistencias)\r\n\t\t\t\t$estado[4]='0';\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\r\n\t\t\techo $GLOBALS['twig']->render('/Atenciones/perfil.html', compact('resultadoTitular', \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'resultadoTitularServicios1', \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'resultadoTitularServicios2', \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'resultadoAdherentes1',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'resultadoAdherentes2',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'asistencias',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'estado','use','priv'));\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}", "protected function ponerNombre(){\r\n\t\t$time=$this->time;\r\n\t\t\tif ($this->nombreUnicoImagen=='default') {\r\n\t\t\t\tfor ($i=0; $i <$this->cantidad ; $i++) { \r\n\t\t\t\t$this->nombreImagenes[$i]=$time.'-to_'.($i+1).'_and_'.$this->cantidad;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tfor ($i=0; $i <$this->cantidad ; $i++) { \r\n\t\t\t\t\t$this->nombreImagenes[$i]=$this->nombreUnicoImagen.'-'.$time.'-to_'.($i+1).'_and_'.$this->cantidad;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t}", "public function run()\n {\n $nomes_jogos =['Diablo 3', 'Dishonored', 'Far Cry 3', 'Mortal Kombat', 'Resident Evil 6', 'Skyrim', 'Tomb Raider'];\n\n $desenvolvedor=['Blizzard', 'Arkane Studios', 'Ubisoft Montreal', 'Netherrealm Studios e ANDYN', 'Capcom', 'Bethesda Game Studios', 'Core Design e Crystal Dynamics'];\n\n $plataformas=['PC', 'PC, Xbox 360 e Playstation 3', 'PC, Xbox 360 e Playstation 3', 'Xbox 360, PlayStation 3, PlayStation Vita ,Microsoft Windows', 'PlayStation 3, Xbox 360, Microsoft Windows', 'PC, Xbox 360 e Playstation 3', 'PlayStation 3, Xbox 360, Microsoft Windows'];\n\n $lancamento=['15 de maio de 2012', '12 de outubro de 2012', '30 de novembro de 2012', '28 de Abril de 2011', '2 de outubro de 2012', '11 de novembro de 2011', ' Lançamento do primeiro Tomb Raider foi em 1996'];\n\n $genero=['RPG', 'Stealth, ação-aventura, tiro em primeira pessoa', 'Tiro em primeira pessoa, \"mundo aberto\"', 'Luta', 'Horror dramático, survival horror, tiro na terceira pessoa', 'RPG', 'Terror Ação, Aventura, tiro na terceira pessoa'];\n\n $modo_de_jogo=['Single player/Multiplayer', 'Single player', 'Single player/Multiplayer', 'Single player/Multiplayer', 'Single player/Multiplayer', 'Single player', 'Single player'];\n\n $classificacao=['+16', '+18', '+18', '+18', '+18', '+18', '+18'];\n\n $descricao=[\n \t'Diablo III segue a história de seu predecessor, Diablo II: Lord of Destruction, que superou expectativas. A história do novo jogo passa-se depois de vinte anos dos acontecimentos que marcaram o fim de Diablo II. Os demônios Diablo, Mephisto e Baal foram derrotados, mas quando um cometa cai na Terra exatamente no lugar onde Diablo foi confinado, os guerreiros são novamente convocados para defender a humanidade contra as chamas do Inferno. O estilo do jogo continua o mesmo, mas desta vez utilizando os recursos das novas tecnologias reproduzindo um mundo totalmente em 3D e interativo, podendo até destruir cenários. Os jogadores poderão escolher entre cinco classes disponíveis e se aventurar num mundo mágico e ameaçador que Diablo III proporciona, porém desta vez, com novas habilidades e equipamentos e com um nível de personalização de personagem mais apurado.',\n \t 'És o antigo guarda-costas de confiança da Imperatriz. Injustamente culpado pelo seu assassinato, e movido pela vingança, terás de te tornar um infame assassino, conhecido apenas pela perturbadora máscara que se tornou o teu cartão-de-visita. À medida que vagueias por um mundo destroçado pela peste e oprimido por um governo armado com estranhas tecnologias, a verdade por detrás da tua traição é tão obscura como as águas que rodeiam a cidade. As tuas escolhas determinarão o destino do mundo, mas, o que quer que aconteça, a tua antiga vida desapareceu para sempre.',\n \t '\"Para além dos limites da civilização encontra-se uma ilha, um lugar sem lei governado por pirataria e miséria humana, onde os escapes são apenas as drogas ou o cano de uma arma. Este é o lugar onde você se encontra, preso num lugar que esqueceu o certo do errado, um lugar que vive pelos princípios da violência. Descubra os segredos sangrentos da ilha e leva a luta ao inimigo; improvise e use o ambiente para sobreviver. Cuidado com a beleza e o mistério deste paraíso inexplorado e vive para superar os seus personagens cruéis e desesperados. Irá precisar de mais do que sorte para sobreviver\". ',\n \t 'O jogo retorna as suas raízes, com lutas com movimentação completamente 2D, mas gráficos em 3D, onde não há mais possibilidade de se esquivar dos golpes andando para os lados e é o jogo mais rápido da série. Ao invés do clássico controle com Soco e Chute, Alto e Baixo, terá um botão pra cada membro sendo Braço e Perna, Esquerda e Direita.\n\n\t\t\t\tO jogo conta com vários modos de jogo. O principal é o Kombate, onde permite lutas um contra um ou em duplas, permitindo até 4 jogadores lutarem na mesma partida. Outro modo de jogo é a Torre dos Desafios, que consiste em uma grande torre dividida em 300 partes, onde cada parte contém um desafio a ser completado com um personagem especifico. Alguns dos desafios que compões a torre são os Minigames Teste sua Força, em que o jogador deve apertar freneticamente os botões do controle com o objetivo de acumular força para quebrar certos objetos; o Teste seu Golpe, onde o jogador deve acumular uma quantidade muito precisa de força para quebrar somente o objeto que está em uma pilha; o Teste sua Sorte, onde uma roleta sorteia várias condições especiais para a luta; e o Teste sua Percepção, onde um objeto é escondido em um dos vários copos/crânios e são embaralhados e cabe ao jogador descobrir onde estão.\n\n\t\t\t\tDurante as lutas foram adicionados vários novos sistemas e alguns reformulados, como os combos, onde pode-se ligar quase todos os golpes tendo poucos golpes que não tem ligação ou combos já programados e alguns personagens podem usar armas durante eles. Além disso os combos podem ser ligados com o parceiro no modo Tag-Team, assim criando sequencias únicas com dois personagens. Ao jogo também foi adicionada uma barra, que é usada para fazer movimentos especiais. Ela dividida em 3 níveis que podem respectivamente tornar os golpes especiais mais fortes, revidar um golpe e o Movimento de Raio-X, um combo mostrando os danos causados pelos golpes diretamente nos ossos e órgãos dos adversários, podendo retirar até 50% da vida do oponente dependendo do personagem. E por fim também há os Golpes Finais, um movimento em que se faz uma sequência de botões para finalizar o oponente de uma forma violenta, além dos movimentos finais de cada personagem, há o Fatality de Arena ou Stage Fatality, agora inovado, ao invés de simplesmente desferir um uppercut no oponente, o jogador executa um movimento que o leva a uma morte consequente (Ex: Na floresta viva, ao invés de dar um gancho no oponente, o personagem o agarra pelo ombro e o braço e o arremessa na boca de uma árvore que mastiga até que as pernas quebrem e se desprendam do corpo). Há também a inclusão do famoso Babality, em que o oponente volta a ser um bebê chorão. (Ex: Reptile, quando é pego por um, torna-se um ovo de réptil e eclode, tornando-se um \"bebê-réptil\", começando a chorar e cuspir ácido).',\n \t\t\t\t'Resident Evil 6 (バイオハザード 6, título japonês: Biohazard 6), é um jogo de vídeo do género horror dramático/de sobrevivência jogado na terceira pessoa desenvolvido e publicado pela Capcom. Foi apresentado durante uma campanha de divulgação viral na página NoHopeLeft.com. Apesar do nome é o nono jogo da série principal Resident Evil e foi lançado em 2 de outubro de 2012 para PlayStation 3 e Xbox 360. A versão para Microsoft Windows foi lançada no dia 22 de março de 2013.\n\n\t\t\t\tA história é contada a partir das perspectivas de Chris Redfield, membro e fundador da BSAA traumatizado por ter falhado uma missão; Leon S. Kennedy, um sobrevivente de Raccoon City e agente especial do governo; Jake Muller, filho ilegítimo de Albert Wesker e associado de Sherry Birkin; e Ada Wong, uma agente solitária com ligações aos ataques bio-terroristas pela Neo-Umbrella.\n\n\t\t\t\tO conceito do jogo começou em 2009, mas começou a ser produzido no ano seguinte sobre a supervisão de Hiroyuki Kobayashi, que já tinha produzido Resident Evil 4. A equipa de produção acabou por crescer e tornou-se na maior de sempre a trabalhar num jogo da série Resident Evil.\n\n\t\t\t\tResident Evil 6 recebeu reacções negativas aquando do lançamento da demo devido aos problemas nos controlos e criticas muito diversas devido à mudança drástica da jogabilidade encontrada na versão final do jogo, sendo um ponto de elogio e também de critica nas diferentes análises.\n\n\t\t\t\tApesar de não ter sido bem recebido tanto pela imprensa especializada como pelos jogadores, a Capcom editou mais de 4,5 milhões de cópias e Resident Evil 6 tornou-se o jogo da série que mais vendeu inicialmente.',\n\n\t\t\t\t'Os acontecimentos deste jogo passam-se duzentos anos depois da, já quase esquecida, crise de Oblivion, no ano 201 da quarta era (4E 201) na província de Skyrim, no norte de Tamriel, e 30 anos após a mais recente Grande Guerra, onde Thalmors e Humanos lutaram arduamente, mas que quase extinguiu os humanos de Tamriel, e para evitar tal derrota, acordaram com os Thalmors, rendendo duas forças e sujeitando-se as suas exigências.\n\t\t\t\tSkyrim é a terra natal de um povo bravo chamados de Nords (nórdicos), onde além da Grande Guerra, irrompeu uma guerra civil após o assassinato do Alto Rei de Skyrim, Torygg. E diante de todas estas guerras e problemas, a província se encontra dividida: de um lado se quer a separação do Império que agora está em ruínas, e do outro lado se quer permanecer leal.', \n\t\t\t\t'Tomb Raider é uma série de jogos, histórias em quadrinhos e filmes tendo como protagonista a personagem Lara Croft. Desde o lançamento do primeiro Tomb Raider, em 1996, as séries tiveram um grande lucro e Lara transformou-se num dos principal ícone da indústria de video-jogos/vídeo games. O Guiness Book reconheceu Lara Croft como \"a heroína de video-jogo/vídeo game mais bem sucedida\" em 2006.\n\n\t\t\t\tSeis jogos da série foram desenvolvidos pela Core Design, e os três últimos pela Crystal Dynamics. Todos os jogos foram publicados pela Eidos Interactive, que mantém os direitos dos personagens e a marca registrada de Tomb Raider. Para o cinema, Lara Croft: Tomb Raider e Lara Croft Tomb Raider: The Cradle of Life foram produzidos, estrelando a atriz americana Angelina Jolie como Lara Croft. Todos os jogos Tomb Raider venderam mais de 30 milhões de unidades, fazendo uma das séries de video jogos mais vendidas de todos os tempos.'];\n\n\t\t\t\tfor ($i=0; $i < count($nomes_jogos); $i++) { \n\n\t\t\t\t\t$dados = [\n\t\t\t\t\t\t'nome_jogo' => $nomes_jogos[$i],\n\t\t\t\t\t\t'desenvolvedor' => $desenvolvedor[$i],\n\t\t\t\t\t\t'plataformas' => $plataformas[$i],\n\t\t\t\t\t\t'lancamento' => $lancamento[$i],\n\t\t\t\t\t\t'genero' => $genero[$i],\n\t\t\t\t\t\t'modo_de_jogo' => $modo_de_jogo[$i],\n\t\t\t\t\t\t'classificacao' => $classificacao[$i],\n\t\t\t\t\t\t'descricao' => $descricao[$i]\n\t\t\t\t\t];\n\n\t\t\t\t\tDB::table('ficha_tecnica')->insert($dados);\n\n\t\t\t\t}\n\n }", "function crear_horarios (){\n $hora=8;\n $indice=0;\n $prefijo=\"\";\n $horarios=array();\n while($hora <= 22){\n \n $prefijo=($hora <= 9) ? \"0\".$hora : $hora ;\n \n $horarios[$indice]=array(\n 0 => \"$prefijo:00:00\",\n 1 => TRUE\n );\n $indice += 1;\n //replica, para obtener los horarios disponibles\n $horarios[$indice]=array(\n 0 => \"$prefijo:00:00\",\n 1 => TRUE\n );\n $indice += 1;\n $horarios[$indice]=array(\n 0 => \"$prefijo:15:00\",\n 1 => TRUE\n );\n $indice += 1;\n $horarios[$indice]=array(\n 0 => \"$prefijo:30:00\",\n 1 => TRUE\n );\n $indice += 1;\n //replica, para obtener los horarios disponibles\n $horarios[$indice]=array(\n 0 => \"$prefijo:30:00\",\n 1 => TRUE\n );\n $indice += 1;\n $horarios[$indice]=array(\n 0 => \"$prefijo:45:00\",\n 1 => TRUE\n );\n \n $indice += 1;\n $hora += 1;\n \n }\n \n return $horarios;\n }", "function grafico_1_3( $desde, $hasta, $ua ){\n\t// aclarar al cliente que debe setear campos bien definidos y NO PERMITIR AMBIGUEDADES\n\t\n\t$query = \"select actor.nombre, actor.apellido, actor.id_partido, actor.id_campo, count(noticiasactor.id_actor) as cantidad from noticiascliente \"\n\t\t. \"inner join noticiasactor on noticiascliente.id_noticia = noticiasactor.id_noticia \"\n\t\t. \"inner join noticias on noticiasactor.id_noticia = noticias.id \"\n\t\t. \"inner join actor on noticiasactor.id_actor = actor.id \"\n\t\t. \"where \"\n\t\t\t. \"noticiascliente.id_cliente = \" . $ua . \" and \"\n\t\t\t. \"noticiascliente.elim = 0 and \"\n\t\t\t. \"noticias.fecha between '\" . $desde . \" 00:00:01' and '\" . $hasta . \" 23:59:59' \"\n\t\t\t// SOLO QUIENES TIENEN 3 Y 4 COMO CAMPO\n\t\t\t// . \" and ( actor.id_campo like '%3%' or actor.id_campo like '%4%' ) \"\n\t\t. \"group by noticiasactor.id_actor order by cantidad desc\";\n\t//echo $query;\n\t$main = R::getAll($query);\n\t$ua_nombre = R::findOne(\"cliente\",\"id LIKE ?\",[$ua])['nombre'];\n\n\t//var_dump($main);\n\t$tabla = [];\n\t// unidad de analisis, actor, partido, cantidad de menciones\n\t$i = -1;\n\t$partidos = [];\n\t\n\t$children_partidos = [];\n\t$i_actor = 0;\n\tforeach($main as $k=>$v){\n\t\t// obtengo el/los partidos\n\t\t$partidos_array = json_decode( $v['id_partido'], true);\n\t\tif( ! is_array($partidos_array) ) continue;\n\t\t\n\t\tforeach($partidos_array as $p){\n\t\t\t$partido_nombre = R::findOne('attr_partido','id LIKE ?',[$p])['nombre'];\n\t\t\t$tabla[ ++$i ] = [\n\t\t\t\t'ua' => $ua_nombre,\n\t\t\t\t'actor' => $v['nombre'] . ' ' . $v['apellido'],\n\t\t\t\t'partido' => $partido_nombre,\n\t\t\t\t'cantidad' => $v['cantidad']\n\t\t\t\t];\n\t\t\t\t// agrego el partido y el grafico\n\t\t\t\tif(! in_array($partido_nombre,$partidos)){\n\t\t\t\t\t$partidos[] = $partido_nombre;\n\t\t\t\t\t$x = new StdClass(); // objeto vacio\n\t\t\t\t\t$x->name = $partido_nombre;\n\t\t\t\t\t$x->rank = 0;\n\t\t\t\t\t$x->weight = count($partidos); //'Yellow'; cargar desde JS\n\t\t\t\t\t$x->id = 1;\n\t\t\t\t\t$x->children = [];\n\t\t\t\t\t$children_partidos[] = $x;\n\t\t\t\t}\n\t\t\t\t// obtengo el indice del partido y lo inserto\n\t\t\t\t$index = array_search($partido_nombre,$partidos);\n\t\t\t\t$t = new StdClass(); // objeto vacio\n\t\t\t\t$t->name = $v['nombre'] . ' ' . $v['apellido'] . \" (\" . $v['cantidad'] . \")\";\n\t\t\t\t$t->rank = $v['cantidad'];\n\t\t\t\t$t->weight = $i_actor; //'Yellow'; cargar desde JS\n\t\t\t\t$t->id = 1;\n\t\t\t\t$t->children = [];\n\t\t\t\t// lo agrego al padre correspondiente\n\t\t\t\t$children_partidos[ $index ]->children[] = $t;\n\t\t\t\t$children_partidos[ $index ]->rank += 1;\n\t\t\t}\n\t\t\t++$i_actor;\n\t}\n\t// grafico\n\t/*$oficialismo = new StdClass(); // objeto vacio\n\t$oficialismo->name = 'Oficialismo';\n\t$oficialismo->rank = 0;\n\t$oficialismo->weight = 'Yellow';\n\t$oficialismo->id = 1;\n\t$oficialismo->children = [];*/\n\t\n\t// creo los objetos partidos\n\t\n\t/*foreach($partidos as $p){\n\t\t$x = new StdClass(); // objeto vacio\n\t\t$x->name = $p;\n\t\t$x->rank = 0;\n\t\t$x->weight = 0; //'Yellow'; cargar desde JS\n\t\t$x->id = 1;\n\t\t$x->children = [];\n\t}*/\n\t\n\t$objeto = new StdClass(); // objeto vacio\n\t$objeto->name = 'Partidos';\n\t$objeto->rank = 0;\n\t$objeto->weight = 'Gray';\n\t$objeto->id = 1;\n\t$objeto->children = $children_partidos;\n\t\n\t\n\t/*foreach($tabla as $v){\n\t\t$sub = new StdClass(); // objeto vacio\n\t\t$sub->name = $v['actor'] . ' (' . $v['cantidad'] . ')';\n\t\t$sub->rank = $v['cantidad'];\n\t\t// $sub->weight = 0;\n\t\t$sub->cantidad = $v['cantidad'];\n\t\t$sub->id = 1;\n\t\t$sub->children = [ ];\n\t\tif($v['campo'] == 'oposicion'){\n\t\t\t$i_op += 1;\n\t\t\t$sub->weight = 'Blue';\n\t\t\t$oposicion->children[] = $sub;\n\t\t}\n\t\telse{ \n\t\t\t$i_of += 1;\n\t\t\t$sub->weight = 'White';\n\t\t\t$oficialismo->children[] = $sub;\n\t\t}\n\t}*/\n\t\n\t\n\treturn [\n\t\t'tabla' => $tabla,\n\t\t'grafico' => $objeto\n\t\t// ,'temas' => $temas\n\t\t];\n}", "function noidungtt($sotu,$noidung)\n{\n\n\t$n=explode(\" \",$noidung);\n\t$noidunginra=\" \";\n\tif($sotu<=count($n)){\n for($i=0;$i<$sotu;$i++)\n\t\t $noidunginra = $noidunginra.$n[$i].\" \";\n $noidunginra .=\"...\";\n }\n\telse\n\t\techo \"<h1>cảnh báo : số từ tóm lược nhiều hơn nội dung ban đầu</h1>\"; \n\treturn $noidunginra;\n}", "public function moverse(){\n\t\techo \"Soy $this->nombre y me estoy moviendo a \" . $this->getVelocidad();\n\t}", "public function nosotros() {\n\t\t$this->set('title_for_layout', __('Nosotros - You & I | Organizamos y coordinamos tus eventos') );\n\t}", "public function calcula13o()\n {\n }", "public function calcula13o()\n {\n }", "function grafico_1_2( $desde, $hasta, $ua ){\n\t// aclarar al cliente que debe setear campos bien definidos y NO PERMITIR AMBIGUEDADES\n\t\n\t$query = \"select actor.nombre, actor.apellido, actor.id_campo, count(noticiasactor.id_actor) as cantidad from noticiascliente \"\n\t\t. \"inner join noticiasactor on noticiascliente.id_noticia = noticiasactor.id_noticia \"\n\t\t. \"inner join noticias on noticiasactor.id_noticia = noticias.id \"\n\t\t. \"inner join actor on noticiasactor.id_actor = actor.id \"\n\t\t. \"where \"\n\t\t\t. \"noticiascliente.id_cliente = \" . $ua . \" and \"\n\t\t\t. \"noticiascliente.elim = 0 and \"\n\t\t\t. \"noticias.fecha between '\" . $desde . \" 00:00:01' and '\" . $hasta . \" 23:59:59' \"\n\t\t\t// SOLO QUIENES TIENEN 3 Y 4 COMO CAMPO\n\t\t\t. \" and ( actor.id_campo like '%3%' or actor.id_campo like '%4%' ) \"\n\t\t. \"group by noticiasactor.id_actor order by cantidad desc\";\n\t$main = R::getAll($query);\n\t$ua_nombre = R::findOne(\"cliente\",\"id LIKE ?\",[$ua])['nombre'];\n\n\t// var_dump($main);\n\t$tabla = [];\n\t// unidad de analisis, campo, actor, cantidad de menciones\n\t$i = -1;\n\tforeach($main as $k=>$v){\n\t\t// por ahora solo considero los dos posibles campos\n\t\t$tabla[ ++$i ] = [\n\t\t\t'ua' => $ua_nombre,\n\t\t\t'campo' => ( strpos( $v['id_campo'], '3' ) !== false ) ? 'oposicion' : 'oficialismo',\n\t\t\t'actor' => $v['apellido'] . ' ' . $v['nombre'],\n\t\t\t'cantidad' => $v['cantidad']\n\t\t\t];\n\t}\n\t// var_dump($tabla);\n\t\n\t// grafico\n\t$oficialismo = new StdClass(); // objeto vacio\n\t$oficialismo->name = 'Oficialismo';\n\t$oficialismo->rank = 0;\n\t$oficialismo->weight = 'Yellow';\n\t$oficialismo->id = 1;\n\t$oficialismo->children = [];\n\t\n\t$oposicion = new StdClass(); // objeto vacio\n\t$oposicion->name = 'Oposicion';\n\t$oposicion->rank = 0;\n\t$oposicion->weight = 'LightBlue';\n\t$oposicion->id = 1;\n\t$oposicion->children = [];\n\t\n\t$objeto = new StdClass(); // objeto vacio\n\t$objeto->name = 'Campos';\n\t$objeto->rank = 0;\n\t$objeto->weight = 'Gray';\n\t$objeto->id = 1;\n\t$objeto->children = [ $oficialismo, $oposicion ];\n\t\n\t$i_of = 0;\n\t$i_op = 0;\n\t\n\tforeach($tabla as $v){\n\t\t$sub = new StdClass(); // objeto vacio\n\t\t$sub->name = $v['actor'] . ' (' . $v['cantidad'] . ')';\n\t\t$sub->rank = $v['cantidad'];\n\t\t// $sub->weight = 0;\n\t\t$sub->cantidad = $v['cantidad'];\n\t\t$sub->id = 1;\n\t\t$sub->children = [ ];\n\t\tif($v['campo'] == 'oposicion'){\n\t\t\t$i_op += 1;\n\t\t\t$sub->weight = 'Blue';\n\t\t\t$oposicion->children[] = $sub;\n\t\t}\n\t\telse{ \n\t\t\t$i_of += 1;\n\t\t\t$sub->weight = 'White';\n\t\t\t$oficialismo->children[] = $sub;\n\t\t}\n\t}\n\t\n\t$oposicion->rank = $i_op;\n\t$oficialismo->rank = $i_of;\n\t\n\treturn [\n\t\t'tabla' => $tabla,\n\t\t'grafico' => $objeto\n\t\t// ,'temas' => $temas\n\t\t];\n\t\n}", "function llenarMatrizPlaneServicios(){\n\t\t\t\n\t\t\tunset($matriz); \n\t\t\tglobal $matriz;\t\n\t\t\t$res = llamarRegistrosMySQLPlaneServicios();\n\t\t\t$posicion=0;\n\t\t\t\t\n\t\t\t\twhile ($fila = mysql_fetch_array($res))\n\t\t\t\t{\t\n\t\t\t\t\t\n\t\t\t\t\t$matriz[\"nombreplan\"][$posicion] = $fila[\"Nombre\"];\n\t\t\t\t\t$matriz[\"autoid\"][$posicion] = $fila[\"AutoId\"];\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$posicion++;\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t}", "public function run()\n {\n //\n $tipos = [\n '0' => [\n 'nombre' => 'CONTROL DE PLAGAS BASICO SIN ROEDORES'\n ],\n '1' => [\n 'nombre' => 'CONTROL DE PLAGAS BASICO Y ROEDORES'\n ],\n '2' => [\n 'nombre' => 'CONTROL SOLO ROEDORES' \n ],\n '3' => [\n 'nombre' => 'CONTROL INSECTOS RASTREROS'\n ],\n '4' => [\n 'nombre' => 'CONTROL INSECTOS VOLADORES'\n ],\n '5' => [\n 'nombre' => 'CONTROL CHINCHES'\n ],\n '6' => [\n 'nombre' => 'CONTROL GARRAPATAS'\n ],\n '7' => [\n 'nombre' => 'CONTROL PULGAS'\n ],\n '8' => [\n 'nombre' => 'CONTROL TERMITAS'\n ],\n '9' => [\n 'nombre' => 'CONTROL ABEJAS'\n ],\n '10' => [\n 'nombre' => 'CONTROL AVISPAS'\n ],\n '11' => [\n 'nombre' => 'DESINFECCION'\n ],\n '12' => [\n 'nombre' => 'ESPOLVOREO ELECTRICO'\n ],\n '13' => [\n 'nombre' => 'NEBULIZACION'\n ],\n '14' => [\n 'nombre' => 'TERMONEBULIZACION'\n ],\n '15' => [\n 'nombre' => 'GASIFICACION'\n ],\n '16' => [\n 'nombre' => 'RETIRO DE RESIDUOS / DESCARPADO'\n ],\n '17' => [\n 'nombre' => 'INSTALACION ESTACIONES ROEDOR'\n ],\n '18' => [\n 'nombre' => 'CONTROL DE PLAGAS EN ZONAS COMUNES'\n ],\n '19' => [\n 'nombre' => 'CONTROL EN CASAS Y/O APARTAMENTOS'\n ],\n '20' => [\n 'nombre' => 'CONTROL EN CAJAS DE ALCANTARILLA'\n ],\n '21' => [\n 'nombre' => 'RUTA LAMPARAS CONTROL INSECTOS VOLADORES'\n ],\n '22' => [\n 'nombre' => 'RUTA ESTACIONES CONTROL ROEDORES'\n ],\n '22' => [\n 'nombre' => 'CONTROL CARACOLES'\n ],\n '23' => [\n 'nombre' => 'CONTROL DE PLAGAS BASICO RESIDENCIAL'\n ]\n ];\n\n DB::table('tipo_servicios')->insert($tipos);\n }", "function rekamMedis($nomor_pasien)\n\t{\n\n\t}", "public function run()\n {\n $artistas = array('Alan Rickman','Alejandro G. Iñárritu','Alfie Allen','Amy Adams','Anthony Hopkins','Anya Taylor-Joy','Arnold Schwarzenegger','Ben Affleck','Bill Camp','Billy Zane','Bonnie Bedelia','Bruce Willis','Carrie-Anne Moss','Chad Stahelski','Charlize Theron','Chloe Pirrie','Chris Hemsworth','Chris Pine','Christopher Nolan','Christopher Walken','Connie Nielsen','Dafne Keen','Daniel Stern','Djimon Hounsou','Edward Furlong','Edward Zwick','Elliot Page','Gal Gadot','Gary Sinise','George Miller','Giancarlo Esposito','Gina Carano','Harrison Ford','Helen Hunt','Henry Cavill','Hugh Jackman','James Cameron','James Mangold','Jason Momoa','Jennifer Connelly','Jim Carrey','Joaquin Phoenix','Joe Pesci','John Hughes','John McTiernan','Jon Favreau','Jonah Hill','Joseph Gordon-Levitt','Kate Winslet','Keanu Reeves','Kelley','Kenneth Branagh','Kristen Wiig','Lana Wachowski','Laurence Fishburne','Leonardo DiCaprio','Linda Hamilton','Macaulay Culkin','Margot Robbie','Martin Scorsese','Michael Biehn ','Michael Nyqvist','Natalie Portman','Nicholas Hoult','Patrick Stewart','Patty Jenkins','Paul Sanchez','Pedro Pascal','Ridley Scott','Robert De Niro','Robert Zemeckis','Robin Wright','Ron Howard','Russell Crowe','Rutger Hauer','Scott Frank','Sean Young','Steven Spielberg','Taylor Momsen','Todd Phillips','Tom Hanks','Tom Hardy','Will Poulter','Zack Snyder','Zazie Beetz');\n foreach ($artistas as $nomArtista) {\n $artista = new Artista();\n $artista->nombre = $nomArtista;\n $artista->save();\n }\n }", "function NUMERO_DE_HIJOS_MENORES($_ARGS) {\r\n\t$_PARAMETROS = PARAMETROS();\r\n\t\r\n\tlist($a, $m)=SPLIT( '[/.-]', $_ARGS[\"PERIODO\"]); $anio = $a - 18;\r\n\t$fecha = \"$anio-$m-01\";\r\n\r\n\t$sql = \"SELECT\r\n\t\t\t\t*\r\n\t\t\tFROM\r\n\t\t\t\trh_cargafamiliar\r\n\t\t\tWHERE\r\n\t\t\t\tCodPersona = '\".$_ARGS['TRABAJADOR'].\"' AND\r\n\t\t\t\tParentesco = 'HI' AND\r\n\t\t\t\tFechaNacimiento >= '\".$fecha.\"'\";\r\n\t$query = mysql_query($sql) or die ($sql.mysql_error());\r\n\treturn intval(mysql_num_rows($query));\r\n}", "function masterys($skillung){\n $inhalt = file_get_contents(dirname(__FILE__).'/OfflineDaten/masterys/mastery_tree.json');\n $masterys= json_decode($inhalt, true);\n $inhalt_all_masteries = file_get_contents(dirname(__FILE__).'/OfflineDaten/masterys/all_masteries.json');\n $all_masteries= json_decode($inhalt_all_masteries, true);\n $skill_length= strlen($skillung);\n for ($i=0;$i<=$skill_length;$i++) {\n $mastery_skillung[$i] = substr($skillung, $i, 1);\n }\n $skill_array_nr=0;\n $baum_namen = [ \"Wildheit\", \"Gerissenheit\",\"Entschlossenheit\"];\n $k=0; //Laufindex für $baum_namen\n foreach ($masterys['tree'] as $tree) {\n //Pfad Tiefe bestimmen\n $tree_depth=count($tree);\n //Für jedes Tier auslesen, wie viele Elemente vorhanden sind und in Array speichern\n for ($i=0;$i<$tree_depth;$i++) {\n $tree_tier[$i]=count($tree[$i]);\n }\n //Baum erstellen\n echo '<div class=\"mastery\">'; //Baum öffnen\n echo '<div class=\"mastery-tree\" id=\"'.strtolower($baum_namen[$k]).'\">'; //Baum öffnen\n for ($i=0;$i<$tree_depth;$i++) {\n echo '<div class=\"tier tier'.$i.'\"\">'; //Tier div öffnen\n for ($j=0;$j<$tree_tier[$i];$j++) {\n if (isset($tree[$i][$j][masteryId])) {\n echo '<span class=\"mastery-tier-img\">';\n if ($mastery_skillung[$skill_array_nr] <> \"0\") {\n echo \"<div class='mastery-tier-img-color' style='background:url(\\\"/_wordpress_dev716a/wp-content/bilder/masteries/\".$tree[$i][$j][masteryId].\".png\\\")'></div>\";\n echo \"<div class='mastery-points'>\".$mastery_skillung[$skill_array_nr].\"/\".$all_masteries['data'][$tree[$i][$j][masteryId]][ranks].\"</div>\";\n } else {\n echo \"<div class='mastery-tier-img-grey'style='background:url(\\\"/_wordpress_dev716a/wp-content/bilder/masteries/gray_\".$tree[$i][$j][masteryId].\".png\\\")'></div>\";\n echo \"<div class='mastery-points-grey'>\".$mastery_skillung[$skill_array_nr].\"/\".$all_masteries['data'][$tree[$i][$j][masteryId]][ranks].\"</div>\";\n }\n echo '</span>';\n $skill_array_nr++;\n } else {\n echo '<span class=\"mastery-tier-img\">';\n echo '</span>';\n }\n }\n echo '</div>'; //Tier div schließen\n }\n echo \"<div class='tree-name'>\".$baum_namen[$k].\"</div>\";\n $k++;\n echo '</div></div>'; // Baum schließen\n }//Ende foreach\n}", "public function hapus_toko(){\n\t}", "public static function rijksmonumenten() {\n\t\tset_time_limit(0);\n\n\t\t$monuments = ORM::factory('monument')->where('thumb', 'IS', DB::expr('NULL'))->find_all();\n\t\tvar_dump($monuments);\n\t\tforeach ($monuments AS $monument) {\n\t\t\t$data = Rijksmonumenten::monument($monument);\n\t\t\tif ($data) {\n\t\t\t\tif (isset($data->abc_objectnaam)) $monument->name_object = $data->abc_objectnaam;\n\t\t\t\tif (isset($data->abc_thumb_url)) $monument->thumb = $data->abc_thumb_url;\n\t\t\t\tif (isset($data->abc_image_url)) $monument->image = $data->abc_image_url;\n\t\t\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\t$monument->save();\n\t\t\t\t}\n\t\t\t\tcatch(Exception $e) {\n\t\t\t\t\techo 'errortje<br />';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn count($monuments);\n\t}", "function get_guias_nominadas(){\n\t\t$conect=ms_conect_server();\t\t\n\t\t$sQuery=\"SELECT * FROM nomina_detalle WHERE 1=1 ORDER BY id_guia\";\n\t\t\n\t\t//echo($sQuery);\n\t\t$result=mssql_query($sQuery) or die(mssql_min_error_severity());\n\t\t$i=0;\n\t\twhile($row=mssql_fetch_array($result)){\n\t\t\tforeach($row as $key=>$value){\n\t\t\t\t$res_array[$i][$key]=$value; \n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\treturn($res_array);\t\n}", "function armarSemana($horarios, $horarioActual, $dias) {\n\tforeach($horarios as $hora) { //Se recorre el array de horarios\n\t\techo \"<tr><td>\".$hora.\"</td>\";\n\t\tforeach($dias as $dia=>$fecha) {\n\t\t\t$vacio = true;\n\t\t\tif($dia != \"Domingo\") {\n\t\t\t\tforeach ($horarioActual as $campo=>$estado) {\t//Se recorre el array de turnos del dia\n\t\t\t\t\tif (isset($_POST['patologias']) && $_POST['patologias'] != $estado['patologia']) { continue; }\n\t\t\t\t\tif ($hora == date(\"H:i\", strtotime($estado['HORA_TURNO'])) && date(\"w\", strtotime($estado['FECHA_TURNO'])) == date(\"w\", strtotime($fecha))) {\t//Si el turno coincide con el horario y el dia\n\t\t\t\t\t\tif (verificarLaborable($hora, $dia) == true) {\n\t\t\t\t\t\t\t$vacio = false;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$cupos = obtenerCuposTurno($estado['FECHA_TURNO'], $hora); //guardo cantidad de cupos por hora y fecha dadas\n\t\t\t\t\t\t\t$cantCamillas = 0;\n\t\t\t\t\t\t\t$cantGimnasio = 0;\n\t\t\t\t\t\t\tforeach($cupos as $reg=>$camp) {\t//en este for asigno las cantidades para cada categoria\n\t\t\t\t\t\t\t\tif($camp['sesion'] == \"Camilla\") {\n\t\t\t\t\t\t\t\t\t$cantCamillas += $camp['cantidad'];\n\t\t\t\t\t\t\t\t} elseif($camp['sesion'] ==\"Gimnasio\") {\n\t\t\t\t\t\t\t\t\t$cantGimnasio += $camp['cantidad'];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$disponibilidad = estadoTurno($cantCamillas, $cantGimnasio);\n\n\t\t\t\t\t\t\tif ($disponibilidad == \"Disponible\") { //If que determina los colores de las casillas\n\t\t\t\t\t\t\t\t$colorCasilla = \"disponible\";\n\t\t\t\t\t\t\t} elseif($disponibilidad == \"Libre\") {\n\t\t\t\t\t\t\t\t$colorCasilla = \"libre\";\n\t\t\t\t\t\t\t} elseif($disponibilidad == \"Ocupado\") {\n\t\t\t\t\t\t\t\t$colorCasilla = \"ocupado\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t/*if ($GLOBALS['perfil'] == \"profesional\") { //si el perfil es de profesional, se veran los cupos disponibles\n\t\t\t\t\t\t\t\techo \"<td class=\".$colorCasilla.\">\".$estado[\"camilla\"].\"</td>\",\n\t\t\t\t\t\t\t\t\"<td class=\".$colorCasilla.\">\".$estado[\"gimnasio\"].\"</td>\";\n\t\t\t\t\t\t\t} else { */\n\t\t\t\t\t\t\techo \"<td class=\".$colorCasilla.\">\".cantidadCupos($cantCamillas, $GLOBALS['MaximoCamillas']).\"</td>\",\n\t\t\t\t\t\t\t\"<td class=\".$colorCasilla.\">\".cantidadCupos($cantGimnasio, $GLOBALS['MaximoGimnasio']).\"</td>\";\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\tif ($disponibilidad == \"Disponible\") { \n\t\t\t\t\t\t\t\techo \"<td class=\".$colorCasilla.\"><input type='button' value='Si' onclick='location=\\\"reservar.php?fecha=\".$fecha.\"&hora=\".$hora.\"\\\";'/></td>\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\techo \"<td class=\".$colorCasilla.\">No</td>\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} elseif (verificarLaborable($hora, $dia) == false) {\n\t\t\t\t\t\t\t//Si la hora dada no es laboral el dia dado, entonces\n\t\t\t\t\t\t\techo \"<td class='cerrado'>-</td>\", \n\t\t\t\t\t\t\t\"<td class='cerrado'>-</td>\",\n\t\t\t\t\t\t\t\"<td class='cerrado'>-</td>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t\tif ($vacio == true) {\n\t\t\t\t\t\tif(verificarLaborable($hora, $dia)) {\n\t\t\t\t\t\t\tif ($_SESSION['perfil'] == \"Administrador\") {\n\t\t\t\t\t\t\t\techo \"<td class='libre'>\".$GLOBALS['MaximoCamillas'].\"</td>\", \"<td class='libre'>\".$GLOBALS['MaximoGimnasio'].\"</td>\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\techo \"<td class='libre'>Si</td>\", \"<td class='libre'>Si</td>\"; \n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\techo \"<td class='libre'><input type='button' value='Si' onclick='location=\\\"reservar.php?fecha=\".$fecha.\"&hora=\".$hora.\"\\\";'/></td>\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t//Si la hora dada no es laboral el dia dado, entonces\n\t\t\t\t\t\t\techo \"<td class='cerrado'>-</td>\", \n\t\t\t\t\t\t\t\"<td class='cerrado'>-</td>\",\n\t\t\t\t\t\t\t\"<td class='cerrado'>-</td>\";\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\techo \"</tr>\";\n\t}\n}", "public function abono();", "function creaChampionnatNbRencontre($nb_equipe)\n{\n if($nb_equipe==4){$nb_rencontre=5;}\n else if($nb_equipe==6){$nb_rencontre=8;}\n else if($nb_equipe==8){$nb_rencontre=15;}\n else if($nb_equipe==12){$nb_rencontre=19;}\n else if($nb_equipe==16){$nb_rencontre=31;}\n else if($nb_equipe==24){$nb_rencontre=39;}\n else if($nb_equipe==32){$nb_rencontre=63;}\n \n return $nb_rencontre;\n}", "function guess_all()\n {\n# init variables\n $accent_db=$this->accent_db;\n $h_db=$this->h_db;\n $ent_db=$this->ent_db;\n $hiatus_db=\"hiatus_db\";\n \n $req_accent=requete(\"SELECT a.mot, a.syllabe , a.vers_n ,a.syllabe_n, a.accent \n FROM $accent_db a \n WHERE \n a.id_piece='{$this->id_piece}' \n ORDER BY a.vers_n,a.syllabe_n;\"); \n while($response=fetch_array($req_accent))\n {\n $real_vers_n=$response[\"vers_n\"];\n $vers_n=$real_vers_n-1;\n $real_syllabe_n=$response[\"syllabe_n\"];\n $syllabe_n=$real_syllabe_n-1;\n if($vers_n < count($this->texte->vers))\n {\n if($syllabe_n < count($this->texte->vers[$vers_n]->syllabes))\n {\n $this->texte->vers[$vers_n]->syllabes[$syllabe_n]->accent=($response['accent']==1)?(TRUE):(FALSE);\n \n }\n }\n\n }\n \n \n $req_h=requete(\"SELECT vers_n , syllabe_n , aspire \n FROM $h_db \n WHERE id_piece='{$this->id_piece}'\n ORDER BY vers_n,syllabe_n\");\n while($response=fetch_array($req_h))\n {\n $real_vers_n=$response[\"vers_n\"];\n $vers_n=$real_vers_n-1;\n $real_syllabe_n=$response[\"syllabe_n\"];\n $syllabe_n=$real_syllabe_n-1;\n if($vers_n < count($this->texte->vers))\n {\n if($syllabe_n < count($this->texte->vers[$vers_n]->syllabes))\n {\n $this->texte->vers[$vers_n]->syllabes[$syllabe_n]->h=($response['aspire']==1)?(TRUE):(FALSE);\n \n }\n }\n } \n \n \n $req_ent=requete(\"SELECT vers_n , syllabe_n , grave\n FROM $ent_db \n WHERE id_piece='{$this->id_piece}'\n ORDER BY vers_n,syllabe_n\");\n while($response=fetch_array($req_ent))\n {\n $real_vers_n=$response[\"vers_n\"];\n $vers_n=$real_vers_n-1;\n $real_syllabe_n=$response[\"syllabe_n\"];\n $syllabe_n=$real_syllabe_n-1;\n if($vers_n < count($this->texte->vers))\n {\n if($syllabe_n < count($this->texte->vers[$vers_n]->syllabes))\n {\n $this->texte->vers[$vers_n]->syllabes[$syllabe_n]->ent=($response['grave']==1)?(TRUE):(FALSE);\n \n }\n }\n }\n \n \n \n# on s'occupe des hiatus\n $req_hiatus=requete(\"SELECT vers_n, syllabe_n,start_hiatus,end_hiatus,start_pos,end_pos\n FROM $hiatus_db \n WHERE id_piece='{$this->id_piece}'\n ORDER BY vers_n,syllabe_n\");\n \n while($response=fetch_array($req_hiatus))\n {\n $real_vers_n=$response[\"vers_n\"];\n $vers_n=$real_vers_n-1;\n $real_syllabe_n=$response[\"syllabe_n\"];\n $syllabe_n=$real_syllabe_n-1;\n if($vers_n < count($this->texte->vers))\n {\n if($syllabe_n < count($this->texte->vers[$vers_n]->syllabes))\n {\n $this->texte->vers[$vers_n]->syllabes[$syllabe_n]->start_hiatus=($response['start_hiatus']==1)?(TRUE):(FALSE);\n $this->texte->vers[$vers_n]->syllabes[$syllabe_n]->end_hiatus=($response['end_hiatus']==1)?(TRUE):(FALSE);\n $this->texte->vers[$vers_n]->syllabes[$syllabe_n]->start_pos=($response['start_pos']);\n $this->texte->vers[$vers_n]->syllabes[$syllabe_n]->end_pos=($response['end_pos']);\n \n }\n }\n }\n }", "public function them_nhom_monhoc()\r\n {\r\n $khoa_result=$this->mmonhoc->get_khoa();\r\n $loai_monhoc_result=$this->mmonhoc->get_loai_monhoc();\r\n \r\n $data[\"khoa_result\"]=$khoa_result;\r\n $data[\"loai_monhoc_result\"]=$loai_monhoc_result;\r\n \r\n $data[\"data_title\"]=\"Thao tác thêm nhóm môn học\";\r\n \r\n \r\n $data[\"title\"]=\"Trang thêm nhóm môn học\"; \r\n $this->load->view(\"admin/vmonhoc_nhom_add\",$data); \r\n }", "public function _construct(){\n\t\t$this->marque = 'Peugeot';\n\t\t$this->couleur = 'blanc';\n\t\t$this->vitesse = 50;\n\t}", "function niveles($area){\n\t\tif ($area->cveentidad2=='0') return 1;\n\t\tif ($area->cveentidad3=='0') return 2;\n\t\tif ($area->cveentidad4=='0') return 3;\n\t\tif ($area->cveentidad5=='0') return 4;\n\t\tif ($area->cveentidad6=='0') return 5;\n\t\tif ($area->cveentidad7=='0') return 6;\n\t}", "function showTroopAli_ctc($ali_id, $dtk_id, $art){\n\tglobal $db, $lang;\n\t$parse = $lang;\n\t\n\tfor($i=1; $i<=3; $i++){\n\t\t$parse['a_h_'.$i] = 0;\n\t\t$parse['a_h_c_'.$i] = \"c\";\t\t\n\t}\n\t\n\tfor($i=1; $i<=33; $i++){\n\t\t$parse['a_'.$i] = 0;\n\t\t$parse['a_c_'.$i] = \"c\";\n\t}\n\t\n\t//Lay thong tin hero\n\t$sql = \"SELECT\n\t\t\t\t\twg_heros.troop_id\n\t\t\t\tFROM\n\t\t\t\t\twg_heros ,\n\t\t\t\t\twg_ctc_heros ,\n\t\t\t\t\twg_villages ,\n\t\t\t\t\twg_users\n\t\t\t\tWHERE\n\t\t\t\t\twg_heros.id = wg_ctc_heros.hero_id AND\n\t\t\t\t\twg_ctc_heros.village_id = wg_villages.id AND\n\t\t\t\t\twg_villages.user_id = wg_users.id AND\n\t\t\t\t\twg_users.alliance_id = '$ali_id' AND\n\t\t\t\t\twg_ctc_heros.dtk_id = '$dtk_id'\n\t\t\t\tGROUP BY\n\t\t\t\t\twg_heros.id\";\n\t$db->setQuery($sql);\n\t$hs = $db->loadObjectList();\n\tif($hs){\n\t\tforeach($hs as $h){\n\t\t\tswitch($art[$h->troop_id]['nation_id']){\n\t\t\t\tcase 1:\n\t\t\t\t\t$parse['a_h_2']++;\n\t\t\t\t\tif($h->die==1){\n\t\t\t\t\t\t$parse['c_a_h_2']++;\n\t\t\t\t\t\t$parse['a_h_c_2'] = \"\";\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\t$parse['a_h_3']++;\n\t\t\t\t\tif($h->die==1){\n\t\t\t\t\t\t$parse['c_a_h_3']++;\n\t\t\t\t\t\t$parse['a_h_c_3'] = \"\";\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\t$parse['a_h_1']++;\n\t\t\t\t\tif($h->die==1){\n\t\t\t\t\t\t$parse['c_a_h_1']++;\n\t\t\t\t\t\t$parse['a_h_c_1'] = \"\";\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\t\n\t\t\t}\n\t\t}\n\t}\n\t\n\t//Lay thong tin linh\n\t$sql = \"SELECT\n\t\t\t\t\twg_ctc_troops.troop_id,\n\t\t\t\t\twg_ctc_troops.num\n\t\t\t\tFROM\n\t\t\t\t\twg_ctc_troops ,\n\t\t\t\t\twg_villages ,\n\t\t\t\t\twg_users\n\t\t\t\tWHERE\n\t\t\t\t\twg_ctc_troops.village_id = wg_villages.id AND\n\t\t\t\t\twg_villages.user_id = wg_users.id AND\n\t\t\t\t\twg_users.alliance_id = '$ali_id' AND\n\t\t\t\t\twg_ctc_troops.dtk_id = '$dtk_id'\n\t\t\t\tGROUP BY\n\t\t\t\t\twg_ctc_troops.id\";\n\t$db->setQuery($sql);//die($sql);\n\t$ts = $db->loadObjectList();\n\tif($ts){\n\t\tforeach($ts as $t){\n\t\t\tif($t->num>0){\n\t\t\t\t$parse['a_'.$t->troop_id] += $t->num;\n\t\t\t\t$parse['a_c_'.$t->troop_id] = \"\";\n\t\t\t}\n\t\t}\n\t}\n\t\n\t//echo \"<pre>\"; print_r($hs); die();\n\t\n\treturn parsetemplate(gettemplate(\"ctc/ctc_troop_ali\"), $parse);\n}", "public function luas()\n {\n return $this->panjang * $this->lebar;\n }", "function NUMERO_LUNES($_ARGS) {\r\n\tlist($ap, $mp)=SPLIT('[/.-]', $_ARGS['PERIODO']); $periodo_inicio = \"01-$mp-$ap\";\r\n\t$primer_dia_semana = DIA_DE_LA_SEMANA($periodo_inicio);\r\n\t$dias_del_mes = DIAS_DEL_MES($periodo_inicio);\r\n\t\r\n\tif (($primer_dia_semana == 0 || $primer_dia_semana == 6) && $dias_del_mes == 31) $lunes = 5;\r\n\telseif ($primer_dia_semana == 1 && ($dias_del_mes == 30 || $dias_del_mes == 31)) $lunes = 5;\r\n\telseif ($primer_dia_semana == 2 && ($dias_del_mes == 29 || $dias_del_mes == 30 || $dias_del_mes == 31)) $lunes = 5;\r\n\telse $lunes = 4;\r\n\t\r\n\treturn $lunes;\r\n}", "public function monarch()\n {\n }", "public function initMmMatterhorns()\n\t{\n\t\tif ($this->collMmMatterhorns === null) {\n\t\t\t$this->collMmMatterhorns = array();\n\t\t}\n\t}", "function modelo_inmueble($r, $cantidad_inmuebles)\n{\n for ($i = 0; $i < $cantidad_inmuebles; $i++) {\n $imagen = existeImagen(($r[$i]['foto1']));\n $codigo = str_ireplace(\"108-\", \"\", $r[$i]['Codigo_Inmueble']);\n $api = $r[$i];\n $descripcion = $api['descripcionlarga'];\n $limite_de_cadena = 90;\n // recortar cadena\n if (strlen($descripcion) >= $limite_de_cadena) {\n $descripcion = substr($descripcion, 0, $limite_de_cadena) . '...';\n } else {\n $descripcion = $descripcion . '...';\n }\n echo '\n <div class=\"property-block col-12 col-sm-6 col-lg-4 col-xl-4\">\n <div class=\"inner-box\">\n <div class=\"image\">\n <a href=\"detalle-inmueble.php?co=' . $codigo . '\"><img src=\"' . $imagen . '\" alt=\"\"></a>\n <div class=\"sale\">' . $api['Gestion'] . '</div>\n <div class=\"price\">';\n if ($api['Gestion'] == 'Arriendo/venta') {\n echo '$' . $api['Canon'] . ' <br>$' . $api['Venta'];\n } else if ($api['Gestion'] == 'Arriendo') {\n echo '$' . $api['Canon'];\n } else {\n echo '$' . $api['Venta'];\n }\n echo ' </div>\n </div>\n <div class=\"lower-content\">\n <div class=\"upper-box\" style=\"min-height: 9.3rem;\">\n <h3><a href=\"images/no_image.png\">' . $api['Tipo_Inmueble'] . '</a></h3>\n <div class=\"location\"><span class=\"icon flaticon-location-pin\"></span> ' . $api['Barrio'] . ', ' . $api['Ciudad'] . '</div>\n <div class=\"text-justify\">' . $descripcion . '</div>\n </div>\n <div class=\"lower-box clearfix\">\n <ul class=\"row justify-content-center\">\n <li class=\"col-auto\"><span class=\"icon flaticon-squares\"></span>' . $api['AreaConstruida'] . 'm<sup>2</sup></li>\n <li class=\"col-auto\"><span class=\"icon flaticon-bed-1\"></span>' . $api['Alcobas'] . '</li>\n <li class=\"col-auto\"><span class=\"icon flaticon-bathtube-with-shower\"></span>' . $api['banios'] . '</li>\n <li class=\"col-auto\"><span class=\"icon flaticon-garage\"></span>' . $api['garaje'] . '</li>\n <li class=\"col-auto\">Codigo: ' . $codigo . '</li>\n </ul>\n </div>\n </div>\n </div>\n </div>\n\n ';\n }\n}", "public function getJadwalDimulai();", "function logo ()\n {\n global $connection;\n $sql = \"SELECT * FROM slike_logo sl ORDER BY sl.putanja_logo DESC LIMIT 0,1\";\n $sum = $connection->query($sql)->fetchAll();\n foreach($sum as $item) :\n echo \"<a href='index.php?page=pocetna'><img src=$item->putanja_logo alt=$item->ime_slike title='NanoSoft DeLux' width='177' height='106'/></a>\";\n endforeach;\n }", "public function getChapeau();", "function grabar_horario($datos){\n\t\t$registro[IDPROVEEDOR] = $datos[IDPROVEEDOR];\n\t\t$registro[IDUSUARIOMOD]= $datos[IDUSUARIOMOD];\n\t\t$registro[HORAINICIO]=$datos[HORAINICIO];\n\t\t$registro[HORAFINAL]=$datos[HORAFINAL];\n\t\t$registro[DOMINGO]=($datos[DOMINGO]=='on')?1:0;\n\t\t$registro[LUNES]=($datos[LUNES])?1:0;\n\t\t$registro[MARTES]=($datos[MARTES])?1:0;\n\t\t$registro[MIERCOLES]=($datos[MIERCOLES])?1:0;\n\t\t$registro[JUEVES]=($datos[JUEVES])?1:0;\n\t\t$registro[VIERNES]=($datos[VIERNES])?1:0;\n\t\t$registro[SABADO]=($datos[SABADO])?1:0;\n\n\n\t\tif ($this->exist('catalogo_proveedor_horario',IDPROVEEDOR,\" WHERE IDPROVEEDOR = '$registro[IDPROVEEDOR]'\"))\n\t\t{\n\t\t\t$this->update('catalogo_proveedor_horario',$registro,\" WHERE IDPROVEEDOR = '$registro[IDPROVEEDOR]'\");\n\t\t}\n\t\telse {\n\t\t\t$this->insert_reg('catalogo_proveedor_horario',$registro);\n\n\t\t}\n\t}", "function ListNodos(){\n\t\t$clase=$this->nmclass;\n\t\t$nodosnum=count($this->nodos[$clase]);\n\t\techo(\"Lista de Nodos: <br>\");\n\t\tforeach ($this->nodos[$clase] as $key=>$value) {\n\t\t echo(\"Clave: $key; Valor: $value<br />\\n\");\n\t\t}\n\t}", "public static function metodo_estatico () {\n }", "public function jarjesta() {\n usort($this->ravinnon_saannit, \"self::vertaaPvm\");\n }", "public function boleta()\n\t{\n\t\t//\n\t}", "public function AggiornaPrezzi(){\n\t}", "function cc_ho_vetrina($agenzia, $rif){\n\tglobal $invetrina;\n\t\n\t// $agenzia qua è il numero interno di Cometa\n\tif( isset( $invetrina[$agenzia] ) ){\t\t\n\t\t\n\t\tif ($invetrina[$agenzia]['imm'] == $rif) {\n\t\t\t// questo immobile è in vetrina\n\t\t\t$vetrina = '1';\n\t\t\tcc_import_immobili_error_log($rif.\" è in vetrina\");\n\t\t\t\n\t\t\t// vediamo se è lo stesso di quello che era già in vetrina o meno\n\t\t\t$oldrif = cc_get_rif_vetrina( substr($rif, 0, 2) );\n\t\t\tcc_import_immobili_error_log(\"oldrif: \".$oldrif);\n\t\t\t\n\t\t\t// se l'immobile attualemnte in vetrina non è questo tolgo quello attuale da vetrina\n\t\t\tif($oldrif != $rif) {\n\t\t\t\tcc_updateVetrina($oldrif); \n\t\t\t\tcc_import_immobili_error_log(\"Tolgo vetrina da \".$oldrif);\n\t\t\t}\n\t\t}else{\n\t\t\t$vetrina = '0';\n\t\t}\t\t\n\t\n\t}else{\n\t\t$vetrina = '0';\n\t}\n\t\n\treturn $vetrina;\n}", "public function hallo(){\n\t\treturn self::$no++.\" Hallo my name is \".$this->harga;\n\t}", "function busca_hueco_almacen(&$Localizaciones,$numero_huecos){\n\tfor($i = 1;$i < $numero_huecos['n_planta'];$i++)\n\t\t for($j = 1;$j < $numero_huecos['n_pasillo'];$j++)\n\t\t\t\t for($k = 1;$k < $numero_huecos['n_fila'];$k++)\n\t\t\t\t\t\tfor($l = 1;$l < $numero_huecos['n_columna'];$l++)\n\t\t\t\t\t\t\t\t if($Localizaciones[$i][$j][$k][$l] != 1){\n\t\t\t\t\t\t\t\t\t $Localizaciones[$i][$j][$k][$l] = 1;\n\t\t\t\t\t\t\t\t\t return array( \"planta\" => $i ,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"pasillo\" => $j ,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"fila\" => $k ,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"columna\" => $l ,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t );\n\t\t\t\t\t\t\t\t }\n}", "function aurora_borealis() {\n\t$chosen = steamed_hams_get_lyric();\n\techo \"<p id='seymour'>$chosen</p>\";\n}", "function recorrerMatrizPlaneServicios() {\n\t\t\t\n\t\t\t\tglobal $res,$matriz;\n\t\t\t\t\tfor($pos=0;$pos < mysql_num_rows($res); $pos++) {\n\n\t\t\t\t\t$nombreplan= $matriz[\"nombreplan\"][$pos] ;\t\n\t\t\t\t\t$nombreplan = eliminarCaracteresEspeciales($nombreplan)\t;\n\t\t\t\t\t$autoid = $matriz[\"autoid\"][$pos];\n\t\t\t\t\t$autoid = str_replace(\"A\",\"\",$autoid);\n\t\t\t\t\t$autoid = str_replace(\"a\",\"\", $autoid);\n\t\t\t\t\t$compania = $_SESSION[\"compania\"];\n\t\t\t\t\t$ambito = \"\";\n\t\t\t\t\t$clase = \"CUPS\";\n\t\t\t\t\n\t\t\t\t\tinsertarPlaneServicios($nombreplan, $autoid, $compania, $ambito, $clase);\n\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\n\t\t\t}", "public function getDemonstrativos();", "function galaxy_spy($lines) {\n\tglobal $db, $user_data;\n\n\t$nb_spy_added = $phalanx = $gate = 0;\n\t$spy_added = array();\n\tfor ($i=0 ; $i<sizeof($lines) ; $i++) {\n\t\t$line = stripslashes($lines[$i]);\n\n\t\tif (preg_match(\"/Matières premières sur/\", $line)) {\n\t\t\t$phalanx = $gate = 0;\n\t\t\t$header = str_replace(\"Matières premières sur \", \"\", $line);\n\n\t\t\tlist($coordinates, $time) = explode(\"]\", $header);\n\t\t\tif (is_null($coordinates) || is_null($time)) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$time = trim($time);\n\t\t\t$time = str_replace(\"le \", \"\", $time);\n\n\t\t\tlist($planet, $coordinates) = explode(\"[\", $coordinates);\n\t\t\tif (is_null($coordinates) || is_null($time)) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$planet = trim($planet);\n\n\t\t\tlist($galaxy, $system, $row) = explode(\":\", $coordinates);\n\t\t\tif (intval($galaxy) < 1 || intval($galaxy) > 9 || intval($system) < 1 || intval($system) > 499 || intval($row) < 1 || intval($row) > 15) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tlist($day, $hour) = explode(\" \", $time);\n\t\t\tif (is_null($day) || is_null($hour)) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tlist($month, $day) = explode(\"-\", $day);\n\t\t\tif (intval($month) < 1 || intval($month) > 12 || intval($day) < 1 || intval($day) > 31) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (!checkdate($month, $day, date(\"Y\"))) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tlist($hour, $minute, $seconde) = explode(\":\", $hour);\n\t\t\tif (intval($hour) < 0 || intval($hour) > 23 || intval($minute) < 0 || intval($minute) > 59 || intval($seconde) < 0 || intval($seconde) > 59) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$timestamp = mktime($hour, $minute, $seconde, $month, $day);\n\t\t\t$report = \"\";\n\t\t}\n\n\t\tif (preg_match(\"#Phalange de capteur\\s+(\\d)#\", $line, $arr)) {\n\t\t\t$phalanx = $arr[1];\n\t\t}\n\t\tif (preg_match(\"#Porte de saut spatial\\s+(\\d)#\", $line, $arr)) {\n\t\t\t$gate = 1;\n\t\t}\n\t\tif (isset($report)) {\n\t\t\t$checking = false;\n//\t\t\t$report .= $line;\n\t\t\t$report .= str_replace('.','',$line); // pour les . dans les RE http://www.ogsteam.fr/forums/viewtopic.php?pid=27659#p27659\n\t\t\tif (preg_match(\"/Probabilité de destruction de la flotte d'espionnage/\", $line)) {\n\t\t\t\t//Vérification de la validité des données\n\t\t\t\tif (!check_var($galaxy, \"Num\") || !check_var($system, \"Num\") || !check_var($row, \"Num\") || !check_var($planet, \"Galaxy\") ||\n\t\t\t\t!check_var($timestamp, \"Num\") || !check_var($phalanx, \"Num\") || !check_var($report, \"Spyreport\")) {\n\t\t\t\t\tredirection(\"index.php?action=message&id_message=errordata&info\");\n\t\t\t\t}\n\n\t\t\t\t$coordinates = $galaxy.\":\".$system.\":\".$row;\n\t\t\t\tif (galaxy_add_spy($galaxy, $system, $row, $planet, $timestamp, $report, $phalanx, $gate)) {\n\t\t\t\t\t$spy_added[] = array(1, $coordinates, $timestamp);\n\t\t\t\t\t$nb_spy_added++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$spy_added[] = array(0, $coordinates, $timestamp);\n\t\t\t\t}\n\t\t\t\t$phalanx = $gate = 0;\n\t\t\t\tunset($report);\n\t\t\t}\n\t\t}\n\t}\n\tuser_set_stat(null, null, null, $nb_spy_added);\n\n\treturn $spy_added;\n}", "function modelo_inmueble2($r)\n{\n for ($i = 0; $i < count($r); $i++) {\n $imagen = existeImagen(($r[$i]['foto1']));\n $codigo = str_ireplace(\"108-\", \"\", $r[$i]['Codigo_Inmueble']);\n $api = $r[$i];\n $descripcion = $api['descripcionlarga'];\n $limite_de_cadena = 90;\n // recortar cadena\n if (strlen($descripcion) >= $limite_de_cadena) {\n $descripcion = substr($descripcion, 0, $limite_de_cadena) . '...';\n } else {\n $descripcion = $descripcion . '<br>...';\n }\n echo '\n <div class=\"property-block col-12 col-sm-6 col-lg-4 col-xl-4\">\n <div class=\"inner-box\">\n <div class=\"image\">\n <a href=\"detalle-inmueble.php?co=' . $codigo . '\"><img src=\"' . $imagen . '\" alt=\"\"></a>\n <div class=\"sale\">' . $api['Gestion'] . ' </div>\n <div class=\"price\">$';\n if ($api['Gestion'] == 'Arriendo') {\n echo $api['Canon'];\n } else if ($api['Gestion'] == 'Venta') {\n echo $api['Venta'];\n } else {\n echo $api['Canon'] . '/ $' . $api['Venta'];\n }\n echo ' </div>\n </div>\n <div class=\"lower-content\">\n <div class=\"upper-box\" style=\"min-height: 9.3rem;\">\n <h3><a href=\"images/no_image.png\">' . $api['Tipo_Inmueble'] . '</a></h3>\n <div class=\"location\"><span class=\"icon flaticon-location-pin\"></span> ' . $api['Barrio'] . ', ' . $api['Ciudad'] . '</div>\n <div class=\"text-justify\">' . $descripcion . '</div>\n </div>\n <div class=\"lower-box clearfix\">\n <ul class=\"row justify-content-center\">\n <li class=\"col-auto\"><span class=\"icon flaticon-squares\"></span>' . $api['AreaConstruida'] . 'm<sup>2</li>\n <li class=\"col-auto\"><span class=\"icon flaticon-bed-1\"></span>' . $api['Alcobas'] . '</li>\n <li class=\"col-auto\"><span class=\"icon flaticon-bathtube-with-shower\"></span>' . $api['banios'] . '</li>\n <li class=\"col-auto\"><span class=\"icon flaticon-garage\"></span>' . $api['garaje'] . '</li>\n <li class=\"col-auto\">Codigo: ' . $codigo . '</li>\n </ul>\n </div>\n </div>\n </div>\n</div>\n ';\n }\n}", "public function waktu_nilai(){\n\t\t$t_waktu = \"t_waktu_nilai\";\n\t\t$data['waktu'] = $this->m_aka->get_all($t_waktu);\n\t\t$data['content'] = \"mahasiswa/waktu_nilai\";\n\t\t$this->load->view(\"content\", $data);\n\t}", "public function run()\n {\n $data = [\n [\n \"El mito de Naylamp\",\n \"Dicen los pobladores de Lambayeque que en tiempos muy antiguos, que no saben en qué año fue, vino al Perú con una gran flota de balsas un señor de mucho valor y prestigio llamado Naylamp, y trajo consigo una gran cantidad de gente.\",\n \"/img/naylamp.png\"\n ],\n [\n \"Los peces y los hombres\",\n \"Los peces habían sido seres humanos, como descendientes de una antiquísima raza de enanos que poblaba nuestras tierras en edades pretéritas. Vivían en ciudades lacustres y reverenciaban al mar, sus tormentas, sus arenas y sus conchas.\",\n \"/img/peces.png\"\n ],\n [\n \"El dios Pachacamac y Vichama\",\n \"En el principio no había comida suficiente para un hombre y una mujer que el dios Pachacamac había creado, por lo que murió de hambre el hombre y solo quedó la mujer.\",\n \"/img/pachacamac.png\"\n ],\n [\n \"El mito del origen del mochica y el algarrobo\",\n \"Luchaban por todo el universo los dos poderes eternos: el genio del Bien y el poder maligno. Cada uno buscaba establecer la supremacía de sus propios derechos y ambos rodaban por los diferentes mundos y los espacios siderales.\",\n \"/img/mochica.png\"\n ],\n [\n \"Somos herederos y guardianes de la Tierra\",\n \"En nuestro pueblo: Las piedras son memoria, hablan de la historia antigua. Las plantas son medicina, curan los males. Los animales son compañía alimentan y enseñan.\",\n \"/img/guardianes.png\"\n ],\n [\n \"Vamos a sembrar y cosechar con nuestras familias\",\n \"La agricultura, como actividad socioproductiva y fuente de sustento de las comunidades, debe considerar los factores de crecimiento de las plantas, sus ciclos de vida y los hábitats en los que se desarrollan.\",\n \"/img/sembrar.png\"\n ],\n ];\n foreach ($data as $item) {\n DB::table('stories')->insert([\n 'name' => $item[0],\n 'slug' => Str::of($item[0])->slug('-'),\n 'intro' => $item[1],\n 'image_url' => $item[2],\n ]);\n }\n\n }", "public static function Nueva_Muestra($id_orden, $num_muestra, $fecha_monitoreo, $hora, $muestreado_por, $tipo_muestreo, $identificacion, \n $integridad, $motivo, $num_envases, $temperatura, $custodia, $volumen, $id_matriz, $tipo_informe, $id_norma, $observaciones)\n {\n // Sentencia INSERT\n $comando = \"INSERT INTO ordenes_muestras (id_orden, num_muestra, fecha_monitoreo, hora, muestreado_por, tipo_muestreo, identificacion, \n integridad, motivo, num_envases, temperatura, custodia, volumen, id_matriz, tipo_informe, id_norma, observaciones) VALUES( ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,? )\";\n\n // Preparar la sentencia\n $sentencia = Database::getInstance()->getDb()->prepare($comando);\n\n return $sentencia->execute(\n array(\n $id_orden, \n $num_muestra, \n $fecha_monitoreo, \n $hora, \n $muestreado_por, \n $tipo_muestreo, \n $identificacion,\n $integridad, \n $motivo, \n $num_envases, \n $temperatura, \n $custodia, \n $volumen, \n $id_matriz, \n $tipo_informe, \n $id_norma, \n $observaciones \n )\n );\n\n }", "public function getMataPelajaran();", "public function get_hypernyms ($tag){\n//Kennedy, Jack Kennedy, John Fitzgerald Kennedy, JFK, President Kennedy, President John F. Kennedy\n// INSTANCE OF=> President of the United States, United States President, President, Chief Executive\n// => head of state, chief of state\n// => representative\n// => negotiator, negotiant, treater\n// => communicator\n// => person, individual, someone, somebody, mortal, soul\n// => organism, being\n// => living thing, animate thing\n// => object, physical object\n// => physical entity\n// => entity\n// => causal agent, cause, causal agency\n// => physical entity\n// => entity\n//\n//Sense 2\n//Kennedy, Kennedy Interrnational, Kennedy International Airport\n// INSTANCE OF=> airport, airdrome, aerodrome, drome\n// => airfield, landing field, flying field, field\n// => facility, installation\n// => artifact, artefact\n// => whole, unit\n// => object, physical object\n// => physical entity\n// => entity';\n// $matches1 = array ();\n// preg_match_all (\"/\\s+(.+)\\s+=>/\",\n// $raw_synonims1, $matches1, PREG_PATTERN_ORDER);\n// var_dump($raw_synonims1);\n// var_dump($matches1);\n//\n// $raw_synonims1 = 'Sense 1\n//Kennedy, Jack Kennedy, John Fitzgerald Kennedy, JFK, President Kennedy, President John F. Kennedy\n// INSTANCE OF=> President of the United States, United States President, President, Chief Executive';\n// $matches1 = array ();\n// preg_match_all (\"/\\s+(.+)\\s+=>/\",\n// $raw_synonims1, $matches1, PREG_PATTERN_ORDER);\n// var_dump($raw_synonims1);\n// var_dump($matches1);\n// exit();\n ini_set(\"xdebug.var_display_max_children\", -1);\n ini_set(\"xdebug.var_display_max_data\", -1);\n ini_set(\"xdebug.var_display_max_depth\", -1);\n\n // cmd commend\n $wn_command = '\"C:/Program Files (x86)/WordNet/2.1/bin/wn\" \"'.$tag.'\" \"-hypen\"';\n $raw_synonims = shell_exec ($wn_command);\n\n // if the word exist\n if (! $raw_synonims) {\n return null;\n }\n\n // get the result of cmmend\n $matches = array ();\n preg_match_all (\"/\\s+(.+)\\s+.+?=>/\",\n $raw_synonims, $matches, PREG_PATTERN_ORDER);\n\n // if no matched result\n if(!isset($matches[1][0])){\n return null;\n }\n\n// dd($matches);\n // get all accepted words\n $expanded_query = array();\n\n foreach ($matches[1] as $match){\n $match = explode (\", \", $match);\n foreach ($match as $word){\n array_push($expanded_query, strtolower($word));\n }\n }\n\n // remove repeated element\n $expanded_query = array_unique($expanded_query);\n\n // return the word\n return $expanded_query;\n }", "public function quienesSomos()\n {\n require_once \"_Vista/_Plantillas/head.php\";\n require_once \"_Vista/_Plantillas/navBar.php\";\n require_once \"_Vista/QuienesSomosVista.php\";\n }", "function RellenarTitulo()\r\n {\r\n $this->Imprimir('ANÁLSIS DE FALLAS DE DISTRIBUCIÓN');\r\n\r\n $this->Imprimir($this->convocatoria->getLugar(), 93, 10);\r\n\r\n $this->Imprimir(strftime(\"%A %d de %B de %Y\", strtotime($this->convocatoria->getFecha())) .\r\n ' - Hora: ' . $this->convocatoria->getHoraIni() . ' a ' .\r\n $this->convocatoria->getHoraFin(), 95, 10, 16);\r\n }", "function construir_nube_tags($n) {\n\t\t$query = \"SELECT imagenes.id_imagen,imagenes.id_colaborador,imagenes.imagen,imagenes.extension,imagenes.id_tipo_imagen,\n\t\timagenes.estado,imagenes.registrado,imagenes.id_licencia,imagenes.id_autor,imagenes.tags_imagen,\n\t\timagenes.tipo_pictograma,imagenes.validos_senyalectica,imagenes.original_filename\n\t\tFROM imagenes\n\t\tWHERE imagenes.tags_imagen IS NOT NULL\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\twhile ($row=mysql_fetch_array($result)) {\n\t\t\n\t\t$tags_palabra.=$row['tags_imagen'];\n\t\t \n\t\t}\n\t\t\n\t\t $tags1=str_replace('}{',',',$tags_palabra);\n\t\t $tags1=str_replace('{','',$tags1);\n\t\t $tags1=str_replace('}','',$tags1);\n\t\t\n\t\t $tags2=explode(',',$tags1);\n \t\t\t\n\t\t\twhile(list($key,$value) = each($tags2)){\n if (isset($value) && $value !='lse' && $value !='lengua de signos') {\n $tags[$value] += 1;\n }\n }\n\t\t\n\t\t// Ordeno el array de mayor a menor\n\t\tarsort($tags);\n\t\t// Selecciono los primeros n valores (los mas altos)\n\t\t$tags=array_slice($tags, 0, $n);\n\n\t\t//Desordenor el array de nuevo\n\t\t$new=array();\n\t\t$c=count($tags);\n\t\t\n\t\t$k=array_keys($tags);\n\t\t$v=array_values($tags);\n\t\t\n\t\t while($c>0) {\n\t\t\t $i=array_rand($k);\n\t\t\t $new[$k[$i]]=$v[$i];\n\t\t\t unset($k[$i]); #exlude selected number from list\n\t\t\t $c--;\n\t\t }\n\t\t\n\t\t// Compongo el código para ser almacenado en el archivo\n\t\t $nube_tags='<?php ';\n\t\t foreach ($new as $tag => $count) {\n\n\t\t\t$nube_tags.='$tags[\\''.$tag.'\\']='.$count.'; ';\n\t\t }\n\t\t $nube_tags.=' ?>';\n\t\t \t\t \n\t\t // Abro el archivo para escritura\n\t\t $fp2 = fopen(\"../../configuration/tags.inc\", 'w');\n\t\t //chmod(\"../../configuration/tags.inc\", 0777);\n\t\t\n\t\t fwrite($fp2, $nube_tags);\n\t\t fclose($fp2);\n\n\t\tmysql_close($connection);\n\t\treturn true;\n\t}", "function keysist_home_about_array() {\n $keysist_home_about_contents_array = array();\n $bizlight_home_about_args = array(\n 'post_type' => 'caracteristica',\n 'posts_per_page' => 3,\n 'meta_query' => array(\n array(\n 'key' => 'mostrar',\n 'compare' => '=',\n 'value' => 1\n )\n ),\n 'meta_key' => 'orden',\n 'orderby' => 'meta_value',\n 'order' => 'ASC'\n );\n $keysist_home_about_contents_array = array();\n $bizlight_home_about_post_query = new WP_Query($bizlight_home_about_args);\n $i=0;\n if ($bizlight_home_about_post_query->have_posts()) :\n while ($bizlight_home_about_post_query->have_posts()) : $bizlight_home_about_post_query->the_post();\n $keysist_home_about_contents_array[$i]['keysist-home-caracteristica-title'] = get_the_title();\n $keysist_home_about_contents_array[$i]['keysist-home-caracteristica-content'] = bizlight_words_count( 30 ,get_the_content()) ;\n $keysist_home_about_contents_array[$i]['keysist-home-caracteristica-link'] = get_permalink();\n if(get_field('icono')>''):\n $keysist_home_about_contents_array[$i]['keysist-home-caracteristica-icon'] = get_field('icono');\n else:\n $keysist_home_about_contents_array[$i]['keysist-home-caracteristica-icon'] = 'fa-bullhorn';\n endif;\n $i++;\n endwhile;\n wp_reset_postdata();\n else:\n $keysist_home_about_contents_array[0]['keysist-home-caracteristica-title'] = __('Confiabilidad','bizlight');\n $keysist_home_about_contents_array[0]['keysist-home-caracteristica-content'] = __(\" Somos una empresa de servicios de TI especializada en la ejecución de proyectos de infraestructura y desarrollo de Software.\",'bizlight');\n $keysist_home_about_contents_array[0]['keysist-home-caracteristica-link'] = '#';\n $keysist_home_about_contents_array[0]['keysist-home-caracteristica-icon'] = 'fa-bullhorn';\n\n $keysist_home_about_contents_array[1]['keysist-home-caracteristica-title'] = __('Experiencia','bizlight');\n $keysist_home_about_contents_array[1]['keysist-home-caracteristica-content'] = __(\" Más de 400 proyectos puestos en producción durante los últimos 15 años demuestran el compromiso con nuestros clientes, certifican nuestra metodología y reflejan la capacidad de nuestro equipo de profesionales..\",'bizlight');\n $keysist_home_about_contents_array[1]['keysist-home-caracteristica-link'] = '#';\n $keysist_home_about_contents_array[1]['keysist-home-caracteristica-icon'] = 'fa-camera-retro';\n\n $keysist_home_about_contents_array[2]['keysist-home-caracteristica-title'] = __('Ejecución','bizlight');\n $keysist_home_about_contents_array[2]['keysist-home-caracteristica-content'] = __(\" Las organizaciones donde el uso de tecnología de la información es un factor determinante en la búsqueda de eficiencia operativa encontrarán en MicroGestion la mejor opción para llevar a cabo sus proyectos de manera eficaz y repetible..\",'bizlight');\n $keysist_home_about_contents_array[2]['keysist-home-caracteristica-link'] = '#';\n $keysist_home_about_contents_array[2]['keysist-home-caracteristica-icon'] = 'fa-cog';\n endif;\n \n \n \n return $keysist_home_about_contents_array;\n }", "function data_mhs(){\r\n\t\t\techo \"KodeMataKuliah : \".$this->KodeMataKuliah.\"<br />\";\r\n\t\t\techo \"SKS : \".$this->SKS.\"<br />\";\r\n\t\t\techo \"Daftar matakuliah yang diambil:<br />\";\r\n\t\t\t\r\n\t\t\t$i = 0; // nomor urut daftar SKS matakuliah yang diambil\r\n\t\t\tforeach($this->NamaMataKuliah as $mk){\r\n\t\t\t\techo ++$i.\". \".$mk.\"<br />\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Cuma buat ganti baris aja kok :-)\r\n\t\t\techo \"<br />\";\r\n\t\t}", "public function getOudtshoornWestSimilarPropertyOnShow(){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT properties.property_id, property_type, property_desc, price, num_bathrooms, street_no, \n\t\t\t\t street_name, num_beds, num_garages, property_image_id, image_location, suburbs.suburb_id, \n\t\t\t\t\t\t suburb_name, cities.city_id, city_name, municipalities.municipality_id, municipalities.municipality_name,\n\t\t\t\t\t\t agents.agent_id, firstname, lastname, email, phone, agencies.agency_id, agency_name, logo \n\t\t\t\t\t\t FROM property_images \n\t\t\t\t\t\t LEFT JOIN properties\n\t\t\t\t\t\t ON property_images.property_id = properties.property_id\n\t\t\t\t\t\t LEFT JOIN suburbs\n\t\t\t\t\t\t ON properties.suburb_id = suburbs.suburb_id\n\t\t\t\t\t\t LEFT JOIN cities\n\t\t\t\t\t\t ON suburbs.city_id = cities.city_id\n\t\t\t\t\t\t LEFT JOIN municipalities\n\t\t\t\t\t\t ON cities.municipality_id = municipalities.municipality_id\n\t\t\t\t\t\t LEFT JOIN agents\n\t\t\t\t\t\t ON properties.agent_id = agents.agent_id\n\t\t\t\t\t\t LEFT JOIN agencies\n\t\t\t\t\t\t ON agents.agency_id = agencies.agency_id\n\t\t\t\t\t\t WHERE municipalities.municipality_id = 102\n\t\t\t\t\t\t AND properties.property_status = 'On Show'\n\t\t\t\t\t\t GROUP BY properties.property_id\n\t\t\t\t\t\t DESC\n\t\t\t\t\t\t LIMIT 3\n\t\t\t\t\t\t \";\n\t\t\t\t$result = $this->conn->query($query);\n\n\t\t\t $properties = array();\n\t\t\t\t\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$agency = new Agency();\n\t\t\t\t\t$agency->setAgencyID($row['agency_id']);\n\t\t\t\t\t$agency->setAgencyName($row['agency_name']);\n\t\t\t\t\t$agency->setLogo($row['logo']);\n\t\t\t\t\t\n\t\t\t\t\t$agent = new Agent();\n\t\t\t\t\t$agent->setAgentID($row['agent_id']);\n\t\t\t\t\t$agent->setFirstname($row['firstname']);\n\t\t\t\t\t$agent->setLastname($row['lastname']);\n\t\t\t\t\t$agent->setEmail($row['email']);\n\t\t\t\t\t$agent->setPhone($row['phone']);\n\t\t\t\t\t$agent->setAgency($agency);\n\t\t\t\t\t\n\t\t\t\t\t$munucipality = new Municipality();\n\t\t\t\t\t$munucipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$munucipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\n\t\t\t\t\t$city = new City();\n\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t$city->setMunicipality($munucipality);\n\t\t\t\t\t\n\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t$suburb->setCity($city);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$property = new Property();\t\t\n\t\t\t\t\t$property->setPropertyID($row['property_id']);\t\t\t\n\t\t\t\t\t$property->setSuburb($suburb);\t\n\t\t\t\t\t$property->setAgent($agent);\n\t\t\t\t\t$property->setNumBathRoom($row['num_bathrooms']);\n\t\t\t\t\t$property->setNumBed($row['num_beds']);\n\t\t\t\t\t$property->setNumGarage($row['num_garages']);\t\n\t\t\t\t\t$property->setStreetNo($row['street_no']);\t\n\t\t\t\t\t$property->setStreetName($row['street_name']);\t\n\t\t\t\t\t$property->setPropertyDescription($row['property_desc']);\t\n\t\t\t\t\t$property->setPropertyType($row['property_type']);\t\t\n\t\t\t\t\t$property->setPrice($row['price']);\t\n\t\t\t\t\t$property->setImageLocation($row['image_location']);\n\t\t\t\t\t$property->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$property->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$property->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t$property->setCityID($row['city_id']);\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $properties;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "public function index()\n {\n $horarios = Horario::orderBy('linha', 'ASC')->orderBy('horario','ASC')->get();\n $campi = Campus::all();\n $linhas = Linha::all();\n foreach($horarios as $horario){\n foreach($campi as $campus){\n if($horario->campus == $campus->id){\n $horario->campus = $campus->nomeCampus;\n }\n }\n foreach($linhas as $linha){\n if($horario->linha == $linha->id){\n $horario->linha = $linha->nomeLinha;\n }\n }\n if($horario->chegada!=null){\n $horario->chegada='Sim';\n }\n }\n return view('horarios.index', compact('horarios'));\n }", "public function getHival() {}", "public static function inferensi($nilaiIPK, $nilaiPenghasilan, $nilaiJarak, $nilaiTanggungan, $nilaiRumah, $nilaiMotor, $nilaiMobil, $nilaiListrik, $nilaiAir) {\n\n echo \"Rule yang digunakan : \\n\";\n $x = 0;\n $kondisi = [];\n\n for ($ip = 0; $ip < count($nilaiIPK); $ip++) {\n for ($pn = 0; $pn < count($nilaiPenghasilan); $pn++) {\n for ($jr = 0; $jr < count($nilaiJarak); $jr++) {\n for ($tg = 0; $tg < count($nilaiTanggungan); $tg++) {\n for ($rm = 0; $rm < count($nilaiRumah); $rm++) {\n for ($mt = 0; $mt < count($nilaiMotor); $mt++) {\n for ($mb = 0; $mb < count($nilaiMobil); $mb++) {\n for ($ls = 0; $ls < count($nilaiListrik); $ls++) {\n for ($ai = 0; $ai < count($nilaiAir); $ai++) {\n if (($nilaiIPK[$ip] > 0) && ($nilaiPenghasilan[$pn] > 0) && ($nilaiJarak[$jr] > 0) && ($nilaiTanggungan[$tg] > 0) && ($nilaiRumah[$rm] > 0) && ($nilaiMotor[$mt] > 0) && ($nilaiMobil[$mb] > 0) && ($nilaiListrik[$ls] > 0) && ($nilaiAir[$ai] > 0)) {\n $alpha[$x] = min($nilaiIPK[$ip], $nilaiPenghasilan[$pn], $nilaiJarak[$jr], $nilaiTanggungan[$tg], $nilaiRumah[$rm], $nilaiMotor[$mt], $nilaiMobil[$mb], $nilaiListrik[$ls], $nilaiAir[$ai]);\n if ($ip == 2 && $jr == 2 && $pn == 1 && $tg == 2 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 2 && $pn == 1 && $tg == 1 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 2 && $pn == 0 && $tg == 2 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 2 && $pn == 0 && $tg == 1 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 1 && $pn == 1 && $tg == 2 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 1 && $pn == 1 && $tg == 1 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 1 && $pn == 0 && $tg == 2 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 1 && $pn == 0 && $tg == 1 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 0 && $pn == 1 && $tg == 2 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 0 && $pn == 1 && $tg == 1 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 0 && $pn == 0 && $tg == 2 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 0 && $pn == 0 && $tg == 1 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else {\n $z[$x] = self::z_tidakDapat($alpha, $x);\n $kondisi[$x] = \"tidak dapat\";\n }\n echo \"IF IPK = {$nilaiIPK[$ip]} AND Penghasilan = {$nilaiPenghasilan[$pn]} AND Jarak = {$nilaiJarak[$jr]} AND Tanggungan = {$nilaiTanggungan[$tg]} AND Rumah = {$nilaiRumah[$rm]} AND Motor = {$nilaiMotor[$mt]} AND Mobil = {$nilaiMobil[$mb]} AND Listrik = {$nilaiListrik[$ls]} AND Air = {$nilaiAir[$ai]} THEN a_predikat = {$alpha[$x]} z = {$z[$x]} kondisi = {$kondisi[$x]} \\n\";\n $x++;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n self::defuzzifikasi($alpha, $z);\n }", "private function makeMachineMove(){\n\t\t$spaces = $this->getAvaibleSpaces();\n\t $space = $spaces[rand()%count($spaces)];\n\t\t$this->gato[$space[0]][$space[1]] = $this->jugador2;\n\t\treturn $space[0].\":\".$space[1];\n\t}", "function __construct () { // Metodo Constructor: __construct nueva forma de hacer un constructor.\n\n // Caracteristicas iniciales de la clase. Definiendo el valor de las variables definidas fuera del constructor.\n $this -> ruedas = 4; // this: es como decir \"coche\". Estamos diciendo que la clase partira con 4 ruedas inicialmente.\n $this -> color = \"\";\n $this -> motor = 1600;\n }", "public function run()\n {\n $Locations = [\n [\"Sol\", 1, 1, 1, 1, 1],\n [\"Earth\", 2, 1, 2, 1, 1],\n [\"Luna\", 3, 1, 3, 1, 1],\n [\"Mercury\", 4, 1, 2, 1, 1],\n [\"Venus\", 5, 1, 2, 1, 1],\n [\"Mars\", 6, 1, 2, 1, 1],\n [\"Herschel Belt\", 7, 1, 7, 1, 1],\n [\"Jupiter\", 8, 1, 2, 1, 1],\n [\"Saturn\", 9, 1, 2, 1, 1],\n [\"Uranus\", 10, 1, 2, 1, 1],\n [\"Sol - Davien\", 11, 1, 6, 1, 1],\n [\"Neptune\", 12, 1, 2, 1, 1],\n [\"Pluto\", 13, 1, 4, 1, 1],\n [\"Sol - Croshaw\", 14, 1, 6, 1, 1],\n [\"Kuiper Belt\", 15, 1, 7, 1, 1],\n [\"TDD Kesner\", 16, 1, 5, 1, 1],\n [\"Phobos\", 17, 1, 3, 1, 1],\n [\"Deimos\", 18, 1, 3, 1, 1],\n [\"IMS Bolliver\", 19, 1, 5, 1, 2],\n [\"Ganymede\", 20, 1, 3, 1, 1],\n [\"Europa\", 21, 1, 3, 1, 1],\n [\"Io\", 22, 1, 3, 1, 1],\n [\"Callisto\", 23, 1, 3, 1, 1],\n [\"Tethys\", 24, 1, 3, 1, 1],\n [\"Rhea\", 25, 1, 3, 1, 1],\n [\"Iapetus\", 26, 1, 3, 1, 1],\n [\"Titan\", 27, 1, 3, 1, 1],\n [\"Dione\", 28, 1, 3, 1, 1],\n [\"INS Dunleavy\", 29, 1, 5, 1, 3],\n [\"Miranda\", 30, 1, 3, 1, 1],\n [\"Ariel\", 31, 1, 3, 1, 1],\n [\"Oberon\", 32, 1, 3, 1, 1],\n [\"Titania\", 33, 1, 3, 1, 1],\n [\"Umbriel\", 34, 1, 3, 1, 1],\n [\"Charon\", 35, 1, 3, 1, 1],\n [\"Pyro\", 36, 6, 1, 5, 4],\n [\"Pyro - Cano\", 37, 6, 6, 5, 4],\n [\"Pyro 1\", 38, 6, 2, 5, 4],\n [\"Akrio Cluster\", 39, 6, 7, 5, 4],\n [\"Pyro 2\", 40, 6, 2, 5, 4],\n [\"Pyro 3\", 41, 6, 2, 5, 4],\n [\"Pyro - Tera\", 42, 6, 6, 5, 4],\n [\"Pyro 4\", 43, 6, 2, 5, 4],\n [\"Pyro - Nyx\", 44, 6, 6, 5, 4],\n [\"Pyro 5\", 45, 6, 2, 5, 4],\n [\"Pyro - Stanton\", 46, 6, 6, 5, 4],\n [\"Pyro - Castra\", 47, 6, 6, 5, 4],\n [\"Pyro - Oso\", 48, 6, 6, 5, 4],\n [\"Pyro - Hadrian\", 49, 6, 6, 5, 4],\n [\"Pyro 6\", 50, 6, 6, 5, 4],\n [\"Tayac\", 51, 54, 1, 1, 1],\n [\"Tayac 1\", 52, 54, 2, 1, 1],\n [\"The Ark\", 53, 54, 5, 1, 1],\n [\"Tayac - Baker\", 54, 54, 6, 1, 1],\n [\"Tayac - Terra\", 55, 54, 6, 1, 1],\n [\"Tayac 2\", 56, 54, 2, 1, 1],\n [\"Tayac - Goss\", 57, 54, 6, 1, 1],\n [\"Shepherd\", 58, 54, 4, 1, 1],\n [\"Terra Nova\", 59, 68, 1, 1, 1],\n [\"Aero\", 60, 68, 2, 1, 1],\n [\"Pike\", 61, 68, 2, 1, 1],\n [\"Terra\", 62, 68, 2, 1, 1],\n [\"Gen\", 63, 68, 2, 1, 1],\n [\"Terra - Taranis\", 64, 68, 6, 1, 1],\n [\"Terra - Goss\", 65, 68, 6, 1, 1],\n [\"Terra - Stanton\", 66, 68, 6, 1, 1],\n [\"Terra - Pyro\", 67, 68, 6, 1, 1],\n [\"Terra - Magnus\", 68, 68, 6, 1, 1],\n [\"Terra - Hadrian\", 69, 68, 6, 1, 1],\n [\"Marisol Belt\", 70, 68, 7, 1, 1],\n [\"Henge Cluster\", 71, 68, 7, 1, 1],\n [\"IAS Hammett\", 72, 68, 5, 1, 1],\n [\"ICS Evolen\", 73, 68, 5, 1, 1],\n [\"INS Reilly\", 74, 68, 5, 1, 1],\n [\"Terra - Tayac\", 75, 68, 6, 1, 1],\n [\"Stanton\", 77, 49, 1, 1, 1],\n [\"Hurston\", 78, 49, 2, 1, 6],\n [\"Arccorp\", 79, 49, 2, 1, 7],\n [\"Crusader\", 80, 49, 2, 1, 8],\n [\"Covalex Hub Gundo\", 81, 49, 5, 1, 10],\n [\"Cry-Astro Service\", 82, 49, 5, 1, 11],\n [\"Commarray SCC\", 83, 49, 5, 1, 12],\n [\"ICC Scanhub Stanton\", 84, 49, 5, 1, 1],\n [\"Port Olisar\", 85, 49, 5, 1, 8],\n [\"Security Post Kareah\", 86, 49, 5, 1, 9],\n [\"Yela\", 87, 49, 3, 1, 1],\n [\"Daymar\", 88, 49, 3, 1, 1],\n [\"Cellin\", 89, 49, 3, 1, 1],\n [\"Ruin Station\", 90, 6, 5, 5, 5]\n ];\n\n foreach ($Locations as $LocationDatum) {\n Location::create([\n 'name' => $LocationDatum[0],\n 'system_id' => $LocationDatum[2],\n 'celestial_type_id' => $LocationDatum[3],\n 'allegiance_id' => $LocationDatum[4],\n 'affiliation_id' => $LocationDatum[5]\n ]);\n }\n }", "public function mostra(){\n }", "private function announceZadachki()\n {\n foreach ($this->zadachki as $zadachka) {\n echo $zadachka;\n }\n }", "function cl_ensino() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"ensino\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function getBobotNilai();", "static function nalogMeni($sesija){\n\t\t$meni=\"\";\n\t\t($sesija['id']!=null) ? $meni.=\"<a class='stavka_nalog_menija' href='/pilot/odjavljivanje'>odjavi se [ \".$sesija['kor_ime'].\" ]</a><a class='stavka_nalog_menija' href='/pilot/profil'>profil</a>\" : \n\t\t\t\t\t\t\t\t\t $meni.=\"<a class='stavka_nalog_menija' href='/pilot/prijavljivanje'>prijavi se</a>\n\t\t\t\t\t\t\t\t\t\t\t<a class='stavka_nalog_menija' href='/pilot/registracija'>registruj se</a>\";\n\t\treturn $meni;\n\t}", "public function indexForHogarWinideas(){\n //Título de la página\n $titulo = 'Hogar y estilo de vida';\n //Obtiene el primer registro y color de cada modelo\n $colors = DB::table('colores')->select(DB::raw('modelo, max(color) as color, min(codigo_color) as codigo_color'))->groupBy('modelo');\n //Join para juntar un color, modelo e información\n $hogar = DB::table('articulos')->where('categoria','Hogar y estilo de vida')->joinSub($colors,'colors',function ($join){\n $join->on('articulos.modelo','=','colors.modelo');\n })->get()->sortBy('subcategoria'); \n //Retorno de variables a vista\n return view('categories.hogar',compact('hogar', 'titulo'));\n }", "function ponerHorasTaller(){\n // y precios 15 1h, 21, 1.5h, 31 2h.\n $sql=\"SELECT id,precio_trimestre FROM casal_talleres WHERE id_curso=4 AND tipo_taller='Professional'\";\n $result=$this->db->query($sql)->result();\n foreach($result as $k=>$v){\n $horasSesion=0;\n $id=$v->id;\n if($v->precio_trimestre=='21') $horasSesion=1.5*1100;\n if($v->precio_trimestre=='31') $horasSesion=2*1100;\n if($v->precio_trimestre=='15') $horasSesion=1*1100;\n $sql=\"UPDATE casal_talleres SET horas_taller_T1='$horasSesion', horas_taller_T2='$horasSesion', horas_taller_T3='$horasSesion'WHERE id='$id'\";\n $this->db->query($sql);\n }\n }", "public function Matrix($wine)\n{\n\tfor($i=0; $i<=$wine; $i++)\n\tfor($j=0; $j<=$wine; $j++) \n\t\n\t$this->glasses[$i][$j]=0;\n}", "public function run()\n {\n \n $hill = Hill::create([\n 'name' => 'Rysy',\n 'height' => 2503,\n 'description' => 'Od východného vrcholu tvorí prvý hraničný bod medzi Slovenskom a Poľskom na hlavnom hrebeni a severozápadný vrchol je najvyšším bodom Poľska. Na sever vysiela dlhý vedľajší hrebeň medzi Dolinu Rybiego Potoku a Bielovodskú dolinu. Medzi Rysmi a najbližším západným susedom - Žabím koňom, leží Žabie sedlo. Od Ťažkého štítu na juhovýchode oddeľuje Rysy sedlo Váha a od Malých Rysov v bočnom, na sever vybiehajúcom hrebeni Sedielko pod Rysmi. Horolezecky najatraktívnejšia je 400 metrová východná stena.[3]\n\n Rysy majú tri vrcholy:\n \n prostredný (hlavný) (2 503,0 m n. m.),[1] leží na Slovensku.\n severozápadný (2 498,7 m n. m.),[1] najvyšší bod Poľska.\n juhovýchodný (2 473 m n. m.), leží na Slovensku.\n \n Turisticky prístupný severozápadný vrchol Rysov (2 498,7 m n. m.) - najvyšší bod Poľska\n Severozápadný vrchol zároveň slúži, od roku 2000, ako hraničný peší prechod po červená turistická značka červenej značke do Poľska. Otvorený je v čase letnej turistickej sezóny. Rysy (ich severozápadný vrchol) sú najvyšším bodom Poľska.\n \n Na úbočí Rysov sa v nadmorskej výške 2 250 m n. m. nachádza najvyššie položená horská chata v Tatrách i na Slovensku, Chata pod Rysmi.\n \n Na úpätí Rysov (na slovenskej strane) sa nachádzajú 3 malé karovo-morénové jazerá - Žabie plesá (Veľké, Malé a Vyšné), na poľskej strane ležia dve plesá: Czarny Staw pod Rysami a najväčšie tatranské pleso - Morskie Oko.',\n 'latitude' => 49.17906,\n 'longitude' => 20.08855,\n 'mountain_id' => 1,\n 'thumbnail_path' => 'https://upload.wikimedia.org/wikipedia/commons/thumb/1/1e/Rysy_2.jpg/1280px-Rysy_2.jpg'\n ]);\n HillImage::create([\n 'hill_id' => $hill->id,\n 'path' => 'https://upload.wikimedia.org/wikipedia/commons/thumb/9/96/Rysy_004.JPG/1280px-Rysy_004.JPG'\n ]);\n HillImage::create([\n 'hill_id' => $hill->id,\n 'path' => 'https://upload.wikimedia.org/wikipedia/commons/thumb/b/bd/Chata_pod_Rysmi_001.JPG/1280px-Chata_pod_Rysmi_001.JPG'\n ]);\n\n\n $hill = Hill::create([\n 'name' => 'Kriváň',\n 'height' => 2494,\n 'description' => 'Kriváň (poľ. Krywań, nem. Kriwan, maď. Kriván) je vrch na konci rázsochy, ktorá sa od hlavného hrebeňa Vysokých Tatier odvetvuje v Čubrine. Leží nad Nefcerkou, Kôprovou a Važeckou dolinou na svojimi J a JZ výbežkami zasahuje do Liptovskej kotliny. Je to jeden z najvyšších vrchov Slovenska. Dosahuje výšku 2 494,7 m n. m. Od 19. storočia je neoficiálnym symbolom slobody Slovákov a slovanskej súdržnosti.\n\n Medzi rokmi 1960 až 1990 bol zobrazený s vatrou na znaku Slovenska v štátnom znaku Česko-Slovenska. Dočasne nahradil tradičný slovenský znak s trojvrším a krížom, ktorý je dnes v štátnej symbolike Slovenskej republiky. V roku 2005 bolo rozhodnuté, že bude zobrazený aj na slovenských eurominciach. Po Kriváni je pomenovaná aj planétka (24260) Kriváň.',\n 'latitude' => 49.162778,\n 'longitude' => 19.999722,\n 'mountain_id' => 1,\n 'thumbnail_path' => 'https://upload.wikimedia.org/wikipedia/commons/thumb/8/84/Kriv%C3%A1%C5%88.JPG/1280px-Kriv%C3%A1%C5%88.JPG'\n ]);\n HillImage::create([\n 'hill_id' => $hill->id,\n 'path' => 'https://upload.wikimedia.org/wikipedia/commons/thumb/c/c8/Z%C3%A1pad_slnka_za_Kriv%C3%A1%C5%88om.jpg/1280px-Z%C3%A1pad_slnka_za_Kriv%C3%A1%C5%88om.jpg'\n ]);\n HillImage::create([\n 'hill_id' => $hill->id,\n 'path' => 'https://upload.wikimedia.org/wikipedia/commons/thumb/8/89/Vrcholov%C3%BD_kr%C3%AD%C5%BE_na_Kriv%C3%A1ni.jpg/1280px-Vrcholov%C3%BD_kr%C3%AD%C5%BE_na_Kriv%C3%A1ni.jpg'\n ]);\n \n\n $hill = Hill::create([\n 'name' => 'Ďumbier',\n 'height' => 2043,\n 'description' => 'Ďumbier sa na severe javí ako mohutný vysokohorský masív s 500 m vysokými stenami, piliermi a žliabkami do ľadovcových kotlov v koncoch Bystrej a Ludárovej doliny. Miernejšie južné svahy pokrýva pole žulových balvanov. Vrch je súčasťou hlavného hrebeňa, ktorý sa práve v masíve Ďumbiera rozdvojuje a pokým východne smerujúce rameno zakončuje mohutná Štiavnica, juhovýchodne smerujúce rameno vedie cez Králičku do sedla Čertovica a pokračuje Kráľovohoľskými Tatrami. Severným smerom vybieha rázsocha Ludárovej hole. Severné svahy odvodňuje Bystrá a Ludárov potok, smerujúce Štiavnicou do Váhu, z južnej časti prúdi voda Bystriankou do Hrona.',\n 'latitude' => 48.93661,\n 'longitude' => 19.64017,\n 'mountain_id' => 2,\n 'thumbnail_path' => 'https://upload.wikimedia.org/wikipedia/commons/thumb/6/6d/%C4%8Eumbier1.JPG/1280px-%C4%8Eumbier1.JPG'\n ]);\n\n HillImage::create([\n 'hill_id' => $hill->id,\n 'path' => 'https://upload.wikimedia.org/wikipedia/commons/thumb/2/29/%C4%8Eumbier_001.JPG/1280px-%C4%8Eumbier_001.JPG'\n ]);\n HillImage::create([\n 'hill_id' => $hill->id,\n 'path' => 'https://upload.wikimedia.org/wikipedia/commons/thumb/0/05/%C4%8Eumbier_003.JPG/1280px-%C4%8Eumbier_003.JPG'\n ]);\n\n\n $hill = Hill::create([\n 'name' => 'Chopok',\n 'height' => 2023,\n 'description' => 'Chopok, ležiaci v srdci pohoria, patrí medzi najnavštevovanejšie lokality Nízkych Tatier. Môže za to jednoduchá dostupnosť lanovkami, ktoré zo severu (z Jasnej) i juhu (zo Srdiečka) pohodlne vyvezú turistov na hrebeň pod samotný vrchol. Vrch tak býva častým východiskom túr na Ďumbier a ku Chate generála Milana Rastislava Štefánika, s pokračovaním cez Králičku do sedla Čertovica. Mimo hlavného vrcholu, pod ktorým stojí Kamenná chata pod Chopkom, je západne od rotundy - vrcholovej stanice druhý, nižší vrchol. V jeho blízkosti je inštalovaná meteorologická stanica. Severovýchodne sa nachádza mohutný ľadovcový kotol s Lukovým plieskom. Severné svahy odvodňujú prítoky Demänovky, južné svahy odvádzajú vodu do riečky Bystrianka.\n\n\n Meteorologická stanica a stanica bývalej lanovky neďaleko vrcholu Chopka.\n Svahy Chopka sú vyhľadávaným miestom zimnej i letnej turistiky: stredisko Jasná leží na severnej Liptovskej a stredisko Kosodrevina na južnej Horehronskej strane. V decembri 2012 bolo obnovené spojenie oboch regiónov lanovkami.',\n 'latitude' => 48.94301,\n 'longitude' => 19.59313,\n 'mountain_id' => 2,\n 'thumbnail_path' => 'https://upload.wikimedia.org/wikipedia/commons/thumb/d/d1/Pohled_na_zimni_Chopok.jpg/1280px-Pohled_na_zimni_Chopok.jpg'\n ]);\n\n HillImage::create([\n 'hill_id' => $hill->id,\n 'path' => 'https://upload.wikimedia.org/wikipedia/commons/thumb/4/49/Chopok_stanica.JPG/1280px-Chopok_stanica.JPG'\n ]);\n HillImage::create([\n 'hill_id' => $hill->id,\n 'path' => 'https://upload.wikimedia.org/wikipedia/commons/thumb/d/d1/Pohled_na_zimni_Chopok.jpg/1280px-Pohled_na_zimni_Chopok.jpg'\n ]);\n\n\n $hill = Hill::create([\n 'name' => 'Veľký Kriváň',\n 'height' => 2023,\n 'description' => 'Tento lúčnatý vrch s vrcholom nad hornou hranicou rozšírenia kosodreviny je výborným vyhliadkovým bodom s kruhovým výhľadom. Veľký Kriváň pokrývajú sčasti suťové polia, časť svahov pokrývajú porasty čučoriedky obyčajnej. Veľká nadmorská výška a hôľnatý vrchol poskytujú kruhový výhľad na okolité vrcholy i pohoria. Pri vhodných podmienkach je viditeľná napr. Babia hora i Pilsko v Oravských Beskydách, Veľký Choč a vrchy Západných aj Vysokých Tatier, mnohé vrchy Veľkej Fatry a Nízkych Tatier, Strážov, západným smerom Lysá hora, Kněhyně a Smrk v Moravsko-sliezskych Beskydách i Veľká Rača a mnohé ďalšie vrcholy Kysuckých Beskýd.',\n 'latitude' => 49.18765,\n 'longitude' => 19.03097,\n 'mountain_id' => 3,\n 'thumbnail_path' => 'https://upload.wikimedia.org/wikipedia/commons/thumb/d/d7/N%C3%A1rodn%C3%AD_park_Mal%C3%A1_Fatra%2C_Ve%C4%BEk%C3%BD_Kriv%C3%A1%C5%88.JPG/1280px-N%C3%A1rodn%C3%AD_park_Mal%C3%A1_Fatra%2C_Ve%C4%BEk%C3%BD_Kriv%C3%A1%C5%88.JPG'\n ]);\n\n HillImage::create([\n 'hill_id' => $hill->id,\n 'path' => 'https://upload.wikimedia.org/wikipedia/commons/thumb/3/3b/Ve%C4%BEk%C3%BD_Kriv%C3%A1%C5%88_a_Snilovsk%C3%A9_Sedlo_-_panoramio.jpg/1280px-Ve%C4%BEk%C3%BD_Kriv%C3%A1%C5%88_a_Snilovsk%C3%A9_Sedlo_-_panoramio.jpg'\n ]);\n HillImage::create([\n 'hill_id' => $hill->id,\n 'path' => 'https://upload.wikimedia.org/wikipedia/commons/thumb/f/fd/Velk%C3%BD_Kriv%C3%A1%C5%88_ze_Snilovsk%C3%A9ho_sedla.jpg/1280px-Velk%C3%BD_Kriv%C3%A1%C5%88_ze_Snilovsk%C3%A9ho_sedla.jpg'\n ]);\n\n\n $hill = Hill::create([\n 'name' => 'Veľký Rozsutec',\n 'height' => 1609,\n 'description' => 'Rázovitý vrch sa nachádza na severnom okraji pohoria, v geomorfologickom podcelku Krivánska Fatra a jej atraktívnej časti Rozsutce.[4] Vrch leží v Žilinskom kraji, na rozhraní okresov Žilina a Dolný Kubín a zasahuje na katastrálne územia obcí Terchová a Párnica[5], okrajovo severným úbočím aj Zázrivá. Najbližší vrchol v hlavnom hrebeni je južne ležiaci Stoh (1 607 m n. m.), západným susedom sú Boboty (1 085 m n. m.), severným Malý Rozsutec (1 344 m n. m.) a juhovýchodným Osnica (1 363 m n. m.).',\n 'latitude' => 49.2316,\n 'longitude' => 19.0985,\n 'mountain_id' => 3,\n 'thumbnail_path' => 'https://upload.wikimedia.org/wikipedia/commons/thumb/2/20/Velky_Rozsutec.jpg/1280px-Velky_Rozsutec.jpg'\n ]);\n\n HillImage::create([\n 'hill_id' => $hill->id,\n 'path' => 'https://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Rozsutec_v_zime.jpg/1280px-Rozsutec_v_zime.jpg'\n ]);\n HillImage::create([\n 'hill_id' => $hill->id,\n 'path' => 'https://upload.wikimedia.org/wikipedia/commons/f/f6/Rozsutec.jpg'\n ]);\n\n\n $hill = Hill::create([\n 'name' => 'Veľký Choč',\n 'height' => 1611,\n 'description' => 'Veľký Choč je s výškou 1 611 m n. m. dominantým vrchom Chočských vrchov, viditeľný už od Štrby a z celej Dolnej Oravy. Vrchol je turisticky veľmi vyhľadávaný. Má tvar nepravidelnej pyramídy s početnými bralnými partiami. Z vrcholu Choča je vynikajúci kruhový výhľad. Jeho vrchol je porastený kosodrevinou, od Valaskej Dubovej má mierne stúpajúci tvar, kým zo severu a od Lúčok je v príkrom zráze.\n\n Vrch bol ospievaný mnohými básnikmi, medzi inými aj P. O. Hviezdoslavom, ktorý pochádzal z Vyšného Kubína, ležiaceho priamo pod Veľkým Chočom. Choč je považovaný za jeden z najkrajších vrchov Slovenska.',\n 'latitude' => 49.15097,\n 'longitude' => 19.34341,\n 'mountain_id' => 4,\n 'thumbnail_path' => 'https://upload.wikimedia.org/wikipedia/commons/thumb/e/e7/View_of_Tatras_from_Choc.jpg/1280px-View_of_Tatras_from_Choc.jpg'\n ]);\n\n HillImage::create([\n 'hill_id' => $hill->id,\n 'path' => 'https://upload.wikimedia.org/wikipedia/commons/thumb/e/e7/View_of_Tatras_from_Choc.jpg/1280px-View_of_Tatras_from_Choc.jpg'\n ]);\n HillImage::create([\n 'hill_id' => $hill->id,\n 'path' => 'https://upload.wikimedia.org/wikipedia/commons/thumb/1/14/Velky_Choc_from_Liptov.jpg/1280px-Velky_Choc_from_Liptov.jpg'\n ]);\n \n \n $hill = Hill::create([\n 'name' => 'Prosečné',\n 'height' => 1372,\n 'description' => 'Prosečné je výrazný vrch v Chočských vrchoch na Slovensku, najvyšší bod ich najvýchodnejšieho rovnomenného podcelku.\n\n Jeho masív je zo severu ohraničený Zubereckou brázdou, z východu Kvačianskou dolinou, z juhu Liptovskou kotlinou a zo západu Prosieckou dolinou. Budovaný je dolomitmi a vápencami.',\n 'latitude' => 49.1747,\n 'longitude' => 19.5136,\n 'mountain_id' => 4,\n 'thumbnail_path' => 'https://upload.wikimedia.org/wikipedia/commons/thumb/6/68/Velke_borove_leto_pohlad_na_prosecne.jpg/1280px-Velke_borove_leto_pohlad_na_prosecne.jpg'\n ]);\n\n }", "public function elso()\n {\n }", "public function cargarHorasPorMateria($horas){\n\t\t$materia=$horas->getMateria();\n\n\t\t$this->db=Database::getInstance();\n\t\t$sql=\"SELECT * FROM horario a, materia b, horas c WHERE a.idMateria=b.idMateria and c.codHora=a.codHora and b.idMateria='$materia' order by c.dia, c.horaInicial\";\n\t\t//echo $sql;\n\t\t$result=$this->db->get_data($sql);\n\t\t//echo $result[\"DATA\"];\n\t\treturn $result;\n\t}", "function obtenerSalarioNeto($nombre, $apellido, $salario, $horasExtras){\r\n \t//This hace referencia a un objeto ya instanciado para mandar llamar funciones de cualquier otro tipo.\r\n $this->nombre = $nombre;\r\n $this->apellido = $apellido;\r\n $this->isss = ($salario + $horasExtras*$this->pagoxhoraextra) * self::descISSS;\r\n $this->renta = ($salario + $horasExtras*$this->pagoxhoraextra) * self::descRENTA;\r\n $this->afp = ($salario + $horasExtras*$this->pagoxhoraextra) * self::descAFP;\r\n $this->sueldoNominal = $salario; \r\n $this->sueldoLiquido = $salario + $horasExtras*$this->pagoxhoraextra - ($this->isss +\r\n$this->renta + $this->afp);\r\n $this->imprimirBoletaPago(self::$idEmpleado, $this->nombre, $this->apellido, \r\n $this->isss, $this->renta, $this->afp, $this->sueldoNominal, $horasExtras*$this-> pagoxhoraextra,\r\n$this->sueldoLiquido);\r\n }", "public function alimentar()\n {\n }", "public function command()\n\t{\n\t\tif(count($this->arguments) == 0){\n\t\t$this->say(\"Con este comando puedes buscar salas.\\nUsa:\".$this->help);\n\t\t$this->say(\"Por ejemplo, si quieres buscar Electromagnetismo, escribe: horario electro, horario Electromagnetismo, etc...\");\n\t\treturn;\n\t\t}\n\t\t$message = implode(' ', $this->arguments);\n\t\t$this->say('Salas UAI: Buscando horarios🔎');\n\t\t$args = $this->arguments;\n\t\tif(stristr((string)$message,'viña') !== FALSE || stristr((string)$message,'vina') !== FALSE) {\n\t\t $l='vina';\n\t\t $message = str_replace(\"vina\", \"\", $message);\n\t\t $message = str_replace(\"viña\", \"\", $message);\n\t\t}\n\t\telse {\n\t\t $l='santiago';\n\t\t}\n\t\t$getJson = $this->fetch(\"http://api.salasuai.com/units/location/\".urlencode($l).\"/search/\".urlencode($message));\n\t\t$ramos = json_decode($getJson);\n\t\tif($ramos){\n\t\t$data = \"\";\n\t\t$separator = \"\";\n\t\tforeach($ramos as $ramo){\n\t\t$i=0;\n\t\t$separator=null;\n\t\twhile ($i < strlen($ramo->name)) {\n\t\t$separator = '_'.$separator;\n\t\t$i++;\n\t\t}\n\t\tif($ramo->section!=\"\"|| $ramo->section){\n\t\t\t$section=\"\\n📚Sec.\".$ramo->section;\n\t\t}\n\t\telse{\n\t\t\t$section=null;\n\t\t}\n\t\t$data=\"\\t\\t🕐\".$ramo->module.\"🕐\\t\\n🎓\".\n\t\t\t\t\t\tmb_strtoupper($ramo->name,'UTF-8').\"🎓\".$section.\"\\n👤\".\n\t\t\t\t\t\tucwords($ramo->teacher).\"\\n🚪\".\n\t\t\t\t\t\t$ramo->classroom.\"\\n\".$separator.\"\\n\".\n\t\t\t\t\t\t$data;\n\t\t}\n\t\tif (strlen($data)<=3028){\n\t\t$this->say($data);\n\t\t}\n\t\telse {\n\t\t$this->say(\"Salas UAI: Utiliza un criterio mas especifico. Muchos resultados.\");\n\t\t}\n\t\t}\n\t\telse{\n\t\t\t$this->say('SalasUAI: ⚠No encontre ningun ramo :(');\n\t\t\t$this->say('SalasUAI: Revisa http://www.salasuai.com');\n\t\t\t$this->say('Ejemplo de Uso: horario contabilidad, horario electro');\n\t\t\treturn;\n\t\t}\n\t}", "function grafico_1( $desde, $hasta, $ua ){\n\t$query = \"select nested.id_cliente, noticiasactor.id_actor, nested.tema from \"\n\t. \"( select procesados.* from ( select noticiascliente.* from noticiascliente inner join proceso on noticiascliente.id_noticia = proceso.id_noticia where noticiascliente.id_cliente = \" . $ua . \" ) procesados \"\n\t. \"inner join noticia on noticia.id = procesados.id_noticia where noticia.fecha between '\" . $desde . \" 00:00:01' and '\" . $hasta . \" 23:59:59') nested \"\n\t. \"inner join noticiasactor on nested.id_noticia = noticiasactor.id_noticia order by id_actor asc \";\n\t$main = R::getAll($query);\n\t// obtengo el nombre de la unidad de analisis\n\t$ua_nombre = R::findOne(\"cliente\",\"id LIKE ?\",[$ua])['nombre'];\n\t// obtengo los nombres de todos los actores, para cruzar\n\t$actores_nombres = R::findOne(\"actor\",\"id LIKE ?\",[4]) ;\n\t//var_dump($actores_nombres['nombre'] . \" \" . $actores_nombres['apellido']);\n\n\t$tabla = [];\n\t$temas = [];\n\t$i = -1;\n\t// reemplazo actores por nombres y temas\n\tforeach($main as $k=>$v){\n\t\t$actores_nombres = R::findOne(\"actor\",\"id LIKE ?\",[ $v['id_actor'] ]);\n\t\t$main[$k]['id_cliente'] = $ua_nombre;\n\t\t// $main[$k]['id_actor'] = $actores_nombres['nombre'] . \" \" . $actores_nombres['apellido'];\n\t\t$main[$k]['id_actor'] = $v['id_actor'];\n\t\t$main[$k]['nombre'] = $actores_nombres['nombre'] . \" \" . $actores_nombres['apellido'];\n\t\t$id_tema = get_string_between($main[$k]['tema'],\"frm_tema_\",\"\\\"\");\n\t\t$tema = R::findOne(\"attr_temas\",\"id LIKE ?\",[$id_tema])['nombre'];\n\t\tif( is_null( $tema ) ) $tema = 'TEMA NO ASIGNADO';\n\t\t$main[$k]['tema'] = $tema;\n\t\t\n\t\t// if(array_search( [ $main[$k]['id_actor'],$tema], $tabla ) ) echo \"repetido\";\n\t\t// chequeo si ya existe alguno con este actor y tema, si es asi, sumo uno\n\t\t// TODO - FIXME : deberia ser mas eficiente, busqueda por dos valores\n\t\t$iter = true;\n\t\tforeach($tabla as $ka=>$va){\n\t\t\t// if($va['actor'] == $main[$k]['id_actor'] && $va['tema'] == $tema){\n\t\t\tif($va['actor'] == $main[$k]['nombre'] && $va['tema'] == $tema){\n\t\t\t\t$tabla[$ka]['cantidad'] += 1;\n\t\t\t\t$iter = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif($iter){\n\t\t\t$tabla[ ++$i ] = [ \n\t\t\t\t'unidad_analisis' => $ua_nombre,\n\t\t\t\t'actor' => $main[$k]['nombre'],\n\t\t\t\t'id_actor' => $main[$k]['id_actor'],\n\t\t\t\t'tema' => $tema,\n\t\t\t\t'cantidad' => 1\n\t\t\t\t];\n\t\t\t}\n\t\t// agrego los temas que van apareciendo en la tabla temas\n\t\t// UTIL para poder hacer el CRC32 por la cantidad de colores\n\t\tif(!in_array($tema,$temas)) $temas[] = $tema;\n\t}\n\t// la agrupacion de repetidos es por aca, por que repite y cuenta temas de igual id\n\n\t// en el grafico, los hijos, son arreglos de objetos, hago una conversion tabla -> objeto\n\t$objeto = new StdClass(); // objeto vacio\n\t$objeto->name = 'Actores';\n\t$objeto->rank = 0;\n\t$objeto->weight = 1;\n\t$objeto->id = 1;\n\t$objeto->children = [];\n\tforeach($tabla as $k=>$v){\n\t\t// me fijo si el actor existe, ineficiente pero por ahora\n\t\t$NoExiste = true;\n\t\tforeach($objeto->children as $ka=>$va){\n\t\t\t// si existe actor, le inserto el tema\n\t\t\tif($va->name == $v['actor']){\n\t\t\t\t$in = new StdClass();\n\t\t\t\t// $in->name = $v['tema'] . \" (\" . $v['cantidad'] . \") \" ; // lo construye JS\n\t\t\t\t$in->name = \"\";\n\t\t\t\t$in->tema = array_search($v['tema'],$temas);\n\t\t\t\t$in->tema_cantidad = $v['cantidad'];\n\t\t\t\t$in->rank = intval($v['cantidad']); // el tamaño del objeto \n\t\t\t\t$in->weight = 0; // lo asigna JS\n\t\t\t\t$in->id = $k;\n\t\t\t\t$in->children = [];\n\t\t\t\t$objeto->children[$ka]->children[] = $in;\n\t\t\t\t$objeto->children[$ka]->cantidad_temas = count($objeto->children[$ka]->children);\t\n\t\t\t\t$objeto->children[$ka]->rank = count($objeto->children[$ka]->children);\n\t\t\t\t$NoExiste = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif($NoExiste){\n\t\t\t$in = new StdClass();\n\t\t\t$in->name = $v['actor'];\n\t\t\t$in->rank = 1;\n\t\t\t$in->weight = 0; // lo asigna JS\n\t\t\t$in->id = $k;\n\t\t\t//$in->id = $v['id_actor'];\n\t\t\t$in->id_actor = $v['id_actor'];\n\t\t\t\t$t_in = new StdClass();\n\t\t\t\t// $t_in->name = $v['tema'] . \" (\" . $v['cantidad'] . \") \" ; // lo construye JS\n\t\t\t\t$t_in-> name = \"\";\n\t\t\t\t$t_in->tema = array_search($v['tema'],$temas);\n\t\t\t\t$t_in->tema_cantidad = $v['cantidad'];\n\t\t\t\t$t_in->rank = intval($v['cantidad']); // el tamaño del objeto \n\t\t\t\t$t_in->weight = 0; // lo asigna JS\n\t\t\t\t$t_in->id = $k;\n\t\t\t\t$t_in->children = [];\n\t\t\t$in->children = [ $t_in ];\n\t\t\t$objeto->children[] = $in;\n\t\t}\n\t}\n\treturn [\n\t\t'tabla' => $tabla,\n\t\t'grafico' => $objeto,\n\t\t'temas' => $temas\n\t\t];\n}", "public function mover()\n {\n return \"Voa e \" . parent::mover();\n }", "function generateHeroName()\n\t{\n\t\t//some cool name generator based on race?\n\t\t$f_max = 3;\n\t\t$l_max = 3;\n\t\tif ($this->Name == \"Human\")\n\t\t{\n\t\t\t$f_pre = array(\"saint-\", \"jon\", \"\", \"\", \"\", \"\", \"\", \"\");\n\t\t\t$f_mid = array(\"pet\", \"jac\", \"cob\", \"er\", \"ic\", \"stef\", \"fan\", \"mer\", \"ril\", \"ley\");\n\t\t\t$f_suf = array(\"of\", \"met\", \"ic\", \"im\", \"rum\", \"\", \"\", \"\", \"\");\n\n\t\t\t$l_pre = array(\"O\", \"mac\", \"free\", \"\", \"\", \"\", \"\");\n\t\t\t$l_mid = array(\"smi\", \"ith\", \"co\", \"be\", \"er\", \"rob\", \"bert\", \"frank\", \"anne\");\n\t\t\t$l_suf = array(\"son\", \"er\", \"well\", \"s\", \"\", \"\", \"\", \"\");\n\t\t}\n\t\telse if ($this->Name == \"Dwarf\")\n\t\t{\n\t\t\t$f_pre = array(\"yun\", \"magh\", \"\", \"\", \"\", \"\", \"\", \"\");\n\t\t\t$f_mid = array(\"thros\", \"grul\", \"lim\", \"dic\", \"haf\", \"af\", \"jim\");\n\t\t\t$f_suf = array(\"of\", \"met\", \"ic\", \"im\", \"rum\", \"beard\", \"\", \"\", \"\");\n\n\t\t\t$l_pre = array(\"von \", \"\", \"\", \"\", \"\", \"\", \"\");\n\t\t\t$l_mid = array(\"kim\", \"graf\", \"fit\", \"von\", \"bilt\", \"mar\", \"gold\");\n\t\t\t$l_suf = array(\"mace\", \"maker\", \"forge\", \"\", \"\", \"\", \"\", \"\", \"\");\n\t\t}\n\t\telse if ($this->Name == \"Elf\")\n\t\t{\n\t\t\t$f_pre = array(\"cap\", \"col\", \"fli\", \"\", \"\", \"\", \"\", \"\");\n\t\t\t$f_mid = array(\"per\", \"mop\", \"flip\", \"don\", \"has\", \"gift\", \"ron\", \"san\");\n\t\t\t$f_suf = array(\"on\", \"ine\", \"flew\", \"jon\", \"\", \"\", \"\", \"\", \"\");\n\n\t\t\t$l_pre = array(\"feather\", \"light\", \"\", \"\", \"\", \"\", \"\");\n\t\t\t$l_mid = array(\"cap\", \"per\", \"soft\", \"tree\", \"mel\", \"plum\", \"fart\");\n\t\t\t$l_suf = array(\"foot\", \"sky\", \"trot\", \"\", \"\", \"\", \"\", \"\", \"\");\n\t\t}\n\t\telse if ($this->Name == \"Halfling\")\n\t\t{\n\t\t\t$f_pre = array(\"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\");\n\t\t\t$f_mid = array(\"bil\", \"fro\", \"mul\", \"ber\", \"ry\", \"grem\", \"mil\", \"at\", \"et\");\n\t\t\t$f_suf = array(\"o the\");\n\n\t\t\t$l_pre = array(\"\");\n\t\t\t$l_mid = array(\"spoon\", \"hat\", \"bag\", \"word\", \"sword\", \"hobbit\", \"mead\", \"fly\", \"hog\", \"wolf\", \"badger\");\n\t\t\t$l_suf = array(\"-fearer\", \"-worthy\", \"-slayer\", \"-drinker\", \"\", \"\", \"\", \"\", \"\", \"\");\n\t\t\t$l_max = 1;\n\t\t}\n\t\treturn $this->makeParts($f_max, $f_pre, $f_mid, $f_suf)\n\t\t\t. ' ' . \n\t\t\t$this->makeParts($l_max, $l_pre, $l_mid, $l_suf);\n\t}", "public function obtenerViajesplusAbonados();", "public function mensClothing()\n {\n return static::randomElement(static::$mensClothing);\n }", "function NUMERO_LUNES_FECHA($_ARGS) {\r\n\t$_FECHA_EGRESO = FECHA_EGRESO($_ARGS);\r\n\t\r\n\tif (ESTADO($_ARGS) == \"A\") {\r\n\t\tif ($_ARGS['FECHA_INGRESO'] <= $_ARGS['DESDE']) {\r\n\t\t\tif ($_ARGS['FECHA_INGRESO'] < $_ARGS['HASTA']) list($ae, $me, $de) = SPLIT('[/.-]', $_ARGS['HASTA']);\r\n\t\t\telse list($ae, $me, $de) = SPLIT('[/.-]', $_ARGS['FECHA_INGRESO']);\r\n\r\n\t\t\tlist($ap, $mp) = SPLIT('[/.-]', $_ARGS['PERIODO']); $periodo_inicio = \"01-$mp-$ap\";\r\n\t\t\t$primer_dia_semana = DIA_DE_LA_SEMANA($periodo_inicio);\r\n\t\t\t$dia_semana = $primer_dia_semana;\r\n\t\t\t$dia_inicio = 1;\r\n\t\t\t$dia_fin = DIAS_DEL_MES(\"$de-$me-$ae\");\r\n\t\t} else {\r\n\t\t\tlist($ae, $me, $de) = SPLIT('[/.-]', $_ARGS['HASTA']);\r\n\t\t\tlist($ai, $mi, $di) = SPLIT('[/.-]', $_ARGS['FECHA_INGRESO']); $periodo_inicio = \"$di-$mi-$ai\";\t$diai = (int) $di;\r\n\t\t\t\r\n\t\t\t$primer_dia_semana = DIA_DE_LA_SEMANA($periodo_inicio);\r\n\t\t\t$dia_semana = $primer_dia_semana;\r\n\t\t\t\r\n\t\t\tif ($dia_semana == 1) {\r\n\t\t\t\t$dia_inicio = (int) $di;\r\n\t\t\t} else {\r\n\t\t\t\tif ($dia_semana == 0) $restar_dia_semana = $diai - 7;\r\n\t\t\t\telse $restar_dia_semana = $diai - $dia_semana;\r\n\t\t\t\t\r\n\t\t\t\tif ($restar_dia_semana < 1) $dia_inicio = (int) $di;\r\n\t\t\t\telse {\r\n\t\t\t\t\t$diferencia_dias = $dia_semana - 1;\r\n\t\t\t\t\t$dia_inicio = (int) $di;\r\n\t\t\t\t\t$dia_inicio -= $diferencia_dias;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$dia_fin = DIAS_DEL_MES(\"$de-$me-$ae\");\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tlist($ae, $me, $de) = SPLIT('[/.-]', $_FECHA_EGRESO);\r\n\t\t\r\n\t\tif ($_ARGS['FECHA_INGRESO'] <= $_ARGS['DESDE']) {\r\n\t\t\tlist($ap, $mp) = SPLIT('[/.-]', $_ARGS['PERIODO']); $periodo_inicio = \"01-$mp-$ap\";\r\n\t\t\t$primer_dia_semana = DIA_DE_LA_SEMANA($periodo_inicio);\r\n\t\t\t$dia_semana = $primer_dia_semana;\r\n\t\t\t$dia_inicio = 1;\r\n\t\t\t$dia_fin = (int) $de;\r\n\t\t} else {\t\r\n\t\t\tlist($ai, $mi, $di) = SPLIT('[/.-]', $_ARGS['FECHA_INGRESO']); $periodo_inicio = \"$di-$mp-$ap\";\t$diai = (int) $di;\r\n\t\t\t$primer_dia_semana = DIA_DE_LA_SEMANA($periodo_inicio);\r\n\t\t\t$dia_semana = $primer_dia_semana;\r\n\t\t\t\r\n\t\t\tif ($dia_semana == 1) {\r\n\t\t\t\t$dia_inicio = (int) $di;\r\n\t\t\t} else {\r\n\t\t\t\tif ($dia_semana == 0) $restar_dia_semana = $diai - 7;\r\n\t\t\t\telse $restar_dia_semana = $diai - $dia_semana;\r\n\t\t\t\t\r\n\t\t\t\tif ($restar_dia_semana < 1) $dia_inicio = (int) $di;\r\n\t\t\t\telse {\r\n\t\t\t\t\t$diferencia_dias = $dia_semana - 1;\r\n\t\t\t\t\t$dia_inicio = (int) $di;\r\n\t\t\t\t\t$dia_inicio -= $diferencia_dias;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$dia_fin = (int) $de;\r\n\t\t}\r\n\t}\r\n\t\r\n\t$lunes = 0;\r\n\tfor ($dia=$dia_inicio; $dia<=$dia_fin; $dia++) {\r\n\t\tif ($dia_semana == 7) $dia_semana = 0;\r\n\t\tif ($dia_semana == 1) $lunes++;\r\n\t\t$dia_semana++;\r\n\t}\r\n\treturn $lunes;\r\n}", "function lancar_notas_aluno($id_federado){\n //pegar movimentos da faixa candidata\n $dados['aluno']= $this->coordenador->get_aluno_faixa($id_federado);\n \n \n $id_faixa = $dados['aluno']['0']['ordem']+1;\n \n $dados['movimentos'] = $this->coordenador->movimentos($id_faixa);\n $dados['ultimo_evento'] = $this->coordenador->get_ultimo_evento($id_federado);\n \n// $this->funcoes->imprimir($dados['movimentos']);\n $this->load->view('header');\n $this->load->view('/coordenador/lancar_notas_aluno',$dados);\n $this->load->view('footer');\n \n //preparar o prontuário com notas do aluno\n //inclui-lo automáticamente no evento de graduação\n \n }", "function sobre_planeacion($minimoMes,$maximoMes,$vigencia,$unidades,$tipo_usuario)\n\t\t{\n\t\t\t//$tipo_usuario ALMACENA EL TIPO DE USUARIO( I O E), EN UN ARRAY, ESTE SE CARGA EN LA PAGINA DE PLANEACION DE PROYECTOS (upHTplaneacionProy.PHP)\t\n//echo $unidades[0].\" - $minimoMes - $maximoMes - $vigencia ********************** <br><br>\";\n\t\t?>\n\n<?\t\t\n\t\t$ban_reg=0; //PERMITE IDENTIFICAR, SI SE ENCONTRO ALMENOS, UN USUARIO SOBRE PLANEADO, DE NO SER ASI, NO SE ENVIA EL CORREO\n\t\t$pTema ='<table width=\"100%\" border=\"0\">\n\t\t <tr class=\"Estilo2\" >\n\t\t\t<td>&nbsp;</td>\n\t\t\t<td>&nbsp;</td>\n\t\t\n\t\t\n\t\t </tr>\n\t\t <tr class=\"Estilo2\">\n\t\t\t<td width=\"5%\" >Asunto:</td>\n\t\t\t<td >Sobre planeaci&oacute;n de participantes.</td>\n\t\t </tr>\n\t\t <tr class=\"Estilo2\">\n\t\t\t<td>&nbsp;</td>\n\t\t\t<td>&nbsp;</td>\n\t\t \n\t\t </tr>\n\t\t <tr class=\"Estilo2\">\n\t\t\t<td colspan=\"2\">Los siguientes participantes, tienen una dedicaci&oacute;n superior a 1 en los siguientes proyectos:</td>\n\t\t </tr>\n\t\t <tr class=\"Estilo2\">\n\t\t\t<td>&nbsp;</td>\n\t\t\t<td>&nbsp;</td>\n\t\t\n\t\t\n\t\t </tr>\n\t\t <tr class=\"Estilo2\">\n\t\t\t<td>&nbsp;</td>\n\t\t\t<td>&nbsp;</td>\n\t\t\n\t\t </tr>\n\t\t\n\t\t <tr class=\"Estilo2\">\n\t\t\t<td colspan=\"2\" >\n\t\t\t\t<table width=\"100%\" border=\"1\" >\n\n\t\t\t\t <tr class=\"Estilo2\">\n\t\t\t\t\t<td colspan=\"5\"></td>\n\t\t\t\t\t<td colspan=\"'.(($maximoMes-$minimoMes)+1).'\" align=\"center\" >'.$vigencia.'</td>\n\t\t\t\t </tr>\t\t\t\t\n\t\t\t\t\n\t\t\t\t <tr class=\"Estilo2\">\n\t\t\t\t\t<td>Unidad</td>\n\t\t\t\t\t<td>Nombre</td>\n\t\t\t\t\t<td>Departamento</td>\n\t\t\t\t\t<td>Divisi&oacute;n</td>\n\t\t\t\t\t<td>Proyecto</td>';\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t$vMeses= array(\"\",\"Ene\",\"Feb\", \"Mar\", \"Abr\", \"May\", \"Jun\", \"Jul\", \"Ago\", \"Sep\", \"Oct\", \"Nov\", \"Dic\"); \n\t\t\t\t\tfor ($m=$minimoMes; $m<=$maximoMes; $m++) \n\t\t\t\t\t{\n\n\t\t\t\t\t $pTema = $pTema.'<td>'.$vMeses[$m].' </td>';\n\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t $pTema = $pTema.' </tr>';\n\t\t\t\t$cur_tipo_usu=0; //CURSOR DEL ARRAY, DEL TIPO DE USUARIO \n\t\t\t\tforeach($unidades as $unid)\n\t\t\t\t{\n//tipo_usuario\n\t\t\t\t\tif($tipo_usuario[$cur_tipo_usu]==\"I\")\t\n\t\t\t\t\t{\n\t\t\t\t\t//CONSULTA SI EL USUARIO ESTA SOBREPLANEADO EN ALMENOS, UN MES DURANTE LA VIGENCIA\n\n\t\t\t\t\t//COSNULTA PARA LOS USUARIOS INTERNOS\n\t\t\t\t\t\t\t$sql_planea_usu=\"select top(1) SUM (hombresMes) as total_hombre_mes ,PlaneacionProyectos.unidad ,mes \n\t\t\t\t\t\t\t\t\t\t\t--,PlaneacionProyectos.id_proyecto\n\t\t\t\t\t\t\t\t\t\t\t, PlaneacionProyectos.unidad, Usuarios.nombre, \n\t\t\t\t\t\t\t\t\t\t\tUsuarios.apellidos ,Divisiones.nombre as div,Departamentos.nombre as dep\n\t\t\t\t\t\t\t\t\t\t\tfrom PlaneacionProyectos \n\t\t\t\t\t\t\t\t\t\t\t inner join Usuarios on PlaneacionProyectos.unidad=Usuarios.unidad \n\t\t\t\t\t\t\t\t\t\t\t inner join Departamentos on Departamentos.id_departamento=Usuarios.id_departamento \n\t\t\t\t\t\t\t\t\t\t\t inner join Divisiones on Divisiones.id_division=Departamentos.id_division \n\t\t\t\t\t\t\t\t\t\t\t inner join Proyectos on PlaneacionProyectos.id_proyecto=Proyectos.id_proyecto \n\t\t\t\t\t\t\t\t\t\t\twhere vigencia=\".$vigencia.\" and mes in( \"; \n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tfor ($m=$minimoMes; $m<=$maximoMes; $m++) \n\t\t\t\t\t\t\t\t\t\t\t\t$sql_planea_usu=$sql_planea_usu.\" \".$m.\",\";\n\t\t//PlaneacionProyectos.id_proyecto,\t\t\t\t\n\t\t\t\t\t\t\t$sql_planea_usu=$sql_planea_usu.\"0) and PlaneacionProyectos.unidad=\".$unid.\" \n\t\t\t\t\t\t\t\t\t\t\tand esInterno='I'\n\t\t\t\t\t\t\t\t\t\t\tgroup by PlaneacionProyectos.unidad,mes,Usuarios.nombre, Usuarios.apellidos,Divisiones.nombre ,Departamentos.nombre \n\t\t\t\t\t\t\t\t\t\t\tHAVING (SUM (hombresMes))>1 \";\n\t\t\t\t\t}\n\n\n\t\t\t\t\tif($tipo_usuario[$cur_tipo_usu]==\"E\")\t\n\t\t\t\t\t{\n\t\t\t\t\t\t//COSNULTA PARA LOS USUARIOS EXTERNOS\n\t\t\t\t\t\t$sql_planea_usu=\" select top(1) SUM (hombresMes) as total_hombre_mes ,PlaneacionProyectos.unidad ,mes \n\t\t\t\t\t\t\t\t\t--,PlaneacionProyectos.id_proyecto\n\t\t\t\t\t\t\t\t\t, PlaneacionProyectos.unidad, TrabajadoresExternos.nombre, \n\t\t\t\t\t\t\t\t\tTrabajadoresExternos.apellidos,'' div, ''dep\n\t\t\t\t\t\t\t\t\tfrom PlaneacionProyectos \n\t\t\t\t\t\t\t\t\t inner join TrabajadoresExternos on PlaneacionProyectos.unidad=TrabajadoresExternos.consecutivo \n\t\t\t\t\t\t\t\t\t inner join Proyectos on PlaneacionProyectos.id_proyecto=Proyectos.id_proyecto \n\t\t\t\t\t\t\t\t\twhere vigencia=\".$vigencia.\" and mes in( \";\n\t\t\t\t\t\t\t\t\t\t\tfor ($m=$minimoMes; $m<=$maximoMes; $m++) \n\t\t\t\t\t\t\t\t\t\t\t\t$sql_planea_usu=$sql_planea_usu.\" \".$m.\",\";\n\n\t\t\t\t\t\t\t$sql_planea_usu=$sql_planea_usu.\"0) and PlaneacionProyectos.unidad=\".$unid.\" \n\t\t\t\t\t\t\t\t\tand esInterno='E'\n\t\t\t\t\t\t\t\t\tgroup by PlaneacionProyectos.unidad,mes,TrabajadoresExternos.nombre, TrabajadoresExternos.apellidos\n\t\t\t\t\t\t\t\t\tHAVING (SUM (hombresMes))>1 \t\";\n\t\t\t\t\t}\n\n\t\t\t\t\t$cur_planea_usu=mssql_query($sql_planea_usu);\n//echo $sql_planea_usu.\" ---- <br>\".mssql_get_last_message().\" *** \".mssql_num_rows($cur_planea_usu).\"<br>\";\n\t\t\t\t\twhile($datos__planea_usu=mssql_fetch_array($cur_planea_usu))\n\t\t\t\t\t{\n\t\t\t\t\t\t$ban_reg=1; //SI ENCUENTRA ALMENOS UN USUARIO SOBREPLANEADO, ENVIA EL CORREO\n\t\t\t\t\n\t\t\t\t\t\t//CONSULTA LOS PROYECTOS, EN LOS CUALES EL PARTICIAPENTE HA SIDO PLANEADO, ESTO PARA PODER DOBUJAR LA TABLA DE FORMA CORRECTA\n\t\t\t\t\t\t$sql_uu=\" select distinct(id_proyecto),nombre,codigo,cargo_defecto from (select SUM (hombresMes) as total_hombre_mes ,unidad, mes,PlaneacionProyectos.id_proyecto ,Proyectos.nombre,Proyectos.codigo,Proyectos.cargo_defecto \n\t\t\t\t\t\t\t\t\tfrom PlaneacionProyectos\n\t\t\t\t\t\t\t\t\t\tinner join Proyectos on PlaneacionProyectos.id_proyecto=Proyectos.id_proyecto \n\t\t\t\t\t\t\t\t\t where vigencia=\".$vigencia.\" and mes in( \";\n\t\t\t\t\n\t\t\t\t\t\t\t\t\tfor ($m=$minimoMes; $m<=$maximoMes; $m++) \n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$sql_uu=$sql_uu.\" \".$m.\",\";\n\t\t\t\t\t\t\t\t\t\t$total_planeado[$m]=0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$sql_uu=$sql_uu.\"0) and unidad in(\".$unid.\") and esInterno= '\".$tipo_usuario[$cur_tipo_usu].\"' group by unidad, mes , PlaneacionProyectos.id_proyecto,Proyectos.nombre,Proyectos.codigo,Proyectos.cargo_defecto ) aa \";\n// HAVING (SUM (hombresMes)\t>1\t\n\t\t\t\t\t\t$cur_uu=mssql_query($sql_uu);\n\t\t\t\t\t\t$cant_proy=mssql_num_rows($cur_uu);\n//echo \"<br><BR>---//**************--------------\".$sql_uu.\" \".mssql_get_last_message().\"<br>\".$cant_proy.\"<br>\";\n\t\t\t\t?>\n\t\t\t\t\n\t\t\t\t<?\n\t\t\t\t//echo $sql_proy_planea.\" ---- <br>\".mssql_get_last_message().\"<br><br>\";\n\t\t\t\t\n\t\t\t\t\t\t$total_planeado= array();\n\t\t\t\t\t\t$cont=0;\n\t\t\t\t\t\twhile($datos_uu=mssql_fetch_array($cur_uu))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($cont==0)\n\t\t\t\t\t\t\t{\n\t\n\t\t\t\t\t\t\t\t $pTema = $pTema.' <tr class=\"Estilo2\">\t\t\t\t\n\t\t\t\t\t\t\t\t<td rowspan=\"'.$cant_proy.' \"> '.$datos__planea_usu[\"unidad\"].' </td>\n\t\t\t\t\t\t\t\t<td rowspan=\"'.$cant_proy.' \">'.$datos__planea_usu[\"apellidos\"].' '.$datos__planea_usu[\"nombre\"].' </td>\n\t\t\t\t\t\t\t\t<td rowspan=\"'.$cant_proy.' \">'. $datos__planea_usu[\"dep\"].' </td>\n\t\t\t\t\t\t\t\t<td rowspan=\"'.$cant_proy.' \">'. $datos__planea_usu[\"div\"].' </td>';\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$pTema = $pTema.'<td class=\"Estilo2\" >['.$datos_uu[\"codigo\"].'.'.$datos_uu[\"cargo_defecto\"].'] '. $datos_uu[\"nombre\"].' </td>';\n\n\t\t\t\t\t\t\t//CONSULTA LA INFORMACION DE LO PLANEADO EN CADA MES, DE ACUERDO AL PORYECTO CONSULTADO\n\t\t\t\t\t\t\t$sql_pro=\"select SUM (hombresMes) as total_hombre_mes ,PlaneacionProyectos.id_proyecto,PlaneacionProyectos.unidad,mes\n\t\t\t\t\t\t\t\t\t\t from PlaneacionProyectos \n\t\t\t\t\t\t\t\t\t\t where vigencia=\".$vigencia.\" and PlaneacionProyectos.unidad=\".$unid.\" and id_proyecto=\".$datos_uu[\"id_proyecto\"].\" and mes in(\";\n\t\t\t\t\t\t\t\t\t\tfor ($m=$minimoMes; $m<=$maximoMes; $m++) \n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t$sql_pro=$sql_pro.\" \".$m.\",\";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$sql_pro=$sql_pro.\" 0) and esInterno= '\".$tipo_usuario[$cur_tipo_usu].\"' group by PlaneacionProyectos.id_proyecto ,PlaneacionProyectos.unidad ,mes order by (mes) \";\n// HAVING (SUM (hombresMes))>1\n\t\t\t\t\t\t\t$cur_proy_planea=mssql_query($sql_pro);\n//\t\t\t\techo $sql_pro.\" --22222222222-- <br>\".mssql_get_last_message().\"<br><br>\";\n\t\t\t\t\t\t\t$m=$minimoMes;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\twhile($datos_proy_planea=mssql_fetch_array($cur_proy_planea))\n\t\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t\tfor ($m;$m<=$maximoMes; $m++) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif($datos_proy_planea[\"mes\"]==$m)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$total_planeado[$m]+=( (float) $datos_proy_planea[\"total_hombre_mes\"]);\n\n\t\t\t\t\t\t\t\t\t\t$pTema = $pTema.'<td class=\"Estilo2\" align=\"right\" >'.((float) $datos_proy_planea[\"total_hombre_mes\"] ).'</td>';\n\n\t\t\t\t\t\t\t\t\t\t$m=$datos_proy_planea[\"mes\"];\n\t\t\t\t\t\t\t\t\t\t$m++;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t\t\t$pTema = $pTema.'<td>&nbsp; </td>';\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$m--;\n\t\t\t\t\t\t\tfor ($m++;$m<=$maximoMes; $m++) \n\t\t\t\t\t\t\t{\n\t\t\t\t\n\t\t\t\t\t\t\t\t $pTema = $pTema.'<td>&nbsp;</td>';\n\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\t\t$cont++;\n\t\t\t\t\t\t\tunset($datos_proy_planea);\n\n\t\t\t\t\t\t\t $pTema = $pTema.' </tr>';\n\n\t\t\t\t//\t\t\techo $datos_proy_planea[\"total_hombre_mes\"].\"<br>\";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t $pTema = $pTema.' <tr class=\"Estilo2\">\n\t\t\t\t\t\t<td colspan=\"4\" >&nbsp;</td>\n\n\t\t\t\t\t\t<td>Total planeaci&oacute;n</td>';\n\n\t\t\t\t\t\tfor ($m=$minimoMes; $m<=$maximoMes; $m++) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($total_planeado[$m]==0)\n\t\t\t\t\t\t\t\t$pTema = $pTema.'<td>&nbsp;</td>';\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t$pTema = $pTema.'<td>'.$total_planeado[$m].'</td>';\n\t\t\t\t\t\t}\n \n\t\t\t\t\t $pTema = $pTema.' </tr>\n\t\t\t\t\t <tr >\n\t\t\t\t\t\t<td colspan=\"17\">&nbsp;</td>\n\t\t\t\t\t </tr>\t';\n\n\t\t\t\t\t}\n\t\t\t\t\t$cur_tipo_usu++;\n\t\t\t\t}\n\t\t\t\t$pTema = $pTema.'\n\n\t\t\t\t</table>\n\t\t\t</td>\n\t\t </tr>\n\t\t<tr class=\"Estilo2\"><td colspan=\"2\" >Para consultar en detalle la planeaci&oacute;n de un participante, en un proyecto especifico, utilice el reporte Usuarios por proyecto, accediendo a el, atravez del boton Consolidados por divisi&oacute;n, ubicado en la parte superior de la pagina principal de la planeaci&oacute;n por proyectos. </td></tr>\n\t\t</table>';\n\n\t\t/*\n\t\t\t\t//consulta la unidad del director y el coordinador de proyecto\n\t\t\t\t$sql=\"SELECT id_director,id_coordinador FROM HojaDeTiempo.dbo.proyectos where id_proyecto = \" . $cualProyecto.\" \" ;\n\t\t\t\t$eCursorMsql=mssql_query($sql);\n\t\t\t\t$usu_correo= array(); //almacena la unidad de los usuarios a los que se le enviara el correo\n\t\t\t\t$i=1;\n\t\t\t\twhile($datos_dir_cor=mssql_fetch_array($eCursorMsql))\n\t\t\t\t{\n\t\t\t\t\t$usu_correo[$i]=$datos_dir_cor[\"id_coordinador\"];\n\t\t\t\t\t$i++;\n\t\t\t\t\t$usu_correo[$i]=$datos_dir_cor[\"id_director\"];\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\n\t\t\t\t//consulta la unidad porgramadores y ordenadores de gasto\t\t\t\n\t\t//select unidad from HojaDeTiempo.dbo.Programadores where id_proyecto=\".$cualProyecto.\" union\n\t\t\t\t$sql_pro_orde=\" select unidadOrdenador from GestiondeInformacionDigital.dbo.OrdenadorGasto where id_proyecto=\".$cualProyecto;\n\t\t\t\t$cur_pro_orde=mssql_query($sql_pro_orde);\n\t\t\t\twhile($datos_pro_orde=mssql_fetch_array($cur_pro_orde))\n\t\t\t\t{\n\t\t\t\t\t$usu_correo[$i]=$datos_pro_orde[\"unidad\"];\n\t\t\t\t\t$i++;\n\t\t\t\t}\t\t\t\n\t\t\n\t\t\t\t$i=0;\n\t\t\t\t//consulta el correo de los usuarios(director,cordinador,ordenadroes de G, y programadores) asociados al proyecto\n\t\t\t\t$sql_usu=\" select email from HojaDeTiempo.dbo.Usuarios where unidad in(\";\n\t\t\t\tforeach($usu_correo as $unid)\n\t\t\t\t{\n\t\t\t\t\tif($i==0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$sql_usu=$sql_usu.\" \".$unid;\t\t\n\t\t\t\t\t\t$i=1;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t$sql_usu=$sql_usu.\" ,\".$unid;\n\t\t\t\t}\n\t\t\t\t$sql_usu=$sql_usu.\") and retirado is null\";\n\t\t\t\t$cur_usu=mssql_query($sql_usu);\t\t\t\t\n\t\t\n\t\t\t\t//se envia el correo a el director, cordinador, orenadores de gasto, y programadores del proyecto\t\n\t\t\t\twhile($eRegMsql = mssql_fetch_array($cur_usu))\n\t\t\t\t{\t\t\n\t\t\t\t $miMailUsuarioEM = $eRegMsql[email] ;\n\t\t\t\n\t\t\t\t //***EnviarMailPEAR\t\n\t\t\t\t $pPara= trim($miMailUsuarioEM) . \"@ingetec.com.co\";\n\t\t\t\n\t\t\t\t enviarCorreo($pPara, $pAsunto, $pTema, $pFirma);\n\t\t\t\n\t\t\t\t //***FIN EnviarMailPEAR\n\t\t\t\t $miMailUsuarioEM = \"\";\n\t\t\t\n\t\t\t\t}\n\t\t*/\n\t\t\tif($ban_reg==1) //SEW ENVIA EL CORREO SI EXISTE ALMENOS UN USUARIO SOBREPLANEADO\n\t\t\t{\n\t\t///////////////////////////**********************************************************PARA QUITAR\n\t\t\t $miMailUsuarioEM = 'carlosmaguirre'; //$eRegMsql[email] ;\t\n\t\t\t\t$pAsunto='Sobre planeaci&oacute;n de proyectos';\n\t\t\t //***EnviarMailPEAR\t\n\t\t\t $pPara= trim($miMailUsuarioEM) . \"@ingetec.com.co\";\t\n\t\t\t enviarCorreo($pPara, $pAsunto, $pTema, $pFirma);\t\n\t\t\t //***FIN EnviarMailPEAR\n\t\t\t $miMailUsuarioEM = \"\";\n\t\t\t}\n\t\t\n\t\t?>\n\n<?\n}", "function NUMERO_DE_HIJOS_MENORES14($_ARGS) {\r\n\t$_PARAMETROS = PARAMETROS();\r\n\t\r\n\tlist($a, $m) = split(\"[/.-]\", $_ARGS[\"PERIODO\"]); $anio = $a - 15;\r\n\t$mes = intval($m) + 1;\r\n\tif ($mes > 12) { $mes = 1; $anio++; }\r\n\tif ($mes < 10) $mes = \"0$mes\";\t\r\n\t$fecha = \"$anio-$mes-01\";\r\n\r\n\t$sql = \"SELECT *\r\n\t\t\tFROM rh_cargafamiliar\r\n\t\t\tWHERE\r\n\t\t\t\tCodPersona = '\".$_ARGS['TRABAJADOR'].\"' AND\r\n\t\t\t\tParentesco = 'HI' AND\r\n\t\t\t\tFechaNacimiento >= '\".$fecha.\"'\";\techo \"$sql\";\r\n\t$query = mysql_query($sql) or die ($sql.mysql_error());\r\n\treturn intval(mysql_num_rows($query));\r\n}", "function tach_chu_hien_thi($content){\r\n $mang = explode(\" \", $content);\r\n $str = \"\";\r\n $sochu = sizeof($mang);\r\n if($sochu < 10){\r\n for($j = 0; $j < sizeof($mang); $j++){\r\n $str = $str.\" \".$mang[$j];\r\n }\r\n }else{\r\n for($j = 0; $j < 15; $j++){\r\n $str = $str.\" \".$mang[$j];\r\n }\r\n }\r\n return $str;\r\n}", "function DanhMuc_Them(&$loi){\t\n\t\n\t\t$thanhcong=true;\n\t\t\n\t\t$quocgia = $_POST[quocgia];settype($quocgia,\"int\");\n\t\t$idMien = $_POST[idMien];settype($idMien,\"int\");\n\t\t$TenDM_KS = $this->processData($_POST[TenDM_KS]);\n\t\t$TenDM_KS_KD = $this->processData($_POST[TenDM_KS_KD]);\n\t\t$Title = $this->processData($_POST[Title]);\n\t\t$MetaD = $this->processData($_POST[MetaD]);\n\t\t$MetaK = $this->processData($_POST[MetaK]);\n\t\t\n\t\t$ThuTu = $this->ThuTuMax('dvt_ks_danhmuc') + 1;\n\t\t\n\t\t$AnHien = $_POST[AnHien];settype($AnHien,\"int\");\n\t\t\n\t\tif($Title==\"\") $Title=$TenDM_KS;\n\t\tif($MetaD==\"\") $MetaD=$TenDM_KS;\n\t\tif($MetaK==\"\") $MetaK=$TenDM_KS;\n\t\tif($TenDM_KS_KD==\"\") $TenDM_KS_KD = $this->changeTitle($TenDM_KS);\n\t\t\n\t\tif($idMien==0 && $quocgia==0)\n\t\t{\n\t\t\t$thanhcong= false;\n\t\t\t$loi[idMien]= \"Chọn miền\";\n\t\t}\n\t\tif($TenDM_KS==\"\")\n\t\t{\n\t\t\t$thanhcong= false;\n\t\t\t$loi[TenDM_KS]= \"Chưa nhập tên danh mục\";\n\t\t}\n\t\n\t\tif($thanhcong==false){\n\t\t\treturn $thanhcong;\n\t\t}else{\n\t\t\t$sql = \"INSERT INTO dvt_ks_danhmuc \n\t\t\t\t\tVALUES(NULL,$quocgia,$idMien,'$TenDM_KS','$TenDM_KS_KD','$Title','$MetaD','$MetaK',$ThuTu,$AnHien)\";\n\t\t\tmysql_query($sql) or die(mysql_error().$sql);\t\t\n\t\t}\n\t\treturn $thanhcong;\n\t}", "public static function getJefePlaneacion()\n {\n $jefes = file_get_contents('http://sws.itvillahermosa.edu.mx/ws/jefes?nivel=3');\n $jefes = json_decode($jefes, true);\n\n foreach($jefes as $jefe)\n {\n if($jefe['descripcion'] == 'DEPARTAMENTO DE PLANEACION, PROGRAMACION Y PRESUPUESTACION')\n {\n $pla = array_values($jefe);\n \n #Se pasa a mayúscula\n $pla[0]= mb_strtoupper($pla[0]);\n $pla[1]= mb_strtoupper($pla[1]);\n $pla[2]= mb_strtoupper($pla[2]);\n $pla[]= SWS_API::buscarID($pla[1]);\n $pla[]= 'JEFE(A) DE DEPTO. DE PLANEACIÓN, PROGRAMACIÓN Y PRESUPUESTACIÓN';\n\n return $pla;\n }\n }\n }" ]
[ "0.6071356", "0.5863233", "0.58313197", "0.5744254", "0.5736769", "0.5569827", "0.55261886", "0.54899937", "0.54586387", "0.5396164", "0.5384011", "0.53797597", "0.53667516", "0.53482294", "0.53432465", "0.53309596", "0.53264725", "0.53264725", "0.53203356", "0.53029567", "0.52669644", "0.525712", "0.52567375", "0.52495503", "0.52335465", "0.5227039", "0.5224377", "0.5216449", "0.52154917", "0.5212044", "0.5198036", "0.51964605", "0.5187473", "0.51832163", "0.5172735", "0.5156045", "0.5155913", "0.5152255", "0.5137603", "0.51335317", "0.51323074", "0.51320696", "0.5131052", "0.51266533", "0.51246315", "0.512357", "0.51223946", "0.5121363", "0.5117251", "0.51170033", "0.511479", "0.511363", "0.5109471", "0.51092505", "0.5109103", "0.5108626", "0.51042676", "0.50997543", "0.50937575", "0.50907165", "0.50862324", "0.50763136", "0.507391", "0.5070682", "0.5060732", "0.50552154", "0.50533676", "0.5046211", "0.5044867", "0.5044124", "0.5042693", "0.5042172", "0.50374544", "0.50348544", "0.503354", "0.5031749", "0.5031313", "0.50275445", "0.502701", "0.502163", "0.50211513", "0.502032", "0.5019438", "0.5012317", "0.5011611", "0.5008477", "0.5003543", "0.49986973", "0.49952647", "0.49952236", "0.49899963", "0.49895033", "0.4988485", "0.49832878", "0.49808967", "0.49702057", "0.49694002", "0.49674326", "0.4966519", "0.4962186", "0.4961486" ]
0.0
-1
Create a new controller instance.
public function __construct() { $this->middleware('auth'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createController()\n {\n $this->createClass('controller');\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this->call('make:controller', array_filter([\n 'name' => \"{$controller}Controller\",\n '--model' => $modelName,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n $model_name = $this->qualifyClass($this->getNameInput());\n $name = Str::contains($model_name, ['\\\\']) ? Str::afterLast($model_name, '\\\\') : $model_name;\n\n $this->call('make:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $model_name,\n ]);\n\n $path = base_path() . \"/app/Http/Controllers/{$controller}Controller.php\";\n $this->cleanupDummy($path, $name);\n }", "private function makeInitiatedController()\n\t{\n\t\t$controller = new TestEntityCRUDController();\n\n\t\t$controller->setLoggerWrapper(Logger::create());\n\n\t\treturn $controller;\n\t}", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n ]));\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"Api/{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $name = str_replace(\"Service\",\"\",$this->argument('name'));\n\n $this->call('make:controller', [\n 'name' => \"{$name}Controller\"\n ]);\n }", "protected function createController()\n {\n $params = [\n 'name' => $this->argument('name'),\n ];\n\n if ($this->option('api')) {\n $params['--api'] = true;\n }\n\n $this->call('wizard:controller', $params);\n }", "public function generateController () {\r\n $controllerParam = \\app\\lib\\router::getPath();\r\n $controllerName = \"app\\controller\\\\\" . end($controllerParam);\r\n $this->controller = new $controllerName;\r\n }", "public static function newController($controller)\n\t{\n\t\t$objController = \"App\\\\Controllers\\\\\".$controller;\n\t\treturn new $objController;\n\t}", "public function createController()\n\t{\n\t\tif(class_exists($this->controller))\n\t\t{\n\t\t\t// get the parent class he extends\n\t\t\t$parents = class_parents($this->controller);\n\n\t\t\t// $parents = class_implements($this->controller); used if our Controller was just an interface not a class\n\n\t\t\t// check if the class implements our Controller Class\n\t\t\tif(in_array(\"Controller\", $parents))\n\t\t\t{\n\t\t\t\t// check if the action in the request exists in that class\n\t\t\t\tif(method_exists($this->controller, $this->action))\n\t\t\t\t{\n\t\t\t\t\treturn new $this->controller($this->action, $this->request);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Action is not exist\n\t\t\t\t\techo 'Method '. $this->action .' doesn\\'t exist in '. $this->controller;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The controller doesn't extends our Controller Class\n\t\t\t\techo $this->controller.' doesn\\'t extends our Controller Class';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Controller Doesn't exist\n\t\t\techo $this->controller.' doesn\\'t exist';\n\t\t}\n\t}", "public function createController( ezcMvcRequest $request );", "public function createController() {\n //check our requested controller's class file exists and require it if so\n /*if (file_exists(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\")) {\n require(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\");\n } else {\n throw new Exception('Route does not exist');\n }*/\n\n try {\n require_once __DIR__ . '/../Controllers/' . $this->controllerName . '.php';\n } catch (Exception $e) {\n return $e;\n }\n \n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n \n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\",$parents)) { \n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->endpoint)) {\n return new $this->controllerClass($this->args, $this->endpoint, $this->domain);\n } else {\n throw new Exception('Action does not exist');\n }\n } else {\n throw new Exception('Class does not inherit correctly.');\n }\n } else {\n throw new Exception('Controller does not exist.');\n }\n }", "public static function create()\n\t{\n\t\t//check, if a JobController instance already exists\n\t\tif(JobController::$jobController == null)\n\t\t{\n\t\t\tJobController::$jobController = new JobController();\n\t\t}\n\n\t\treturn JobController::$jobController;\n\t}", "private function controller()\n {\n $location = $this->args[\"location\"] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n $relative_location = $this->args['application_folder'] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n\n if (!empty($this->args['subdirectories']))\n {\n $location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n $relative_location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n }\n\n if (!is_dir($location))\n {\n mkdir($location, 0755, TRUE);\n }\n\n $relative_location .= $this->args['filename'];\n $filename = $location . $this->args['filename'];\n\n $args = array(\n \"class_name\" => ApplicationHelpers::camelize($this->args['name']),\n \"filename\" => $this->args['filename'],\n \"application_folder\" => $this->args['application_folder'],\n \"parent_class\" => (isset($this->args['parent'])) ? $this->args['parent'] : $this->args['parent_controller'],\n \"extra\" => $this->extra,\n 'relative_location' => $relative_location,\n 'helper_name' => strtolower($this->args['name']) . '_helper',\n );\n\n $template = new TemplateScanner(\"controller\", $args);\n $controller = $template->parse();\n\n $message = \"\\t\";\n if (file_exists($filename))\n {\n $message .= 'Controller already exists : ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'light_blue');\n }\n $message .= $relative_location;\n }\n elseif (file_put_contents($filename, $controller))\n {\n $message .= 'Created controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green');\n }\n $message .= $relative_location;\n }\n else\n {\n $message .= 'Unable to create controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'red');\n }\n $message .= $relative_location;\n }\n\n // The controller has been generated, output the confirmation message\n fwrite(STDOUT, $message . PHP_EOL);\n\n // Create the helper files.\n $this->helpers();\n\n $this->assets();\n\n // Create the view files.\n $this->views();\n\n return;\n }", "public function createController( $controllerName ) {\r\n\t\t$refController \t\t= $this->instanceOfController( $controllerName );\r\n\t\t$refConstructor \t= $refController->getConstructor();\r\n\t\tif ( ! $refConstructor ) return $refController->newInstance();\r\n\t\t$initParameter \t\t= $this->setParameter( $refConstructor );\r\n\t\treturn $refController->newInstanceArgs( $initParameter ); \r\n\t}", "public function create($controllerName) {\r\n\t\tif (!$controllerName)\r\n\t\t\t$controllerName = $this->defaultController;\r\n\r\n\t\t$controllerName = ucfirst(strtolower($controllerName)).'Controller';\r\n\t\t$controllerFilename = $this->searchDir.'/'.$controllerName.'.php';\r\n\r\n\t\tif (preg_match('/[^a-zA-Z0-9]/', $controllerName))\r\n\t\t\tthrow new Exception('Invalid controller name', 404);\r\n\r\n\t\tif (!file_exists($controllerFilename)) {\r\n\t\t\tthrow new Exception('Controller not found \"'.$controllerName.'\"', 404);\r\n\t\t}\r\n\r\n\t\trequire_once $controllerFilename;\r\n\r\n\t\tif (!class_exists($controllerName) || !is_subclass_of($controllerName, 'Controller'))\r\n\t\t\tthrow new Exception('Unknown controller \"'.$controllerName.'\"', 404);\r\n\r\n\t\t$this->controller = new $controllerName();\r\n\t\treturn $this;\r\n\t}", "private function createController($controllerName)\n {\n $className = ucfirst($controllerName) . 'Controller';\n ${$this->lcf($controllerName) . 'Controller'} = new $className();\n return ${$this->lcf($controllerName) . 'Controller'};\n }", "public function createControllerObject(string $controller)\n {\n $this->checkControllerExists($controller);\n $controller = $this->ctlrStrSrc.$controller;\n $controller = new $controller();\n return $controller;\n }", "public function create_controller($controller, $action){\n\t $creado = false;\n\t\t$controllers_dir = Kumbia::$active_controllers_dir;\n\t\t$file = strtolower($controller).\"_controller.php\";\n\t\tif(file_exists(\"$controllers_dir/$file\")){\n\t\t\tFlash::error(\"Error: El controlador '$controller' ya existe\\n\");\n\t\t} else {\n\t\t\tif($this->post(\"kind\")==\"applicationcontroller\"){\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends ApplicationController {\\n\\n\\t\\tfunction $action(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tif(@file_put_contents(\"$controllers_dir/$file\", $filec)){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends StandardForm {\\n\\n\\t\\tpublic \\$scaffold = true;\\n\\n\\t\\tpublic function __construct(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tfile_put_contents(\"$controllers_dir/$file\", $filec);\n\t\t\t\tif($this->create_model($controller, $controller, \"index\")){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($creado){\n\t\t\t Flash::success(\"Se cre&oacute; correctamente el controlador '$controller' en '$controllers_dir/$file'\");\n\t\t\t}else {\n\t\t\t Flash::error(\"Error: No se pudo escribir en el directorio, verifique los permisos sobre el directorio\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$this->route_to(\"controller: $controller\", \"action: $action\");\n\t}", "private function instanceController( string $controller_class ): Controller {\n\t\treturn new $controller_class( $this->request, $this->site );\n\t}", "public function makeController($controller_name)\n\t{\n\t\t$model\t= $this->_makeModel($controller_name, $this->_storage_type);\n\t\t$view\t= $this->_makeView($controller_name);\n\t\t\n\t\treturn new $controller_name($model, $view);\n\t}", "public function create()\n {\n $output = new \\Symfony\\Component\\Console\\Output\\ConsoleOutput();\n $output->writeln(\"<info>Controller Create</info>\");\n }", "protected function createDefaultController() {\n Octopus::requireOnce($this->app->getOption('OCTOPUS_DIR') . 'controllers/Default.php');\n return new DefaultController();\n }", "private function createControllerDefinition()\n {\n $id = $this->getServiceId('controller');\n if (!$this->container->has($id)) {\n $definition = new Definition($this->getServiceClass('controller'));\n $definition\n ->addMethodCall('setConfiguration', [new Reference($this->getServiceId('configuration'))])\n ->addMethodCall('setContainer', [new Reference('service_container')])\n ;\n $this->container->setDefinition($id, $definition);\n }\n }", "public function createController( $ctrlName, $action ) {\n $args['action'] = $action;\n $args['path'] = $this->path . '/modules/' . $ctrlName;\n $ctrlFile = $args['path'] . '/Controller.php';\n // $args['moduleName'] = $ctrlName;\n if ( file_exists( $ctrlFile ) ) {\n $ctrlPath = str_replace( CITRUS_PATH, '', $args['path'] );\n $ctrlPath = str_replace( '/', '\\\\', $ctrlPath ) . '\\Controller';\n try { \n $r = new \\ReflectionClass( $ctrlPath ); \n $inst = $r->newInstanceArgs( $args ? $args : array() );\n\n $this->controller = Citrus::apply( $inst, Array( \n 'name' => $ctrlName, \n ) );\n if ( $this->controller->is_protected == null ) {\n $this->controller->is_protected = $this->is_protected;\n }\n return $this->controller;\n } catch ( \\Exception $e ) {\n prr($e, true);\n }\n } else {\n return false;\n }\n }", "protected function createTestController() {\n\t\t$controller = new CController('test');\n\n\t\t$action = $this->getMock('CAction', array('run'), array($controller, 'test'));\n\t\t$controller->action = $action;\n\n\t\tYii::app()->controller = $controller;\n\t\treturn $controller;\n\t}", "public static function newController($controllerName, $params = [], $request = null) {\n\n\t\t$controller = \"App\\\\Controllers\\\\\".$controllerName;\n\n\t\treturn new $controller($params, $request);\n\n\t}", "private function loadController() : void\n\t{\n\t\t$this->controller = new $this->controllerName($this->request);\n\t}", "public function createController($pi, array $params)\n {\n $class = $pi . '_Controller_' . ucfirst($params['page']);\n\n return new $class();\n }", "public function createController() {\n //check our requested controller's class file exists and require it if so\n \n if (file_exists(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\" ) && $this->controllerName != 'error') {\n require(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\");\n \n } else {\n \n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n\n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\", $parents)) {\n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->action)) { \n return new $this->controllerClass($this->action, $this->urlValues);\n \n } else {\n //bad action/method error\n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badview\", $this->urlValues);\n }\n } else {\n $this->urlValues['controller'] = \"error\";\n //bad controller error\n echo \"hjh\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"b\", $this->urlValues);\n }\n } else {\n \n //bad controller error\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n }", "protected static function createController($name) {\n $result = null;\n\n $name = self::$_namespace . ($name ? $name : self::$defaultController) . 'Controller';\n if(class_exists($name)) {\n $controllerClass = new \\ReflectionClass($name);\n if($controllerClass->hasMethod('run')) {\n $result = new $name();\n }\n }\n\n return $result;\n }", "public function createController(): void\n {\n $minimum_buffer_min = 3;\n $token_ok = $this->routerService->ds_token_ok($minimum_buffer_min);\n if ($token_ok) {\n # 2. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $results = $this->worker($this->args);\n\n if ($results) {\n # Redirect the user to the NDSE view\n # Don't use an iFrame!\n # State can be stored/recovered using the framework's session or a\n # query parameter on the returnUrl\n header('Location: ' . $results[\"redirect_url\"]);\n exit;\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "protected function createController($controllerClass)\n {\n $cls = new ReflectionClass($controllerClass);\n return $cls->newInstance($this->environment);\n }", "protected function createController($name)\n {\n $controllerClass = 'controller\\\\'.ucfirst($name).'Controller';\n\n if(!class_exists($controllerClass)) {\n throw new \\Exception('Controller class '.$controllerClass.' not exists!');\n }\n\n return new $controllerClass();\n }", "protected function initController() {\n\t\tif (!isset($_GET['controller'])) {\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$controllerClass = $_GET['controller'].\"Controller\";\n\t\tif (!class_exists($controllerClass)) {\n\t\t\t//Console::error(@$_GET['controller'].\" doesn't exist\");\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$this->controller = new $controllerClass();\n\t}", "public function makeTestController(TestController $controller)\r\n\t{\r\n\t}", "static function factory($GET=array(), $POST=array(), $FILES=array()) {\n $type = (isset($GET['type'])) ? $GET['type'] : '';\n $objectController = $type.'_Controller';\n $addLocation = $type.'/'.$objectController.'.php';\n foreach ($_ENV['locations'] as $location) {\n if (is_file($location.$addLocation)) {\n return new $objectController($GET, $POST, $FILES);\n } \n }\n throw new Exception('The controller \"'.$type.'\" does not exist.');\n }", "public function create()\n {\n $general = new ModeloController();\n\n return $general->create();\n }", "public function makeController($controllerNamespace, $controllerName, Log $log, $session, Request $request, Response $response)\r\n\t{\r\n\t\t$fullControllerName = '\\\\Application\\\\Controller\\\\' . (!empty($controllerNamespace) ? $controllerNamespace . '\\\\' : '') . $controllerName;\r\n\t\t$controller = new $fullControllerName();\r\n\t\t$controller->setConfig($this->config);\r\n\t\t$controller->setRequest($request);\r\n\t\t$controller->setResponse($response);\r\n\t\t$controller->setLog($log);\r\n\t\tif (isset($session))\r\n\t\t{\r\n\t\t\t$controller->setSession($session);\r\n\t\t}\r\n\r\n\t\t// Execute additional factory method, if available (exists in \\Application\\Controller\\Factory)\r\n\t\t$method = 'make' . $controllerName;\r\n\t\tif (is_callable(array($this, $method)))\r\n\t\t{\r\n\t\t\t$this->$method($controller);\r\n\t\t}\r\n\r\n\t\t// If the controller has an init() method, call it now\r\n\t\tif (is_callable(array($controller, 'init')))\r\n\t\t{\r\n\t\t\t$controller->init();\r\n\t\t}\r\n\r\n\t\treturn $controller;\r\n\t}", "public static function create()\n\t{\n\t\t//check, if an AccessGroupController instance already exists\n\t\tif(AccessGroupController::$accessGroupController == null)\n\t\t{\n\t\t\tAccessGroupController::$accessGroupController = new AccessGroupController();\n\t\t}\n\n\t\treturn AccessGroupController::$accessGroupController;\n\t}", "public static function buildController()\n\t{\n\t\t$file = CONTROLLER_PATH . 'indexController.class.php';\n\n\t\tif(!file_exists($file))\n\t\t{\n\t\t\tif(\\RCPHP\\Util\\Check::isClient())\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \"Welcome RcPHP!\\n\";\n }\n}';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \\'<style type=\"text/css\">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} body{ background: #fff; font-family: \"微软雅黑\"; color: #333;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.8em; font-size: 36px }</style><div style=\"padding: 24px 48px;\"> <h1>:)</h1><p>Welcome <b>RcPHP</b>!</p></div>\\';\n }\n}';\n\t\t\t}\n\t\t\tfile_put_contents($file, $controller);\n\t\t}\n\t}", "public function getController( );", "public static function getInstance() : Controller {\n if ( null === self::$instance ) {\n self::$instance = new self();\n self::$instance->options = new Options(\n self::OPTIONS_KEY\n );\n }\n\n return self::$instance;\n }", "static function appCreateController($entityName, $prefijo = '') {\n\n $controller = ControllerBuilder::getController($entityName, $prefijo);\n $entityFile = ucfirst(str_replace($prefijo, \"\", $entityName));\n $fileController = \"../../modules/{$entityFile}/{$entityFile}Controller.class.php\";\n\n $result = array();\n $ok = self::createArchive($fileController, $controller);\n ($ok) ? array_push($result, \"Ok, {$fileController} created\") : array_push($result, \"ERROR creating {$fileController}\");\n\n return $result;\n }", "public static function newInstance($path = \\simpleChat\\Utility\\ROOT_PATH)\n {\n $request = new Request();\n \n \n if ($request->isAjax())\n {\n return new AjaxController();\n }\n else if ($request->jsCode())\n {\n return new JsController();\n }\n else\n {\n return new StandardController($path);\n }\n }", "private function createInstance()\n {\n $objectManager = new \\Magento\\Framework\\TestFramework\\Unit\\Helper\\ObjectManager($this);\n $this->controller = $objectManager->getObject(\n \\Magento\\NegotiableQuote\\Controller\\Adminhtml\\Quote\\RemoveFailedSku::class,\n [\n 'context' => $this->context,\n 'logger' => $this->logger,\n 'messageManager' => $this->messageManager,\n 'cart' => $this->cart,\n 'resultRawFactory' => $this->resultRawFactory\n ]\n );\n }", "function loadController(){\n $name = ucfirst($this->request->controller).'Controller' ;\n $file = ROOT.DS.'Controller'.DS.$name.'.php' ;\n /*if(!file_exists($file)){\n $this->error(\"Le controleur \".$this->request->controller.\" n'existe pas\") ;\n }*/\n require_once $file;\n $controller = new $name($this->request);\n return $controller ;\n }", "public function __construct(){\r\n $app = Application::getInstance();\r\n $this->_controller = $app->getController();\r\n }", "public static function & instance()\n {\n if (self::$instance === null) {\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Include the Controller file\n require Router::$controller_path;\n\n try {\n // Start validation of the controller\n $class = new ReflectionClass(ucfirst(Router::$controller).'_Controller');\n } catch (ReflectionException $e) {\n // Controller does not exist\n Event::run('system.404');\n }\n\n if ($class->isAbstract() or (IN_PRODUCTION and $class->getConstant('ALLOW_PRODUCTION') == false)) {\n // Controller is not allowed to run in production\n Event::run('system.404');\n }\n\n // Run system.pre_controller\n Event::run('system.pre_controller');\n\n // Create a new controller instance\n $controller = $class->newInstance();\n\n // Controller constructor has been executed\n Event::run('system.post_controller_constructor');\n\n try {\n // Load the controller method\n $method = $class->getMethod(Router::$method);\n\n // Method exists\n if (Router::$method[0] === '_') {\n // Do not allow access to hidden methods\n Event::run('system.404');\n }\n\n if ($method->isProtected() or $method->isPrivate()) {\n // Do not attempt to invoke protected methods\n throw new ReflectionException('protected controller method');\n }\n\n // Default arguments\n $arguments = Router::$arguments;\n } catch (ReflectionException $e) {\n // Use __call instead\n $method = $class->getMethod('__call');\n\n // Use arguments in __call format\n $arguments = array(Router::$method, Router::$arguments);\n }\n\n // Stop the controller setup benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Start the controller execution benchmark\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_execution');\n\n // Execute the controller method\n $method->invokeArgs($controller, $arguments);\n\n // Controller method has been executed\n Event::run('system.post_controller');\n\n // Stop the controller execution benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_execution');\n }\n\n return self::$instance;\n }", "protected function instantiateController($class)\n {\n $controller = new $class();\n\n if ($controller instanceof Controller) {\n $controller->setContainer($this->container);\n }\n\n return $controller;\n }", "public function __construct (){\n $this->AdminController = new AdminController();\n $this->ArticleController = new ArticleController();\n $this->AuditoriaController = new AuditoriaController();\n $this->CommentController = new CommentController();\n $this->CourseController = new CourseController();\n $this->InscriptionsController = new InscriptionsController();\n $this->ModuleController = new ModuleController();\n $this->PlanController = new PlanController();\n $this->ProfileController = new ProfileController();\n $this->SpecialtyController = new SpecialtyController();\n $this->SubscriptionController = new SubscriptionController();\n $this->TeacherController = new TeacherController();\n $this->UserController = new UserController();\n $this->WebinarController = new WebinarController();\n }", "protected function makeController($prefix)\n {\n new MakeController($this, $this->files, $prefix);\n }", "public function createController($route)\n {\n $controller = parent::createController('gymv/' . $route);\n return $controller === false\n ? parent::createController($route)\n : $controller;\n }", "public static function createFrontController()\n {\n return self::createInjectorWithBindings(self::extractArgs(func_get_args()))\n ->getInstance('net::stubbles::websites::stubFrontController');\n }", "public static function controller($name)\n {\n $name = ucfirst(strtolower($name));\n \n $directory = 'controller';\n $filename = $name;\n $tracker = 'controller';\n $init = (boolean) $init;\n $namespace = 'controller';\n $class_name = $name;\n \n return self::_load($directory, $filename, $tracker, $init, $namespace, $class_name);\n }", "protected static function instantiateMockController()\n {\n /** @var Event $oEvent */\n $oEvent = Factory::service('Event');\n\n if (!$oEvent->hasBeenTriggered(Events::SYSTEM_STARTING)) {\n\n require_once BASEPATH . 'core/Controller.php';\n\n load_class('Output', 'core');\n load_class('Security', 'core');\n load_class('Input', 'core');\n load_class('Lang', 'core');\n\n new NailsMockController();\n }\n }", "private static function controller()\n {\n $files = ['Controller'];\n $folder = static::$root.'MVC'.'/';\n\n self::call($files, $folder);\n }", "public function createController()\n\t{\n\t\t$originalFile = app_path('Http/Controllers/Reports/SampleReport.php');\n\t\t$newFile = dirname($originalFile) . DIRECTORY_SEPARATOR . $this->class . $this->sufix . '.php';\n\n\t\t// Read original file\n\t\tif( ! $content = file_get_contents($originalFile))\n\t\t\treturn false;\n\n\t\t// Replace class name\n\t\t$content = str_replace('SampleReport', $this->class . $this->sufix, $content);\n\n\t\t// Write new file\n\t\treturn (bool) file_put_contents($newFile, $content);\n\t}", "public function runController() {\n // Check for a router\n if (is_null($this->getRouter())) {\n \t // Set the method to load\n \t $sController = ucwords(\"{$this->getController()}Controller\");\n } else {\n\n // Set the controller with the router\n $sController = ucwords(\"{$this->getController()}\".ucfirst($this->getRouter()).\"Controller\");\n }\n \t// Check for class\n \tif (class_exists($sController, true)) {\n \t\t// Set a new instance of Page\n \t\t$this->setPage(new Page());\n \t\t// The class exists, load it\n \t\t$oController = new $sController();\n\t\t\t\t// Now check for the proper method \n\t\t\t\t// inside of the controller class\n\t\t\t\tif (method_exists($oController, $this->loadConfigVar('systemSettings', 'controllerLoadMethod'))) {\n\t\t\t\t\t// We have a valid controller, \n\t\t\t\t\t// execute the initializer\n\t\t\t\t\t$oController->init($this);\n\t\t\t\t\t// Set the variable scope\n\t \t\t$this->setViewScope($oController);\n\t \t\t// Render the layout\n\t \t\t$this->renderLayout();\n\t\t\t\t} else {\n\t\t\t\t\t// The initializer does not exist, \n\t\t\t\t\t// which means an invalid controller, \n\t\t\t\t\t// so now we let the caller know\n\t\t\t\t\t$this->setError($this->loadConfigVar('errorMessages', 'invalidController'));\n\t\t\t\t\t// Run the error\n\t\t\t\t\t// $this->runError();\n\t\t\t\t}\n \t// The class does not exist\n \t} else {\n\t\t\t\t// Set the system error\n\t \t\t$this->setError(\n\t\t\t\t\tstr_replace(\n\t\t\t\t\t\t':controllerName', \n\t\t\t\t\t\t$sController, \n\t\t\t\t\t\t$this->loadConfigVar(\n\t\t\t\t\t\t\t'errorMessages', \n\t\t\t\t\t\t\t'controllerDoesNotExist'\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n \t\t// Run the error\n\t\t\t\t// $this->runError();\n \t}\n \t// Return instance\n \treturn $this;\n }", "public function controller()\n\t{\n\t\n\t}", "protected function buildController()\n {\n $columns = collect($this->columns)->pluck('column')->implode('|');\n\n $permissions = [\n 'create:'.$this->module->createPermission->name,\n 'edit:'.$this->module->editPermission->name,\n 'delete:'.$this->module->deletePermission->name,\n ];\n\n $this->controller = [\n 'name' => $this->class,\n '--model' => $this->class,\n '--request' => $this->class.'Request',\n '--permissions' => implode('|', $permissions),\n '--view-folder' => snake_case($this->module->name),\n '--fields' => $columns,\n '--module' => $this->module->id,\n ];\n }", "function getController(){\n\treturn getFactory()->getBean( 'Controller' );\n}", "protected function getController()\n {\n $uri = WingedLib::clearPath(static::$parentUri);\n if (!$uri) {\n $uri = './';\n $explodedUri = ['index', 'index'];\n } else {\n $explodedUri = explode('/', $uri);\n if (count($explodedUri) == 1) {\n $uri = './' . $explodedUri[0] . '/';\n } else {\n $uri = './' . $explodedUri[0] . '/' . $explodedUri[1] . '/';\n }\n }\n\n $indexUri = WingedLib::clearPath(\\WingedConfig::$config->INDEX_ALIAS_URI);\n if ($indexUri) {\n $indexUri = explode('/', $indexUri);\n }\n\n if ($indexUri) {\n if ($explodedUri[0] === 'index' && isset($indexUri[0])) {\n static::$controllerName = Formater::camelCaseClass($indexUri[0]) . 'Controller';\n $uri = './' . $indexUri[0] . '/';\n }\n if (isset($explodedUri[1]) && isset($indexUri[1])) {\n if ($explodedUri[1] === 'index') {\n static::$controllerAction = 'action' . Formater::camelCaseMethod($indexUri[1]);\n $uri .= $indexUri[1] . '/';\n }\n } else {\n $uri .= 'index/';\n }\n }\n\n $controllerDirectory = new Directory(static::$parent . 'controllers/', false);\n if ($controllerDirectory->exists()) {\n $controllerFile = new File($controllerDirectory->folder . static::$controllerName . '.php', false);\n if ($controllerFile->exists()) {\n include_once $controllerFile->file_path;\n if (class_exists(static::$controllerName)) {\n $controller = new static::$controllerName();\n if (method_exists($controller, static::$controllerAction)) {\n try {\n $reflectionMethod = new \\ReflectionMethod(static::$controllerName, static::$controllerAction);\n $pararms = [];\n foreach ($reflectionMethod->getParameters() as $parameter) {\n $pararms[$parameter->getName()] = $parameter->isOptional();\n }\n } catch (\\Exception $exception) {\n $pararms = [];\n }\n return [\n 'uri' => $uri,\n 'params' => $pararms,\n ];\n }\n }\n }\n }\n return false;\n }", "public function __construct()\n {\n $this->controller = new DHTController();\n }", "public function createController($controllers) {\n\t\tforeach($controllers as $module=>$controllers) {\n\t\t\tforeach($controllers as $key=>$controller) {\n\t\t\t\tif(!file_exists(APPLICATION_PATH.\"/modules/$module/controllers/\".ucfirst($controller).\"Controller.php\")) {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",\"Create '\".ucfirst($controller).\"' controller in $module\");\t\t\t\t\n\t\t\t\t\texec(\"zf create controller $controller index-action-included=0 $module\");\t\t\t\t\t\n\t\t\t\t}\telse {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",ucfirst($controller).\"' controller in $module already exists\");\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t}", "protected function instantiateController($class)\n {\n return new $class($this->routesMaker);\n }", "private function createController($table){\n\n // Filtering file name\n $fileName = $this::cleanToName($table[\"name\"]) . 'Controller.php';\n\n // Prepare the Class scheme inside the controller\n $contents = '<?php '.$fileName.' ?>';\n\n\n // Return a boolean to process completed\n return Storage::disk('controllers')->put($this->appNamePath.'/'.$fileName, $contents);\n\n }", "public function GetController()\n\t{\n\t\t$params = $this->QueryVarArrayToParameterArray($_GET);\n\t\tif (!empty($_POST)) {\n\t\t\t$params = array_merge($params, $this->QueryVarArrayToParameterArray($_POST));\n\t\t}\n\n\t\tif (!empty($_GET['q'])) {\n\t\t\t$restparams = GitPHP_Router::ReadCleanUrl($_SERVER['REQUEST_URI']);\n\t\t\tif (count($restparams) > 0)\n\t\t\t\t$params = array_merge($params, $restparams);\n\t\t}\n\n\t\t$controller = null;\n\n\t\t$action = null;\n\t\tif (!empty($params['action']))\n\t\t\t$action = $params['action'];\n\n\t\tswitch ($action) {\n\n\n\t\t\tcase 'search':\n\t\t\t\t$controller = new GitPHP_Controller_Search();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commitdiff':\n\t\t\tcase 'commitdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Commitdiff();\n\t\t\t\tif ($action === 'commitdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blobdiff':\n\t\t\tcase 'blobdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Blobdiff();\n\t\t\t\tif ($action === 'blobdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'history':\n\t\t\t\t$controller = new GitPHP_Controller_History();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'shortlog':\n\t\t\tcase 'log':\n\t\t\t\t$controller = new GitPHP_Controller_Log();\n\t\t\t\tif ($action === 'shortlog')\n\t\t\t\t\t$controller->SetParam('short', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'snapshot':\n\t\t\t\t$controller = new GitPHP_Controller_Snapshot();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tree':\n\t\t\tcase 'trees':\n\t\t\t\t$controller = new GitPHP_Controller_Tree();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tags':\n\t\t\t\tif (empty($params['tag'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Tags();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcase 'tag':\n\t\t\t\t$controller = new GitPHP_Controller_Tag();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'heads':\n\t\t\t\t$controller = new GitPHP_Controller_Heads();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blame':\n\t\t\t\t$controller = new GitPHP_Controller_Blame();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blob':\n\t\t\tcase 'blobs':\n\t\t\tcase 'blob_plain':\t\n\t\t\t\t$controller = new GitPHP_Controller_Blob();\n\t\t\t\tif ($action === 'blob_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'atom':\n\t\t\tcase 'rss':\n\t\t\t\t$controller = new GitPHP_Controller_Feed();\n\t\t\t\tif ($action == 'rss')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::RssFormat);\n\t\t\t\telse if ($action == 'atom')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::AtomFormat);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commit':\n\t\t\tcase 'commits':\n\t\t\t\t$controller = new GitPHP_Controller_Commit();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'summary':\n\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'project_index':\n\t\t\tcase 'projectindex':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('txt', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'opml':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('opml', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'login':\n\t\t\t\t$controller = new GitPHP_Controller_Login();\n\t\t\t\tif (!empty($_POST['username']))\n\t\t\t\t\t$controller->SetParam('username', $_POST['username']);\n\t\t\t\tif (!empty($_POST['password']))\n\t\t\t\t\t$controller->SetParam('password', $_POST['password']);\n\t\t\t\tbreak;\n\n\t\t\tcase 'logout':\n\t\t\t\t$controller = new GitPHP_Controller_Logout();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'graph':\n\t\t\tcase 'graphs':\n\t\t\t\t//$controller = new GitPHP_Controller_Graph();\n\t\t\t\t//break;\n\t\t\tcase 'graphdata':\n\t\t\t\t//$controller = new GitPHP_Controller_GraphData();\n\t\t\t\t//break;\n\t\t\tdefault:\n\t\t\t\tif (!empty($params['project'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\t} else {\n\t\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t}\n\t\t}\n\n\t\tforeach ($params as $paramname => $paramval) {\n\t\t\tif ($paramname !== 'action')\n\t\t\t\t$controller->SetParam($paramname, $paramval);\n\t\t}\n\n\t\t$controller->SetRouter($this);\n\n\t\treturn $controller;\n\t}", "public function testCreateTheControllerClass()\n {\n $controller = new Game21Controller();\n $this->assertInstanceOf(\"\\App\\Http\\Controllers\\Game21Controller\", $controller);\n }", "public static function createController( MShop_Context_Item_Interface $context, $name = null );", "public function __construct()\n {\n\n $url = $this->splitURL();\n // echo $url[0];\n\n // check class file exists\n if (file_exists(\"../app/controllers/\" . strtolower($url[0]) . \".php\")) {\n $this->controller = strtolower($url[0]);\n unset($url[0]);\n }\n\n // echo $this->controller;\n\n require \"../app/controllers/\" . $this->controller . \".php\";\n\n // create Instance(object)\n $this->controller = new $this->controller(); // $this->controller is an object from now on\n if (isset($url[1])) {\n if (method_exists($this->controller, $url[1])) {\n $this->method = $url[1];\n unset($url[1]);\n }\n }\n\n // run the class and method\n $this->params = array_values($url); // array_values 값들인 인자 0 부터 다시 배치\n call_user_func_array([$this->controller, $this->method], $this->params);\n }", "public function getController();", "public function getController();", "public function getController();", "public function createController($pageType, $template)\n {\n $controller = null;\n\n // Use factories first\n if (isset($this->controllerFactories[$pageType])) {\n $callable = $this->controllerFactories[$pageType];\n $controller = $callable($this, 'templates/'.$template);\n\n if ($controller) {\n return $controller;\n }\n }\n\n // See if a default controller exists in the theme namespace\n $class = null;\n if ($pageType == 'posts') {\n $class = $this->namespace.'\\\\Controllers\\\\PostsController';\n } elseif ($pageType == 'post') {\n $class = $this->namespace.'\\\\Controllers\\\\PostController';\n } elseif ($pageType == 'page') {\n $class = $this->namespace.'\\\\Controllers\\\\PageController';\n } elseif ($pageType == 'term') {\n $class = $this->namespace.'\\\\Controllers\\\\TermController';\n }\n\n if (class_exists($class)) {\n $controller = new $class($this, 'templates/'.$template);\n\n return $controller;\n }\n\n // Create a default controller from the stem namespace\n if ($pageType == 'posts') {\n $controller = new PostsController($this, 'templates/'.$template);\n } elseif ($pageType == 'post') {\n $controller = new PostController($this, 'templates/'.$template);\n } elseif ($pageType == 'page') {\n $controller = new PageController($this, 'templates/'.$template);\n } elseif ($pageType == 'search') {\n $controller = new SearchController($this, 'templates/'.$template);\n } elseif ($pageType == 'term') {\n $controller = new TermController($this, 'templates/'.$template);\n }\n\n return $controller;\n }", "private function loadController($controller)\r\n {\r\n $className = $controller.'Controller';\r\n \r\n $class = new $className($this);\r\n \r\n $class->init();\r\n \r\n return $class;\r\n }", "public static function newInstance ($class)\n {\n try\n {\n // the class exists\n $object = new $class();\n\n if (!($object instanceof sfController))\n {\n // the class name is of the wrong type\n $error = 'Class \"%s\" is not of the type sfController';\n $error = sprintf($error, $class);\n\n throw new sfFactoryException($error);\n }\n\n return $object;\n }\n catch (sfException $e)\n {\n $e->printStackTrace();\n }\n }", "public function create()\n {\n //TODO frontEndDeveloper \n //load admin.classes.create view\n\n\n return view('admin.classes.create');\n }", "private function generateControllerClass()\n {\n $dir = $this->bundle->getPath();\n\n $parts = explode('\\\\', $this->entity);\n $entityClass = array_pop($parts);\n $entityNamespace = implode('\\\\', $parts);\n\n $target = sprintf(\n '%s/Controller/%s/%sController.php',\n $dir,\n str_replace('\\\\', '/', $entityNamespace),\n $entityClass\n );\n\n if (file_exists($target)) {\n throw new \\RuntimeException('Unable to generate the controller as it already exists.');\n }\n\n $this->renderFile($this->skeletonDir, 'controller.php', $target, array(\n 'actions' => $this->actions,\n 'route_prefix' => $this->routePrefix,\n 'route_name_prefix' => $this->routeNamePrefix,\n 'dir' => $this->skeletonDir,\n 'bundle' => $this->bundle->getName(),\n 'entity' => $this->entity,\n 'entity_class' => $entityClass,\n 'namespace' => $this->bundle->getNamespace(),\n 'entity_namespace' => $entityNamespace,\n 'format' => $this->format,\n ));\n }", "static public function Instance()\t\t// Static so we use classname itself to create object i.e. Controller::Instance()\r\n {\r\n // Only one object of this class is required\r\n // so we only create if it hasn't already\r\n // been created.\r\n if(!isset(self::$_instance))\r\n {\r\n self::$_instance = new self();\t// Make new instance of the Controler class\r\n self::$_instance->_commandResolver = new CommandResolver();\r\n\r\n ApplicationController::LoadViewMap();\r\n }\r\n return self::$_instance;\r\n }", "private function create_mock_controller() {\n eval('class TestController extends cyclone\\request\\SkeletonController {\n function before() {\n DispatcherTest::$beforeCalled = TRUE;\n DispatcherTest::$route = $this->_request->route;\n }\n\n function after() {\n DispatcherTest::$afterCalled = TRUE;\n }\n\n function action_act() {\n DispatcherTest::$actionCalled = TRUE;\n }\n}');\n }", "public function AController() {\r\n\t}", "protected function initializeController() {}", "public function dispatch()\n { \n $controller = $this->formatController();\n $controller = new $controller($this);\n if (!$controller instanceof ControllerAbstract) {\n throw new Exception(\n 'Class ' . get_class($controller) . ' is not a valid controller instance. Controller classes must '\n . 'derive from \\Europa\\ControllerAbstract.'\n );\n }\n $controller->action();\n return $controller;\n }", "public function controller()\n {\n $method = $_SERVER['REQUEST_METHOD'];\n if ($method == 'GET') {\n $this->getController();\n };\n if ($method == 'POST') {\n check_csrf();\n $this->createController();\n };\n }", "private function addController($controller)\n {\n $object = new $controller($this->app);\n $this->controllers[$controller] = $object;\n }", "function Controller($ControllerName = Web\\Application\\DefaultController) {\n return Application()->Controller($ControllerName);\n }", "public function getController($controllerName) {\r\n\t\tif(!isset(self::$instances[$controllerName])) {\r\n\t\t $package = $this->getPackage(Nomenclature::getVendorAndPackage($controllerName));\r\n\t\t if(!$package) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t return $controller;\r\n\t\t //return false;\r\n\t\t }\r\n\r\n\t\t if(!$package || !$package->controllerExists($controllerName)) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t $package->addController($controller);\r\n\t\t } else {\r\n\t\t $controller = $package->getController($controllerName);\r\n\t\t }\r\n\t\t} else {\r\n\t\t $controller = self::$instances[$controllerName];\r\n\t\t}\r\n\t\treturn $controller;\r\n\t}", "public function testInstantiateSessionController()\n {\n $controller = new SessionController();\n\n $this->assertInstanceOf(\"App\\Http\\Controllers\\SessionController\", $controller);\n }", "private static function loadController($str) {\n\t\t$str = self::formatAsController($str);\n\t\t$app_controller = file_exists(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t$lib_controller = file_exists(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\n\t\tif ( $app_controller || $lib_controller ) {\n\t\t\tif ($app_controller) {\n\t\t\t\trequire_once(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\t\telse {\n\t\t\t\trequire_once(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\n\t\t\t$controller = new $str();\n\t\t\t\n\t\t\tif (!$controller instanceof Controller) {\n\t\t\t\tthrow new IsNotControllerException();\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn $controller;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthrow new ControllerNotExistsException($str);\n\t\t}\n\t}", "public function __construct()\n {\n // and $url[1] is a controller method\n if ($_GET['url'] == NULL) {\n $url = explode('/', env('defaultRoute'));\n } else {\n $url = explode('/', rtrim($_GET['url'],'/'));\n }\n\n $file = 'controllers/' . $url[0] . '.php';\n if (file_exists($file)) {\n require $file;\n $controller = new $url[0];\n\n if (isset($url[1])) {\n $controller->{$url[1]}();\n }\n } else {\n echo \"404 not found\";\n }\n }", "protected function _controllers()\n {\n $this['watchController'] = $this->factory(static function ($c) {\n return new Controller\\WatchController($c['app'], $c['searcher']);\n });\n\n $this['runController'] = $this->factory(static function ($c) {\n return new Controller\\RunController($c['app'], $c['searcher']);\n });\n\n $this['customController'] = $this->factory(static function ($c) {\n return new Controller\\CustomController($c['app'], $c['searcher']);\n });\n\n $this['waterfallController'] = $this->factory(static function ($c) {\n return new Controller\\WaterfallController($c['app'], $c['searcher']);\n });\n\n $this['importController'] = $this->factory(static function ($c) {\n return new Controller\\ImportController($c['app'], $c['saver'], $c['config']['upload.token']);\n });\n\n $this['metricsController'] = $this->factory(static function ($c) {\n return new Controller\\MetricsController($c['app'], $c['searcher']);\n });\n }", "public function __construct() {\r\n $this->controllerLogin = new ControllerLogin();\r\n $this->controllerGame = new ControllerGame();\r\n $this->controllerRegister = new ControllerRegister();\r\n }", "public function controller ($post = array())\n\t{\n\n\t\t$name = $post['controller_name'];\n\n\t\tif (is_file(APPPATH.'controllers/'.$name.'.php')) {\n\n\t\t\t$message = sprintf(lang('Controller_s_is_existed'), APPPATH.'controllers/'.$name.'.php');\n\n\t\t\t$this->msg[] = $message;\n\n\t\t\treturn $this->result(false, $this->msg[0]);\n\n\t\t}\n\n\t\t$extends = null;\n\n\t\tif (isset($post['crud'])) {\n\n\t\t\t$crud = true;\n\t\t\t\n\t\t}\n\t\telse{\n\n\t\t\t$crud = false;\n\n\t\t}\n\n\t\t$file = $this->_create_folders_from_name($name, 'controllers');\n\n\t\t$data = '';\n\n\t\t$data .= $this->_class_open($file['file'], __METHOD__, $extends);\n\n\t\t$crud === FALSE || $data .= $this->_crud_methods_contraller($post);\n\n\t\t$data .= $this->_class_close();\n\n\t\t$path = APPPATH . 'controllers/' . $file['path'] . strtolower($file['file']) . '.php';\n\n\t\twrite_file($path, $data);\n\n\t\t$this->msg[] = sprintf(lang('Created_controller_s'), $path);\n\n\t\t//echo $this->_messages();\n\t\treturn $this->result(true, $this->msg[0]);\n\n\t}", "protected function getController(Request $request) {\n try {\n $controller = $this->objectFactory->create($request->getControllerName(), self::INTERFACE_CONTROLLER);\n } catch (ZiboException $exception) {\n throw new ZiboException('Could not create controller ' . $request->getControllerName(), 0, $exception);\n }\n\n return $controller;\n }", "public function create() {}", "public function __construct()\n {\n $this->dataController = new DataController;\n }", "function __contrruct(){ //construdor do controller, nele é possivel carregar as librari, helpers, models que serão utilizados nesse controller\n\t\tparent::__contrruct();//Chamando o construtor da classe pai\n\t}", "public function __construct() {\n\n // Get the URL elements.\n $url = $this->_parseUrl();\n\n // Checks if the first URL element is set / not empty, and replaces the\n // default controller class string if the given class exists.\n if (isset($url[0]) and ! empty($url[0])) {\n $controllerClass = CONTROLLER_PATH . ucfirst(strtolower($url[0]));\n unset($url[0]);\n if (class_exists($controllerClass)) {\n $this->_controllerClass = $controllerClass;\n }\n }\n\n // Replace the controller class string with a new instance of the it.\n $this->_controllerClass = new $this->_controllerClass;\n\n // Checks if the second URL element is set / not empty, and replaces the\n // default controller action string if the given action is a valid class\n // method.\n if (isset($url[1]) and ! empty($url[1])) {\n if (method_exists($this->_controllerClass, $url[1])) {\n $this->_controllerAction = $url[1];\n unset($url[1]);\n }\n }\n\n // Check if the URL has any remaining elements, setting the controller\n // parameters as a rebase of it if true or an empty array if false.\n $this->_controllerParams = $url ? array_values($url) : [];\n\n // Call the controller and action with parameters.\n call_user_func_array([$this->_controllerClass, $this->_controllerAction], $this->_controllerParams);\n }", "private function setUpController()\n {\n $this->controller = new TestObject(new SharedControllerTestController);\n\n $this->controller->dbal = DBAL::getDBAL('testDB', $this->getDBH());\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }" ]
[ "0.82668066", "0.8173394", "0.78115296", "0.77052677", "0.7681875", "0.7659338", "0.74860525", "0.74064577", "0.7297601", "0.7252339", "0.7195181", "0.7174191", "0.70150065", "0.6989306", "0.69835985", "0.69732994", "0.6963521", "0.6935819", "0.68973273", "0.68920785", "0.6877748", "0.68702674", "0.68622285", "0.6839049", "0.6779292", "0.6703522", "0.66688496", "0.66600126", "0.6650373", "0.66436416", "0.6615505", "0.66144013", "0.6588728", "0.64483404", "0.64439476", "0.6429303", "0.6426485", "0.6303757", "0.6298291", "0.6293319", "0.62811387", "0.6258778", "0.62542456", "0.616827", "0.6162314", "0.61610043", "0.6139887", "0.613725", "0.61334985", "0.6132223", "0.6128982", "0.61092585", "0.6094611", "0.60889256", "0.6074893", "0.60660255", "0.6059098", "0.60565156", "0.6044235", "0.60288006", "0.6024102", "0.60225666", "0.6018304", "0.60134345", "0.60124683", "0.6010913", "0.6009284", "0.6001683", "0.5997471", "0.5997012", "0.59942573", "0.5985074", "0.5985074", "0.5985074", "0.5967613", "0.5952533", "0.5949068", "0.5942203", "0.5925731", "0.5914304", "0.5914013", "0.59119135", "0.5910308", "0.5910285", "0.59013796", "0.59003943", "0.5897524", "0.58964556", "0.58952993", "0.58918965", "0.5888943", "0.5875413", "0.5869938", "0.58627135", "0.58594996", "0.5853714", "0.5839484", "0.5832913", "0.582425", "0.58161044", "0.5815566" ]
0.0
-1
Show the application dashboard.
public function index() { $shipping = ShippingAddress::findOrFail(Auth::user()->id); $billing = BillingAddress::findOrFail(Auth::user()->id); $user = User::findOrFail(Auth::user()->id); return view('client.index', compact('shipping', 'billing', 'user')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function dashboard()\n {\n\n $pageData = (new DashboardService())->handleDashboardLandingPage();\n\n return view('application', $pageData);\n }", "function dashboard() {\r\n\t\t\tTrackTheBookView::render('dashboard');\r\n\t\t}", "public function showDashboard() { \n\t\n return View('admin.dashboard');\n\t\t\t\n }", "public function showDashboard()\n {\n return View::make('users.dashboard', [\n 'user' => Sentry::getUser(),\n ]);\n }", "public function dashboard()\n {\n return view('backend.dashboard.index');\n }", "public function index() {\n return view(\"admin.dashboard\");\n }", "public function dashboard()\n {\n return $this->renderContent(\n view('dashboard'),\n trans('sleeping_owl::lang.dashboard')\n );\n }", "public function dashboard(){\n return view('backend.admin.index');\n }", "public function showDashBoard()\n {\n \treturn view('Admins.AdminDashBoard');\n }", "public function dashboard()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('admin.dashboard', ['title' => 'Dashboard']);\n }", "public function dashboard() \r\n {\r\n return view('admin.index');\r\n }", "public function dashboard()\n\t{\n\t\t$page_title = 'organizer dashboard';\n\t\treturn View::make('organizer.dashboard',compact('page_title'));\n\t}", "public function dashboard()\n {\n\t\t$traffic = TrafficService::getTraffic();\n\t\t$devices = TrafficService::getDevices();\n\t\t$browsers = TrafficService::getBrowsers();\n\t\t$status = OrderService::getStatus();\n\t\t$orders = OrderService::getOrder();\n\t\t$users = UserService::getTotal();\n\t\t$products = ProductService::getProducts();\n\t\t$views = ProductService::getViewed();\n\t\t$total_view = ProductService::getTotalView();\n\t\t$cashbook = CashbookService::getAccount();\n $stock = StockService::getStock();\n\n return view('backend.dashboard', compact('traffic', 'devices', 'browsers', 'status', 'orders', 'users', 'products', 'views', 'total_view', 'cashbook', 'stock'));\n }", "public function dashboard()\n {\n\n return view('admin.dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('adm.dashboard');\n }", "public function dashboard()\n {\n $users = \\App\\User::all()->count();\n $roles = \\Spatie\\Permission\\Models\\Role::all()->count();\n $permissions = \\Spatie\\Permission\\Models\\Permission::all()->count();\n $banner = \\App\\Banner::all();\n $categoria = \\App\\Categoria::all();\n $entidadOrganizativa = \\App\\Entidadorganizativa::all();\n $evento = \\App\\Evento::all();\n $fichero = \\App\\Fichero::all();\n $recurso = \\App\\Recurso::all();\n $redsocial = \\App\\Redsocial::all();\n $subcategoria = \\App\\Subcategoria::all();\n $tag = \\App\\Tag::all();\n\n $entities = \\Amranidev\\ScaffoldInterface\\Models\\Scaffoldinterface::all();\n\n return view('scaffold-interface.dashboard.dashboard',\n compact('users', 'roles', 'permissions', 'entities',\n 'banner', 'categoria', 'entidadOrganizativa',\n 'evento', 'fichero', 'recurso', 'redsocial', 'subcategoria', 'tag')\n );\n }", "public function show()\n {\n return view('dashboard');\n }", "public function index()\n\t{\n\t\treturn View::make('dashboard');\n\t}", "public function index() {\n return view('modules.home.dashboard');\n }", "public function show()\n {\n return view('dashboard.dashboard');\n \n }", "public function index()\n {\n return view('admin.dashboard.dashboard');\n\n }", "public function dashboard()\n { \n return view('jobposter.dashboard');\n }", "public function show()\n\t{\n\t\t//\n\t\t$apps = \\App\\application::all();\n\t\treturn view('applications.view', compact('apps'));\n\t}", "public function index()\n {\n return view('pages.admin.dashboard');\n }", "public function indexAction()\n {\n $dashboard = $this->getDashboard();\n\n return $this->render('ESNDashboardBundle::index.html.twig', array(\n 'title' => \"Dashboard\"\n ));\n }", "public function index()\n {\n //\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard.index');\n }", "public function dashboard()\n {\n return view('pages.backsite.dashboard');\n }", "public function index()\n {\n // return component view('dashboard.index');\n return view('layouts.admin_master');\n }", "public function index()\n {\n\n $no_of_apps = UploadApp::count();\n $no_of_analysis_done = UploadApp::where('isAnalyzed', '1')->count();\n $no_of_visible_apps = AnalysisResult::where('isVisible', '1')->count();\n\n return view('admin.dashboard', compact('no_of_apps', 'no_of_analysis_done', 'no_of_visible_apps'));\n }", "public function getDashboard() {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('smartcrud.auth.dashboard');\n }", "public function index()\n {\n if($this->isAdmin() == TRUE)\n {\n $this->loadThis();\n }\n $this->global['pageTitle'] = 'Touba : Dashboard';\n \n $this->loadViews(\"dashboard\", $this->global, NULL , NULL);\n }", "public function dashboard() {\n $data = ['title' => 'Dashboard'];\n return view('pages.admin.dashboard', $data)->with([\n 'users' => $this->users,\n 'num_services' => Service::count(),\n 'num_products' => Product::count(),\n ]);\n }", "public function index()\n {\n return view('board.pages.dashboard-board');\n }", "public function index()\n {\n return view('admin::settings.development.dashboard');\n }", "public function index()\n {\n return view('dashboard.dashboard');\n }", "public function show()\n {\n return view('dashboard::show');\n }", "public function adminDash()\n {\n return Inertia::render(\n 'Admin/AdminDashboard', \n [\n 'data' => ['judul' => 'Halaman Admin']\n ]\n );\n }", "public function dashboard()\n {\n return view('Admin.dashboard');\n }", "public function show()\n {\n return view('admins\\auth\\dashboard');\n }", "public function index()\n {\n // Report =============\n\n return view('Admin.dashboard');\n }", "public function index()\n {\n return view('bitaac::account.dashboard');\n }", "public function index()\n { \n return view('admin-views.dashboard');\n }", "public function getDashboard()\n {\n return view('dashboard');\n }", "function showDashboard()\n { \n $logeado = $this->checkCredentials();\n if ($logeado==true)\n $this->view->ShowDashboard();\n else\n $this->view->showLogin();\n }", "public function index()\n { \n $params['crumbs'] = 'Home';\n $params['active'] = 'home';\n \n return view('admin.dashboard.index', $params);\n }", "public function index()\n\t{\n\t\treturn view::make('customer_panel.dashboard');\n\t}", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index() {\n // return view('home');\n return view('admin-layouts.dashboard.dashboard');\n }", "public function index()\r\n {\r\n return view('user.dashboard');\r\n }", "public function index() {\n return view('dashboard', []);\n }", "public function index()\n {\n //\n return view('dashboard.dashadmin', ['page' => 'mapel']);\n }", "public function index()\n {\n return view('back-end.dashboard.index');\n //\n }", "public function index()\n\t{\n\t\t\n\t\t$data = array(\n\t\t\t'title' => 'Administrator Apps With Laravel',\n\t\t);\n\n\t\treturn View::make('panel/index',$data);\n\t}", "public function index() {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('page.dashboard.index');\n }", "public function index()\n {\n\n return view('dashboard');\n }", "public function dashboardview() {\n \n $this->load->model('Getter');\n $data['dashboard_content'] = $this->Getter->get_dash_content();\n \n $this->load->view('dashboardView', $data);\n\n }", "public function index()\n {\n $this->authorize(DashboardPolicy::PERMISSION_STATS);\n\n $this->setTitle($title = trans('auth::dashboard.titles.statistics'));\n $this->addBreadcrumb($title);\n\n return $this->view('admin.dashboard');\n }", "public function action_index()\r\n\t{\t\t\t\t\r\n\t\t$this->template->title = \"Dashboard\";\r\n\t\t$this->template->content = View::forge('admin/dashboard');\r\n\t}", "public function index()\n {\n $info = SiteInfo::limit(1)->first();\n return view('backend.info.dashboard',compact('info'));\n }", "public function display()\n\t{\n\t\t// Set a default view if none exists.\n\t\tif (!JRequest::getCmd( 'view' ) ) {\n\t\t\tJRequest::setVar( 'view', 'dashboard' );\n\t\t}\n\n\t\tparent::display();\n\t}", "public function index()\n {\n $news = News::all();\n $posts = Post::all();\n $events = Event::all();\n $resources = Resources::all();\n $admin = Admin::orderBy('id', 'desc')->get();\n return view('Backend/dashboard', compact('admin', 'news', 'posts', 'events', 'resources'));\n }", "public function index()\n {\n\n return view('superAdmin.adminDashboard')->with('admin',Admininfo::all());\n\n }", "public function index()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n $this->template->set('title', 'Dashboard');\n $this->template->load('admin', 'contents' , 'admin/dashboard/index', array());\n }", "public function index()\n {\n return view('/dashboard');\n }", "public function index()\n {\n \treturn view('dashboard');\n }", "public function index()\n {\n return view('ketua.ketua-dashboard');\n }", "public function index(){\n return View::make('admin.authenticated.dashboardview');\n }", "public function admAmwDashboard()\n {\n return View::make('admission::amw.admission_test.dashboard');\n }", "public function index()\n {\n return view('adminpanel.home');\n }", "public function dashboard()\n\t{\n\t\t$this->validation_access();\n\t\t\n\t\t$this->load->view('user_dashboard/templates/header');\n\t\t$this->load->view('user_dashboard/index.php');\n\t\t$this->load->view('user_dashboard/templates/footer');\n\t}", "public function index()\n {\n return view('dashboard.home');\n }", "public function index()\n {\n $admins = $this->adminServ->all();\n $adminRoles = $this->adminTypeServ->all();\n return view('admin.administrators.dashboard', compact('admins', 'adminRoles'));\n }", "public function index()\n {\n if (ajaxCall::ajax()) {return response()->json($this -> dashboard);}\n //return response()->json($this -> dashboard);\n JavaScript::put($this -> dashboard);\n return view('app')-> with('header' , $this -> dashboard['header']);\n //return view('home');\n }", "public function index()\n {\n $userinfo=User::all();\n $gateinfo=GateEntry::all();\n $yarninfo=YarnStore::all();\n $greyinfo=GreyFabric::all();\n $finishinfo=FinishFabric::all();\n $dyesinfo=DyeChemical::all();\n return view('dashboard',compact('userinfo','gateinfo','yarninfo','greyinfo','finishinfo','dyesinfo'));\n }", "public function actionDashboard(){\n \t$dados_dashboard = Yii::app()->user->getState('dados_dashbord_final');\n \t$this->render ( 'dashboard', $dados_dashboard);\n }", "public function index()\n {\n $user = new User();\n $book = new Book();\n return view('admin.dashboard', compact('user', 'book'));\n }", "public function dashboard() {\n if (!Auth::check()) { // Check is user logged in\n // redirect to dashboard\n return Redirect::to('login');\n }\n\n $user = Auth::user();\n return view('site.dashboard', compact('user'));\n }", "public function dashboard()\n {\n $users = User::all();\n return view('/dashboard', compact('users'));\n }", "public function index()\n {\n $lineChart = $this->getLineChart();\n $barChart = $this->getBarChart();\n $pieChart = $this->getPieChart();\n\n return view('admin.dashboard.index', compact(['lineChart', 'barChart', 'pieChart']));\n }" ]
[ "0.77850926", "0.7760142", "0.7561336", "0.75147176", "0.74653697", "0.7464913", "0.73652893", "0.7351646", "0.7346477", "0.73420244", "0.7326711", "0.7316215", "0.73072463", "0.7287626", "0.72826403", "0.727347", "0.727347", "0.727347", "0.727347", "0.7251768", "0.7251768", "0.7251768", "0.7251768", "0.7251768", "0.7241342", "0.7236133", "0.7235562", "0.7218318", "0.71989936", "0.7197427", "0.71913266", "0.71790016", "0.71684825", "0.71577966", "0.7146797", "0.7133428", "0.7132746", "0.71298903", "0.71249074", "0.71218014", "0.71170413", "0.7110151", "0.7109032", "0.7107029", "0.70974076", "0.708061", "0.7075653", "0.70751685", "0.7064041", "0.70550334", "0.7053102", "0.7051273", "0.70484304", "0.7043605", "0.70393986", "0.70197886", "0.70185125", "0.70139873", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.6992477", "0.6979631", "0.69741416", "0.69741327", "0.6968815", "0.6968294", "0.69677526", "0.69652885", "0.69586027", "0.6944985", "0.69432825", "0.69419175", "0.6941512", "0.6941439", "0.6938837", "0.6937524", "0.6937456", "0.6937456", "0.69276494", "0.6921651", "0.69074917", "0.69020325", "0.6882262", "0.6869339", "0.6867868", "0.68557185", "0.68479055", "0.684518", "0.68408877", "0.6838798", "0.6833479", "0.6832326", "0.68309164", "0.6826798", "0.6812457" ]
0.0
-1
Constructor method to initialize the class If specific year or month is given, set defaults accordingly. Otherwise set defaults to the current date.
public function __construct($y=null,$m=null) { if(is_null($y)) { $this->curYear = date('Y'); } else { if(preg_match("/^[0-9]{4}$/", $y)) { $this->curYear = $y; } else { $this->curYear = date('Y'); } } if(is_null($m)) { $this->curMonth = date('m'); $this->curMonthName = date('F'); $this->daysInMonth = cal_days_in_month(CAL_GREGORIAN, $this->curMonth, $this->curYear); $this->firstDayOfTheMonth = date('w', mktime(0,0,0, $this->curMonth, 1, $this->curYear)); } else { if(preg_match("/[0-9][0-9]?/", $m)) { $m = ($m > 12 ? date('m') : ($m < 1 ? date('m') : $m)); $m = (strlen($m) < 2 ? '0'.$m : ((strlen($m) > 2) ? date('m') : $m)); } $this->curMonth = $m; $this->curMonthName = date('F', mktime(0,0,0,$m,1,$this->curYear)); $this->daysInMonth = cal_days_in_month(CAL_GREGORIAN, $m, $this->curYear); $this->firstDayOfTheMonth = date('w', mktime(0,0,0,$m,1,$this->curYear)); } if($this->curMonth != date('m') || $this->curYear != date('Y')) { $this->curDay = null; $this->curDayS = null; $this->curDayName = null; } else { $this->curDay = date('d'); $this->curDayS = date('dS'); $this->curDayName = date('l'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct()\n\t\t{\n\t\t\t$this->today = date('Y-m-d');\n\n\t\t\t// Set a default start/run date to today. This can be\n\t\t\t// overridden using the setStartDate() method.\n\t\t\t$this->start_date = $this->today;\n\n\t\t\t// Some functions require an end_date. This is set to today\n\t\t\t// but can be overridden using the setEndDate() method.\n\t\t\t$this->end_date = $this->today;\n\t\t}", "public function __construct() {\n // Adding values to the variabels\n $this->currentYear = date(\"Y\");\n $this->offsetYear = 0;\n $this->multiplier = 1;\n }", "public function __construct() {\r\n $this->setMode(self::$modeMonth);\r\n }", "public function __construct()\n {\n $timeStamp = time();\n $month = date('n', $timeStamp);\n $year = date('Y', $timeStamp);\n $this->calendarMonth = new CalendarMonth($month, $year);\n }", "public function __invoke($month = null, $year = null)\n\t{\n\t\t//set the locale\n\t\t$prefs = $this->getUserData();\n\t\t$locale = $prefs['locale'];\n\t\t$base_date = null;\n\n\t\tif ($month != '' && $year != '') \n\t\t{\n\t\t\t$base_date = date('r', mktime(12,0,0,$month, 1, $year));\n\t\t} \n\t\telse \n\t\t{\n\t\t\t$this->month = date('m');\n\t\t\t$this->year = date('Y');\n\t\t\t$base_date = date('r', mktime(12,0,0,date('m'), 1, date('Y')));\n\t\t}\n\t\t\n\t\t$this->setDate($base_date, $locale);\n\t\t$this->setValidDateRange(-36,48);\n\t\treturn $this;\n\t}", "public function setDefaultValues() {\n $this->effective_date = \"1970-1-1\";\n $this->end_date = \"9999-12-31\";\n $this->pu_percentage = 100;\n }", "protected function constructor()\r\n\t{\r\n\t\t$this->finalYear = self::MAX_INT;\r\n\t\t$this->finalMillis = self::MAX_DBL;\r\n\t\t$this->finalZone = null;\r\n\r\n\t\t$this->constructEmpty();\r\n\t}", "private function setDate(){\n\t// Validate incoming parameters\n\t\t$this->di->logger->stamp(__CLASS__, __METHOD__, '');\n\tif (isset($_GET['month'])) {\n\t\tis_numeric($_GET['month']) or die('month has to be numeric');\n\t}\n\tif (isset($_GET['year'])) {\n\t\tis_numeric($_GET['year']) or die('year has to be numeric');\n\t}\n\n\t// Set new date\n\t$this->newMonth = isset($_GET['month']) ? ($_GET['month']) : $this->currentMonth;\n\t$this->newYear = isset($_GET['year']) ? ($_GET['year']) : $this->currentYear;\n\n\tif ($this->newMonth > 12) {\n\t\t$this->newYear = $this->newYear +1;\n\t\t$this->newMonth = 1;\n\t\t$_GET['month'] = 1;\n\n\t}\n\telse if ($this->newMonth < 1) {\n\t\t$this->newYear = $this->newYear -1;\n\t\t$this->newMonth = 12;\n\t\t$_GET['month'] = 12;\n\t}\n\t\n\t}", "private function _default_date_time_units()\n {\n $this->seconds = '00';\n $this->minutes = '00';\n $this->hours = '00';\n\n \n $this->days = date('d');\n $this->months = date('m');\n $this->years = date('Y');\n $this->ampm = 'am';\n }", "public function __construct() {\n\n $language = ee()->TMPL->fetch_param('language') ?? 'de';\n $format = ee()->TMPL->fetch_param('format');\n $date = ee()->TMPL->tagdata;\n\n\n if (! is_numeric($date)) {\n $date = strtotime($date);\n }\n\n if (isset($language)) {\n setlocale(LC_ALL, $language);\n }\n\n $date = ee()->localize->format_date($format, $date);\n\n $this->return_data = $this->getFullMonthByLocale($date, $language);\n }", "public function __construct()\r\n {\r\n $this->createdAt = new \\Datetime('now');\r\n $this->updatedAt = new \\Datetime('now');\r\n $this->deleted = false;\r\n $this->date = new \\Datetime('now');\r\n }", "public function applyDefaultValues()\n {\n $this->create_date = '2020-04-16 09:40:03';\n $this->last_update = '2020-04-16 09:40:03';\n $this->last_sync = '1901-01-01 00:00:00';\n }", "public function __construct()\n {\n $this->setCreated(new \\DateTime());\n $this->setUpdated(new \\DateTime());\n }", "private function set_date()\r\n\t{\r\n\t\tif ($this->month > 12)\r\n\t\t{\r\n\t\t\t$this->month=1;\r\n\t\t\t$this->year++;\r\n\t\t}\r\n\r\n\t\tif ($this->month < 1)\r\n\t\t{\r\n\t\t\t$this->month=12;\r\n\t\t\t$this->year--;\r\n\t\t}\r\n\r\n\t\tif ($this->year > 2037) $this->year = 2037;\r\n\t\tif ($this->year < 1971) $this->year = 1971;\r\n\t}", "public function __construct($app) {\n\t\t$today = getdate();\n\t\t$this->currentMonth = $today['mon'];\n\t\t$this->currentDate \t= $today['mday'];\n\t\t$this->currentYear \t= $today['year'];\n\t\t$this->di = $app;\n\t}", "public function __construct(int $year, int $month = 0, int $day = 0)\n {\n list($checkMonth, $checkDay) = $this->normaliseMonthAndDay($month, $day);\n $check = checkdate(\n $checkMonth,\n $checkDay,\n $year\n );\n\n if (!$check) {\n $this->throwInvalidConstructionException($year, $month, $day);\n }\n\n $this->year = $year;\n $this->month = $month;\n $this->day = $day;\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n // Initialise values\n $this->lastModifiedBy = $this->creator;\n $this->created = time();\n $this->modified = time();\n }", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n {\n $this->date = new \\DateTime();\n $this->earliestbookingdate = new \\DateTime();\n }", "public function __construct($date = null)\n {\n if ($date) {\n $this->_date = Mage::getModel('core/date')->timestamp(strtotime($date));\n } else {\n $this->_date = Mage::getModel('core/date')->timestamp(strtotime(self::$_currentTime));\n }\n }", "public function __construct(\n ?int $year = null,\n ?int $month = null,\n ?int $day = null,\n ?string $locale = null\n ) {\n if (!$year) $year = config('hijri.year_min', self::FALLBACK_YEAR_MIN);\n if (!$month) $month = self::MONTH_MIN;\n if (!$day) $day = self::DAY_MIN;\n if (!$locale) $locale = config('hijri.default_locale', self::FALLBACK_DEFAULT_LOCALE);\n\n $this->setYear($year);\n $this->setMonth($month);\n $this->setDay($day);\n $this->setLocale($locale);\n return $this;\n }", "public function __construct() {\n $this->startup= new Date('2018-06-02 14:12:11+0200');\n $this->responsible= new Person(1549, 'Timm');\n }", "public function __construct($app_date)\n {\n $this->app_date = $app_date;\n }", "public function __construct($format = 'Y-m-d')\n\t{\n\t\t$this->data = array(\n\t\t\t'timestamp' => 0,\n\t\t\t'date' => '',\n\t\t\t\n\t\t\t'year' => 0,\n\t\t\t'month' => 0,\n\t\t\t'day' => 0,\n\t\t);\n\t\t\n\t\t$this->format = $format;\n\t}", "public function __construct()\n\t{\n\t\t$this->setTimeStamp();\n\t}", "public function __construct()\n {\n $this->middleware('auth');\n date_default_timezone_set('Asia/Bangkok');\n $this->curr_raw_time = getdate();\n $this->curr_date = $this->curr_raw_time['year'] . '-' . $this->curr_raw_time['mon'] . '-' . $this->curr_raw_time['mday'];\n $this->curr_date_time = $this->curr_raw_time['year'] . '-' . $this->curr_raw_time['mon'] . '-' . $this->curr_raw_time['mday'] . ' ' . $this->curr_raw_time['hours'] . ':' . $this->curr_raw_time['minutes'] . ':' . $this->curr_raw_time['seconds'];\n }", "public function __construct($date)\n {\n $this->date = $date;\n }", "public function __construct()\n {\n $this->setCreationDate(new \\DateTime());\n $this->setIsActive(true);\n }", "function __construct($year, $month, $day, $uploaded = false) {\n\t\t$this->year = ( string ) $year;\n\t\t$this->month = ( string ) $month;\n\t\t$this->day = ( string ) $day;\n\t\t$this->calendar_date = strtotime ( $year . '-' . $month . '-' . $day );\n\t\t$this->uploaded = $uploaded;\n\t\t\n\t\t// logfile of the import!!!\n\t\t$this->logfile = sfConfig::get ( 'app_import_taxibot_logfile' );\n\t}", "public function __construct()\n {\n\n $this->begindatum = new \\DateTime();\n $this->einddatum = new \\DateTime();\n\n }", "public function __construct() {\n\t\t$this->overrideDefaults( $this->loadDefaults() );\n\t}", "public function __construct($timezone = null)\r\n\t{\r\n\t\t// Call the parent constructor\r\n\t\tif ($timezone)\r\n\t\t{\r\n\t\t\tparent::__construct('now', $timezone);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tparent::__construct('now', new DateTimeZone('Europe/Berlin'));\r\n\t\t}\r\n\t\t\r\n\t\t// Assign values to protected variables\r\n\t\t$this->_year = $this->format('Y');\r\n\t\t$this->_month = $this->format('n');\r\n\t\t$this->_day = $this->format('j');\t\r\n\t}", "function __construct()\n {\n parent::__construct();\n $this->load->helper(array(\n 'form',\n 'url',\n 'security'\n ));\n $this->load->model('api/TasklistAccountPlanning_model');\n $this->load->model('PerformanceAccountPlanning_model');\n $this->load->model('MonitoringAccountPlanning_model');\n $this->load->model('MonitoringRm_model');\n\n $current_datetime = new DateTime(date('Y-m-d H:i:s'));\n $this->current_year = $current_datetime->format('Y');\n $this->month_current = $current_datetime->format('m');\n $this->current_date = $current_datetime->format('Y-m-d');\n $this->current_datetime = $current_datetime->format('Y-m-d H:i:s');\n\n $this->checkTokenMobile();\n }", "public function test_constructor_assumesCurrentYear_ifNoYearIsInputted()\n {\n Carbon::setTestNow(Carbon::create(1999, 6, 15));\n\n $actualObject = new Year(null);\n\n $expectedObject = new Year('1999');\n\n $this->assertEquals($expectedObject, $actualObject);\n\n // ... and we are now back in the present\n Carbon::setTestNow();\n }", "function __construct()\n\t{\n\t\tparent::__construct();\n\t\tdate_default_timezone_set('Asia/Kolkata');\n\t}", "public function init() {\n\t\t// use this method to initialize default values.\n\t}", "function __construct()\n {\n $this->id = 0;\n $this->issuedDate = date('Y-m-d H:i:s');\n $this->returnDate = date('Y-m-d H:i:s');\n $this->fine = 0;\n $this->bookId = 0;\n $this->userId = 0;\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n\t{\n\t\tdate_default_timezone_set('Asia/Shanghai'); //时区配置\n\t}", "function __construct($aowner = null)\r\n {\r\n parent::__construct($aowner);\r\n $this->_width=90;\r\n $this->_height=35;\r\n\r\n $this->_type = $this->parseKindValue(dtkDate);\r\n\r\n $this->_maxvalue = \"\";\r\n $this->_minvalue = \"\";\r\n $this->_step = \"\";\r\n }", "function __construct()\n\t{\n\t\t// $this->cust_code = $cust_code;\n\t\t// $this->fecha_interaccion = $fecha_interaccion;\n\t\t// $this->tipo_interaccion = $tipo_interaccion;\n\t\t// $this->time_stamp = $time_stamp;\n }", "public function __construct(string $date = null)\n {\n $this->_date = $date;\n }", "public function __construct()\n {\n\t\tdate_default_timezone_set(get_option('timezone','Asia/Dhaka'));\n }", "public function __construct($format = '', $defaultTimezone = '')\n\t{\n\t\t//set default timezone\n\t\t\tif(empty($defaultTimezone)){\n\t\t\t\t$this->defaultTimezone = 'Europe/Berlin';\n\t\t\t}else{\n\t\t\t\t$this->defaultTimezone = $defaultTimezone;\n\t\t\t}\n\t\t//set default datetime\n\t\t\tif(empty($format)){\n\t\t\t\t$this->defaultFormat = 'd.m.Y H:i:s';\n\t\t\t}else{\n\t\t\t\t$this->defaultFormat = $format;\n\t\t\t}\n\t}", "function __construct()\n {\n parent::__construct();\n\n $this->load->model('Sales_model');\n\n date_default_timezone_set('Asia/Jakarta');\n }", "function Date($data = null)\r\n {\r\n $this->tz = Date_TimeZone::getDefault();\r\n if (is_null($data)) {\r\n $this->setData(date('Y-m-d H:i:s'));\r\n// following line has been modified by Andrew Eddie to support extending the Date class\r\n //} elseif (is_object($data) && (get_class($data) == 'date')) {\r\n } elseif (is_object($data) && (get_class($data) == get_class($this))) {\r\n $this->copy($data);\r\n } elseif (preg_match('/\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}/', $data)) {\r\n $this->setData($data);\r\n } elseif (preg_match('/\\d{14}/',$data)) {\r\n $this->setData($data,DATE_FORMAT_TIMESTAMP);\r\n } elseif (preg_match('/\\d{4}-\\d{2}-\\d{2}/', $data)) {\r\n $this->setData($data.' 00:00:00');\r\n } elseif (preg_match('/\\d{8}/',$data)) {\r\n $this->setData($data.'000000',DATE_FORMAT_TIMESTAMP);\r\n } else {\r\n $this->setData($data,DATE_FORMAT_UNIXTIME);\r\n }\r\n }", "public function __construct()\n {\n $now = new \\DateTime();\n $this->number = 'CR' . $now->format('Y') . $now->format('m') . '-';\n $this->dateCreation = new \\DateTime();\n $this->dateEnlevement = new \\DateTime();\n $this->heureEnlevement = new \\DateTime('14:00');\n $this->dateRetour = new \\DateTime('NOW + 2 day');\n $this->heureRetour = new \\DateTime('14:00');\n $this->effectue = false;\n $this->annule = false;\n $this->factureRecue = false;\n $this->mailSent = false;\n $this->nbJoursExploit = 1;\n $this->avecHayon = false;\n }", "public function __construct()\n {\n /*\n * include utility functions for our class\n */\n include_once 'functions.php';\n include_once 'MidoDb.php';\n include_once 'InputValidation.php';\n $this->dateIn = createLocalDate('d/m/Y');\n $this->timeIn = createLocalDate('H:i:s');\n\n }", "function currentYear() {\n\t\tif (func_num_args()) {\n\t\t\tif (func_get_arg(0) >= 1901 && func_get_arg(0) <= 2037) { //See note section above\n\t\t\t\t$this->_currentYear = func_get_arg(0);\n\t\t\t\t$this->_monthTimestamp = $this->_dayTimestamp = mktime(0,0,0,$this->_currentMonth,1,$this->_currentYear);\n\t\t\t\t$this->_currentMonthNumDays = intval(date('t',$this->_monthTimestamp));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tuser_error(\"You can only set the currentYear property of the Calendar class to a value between 1901 and 2037\", E_USER_NOTICE);\n\t\t\t}\n\t\t}\n\t\telse return $this->_currentYear;\n\t}", "public function __construct()\n {\n $this->dateTimeZone = SettingFacade::get('app_timezone');\n }", "public function __construct(){\n\t\t$this->logged_in_date_time = time();\n\t}", "public function applyDefaultValues()\n {\n $this->jml_lantai = '1';\n $this->asal_data = '1';\n $this->last_sync = '1901-01-01 00:00:00';\n }", "function __construct(){\n\t\tif (func_num_args() > 0){\n\t\t\t$args = func_get_args(0);\n\t\t\tforeach($args[0] as $key => $value){ //value set from argument array\n\t\t\t\t$this->$key = $value; \n\t\t\t}\n\t\t\tif (isset($this->con)){ //if database connection and key given, set from db\n\t\t\t\tif (isset($this->article_id) || isset($this->perooz_article_id)){\n\t\t\t\t\t$properly_set = $this->set_from_db($this->con);\n\t\t\t\t\tif (!$properly_set){\n\t\t\t\t\t\techo 'This has not worked.';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->date = time(); \n\t}", "protected function setDefaultValues()\n {\n $this->setFieldValue(self::FIELD_CREATED, time());\n }", "public function __construct($dateString = null)\n {\n $dateString = $dateString ?: request('date');\n\n $this->dateString = $dateString ?: date('Y-m-d');\n\n $this->setDates();\n }", "public function setValueDefault()\n {\n $this->createdAt = new \\DateTime();\n }", "private function _init_date()\n\t{\n\t\t$this->date->init($this->EE->TMPL->fetch_param('date'));\n\t\t$this->_log(sprintf(\"Working date set to %s %s\", $this->date->date(), $this->date->time()));\n\t}", "public function populateDefaults(){\n\t\tparent::populateDefaults();\n\t\t\n\t\t$this->setField('Date', date('Y-m-d H:i:s', strtotime('now')));\n\t}", "public function __construct() {\n\t\tforeach ($this as $key => $value) \n\t\t\t$this->$key = '';\n\t\t$this->log_date = $this->seller_PP_ProfileStartDate = $this->timestmp = '0000-00-00 00:00:00';\n\t\t$this->vendor_id = 0;\n\t}", "public static function initialize()\n {\n date_default_timezone_set('Asia/Shanghai');\n }", "public static function initialize()\n {\n date_default_timezone_set('Asia/Shanghai');\n }", "function initMonth()\n {\n //! Si aucun mois ou année n'est recupéré on prend le mois et l'année actuel\n if (!$this->currentMonthName || !$this->year) {\n $this->currentMonthIndex = (int)date(\"m\", time()) - 1;\n $this->currentMonthName = $this->months[$this->currentMonthIndex];\n $this->year = (int)date(\"Y\", time());\n }\n // recalcule le premier jour pour ce mois et le nombre de jour total du mois\n $this->firstDayInMonth = strftime('%u', strtotime(strval($this->currentMonthIndex + 1) . '/01/' . strval($this->year)));\n $this->nbDaysMonth = cal_days_in_month(CAL_GREGORIAN, $this->currentMonthIndex + 1, $this->year);\n $this->currentMonthName = $this->months[$this->currentMonthIndex];\n }", "public function __construct()\n {\n if (5 == func_num_args()) {\n $this->type = func_get_arg(0);\n $this->currentBalance = func_get_arg(1);\n $this->twoMonthAverage = func_get_arg(2);\n $this->sixMonthAverage = func_get_arg(3);\n $this->beginningBalance = func_get_arg(4);\n }\n }", "public function init()\n {\n $dt = new DateTime();\n if ($dt->format(\"N\") != '1')\n $dt = $dt->modify(\"last monday\");\n $this->weekStarting = $dt->format('d/m/Y');\n $this->thisMonday = $this->weekStarting;\n $this->baseDataAvailable = FALSE;\n }", "public function __construct($aParam)\n {\n $this->aDateTime = $aParam;\n }", "public function __construct()\n {\n $this->setLockedSince(new \\DateTime(\"0000-00-00 00:00:00\"));\n $this->setCreated(new \\DateTime());\n $this->setModified(new \\DateTime());\n $this->setLastError(new \\DateTime(\"0000-00-00 00:00:00\"));\n $this->hasError = false;\n $this->isActive = true;\n $this->lastRunTime = 0;\n $this->notifyOnError = true;\n }", "public static function initialize() {\n\t\t\tif (!isset($_SESSION['customer'])) {\n\t\t\t\t$_SESSION['customer'] = array();\n\t\t\t}\n\t\t\tself::$customer = &$_SESSION['customer'];\n\t\t\t$startDate = getRequest('startDate');\n\t\t\tself::$startDate = $startDate ? dateToSql(urldecode($startDate)) : date('Y-m-d', strtotime('last month'));\n\t\t\t$endDate = getRequest('endDate');\n\t\t\tself::$endDate = $endDate ? dateToSql(urldecode($endDate)) : date('Y-m-d');\n\t\t}", "public function __construct() {\n\t\tswitch (TRUE) {\n\t\t\tcase (func_num_args() == 1 && is_array(func_get_arg(0))):\n\t\t\t\t$data = func_get_arg(0);\n\n\t\t\t\t$this->application_id = intval($data['application_id']);\n\t\t\t\t$this->email = strtolower(trim($data['email']));\n\t\t\t\t$this->dep_account = intval(array_search(strtoupper($data['dep_account']), self::$dep_accounts));\n\t\t\t\t$this->income_frequency = intval(array_search(strtoupper($data['income_frequency']), self::$income_frequencies));\n\t\t\t\t$this->income_monthly_net = intval($data['income_monthly_net']);\n\t\t\t\t$this->dob = $data['dob'];\n\t\t\t\tbreak;\n\t\t\tcase (func_num_args() == 6):\n\t\t\t\tlist ($application_id, $email, $dep_account, $income_frequency, $income_monthly_net, $dob) = func_get_args();\n\t\t\n\t\t\t\t$this->application_id = intval($application_id);\n\t\t\t\t$this->email = strtolower(trim($email));\n\t\t\t\t$this->dep_account = intval(array_search(strtoupper($dep_account), self::$dep_accounts));\n\t\t\t\t$this->income_frequency = intval(array_search(strtoupper($income_frequency), self::$income_frequencies));\n\t\t\t\t$this->income_monthly_net = intval($income_monthly_net);\n\t\t\t\t$this->dob = $dob;\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// Not implemented.\n\t\t\t\tbreak;\n\t\t}\t\n\t}", "public function __construct()\n {\n $this->startDate = \\DateTime::createFromFormat('Y-m-d H:i:s', date('Y-m-d H:i:s'));\n $this->endDate = \\DateTime::createFromFormat('Y-m-d H:i:s', date('Y-m-d H:i:s'));\n $this->initWorkflow();\n $this->categories = new ArrayCollection();\n }", "function currentMonth() {\n\t\tif (func_num_args()) {\n\t\t\tif (func_get_arg(0) >= 1 && func_get_arg(0) <= 12) {\n\t\t\t\t$this->_currentMonth = intval(func_get_arg(0));\n\t\t\t\t$this->_monthTimestamp = $this->_dayTimestamp = mktime(0,0,0,$this->_currentMonth,1,$this->_currentYear);\n\t\t\t\t$this->_currentMonthNumDays = intval(date('t',$this->_monthTimestamp));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tuser_error(\"You can only set the currentMonth property of the Calendar class to a value between the 1 and 12\", E_USER_NOTICE);\n\t\t\t}\n\t\t}\n\t\telse return $this->_currentMonth;\n\t}", "public function __construct()\n\t{\n\t\tif (!$this->ID) // new members only\n\t\t\t$this->RegistrationDate = now();\n\t}", "public function __construct($year)\n {\n $this->year = $year;\n }", "public function __construct()\n {\n $this->createdAt = new \\DateTime();\n }", "public function __construct()\n {\n $this->createdAt = new \\DateTime();\n }", "public function __construct($array, $array_key, $arg_name, $default='')\n {\n parent::__construct($array, $array_key, $arg_name, $default);\n\n $this->settings['format'] = 'Y-m-d';\n }", "function __construct($y, $m, $user_id = 0, $personal_id = 0) {\n $this->user_id = intval( $user_id );\n $this->personal_id = intval( $personal_id );\n $this->y = intval( $y );\n $this->m = intval( $m );\n $this->last_d = date(\"t\", strtotime(\"$this->y-$this->m-1\"));\n $this->get_dates();\n }", "public function __construct()\n {\n $this->created = new \\DateTime();\n }", "protected function __construct() {\n $this->version = filemtime(__FILE__);\n }" ]
[ "0.70006955", "0.6900711", "0.6855318", "0.6721444", "0.6706209", "0.6342894", "0.63292485", "0.63168776", "0.6279233", "0.62442684", "0.62270725", "0.62163", "0.61647934", "0.6164299", "0.61519784", "0.6125481", "0.6118802", "0.6118802", "0.6118802", "0.6118802", "0.6118802", "0.6109846", "0.60922307", "0.60922307", "0.60922307", "0.60922307", "0.60922307", "0.60922307", "0.60922307", "0.60922307", "0.60922307", "0.60922307", "0.60910213", "0.6065713", "0.6053718", "0.6046278", "0.60430336", "0.6034853", "0.60230684", "0.59998894", "0.59891933", "0.59860325", "0.5961038", "0.59502333", "0.59431773", "0.5939063", "0.59185964", "0.5911241", "0.5910145", "0.59011906", "0.5892285", "0.58705467", "0.58705467", "0.58705467", "0.58705467", "0.58705467", "0.58705467", "0.58705467", "0.58705467", "0.58705467", "0.5860025", "0.5854611", "0.58212215", "0.5819975", "0.58049446", "0.58041406", "0.5802904", "0.5793467", "0.5786251", "0.5780017", "0.5771769", "0.5768344", "0.57660043", "0.57644796", "0.5758147", "0.57580215", "0.5743673", "0.5724472", "0.57206833", "0.57013446", "0.56911814", "0.56674534", "0.56674534", "0.5665427", "0.56653243", "0.565517", "0.5643582", "0.5634407", "0.5630726", "0.5623095", "0.5595847", "0.55835396", "0.55757844", "0.5571282", "0.5565045", "0.5565045", "0.5559578", "0.55550003", "0.55509114", "0.55496854" ]
0.6543558
5
Set the calendar title Add the title string to the calendar (if any)
private function makeCalendarTitle() { if(strlen($this->headerTitle) > 0) { $this->calWeekDays .= "\t<tr>\n\t\t<th class=\"headerTitle\" colspan=\"7\">".$this->headerTitle."</th>\n\t</tr>"; $this->outArray['title'] = $this->headerTitle; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function setTitle()\n {\n $this->title = $this->start_date;\n\n if ($this->start_date != $this->end_date) {\n $this->title .= ' - '.$this->end_date;\n }\n }", "protected function setTitle()\n\t{\n\t\tglobal $APPLICATION;\n\n\t\tif ($this->arParams[\"SET_TITLE\"] == 'Y')\n\t\t\t$APPLICATION->SetTitle(Localization\\Loc::getMessage(\"SPOL_DEFAULT_TITLE\"));\n\t}", "function setTitle($title) {\r\n $this->_title = $title;\r\n }", "function setTitle($title) {\r\n $this->_title = $title;\r\n }", "function setTitle($title) {\n\t\t$this->_title = $title;\n\t}", "public function setTitle($title) {\r\n $this->_title = $title;\r\n }", "public function setTitle($title)\r\n\t\t{\r\n\t\t\t$this->_title = $title;\r\n\t\t}", "function set_title($title){\r\n\t\t$this->_title = $title;\r\n\t}", "public function setTitle($title) {\n $this->_title = $title;\n }", "function setTitle($title)\n {\n $this->m_title = $title;\n }", "public function setTitle($title) {\n\t\t\n\t\t\t$this->_title = $title;\n\t\t\n\t\t}", "public function setTitle($title) {\n $this->_title = $title;\n }", "public function setTitle($title)\n {\n $this->_title = $title;\n }", "public function setTitle($title)\n {\n $this->_title = $title;\n }", "public function setTitle($title = '')\n {\n $this->title = $title;\n }", "function setTitle($title) {\n\t\t$this->title = $title;\n\t}", "function setTitle($title)\r\n {\r\n $this->title = $title;\r\n }", "public function setTitle($title) {\r\n $this->title = $title;\r\n }", "public function setTitle($title) {\n\t\t$this->title = $title;\n\t}", "public function setTitle($title) {\n\t\t$this->title = $title;\n\t}", "public function setTitle($title) {\n\t\t$this->title = $title;\n\t}", "public function setTitle($newTitle) { $this->Title = $newTitle; }", "public function setTitle($title){\n $this->title = $title;\n }", "public function setTitle($title)\r\n {\r\n $this->title = $title;\r\n }", "function setTitle($title)\r\n\t{\r\n\t\t$this->title = $title;\r\n\t}", "public function setTitle($title){\n $this->title = $title;\n }", "public function setTitle($title) {\n $this->title = $title ;\n }", "function set_title($title) \r\n\t{\r\n\t\t//$this->title = $title;\r\n\t\t$this->data['title_for_layout'] = $title;\r\n\t\t$this;\r\n\t}", "public function setTitle($title)\n\t{\n\t\t$this->title = $title;\n\t}", "public function setTitle($title)\n\t{\n\t\t$this->title = $title;\n\t}", "public function set_title($title)\n {\n $this->title = $title;\n }", "function setTitle($title)\n {\n $this->title = $title;\n }", "function setTitle($title)\n {\n $this->title = $title;\n }", "function setTitle($title)\n {\n $this->title = $title;\n }", "public function setTitle( $newTitle )\n {\n\t\t$this->title = $newTitle;\n\t}", "public function setTitle($title) {\n $this->title = $title;\n }", "public function setTitle($title) {\n $this->title = $title;\n }", "public function setTitle($title){\n \t$this->title = $title;\n }", "function setTitle( $title )\n {\n $title = trim( $title );\n $this->properties['TITLE'] = $title;\n }", "public function setTitle($title)\n {\n $this->title = $title;\n }", "public function setTitle($title)\n {\n $this->title = $title;\n }", "public function setTitle($title)\n {\n $this->title = $title;\n }", "public function setTitle($title)\n {\n $this->title = $title;\n }", "public function setTitle($title)\n {\n $this->title = $title;\n }", "public function setTitle($title)\n {\n $this->title = $title;\n }", "public function setTitle($title)\n {\n $this->title = $title;\n }", "function append_title($title){\r\n\t\t$this->_title .= \" - {$title}\";\r\n\t}", "public function set_title($title){\n\t\t$this->set_channel_element('title', $title);\n\t}", "public function setTitle($newTitle) {\n\t\t$this->title = $newTitle;\n\t}", "public function setTitle($title = ''){\n $this->setVar('TITLE', $title);\n }", "public function setTitle($title){\n\t\t$this->mail_title = $title;\n\t}", "public function setTitle($title)\n\t{\n\t\tif (!empty($title)) {\n\t\t\t$this->title = $title;\n\t\t}\n\t}", "function setTitle(string $title): void\n {\n $this->data['head']['title'] = $title;\n }", "public function setTitle($title);", "public function setTitle($title);", "public function setTitle($title);", "public function setTitle($title);", "public function setTitle($title);", "public function setTitle($title);", "public function setTitle($title);", "public function set_title($text){\n $this->title=$text;\n }", "public function setTitle(string $title) {\n\t\t$this->title = $title;\n\t}", "function set_the_title($title) {\n\n md_set_the_title($title);\n \n }", "public static function setTitle(string $title) {}", "public function setTitle($title)\n {\n $this->title = (string) $title;\n }", "public function setTitle($value)\n {\n $this->_title = $value;\n }", "function setTitle($a_title)\n\t{\n\t\t$this->title = $a_title;\n\t}", "public function setTitle($title){\n $this->p_title = $title;\n }", "public function setTitle($title)\n {\n $this->setValue('title', $title);\n }", "protected function setPageTitle() {\r\n\t\t$pageTitleText = (empty($this->settings['news']['semantic']['general']['pageTitle']['useAlternate'])) ? $this->newsItem->getTitle() : $this->newsItem->getAlternativeTitle();\r\n\t\t$pageTitleAction = $this->settings['news']['semantic']['general']['pageTitle']['action'];\r\n\r\n\t\tif (!empty($pageTitleAction)) {\r\n\t\t\tswitch ($pageTitleAction) {\r\n\t\t\t\tcase 'prepend':\r\n\t\t\t\t\t$pageTitleText .= ': ' . $GLOBALS['TSFE']->page['title'];\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'append':\r\n\t\t\t\t\t$pageTitleText = $GLOBALS['TSFE']->page['title'] . ': ' . $pageTitleText;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t}\r\n\t\t\t$this->pageTitle = html_entity_decode($pageTitleText, ENT_QUOTES, \"UTF-8\");\r\n\t\t\t$GLOBALS['TSFE']->page['title'] = $this->pageTitle;\r\n\t\t\t$GLOBALS['TSFE']->indexedDocTitle = $this->pageTitle;\r\n\t\t}\r\n\t}", "public function set_title($title)\n {\n $this->set_default_property(self::PROPERTY_TITLE, $title);\n }", "public function setEventTitle($eventTitle)\n {\n $this->eventTitle = isset($eventTitle) ? $eventTitle : '';\n }", "public function setTitle(string $title): void {\n\t\t$this->m_title = $title;\n\t}", "public function setTitle(string $title);", "public function setEventTitle($value)\n {\n return $this->set('EventTitle', $value);\n }", "function SetTitle($title, $isUTF8 = false) {\n parent::SetTitle($title, $isUTF8);\n $this->title = ($isUTF8 ? utf8_encode($title) : $title);\n }", "public function setTitle(string $title): void\n {\n $this->_title = $title;\n }", "public function setTitle(string $title)\n {\n $this->title = $title;\n }", "public function setTitle(string $title)\n {\n $this->title = $title;\n }", "public function setTitle($value)\n {\n $this->title = $value;\n }", "public function setTitle($title) {\n\t\t$title = str_replace(\"\\r\\n\", \"|\", $title);\n\t\t$title = str_replace(\" \", \"+\", $title);\n\t\t$this -> setProperty('chtt', $title);\n\t}", "public function setTitle(string $title)\n {\n if (strlen($title) > 3) {\n $this->title = $title;\n }\n }", "public function setTitle($title)\n {\n $this->setChannelElement('title', $title);\n }", "public function setTitle($title) {\n\t\t$this->addChannelTag('title', $title);\n\t}", "public function setTitle($title) {\n\t\tTemplate::setSiteTitle($title);\n\t}", "function edan_search_set_title( $title )\n {\n $options = new esw_options_handler();\n $cache = new esw_cache_handler();\n\n /**\n * if in the loop and the title is cached (or if object group is retrieved successfully)\n * modify the page title on display.\n */\n if(in_the_loop() && edan_search_name_from_url() == $options->get_path() && $options->get_title() != '')\n {\n if(get_query_var('edanUrl'))\n {\n $object = $cache->get()['object'];\n\n if($object)\n {\n if(property_exists($object, 'content') && property_exists($object->{'content'}, 'descriptiveNonRepeating'))\n {\n if(property_exists($object->{'content'}->{'descriptiveNonRepeating'}, 'title'))\n {\n $title = $object->{'content'}->{'descriptiveNonRepeating'}->{'title'}->{'content'};\n }\n }\n elseif(property_exists($object, 'title'))\n {\n if(property_exists($object->{'title'}, 'content'))\n {\n $title = $this->object->{'title'}->{'content'};\n }\n else\n {\n $title = $this->object->{'title'};\n }\n }\n }\n }\n else\n {\n $title = $options->get_title();\n }\n }\n\n return $title;\n }", "public static function setTitle($projectTitle=\"Default App\")\n {\n global $application_name;\n $application_name = $projectTitle;\n }", "function prepend_title($title){\r\n\t\t$this->_title = \"{$title} - {$this->_title}\";\r\n\t}", "public function setTitle($var)\n {\n $this->_title = $var;\n }", "public function setTitle(string $title = null);", "protected function _buildTitle()\n\t{\n\t\tif ($this->_task)\n\t\t{\n\t\t\t$title = Lang::txt('COM_MEMBERS_REGISTER_' . strtoupper($this->_task));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$title = Lang::txt('COM_MEMBERS_REGISTER');\n\t\t}\n\t\t\\Document::setTitle($title);\n\t}", "public function setTitle(string $title): void\n {\n $this->title = $title;\n }", "public function setTitle(string $title): void\n {\n $this->title = $title;\n }", "public function setTitle(string $title): void\n {\n $this->title = $title;\n }", "public function setTitle(string $title): void\n {\n $this->title = $title;\n }", "public function setTitle($title) {\n $sql = \"UPDATE \tsls\" . SLS_N . \"_chapter SET\n\t\t\t\ttitle = '\" . escapeString($title) . \"'\n\t\t\tWHERE \tchapterID = \" . $this->chapterID;\n WCF::getDB()->registerShutdownUpdate($sql);\n }", "public function setPageTitle($title);", "function setTitle($title, $append = false, $default = false) {\n\n if ($default && $this->title) return;\n\n if ($append) {\n $title = $this->title . $append . $title;\n }\n $this->title = $title;\n }", "public function setTitle($t){\n\t\t$this->title = $t;\n\t}", "function od_set_page_title($orig_title) {\n\t\treturn \"Map | \"; // set the page title (could be improved, eg based on filters. Might be something the user wants to set\n\t}" ]
[ "0.7708907", "0.71849394", "0.7106481", "0.7106481", "0.70784795", "0.70748097", "0.7068428", "0.70663095", "0.7042291", "0.70176363", "0.700437", "0.7003127", "0.69973695", "0.69973695", "0.69933873", "0.6986058", "0.6975316", "0.6974538", "0.6966417", "0.6966417", "0.6966417", "0.6954366", "0.6953463", "0.6951853", "0.69383544", "0.69372195", "0.6936148", "0.6931444", "0.6916839", "0.6916839", "0.69099987", "0.69051456", "0.69051456", "0.69051456", "0.6894605", "0.6891273", "0.6891273", "0.68823504", "0.68819076", "0.6880959", "0.6880959", "0.6880959", "0.6880959", "0.6880959", "0.6880959", "0.6876788", "0.6873894", "0.6873542", "0.68507606", "0.6845021", "0.6835195", "0.68007463", "0.6797815", "0.67942405", "0.67942405", "0.67942405", "0.67942405", "0.67942405", "0.67942405", "0.67942405", "0.67779976", "0.67760944", "0.6763376", "0.67535204", "0.6751201", "0.6751036", "0.6743801", "0.67362106", "0.6714524", "0.66992766", "0.667353", "0.66718566", "0.66468364", "0.662751", "0.6624795", "0.6624378", "0.66084015", "0.6586693", "0.6586693", "0.6583708", "0.6574843", "0.65644735", "0.6551772", "0.65295565", "0.6528485", "0.65230453", "0.6516402", "0.6514009", "0.6478576", "0.64659363", "0.64373523", "0.6433132", "0.6433132", "0.6433132", "0.6433132", "0.64204556", "0.6419505", "0.6415836", "0.6414174", "0.641234" ]
0.7574304
1
Set the calendar heading Add the heading string to the calendar.
private function makeCalendarHead() { if(strlen($this->headerStr) < 1) { $head = "\t<tr>\n\t\t<th colspan=\"7\" class=\"headerString\">"; if(!is_null($this->curDay)) { $head .= $this->curDayName.' the '.$this->curDayS.' of '.$this->curMonthName.', '.$this->curYear; } else { $head .= $this->curMonthName.', '.$this->curYear; } $head .= "</th>\n\t</tr>\n"; } else { $head = $this->headerStr; } $this->calWeekDays .= $head; $this->outArray['head'] = $head; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setHeading($h)\n\t{\n\t\t$this->_headingText=$h;\n\t}", "private function makeCalendarTitle()\n\t{\n\t\tif(strlen($this->headerTitle) > 0) {\n\t\t\t$this->calWeekDays .= \"\\t<tr>\\n\\t\\t<th class=\\\"headerTitle\\\" colspan=\\\"7\\\">\".$this->headerTitle.\"</th>\\n\\t</tr>\";\n\t\t\t$this->outArray['title'] = $this->headerTitle;\n\t\t}\n\t}", "function set_heading()\n\t{\n\t\t$args = func_get_args();\n\t\t$this->heading = $this->_prep_args($args);\n\t}", "public function set_heading($heading) {\n $this->heading=$heading;\n if (!isset($this->form_name) or $this->form_name=='') {\n $this->form_name=$heading;\n error_log(\"BasicForm: Had to revert form name to form heading\");\n }\n }", "private function generateHeading()\n {\n //get current dimensions\n\t\t$highestRow = $this->objWorksheet->getHighestRow(); // e.g. 10\n\t\t$highestColumn = $this->objWorksheet->getHighestColumn(); // e.g 'F'\n\n\t\t$highestColumnIndex = PHPExcel_Cell::columnIndexFromString($highestColumn);\n\n\t\t//insert row on top\n\t\t$this->objWorksheet->insertNewRowBefore(1,2);\n\n\t\t//merge cells\n\t\t$this->objWorksheet->mergeCells(\"A1:\".$highestColumn.\"1\");\n\n\t\t//set the text for header\n\t\t$this->objWorksheet->setCellValue(\"A1\", $this->_headingText);\n\t\t$this->objWorksheet->getStyle('A1')->getAlignment()->setWrapText(true);\n\t\t$this->objWorksheet->getRowDimension('1')->setRowHeight(48);\n\n //Apply style\n\t\t$this->objWorksheet->getStyle(\"A1\")->applyFromArray($this->_headingStyleArray);\n }", "private function setTitle()\n {\n $this->title = $this->start_date;\n\n if ($this->start_date != $this->end_date) {\n $this->title .= ' - '.$this->end_date;\n }\n }", "function addHeading(& $heading, & $parentElement) {\n\t\t$headingElement =& $this->_document->createElement('heading');\n\t\t$parentElement->appendChild($headingElement);\n\t\t\n\t\t$this->addCommonProporties($heading, $headingElement);\n\t\t\n\t\tif ($heading->getField('location') == 'right')\n\t\t\t$headingElement->setAttribute('location', 'right');\n\t\telse\n\t\t\t$headingElement->setAttribute('location', 'left');\n\t}", "public function heading(string $heading): CustomTextCard\n {\n return $this->setMeta('heading', $heading);\n }", "private function renderContentHeading() {\n\t\t$this->setMarker('content_id', $this->getContentUid());\n\t\t$this->setMarker(\n\t\t\t'content_heading',\n\t\t\thtmlspecialchars($this->cObj->data['subheader'])\n\t\t);\n\t}", "function new_heading()\n {\n }", "function setHeaderText($value) {\n $this->header_text = $value;\n}", "function setHeaderTitle($value) {\n $this->header_title = $value;\n}", "public function setHeading($var)\n {\n GPBUtil::checkDouble($var);\n $this->heading = $var;\n\n return $this;\n }", "function setHeader($string)\n {\n if (!empty($this->header))\n {\n $this->header .= $string;\n }\n else \n {\n $this->header = $string;\n }\n }", "public function setTitle($str)\n\t{\n\t\t$this->headerTitle = $str;\n\t}", "public static function setHTMLHeader($header) \n\t{\n\t\tacPhpCas::setReporting();\n\t\tphpCAS::setHTMLHeader($header);\t\t\n\t}", "private function makeDayHeadings()\n\t{\n\t\t$this->outArray['dayheadings'] = array();\n\t\t$this->dayHeadings .= \"\\t<tr>\\n\";\n\t\tforeach($this->daysArray as $day) {\n\t\t\t$this->dayHeadings .= \"\\t\\t<th class=\\\"dayHeading\\\">$day</th>\\n\";\n\t\t\tarray_push($this->outArray['dayheadings'], $day);\n\t\t}\n\t\t$this->dayHeadings .= \"\\t</tr>\\n\";\n\t\t\n\t\t$this->calWeekDays .= $this->dayHeadings;\n\t}", "function Header() {\n if(empty($this->title) || $this->PageNo() == 1) return;\n $oldColor = $this->TextColor;\n $this->SetTextColor(PDF_HEADER_COLOR['red'],\n PDF_HEADER_COLOR['green'],\n PDF_HEADER_COLOR['blue']);\n $x = $this->GetX();\n $y = $this->GetY();\n $this->SetY(10, false);\n $this->SetFont('', 'B');\n $this->Cell(0, 10, $this->title);\n $this->SetFont('', '');\n $this->SetXY($x, $y);\n $this->TextColor = $oldColor;\n }", "public function setHeader($header)\n {\n $this->_header = $header;\n }", "public function setHeading($heading)\n {\n $this->heading = $heading;\n return $this;\n }", "function renderHeader(&$header)\n {\n if ($name = $header->getName()) {\n $this->_ary['header'][$name] = $header->toHtml();\n } else {\n $this->_ary['header'][$this->_sectionCount] = $header->toHtml();\n }\n $this->_currentSection = $this->_sectionCount++;\n }", "public function SetHeadTitle ($title) {\r\n\t\t$this->head->SetTitle($title);\r\n\t}", "public function setHeader($header);", "protected function setHeaderWithSportAndYear() {\n\t\t$HeaderParts = array();\n\n\t\tif ($this->sportid > 0 && $this->ShowSportsNavigation) {\n\t\t\t$Sport = new Sport($this->sportid);\n\t\t\t$HeaderParts[] = $Sport->name();\n\t\t}\n\n\t\tif ($this->ShowYearsNavigation) {\n\t\t\t$HeaderParts[] = $this->getYearString();\n\t\t}\n\n\t\tif (!empty($HeaderParts)) {\n\t\t\t$this->setHeader($this->name().': '.implode(', ', $HeaderParts));\n\t\t}\n\t}", "public function addHeader($header);", "private function headings() {\n\t\t$this->section_data['general_h_tags'] = array(\n\t\t\t'name' \t\t\t\t\t=> 'general_h_tags',\n\t\t\t'label' \t\t\t\t=> __( 'Headings', 'fixedtoc' ),\n\t\t\t'default' \t\t\t=> array( 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' ),\n\t\t\t'type' \t\t\t\t\t=> 'multi_checkbox',\n\t\t\t'choices'\t\t\t\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'h1' => 'Heading 1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'h2' => 'Heading 2',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'h3' => 'Heading 3',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'h4' => 'Heading 4',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'h5' => 'Heading 5',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'h6' => 'Heading 6',\n\t\t\t\t\t\t\t\t\t\t\t\t ),\n\t\t\t'des'\t\t\t\t\t\t=> __( 'Check which HTML headings automatically generated table of contents.', 'fixedtoc' )\n\t\t);\n\t}", "public function Header()\r\n\t{\r\n\t\t$this->Ln();\r\n\t\t$this->SetFont('Arial','',14);\r\n\t\t$this->Cell(170,7,\"Date :: \". $this->today_date ,1,0,'C');\r\n\t\t$this->Ln();\r\n\t\t$this->SetFont('Arial','',14); \r\n\t\t$this->MultiCell(170,8,\"Room Things Report \\n\".$this->title,1,'C');\r\n\t\t$this->Ln(5);\r\n\r\n\t}", "public function headingHtml(string $html): CustomTextCard\n {\n return $this->setMeta('headingHtml', $html);\n }", "public function setHeaderText($value)\n {\n if (is_array($value)) {\n $this->fields['options']['header_text_left'] = $value[0];\n $this->fields['options']['header_text_center'] = $value[1];\n $this->fields['options']['header_text_right'] = $value[2];\n } else {\n $this->fields['options']['header_text_left'] = $value;\n }\n }", "protected function getHeadingHtml() {\n\t\t$heading = '';\n\t\tif ( $this->isUserPage ) {\n\t\t\t// The heading is just the username without namespace\n\t\t\t$heading = $this->pageUser->getName();\n\t\t} else {\n\t\t\t$pageTitle = $this->getOutput()->getPageTitle();\n\t\t\tif ( $pageTitle ) {\n\t\t\t\t$heading = $pageTitle;\n\t\t\t}\n\t\t}\n\t\treturn Html::rawElement( 'h1', [ 'id' => 'section_0' ], $heading );\n\t}", "public function addHeader()\n {\n }", "public function setHeadings($headings);", "public function setHeadings($headings){\n\t\t\t$this->headings = $headings;\n\t\t}", "public function setHeader(HtmlElementInterface $header): void\n {\n $this->header = $header;\n }", "public function getHeading()\n {\n return $this->heading;\n }", "function setHeadings($headings){\n\t\t\tglobal $tableHeadings;\n\t\t\t\n\t\t\t$tableHeadings = $headings;\n\t\t\t\n\t\t}", "function setHeadings($headings){\n\t\t\tglobal $tableHeadings;\n\t\t\t\n\t\t\t$tableHeadings = $headings;\n\t\t\t\n\t\t}", "function addHeader($title)\n {\n $this->page .= <<<EOD\n<html>\n<head>\n<title>$title</title>\n</head>\n<body>\n<h1 align=\"center\">$title</h1>\nEOD;\n }", "public function setHeader(PoHeader $header) {\n }", "public function setHeader(string $header_name, string $header_value): void;", "public function header($header)\n {\n $this->headers[] = $header;\n }", "function setHeader($a_sHeader)\n {\n $this->_sHeader = (string) $a_sHeader;\n $this->setSearchParameter('header', $this->_sHeader);\n }", "function setTitle(string $title): void\n {\n $this->data['head']['title'] = $title;\n }", "function Header() {\r\n // print the title\r\n $this->SetTitleFont();\r\n $this->Cell(100, 8, $this->title, 0, 0, \"L\");\r\n\r\n // print the author\r\n $this->SetAuthorFont();\r\n $this->Cell(0, 8, $this->author, 0, 0, \"R\");\r\n\r\n // header line\r\n $this->SetFillColor(0, 0, 0);\r\n $this->Rect(10, 17, 190, 0.2, \"F\");\r\n $this->Rect(10, 17.5, 190, 0.2, \"F\");\r\n $this->Ln(14);\r\n }", "public function setHeader( $call )\r\n\t{\r\n\t\t// Find the end head tag first\r\n\t\t$parts\t\t=\texplode( '</head>', $call->htmlheader );\r\n\t\t$body\t\t=\tarray_pop( $parts );\r\n\t\t$body\t\t.=\t\"\\r\\n\"\r\n\t\t\t\t\t.\t'<!-- Begin setHeader -->'\r\n\t\t\t\t\t.\t'<div id=\"jblestawrapper\">';\r\n\t\t$this->htmlheader =\t$body;\r\n\t}", "public function setHeader($header = null, $value=null)\n{\n if($header && !is_null($value))\n {\n $header .= ': '. $value;\n }\n array_push($this->headers, $header);\n}", "function setHeadline ($newHeadline) {\n // deleting and then re-creating the ad\n // update the google servers\n $soapClients = &APIlityClients::getClients();\n $someSoapClient = $soapClients->getAdClient();\n // then recreate it with the new headline set\n $soapParameters = \"<addAds>\n <ads>\n <adGroupId>\".$this->getBelongsToAdGroupId().\"</adGroupId>\n <headline>\".$newHeadline.\"</headline>\n <description1>\".utf8_decode($this->getDescription1()).\"</description1>\n <description2>\".utf8_decode($this->getDescription2()).\"</description2>\n <displayUrl>\".$this->getDisplayUrl().\"</displayUrl>\n <destinationUrl>\".$this->getDestinationUrl().\"</destinationUrl>\n <status>\".$this->getStatus().\"</status>\n <adType>TextAd</adType>\n </ads>\n </addAds>\";\n // add the ad to the google servers\n $someAd = $someSoapClient->call(\"addAds\", $soapParameters);\n $soapClients->updateSoapRelatedData(extractSoapHeaderInfo($someSoapClient->getHeaders()));\n if ($someSoapClient->fault) {\n pushFault($someSoapClient, $_SERVER['PHP_SELF'].\":setHeadline()\", $soapParameters);\n return false;\n }\n // first delete the current ad\n $soapParameters = \"<updateAds>\n <ads>\n <adGroupId>\".$this->getBelongsToAdGroupId().\"</adGroupId>\n <id>\".$this->getId().\"</id>\n <status>Disabled</status>\n <adType>TextAd</adType>\n </ads>\n </updateAds>\";\n // delete the ad on the google servers\n $someSoapClient->call(\"updateAds\", $soapParameters);\n $soapClients->updateSoapRelatedData(extractSoapHeaderInfo($someSoapClient->getHeaders()));\n if ($someSoapClient->fault) {\n pushFault($someSoapClient, $_SERVER['PHP_SELF'].\":setHeadline()\", $soapParameters);\n return false;\n }\n // update local object\n $this->headline = $someAd['addAdsReturn']['headline'];\n // changing the headline of a ad will change its id so update local object\n $this->id = $someAd['addAdsReturn']['id'];\n return true;\n }", "public function setHeadClass($class)\n {\n $this->headClass = $class;\n # return Calendar instance\n return $this;\n }", "public function Header()\n {\n // Set custom header and footer\n $this->setCustomHeader();\n\n if (array_key_exists($this->category, $this->categories)) {\n $title = $this->categories[$this->category]['name'];\n } else {\n $title = '';\n }\n\n $this->SetTextColor(0, 0, 0);\n $this->SetFont($this->currentFont, 'B', 18);\n\n if (0 < PMF_String::strlen($this->customHeader)) {\n $this->writeHTMLCell(0, 0, '', '', $this->customHeader);\n $this->Ln();\n $this->writeHTMLCell(0, 0, '', '', html_entity_decode($title, ENT_QUOTES, 'utf-8'), 0, 0, false, true, 'C');\n } else {\n $this->MultiCell(0, 10, html_entity_decode($title, ENT_QUOTES, 'utf-8'), 0, 'C', 0);\n $this->SetMargins(PDF_MARGIN_LEFT, $this->getLastH() + 5, PDF_MARGIN_RIGHT);\n }\n }", "public function setTitle($value)\n {\n $this->_title = $value;\n }", "function Header() \n { \n\n list($r, $b, $g) = $this->xheadercolor; \n $this->setY(10); // shouldn't be needed due to page margin, but helas, otherwise it's at the page top \n $this->SetFillColor($r, $b, $g); \n $this->SetTextColor(0 , 0, 0); \n $this->Cell(0,20, '', 0,1,'C', 1); \n $this->Text(15,26,$this->xheadertext ); \n }", "protected function setHeader(){\n $this->header = [\n 'Auth-id' => $this->username,\n 'Auth-token' => $this->generateToken(),\n 'Timestamp' => time()\n ];\n }", "public function property_title() {\n\n\t\t\t$this->add_package = $this->getAddPackage();\n\n\t\t\t$headline_select = get_field( 'headline_select' );\n\t\t\t$standard_section = get_field( 'practice_type' ) . ' ' . get_field( 'building_type' );\n\t\t\t$custom_section = ( $headline_select == 'Custom Headline' )\n\t\t\t\t? get_field( 'custom_headline' )\n\t\t\t\t: $standard_section;\n\n\t\t\t$location = get_field( 'address_city' ) . ', ' . get_field( 'address_state' );\n\t\t\t$headline = get_field( 'practice_is_for' ) . ' - ' . $custom_section . ' - ' . $location;\n\n\t\t\t$out = '<h3>' . $headline . '</h3>';\n\t\t\t$out .= '<div class=\"hr hr-default\"><span class=\"hr-inner \"><span class=\"hr-inner-style\"></span></span></div>';\n\n\n\t\t\treturn $out;\n\t\t}", "function weekviewHeader()\n {\n }", "public static function setHeader($header)\n {\n header($header, true);\n }", "function addHeadElement($include) {\n\t $this->_headSection .= $include . \"\\n\";\n\t}", "private function setHeader($header)\n {\n $this->header = trim((string) $header);\n $this->headerComment = '';\n\n if ('' !== $this->header) {\n $this->headerComment = $this->encloseTextInComment($this->header);\n }\n }", "public function set_header($header, $value)\n {\n }", "public function setHeader($header, $value) {\r\n $this->headers[$header] = $value;\r\n }", "public function setNewsFeedHeading($newsFeedHeading)\n {\n $this->newsFeedHeading = $newsFeedHeading;\n }", "private function setHeader($data)\n {\n $this->headers = array_map('self::formatString', $data[0]);\n array_unshift($this->headers, 'row');\n }", "function heading( $data = '', $h = '1', $attributes = '' )\n\t{\n\t\treturn '<h' . $h . _stringify_attributes( $attributes ) . '>' . $data . '</h' . $h . '>';\n\t}", "function pqrc_section_title_cal()\n {\n echo \"<h2>\" . __('Post QRC Settings Section', 'post-qurcode') . \"</h2>\";\n }", "public function renderHeader()\n {\n if ($this->title !== false || $this->headerPrependTitle !== false || $this->headerAppendTitle !== false) {\n echo CHtml::openTag('div', $this->htmlHeaderOptions);\n\n $this->renderMenu();\n $this->_renderPrependTitle();\n\n if ($this->title) {\n $this->title = '<h3 class=\"bootstrap-widget-header__title\">' . $this->title . '</h3>';\n if ($this->headerIcon) {\n $this->title = '<i class=\"' . $this->headerIcon . '\"></i>' . $this->title;\n }\n echo $this->title;\n }\n $this->_renderAppendTitle();\n $this->renderButtons();\n\n echo CHtml::closeTag('div');\n }\n }", "public function setTitle($t){\n\t\t$this->title = $t;\n\t}", "public function setHeader($header, $value)\r\n {\r\n $this->_headers[$header] = $value;\r\n }", "function setHeader($a_sHeader)\n {\n if (!is_null($this->_sHeader) && $this->_sHeader !== (string) $a_sHeader) {\n $this->_markModified();\n }\n $this->_sHeader = (string) $a_sHeader;\n }", "public function setTitle($value)\n {\n $this->title = $value;\n }", "public function apb_email_header( $email_heading ) {\r\n\t\tinclude AWE_function::template_exsits( 'emails/apb-email-header', array( 'email_heading' => $email_heading ) );\r\n\t}", "public function set_header($header, $value);", "public function set_header($key, $value)\n {\n }", "private function renderSectionHeadings() {\n\t\t$headings = array();\n\t\t$separator = $this->getSubpart('HEADING_SEPARATOR');\n\n\t\tforeach ($this->sections as $key => $section) {\n\t\t\t$class = ($key == 0) ? 'tx-explanationbox-pi1-active' : 'tx-explanationbox-pi1-inactive';\n\n\t\t\t$this->setMarker('class_heading', $class);\n\t\t\t$this->setMarker('heading_number', $key);\n\t\t\t$this->setMarker('heading', htmlspecialchars($section['title']));\n\t\t\t$headings[] = $this->getSubpart('SINGLE_HEADING');\n\t\t}\n\n\t\tif (count($this->sections) > 1) {\n\t\t\t$this->setMarker('class_rightarrow', 'tx-explanationbox-pi1-active');\n\t\t} else {\n\t\t\t$this->setMarker('class_rightarrow', 'tx-explanationbox-pi1-inactive');\n\t\t}\n\n\t\t$this->setMarker('number_of_sections', count($this->sections));\n\t\t$this->setSubpart('SECTION_HEADINGS', implode($separator, $headings));\n\t}", "public function Header() {\r\n $this->SetTextColor(0,0,0);\r\n $this->SetDrawColor(0,0,0);\r\n /* definimos variables con titulo y subtitulo */\r\n $titulo=\"Coordinación de Calidad\";\r\n $subtitulo=\"Reporte Diario de Sustancias Químicas \";\r\n /* posicionamos el puto de insercion 2mm. debajo\r\n del borde del papel */\r\n $this->SetY(8);\r\n /* escribimos el titulo con la fuente que se establezca\r\n por el método opcion SetHeaderFont */\r\n $this->SetFont('helvetica', 'B', 14);\r\n\r\n $this->Cell(0, 5,$titulo,0,1,'C');\r\n /* modificamos tipografia para el subtitulo\r\n e insertamos este */\r\n $this->SetFont('helvetica', '', 12);\r\n $this->Cell(0, 2,$subtitulo,0,1,'C');\r\n /* trazamos un rectangulo sombreado que por sus dimensiones\r\n ocupará el area de texto de la pagina */\r\n \r\n /*trazamos una linea roja debajo del encabezado */\r\n $this->Line(15,30,195,30); \r\n /* insertamos una imagen de fondo con 15% de opacidad */\r\n \r\n $this->Image('logo.png',0,0,30,30,\r\n '','','N','','','L');\r\n /* recuperamos la opacidad por defecto */\r\n \r\n }", "public function get_name() {\n return 'apr_modern_heading';\n }", "public function get_title()\n {\n return __('Section Heading', 'careerfy-frame');\n }", "public function addHeader($header, $value) {\n\t\t$this->mail['Headers'][] = array('Name' => $header, 'Value' => $value);\n\t}", "public function setHeaderSectionName(?string $name): void;", "protected function addHeading(DomNode $node)\n {\n $heading = $this->newHeading($node);\n $this->headings[] = $heading;\n\n $number = new DomText();\n\n switch ($this->numbering) {\n case false:\n $number->nodeValue = '';\n break;\n case 'decimal':\n default:\n $number->nodeValue = $heading->getNumber() . ' ';\n break;\n }\n\n $node->insertBefore($number, $node->firstChild);\n\n $node->setAttribute('id', $heading->getAnchor());\n }", "public function set_header($header, $value)\r\n {\r\n $this->headers[$header] = $value;\r\n }", "function _renderSectionHeader($title)\n {\n if (!empty($title)) {\n echo \"\\n\".'<legend>';\n echo $this->_encodeTitle ? htmlspecialchars($title) : $title;\n echo '</legend>'.\"\\n\";\n }\n }", "protected function setHeaders(): void\n {\n if (empty($this->headers) === false || empty($this->data) === true) {\n return;\n }\n\n $headers = array_keys(reset($this->data));\n\n array_walk($headers, fn(&$header) => $header = ucwords(str_replace(\"_\", \" \", $header)));\n\n $this->headers = $headers;\n }", "public function defineHeader()\n {\n $this->header = new Header();\n }", "public function setHeader($name, $value) {}", "public function setHeadline($headline) {\n $this->headline = $headline;\n }", "public function setTitle(string $value)\n {\n $this->title = $value;\n }", "public function setHeader($key,$val){ return $this->headers->set($key,$val); }", "public function addHeader(string $header, string $value)\n {\n $this->mailObj->addCustomHeader($header, $value);\n }", "public function renderHeadSection()\n\t{\n\t\treturn \"\";\n\t}", "protected function setTitle()\n\t{\n\t\tglobal $APPLICATION;\n\n\t\tif ($this->arParams[\"SET_TITLE\"] == 'Y')\n\t\t\t$APPLICATION->SetTitle(Localization\\Loc::getMessage(\"SPOL_DEFAULT_TITLE\"));\n\t}", "private function do_header() {\n $m_header = '';\n $m_header .= '<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />';\n $m_header .= '<meta http-equiv=\"Content-Language\" content=\"en-gb\" />';\n // $m_header .= '<link rel=stylesheet href=' . $this->c_path . '/../css/reset.css type=text/css />';\n // $m_header .= '<link rel=stylesheet href=' . $this->c_path . '/../css/style.css type=text/css />';\n $this->c_header = $m_header;\n }", "function header (){\n\t\t$this->setfont('Arial','B', 16);\n\t\t$this->settextcolor(0, 0, 0);\n\t\t$this->cell(0, 10, 'WANANCHI', 0, 0, 'C');\n\t\t$this->Ln(10);\n\t\t$this->setfont('Arial','',12);\n\t\t$this->settextcolor(0, 0, 0);\n\t\t$this->cell(0, 10, 'INFORMATION',0, 0, 'C');\n\t\t$this->Ln(30);\n\t}", "final public function setOptionHeader($option)\n {\n $this->options->header = $option;\n }", "public function setTitle($newTitle) { $this->Title = $newTitle; }", "public function writeHeader($uHeading, $uMessage)\n {\n echo \"<h{$uHeading}>{$uMessage}</h{$uHeading}>\";\n }", "public function setDefaultHeader()\n {\n $this->headers[] = \"Mime-Version: 1.0\";\n $this->headers[] = \"Date: \" . date(\"r\");\n $this->headers[] = \"X-Mailer: PHP/\".phpversion();\n\n if ($this->subject) {\n $this->headers[] = \"Subject: \" . $this->subject;\n }\n }", "protected function setHeadTags()\n {\n $strTagClose = ($GLOBALS['objPage']->outputFormat == 'xhtml')\n ? ' />'\n : '>';\n\n // Add rel=\"prev\" and rel=\"next\" links (see #3515)\n if ($this->hasPrevious()) {\n $GLOBALS['TL_HEAD'][] = '<link rel=\"prev\" href=\"' .\n $this->linkToPage($this->intPage - 1) .\n '\"' . $strTagClose;\n }\n if ($this->hasNext()) {\n $GLOBALS['TL_HEAD'][] = '<link rel=\"next\" href=\"' .\n $this->linkToPage($this->intPage + 1) .\n '\"' . $strTagClose;\n }\n }", "public function setHeaders(array $header) {}", "public function setHead( $call )\r\n\t{\r\n\t\t$config\t\t=\tdunloader( 'config', 'jblesta' );\r\n\t\t$linebyline\t=\t$config->get( 'parseheadlinebyline', false );\r\n\t\t$parts\t\t=\texplode( '</head>', $call->htmlheader );\r\n\t\t$head\t\t=\tarray_shift( $parts );\r\n\t\t$newhead\t=\tarray();\r\n\t\t\r\n\t\t// Advanced method - line by line\r\n\t\tif ( $linebyline ) {\r\n\t\t\t\r\n\t\t\t$fndhead\t=\r\n\t\t\t$fndhtml\t=\tfalse;\r\n\t\t\t$lines\t\t=\tpreg_split( '#\\n|\\r\\n#', $head );\r\n\t\t\t\r\n\t\t\tforeach( $lines as $line ) {\r\n\t\t\t\tif ( strpos( $line, '<head' ) !== false ) {\r\n\t\t\t\t\t$fndhead = true;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\tif ( strpos( $line, '<html' ) !== false ) {\r\n\t\t\t\t\t$fndhtml = true;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\tif (! $fndhtml && ! $fndhead ) continue;\r\n\t\t\t\tif ( strpos( $line, '<base' ) !== false ) continue;\r\n\t\t\t\tif ( strpos( $line, 'charset' ) !== false ) continue;\r\n\t\t\t\tif ( strpos( $line, 'generator' ) !== false ) continue;\r\n\t\t\t\tif ( strpos( $line, '</title>' ) !== false ) continue;\r\n\t\t\t\t$newhead[]\t=\t$line;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// Lets handle meta tags first\r\n\t\t\tpreg_match_all( '#<meta[^>]*/>#u', $head, $matches );\r\n\t\t\t\r\n\t\t\tif ( isset( $matches[0] ) ) {\r\n\t\t\t\tforeach ( $matches[0] as $match ) {\r\n\t\t\t\t\tif ( strpos( $match, 'charset' ) !== false ) continue;\r\n\t\t\t\t\tif ( strpos( $match, 'generator' ) !== false ) continue;\r\n\t\t\t\r\n\t\t\t\t\t$newhead[]\t=\t$match;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$parts\t\t=\texplode( '</title>', $head );\r\n\t\t\t$newhead[]\t=\tarray_pop( $parts );\r\n\t\t}\r\n\t\t\r\n\t\t$this->headoutput\t=\timplode( \"\\r\\n\", $newhead );\r\n\t}", "public function header($text)\n {\n return '\n\n\t<!-- MAIN Header in page top -->\n\t<h1 class=\"t3js-title-inlineedit\">' . htmlspecialchars($text) . '</h1>\n';\n }", "function setHeader($header_template_name)\n\t{\n\n\t\t$header_string\t\t=\t\t$this->gCache->cache_or_get(CACHE_CACHE_TIME_TINY, \"\",$header_template_name, \"load_template_file\",$header_template_name);\n\n\t\t# the header has special substitutions for jquery css and jquery js\n\t\t$jquery_ui_css_string\t=\t\"<link rel='stylesheet' href='\" . \tJQUERY_UI_CSS\t.\t\"' />\";\n\t\t$jquery_ui_js_string\t=\t'<script src=\"' . \tJQUERY_UI_JS\t.\t'\"></script>';\n\n\t\t$jquery_js_string\t\t=\t'<script src=\"' . \tJQUERY_JS\t\t.\t'\"></script>'. \"\\n\";\n\t\t$jquery_js_string\t\t.=\t'<script> window.jQuery || document.write(\"<script src=/app/includes/js/jquery/jquery-1.10.2.min.js><\\/script>\")</script>';\n\n\n\t\t$basic_tags\t\t\t=\n\n\t\t\tarray\n\t\t\t(\n\t\t\t\t\"{{header}}\"\t\t\t\t=>\t$header_string,\n\t\t\t\t\"{{jquery_ui_css}}\"\t\t\t=>\t$jquery_ui_css_string,\n\t\t\t\t\"{{jquery_ui_js}}\"\t\t\t=>\t$jquery_ui_js_string,\n\t\t\t\t\"{{jquery_js}}\"\t\t\t\t=>\t$jquery_js_string,\n\t\t\t);\n\n\n\t\t# append the array\n\t\t$this->sub_tags($basic_tags);\n\n\n\t}" ]
[ "0.7115865", "0.66175056", "0.6427874", "0.63250315", "0.60851115", "0.60145533", "0.59840727", "0.5885032", "0.58817357", "0.5842405", "0.58113235", "0.57994074", "0.57731843", "0.5755268", "0.57319266", "0.5720061", "0.56676507", "0.5650661", "0.5644111", "0.562266", "0.5596793", "0.5591294", "0.558926", "0.5550014", "0.5462944", "0.54232246", "0.54145426", "0.5402274", "0.5388943", "0.538517", "0.5382533", "0.53820795", "0.537966", "0.536032", "0.53574526", "0.5336558", "0.5336558", "0.5334682", "0.5296738", "0.5295526", "0.52927893", "0.52895427", "0.5274039", "0.52692777", "0.52525365", "0.5249937", "0.5249197", "0.5240346", "0.5238508", "0.5226158", "0.5225801", "0.52210104", "0.5211751", "0.5203113", "0.52020866", "0.51938635", "0.5186742", "0.51693654", "0.51688504", "0.5165073", "0.5156643", "0.51464826", "0.51431865", "0.5136829", "0.5136629", "0.51336807", "0.513243", "0.5130384", "0.51186043", "0.51150024", "0.51077443", "0.51028806", "0.51026195", "0.5098401", "0.509077", "0.50904787", "0.5089494", "0.5086745", "0.5084162", "0.50831735", "0.5081582", "0.5080085", "0.5076608", "0.5067036", "0.5047677", "0.50475824", "0.5045924", "0.50447994", "0.5041946", "0.50293523", "0.50229776", "0.5019164", "0.50185347", "0.5018326", "0.5011192", "0.5006065", "0.50052565", "0.5005215", "0.49926975", "0.49923283" ]
0.6902673
1
Make Day Column Headings Build the row of day headings using the $daysArray array.
private function makeDayHeadings() { $this->outArray['dayheadings'] = array(); $this->dayHeadings .= "\t<tr>\n"; foreach($this->daysArray as $day) { $this->dayHeadings .= "\t\t<th class=\"dayHeading\">$day</th>\n"; array_push($this->outArray['dayheadings'], $day); } $this->dayHeadings .= "\t</tr>\n"; $this->calWeekDays .= $this->dayHeadings; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function makeCalendarHead()\n\t{\n\t\tif(strlen($this->headerStr) < 1) {\n\t\t\t$head = \"\\t<tr>\\n\\t\\t<th colspan=\\\"7\\\" class=\\\"headerString\\\">\";\n\t\t\tif(!is_null($this->curDay)) {\n\t\t\t\t$head .= $this->curDayName.' the '.$this->curDayS.' of '.$this->curMonthName.', '.$this->curYear;\n\t\t\t} else {\n\t\t\t\t$head .= $this->curMonthName.', '.$this->curYear;\n\t\t\t}\n\t\t\t$head .= \"</th>\\n\\t</tr>\\n\";\n\t\t} else {\n\t\t\t$head = $this->headerStr;\n\t\t}\n\t\t\n\t\t$this->calWeekDays .= $head;\n\t\t$this->outArray['head'] = $head;\n\t}", "private function makeCalendarTitle()\n\t{\n\t\tif(strlen($this->headerTitle) > 0) {\n\t\t\t$this->calWeekDays .= \"\\t<tr>\\n\\t\\t<th class=\\\"headerTitle\\\" colspan=\\\"7\\\">\".$this->headerTitle.\"</th>\\n\\t</tr>\";\n\t\t\t$this->outArray['title'] = $this->headerTitle;\n\t\t}\n\t}", "private function buildBodyDay()\n {\n\n $events = $this->events;\n $h = \"\";\n for ($i = $this->start_hour; $i < $this->end_hour; $i++) {\n for ($t = 0; $t < 2; $t++) {\n $h .= \"<tr>\";\n $min = $t == 0 ? \":00\" : \":30\";\n $h .= \"<td class='$this->timeClass'>\" . date('g:ia', strtotime($i . $min)) . \"</td>\";\n for ($k = 0; $k < 1; $k++) {\n $wd = $this->week_days[$k];\n $time_r = $this->year . '-' . $this->month . '-' . $wd . ' ' . $i . ':00:00';\n $min = $t == 0 ? '' : '+30 minute';\n $time_1 = strtotime($time_r . $min);\n $time_2 = strtotime(date('Y-m-d H:i:s', $time_1) . '+30 minute');\n $dt = date('Y-m-d H:i:s', $time_1);\n $h .= \"<td colspan='3' data-datetime='$dt'>\";\n $h .= $this->dateWrap[0];\n\n $hasEvent = false;\n foreach ($events as $key => $event) {\n //EVENT TIME AND DATE\n $time_e = strtotime($key);\n if ($time_e >= $time_1 && $time_e < $time_2) {\n $hasEvent = true;\n $h .= $this->buildEvents(false, $event);\n }\n }\n $h .= !$hasEvent ? '&nbsp;' : '';\n $h .= $this->dateWrap[1];\n $h .= \"</td>\";\n }\n $h .= \"</tr>\";\n }\n }\n $h .= \"</tbody>\";\n $h .= \"</table>\";\n\n $this->html .= $h;\n }", "private function _createLabels ()\n {\n $content = '';\n\n foreach ($this->dayLabels as $label)\n {\n $content .= Html::tag('td', $label);\n }\n\n return Html::tag('tr', $content).\"\\n\";\n }", "function mkDays ($numDays, $month, $year) {\n for ($i = 1; $i <= $numDays; $i++) {\n $eachDay[$i] = $i; \n }\n foreach($eachDay as $day => &$wkday) {\n $wkday = date(\"w\", mktime(0,0,0,$month,$day,$year));\n }\n foreach($eachDay as $day=>&$wkday) {\n echo \"<table class='box' id=$day month=$month year=$year>\";\n echo \"<td>\";\n echo $day;\n echo \"</td>\";\n echo \"</table>\";\n }\n }", "function mkWeekDays(){\n\tif ($this->startOnSun){\n\t\t$out=\"<tr>\";\n\t\tif ($this->weekNum) $out.=\"<td class=\\\"\".$this->cssWeekNumTitle.\"\\\">\".$this->weekNumTitle.\"</td>\";\n\t\tfor ($x=0;$x<=6;$x++) $out.=\"<td class=\\\"\".$this->cssWeekDay.\"\\\">\".$this->getDayName($x).\"</td>\";\n\t\t$out.=\"</tr>\\n\";\n\t}\n\telse{\n\t\t$out=\"<tr>\";\n\t\tif ($this->weekNum) $out.=\"<td class=\\\"\".$this->cssWeekNumTitle.\"\\\">\".$this->weekNumTitle.\"</td>\";\n\t\tfor ($x=1;$x<=6;$x++) $out.=\"<td class=\\\"\".$this->cssWeekDay.\"\\\">\".$this->getDayName($x).\"</td>\";\n\t\t$out.=\"<td class=\\\"\".$this->cssWeekDay.\"\\\">\".$this->getDayName(0).\"</td>\";\n\t\t$out.=\"</tr>\\n\";\n\t\t$this->firstday=$this->firstday-1;\n\t\tif ($this->firstday<0) $this->firstday=6;\n\t}\nreturn $out;\n}", "private function getWeekDays()\n {\n $time = date('Y-m-d', strtotime($this->year . '-' . $this->month . '-' . $this->day));\n if ($this->view == 'week') {\n $sunday = strtotime('last sunday', strtotime($time . ' +1day'));\n $day = date('j', $sunday);\n $startingDay = date('N', $sunday);\n $cnt = 6;\n }\n if ($this->view == 'day') {\n $day = $this->day;\n $cnt = 0;\n }\n\n $this->week_days = array();\n $mlen = $this->daysMonth[intval($this->month) - 1];\n if ($this->month == 2 && ((($this->year % 4) == 0) && ((($this->year % 100) != 0) || (($this->year % 400) == 0)))) {\n $mlen = $mlen + 1;\n }\n $h = \"<tr class='\" . $this->labelsClass . \"'>\";\n $h .= \"<td>&nbsp;</td>\";\n for ($j = 0; $j <= $cnt; $j++) {\n $cs = $cnt == 0 ? 3 : 1;\n $h .= \"<td colspan='$cs'>\";\n if ($this->view == 'day') {\n $getDayNumber = date('w', strtotime($time));\n } else {\n $getDayNumber = $j;\n }\n if ($day <= $mlen) {\n } else {\n $day = 1;\n }\n $h .= $this->dayLabels[$getDayNumber] . ' ';\n $h .= intval($day);\n $this->week_days[] = $day;\n $day++;\n $h .= \"</td>\";\n }\n\n $h .= \"</tr>\";\n return $h;\n }", "public static function make_table_header(Array $headings){\n\t\t$html = Xml::openElement( 'thead' );\n $html .= Xml::openElement( 'tr' );\n foreach ( $headings as $heading ) {\n $html .= Xml::element( 'th', array(), $heading );\n\t\t}\n $html .= Xml::closeElement( 'tr' );\n $html .= Xml::closeElement( 'thead' );\n\t\treturn $html;\n\t}", "private function makeArrayIterator()\n\t{\n\t\t$this->weekDayNum = $this->firstDayOfTheMonth+1;\t\t\n\t\tfor($this->dayOfMonth; $this->dayOfMonth <= $this->daysInMonth; $this->dayOfMonth++) {\n\t\t\t// Set the default style\n\t\t\t$this->outArray['days'][$this->dayOfMonth]['style'] = 'normalDay';\n\t\t\t\n\t\t\t// Set the style to a weekend day style\n\t\t\tif(($this->weekDayNum == 8)||($this->weekDayNum == 7)) {\n\t\t\t\t$this->outArray['days'][$this->dayOfMonth]['style'] = 'weekendDay';\n\t\t\t}\n\t\t\t\n\t\t\t// Set the style to a current day style\n\t\t\tif($this->curDay == $this->dayOfMonth) {\n\t\t\t\t$this->outArray['days'][$this->dayOfMonth]['style'] = 'currentDay';\n\t\t\t}\n\t\t\t\n\t\t\t// If the current day is Sunday, add a new row\n\t\t\tif($this->weekDayNum == 8) {\n\t\t\t\t$this->weekDayNum = 1;\n\t\t\t} \n\t\t\t\n\t\t\t$this->outArray['days'][$this->dayOfMonth]['dayname'] = $this->daysArray[$this->weekDayNum - 1];\n\t\t\t$this->outArray['days'][$this->dayOfMonth]['weekdaynumber'] = $this->weekDayNum;\n\t\t\t\t\t\t\t\t\t\n\t\t\t// Draw days\n\t\t\tif($this->makeDayEventListArray()) {\n\t\t\t\t$this->outArray['days'][$this->dayOfMonth]['events'] = $this->makeDayEventListArray();\n\t\t\t}\n\t\t\t\n\t\t\t$this->outArray['days'][$this->dayOfMonth]['datestamp'] = $this->curYear.'-'.$this->curMonth.'-'.$this->dayOfMonth;\n\t\t\t\n\t\t\t$this->weekDayNum++;\n\t\t}\n\t}", "static function getDayTotals($dataArray, $dayHeaders) {\n $dayTotals = array();\n\n // Insert label.\n global $i18n;\n $dayTotals['label'] = $i18n->get('label.day_total').':';\n\n foreach ($dataArray as $row) {\n foreach($dayHeaders as $dayHeader) {\n if (array_key_exists($dayHeader, $row)) {\n $minutes = ttTimeHelper::toMinutes($row[$dayHeader]['duration']);\n $dayTotals[$dayHeader] += $minutes;\n }\n }\n }\n // Convert minutes to hh:mm for display.\n foreach($dayHeaders as $dayHeader) {\n $dayTotals[$dayHeader] = ttTimeHelper::minutesToDuration($dayTotals[$dayHeader]);\n }\n return $dayTotals;\n }", "private function buildBody()\n {\n $day = 1;\n $now_date = $this->year . '-' . $this->month . '-01';\n $startingDay = date('N', strtotime('first day of this month', strtotime($now_date)));\n //Add the following line if you want to start the week with monday instead of sunday. Or change the number to suit your needs.\n //$startingDay = $startingDay - 1;\n $monthLength = $this->daysMonth[$this->month - 1];\n if ($this->month == 2 && ((($this->year % 4) == 0) && ((($this->year % 100) != 0) || (($this->year % 400) == 0)))) {\n $monthLength = $monthLength + 1;\n }\n $h = \"<tr>\";\n for ($i = $startingDay == 7 ? 1 : 0; $i < 9; $i++) {\n for ($j = 0; $j <= 6; $j++) {\n $currDate = $this->getDayDate($day);\n $class = $this->getTdClass($day);\n $h .= \"<td data-datetime='$currDate' $class>\";\n $h .= $this->dateWrap[0];\n if ($day <= $monthLength && ($i > 0 || $j >= $startingDay)) {\n $h .= $this->dayWrap[0];\n $h .= $this->getEventSearchLink($day);\n $h .= $this->dayWrap[1];\n $h .= $this->buildEvents($currDate);\n $day++;\n } else {\n $h .= \"&nbsp;\";\n }\n $h .= $this->dateWrap[1];\n $h .= \"</td>\";\n }\n // stop making rows if we've run out of days\n if ($day > $monthLength) {\n break;\n } else {\n $h .= \"</tr>\";\n $h .= \"<tr>\";\n }\n }\n $h .= \"</tr>\";\n $h .= \"</tbody>\";\n $h .= \"</table>\";\n $this->html .= $h;\n }", "private function generateHeading()\n {\n //get current dimensions\n\t\t$highestRow = $this->objWorksheet->getHighestRow(); // e.g. 10\n\t\t$highestColumn = $this->objWorksheet->getHighestColumn(); // e.g 'F'\n\n\t\t$highestColumnIndex = PHPExcel_Cell::columnIndexFromString($highestColumn);\n\n\t\t//insert row on top\n\t\t$this->objWorksheet->insertNewRowBefore(1,2);\n\n\t\t//merge cells\n\t\t$this->objWorksheet->mergeCells(\"A1:\".$highestColumn.\"1\");\n\n\t\t//set the text for header\n\t\t$this->objWorksheet->setCellValue(\"A1\", $this->_headingText);\n\t\t$this->objWorksheet->getStyle('A1')->getAlignment()->setWrapText(true);\n\t\t$this->objWorksheet->getRowDimension('1')->setRowHeight(48);\n\n //Apply style\n\t\t$this->objWorksheet->getStyle(\"A1\")->applyFromArray($this->_headingStyleArray);\n }", "function BeginIncidentTable() {\n $headings = array(\"Year\", \"Section\", \"Description\", \"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\", \"Count\");\n echo \"<table class='sortable' align='center' cellpadding='5' border=1>\";\n echo \"<tr>\";\n foreach ($headings as $heading) {\n echo \"<th>$heading</th>\";\n }\n echo \"</tr>\";\n}", "function build_calendar($month,$year,$dateArray) {\r\n $daysOfWeek = array('S','M','T','W','T','F','S');\r\n\r\n // What is the first day of the month in question?\r\n $firstDayOfMonth = mktime(0,0,0,$month,1,$year);\r\n\r\n // How many days does this month contain?\r\n $numberDays = date('t',$firstDayOfMonth);\r\n\r\n // Retrieve some information about the first day of the\r\n // month in question.\r\n $dateComponents = getdate($firstDayOfMonth);\r\n\r\n // What is the name of the month in question?\r\n $monthName = $dateComponents['month'];\r\n\r\n // What is the index value (0-6) of the first day of the\r\n // month in question.\r\n $dayOfWeek = $dateComponents['wday'];\r\n\r\n // Create the table tag opener and day headers\r\n\r\n $calendar = \"<table class='table table-bordered'>\";\r\n $calendar .= \"<caption>$monthName $year</caption>\";\r\n $calendar .= \"<tr>\";\r\n\r\n // Create the calendar headers\r\n\r\n foreach($daysOfWeek as $day) {\r\n $calendar .= \"<th class='header'>$day</th>\";\r\n } \r\n\r\n // Create the rest of the calendar\r\n\r\n // Initiate the day counter, starting with the 1st.\r\n\r\n $currentDay = 1;\r\n\r\n $calendar .= \"</tr><tr>\";\r\n\r\n // The variable $dayOfWeek is used to\r\n // ensure that the calendar\r\n // display consists of exactly 7 columns.\r\n\r\n if ($dayOfWeek > 0) { \r\n $calendar .= \"<td colspan='$dayOfWeek'>&nbsp;</td>\"; \r\n }\r\n \r\n $month = str_pad($month, 2, \"0\", STR_PAD_LEFT);\r\n \r\n while ($currentDay <= $numberDays) {\r\n\r\n // Seventh column (Saturday) reached. Start a new row.\r\n\r\n if ($dayOfWeek == 7) {\r\n\r\n $dayOfWeek = 0;\r\n $calendar .= \"</tr><tr>\";\r\n\r\n }\r\n \r\n $currentDayRel = str_pad($currentDay, 2, \"0\", STR_PAD_LEFT);\r\n \r\n $date = \"$year-$month-$currentDayRel\";\r\n\t\tif($date == date('Y-m-d')){\r\n\t\t\t$calendar .= \"<td class='col-md-1 col-xs-1' rel='$date' bgcolor='#ADD8E6'>$currentDay<br/>\";\r\n\t\t}else{\r\n\t\t\t$calendar .= \"<td class='col-md-1 col-xs-1' rel='$date'>$currentDay<br/>\";\r\n\t\t}\r\n \r\n\t\t $sql = mysql_query(\"SELECT * FROM leavesys.leave_details WHERE date = '\".$date.\"'\");\r\n\t\t while($result = mysql_fetch_array($sql)){\r\n\t\t\t $sql2 = mysql_query(\"SELECT * FROM user WHERE id = '\".$result['applicant_id'].\"'\");\r\n\t\t\t $result2 = mysql_fetch_assoc($sql2);\r\n\t\t\t\tif($result['half'] == 1){\r\n\t\t\t\t\t$c_content = \" (am)\";\r\n\t\t\t\t}else if($result['half'] == 2){\r\n\t\t\t\t\t$c_content = \" (pm)\";\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$c_content = \"\";\r\n\t\t\t\t}\r\n\t\t\t\t$calendar .= $result2['country_code'].\" - \".$result2['name'].$c_content.\"<br/>\";\r\n\t\t }\r\n\t\t $sql1 = mysql_query(\"SELECT * FROM leavesys.holiday WHERE date = '\".$date.\"'\");\r\n\t\t while($result1 = mysql_fetch_array($sql1)){\r\n\t\t\t if($result1['country'] == \"al\"){\r\n\t\t\t\t $calendar .= \"<font color='blue;'>\".$result1['name'].\"</font><br/>\";\r\n\t\t\t }else{\r\n\t\t\t\t$calendar .= \"<font color='blue;'>\".$result1['name'].\" (\".$result1['country'].\")</font><br/>\";\r\n\t\t\t }\r\n\t\t }\r\n\t\t $calendar .= \"</td>\";\r\n\r\n // Increment counters\r\n \r\n $currentDay++;\r\n $dayOfWeek++;\r\n\r\n }\r\n \r\n \r\n\r\n // Complete the row of the last week in month, if necessary\r\n\r\n if ($dayOfWeek != 7) { \r\n \r\n $remainingDays = 7 - $dayOfWeek;\r\n $calendar .= \"<td colspan='$remainingDays'>&nbsp;</td>\"; \r\n\r\n }\r\n \r\n $calendar .= \"</tr>\";\r\n\r\n $calendar .= \"</table>\";\r\n\r\n return $calendar;\r\n\r\n}", "function build_month_days($month, $number_of_days) {\r\n $days_of_month_html = '<tr class=\"week-day\">';\r\n \r\n $days_in_week = 1;\r\n for ($days = 1; $days <= $number_of_days; $days++) {\r\n\r\n // Split the weeks in rows\r\n if ($days_in_week == 8) {\r\n $days_of_month_html = $days_of_month_html . '</tr>';\r\n $days_of_month_html = $days_of_month_html . '<tr class=\"week-day\">'; \r\n $days_in_week = 1;\r\n }\r\n\r\n // Render days of week in the correct position\r\n if ($days == 1) {\r\n $initial_position = get_first_day($month);\r\n for($i = 1; $i < $initial_position; $i++) {\r\n $days_of_month_html = $days_of_month_html . '<td class=\"day\"></td>';\r\n $days_in_week++;\r\n }\r\n if ($initial_position == 1) {\r\n $days_of_month_html = $days_of_month_html . '<td class=\"day sunday\">'.$days.'</td>';\r\n } else {\r\n $days_of_month_html = $days_of_month_html . '<td class=\"day\">'.$days.'</td>';\r\n }\r\n } else if ($days_in_week == 1) {\r\n $days_of_month_html = $days_of_month_html . '<td class=\"day sunday\">'.$days.'</td>';\r\n } else {\r\n $days_of_month_html = $days_of_month_html . '<td class=\"day\">'.$days.'</td>'; \r\n }\r\n\r\n $days_in_week++;\r\n }\r\n $days_of_month_html = $days_of_month_html . '</tr>';\r\n \r\n return $days_of_month_html;\r\n }", "protected function compileWeeks()\n\t{\n\t\t$intDaysInMonth = date('t', $this->Date->monthBegin);\n\t\t$intFirstDayOffset = date('w', $this->Date->monthBegin) - $this->cal_startDay;\n\n\t\tif ($intFirstDayOffset < 0)\n\t\t{\n\t\t\t$intFirstDayOffset += 7;\n\t\t}\n\n\t\t$intColumnCount = -1;\n\t\t$intNumberOfRows = ceil(($intDaysInMonth + $intFirstDayOffset) / 7);\n\t\t$arrAllEvents = $this->getAllEvents($this->iso_arrEventIDs, $this->cal_calendar, $this->Date->monthBegin, $this->Date->monthEnd);\n\t\t\n\t\t$arrDays = array();\n\n\t\t// Compile days\n\t\tfor ($i=1; $i<=($intNumberOfRows * 7); $i++)\n\t\t{\n\t\t\t$intWeek = floor(++$intColumnCount / 7);\n\t\t\t$intDay = $i - $intFirstDayOffset;\n\t\t\t$intCurrentDay = ($i + $this->cal_startDay) % 7;\n\n\t\t\t$strWeekClass = 'week_' . $intWeek;\n\t\t\t$strWeekClass .= ($intWeek == 0) ? ' first' : '';\n\t\t\t$strWeekClass .= ($intWeek == ($intNumberOfRows - 1)) ? ' last' : '';\n\n\t\t\t$strClass = ($intCurrentDay < 2) ? ' weekend' : '';\n\t\t\t$strClass .= ($i == 1 || $i == 8 || $i == 15 || $i == 22 || $i == 29 || $i == 36) ? ' col_first' : '';\n\t\t\t$strClass .= ($i == 7 || $i == 14 || $i == 21 || $i == 28 || $i == 35 || $i == 42) ? ' col_last' : '';\n\n\t\t\t// Empty cell\n\t\t\tif ($intDay < 1 || $intDay > $intDaysInMonth)\n\t\t\t{\n\t\t\t\t$arrDays[$strWeekClass][$i]['label'] = '&nbsp;';\n\t\t\t\t$arrDays[$strWeekClass][$i]['class'] = 'days empty' . $strClass ;\n\t\t\t\t$arrDays[$strWeekClass][$i]['events'] = array();\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$intKey = date('Ym', $this->Date->tstamp) . ((strlen($intDay) < 2) ? '0' . $intDay : $intDay);\n\t\t\t$strClass .= ($intKey == date('Ymd')) ? ' today' : '';\n\n\t\t\t// Mark the selected day (see #1784)\n\t\t\tif ($intKey == $this->Input->get('day'))\n\t\t\t{\n\t\t\t\t$strClass .= ' selected';\n\t\t\t}\n\n\t\t\t// Inactive days\n\t\t\tif (empty($intKey) || !isset($arrAllEvents[$intKey]))\n\t\t\t{\n\t\t\t\t$arrDays[$strWeekClass][$i]['label'] = $intDay;\n\t\t\t\t$arrDays[$strWeekClass][$i]['class'] = 'days' . $strClass;\n\t\t\t\t$arrDays[$strWeekClass][$i]['events'] = array();\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$arrEvents = array();\n\n\t\t\t// Get all events of a day\n\t\t\tforeach ($arrAllEvents[$intKey] as $v)\n\t\t\t{\n\t\t\t\tforeach ($v as $vv)\n\t\t\t\t{\n\t\t\t\t\t$arrEvents[] = $vv;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$arrDays[$strWeekClass][$i]['label'] = $intDay;\n\t\t\t$arrDays[$strWeekClass][$i]['class'] = 'days active' . $strClass;\n\t\t\t\n\t\t\t$arrDays[$strWeekClass][$i]['href'] = $this->strUrl . ($GLOBALS['TL_CONFIG']['disableAlias'] ? '?id=' . $this->Input->get('id') . '&amp;' : '?') . 'day=' . $intKey;\n\t\t\t\n\t\t\t$arrDays[$strWeekClass][$i]['title'] = sprintf(specialchars($GLOBALS['TL_LANG']['MSC']['cal_events']), count($arrEvents));\n\t\t\t$arrDays[$strWeekClass][$i]['events'] = $arrEvents;\n\t\t}\n\n\t\treturn $arrDays;\n\t}", "private function buildHeader()\n {\n $month_name = $this->monthLabels[$this->month - 1] . ' ' . $this->year;\n $vclass = strtolower($this->view);\n $h = \"<table class='\" . $this->tableClass . \" \" . $vclass . \"'>\";\n $h .= \"<thead>\";\n $h .= \"<tr class='\" . $this->headClass . \"'>\";\n $cs = 5;\n if ($this->view == 'week' || $this->view == 'day') {\n $h .= \"<th>&nbsp;</th>\";\n }\n if ($this->view == 'day') {\n $cs = 1;\n }\n\n if ($this->nav) {\n $h .= \"<th>\";\n $h .= \"<a class='\" . $this->prevClass . \"' href='\" . $this->prevLink() . \"'>\" . $this->prevIco . \"</a>\";\n $h .= \"</th>\";\n $h .= \"<th colspan='$cs'>\";\n $h .= $month_name;\n $h .= \"</th>\";\n $h .= \"<th>\";\n $h .= \"<a class='\" . $this->nextClass . \"' href='\" . $this->nextLink() . \"'>\" . $this->nextIco . \"</a>\";\n $h .= \"</th>\";\n } else {\n $h .= \"<th colspan='7'>\";\n $h .= $month_name;\n $h .= \"</th>\";\n }\n $h .= \"</tr>\";\n $h .= \"</thead>\";\n\n $h .= \"<tbody>\";\n if ($this->view != 'day' && $this->view != 'week') {\n $h .= \"<tr class='\" . $this->labelsClass . \"'>\";\n\n for ($i = 0; $i <= 6; $i++) {\n $h .= \"<td>\";\n $h .= $this->dayLabels[$i];\n $h .= \"</td>\";\n }\n\n $h .= \"</tr>\";\n }\n if ($this->view == 'day' || $this->view == 'week') {\n $h .= self::getWeekDays();\n }\n\n $this->html .= $h;\n }", "private function makeHTMLIterator()\n\t{\n\t\t$this->weekDayNum = $this->firstDayOfTheMonth+1;\n\t\tfor($this->dayOfMonth; $this->dayOfMonth <= $this->daysInMonth; $this->dayOfMonth++) {\n\t\t\t// Set the default style\n\t\t\t$style = 'class=\"normalDay\"';\n\t\t\t\n\t\t\t// Set the style to a weekend day style\n\t\t\tif(($this->weekDayNum == 8)||($this->weekDayNum == 7)) {\n\t\t\t\t$style = 'class=\"weekendDay\"';\n\t\t\t}\n\t\t\t\n\t\t\t// Set the style to a current day style\n\t\t\tif($this->curDay == $this->dayOfMonth) {\n\t\t\t\t$style = 'class=\"currentDay\"';\n\t\t\t}\n\t\t\t\n\t\t\t// If the current day is Sunday, add a new row\n\t\t\tif($this->weekDayNum == 8) {\n\t\t\t\t$this->calWeekDays .= \"\\t</tr>\\n\\t<tr>\\n\";\n\t\t\t\t$this->weekDayNum = 1;\n\t\t\t}\n\n\t\t\t// Draw days\n\t\t\t$this->calWeekDays .= \"\\t\\t<td valign=\\\"top\\\" \".$style.'>'.$this->dayOfMonth;\n\t\t\t\n\t\t\tif($this->addWeekDay) {\n\t\t\t\t$this->calWeekDays .= \"|\".$this->weekDayNum;\n\t\t\t}\n\t\t\t\n\t\t\tif(strlen($this->addEvtDest) > 0) {\n\t\t\t\t$addevtimg = (strlen($this->addEvtImg) > 0 ? '<img src=\"'.$this->addEvtImg.'\" class=\"addevtimg\" />' : '+');\n\t\t\t\t$this->calWeekDays .= '[<a href=\"'.$this->addEvtDest.'?date='.$this->curYear.'-'.$this->curMonth.'-'.$this->dayOfMonth.'\" title=\"Add Event\" class=\"addevt\">'.$addevtimg.'</a>]';\n\t\t\t}\n\t\t\t\n\t\t\t$this->calWeekDays .= \" \".$this->makeDayEventListHTML().\"</td>\\n\";\n\t\t\t\n\t\t\t$this->weekDayNum++;\n\t\t}\n\t}", "private function setDayNames()\n\t{\n\t $range = range(1,7);\n\t $return = array();\n\t foreach($range AS $key => $dayNum)\n\t {\n\t \t$fmt = datefmt_create ($this->locale, null, null, null, IntlDateFormatter::GREGORIAN, 'eee');\n\t \t$key = strtolower(datefmt_format( $fmt , mktime(12,0,0,4,$dayNum+5,2014))); //we force the date so things start on Sunday\n\t \t\n\t \t$fmt = datefmt_create ($this->locale, null, null, null, IntlDateFormatter::GREGORIAN, 'EEEE');\n\t \t$return[$key] = datefmt_format( $fmt , mktime(12,0,0,4,$dayNum+5,2014));\n\t }\n\n\t return $return;\n\t}", "function createTable($array,$summary,$caption,$id='',$class='') {\n\tif(!is_array($array) || empty($summary) || empty($caption)) return false;\n\t\n\t$thead_text = '';\n\t$tbody_text = '';\n\n\t$header_total = count($array['header']);\n\tforeach($array['header'] as $key => $header) {\n\t\tif(!is_array($header)) $header = array('text' => $header);\n\t\t$thead_text .= '<th scope=\"col\"'.addAttributes(@$header['title'],$header['id'],@$header['class']).'>'.formatText($header['text']).'</th>'.\"\\n\";\n\t}\n\n\t$i=0;\n\tforeach($array['rows'] as $key => $row_array) {\n\t\t$tbody_row = '';\n\t\tif(empty($row_array['class'])) $row_array['class'] = array();\n\t\telseif(!is_array($row_array['class'])) $row_array['class'] = array($row_array['class']);\n\t\tif(!isEven($i)) $row_array['class'][] = 'odd';\n\n\t\tif(count($row_array['value'])!=$header_total) continue; // if the number of rows don't match header rows...\n\t\tforeach($row_array['value'] as $key => $row) {\n\t\t\tif(!is_array($row)) $row = array('text' => $row);\n\t\t\t$tbody_row .= '<td headers=\"'.$array['header'][$key]['id'].'\"'.addAttributes('',@$row['id'],@$row['class']).'>'.$row['text'].'</td>'.\"\\n\";\n\t\t}\n\t\t$tbody_text .= '<tr'.addAttributes('',@$row_array['id'],@$row_array['class']).'>'.\"\\n\".$tbody_row.'</tr>'.\"\\n\";\n\t\t$i++;\n\t}\n\tif(empty($tbody_text)) return false;\n\t\n\t$table = '<table summary=\"'.formatText($summary).'\"'.addAttributes('',$id,$class).'>\n\t\t<caption>'.formatText($caption).'</caption>\n\t\t<thead>'.\"\\n\".'<tr>'.\"\\n\".$thead_text.'</tr>'.\"\\n\".'</thead>\n\t\t<tbody>'.\"\\n\".$tbody_text.'</tbody>\n\t</table>'.\"\\n\";\n\t\n\treturn $table;\n}", "function getColumnHeaders(){\n\t\t$columnHeaders = array();\n\n\t\t//fixed headers\n\t\t$columnHeaders[0] = 'User';\n\t\t$columnHeaders[1] = 'Action';\n\n\t\t//two headers were added, offsett to make up for it\n\t\t$count = 2;\n\t\tforeach ($this->schedule as $date => $times) {\n\n\t\t\t//convert the full date to a more readable version\n\t\t\t$converter = strtotime($date); \n\t\t\t$formattedDate =date('l', $converter);\n\t\t\t$formattedDate = $formattedDate.'</br>'.date('m-d-y', $converter);\n\n\t\t\tforeach($times as $time){// #2dimensionlswag\n\n\t\t\t\t//convert the international time to AM/PM\n\t\t\t\t$converter = strtotime($time); \n\t\t\t\t$formattedTime = date(\"g:i A\", $converter);\n\n\t\t\t\t$columnHeaders[$count] = $formattedDate.'</br>'.$formattedTime;\n\t\t\t\t$count++;\n\t\t\t}\n\t\t}\n\t\treturn $columnHeaders;\n\t}", "function build_calendar($month,$year,$dateArray) {\n $daysOfWeek = array('S','M','T','W','T','F','S');\n\n // What is the first day of the month in question?\n $firstDayOfMonth = mktime(0,0,0,$month,1,$year);\n\n // How many days does this month contain?\n $numberDays = date('t',$firstDayOfMonth);\n\n // Retrieve some information about the first day of the\n // month in question.\n $dateComponents = getdate($firstDayOfMonth);\n\n // What is the name of the month in question?\n $monthName = $dateComponents['month'];\n\n // What is the index value (0-6) of the first day of the\n // month in question.\n $dayOfWeek = $dateComponents['wday'];\n\n // Create the table tag opener and day headers\n\n $calendar = \"<table class='calendar'>\";\n $calendar .= \"<caption>$monthName $year</caption>\";\n $calendar .= \"<tr>\";\n\n // Create the calendar headers\n\n foreach($daysOfWeek as $day) {\n $calendar .= \"<th class='header'>$day</th>\";\n }\n\n // Create the rest of the calendar\n\n // Initiate the day counter, starting with the 1st.\n\n $currentDay = 1;\n\n $calendar .= \"</tr><tr>\";\n\n // The variable $dayOfWeek is used to\n // ensure that the calendar\n // display consists of exactly 7 columns.\n\n if ($dayOfWeek > 0) {\n $calendar .= \"<td colspan='$dayOfWeek'>&nbsp;</td>\";\n }\n\n $month = str_pad($month, 2, \"0\", STR_PAD_LEFT);\n\n while ($currentDay <= $numberDays) {\n\n // Seventh column (Saturday) reached. Start a new row.\n\n if ($dayOfWeek == 7) {\n\n $dayOfWeek = 0;\n $calendar .= \"</tr><tr>\";\n\n }\n\n $currentDayRel = str_pad($currentDay, 2, \"0\", STR_PAD_LEFT);\n\n $date = \"$year-$month-$currentDayRel\";\n\n $calendar .= \"<td class='day' rel='$date'>$currentDay</td>\";\n\n // Increment counters\n\n $currentDay++;\n $dayOfWeek++;\n\n }\n\n\n\n // Complete the row of the last week in month, if necessary\n\n if ($dayOfWeek != 7) {\n\n $remainingDays = 7 - $dayOfWeek;\n $calendar .= \"<td colspan='$remainingDays'>&nbsp;</td>\";\n\n }\n\n $calendar .= \"</tr>\";\n\n $calendar .= \"</table>\";\n\n return $calendar;\n\n}", "function mkMonthBody($showNoMonthDays=0){\n\tif ($this->actmonth==1){\n\t\t$pMonth=12;\n\t\t$pYear=$this->actyear-1;\n\t}\n\telse{\n\t\t$pMonth=$this->actmonth-1;\n\t\t$pYear=$this->actyear;\n\t}\n$out=\"<tr>\";\n$cor=0;\n\tif ($this->startOnSun) $cor=1;\n\tif ($this->weekNum) $out.=\"<td class=\\\"\".$this->cssWeekNum.\"\\\">\".$this->mkWeekNum(1+$cor).\"</td>\";\n$monthday=0;\n$nmonthday=1;\n\tfor ($x=0; $x<=6; $x++){\n\t\tif ($x>=$this->firstday){\n\t\t$monthday++;\n\t\t$out.=$this->mkDay($monthday);\n\t\t}\n\t\telse{\n\t\t\tif ($showNoMonthDays==0) $out.=\"<td class=\\\"\".$this->cssNoMonthDay.\"\\\"></td>\";\n\t\t\telse $out.=\"<td class=\\\"\".$this->cssNoMonthDay.\"\\\">\".($this->getMonthDays($pMonth,$pYear)-($this->firstday-1)+$x).\"</td>\";\n\t\t}\n\t}\n$out.=\"</tr>\\n\";\n$goon=$monthday+1;\n$stop=0;\n\tfor ($x=0; $x<=6; $x++){\n\t\tif ($goon>$this->maxdays) break;\n\t\tif ($stop==1) break;\n\t\t$out.=\"<tr>\";\n\t\tif ($this->weekNum) $out.=\"<td class=\\\"\".$this->cssWeekNum.\"\\\">\".$this->mkWeekNum($goon+$cor).\"</td>\";\n\t\t\tfor ($i=$goon; $i<=$goon+6; $i++){\n\t\t\t\tif ($i>$this->maxdays){\n\t\t\t\t\tif ($showNoMonthDays==0) $out.=\"<td class=\\\"\".$this->cssNoMonthDay.\"\\\"></td>\";\n\t\t\t\t\telse $out.=\"<td class=\\\"\".$this->cssNoMonthDay.\"\\\">\".$nmonthday++.\"</td>\";\n\t\t\t\t\t$stop=1;\n\t\t\t\t}\n\t\t\t\telse $out.=$this->mkDay($i);\n\t\t\t}\n\t\t$goon=$goon+7;\n\t\t$out.=\"</tr>\\n\";\n\t}\n$this->selectedday=\"-2\";\nreturn $out;\n}", "function buildRow($network){\n $offset = 0;\n $i = 0;\n while($i < 7){\n $currentTitle = getTitle($network, getTime($offset));\n if (count($currentTitle) == 0){\n echo '<td colspan=\"1\">Local Programming</td>';\n $collumns = 1;\n $offset += 30;\n }\n else{\n $collumns = (int)($currentTitle[0]['RUNTIME'] / 30);\n if($i + $collumns > 7 ){\n $collumns = 2;\n }\n else if ($i + $collumns == 7){\n $collumns += 1;\n }\n echo '<td colspan=\"'. $collumns.'\"><a href = \"/phase5/pages/info.php?id= ' . $currentTitle[0]['ID']. '\">' . $currentTitle[0]['TITLE'] . '</td> ';\n $offset += $currentTitle[0]['RUNTIME'] ;\n }\n $i += $collumns; \n }\n}", "public function generateTable($myTableArrayBody) {\n\t\t\t $x = 0;\n\t\t\t $y = 0;\n\t\t\t $seTableStr = '<table><caption><h3>HAVANAO PAYMENT DETAILS</h3></caption><tbody>';\t\t \n\t\t\t foreach ($myTableArrayBody as $key => $value) {\n\t\t\t \t$seTableStr = $seTableStr.'<tr><th>'.strtoupper($key).'</th><td>'.$value.'</td></tr>';\n\t\t\t }\n\t\t\t $seTableStr .= '</tbody></table>';\n\t\t\t return $seTableStr;\n\t\t\t}", "public static function column_headings( $columns ) {\n\n\t\t\tunset( $columns['date'] );\n\n\t\t\t$columns['advanced_headers_display_rules'] = __( 'Display Rules', 'astra-addon' );\n\t\t\t$columns['date'] = __( 'Date', 'astra-addon' );\n\n\t\t\treturn $columns;\n\t\t}", "static function getDayHeadersForWeek($start_date) {\n $dayHeaders = array();\n $objDate = new DateAndTime(DB_DATEFORMAT, $start_date);\n $dayHeaders[] = (string) $objDate->getDate(); // It returns an int on first call.\n if (strlen($dayHeaders[0]) == 1) // Which is an implementation detail of DateAndTime class.\n $dayHeaders[0] = '0'.$dayHeaders[0]; // Add a 0 for single digit day.\n $objDate->incDay();\n $dayHeaders[] = $objDate->getDate(); // After incDay it returns a string with leading 0, when necessary.\n $objDate->incDay();\n $dayHeaders[] = $objDate->getDate();\n $objDate->incDay();\n $dayHeaders[] = $objDate->getDate();\n $objDate->incDay();\n $dayHeaders[] = $objDate->getDate();\n $objDate->incDay();\n $dayHeaders[] = $objDate->getDate();\n $objDate->incDay();\n $dayHeaders[] = $objDate->getDate();\n unset($objDate);\n return $dayHeaders;\n }", "public function getMonthAsTable()\n {\n // Get all days to put in calendar\n $days = $this->getDaysAsArray();\n\n // Start table\n $html = \"<table class='table'><thead><tr>\";\n\n // Add weekday names to table head\n foreach (array_keys($this->weekdayIndexes) as $key) {\n $html .= \"<th>{$key}</th>\";\n }\n $html .= \"</tr></thead><tbody>\";\n\n // Add day numbers to table body\n for ($i = 0; $i < count($days); $i++) {\n // New row at start of week\n $html .= $i % 7 === 0 ? \"<tr>\" : \"\";\n\n if (($days[$i] > $i + 7) || ($days[$i] < $i - 7)) {\n // Add class 'outside' if number is part of previous or next month\n $html .= \"<td class='outside'>\";\n } elseif ($i % 7 === 6) {\n // Add class 'red' to Sundays\n $html .= \"<td class='red'>\";\n } else {\n $html .= \"<td>\";\n }\n $html .= \"{$days[$i]}</td>\";\n // Close row at end of week\n $html .= $i % 7 === 6 ? \"</tr>\" : \"\";\n }\n $html .= \"</tbody></table>\";\n return $html;\n }", "Public static function displayCalender($array)\n {\n echo \"Sun Mon Tue Wed Thu Fri Sat\\n\";\n for ($i = 0; $i < 6; $i++) \n {\n for ($j = 0; $j < 7; $j++) \n {\n if ($array[$i][$j] == '-' || $array[$i][$j] > 31) \n {\n //replacing with spaces\n echo \" \";\n } \n else \n {\n if ($array[$i][$j] < 10) \n {\n //giving 5 space after single digit\n echo $array[$i][$j] . \" \";\n } \n else \n {\n //giving 4 space after two digit number\n echo $array[$i][$j] . \" \";\n }\n }\n }\n echo \"\\n\";\n }\n }", "public static function create_table_head()\n\t{\n\t\t\n\t\tif (!static::$columns)\n\t\t{\n\t\t\treturn static::$template['wrapper_start'].'<tr><th>No columns config</th></tr>'.static::$template['wrapper_end'];\n\t\t}\n\n\t\t$table_head = static::$template['wrapper_start'];\n\t\t$table_head .= '<tr>';\n\t\t\n\t\tforeach(static::$columns as $column)\n\t\t{\n\t\t\t$sort_key \t= (is_array($column) ? isset($column[1]) ? $column[1] : strtolower($column[0]) : $column);\n\t\t\t$col_attr\t= (is_array($column) && isset($column[2]) ? $column[2] : array());\n\t\t\t\n\t\t\t$new_direction = static::$direction;\n\t\t\t\n\t\t\tif(static::$sort_by == $sort_key)\n\t\t\t{\n\t\t\t\t$active_class_name = static::$template['col_class_active'].' '.static::$template['col_class_active'].'_'.$new_direction;\n\t\t\t\tif(isset($col_attr['class']))\n\t\t\t\t{\n\t\t\t\t\t$col_attr['class'] .= ' '.$active_class_name;\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\t$col_attr['class'] = $active_class_name;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$new_direction = (static::$direction == 'asc' ? 'desc' : 'asc');\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(is_array($column) && (!isset($column[1]) || isset($column[1]) && $column[1] !== false)){\n\t\t\t\t\n\t\t\t\t$url \t\t\t= rtrim(static::$base_url, '/').(static::$current_page ? '/'.static::$current_page : '');\n\t\t\t\t$url \t\t\t.= '/'.$sort_key.static::$uri_delimiter.$new_direction;\n\t\t\t\t\n\t\t\t\t$cell_content \t= rtrim(static::$template['link_start'], '> ').' href=\"'.$url.'\">';\n\t\t\t\t$cell_content \t.= $column[0];\n\t\t\t\t$cell_content \t.= static::$template['link_end'];\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tif(is_array($column))\n\t\t\t\t{\n\t\t\t\t\t$column = $column[0];\n\t\t\t\t}\n\t\t\t\t$cell_content = static::$template['nolink_start'].$column.static::$template['nolink_end'];\t\n\t\t\t}\n\t\t\t\n\t\t\t$table_head .= html_tag(static::$template['col_tag'], $col_attr, $cell_content);\n\t\t\t\n\t\t}\n\t\t\n\t\t$table_head .= '</tr>';\n\t\t$table_head .= static::$template['wrapper_end'];\n\n\t\treturn $table_head;\n\t}", "public function getPageHeading($array) {\n\t\t$html ='\n\t\t<div class=\"row\">\n\t\t\t<div class=\"small-12 medium-12 large-12 columns\">\n\t\t\t\t<div class=\"small-12 medium-9 large-9 columns\">\n\t\t\t\t\t<h2> '.$array['page_title'].' </h2>\n\t\t\t\t</div>';\n\t\t\tif ($array['side_title']) {\n\t\t\t\t$html .='\n\t\t\t\t<div class=\"small-12 medium-3 large-3 columns\">\n\t\t\t\t\t<h6 class=\"subtitle\">'.$array['side_title'].'</h6>\n\t\t\t\t</div>';\n\t\t\t}\n\t\t\t$html .='\n\t\t\t</div>\n\t\t</div>';\n\n\t\treturn $html;\n\t}", "public function getDayNames($array) {\n\t\treturn $this->dayNames;\n\t}", "public static function htmlTable ($array, $tableHeadingSubstitutions = array (), $class = 'lines', $keyAsFirstColumn = true, $uppercaseHeadings = false, $allowHtml = false /* true/false/array(field1,field2,..) */, $showColons = false, $addCellClasses = false, $addRowKeyClasses = false, $onlyFields = array (), $compress = false, $showHeadings = true, $encodeEmailAddress = true)\r\n\t{\r\n\t\t# Check that the data is an array\r\n\t\tif (!is_array ($array)) {return $html = \"\\n\" . '<p class=\"warning\">Error: the supplied data was not an array.</p>';}\r\n\t\t\r\n\t\t# Return nothing if no data\r\n\t\tif (empty ($array)) {return '';}\r\n\t\t\r\n\t\t# Assemble the data cells\r\n\t\t$dataHtml = '';\r\n\t\tforeach ($array as $key => $value) {\r\n\t\t\tif (!$value || !is_array ($value)) {return $html = \"\\n\" . '<p class=\"warning\">Error: the supplied data was not a multi-dimensional array.</p>';}\r\n\t\t\t$headings = $value;\r\n\t\t\t$dataHtml .= \"\\n\\t\" . '<tr' . ($addRowKeyClasses ? ' class=\"' . htmlspecialchars ($key) . '\"' : '') . '>';\r\n\t\t\tif ($keyAsFirstColumn) {\r\n\t\t\t\t$thisCellClass = ($addCellClasses ? htmlspecialchars ($key) . ((is_array ($addCellClasses) && isSet ($addCellClasses[$key])) ? ' ' . $addCellClasses[$key] : '') : '') . ($keyAsFirstColumn ? ($addCellClasses ? ' ' : '') . 'key' : '');\r\n\t\t\t\t$dataHtml .= ($compress ? '' : \"\\n\\t\\t\") . (strlen ($thisCellClass) ? \"<td class=\\\"{$thisCellClass}\\\">\" : '<td>') . \"<strong>{$key}</strong></td>\";\r\n\t\t\t}\r\n\t\t\t$i = 0;\r\n\t\t\tforeach ($value as $valueKey => $valueData) {\r\n\t\t\t\tif ($onlyFields && !in_array ($valueKey, $onlyFields)) {continue;}\t// Skip if not in the list of onlyFields if that is supplied\r\n\t\t\t\t$i++;\r\n\t\t\t\t$data = $array[$key][$valueKey];\r\n\t\t\t\t$thisCellClass = ($addCellClasses ? htmlspecialchars ($valueKey) . ((is_array ($addCellClasses) && isSet ($addCellClasses[$valueKey])) ? ' ' . $addCellClasses[$valueKey] : '') : '') . ((($i == 1) && !$keyAsFirstColumn) ? ($addCellClasses ? ' ' : '') . 'key' : '');\r\n\t\t\t\t$htmlAllowed = (is_array ($allowHtml) ? (in_array ($valueKey, $allowHtml)) : $allowHtml);\t// Either true/false or an array of permitted fields where HTML is allowed\r\n\t\t\t\t$cellContents = ($htmlAllowed ? $data : htmlspecialchars ($data));\r\n\t\t\t\t$dataHtml .= ($compress ? '' : \"\\n\\t\\t\") . (strlen ($thisCellClass) ? \"<td class=\\\"{$thisCellClass}\\\">\" : '<td>') . ($encodeEmailAddress ? self::encodeEmailAddress ($cellContents) : $cellContents) . (($showColons && ($i == 1) && $data) ? ':' : '') . '</td>';\r\n\t\t\t}\r\n\t\t\t$dataHtml .= ($compress ? '' : \"\\n\\t\") . '</tr>';\r\n\t\t}\r\n\t\t\r\n\t\t# Construct the heading HTML\r\n\t\t$headingHtml = '';\r\n\t\tif ($tableHeadingSubstitutions !== false) {\r\n\t\t\t$headingHtml .= \"\\n\\t\" . '<tr>';\r\n\t\t\tif ($keyAsFirstColumn) {$headingHtml .= \"\\n\\t\\t\" . '<th></th>';}\r\n\t\t\t$columns = array_keys ($headings);\r\n\t\t\tforeach ($columns as $column) {\r\n\t\t\t\tif ($onlyFields && !in_array ($column, $onlyFields)) {continue;}\t// Skip if not in the list of onlyFields if that is supplied\r\n\t\t\t\t$columnTitle = (empty ($tableHeadingSubstitutions) ? $column : (isSet ($tableHeadingSubstitutions[$column]) ? $tableHeadingSubstitutions[$column] : $column));\r\n\t\t\t\t$headingHtml .= \"\\n\\t\\t\" . ($addCellClasses ? '<th class=\"' . $column . ((is_array ($addCellClasses) && isSet ($addCellClasses[$column])) ? ' ' . $addCellClasses[$column] : '') . '\">' : '<th>') . ($uppercaseHeadings ? ucfirst ($columnTitle) : $columnTitle) . '</th>';\r\n\t\t\t}\r\n\t\t\t$headingHtml .= \"\\n\\t\" . '</tr>';\r\n\t\t}\r\n\t\t\r\n\t\t# Construct the overall heading\r\n\t\t$html = \"\\n\\n\" . \"<table class=\\\"{$class}\\\">\";\r\n\t\tif ($showHeadings) {$html .= $headingHtml;}\r\n\t\t$html .= $dataHtml;\r\n\t\t$html .= \"\\n\" . '</table>';\r\n\t\t\r\n\t\t# Return the HTML\r\n\t\treturn $html;\r\n\t}", "public function setDayNames($array) {\n\t\tif (count($array) == 7)\n\t\t\t$this->dayNames = $array;\n\t\telse\n\t\t\tthrow new exception ('Invalid value for setDayNames()');\n\t}", "private function createFileHeadings() {\n\t\t// Allow other plugins to add their own column headers\n\t\t$headings = elgg_trigger_plugin_hook('row:headers', 'userexport', array(), $this->fields);\n\n\t\t// Attempt to translate the fields\n\t\tforeach ($headings as $key => $field) {\n\t\t\t$lang_string = \"profile:{$field}\";\n\t\t\t$heading = elgg_echo($lang_string);\n\n\t\t\t// No translation was found, fall back to the original string\n\t\t\tif ($heading === $lang_string) {\n\t\t\t\t$heading = elgg_echo($field);\n\t\t\t}\n\n\t\t\t$headings[$key] = $heading;\n\t\t}\n\n\t\t$this->writeToCSV($headings);\n\t}", "private function createHeaders($headers) {\r\n $html = '<tr class=\"ctable-headertag\">';\r\n foreach ($headers as $index => $header) {\r\n $html .= '<th>' . $header . '</th>';\r\n }\r\n $html .= '</tr>';\r\n return $html;\r\n\r\n }", "static function getDataForWeekView($records, $dayHeaders) {\n global $user;\n global $i18n;\n\n $dataArray = array();\n $includeNotes = $user->isOptionEnabled('week_notes');\n\n // Construct the first row for a brand new entry.\n $dataArray[] = array('row_id' => null,'label' => $i18n->get('form.week.new_entry').':'); // Insert row.\n // Insert empty cells with proper control ids.\n for ($i = 0; $i < 7; $i++) {\n $control_id = '0_'. $dayHeaders[$i];\n $dataArray[0][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'duration' => null);\n }\n if ($includeNotes) {\n // Construct the second row for daily comments for a brand new entry.\n $dataArray[] = array('row_id' => null,'label' => $i18n->get('label.notes').':'); // Insert row.\n // Insert empty cells with proper control ids.\n for ($i = 0; $i < 7; $i++) {\n $control_id = '1_'. $dayHeaders[$i];\n $dataArray[1][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'note' => null);\n }\n }\n\n // Iterate through records and build $dataArray cell by cell.\n foreach ($records as $record) {\n // Create row id without suffix.\n $row_id_no_suffix = ttWeekViewHelper::makeRowIdentifier($record);\n // Handle potential multiple records with the same attributes by using a numerical suffix.\n $suffix = 0;\n $row_id = $row_id_no_suffix.'_'.$suffix;\n $day_header = substr($record['date'], 8); // Day number in month.\n while (ttWeekViewHelper::cellExists($row_id, $day_header, $dataArray)) {\n $suffix++;\n $row_id = $row_id_no_suffix.'_'.$suffix;\n }\n // Find row.\n $pos = ttWeekViewHelper::findRow($row_id, $dataArray);\n if ($pos < 0) {\n // Insert row for durations.\n $dataArray[] = array('row_id' => $row_id,'label' => ttWeekViewHelper::makeRowLabel($record));\n $pos = ttWeekViewHelper::findRow($row_id, $dataArray);\n // Insert empty cells with proper control ids.\n for ($i = 0; $i < 7; $i++) {\n $control_id = $pos.'_'. $dayHeaders[$i];\n $dataArray[$pos][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'duration' => null);\n }\n // Insert row for comments.\n if ($includeNotes) {\n $dataArray[] = array('row_id' => $row_id.'_notes','label' => $i18n->get('label.notes').':');\n $pos++;\n // Insert empty cells with proper control ids.\n for ($i = 0; $i < 7; $i++) {\n $control_id = $pos.'_'. $dayHeaders[$i];\n $dataArray[$pos][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'note' => null);\n }\n $pos--;\n }\n }\n // Insert actual cell data from $record (one cell only).\n $dataArray[$pos][$day_header] = array('control_id' => $pos.'_'. $day_header, 'tt_log_id' => $record['id'],'duration' => $record['duration']);\n // Insert existing comment from $record into the comment cell.\n if ($includeNotes) {\n $pos++;\n $dataArray[$pos][$day_header] = array('control_id' => $pos.'_'. $day_header, 'tt_log_id' => $record['id'],'note' => $record['comment']);\n }\n }\n return $dataArray;\n }", "private function buildHeader()\n\t{\n\t\tif ($this->hide_header)\n\t\t\treturn;\n\n\t\techo '<thead><tr>';\n\n\t\t// Get field names of result\n\t\t$headers = $this->_db->fieldNameArray($this->result);\n\t\t$this->column_count = count($headers);\n\n\t\t// Add a blank column if the row number is to be shown\n\t\tif ($this->show_row_number)\n\t\t{\n\t\t\t$this->column_count++;\n\t\t\techo '<td class=\"tbl-header\">&nbsp;</td>';\n\t\t}\n\n\t\t// Show checkboxes\n\t\tif ($this->show_checkboxes)\n\t\t{\n\t\t\t$this->column_count++;\n\t\t\techo '<td class=\"tbl-header tbl-checkall\"><input type=\"checkbox\" name=\"checkall\" onclick=\"tblToggleCheckAll'.$this->_clsnumber.'()\"></td>';\n\t\t}\n\n\t\t// Loop through each header and output it\n\t\tforeach ($headers as $t)\n\t\t{\n\t\t\t// Skip column if hidden\n\t\t\tif (in_array($t, $this->hidden))\n\t\t\t{\n\t\t\t\t$this->column_count--;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Check for header caption overrides\n\t\t\tif (array_key_exists($t, $this->header))\n\t\t\t\t$header = $this->header[$t];\n\t\t\telse\n\t\t\t\t$header = $t;\n\n\t\t\tif ($this->hide_order)\n\t\t\t\techo '<td class=\"tbl-header\">' . $header; // Prevent the user from changing order\n\t\t\telse {\n\t\t\t\tif ($this->order and $this->order['Column'] == $t)\n\t\t\t\t\t$order = ($this->order['Order'] == self::ORDER_ASC)\n\t\t\t\t\t? self::ORDER_DESC\n\t\t\t\t\t: self::ORDER_ASC;\n\t\t\t\telse\n\t\t\t\t\t$order = self::ORDER_ASC;\n\n\t\t\t\techo '<td class=\"tbl-header\"><a href=\"javascript:;\" onclick=\"tblSetOrder'.$this->_clsnumber.'(\\'' . $t . '\\', \\'' . $order . '\\')\">' . $header . \"</a>\";\n\n\t\t\t\t// Show the user the order image if set\n\t\t\t\tif ($this->order and $this->order['Column'] == $t)\n\t\t\t\t\techo '&nbsp;<img src=\"images/sort_' . strtolower($this->order['Order']) . '.gif\" class=\"tbl-order\">';\n\t\t\t}\n\n\t\t\t// Add filters if allowed and only if the column type is not \"special\"\n\t\t\tif ($this->allow_filters and !empty($t)){\n\t\t\t\t\t\n\t\t\t\tif (!in_array($this->type[$t][0], array(\n\t\t\t\t\t\tself::TYPE_ARRAY,\n\t\t\t\t\t\tself::TYPE_IMAGE,\n\t\t\t\t\t\tself::TYPE_FUNCTION,\n\t\t\t\t\t\tself::TYPE_DATE,\n\t\t\t\t\t\tself::TYPE_CHECK,\n\t\t\t\t\t\tself::TYPE_CUSTOM,\n\t\t\t\t\t\tself::TYPE_PERCENT\n\t\t\t\t)))\n\t\t\t\t{\n\t\t\t\t\tif ($this->filter['Column'] == $t and !empty($this->filter['Value']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$filter_display = 'block';\n\t\t\t\t\t\t$filter_value = $this->filter['Value'];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$filter_display = 'none';\n\t\t\t\t\t\t$filter_value = '';\n\t\t\t\t\t}\n\t\t\t\t\techo '<a href=\"javascript:;\" onclick=\"tblShowHideFilter'. $this->_clsnumber .'(\\'' . $t . '\\')\"> filter </a>\n\t\t\t\t\t<br><div class=\"tbl-filter-box\" id=\"'.$this->_clsnumber.'filter-' . $t . '\" style=\"display:' . $filter_display . '\">\n\t\t\t\t\t<input type=\"text\" size=\"6\" id=\"'.$this->_clsnumber.'filter-value-' . $t . '\" value=\"'.$filter_value.'\">&nbsp;\n\t\t\t\t\t<a href=\"javascript:;\" onclick=\"tblSetFilter'.$this->_clsnumber.'(\\'' . $t . '\\')\">filter</a></div>';\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\n\t\t\techo '</td>';\n\t\t}\n\n\t\t// If we have controls, add a blank column\n\t\tif (count($this->controls) > 0)\n\t\t{\n\t\t\t$this->column_count++;\n\t\t\techo '<td class=\"tbl-header\">&nbsp;</td>';\n\t\t}\n\n\t\techo '</tr></thead>';\n\t}", "public static function getTableHeaderTitles( $array ) {\r\n\t\t$smarty = new Smarty();\r\n\t\t$smarty->assign( $_REQUEST );\r\n\r\n\t\t$titles = array();\r\n\r\n\t\tforeach( $array as $element ) {\r\n\t\t\tarray_push(\r\n\t\t\t\t$titles,\r\n\t\t\t\t$smarty->fetch( 'string:' . $element[ self::$KEY_TABLE_TITLE ] )\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\treturn $titles;\r\n\t}", "protected function getTableHeader() {\n $newDirection = ($this->sortDirection == 'asc') ? 'desc' : 'asc';\n\n $tableHeaderData = array(\n 'title' => array(\n 'link' => $this->getLink('title', ($this->sortField == 'title') ? $newDirection : $this->sortDirection),\n 'name' => 'Title',\n 'cssClass' => 'fa-sort-' . $this->sortDirection\n ),\n 'document_type' => array(\n 'link' => $this->getLink('type', $this->sortField == 'document_type' ? $newDirection : $this->sortDirection),\n 'name' => 'Type',\n 'cssClass' => 'fa-sort-' . $this->sortDirection\n ),\n 'date' => array(\n 'link' => $this->getLink('date', $this->sortField == 'date' ? $newDirection : $this->sortDirection),\n 'name' => 'Date',\n 'cssClass' => 'fa-sort-' . $this->sortDirection\n ),\n );\n\t\t\n // insert institution field in 3rd column, if this is search results\n if($this->uri == 'search') {\n $tableHeaderData = array_slice($tableHeaderData, 0, 2, true) +\n array('institution' => array(\n 'link' => $this->getLink('institution', $this->sortField == 'institution' ? $newDirection : $this->sortDirection),\n 'name' => 'Institution',\n 'cssClass' => 'fa-sort-' . $this->sortDirection\n )) +\n array_slice($tableHeaderData, 2, count($tableHeaderData)-2, true);\n }\n\t\t\n return $tableHeaderData;\n }", "private function headings() {\n\t\t$this->section_data['general_h_tags'] = array(\n\t\t\t'name' \t\t\t\t\t=> 'general_h_tags',\n\t\t\t'label' \t\t\t\t=> __( 'Headings', 'fixedtoc' ),\n\t\t\t'default' \t\t\t=> array( 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' ),\n\t\t\t'type' \t\t\t\t\t=> 'multi_checkbox',\n\t\t\t'choices'\t\t\t\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'h1' => 'Heading 1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'h2' => 'Heading 2',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'h3' => 'Heading 3',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'h4' => 'Heading 4',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'h5' => 'Heading 5',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'h6' => 'Heading 6',\n\t\t\t\t\t\t\t\t\t\t\t\t ),\n\t\t\t'des'\t\t\t\t\t\t=> __( 'Check which HTML headings automatically generated table of contents.', 'fixedtoc' )\n\t\t);\n\t}", "private function makeTableData(array $inputData)\n {\n // Empty template table elements.\n $td = new HtmlNode(kind: 'td');\n $th = new HtmlNode(kind: 'th');\n $span = new HtmlLeaf(kind: 'span');\n // Add dummy entries to fill last row\n $this->addDummyEntries($inputData);\n // Wrap top level nodes with table data or table header elements.\n $colCount = 1;\n $nodeCount = 1;\n $tableData = [];\n foreach ($inputData as $chunk) {\n $td_tmp = ($nodeCount <= $this->nCols & $this->enableHeaders)\n ? clone $th : clone $td;\n ++$nodeCount;\n // Check if input is of type htmlLeaf\n if ($chunk instanceof HtmlLeaf) {\n $td_tmp->appendChild($chunk);\n } else {\n $td_tmp->appendChild($span)->setContent(\"$chunk\");\n }\n\n // Reset $colCount at end of table row.\n $colCount = ($colCount == $this->nCols + 1) ? 1 : $colCount;\n // Style td and th\n $td_tmp->setAttributes(['class' => 'col' . $colCount]);\n $tableData[] = $td_tmp;\n ++$colCount;\n }\n return $tableData;\n }", "function getTable($array, $firstLineHeader = true, $lastLineFooter = true, $withTableStructure = true)\n{\n\t$ret = '';\n\n\t$rows = count($array);\n\t$cols = isset($array[0]) ? count($array[0]) : 0;\n\t$i = 0;\n\n\tif($firstLineHeader)\n\t{\n\t\t$ret .= '<tr class=\"tableHeaderRow\">';\n\t\tfor($j = 0; $j < $cols; $j++)\n\t\t{\n\t\t\tif($j == ($cols - 1))\n\t\t\t\t$ret .= '<td class=\"tableHeaderCellR\">';\n\t\t\telse if($j == 0)\n\t\t\t\t$ret .= '<td class=\"tableHeaderCellL\">';\n\t\t\telse\n\t\t\t\t$ret .= '<td class=\"tableHeaderCell\">';\n\n\t\t\t$ret .= $array[$i][$j] . '</td>' . \"\\n\";\n\t\t}\n\t\t$ret .= '</tr>' . \"\\n\";\n\n\t\t$i++;\n\t}\n\n\tfor(; $i < $rows; $i++)\n\t{\n\t\t$ret .= '<tr class=\"tableRow\">';\n\t\tfor($j = 0; $j < $cols; $j++)\n\t\t{\n\t\t\tif($j == ($cols - 1))\n\t\t\t{\n\t\t\t\tif($i == ($rows - 1) && $lastLineFooter)\n\t\t\t\t\t$ret .= '<td class=\"tableCellBR\">';\n\t\t\t\telse if($i == 0)\n\t\t\t\t\t$ret .= '<td class=\"tableCellTR\">';\n\t\t\t\telse\n\t\t\t\t\t$ret .= '<td class=\"tableCellR\">';\n\t\t\t}\n\t\t\telse if($j == 0)\n\t\t\t{\n\t\t\t\tif($i == ($rows - 1) && $lastLineFooter)\n\t\t\t\t\t$ret .= '<td class=\"tableCellBL\">';\n\t\t\t\telse if($i == 0)\n\t\t\t\t\t$ret .= '<td class=\"tableCellTL\">';\n\t\t\t\telse\n\t\t\t\t\t$ret .= '<td class=\"tableCellL\">';\n\t\t\t}\n\t\t\telse if($i == ($rows - 1) && $lastLineFooter)\n\t\t\t\t$ret .= '<td class=\"tableCellB\">';\n\t\t\telse if($i == 0)\n\t\t\t\t$ret .= '<td class=\"tableCellT\">';\n\t\t\telse\n\t\t\t\t$ret .= '<td class=\"tableCell\">';\n\n\t\t\t$ret .= $array[$i][$j] . '</td>' . \"\\n\";\n\t\t}\n\t\t$ret .= '</tr>' . \"\\n\";\n\t}\n\n\tif($withTableStructure)\n\t\t$ret = '<p/><table class=\"tableMain\">' . $ret . '</table>';\n\n\treturn $ret;\n}", "public function createHeader($columns)\n {\n $html = \"<tr>\";\n\n \n foreach ($columns as $column) {\n $html .= \"<th>\".$column['label'].\"</th>\";\n }\n $html .= \"</tr>\";\n return $html; \n }", "function TuesdayColumnHeader() {\n\t\tif (func_num_args()) {\n\t\t\t$this->_TuesdayColumnHeader = trim(func_get_arg(0));\n\t\t}\n\t\telse return $this->_TuesdayColumnHeader;\n\t}", "private function renderSectionHeadings() {\n\t\t$headings = array();\n\t\t$separator = $this->getSubpart('HEADING_SEPARATOR');\n\n\t\tforeach ($this->sections as $key => $section) {\n\t\t\t$class = ($key == 0) ? 'tx-explanationbox-pi1-active' : 'tx-explanationbox-pi1-inactive';\n\n\t\t\t$this->setMarker('class_heading', $class);\n\t\t\t$this->setMarker('heading_number', $key);\n\t\t\t$this->setMarker('heading', htmlspecialchars($section['title']));\n\t\t\t$headings[] = $this->getSubpart('SINGLE_HEADING');\n\t\t}\n\n\t\tif (count($this->sections) > 1) {\n\t\t\t$this->setMarker('class_rightarrow', 'tx-explanationbox-pi1-active');\n\t\t} else {\n\t\t\t$this->setMarker('class_rightarrow', 'tx-explanationbox-pi1-inactive');\n\t\t}\n\n\t\t$this->setMarker('number_of_sections', count($this->sections));\n\t\t$this->setSubpart('SECTION_HEADINGS', implode($separator, $headings));\n\t}", "public function headings(): array\n {\n return [\n 'Name',\n 'Department',\n 'OT Date',\n 'Shift',\n 'From',\n 'To',\n 'Total Hrs',\n 'Job Content',\n 'Results',\n 'Supervisor',\n 'Manager',\n 'Date Created',\n 'Last Update'\n ];\n }", "function daySearch($sql){ // Search Function\n include(\"connection.php\");\n \n // Setting 'Today'\n date_default_timezone_set('EST');\n $today = date(\"l\"); // Integer Representing Today\n \n global $dayArray; // Must declare to use outside var's\n global $dayString;\n echo \"<div id='tableContainer' class='tableContainer'>\";\n echo \"<table class='scrollTable'>\";\n echo \"<thead class='fixedHeader'>\n <tr class='headerWrap animated fadeInUp'>\n <th class='headerLocation'>Location</th>\";\n \n // Create the headers for each day selected\n for ($j = 0; $j < count($dayArray); $j++){\n if ($dayArray[$j] == $today){\n echo \"<th class='headerDay today'>\" . $dayArray[$j] . \"</th>\";\n }\n else {\n echo \"<th class='headerDay'>\" . $dayArray[$j] . \"</th>\";\n }\n }\n echo \"</thead>\";\n echo \"</tr>\";\n echo \"<tbody class='scrollContent'>\"; \n \n // Query Database \n $result = $mysqli->query($sql); \n $array = array();\n $odd = true;\n \n while($row = mysqli_fetch_assoc($result)){ \n $array[] = $row;\n };\n\n if ($result->num_rows !=0){\n \n for ($i = 0; $i < count($array); $i++){\n //echo ($array['deal']);\n // Creating Odd and Even Classes\n if ($odd == true){\n echo \"<tr class='odd animated flipInX'>\";\n \n } else {\n echo \"<tr class='even animated flipInX'>\";\n } // End Odd & Even\n \n echo \"<td class='location'>\" . $array[$i]['location'] . \"<hr class='locLine'>\n <a href=\" . $array[$i]['url'] . \"><img src='Images/locations/\" . $array[$i]['location'] . \".png' class='locIcon'></a>\n </td>\";\n \n // For Loop for Each Day Chosen\n for ($j = 0; $j < count($dayArray) - 1; $j++){\n \n echo \"<td class='deal'>\" . $array[$i]['deal'] . \"</td>\";\n $i++;\n } // For Loop\n \n echo \"<td class='deal'>\" . $array[$i]['deal'] . \"</td>\";\n\n echo \"</tr>\";\n \n $odd = !$odd;\n };\n echo \"</tbody>\";\n echo \"</table>\"; \n echo \"</div>\";\n } // If Results != 0\n \n else {\n // Format as Image Later //\n echo \"<img src='Images/noResults.png' class='noResults animated flipInX'>\";\n } \n}", "function generateTable($widths, $headers, $values)\n{\n\t$theTable = \"<table width=\\\"100%\\\">\\n\";\n\t$theTable = $theTable . \"<tr>\"; \n\n\t$table_column_width = \"\";\n\t$rowcounter = 0;\n\n\tforeach ( $headers as $table_cell )\n\t{ \n\t\tif ($widths != null)\n\t\t{\n\t\t\t$table_column_width = \" width=\\\"\".$widths[$rowcounter].\"\\\"\";\n\t\t}\n\n\t\t$theTable = $theTable . \"<th class=\\\"tdHeader\\\"\".$table_column_width.\">$table_cell</th>\";\n\t\t$rowcounter++;\n\t} \n\n\t$theTable = $theTable . \"</tr>\\n\\t<tr>\";\n\n\t$count = count( $headers );\n\t$rowcounter = 0;\n\t$table_odd = \"1\";\n\n\tforeach ( $values as $table_value )\n\t{\n\t\tif ($rowcounter == $count) \n\t\t{\n\t\t\t$theTable = $theTable . \"</tr>\\n<tr>\";\n\t\t\t$rowcounter = 0;\n\t\t\tif ($table_odd == \"1\") \n\t\t\t{\n\t\t\t\t$table_odd = \"0\";\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$table_odd = \"1\";\n\t\t\t}\n\t\t}\n\t\tif ($table_odd == \"1\") \n\t\t{\n\t\t\t$table_class = \"tdOdd\";\n\t\t} else\n\t\t{\n\t\t\t$table_class = \"tdEven\";\n\t\t}\n\n\t\t$theTable = $theTable . \"<td class=\\\"$table_class\\\" valign=\\\"top\\\">$table_value</td>\";\n\t\t$rowcounter++;\n\t}\n\t$theTable = $theTable . (\"</tr>\\n</table>\\n\");\n\treturn $theTable;\n}", "protected function generateTtContentDataArray(array $rowArray)\n {\n if (empty($this->tt_contentData)) {\n $this->tt_contentData = [\n 'nextThree' => [],\n 'next' => [],\n 'prev' => [],\n ];\n }\n foreach ($rowArray as $key => $value) {\n // Create the list of the next three ids (for editing links...)\n for ($i = 0; $i < $this->nextThree; $i++) {\n if (isset($rowArray[$key - $i])\n && !GeneralUtility::inList($this->tt_contentData['nextThree'][$rowArray[$key - $i]['uid']], $value['uid'])\n ) {\n $this->tt_contentData['nextThree'][$rowArray[$key - $i]['uid']] .= $value['uid'] . ',';\n }\n }\n\n // Create information for next and previous content elements\n if (isset($rowArray[$key - 1])) {\n if (isset($rowArray[$key - 2])) {\n $this->tt_contentData['prev'][$value['uid']] = -$rowArray[$key - 2]['uid'];\n } else {\n $this->tt_contentData['prev'][$value['uid']] = $value['pid'];\n }\n $this->tt_contentData['next'][$rowArray[$key - 1]['uid']] = -$value['uid'];\n }\n }\n }", "public function drawHTML()\n\t{\n\t\t$this->calWeekDays .= \"<table border=\\\"1\\\">\\n\";\n\t\t$this->makeCalendarTitle();\n\t\t$this->makeCalendarHead();\n\t\t$this->makeDayHeadings();\n\t\t$this->calWeekDays .= \"\\t<tr>\\n\";\n\t\t$this->startMonthSpacers();\n\t\t$this->makeHTMLIterator();\n\t\t$this->endMonthSpacers();\n\t\t$this->calWeekDays .= \"\\t</tr>\\n\";\n\t\t$this->calWeekDays .= \"</table>\\n\";\n\t\t\n\t\techo $this->calWeekDays;\n\t}", "public static function build_table( $db_array ) {\n\n $display = self::formhead();\n \tforeach ( $db_array[0] as $column => $field ) {\n \t\t$display .= \"<th class='cell100 column1'>$column</th>\\n\";\n \t}\n \t$display .= \"</tr></thead></table></div>\\n\";\n $display .= \"<div class='table100-body '><table><tbody>\" ;\n \tforeach ( $db_array as $record ) {\n \t\t$display .= \"<tr class='row100 body'>\\n\";\n \t\tforeach ( $record as $field ) {\n \t\t\t$display .= \"<td class='cell100 column1'>$field</td>\\n\";\n \t\t}\n \t\t$display .= \"</tr>\\n\";\n \t}\n\n \t$display .= \"</tbody></table>\\n\";\n $display .= \"</div></div>\\n\";\n \t\n \treturn $display;\n }", "public function calendarStyleDayData($day, $dayArray) {\n /**\n * DayDataArray\n */\n $dayDataArray = array (\n \"Sun\" => 1,\n \"Mon\" => 2,\n \"Tue\" => 3,\n \"Wed\" => 4,\n \"Thu\" => 5,\n \"Fri\" => 6,\n \"Sat\" => 7\n );\n /**\n * check the day array data is available in $day\n */\n if (in_array ( $day, $dayArray )) {\n return $dayDataArray [$day];\n }\n }", "function makeHTMLTable($array){\n\t\t // start table\n\t\t $html = '<table>';\n\t\t // header row\n\t\t $html .= '<tr>';\n\t\t // foreach($array[0] as $key=>$value){\n\t\t // $html .= '<th>' . htmlspecialchars($key) . '</th>';\n\t\t // }\n\t\t // $html .= '</tr>';\n\t\t // data rows\n\t\t foreach( $array as $key=>$value){\n\t\t $html .= '<tr>';\n\t\t foreach($value as $key2=>$value2){\n\t\t $html .= '<td>' . htmlspecialchars($value2) . '</td>';\n\t\t }\n\t\t $html .= '</tr>';\n\t\t }\n\t\t // finish table and return it\n\t\t $html .= '</table>';\n\t\t return $html;\n\t\t\t}", "public static function arrayFill($firstDay, $array, $lastDay)\n {\n //taking count variable to fill the array\n $count = 1;\n for ($i = $firstDay; $i < 7; $i++) \n {\n //filling first line\n $array[0][$i] = $count++;\n }\n for ($i = 1; $i < 6; $i++) \n {\n //filling remaining lines\n for ($j = 0; $j < 7 && $count <= $lastDay; $j++) \n {\n $array[$i][$j] = $count++;\n }\n }\n return $array;\n }", "function table_table_header_row($values)\n{\n\t$cells=new ocp_tempcode();\n\tforeach ($values as $value)\n\t{\n\t\t$cells->attach(do_template('TABLE_TABLE_HEADER_ROW_CELL',array('_GUID'=>'5002f54ccddf7259f3460d8c0759fd1a','VALUE'=>$value)));\n\t}\n\n\treturn do_template('TABLE_TABLE_HEADER_ROW',array('_GUID'=>'2f4095b8d30f50f34fdd6acf8dd566b1','CELLS'=>$cells));\n}", "private static function mapdates($weekDaysArray){\n \n return array_map(\n function($day) {\n static $weekDaysMap = ['Saturday', 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'];\n return $weekDaysMap[(int) $day];\n }, $weekDaysArray);\n }", "public function buildHeader() {\n return [\n ['data' => t('Teaching format'), 'class' => ['align-middle']],\n ['data' => t('Event'), 'class' => ['align-middle']],\n ['data' => t('Tutor'), 'class' => ['align-middle']],\n ['data' => t('Location'), 'class' => ['align-middle']],\n ['data' => t('Room'), 'class' => ['align-middle']],\n [\n 'data' => t('Date/time'),\n 'field' => 'time.field_event_time_value',\n 'sort' => 'desc',\n 'class' => ['align-middle'],\n ],\n ['data' => t('Registration status'), 'class' => ['align-middle']],\n ];\n }", "private function addColumnsFromArray($array)\n {\n foreach ($array as $key => $value)\n if (is_int($key))\n $this->addColumn($value);\n else\n $this->addColumn($key, $value);\n }", "public static function excelMigrationHeadings()\n {\n return [\n 'Occupation/Job Title',\n 'Region',\n 'Industry',\n ];\n }", "private function formatTable (array $detectedFiles) : array\n {\n $rows = [];\n\n foreach ($detectedFiles as $type => $data)\n {\n $rows[] = [\n \"<fg=yellow>{$type}</>\",\n $data[\"fileName\"],\n $data[\"digest\"],\n ];\n }\n\n return $rows;\n }", "private function getHeaders(){\n\t\t$thead=\"\";\n\t\tif(!empty($this->headers)){\n\t\t\t$thead=\"<thead>\";\n\t\t\t$thead.=\"<tr>\";\n\t\t\t$headerNumber=0;\n\t\t\t$fieldNumber=0;\n\t\t\t$count=count($this->headers)-1;\n\t\t\t\n\t\t\t//Busca si hay columnas anteriores a agregar\n\t\t\tif(!empty($this->prependedCols)){\n\t\t\t\tforeach($this->prependedCols as $col){\n\t\t\t\t\t$thead.=\"<th>{$col[\"header\"]}</th>\";\n\t\t\t\t\t$headerNumber++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Busca las columnas declaradas\n\t\t\tforeach($this->headers as $name){\n\t\t\t\tif($this->headerSortable){\n\t\t\t\t\tif($this->order!==\"\"&&!empty($this->order)){\n\t\t\t\t\t\t$order=explode('|',$this->order);\n\t\t\t\t\t\tif(is_array($order)&&$fieldNumber==$order[0]){\n\t\t\t\t\t\t\t$classSortable=\"velkan-grid-column-header velkan-grid-column-header-sorted-\".$order[1];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$classSortable=\"velkan-grid-column-header velkan-grid-column-header-sorted-both\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$classSortable=\"velkan-grid-column-header velkan-grid-column-header-sorted-both\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$thead.=\"<th {$this->id}-column-header class=\\\"$classSortable\\\" onclick=\\\"javascript:{$this->id}Reorder($fieldNumber);\\\" {$this->id}_field_number=\\\"$fieldNumber\\\">$name</th>\";\n\t\t\t\t}else{\n\t\t\t\t\t$thead.=\"<th {$this->id}-column-header>$name</th>\";\n\t\t\t\t}\n\t\t\t\t$fieldNumber++;\n\t\t\t\t$headerNumber++;\n\t\t\t}\n\t\t\t\n\t\t\t//Busca si hay columnas posteriores a agregar\n\t\t\tif(!empty($this->appendedCols)){\n\t\t\t\tforeach($this->appendedCols as $col){\n\t\t\t\t\t$thead.=\"<th>{$col[\"header\"]}</th>\";\n\t\t\t\t\t$headerNumber++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$thead.=\"</tr>\";\n\t\t\t\n\t\t\t//Guardamos el numero total de columnas\n\t\t\t$this->cols=$headerNumber;\n\t\t\t\n\t\t\t\n\t\t\t$tfilter=\"\";\n\t\t\t$type=\"\";\n\t\t\tif($this->headerFilterable){\n\t\t\t\t$cols=count($this->fields)-1;\n\t\t\t\t\n\t\t\t\tfor($i=0;$i<=$cols;$i++){\n\t\t\t\t\t$meClass=velkan::$config[\"datagrid\"][\"filters\"][\"inputClass\"];\n\t\t\t\t\t\n\t\t\t\t\t$type=\"\";\n\t\t\t\t\tif(!empty($this->types)){\n\t\t\t\t\t\t$type=$this->types[$i];\n\t\t\t\t\t}\n\t\t\t\t\t$value=\"\";\n\t\t\t\t\tif(!empty($this->filters)){\n\t\t\t\t\t\tforeach($this->filters as $filter){\n\t\t\t\t\t\t\tif($filter[0]==$i){\n\t\t\t\t\t\t\t\t$value=$filter[1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$tfilter.=\"<th class='velkan-grid-column-filter'>\";\n\t\t\t\t\t\n\t\t\t\t\tswitch($type){\n\t\t\t\t\t\tcase \"date\":\n\t\t\t\t\t\t\t$input=new date_time(array(\"id\"=>\"grid{$this->id}Filter\",\"name\"=>\"grid{$this->id}Filter[]\",\"value\"=>$value,\"pickerType\"=>date_time::$DATETIME_PICKER_TYPE_DATE));\n\t\t\t\t\t\t\t$tfilter.=$input->render(true);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"datetime\":\n\t\t\t\t\t\t\t$input=new date_time(array(\"id\"=>\"grid{$this->id}Filter\",\"name\"=>\"grid{$this->id}Filter[]\",\"value\"=>$value,\"pickerType\"=>date_time::$DATETIME_PICKER_TYPE_DATETIME));\n\t\t\t\t\t\t\t$tfilter.=$input->render(true);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"time\":\n\t\t\t\t\t\t\t$input=new date_time(array(\"id\"=>\"grid{$this->id}Filter\",\"name\"=>\"grid{$this->id}Filter[]\",\"value\"=>$value,\"pickerType\"=>date_time::$DATETIME_PICKER_TYPE_TIME));\n\t\t\t\t\t\t\t$tfilter.=$input->render(true);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$tfilter.=\"<input type='search' name='grid{$this->id}Filter[]' $type value=\\\"$value\\\">\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t$tfilter.=\"</th>\";\n\t\t\t\t}\n\t\t\t\t$display=($this->ShowFilters?\"\":\"style='display:none'\");\n\t\t\t\t\n\t\t\t\t$filterPrepend=\"\";\n\t\t\t\tif(!empty($this->prependedCols)){\n\t\t\t\t\tforeach($this->prependedCols as $col){\n\t\t\t\t\t\t$filterPrepend.=\"<th>&nbsp;</th>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$filterAppend=\"\";\n\t\t\t\tif(!empty($this->appendedCols)){\n\t\t\t\t\tforeach($this->appendedCols as $col){\n\t\t\t\t\t\t$filterAppend.=\"<th>&nbsp;</th>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$tfilter=\"<tr id='grid{$this->id}Filters' $display>{$filterPrepend}{$tfilter}{$filterAppend}</tr>\";\n\t\t\t}\n\t\t\t\n\t\t\tif($type!=\"\"){\n\t\t\t\t$jss=new generalJavaScriptFunction();\n\t\t\t\t$jss->registerFunction(\"applyFormats\");\n\t\t\t}\n\t\t\t\n\t\t\t$thead.=\"$tfilter</thead>\";\n\t\t}\n\t\t\n\t\treturn $thead;\n\t}", "function MakeCalendarGrid(){\n //get our days\n $intMonthDays = cal_days_in_month(CAL_GREGORIAN, $this->intMonth, $this->intYear);\n $intDayCounter = 0;\n $arrMonthAttributes = array('colspan'=>'7');\n //make our parent calendar table\n $objCalendarParent = $this->objCalendar->AddChildNode($this->objCalendar->objHTML,'', 'table');\n //let's make our header\n $objHeaderRow = $this->objCalendar->AddChildNode($objCalendarParent,'', 'tr');\n //establish our base attributes\n for($intWeekDay=0;$intWeekDay<7;$intWeekDay++){\n $strDay = date('l', strtotime(\"Sunday +{$intWeekDay} days\"));\n $this->objCalendar->AddChildNode($objHeaderRow,$strDay, 'th',array('class'=>'weekday'));\n }\n //get the starting date\n $intMonthStart = date('N', strtotime($this->intYear.'-'.$this->intMonth.'-1'));\n $intMonthStart++;\n //avoid empty rows\n if($intMonthStart == 8)\n $intMonthStart = 1;\n //make our days now\n for($intDay=1;$intDay<($intMonthDays + $intMonthStart);$intDay++){\n $arrDateAttributes = array('onclick'=>'SelectDay(this);');\n if($intDayCounter === 0){\n //make our new week\n $objWeekRow = $this->objCalendar->AddChildNode($objCalendarParent,'', 'tr');\n $arrDateAttributes['class'] = 'calendarday weekend';\n }\n else if($intDayCounter === 6)\n $arrDateAttributes['class'] = 'calendarday weekend';\n else if($intDay == date('j'))\n $arrDateAttributes['class'] = 'calendarday today';\n else\n $arrDateAttributes['class'] = 'calendarday weekday';\n $intDayCounter++;\n //reset our week now\n if($intDayCounter == 7)\n $intDayCounter = 0;\n if($intDay < $intMonthStart){\n unset($arrDateAttributes['onclick']);\n $this->objCalendar->AddChildNode($objWeekRow,'&nbsp;', 'td',$arrDateAttributes);\n continue 1;\n }\n $arrDateAttributes['id'] = ($intDay - ($intMonthStart - 1)).'-'.$this->arrCalendarProperties['calendarid'];\n //make our day now\n $this->objCalendar->AddChildNode($objWeekRow,($intDay - ($intMonthStart - 1)), 'td',$arrDateAttributes);\n }\n return TRUE;\n }", "function make_columns($array = array(), $col_limit = 0)\n\t{\n\t\tif ( ! is_array($array) OR count($array) == 0)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t// Turn off the auto-heading feature since it's doubtful we\n\t\t// will want headings from a one-dimensional array\n\t\t$this->auto_heading = FALSE;\n\n\t\tif ($col_limit == 0)\n\t\t{\n\t\t\treturn $array;\n\t\t}\n\n\t\t$new = array();\n\t\twhile(count($array) > 0)\n\t\t{\n\t\t\t$temp = array_splice($array, 0, $col_limit);\n\n\t\t\tif (count($temp) < $col_limit)\n\t\t\t{\n\t\t\t\tfor ($i = count($temp); $i < $col_limit; $i++)\n\t\t\t\t{\n\t\t\t\t\t$temp[] = '&nbsp;';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$new[] = $temp;\n\t\t}\n\n\t\treturn $new;\n\t}", "public static function excelDivisionsHeadings()\n {\n return [\n 'Divisions',\n 'Sub-Divisions',\n ];\n }", "protected function makeHeader(array $lines): array\n {\n return [\n 'ID' => $lines[0][0],\n 'State' => $lines[0][1],\n 'Output' => $lines[0][2],\n 'E-Level' => $lines[0][3],\n 'Times' => $lines[0][4],\n 'Command' => $lines[0][5],\n ];\n }", "function add_essays_data_columns( $cols ) {\n\n\t$cols_new = array();\n\t\n\tforeach( $cols as $col_key => $col_label ) {\n\t\tif ($col_key == 'title') {\n\t\t\t$cols_new[$col_key] = esc_html__( 'Essay Question Title', 'learndash' );\n\t\t} else if ($col_key == 'author') {\n\t\t\t$cols_new[$col_key] \t\t\t= esc_html__( 'Submitted By', 'learndash' );\n\t\t\t\n\t\t\t// We add all out own columns after 'author' \n\t\t\t$cols_new['approval_status'] \t= esc_html__('Status', 'learndash' );\n\t\t\t$cols_new['approval_points'] \t= esc_html__('Points', 'learndash' );\n\t\t\t$cols_new['course'] \t\t\t= \tsprintf( esc_html_x( 'Assigned %s', 'Assigned Course Label', 'learndash' ), LearnDash_Custom_Label::get_label( 'course' ) );\n\t\t\t$cols_new['lesson'] \t\t\t= \tsprintf( esc_html_x( 'Assigned %s', 'Assigned Lesson', 'learndash' ), LearnDash_Custom_Label::get_label( 'lesson' ) );\n\t\t\t$cols_new['quiz']\t\t\t\t= \tsprintf( esc_html_x( 'Assigned %s', 'Assigned Quiz', 'learndash' ), LearnDash_Custom_Label::get_label( 'quiz' ) );\n\n\t\t} else {\n\t\t\t$cols_new[$col_key] = $col_label;\n\t\t}\n\t}\n\treturn $cols_new;\n}", "function SundayColumnHeader() {\n\t\tif (func_num_args()) {\n\t\t\t$this->_SundayColumnHeader = trim(func_get_arg(0));\n\t\t}\n\t\telse return $this->_SundayColumnHeader;\n\t}", "public function setDayLabels($array)\n {\n # Error check\n if (count($array) != 7) {\n return;\n }\n # set\n $this->dayLabels = $array;\n # return Calendar instance\n return $this;\n }", "private function makeDayEventListHTML()\n\t{\n\t\t$showtext = \"\";\n\t\tforeach($this->eventItems as $item) {\n\t\t\tif($item['date'] == $this->curYear.'-'.$this->curMonth.'-'.$this->dayOfMonth) {\n\t\t\t\t$category = (strlen($item['cat']) > 0 ? 'Category: '.$item['cat'].' - ' : '');\n\t\t\t\t$outevents[$n]['category'] = $item['cat'];\n\t\t\t\t\n\t\t\t\tif($item['stdurl']) {\n\t\t\t\t\t$href = '<a href=\"'.$item['url'].'?id='.$item['id'].'\" title=\"'.$category.$item['desc'].'\">'.$item['text'].'</a>';\n\t\t\t\t\t$outevents[$n]['url'] = $item['url'].'?id='.$item['id'];\n\t\t\t\t} else {\n\t\t\t\t\t$href = (strlen($item['url']) > 0 ? '<a href=\"'.$item['url'].'\" title=\"'.$category.$item['desc'].'\">'.$item['text'].'</a>' : $item['text']);\n\t\t\t\t\t$outevents[$n]['url'] = $item['url'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$style = (strlen($item['catcolor']) > 0 ? ' style=\"background-color:#'.str_replace('#','',$item['catcolor']).';\" ' : ' style=\"background-color:#eeeeee;\" ');\n\t\t\t\t\n\t\t\t\t$showtext .= \"\\n\\t\\t\\t<div class=\\\"dayContent\\\"\".$style.\">\".$href.\"</div>\\n\\t\\t\";\n\t\t\t\t\n\t\t\t\t$outevents[$n]['summary'] = $item['text'];\n\t\t\t\t$outevents[$n]['description'] = $item['desc'];\n\t\t\t\t$outevents[$n]['categorycolor'] = (strlen($item['catcolor']) > 0 ? str_replace('#','',$item['catcolor']) : '#eeeeee');\n\t\t\t}\n\t\t\t$n++;\n\t\t}\n\t\treturn $showtext;\n\t}", "function dt($arr, $additional = TRUE, $return = FALSE, $colorColumns = array(), $conditions = array(), $bgColor = \"\", $id = \"\")\n {\n $output = \"\";\n $screenClass = \"\";\n\n if ($bgColor !== \"\") {\n if (strpos($bgColor, \"#\") !== 0) {\n $bgColor = \"#\" . $bgColor;\n }\n $bgColor = \"background-color:{$bgColor};\";\n $screenClass = \"class=\\\"screen\\\"\";\n } else {\n $bgColor = \"background-color:whitesmoke;\";\n }\n\n $output .= \"\\n<div style=\\\"border:1px solid #ccc;padding:6px;\" .\n \"margin:10px;font:14px Arial !important;\" .\n \"display:block;border-radius:4px;overflow:auto;{$bgColor}\\\">\\n\";\n\n if (!is_array($arr))\n return 0;\n\n if (count($arr) <= 0)\n return 0;\n\n\n if ($id == \"\") {\n $id = \"t\" . rand(100000, 999999);\n }\n $output .= \"<table id=\\\"$id\\\" style=\\\"margin: 16px 0px;border-collapse: collapse;border:solid 1px #CCC;font:12px Arial !important;\\\" {$screenClass}>\";\n $counter = 0;\n\n if ($additional) {\n\n $array = (array)current($arr);\n $names = array(\"#\");\n foreach ($array as $k => $v) {\n $names[] = $k;\n }\n\n foreach ($names as $a) {\n $output .= \"<td style=\\\"border-collapse: collapse;border:solid 1px #CCC;padding:2px;color:#999\\\"><b>{$a}</b></td>\";\n }\n }\n\n $row = 0;\n foreach ($arr as $a) {\n $row++;\n $array = (array)$a;\n $counter++;\n $output .= '<tr>';\n\n if ($additional)\n $output .= \"<td style=\\\"border-collapse: collapse;border:solid 1px #CCC;padding:2px;color:#999\\\">{$counter}</td>\";\n $col = 0;\n foreach ($array as $item) {\n $col++;\n if (is_object($item)) {\n $item = \"[OBJECT]\";\n }\n\n $add_style = \"\";\n if (count($colorColumns) > 0) {\n $ok = true;\n if (isset($conditions[$col])) {\n $condition = str_replace(\"{value}\", (string)$item, $conditions[$col]);\n $ok = eval($condition);\n }\n if (in_array($col, $colorColumns) && $ok) {\n $cols = str_to_color((string)$item);\n $add_style = \"color:{$cols[\"f\"]};background-color:{$cols[\"b\"]};\";\n }\n }\n if (is_array($item)) {\n $item = \"<pre>\" . json_encode($item, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) . \"</pre>\";\n }\n $output .= \"<td style=\\\"border-collapse: collapse;border:solid 1px #CCC;padding:2px;{$add_style}\\\">{$item}</td>\";\n }\n $output .= '</tr>';\n }\n\n $output .= '</table>';\n $output .= \"</div>\";\n\n if (!$return)\n echo($output);\n\n return $output;\n }", "function pgm_list_column_headers($columns){\n $columns = array(\n 'cb'=>'<input type=\"checkbox\" />', //checkbox-HTML empty checkbox\n 'title'=>__('Lists'), //update header name to 'List Name'\n 'shortcode'=>__('Shortcode'),\n );\n\n return $columns;\n}", "public static function calenderStack($totalDays,$firstDay)\n {\n \n //taking two stack one for weekdays and one for date\n $weekdaysStack = new StackLinkedList();\n $dateStack = new StackLinkedList();\n $array = array(\"Sun\", \"Mon\", \"Tue\", \"Wen\", \"Thu\", \"Fri\", \"sat\");\n \n //storing days in weekdays Stack\n for($i=count($array);$i>=0;$i--)\n {\n $weekdaysStack->push($array[$i]);\n }\n //storing dates in date Stack\n for( $i=$totalDays;$i>=1;$i--)\n {\n $dateStack->push($i);\n }\n //printing the days\n for($i=0;$i<count($array);$i++)\n {\n echo $weekdaysStack->pop().\" \";\n }\n echo \"\\n\";\n //printing space till the start date of calender \n for ($i=0;$i<($firstDay*5);$i++)\n {\n echo \" \";\n }\n //printing the dates according to row\n for($i=1;$i<=$totalDays;$i++)\n {\n if($i<10)\n {\n echo(\" \".$dateStack->pop().\" \");\n }\n if($i>9)\n {\n echo(\"\".$dateStack->pop().\" \");\n }\n if((($firstDay+$i)%7) ==0)\n {\n echo \" \\n\";\n }\n }\n }", "public function makeTable($headings, $content);", "function tabla01($array01){\n\t$i = '0';\n\t$array02[$i++] = \"<table id=\\\"one-column-emphasis\\\" >\\n\n <colgroup>\\n\n \t<col class=\\\"oce-first\\\" />\\n\n </colgroup>\\n\n <tbody>\\n\";\n\tforeach( $array01 as $key => $value){\n\t\t$array02[$i++] = \"<tr><td>\".$key.\"</td><td>\".$value.\"</td></tr>\\n\";\n\t}\n\t$array02[$i++] = \"</tbody>\\n</table>\\n\";\n\treturn $array02;\n/*\n<table id=\\\"one-column-emphasis\\\" >\n <colgroup>\n \t<col class=\\\"oce-first\\\" />\n </colgroup>\n <tbody>\n \t<tr>\n \t<td></td>\n </tr>\n </tbody>\n</table>\n*/\n}", "public function header($Arr_Labels=false)\n\t{\n\t\t$this->Arr_Labels = $Arr_Labels;\n\n $Int_Column = 0;\n if ($Arr_Labels)\n {\n\t foreach ($Arr_Labels as $Str_Field => $Str_Label)\n\t\t\t{\n $Str_Column = $Str_Label;\n $this->Obj_Doc->getActiveSheet()->setCellValueByColumnAndRow($Int_Column, 1, $Str_Column);\n\t\t\t\t$Int_Column++;\n\t }\n\t\t}\n\t\telseif (isset($this->Arr_Data[0]))\n\t\t{\n\t foreach ($this->Arr_Data[0] as $Str_Field => $Str_Label)\n\t\t\t{\n\t\t\t\t$Int_Column++;\n $Str_Column = Inflector::humanize($Str_Field);\n $this->Obj_Doc->getActiveSheet()->setCellValueByColumnAndRow($Int_Column, 1, $Str_Column);\n\t }\n\t\t}\n\n\t\t//Set the worksheet styles.\n $this->Obj_Doc->getActiveSheet()->getStyle('A1')->getFont()->setBold(true);\n //$this->Obj_Doc->getActiveSheet()->getStyle('A1')->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID);\n //$this->Obj_Doc->getActiveSheet()->getStyle('A1')->getFill()->getStartColor()->setRGB('ffffff');\n $this->Obj_Doc->getActiveSheet()->duplicateStyle( $this->Obj_Doc->getActiveSheet()->getStyle('A1'), 'B1:'.$this->Obj_Doc->getActiveSheet()->getHighestColumn().'1');\n\n\t\tfor ($i = 1; $i <= $Int_Column; $i++)\n\t\t{\n $this->Obj_Doc->getActiveSheet()->getColumnDimension(PHPExcel_Cell::stringFromColumnIndex($i))->setAutoSize(true);\n }\n\n\t\treturn $this;\n\t}", "public function createGridDataHorizontalDates()\n {\n $aPeriods = $this->getGridDataPeriods();\n $aLevels = $this->getGridDataLevels();\n if (empty($aPeriods) || empty($aLevels)) {\n $this->aErrors[] = 'No period or level data provided';\n\n return false;\n }\n $aAllPeriodLevels = $this->getAllGridDataPeriodLevels($aPeriods, $aLevels);\n ?>\n <table id=\"dimension_table\" border=\"1\" class=\"dim_table\">\n <tbody><tr><th></th>\n <?php\n foreach ($aPeriods as $nPeriodId => $aPeriod) {\n echo \"<th>{$aPeriod['period_name_x_axis']}</th>\\n\";\n }\n ?>\n </tr></tbody>\n <?php\n foreach ($aLevels as $nLevelId => $aLevel) {\n $nLevelId = $aLevel['id'];\n echo \"<tr>\\n\";\n ?>\n <td>\n <?php\n if (!empty($aLevel['link_exists'])) {\n ?>\n <a class=\"more\" title=\"<?=$aLevel['label']?>\" \n href=\"?year=<?=$aLevel['nYear']?>&amp;level=<?=$aLevel['level']\n ?>&amp;parent_level_id=<?=$aLevel['level_id']?>\"><?=$aLevel['code']?></a>\n <?php\n } else {\n echo $aLevel['code'];\n }\n ?>\n </td>\n <?php\n foreach ($aPeriods as $nPeriodId => $sPeriod) {\n ?>\n <td>\n <?php\n if (!empty($aAllPeriodLevels[$nPeriodId][$nLevelId]['link_exists'])) {\n ?>\n <a class=\"more\" title=\"<?=$aLevel['label']?>\" \n href=\"?year=<?=$aLevel['nYear']?>&amp;period_id=<?=\n $aAllPeriodLevels[$nPeriodId][$nLevelId]['period_id']?>&amp;level=<?=\n $aAllPeriodLevels[$nPeriodId][$nLevelId]['level']?>&amp;parent_level_id=<?=\n $aAllPeriodLevels[$nPeriodId][$nLevelId]['parent_level_id']?>&amp;level_id=<?=\n $aAllPeriodLevels[$nPeriodId][$nLevelId]['level_id']?>\"><?=\n $this->getFormattedAmt($aAllPeriodLevels[$nPeriodId][$nLevelId]['amt'])?></a>\n <?php\n } else {\n echo '0';\n }\n ?>\n </td>\n <?php\n }\n echo \"</tr>\\n\";\n }\n\n echo '</table>';\n }", "function draw_calendar($month,$year,$activityStartDateArray = array()){\r\n\r\n\t/* draw table */\r\n\t$calendar = '<table cellpadding=\"0\" cellspacing=\"0\" class=\"calendar\">';\r\n\r\n\t/* table headings */\r\n\t$headings = array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');\r\n\t$calendar.= '<tr class=\"calendar-row\"><td class=\"calendar-day-head\">'.implode('</td><td class=\"calendar-day-head\">',$headings).'</td></tr>';\r\n\r\n\t/* days and weeks vars now ... */\r\n\t$running_day = date('w',mktime(0,0,0,$month,1,$year));\r\n\t$days_in_month = date('t',mktime(0,0,0,$month,1,$year));\r\n\t$days_in_this_week = 1;\r\n\t$day_counter = 0;\r\n\t$dates_array = array();\r\n\r\n\t/* row for week one */\r\n\t$calendar.= '<tr class=\"calendar-row\">';\r\n\r\n\t/* print \"blank\" days until the first of the current week */\r\n\tfor($x = 0; $x < $running_day; $x++):\r\n\t\t$calendar.= '<td class=\"calendar-day-np\">&nbsp;</td>';\r\n\t\t$days_in_this_week++;\r\n\tendfor;\r\n\r\n\t/* keep going with days.... */\r\n\tfor($list_day = 1; $list_day <= $days_in_month; $list_day++):\r\n\t\t$calendar.= '<td class=\"calendar-day\"><div style=\"position:relative;height:100px;\">';\r\n\t\t\t/* add in the day number */\r\n\t\t\t$calendar.= '<div class=\"day-number\">'.$list_day.'</div>';\r\n\t\t\t\r\n\t\t\t//eventdate=startdate and enddate, depends which we talks about \r\n\r\n\t\t\t$startDate = $year.'-'.$month.'-'.$list_day;\r\n\t\t\t//$endDate = $year.'-'.$month.'-'.$list_day;\r\n\t\t\techo \"<br>the start date is\".$startDate;\r\n\t\t\t//something is wrong wit hteh startDate, the origin code has a while loop in the beginning, think why \r\n\t\t\t\r\n\t\t\tif(isset($activityStartDateArray[$startDate])) {\r\n\t\t\t\tforeach($activityStartDateArray[$startDate] as $activity) {\r\n\t\t\t\t\t$calendar.= '<div class=\"activity\">'.$activity['activityName'].'</div>';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\r\n\t\t\telse {\r\n\t\t\t\t$calendar.= str_repeat('<p>&nbsp;</p>',2);\r\n\t\t\t}\r\n\t\t$calendar.= '</div></td>';\r\n\t\tif($running_day == 6):\r\n\t\t\t$calendar.= '</tr>';\r\n\t\t\tif(($day_counter+1) != $days_in_month):\r\n\t\t\t\t$calendar.= '<tr class=\"calendar-row\">';\r\n\t\t\tendif;\r\n\t\t\t$running_day = -1;\r\n\t\t\t$days_in_this_week = 0;\r\n\t\tendif;\r\n\t\t$days_in_this_week++; $running_day++; $day_counter++;\r\n\tendfor;\r\n\t\r\n\t\r\n\t/* finish the rest of the days in the week */\r\n\tif($days_in_this_week < 8):\r\n\t\tfor($x = 1; $x <= (8 - $days_in_this_week); $x++):\r\n\t\t\t$calendar.= '<td class=\"calendar-day-np\">&nbsp;</td>';\r\n\t\tendfor;\r\n\tendif;\r\n\r\n\t/* final row */\r\n\t$calendar.= '</tr>';\r\n\t\r\n\r\n\t/* end the table */\r\n\t$calendar.= '</table>';\r\n\r\n\t/** DEBUG **/\r\n\t$calendar = str_replace('</td>','</td>'.\"\\n\",$calendar);\r\n\t$calendar = str_replace('</tr>','</tr>'.\"\\n\",$calendar);\r\n\t\r\n\t/* all done, return result */\r\n\treturn $calendar;\r\n}", "function print_header_entries() {\n\n $result = '';\n\n if($entries = $this->get_header_entries()) {\n $result .= '<div class=\"php_report_header_entries\">';\n foreach($entries as $value) {\n\n $label_class = \"php_report_header_{$value->css_identifier} php_report_header_label\";\n $value_class = \"php_report_header_{$value->css_identifier} php_report_header_value\";\n\n $result .= '<div class=\"' . $label_class . '\">' . $value->label . '</div>';\n $result .= '<div class=\"' . $value_class . '\">' . $value->value . '</div>';\n\n }\n $result .= '</div>';\n }\n\n return $result;\n }", "public static function genarateTableFromArray($array)\r\n {\r\n if ($array != null) {\r\n $tableGen = '<table class=\"table table-hover\">';\r\n $tableGen .= \\utility\\htmlTableGeneratorHelper::getTableHead();\r\n $tableGen .= \\utility\\htmlTableGeneratorHelper::getTableBody($array);\r\n $tableGen .= '</table>';\r\n return $tableGen;\r\n }\r\n }", "public function addHeadersRowToArray(array &$array)\n {\n reset($array);\n $row = current($array);\n if ($row) {\n $fields = array_keys($row);\n array_unshift($array, $fields);\n }\n }", "function mkDay($var){\n$eventContent=$this->mkEventContent($var);\n$linkstr=$this->mkUrl($this->actyear,$this->actmonth,$var);\n\tif ($this->javaScriptDay) $linkstr=\"<a href=\\\"javascript:\".$this->javaScriptDay.\"(\".$this->actyear.\",\".$this->actmonth.\",\".$var.\")\\\">\".$var.\"</a>\";\n\tif ($this->isEvent($var)){\n\t\tif ($this->eventUrl){\n\t\t\t$out=\"<td class=\\\"\".$this->eventID.\"\\\"><a href=\\\"\".$this->eventUrl.\"\\\">\".$var.\"</a>\".$eventContent.\"</td>\";\n\t\t\t$this->eventUrl=false;\n\t\t}\n\t\telseif (!$this->dayLinks) $out=\"<td class=\\\"\".$this->eventID.\"\\\">\".$var.$eventContent.\"</td>\";\n\t\telse $out=\"<td class=\\\"\".$this->eventID.\"\\\">\".$linkstr.$eventContent.\"</td>\";\n\t}\n\telseif ($var==$this->selectedday && $this->actmonth==$this->selectedmonth && $this->actyear==$this->selectedyear){\n\t\tif (!$this->dayLinks) $out=\"<td class=\\\"\".$this->cssSelecDay.\"\\\">\".$var.$eventContent.\"</td>\";\n\t\telse $out=\"<td class=\\\"\".$this->cssSelecDay.\"\\\">\".$linkstr.$eventContent.\"</td>\";\n\t}\n\telseif ($var==$this->daytoday && $this->actmonth==$this->monthtoday && $this->actyear==$this->yeartoday){\n\t\tif (!$this->dayLinks) $out=\"<td class=\\\"\".$this->cssToday.\"\\\">\".$var.$eventContent.\"</td>\";\n\t\telse $out=\"<td class=\\\"\".$this->cssToday.\"\\\">\".$linkstr.$eventContent.\"</td>\";\n\t}\n\telseif ($this->getWeekday($var)==0 && $this->crSunClass){\n\t\tif (!$this->dayLinks) $out=\"<td class=\\\"\".$this->cssSunday.\"\\\">\".$var.$eventContent.\"</td>\";\n\t\telse $out=\"<td class=\\\"\".$this->cssSunday.\"\\\">\".$linkstr.$eventContent.\"</td>\";\n\t}\n\telseif ($this->getWeekday($var)==6 && $this->crSatClass){\n\t\tif (!$this->dayLinks) $out=\"<td class=\\\"\".$this->cssSaturday.\"\\\">\".$var.$eventContent.\"</td>\";\n\t\telse $out=\"<td class=\\\"\".$this->cssSaturday.\"\\\">\".$linkstr.$eventContent.\"</td>\";\n\t}\n\telse{\n\t\tif (!$this->dayLinks) $out=\"<td class=\\\"\".$this->cssMonthDay.\"\\\">\".$var.$eventContent.\"</td>\";\n\t\telse $out=\"<td class=\\\"\".$this->cssMonthDay.\"\\\">\".$linkstr.$eventContent.\"</td>\";\n\t}\nreturn $out;\n}", "protected function compileDays()\n\t{\n\t\t$arrDays = array();\n\n\t\tfor ($i=0; $i<7; $i++)\n\t\t{\n\t\t\t$intCurrentDay = ($i + $this->cal_startDay) % 7;\n\t\t\t$arrDays[$intCurrentDay] = $GLOBALS['TL_LANG']['DAYS'][$intCurrentDay];\n\t\t}\n\n\t\treturn $arrDays;\n\t}", "function WednesdayColumnHeader() {\n\t\tif (func_num_args()) {\n\t\t\t$this->_WednesdayColumnHeader = trim(func_get_arg(0));\n\t\t}\n\t\telse return $this->_WednesdayColumnHeader;\n\t}", "function header() {\n //\n //Get the fields in this sql \n $cols= $this->fields->get_array();\n //\n //Loop through the fields and display the <tds>\n foreach ($cols as $col) {\n //\n $name= is_null($col->alias) ? $col->to_str():$col->alias;\n echo \"<th>$name</th>\"; \n }\n }", "private function buildDailyHourSummaryScaffold()\n {\n $array = array();\n\n for ($i = 0; $i <= 6; $i++)\n {\n $array[$i] = $this->buildHourSummaryScaffoldAvg();\n }\n\n return $array;\n }", "private function setupTable ($dataRows) {\n $rows = [];\n $this->addColumn(\"name\", \"Page Name\");\n $this->addColumn(\"visits\", \"Visits\");\n\n foreach ($dataRows as $dataRow) {\n array_push($rows, array(\n \"name\" => $dataRow[0],\n \"visits\" => $dataRow[1]\n ));\n }\n\n $this->addMultipleRows($rows);\n\n }", "function day_cell_html($text, $link, $date)\n{\n $html = '';\n $html .= tdcell(\"row_labels\", 1, array('name' => 'date', 'value' => $date));\n $html .= \"<div class=\\\"celldiv slots1\\\">\\n\";\n $html .= \"<a href=\\\"$link\\\" title=\\\"\" . get_vocab(\"viewday\") . \"\\\">$text</a>\\n\";\n $html .= \"</div></td>\\n\";\n return $html;\n}", "private function makeTableNamesArray($array){\n\n \t\t$tableNames;\n \t \t$count = 0;\n\n \t\n\t \tforeach($array as $row){\n\t $searchElement = $row['table_name'];\n\t if($count !=0 && $searchElement != $tableNames[$count-1] ){\n\t $tableNames[$count]=$searchElement;\n\t $count++;\n\t }\n\t else if ($count == 0){\n\t $tableNames[0] = $array[0]['table_name'];\n\t $count++;\n\t }\n\n\t }\n\n \treturn $tableNames;\n \t}", "private function render_data()\n\t{\n\t\t// create if the headers exists\n\t\t// 2 header style table\n\t\tif(count($this->headers) == 2 && isset($this->headers[0][0]) && isset($this->headers[1][0]) )\n\t\t{\n\t\t\t// generate the column headers\n\t\t\t$html = '<tr><th></th>';\n\t\t\tforeach($this->headers[0] as $header)\n\t\t\t\t$html .= \"<th>$header</th>\";\n\t\t\t$html .= '</tr>';\n\t\t\t\n\t\t\t// generate the row headers and the data\n\t\t\tfor($i=0; $i<count($this->headers[1]); $i++)\n\t\t\t{\n\t\t\t\t// the header\n\t\t\t\t$html .= \"<tr><th>{$this->headers[1][$i]}</th>\";\n\t\t\t\t\n\t\t\t\t// and now the data\n\t\t\t\tforeach($this->data[$i] as $datum)\n\t\t\t\t\t$html .= \"<td>$datum</td>\";\n\t\t\t\t\n\t\t\t\t$html .= '</tr>';\n\t\t\t}\n\t\t\treturn $html;\n\t\t}//end if\n\t\t\n\t\t// 1 header style table\n\t\tif(count($this->headers) > 0 && isset($this->headers[0]) && !is_array($this->headers[0]) )\n\t\t{\n\t\t\t// generate the column headers\n\t\t\t$html = '<tr>';\n\t\t\tforeach($this->headers as $header)\n\t\t\t\t$html .= \"<th>$header</th>\";\n\t\t\t$html .= '</tr>';\n\t\t\t\n\t\t\t// generate the data\n\t\t\tfor($i=0; $i<count($this->data); $i++)\n\t\t\t{\n\t\t\t\tforeach($this->data[$i] as $datum)\n\t\t\t\t\t$html .= \"<td>$datum</td>\";\n\t\t\t\t\n\t\t\t\t$html .= '</tr>';\n\t\t\t}\n\t\t\t\n\t\t\treturn $html;\n\t\t}//end if\n\t\t\n\t\treturn '';\n\t}", "public function headings() {\n\t\t$vals = array_keys(get_object_vars($this));\n\t\treturn( array_reduce($vals,\n\t\t\t\tcreate_function('$a,$b','return is_null($a) ? \"$b\" : \"$a\".\"\\t\".\"$b\";')));\n\t}", "function render_daytitle($date){\n\t\t//returns a formatted date and time for an event\n\t\t$return_string= date (\"D\", $date->get_unix_time());\n\t\t$return_string=$return_string.\"<br />\";\n\t\t$return_string=$return_string.date(\"M d\", $date->get_unix_time());\n\t\treturn $return_string;\n\t}", "private function startMonthSpacers()\n\t{\n\t\tif($this->firstDayOfTheMonth != '0') {\n\t\t\t$this->calWeekDays .= \"\\t\\t<td colspan=\\\"\".$this->firstDayOfTheMonth.\"\\\" class=\\\"spacerDays\\\">&nbsp;</td>\\n\";\n\t\t\t$this->outArray['firstday'] = $this->firstDayOfTheMonth;\n\t\t}\n\t}", "function adleex_resource_list_column_header( $cols ) {\nglobal $current_screen;\n\n\tif ($current_screen->post_type!='resource') return $cols;\n\n\tunset($cols['date']);\n\t$header = array(\n 'post_title' => 'title', );\n\tforeach($header\tas $k => $v) $cols[$k]=$v;\n\treturn $cols;\n}", "public function headings() {\n\t\t$vals = array_keys(get_object_vars($this));\n\t\treturn( array_reduce($vals, create_function('$a,$b','return is_null($a) ? \"$b\" : \"$a\".\"\\t\".\"$b\";')));\n\t}", "function pgm_subscriber_column_headers($columns){\n $columns = array(\n 'cb'=>'<input type=\"checkbox\" />', //checkbox-HTML empty checkbox\n 'title'=>__('Subscriber Name'), //update header name to 'Subscriber Name'\n 'email'=>__('Email Address'), //create new header for email\n );\n\n return $columns;\n}", "public static function generate(array $inputArray)\r\n {\r\n //HTML table should use the table head tag for the first row of the table and have the field names from the CSV file in this row. \r\n $tableOpenString = '<table>';\r\n $headerString = '<thead><tr>';\r\n\r\n foreach ($inputArray[0] as $columnName)\r\n {\r\n $headerString.=\"<td>$columnName</td>\";\r\n }\r\n\r\n $headerString.='</thead></tr>';\r\n $tableBodyString = '<tbody>';\r\n for ($i=1 ; $i<=sizeof($inputArray)-1 ; $i++)\r\n {\r\n $currentArray = $inputArray[$i]; \r\n\r\n if (sizeof($currentArray)==sizeof($inputArray[0]))\r\n {\r\n $tableBodyString.='<tr>';\r\n foreach ($currentArray as $row)\r\n {\r\n $tableBodyString.=\"<td>$row</td>\";\r\n }\r\n $tableBodyString.='</tr>';\r\n }\r\n }\r\n $tableBodyString.='</tbody>';\r\n $tableCloseString = '</table>';\r\n\r\n $htmlOutput = $tableOpenString . $headerString . $tableBodyString . $tableCloseString;\r\n\r\n return $htmlOutput; \r\n \r\n }", "public function columns_head( $columns ) {\r\n $new = array();\r\n foreach ( $columns as $key => $title ) {\r\n if ( $key == 'title' ){\r\n $new['featured_image'] = esc_html__( 'Image', 'myhome-core' );\r\n $new[$key] = $title;\r\n } elseif ( $key == 'author' ) {\r\n $new[$key] = esc_html__( 'Agent', 'myhome-core' );\r\n $new['price'] = esc_html__( 'Price', 'myhome-core' );\r\n } else {\r\n $new[$key] = $title;\r\n }\r\n }\r\n return $new;\r\n }", "function setDayNames($namesArray){\n\tif (!is_array($namesArray) || count($namesArray)!=7) return false;\n\telse $this->dayNames=$namesArray;\n}", "public function headerFields($fieldArr, $table, $out = array())\n {\n global $TCA;\n\n foreach ($fieldArr as $fieldName) {\n $ll = $GLOBALS['LANG']->sL($TCA[$table]['columns'][$fieldName]['label'], 1);\n $out[$fieldName] = '<strong>' . ($ll ? $this->addSortLink($ll, $fieldName,\n $table) : '&nbsp;') . '</strong>';\n }\n\n return $out;\n }" ]
[ "0.6407736", "0.59913987", "0.59694207", "0.5830636", "0.580982", "0.5785261", "0.57791615", "0.5628445", "0.5607434", "0.551453", "0.55088216", "0.5440747", "0.54331005", "0.54277366", "0.5427073", "0.54121625", "0.539174", "0.5388485", "0.53517675", "0.5342108", "0.53218204", "0.53132296", "0.5269427", "0.5238228", "0.52347237", "0.52317595", "0.52274734", "0.5206592", "0.51989573", "0.5186882", "0.5179429", "0.5175543", "0.5138412", "0.5073615", "0.5056978", "0.5029145", "0.50271237", "0.5010333", "0.50097924", "0.50012755", "0.4997738", "0.4986301", "0.49818945", "0.49487275", "0.4945642", "0.4938627", "0.49347383", "0.49127352", "0.489191", "0.48905492", "0.48894575", "0.48781934", "0.487436", "0.48649064", "0.48645663", "0.4859576", "0.48559922", "0.4843", "0.48362833", "0.48285297", "0.48194063", "0.48135915", "0.4802667", "0.47954965", "0.47887734", "0.47796285", "0.4778407", "0.4778243", "0.47779807", "0.47757858", "0.47716287", "0.4770999", "0.4767361", "0.47505546", "0.47497776", "0.47471058", "0.47440466", "0.47435376", "0.47403905", "0.47396064", "0.47361693", "0.47357678", "0.4732599", "0.47252044", "0.47008038", "0.4696338", "0.46938264", "0.46928817", "0.4692826", "0.46877164", "0.46865577", "0.4686193", "0.46834525", "0.46753135", "0.4665921", "0.4660586", "0.46446535", "0.46446016", "0.4643314", "0.46417898" ]
0.8538074
0
Set start of month spacers Create a spacer cell that adds blank space for the start of the month before the first day of the month.
private function startMonthSpacers() { if($this->firstDayOfTheMonth != '0') { $this->calWeekDays .= "\t\t<td colspan=\"".$this->firstDayOfTheMonth."\" class=\"spacerDays\">&nbsp;</td>\n"; $this->outArray['firstday'] = $this->firstDayOfTheMonth; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function endMonthSpacers()\n\t{\n\t\tif((8 - $this->weekDayNum) >= '1') {\n\t\t\t$this->calWeekDays .= \"\\t\\t<td colspan=\\\"\".(8 - $this->weekDayNum).\"\\\" class=\\\"spacerDays\\\">&nbsp;</td>\\n\";\n\t\t\t$this->outArray['lastday'] = (8 - $this->weekDayNum);\t\t\t\n\t\t}\n\t}", "private function Write_Monthly_Table() {\n\t\t$top = 445 + self::VERT_MARGIN;\n\t\t$left = self::HORZ_MARGIN;\n\t\t$label_width = 160;\n\t\t$table_left = $left + $label_width;\n\t\t$cell_width = 55;\n\t\t$row_height = 8.5;\n\t\t\n\t\t/**\n\t\t * Build label backgrounds\n\t\t */\n\t\t$this->pdf->setcolor('fill', 'gray', 0.75, 0, 0, 0);\n\t\t$this->Rect_TL($left, $top, $label_width + ($cell_width * 1), $row_height);\n\t\t$this->pdf->fill();\n\t\t\n\t\t/**\n\t\t * Add the strokes\n\t\t */\n\t\t$this->Rect_TL($table_left, $top, $cell_width, $row_height);\n\t//\t$this->Rect_TL($table_left + ($cell_width * 1), $top, $cell_width, $row_height);\n\t//\t$this->Rect_TL($table_left + ($cell_width * 2), $top, $cell_width, $row_height);\n\t\t$this->pdf->stroke();\n\t\t\n\t\t/**\n\t\t * Add the labels\n\t\t */\n\t\t$this->Text_TL(\"CURRENT PERIOD\",\n\t\t\t$left, $top, \n\t\t\t$label_width, $row_height,\n\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['ITALICS']} {$this->formats['LEFT']}\");\n\t\t\n\t\t$this->Text_TL(\"PERIOD\",\n\t\t\t$table_left, $top, \n\t\t\t$cell_width, $row_height,\n\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['ITALICS']} {$this->formats['CENTER']}\");\n\t\t\n\t\t/*$this->Text_TL(\"WEEK\",\n\t\t\t$table_left + ($cell_width * 1), $top, \n\t\t\t$cell_width, $row_height,\n\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['ITALICS']} {$this->formats['CENTER']}\");\n\t\t\n\t\t$this->Text_TL(\"MONTH\",\n\t\t\t$table_left + ($cell_width * 2), $top, \n\t\t\t$cell_width, $row_height,\n\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['ITALICS']} {$this->formats['CENTER']}\");*/\n\t\t\t\n\t\t$current_row = 1;\n\t\t$totals = array(\n\t\t\t'weekly' => 0,\n\t\t\t'biweekly' => 0,\n\t\t\t'semimonthly' => 0,\n\t\t\t'monthly' => 0,\n\t\t);\n\t\tforeach ($this->data['period'] as $label => $values) {\n\t\t\t/**\n\t\t\t * Special processing\n\t\t\t */\n\t\t\tswitch ($label) {\n\t\t\t\tcase 'nsf$':\n\t\t\t\t\tcontinue 2;\n\t\t\t\tcase 'debit returns':\n//\t\t\t\t\t$this->pdf->setcolor('fill', 'rgb', 1, 1, 176/255, 0);\n//\t\t\t\t\t$this->Rect_TL($table_left + ($cell_width * 1), $top + ($row_height * $current_row), $cell_width, $row_height);\n//\t\t\t\t\t$this->pdf->fill();\n\t\t\t\t\t\n//\t\t\t\t\t$this->Rect_TL($table_left + ($cell_width * 1), $top + ($row_height * $current_row), $cell_width, $row_height);\n//\t\t\t\t\t$this->pdf->stroke();\n\t\t\t\t\t/*$percentage = $values['month']? number_format($values['month'] / $this->data['monthly']['total debited']['month'] * 100, 1):0;\n\t\t\t\t\t$this->Text_TL($percentage.'%',\n\t\t\t\t\t\t$table_left + ($cell_width * 3), $top + ($row_height * $current_row), \n\t\t\t\t\t\t$cell_width, $row_height,\n\t\t\t\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['CENTER']}\");*/\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'net cash collected':\n\t\t\t\t\t$this->pdf->setcolor('fill', 'rgb', 1, 1, 176/255, 0);\n\t\t\t\t\t$this->Rect_TL($table_left, $top + ($row_height * $current_row), $cell_width, $row_height);\n\t\t\t\t\t//$this->Rect_TL($table_left + ($cell_width * 1), $top + ($row_height * $current_row), $cell_width, $row_height);\n\t\t\t\t\t//$this->Rect_TL($table_left + ($cell_width * 2), $top + ($row_height * $current_row), $cell_width, $row_height);\n\t\t\t\t\t$this->pdf->fill();\n\t\t\t\t\t\n\t\t\t\t\t//$this->Text_TL(number_format($this->data['period']['total debited']['span'] - $this->data['period']['debit returns']['span'], 2),\n\t\t\t\t\t$this->Text_TL(number_format($this->data['period']['total debited']['span'] - $this->data['period']['nsf$']['span'], 2),\n\t\t\t\t\t\t$table_left, $top + ($row_height * $current_row), \n\t\t\t\t\t\t$cell_width, $row_height,\n\t\t\t\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\t\t\t\t\t\t\n\t\t\t\t\t/*$this->Text_TL(number_format($this->data['monthly']['total debited']['week'] - $this->data['monthly']['debit returns']['week'], 2),\n\t\t\t\t\t\t$table_left + ($cell_width * 1), $top + ($row_height * $current_row), \n\t\t\t\t\t\t$cell_width, $row_height,\n\t\t\t\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\t\t\t\t\t$this->Text_TL(number_format($this->data['monthly']['total debited']['month'] - $this->data['monthly']['debit returns']['month'], 2),\n\t\t\t\t\t\t$table_left + ($cell_width * 2), $top + ($row_height * $current_row), \n\t\t\t\t\t\t$cell_width, $row_height,\n\t\t\t\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");*/\n\t\t\t\t\tbreak;\n\t\t\t\t//FORBIDDEN ROWS!\n\t\t\t\tcase 'moneygram deposit':\n\t\t\t\t//case 'credit card payments':\n\t\t\t\t\tcontinue 2;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t\t$format_decimals = 0;\n\t\t\tswitch ($label) {\n\t\t\t\tcase 'new customers':\n\t\t\t\tcase 'card reactivations':\n\t\t\t\tcase 'reactivated customers':\n\t\t\t\tcase 'refunded customers':\n\t\t\t\tcase 'resend customers':\n\t\t\t\tcase 'cancelled customers':\n\t\t\t\tcase 'paid out customers (ach)':\n\t\t\t\tcase 'paid out customers (non-ach)':\n\t\t\t\t\t$format_decimals = 0;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$format_decimals = 2;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t$this->pdf->setcolor('fill', 'gray', 0.75, 0, 0, 0);\n\t\t\t$this->Rect_TL($left, $top + ($row_height * $current_row), $label_width, $row_height);\n\t\t\t$this->pdf->fill();\n\t\t\t\n\t\t\t$this->Rect_TL($table_left, $top + ($row_height * $current_row), $cell_width, $row_height);\n//\t\t\t$this->Rect_TL($table_left + ($cell_width * 1), $top + ($row_height * $current_row), $cell_width, $row_height);\n//\t\t\t$this->Rect_TL($table_left + ($cell_width * 2), $top + ($row_height * $current_row), $cell_width, $row_height);\n\t\t\t$this->pdf->stroke();\n\t\t\t\n\t\t\t$this->Text_TL(strtoupper($label),\n\t\t\t\t$left + $label_indent, $top + ($row_height * $current_row), \n\t\t\t\t$label_width - $label_indent, $row_height,\n\t\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['ITALICS']} {$this->formats['RIGHT']}\");\n\t\t\t\n\t\t\tif ($label != 'net cash collected') {\n\t\t\t\t$this->Text_TL(number_format($values['span'], $format_decimals),\n\t\t\t\t\t$table_left, $top + ($row_height * $current_row), \n\t\t\t\t\t$cell_width, $row_height,\n\t\t\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\t\t\t\t\n\t\t\t\t/*$this->Text_TL(number_format($values['week'], $format_decimals),\n\t\t\t\t\t$table_left + ($cell_width * 1), $top + ($row_height * $current_row), \n\t\t\t\t\t$cell_width, $row_height,\n\t\t\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\t\t\t\t\n\t\t\t\t$this->Text_TL(number_format($values['month'], $format_decimals),\n\t\t\t\t\t$table_left + ($cell_width * 2), $top + ($row_height * $current_row), \n\t\t\t\t\t$cell_width, $row_height,\n\t\t\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");*/\n\t\t\t}\n\t\t\t\n\t\t\t$current_row++;\n\t\t}\n\t\t\n\t\t/**\n\t\t * Advances in Collection\n\t\t */\n\t\t$this->pdf->setcolor('fill', 'gray', 0.75, 0, 0, 0);\n\t\t$this->Rect_TL($left, $top + ($row_height * $current_row), $label_width, $row_height);\n\t\t$this->pdf->fill();\n\t\t\n\t\t$this->Rect_TL($table_left, $top + ($row_height * $current_row), $cell_width, $row_height);\n\t\t$this->pdf->stroke();\n\t\t\n\t\t$this->Text_TL(\"ADVANCES IN COLLECTION\",\n\t\t\t$left, $top + ($row_height * $current_row), \n\t\t\t$label_width, $row_height,\n\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['ITALICS']} {$this->formats['RIGHT']}\");\n\t\t\n\t\t$this->Text_TL(number_format($this->data['advances_collections'], 2),\n\t\t\t$table_left, $top + ($row_height * $current_row), \n\t\t\t$cell_width, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\t\t\n\t\t/**\n\t\t * Advances in Active\n\t\t */\n\t\t$this->pdf->setcolor('fill', 'gray', 0.75, 0, 0, 0);\n\t\t$this->Rect_TL($table_left + ($cell_width * 4), $top + ($row_height * $current_row), $cell_width * 2, $row_height);\n\t\t$this->pdf->fill();\n\t\t\n\t\t$this->Rect_TL($table_left + ($cell_width * 6), $top + ($row_height * $current_row), $cell_width, $row_height);\n\t\t$this->pdf->stroke();\n\t\t\n\t\t$this->Text_TL(\"ACTIVE ADVANCES OUT\",\n\t\t\t$table_left + ($cell_width * 4), $top + ($row_height * $current_row), \n\t\t\t$cell_width * 2, $row_height,\n\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['ITALICS']} {$this->formats['RIGHT']}\");\n\t\t\n\t\t$this->Text_TL(number_format($this->data['advances_active'], 2),\n\t\t\t$table_left + ($cell_width * 6), $top + ($row_height * $current_row), \n\t\t\t$cell_width, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\t\t\n\t}", "public function setStartMonth($value)\n {\n return $this->setParameter('startMonth', (int) $value);\n }", "public function setStartMonth($month)\n {\n $this->start_month = $month;\n $date = date('Y', time()) . '-' . $month . '-01';\n $this->start_date = new DateTime($date);\n }", "public static function data_first_month() {\n\t$month = date('m');\n\t$year = date('Y');\n\treturn date('Y-m-d', mktime(0,0,0, $month, 1, $year));\n}", "public function hasStartMonth() {\n return $this->_has(5);\n }", "function initMonth()\n {\n //! Si aucun mois ou année n'est recupéré on prend le mois et l'année actuel\n if (!$this->currentMonthName || !$this->year) {\n $this->currentMonthIndex = (int)date(\"m\", time()) - 1;\n $this->currentMonthName = $this->months[$this->currentMonthIndex];\n $this->year = (int)date(\"Y\", time());\n }\n // recalcule le premier jour pour ce mois et le nombre de jour total du mois\n $this->firstDayInMonth = strftime('%u', strtotime(strval($this->currentMonthIndex + 1) . '/01/' . strval($this->year)));\n $this->nbDaysMonth = cal_days_in_month(CAL_GREGORIAN, $this->currentMonthIndex + 1, $this->year);\n $this->currentMonthName = $this->months[$this->currentMonthIndex];\n }", "function mkMonthHead(){\nreturn \"<table class=\\\"\".$this->cssMonthTable.\"\\\">\\n\";\n}", "public function monthPadDates()\n {\n return date('w', strtotime(date('Y-m-01', strtotime($this->strStart))));\n }", "function print_calendar($mon,$year)\n\t{\n\t\tglobal $dates, $first_day, $start_day;\n\t\t\t$cellWidth =\"150\";\n\t\t$first_day = mktime(0,0,0,$mon,1,$year);\n\t\t$start_day = date(\"w\",$first_day);\n\t\t$res = getdate($first_day);\n\t\t$month_name = $res[\"month\"];\n\t\t$no_days_in_month = date(\"t\",$first_day);\n\t\t\n\t\t//If month's first day does not start with first Sunday, fill table cell with a space\n\t\tfor ($i = 1; $i <= $start_day;$i++)\n\t\t\t$dates[1][$i] = \" \";\n\n\t\t$row = 1;\n\t\t$col = $start_day+1;\n\t\t$num = 1;\n\t\twhile($num<=31)\n\t\t\t{\n\t\t\t\tif ($num > $no_days_in_month)\n\t\t\t\t\t break;\n\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$dates[$row][$col] = $num;\n\t\t\t\t\t\tif (($col + 1) > 7)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$row++;\n\t\t\t\t\t\t\t\t$col = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$col++;\n\t\t\t\t\t\t$num++;\n\t\t\t\t\t}//if-else\n\t\t\t}//while\n\t\t$mon_num = date(\"n\",$first_day);\n\t\t$temp_yr = $next_yr = $prev_yr = $year;\n\n\t\t$prev = $mon_num - 1;\n\t\t$next = $mon_num + 1;\n\n\t\t//If January is currently displayed, month previous is December of previous year\n\t\tif ($mon_num == 1)\n\t\t\t{\n\t\t\t\t$prev_yr = $year - 1;\n\t\t\t\t$prev = 12;\n\t\t\t}\n \n\t\t//If December is currently displayed, month next is January of next year\n\t\tif ($mon_num == 12)\n\t\t\t{\n\t\t\t\t$next_yr = $year + 1;\n\t\t\t\t$next = 1;\n\t\t\t}\n\n\t\techo \"<DIV ALIGN='center'><TABLE BORDER=1 WIDTH=1600px CELLSPACING=0 BORDERCOLOR='silver'>\";\n\n\t\techo \t\"\\n<TR ALIGN='center'><TD BGCOLOR='white'> \".\n\t\t\t \"<A HREF='index.php?month=$prev&year=$prev_yr' STYLE=\\\"text-decoration: none\\\"><B><<</B></A> </TD>\".\n\t\t\t \"<TD COLSPAN=5 BGCOLOR='#99CCFF'><B>\".date(\"F\",$first_day).\" \".$temp_yr.\"</B></TD>\".\n\t\t\t \"<TD BGCOLOR='white'> \".\n\t\t\t \"<A HREF='index.php?month=$next&year=$next_yr' STYLE=\\\"text-decoration: none\\\"><B>>></B></A> </TD></TR>\";\n\n\t\techo \"\\n<TR ALIGN='center'><TD width='$cellWidth'><B>Domenica</B></TD><TD width='$cellWidth'><B>Lunedi</B></TD><TD width='$cellWidth'><B>Martedi</B></TD>\";\n\t\techo \"<TD width='$cellWidth'><B>Mercoledi</B></TD><TD width='$cellWidth'><B>Giovedi</B></TD><TD width='$cellWidth'><B>Venerdi</B></TD><TD width='$cellWidth'><B>Sabato</B></TD></TR>\";\n\t\techo \"<TR><TD COLSPAN=7> </TR><TR height='100px;' ALIGN='center'>\";\n\t\t\t\t\n\t\t$end = ($start_day > 4)? 6:5;\n\t\tfor ($row=1;$row<=$end;$row++)\n\t\t\t{\n\t\t\t\tfor ($col=1;$col<=7;$col++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($dates[$row][$col] == \"\")\n\t\t\t\t\t\t$dates[$row][$col] = \" \";\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!strcmp($dates[$row][$col],\" \"))\n\t\t\t\t\t\t\t$count++;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$t = $dates[$row][$col];\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t//If date is today, highlight it\n\t\t\t\t\t\tif (($t == date(\"j\")) && ($mon == date(\"n\")) && ($year == date(\"Y\"))){\n\t\t\t\t\t\t\techo \"\\n<TD valign='top' BGCOLOR='aqua'><a onclick=\\\"NewWindow(this.href,'pg_center','780','670','no');return false;\\\" href='calendar_add_event.php?azione=add&gg=$t&mm=$mon&yyyy=$year'>\".$t.\"</a>\";\n echo '<div align=\"left\">';\n echo stampa_appuntamenti($t,$mon,$year,$_SESSION['id_utente']);\n echo '</div>';\n echo \"</TD>\";\n }\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t//If the date is absent ie after 31, print space\n\t\t\t\t\t\t\techo \"\\n<TD valign='top'>\".(($t == \" \" )? \"&nbsp;\" : \"<a onclick=\\\"NewWindow(this.href,'pg_center','780','670','no');return false;\\\" href='calendar_add_event.php?azione=add&gg=$t&mm=$mon&yyyy=$year'>\".$t.\"</a>\");\n echo '<div align=\"left\">';\n echo stampa_appuntamenti($t,$mon,$year,$_SESSION['id_utente']);\n echo '</div>';\n echo \"</TD>\";\n\t\t\t\t\t }\n }// for -col\n\t\t\t\t\n\t\t\t\tif (($row + 1) != ($end+1))\n\t\t\t\t\techo \"</TR>\\n<TR ALIGN='center' height='100px;'>\";\n\t\t\t\telse\n\t\t\t\t\techo \"</TR>\";\n\t\t\t}// for - row\n\t\techo \"\\n</TABLE><BR><BR><A HREF=\\\"index.php\\\">Visualizza mese corrente</A> </DIV>\";\n\t}", "public function setLeading($leading) {}", "public function getDateStartMonth($date=null){\n\t\t$dateNew = date(\"Y-m-d H:i:s\",strtotime('first day of this month', strtotime($date)));\n\t\treturn $dateNew;\n\t}", "public function getStartMonth()\n {\n return $this->getParameter('startMonth');\n }", "function single_month_title($prefix = '', $display = \\true)\n {\n }", "function _data_first_month_day()\n {\n $month = date('m');\n $year = date('Y');\n return date('Y-m-d', mktime(0, 0, 0, $month, 1, $year));\n }", "function monthCreator($from,$to){\n\n$month='';\nforeach (h_many_M($from,$to) as $i) {\n\n$d = DateTime::createFromFormat('!m', $i);\n$m = $d->format('F').' '.$i;\n\n $month.=' \n<th class=\"planning_head_month\" colspan=\"28\">'.$m.'</th>\n ';\n}\necho $month;\n}", "public function getNextMonth(){\n\t\tif($this->getMonth() == 12){return 1;}\n\t\telse{return $this->getMonth()+1;}\n\t}", "function _data_first_month_day() {\r\n $month = date('m');\r\n $year = date('Y');\r\n return date('d/m/Y', mktime(0,0,0, $month, 1, $year));\r\n }", "function mkMonthFoot(){\nreturn \"</table>\\n\";\n}", "public function snapToMonth(): self\n {\n return new self(\n DatePoint::fromDate($this->startDate)->month()->startDate(),\n DatePoint::fromDate($this->endDate)->month()->endDate(),\n $this->bounds\n );\n }", "function setMonth($m)\r\n {\r\n if($m < 1 || $m > 12) {\r\n $this->mes = 1;\r\n } else {\r\n $this->mes = $m;\r\n }\r\n }", "function _data_first_month_day() {\n\t$month = date('m');\n\t$year = date('Y');\n\treturn date('Y-m-d', mktime(0,0,0, $month, 1, $year));\n}", "function _putDateSchedules0502s($pdf, $font, $date1, $date2, $y) {\n if (!empty($date1)) {\n $y1 = date('Y', strtotime($date1)) - 1988;\n $m1 = date('n', strtotime($date1));\n $d1 = date('j', strtotime($date1));\n\n $pdf->SetFont($font, null, 9, true);\n $pdf->SetXY(32.4, $y);\n $pdf->MultiCell(10, 5, $y1, 0, 'C');\n $pdf->SetXY(41.4, $y);\n $pdf->MultiCell(10, 5, $m1, 0, 'C');\n $pdf->SetXY(49, $y);\n $pdf->MultiCell(10, 5, $d1, 0, 'C');\n }\n\n if (!empty($date2)) {\n $y2 = date('Y', strtotime($date2)) - 1988;\n $m2 = date('n', strtotime($date2));\n $d2 = date('j', strtotime($date2));\n\n $pdf->SetFont($font, null, 9, true);\n $pdf->SetXY(32.4, $y + 3);\n $pdf->MultiCell(10, 5, $y2, 0, 'C');\n $pdf->SetXY(41.4, $y + 3);\n $pdf->MultiCell(10, 5, $m2, 0, 'C');\n $pdf->SetXY(49, $y + 3);\n $pdf->MultiCell(10, 5, $d2, 0, 'C');\n }\n }", "protected function getTab() {\n return \" \";\n }", "protected function startDate()\n {\n $d = new DateTime('first day of last month');\n $d->setTime(0, 0, 0);\n return $d;\n }", "function mkYearBody($stmonth=false){\n\tif (!$stmonth || $stmonth>12) $stmonth=1;\n$TrMaker = $this->rowCount;\n$curyear = $this->actyear;\n$out=\"<tr>\\n\";\n\tfor ($x=1; $x<=12; $x++) {\n\t\t$this->activeCalendar($curyear,$stmonth,false,$this->GMTDiff);\n\t\t$out.=\"<td valign=\\\"top\\\">\\n\".$this->showMonth().\"</td>\\n\";\n\t\tif ($x == $TrMaker && $x < 12) {\n\t\t\t$out.=\"</tr><tr>\";\n\t\t\t$TrMaker = ($TrMaker+$this->rowCount);\n\t\t}\n\t\tif ($stmonth == 12) {\n\t\t\t$stmonth = 1;\n\t\t\t$curyear++;\n\t\t} \n\t\telse $stmonth++;\n\t}\n$out.=\"</tr>\\n\";\nreturn $out;\n}", "function mkMonth ($month) {\n $head = \"<div class='fullwidth'>\";\n $head .= \"<div class='month'>\";\n $head .= date(\"F\", mktime(0,0,0,$month));\n $head .= \"</div>\";\n $head .= \"<div id='jresult'>\";\n $head .= \"</div>\";\n $head .= \"<div id='week'>\";\n $head .= \"<table class='days'>\";\n $head .= \"<td>\";\n $head .= \"Sunday\";\n $head .= \"</td>\";\n $head .= \"</table>\";\n $head .= \"<table class='days'>\";\n $head .= \"<td>\";\n $head .= \"Monday\";\n $head .= \"</td>\";\n $head .= \"</table>\";\n $head .= \"<table class='days'>\";\n $head .= \"<td>\";\n $head .= \"Tuesday\";\n $head .= \"</td>\";\n $head .= \"</table>\";\n $head .= \"<table class='days'>\";\n $head .= \"<td>\";\n $head .= \"Wednesday\";\n $head .= \"</td>\";\n $head .= \"</table>\";\n $head .= \"<table class='days'>\";\n $head .= \"<td>\";\n $head .= \"Thursday\";\n $head .= \"</td>\";\n $head .= \"</table>\";\n $head .= \"<table class='days'>\";\n $head .= \"<td>\";\n $head .= \"Friday\";\n $head .= \"</td>\";\n $head .= \"</table>\";\n $head .= \"<table class='days'>\";\n $head .= \"<td>\";\n $head .= \"Saturday\";\n $head .= \"</td>\";\n $head .= \"</table>\";\n $head .= \"</div>\";\n echo $head;\n }", "function mkMonthTitle(){\n\tif (!$this->monthNav){\n\t\t$out=\"<tr><td class=\\\"\".$this->cssMonthTitle.\"\\\" colspan=\\\"\".$this->monthSpan.\"\\\">\";\n\t\t$out.=$this->getMonthName().$this->monthYearDivider.$this->actyear;\n\t\t$out.=\"</td></tr>\\n\";\n\t}\n\telse{\n\t\t$out=\"<tr><td class=\\\"\".$this->cssMonthNav.\"\\\" colspan=\\\"2\\\">\";\n\t\tif ($this->actmonth==1) $out.=$this->mkUrl($this->actyear-1,\"12\");\n\t\telse $out.=$this->mkUrl($this->actyear,$this->actmonth-1);\n\t\t$out.=$this->monthNavBack.\"</a></td>\";\n\t\t$out.=\"<td class=\\\"\".$this->cssMonthTitle.\"\\\" colspan=\\\"\".($this->monthSpan-4).\"\\\">\";\n\t\t$out.=$this->getMonthName().$this->monthYearDivider.$this->actyear.\"</td>\";\n\t\t$out.=\"<td class=\\\"\".$this->cssMonthNav.\"\\\" colspan=\\\"2\\\">\";\n\t\tif ($this->actmonth==12) $out.=$this->mkUrl($this->actyear+1,\"1\");\n\t\telse $out.=$this->mkUrl($this->actyear,$this->actmonth+1);\n\t\t$out.=$this->monthNavForw.\"</a></td></tr>\\n\";\n\t}\nreturn $out;\n}", "public function nextMonth(): Month{\n $month = $this->month +1;\n $year=$this->year;\n if($month > 12){\n $month = 1;\n $year += 1;\n }\n return new Month($month, $year);\n }", "public function buildMonth()\n\t{\n\t\t$this->orderedDays = $this->getDaysInOrder();\n\t\t\n\t\t$this->monthName = $this->months[ ltrim( $this->month, '0') ];\n\t\t\n\t\t// start of whichever month we are building\n\t\t$start_of_month = getdate( mktime(12, 0, 0, $this->month, 1, $this->year ) );\n\t\t\n\t\t$first_day_of_month = $start_of_month['wday'];\n\t\t\n\t\t$days = $this->startDay - $first_day_of_month;\n\t\t\n\t\tif( $days > 1 )\n\t\t{\n\t\t\t// get an offset\n\t\t\t$days -= 7;\n\t\t\t\n\t\t}\n\n\t\t$num_days = $this->daysInMonth($this->month, $this->year);\n\t\t// 42 iterations\n\t\t$start = 0;\n\t\t$cal_dates = array();\n\t\t$cal_dates_style = array();\n\t\t$cal_events = array();\n\t\twhile( $start < 42 )\n\t\t{\n\t\t\t// off set dates\n\t\t\tif( $days < 0 )\n\t\t\t{\n\t\t\t\t$cal_dates[] = '';\n\t\t\t\t$cal_dates_style[] = 'calendar-empty';\n\t\t\t\t$cal_dates_data[] = '';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif( $days < $num_days )\n\t\t\t\t{\n\t\t\t\t\t// real days\n\t\t\t\t\t$cal_dates[] = $days+1;\n\t\t\t\t\tif( in_array( $days+1, $this->daysWithEvents ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$cal_dates_style[] = 'has-events';\n\t\t\t\t\t\t$cal_dates_data[] = $this->data[ $days+1 ];\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$cal_dates_style[] = '';\n\t\t\t\t\t\t$cal_dates_data[] = '';\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// surplus\n\t\t\t\t\t$cal_dates[] = '';\n\t\t\t\t\t$cal_dates_style[] = 'calendar-empty';\n\t\t\t\t\t$cal_dates_data[] = '';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t// increment and loop\n\t\t\t$start++;\n\t\t\t$days++;\n\t\t}\n\t\t\n\t\t// done\n\t\t$this->dates = $cal_dates;\n\t\t$this->dateStyles = $cal_dates_style;\n\t\t$this->dateData = $cal_dates_data;\n\t}", "public function month_list()\n\t{\n\t\t// -------------------------------------\n\t\t// Load 'em up\n\t\t// -------------------------------------\n\n\t\t$this->load_calendar_datetime();\n\t\t$this->load_calendar_parameters();\n\n\t\t// -------------------------------------\n\t\t// Prep the parameters\n\t\t// -------------------------------------\n\n\t\t$params = array(\n\t\t\tarray(\n\t\t\t\t'name'\t\t=> 'date_range_start',\n\t\t\t\t'required'\t=> FALSE,\n\t\t\t\t'type'\t\t=> 'date',\n\t\t\t\t'default'\t=> 'year-01-01'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name'\t\t=> 'date_range_end',\n\t\t\t\t'required'\t=> FALSE,\n\t\t\t\t'type'\t\t=> 'date'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name'\t\t=> 'limit',\n\t\t\t\t'required'\t=> FALSE,\n\t\t\t\t'type'\t\t=> 'integer',\n\t\t\t\t'default'\t=> 12\n\t\t\t)\n\t\t);\n\n//ee()->TMPL->log_item('Calendar: Processing parameters');\n\n\t\t$this->add_parameters($params);\n\n\t\t$today = $this->CDT->date_array();\n\n\t\t$this->CDT->change_ymd($this->P->value('date_range_start', 'ymd'));\n\t\t$this->CDT->set_default($this->CDT->datetime_array());\n\n\t\tif ($this->P->value('date_range_end') === FALSE)\n\t\t{\n\t\t\t$this->P->set(\n\t\t\t\t'date_range_end',\n\t\t\t\t$this->CDT->add_month($this->P->value('limit'))\n\t\t\t);\n\n\t\t\t$this->CDT->reset();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->P->set('limit', 9999);\n\t\t}\n\n\t\t$dir = (\n\t\t\t$this->P->value('date_range_end', 'ymd') >\n\t\t\t\t$this->P->value('date_range_start', 'ymd')\n\t\t) ? 1 : -1;\n\n\t\t$output = '';\n\t\t$count = 0;\n\n//ee()->TMPL->log_item('Calendar: Looping');\n\n\t\tdo\n\t\t{\n\t\t\t$vars['conditional']\t= array(\n\t\t\t\t'is_current_month'\t\t=>\t(\n\t\t\t\t\t$this->CDT->year == $today['year'] AND\n\t\t\t\t\t$this->CDT->month == $today['month']\n\t\t\t\t),\n\t\t\t\t'is_not_current_month'\t=>\t(\n\t\t\t\t\t$this->CDT->year == $today['year'] AND\n\t\t\t\t\t$this->CDT->month == $today['month']\n\t\t\t\t) ? FALSE : TRUE,\n\t\t\t\t'is_current_year'\t\t=>\t(\n\t\t\t\t\t$this->CDT->year == $today['year']\n\t\t\t\t) ? TRUE : FALSE,\n\t\t\t\t'is_not_current_year'\t=>\t(\n\t\t\t\t\t$this->CDT->year == $today['year']\n\t\t\t\t) ? FALSE : TRUE\n\t\t\t);\n\n\t\t\t$vars['single']\t= array(\n\t\t\t\t'year'\t=> $this->CDT->year,\n\t\t\t\t'month'\t=> $this->CDT->month\n\t\t\t);\n\n\t\t\t$vars['date']\t= array(\n\t\t\t\t'month'\t\t\t=> $this->CDT->datetime_array(),\n\t\t\t\t'date'\t\t\t=> $this->CDT->datetime_array(),\n\t\t\t);\n\n\t\t\t$output .= $this->swap_vars($vars, ee()->TMPL->tagdata);\n\t\t\t$this->CDT->add_month($dir);\n\t\t\t$count++;\n\t\t}\n\t\twhile (\n\t\t\t$count < $this->P->value('limit') AND\n\t\t\t$this->CDT->ymd < $this->P->value('date_range_end', 'ymd')\n\t\t);\n\n\t\treturn $output;\n\t}", "private function generateCurrentMonth()\n {\n date_default_timezone_set('UTC');\n \n return date(\"n\");\n }", "function getFirstDayInMonth()\n {\n return $this->firstDayInMonth;\n }", "public function getStartingDay() : \\DateTime{\n return new \\DateTime(\"{$this->year}-{$this->month}-01\");\n}", "public function testGetStartDateSep31() {\n $now = new \\DateTimeImmutable('2020-02-15');\n $line_item = $this->lineItemStub([], [\n 'interval_unit' => 'yearly',\n 'day_of_month' => '31',\n 'month' => '9',\n ]);\n $date = Utils::getStartDate($line_item, $now);\n $this->assertEqual('2020-09-30', $date->format('Y-m-d'));\n }", "public function testGetStartEndOfMonth() {\n // We only allow start dates in 31-day months.\n $now = new \\DateTimeImmutable('2019-09-15');\n $line_item = $this->lineItemStub([], [\n 'interval_unit' => 'monthly',\n 'day_of_month' => '-1',\n ]);\n $date = Utils::getStartDate($line_item, $now);\n $this->assertEqual('2019-09-30', $date->format('Y-m-d'));\n\n // Tricky value as there is a Feb 29.\n $now = new \\DateTimeImmutable('2020-02-15');\n $date = Utils::getStartDate($line_item, $now);\n $this->assertEqual('2020-02-29', $date->format('Y-m-d'));\n }", "public function print_blanc_calendar(string $month, int $year){\r\n \r\n $month_days = static::no_of_days_in_month($month, $year); \r\n $empty_days = $this->empty_days($month, $year);\r\n for ($i=1; $i<=$empty_days; $i++){\r\n echo \"<div class='cal_date empty_date'> </div>\";\r\n }\r\n \r\n \r\n for ($i=1; $i<=$month_days; $i++){\r\n echo \"<div class='cal_date cal_blanc_date'>\";\r\n echo $i;\r\n echo \"</div>\";\r\n }\r\n }", "public static function monthly() {return new ScheduleViewMode(4);}", "public function showCurrentMonthAction()\r\n {\r\n\t\t$startDate = date('Y-m-01');\r\n\t\t$endDate = date('Y-m-d');\r\n\t\t\r\n\t\t$period = ' - bieżący miesiąc';\r\n\t\t\r\n\t\tstatic::show($startDate, $endDate, $period);\r\n }", "static function add_eb_nom_start(): void {\r\n\t\tself::add_acf_inner_field(self::ebs, self::eb_nom_start, [\r\n\t\t\t'label' => 'Nomination period start',\r\n\t\t\t'type' => 'text',\r\n\t\t\t'instructions' => 'e.g. March 5 @ 9 a.m.',\r\n\t\t\t'required' => 1,\r\n\t\t\t'conditional_logic' => [\r\n\t\t\t\t[\r\n\t\t\t\t\t[\r\n\t\t\t\t\t\t'field' => self::qualify_field(self::eb_finished),\r\n\t\t\t\t\t\t'operator' => '!=',\r\n\t\t\t\t\t\t'value' => '1',\r\n\t\t\t\t\t],\r\n\t\t\t\t],\r\n\t\t\t],\r\n\t\t\t'wrapper' => [\r\n\t\t\t\t'width' => '',\r\n\t\t\t\t'class' => '',\r\n\t\t\t\t'id' => '',\r\n\t\t\t],\r\n\t\t]);\r\n\t}", "public function month($value) {\n return $this->setProperty('month', $value);\n }", "static function add_bod_nom_start(): void {\r\n\t\tself::add_acf_inner_field(self::bods, self::bod_nom_start, [\r\n\t\t\t'label' => 'Nomination period start',\r\n\t\t\t'type' => 'text',\r\n\t\t\t'instructions' => 'e.g. March 2 @ 9 a.m.',\r\n\t\t\t'required' => 1,\r\n\t\t\t'conditional_logic' => [\r\n\t\t\t\t[\r\n\t\t\t\t\t[\r\n\t\t\t\t\t\t'field' => self::qualify_field(self::bod_finished),\r\n\t\t\t\t\t\t'operator' => '!=',\r\n\t\t\t\t\t\t'value' => '1',\r\n\t\t\t\t\t],\r\n\t\t\t\t],\r\n\t\t\t],\r\n\t\t\t'wrapper' => [\r\n\t\t\t\t'width' => '',\r\n\t\t\t\t'class' => '',\r\n\t\t\t\t'id' => '',\r\n\t\t\t]\r\n\t\t]);\r\n\t}", "public function is_month()\n {\n }", "public function Header(){\n if(count($this->_groups)){\n $this->SetFont('Arial','B',8);\n $this->SetDrawColor(160,160,160);\n $this->SetTextColor(160,160,160);\n $grp = array();\n foreach(array_keys($this->_groups) as $field){\n if(empty($this->_groups[$field][\"currentMsg\"])||!$this->_changePage){\n $grp[] = \"{grp_$field}\";\n }else{\n $grp[] = $this->_groups[$field][\"currentMsg\"];\n }\n }\n $grp = join($grp,\" / \");\n $this->Cell(0,4,$grp,'B',1,'L');\n $this->Ln(4);\n }\n $date = new Date();\n $this->SetTextColor(100);\n $this->SetFillColor(245);\n $this->SetY(4);\n $this->SetFont('Arial','B',10);\n //$str = \"Elaborado el \".$date->getYear().\" - \".$date->getMonthName().\" - \".$date->getDay().\" del \".date(\"H:i:s\");\n $this->ln();\n $this->ln();\n $this->ln();\n $this->ln();\n $str = \"Fecha: \".$date->getYear().\" - \".$date->getMonth().\" - \".$date->getDay();\n $x = $this->GetStringWidth($str);\n $this->Cell($x+10,5,$str,0,0,'L');\n // $this->Cell(0,5,Session::getData(\"nomcaj\"),\"B\",\"R\",'R');\n $this->ln();\n $this->ln();\n $this->ln();\n $this->SetTextColor(0);\n $this->SetFont('Arial','B',12);\n if(is_array($this->_titulo)){\n foreach($this->_titulo as $titulo){\n $w=$this->GetStringWidth($titulo);\n $this->SetX(($this->w - $w) / 2);\n $this->Cell($w,5,$titulo,0,1,'C');\n }\n }else{\n $w=$this->GetStringWidth($this->_titulo);\n $this->SetX(($this->w - $w) / 2);\n $this->Cell($w,5,$this->_titulo,0,1,'C');\n }\n $this->Ln();\n $this->Ln();\n $this->SetTextColor(100);\n $this->SetFont('Arial','',9);\n $this->Cell(0,2,'',0,1,'C');\n //$this->Image(\"public/img/portal/logo_mercurio_report.jpg\",14,11,60,13);\n //$this->Image(\"public/img/portal/logo_sys_report.jpg\",140,11,60,15);\n if(!count($this->_groups)||$this->_changePage){\n $this->__Header();\n $this->_changePage = false;\n }else{\n $this->__Header();\n }\n }", "function set_start_month($startMonth,&$error)\r\n {\r\n if (strlen($startMonth) > 0 && $startMonth != \"Select A Month\")\r\n\t\t{\r\n if (!preg_match('/[a-zA-Z]/i', $startMonth))\r\n {\r\n //return a invalid css class\r\n\t\t\t return \"class='error'\";\r\n }\r\n else\r\n {\r\n $this->StartMonth = filter_var(trim($startMonth), FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH);\r\n\r\n //return a valid css class\r\n\t\t\t return \"class='valid'\";\r\n }\r\n \r\n }\r\n else\r\n {\r\n //return a invalid css class\r\n\t\t\t return \"class='error'\";\r\n }\r\n\r\n }", "public function Footer(){\n $this->SetFont('Arial','',8);\n $date = new Date();\n $this->SetTextColor(100);\n $this->SetFillColor(245);\n $this->SetY(-10);\n $str = \"Elaborado Por Mercurio\";\n $x = $this->GetStringWidth($str);\n $this->Cell($x+10,5,$str,'T',0,'L');\n $this->Cell(0,5,'Pagina '.$this->PageNo().' de {nb}','T',1,'R');\n }", "private function draw_svg_main_line($month){\n\t\t$yvalue = $this->axisheight - ($this->yscale * $this->monthlyrecordvolume[$month]);\n\t\t$xvalue = ($this->startingmonth - $month + 1)*$this->monthwidth;\n\t\t\n\t\tif($month == $this->startingmonth){\n\t\t\t$this->display_main_graph = \"\\t<path d=\\\"M$xvalue $yvalue \";\n\t\t}elseif(0 == $month){\n\t\t\t$this->display_main_graph .= \"L$xvalue $yvalue\\\" stroke-linejoin=\\\"round\\\" stroke=\\\"$this->main_graphline_color\\\" fill=\\\"none\\\"/>\\n\";\n\t\t}else{\n\t\t\t$this->display_main_graph .= \"L$xvalue $yvalue \";\n\t\t}\n\t\t\n\t\treturn;\n\t}", "private function setMonthNames()\n\t{\n\t\t$range = range(1,12);\n\t\t$return = array();\n\t\tforeach($range AS $key => $monthNum)\n\t\t{\n\t\t $fmt = datefmt_create ($this->locale, null, null, null, IntlDateFormatter::GREGORIAN, 'MMMM');\n\t\t\t$return[$monthNum] = datefmt_format( $fmt , mktime(12,0,0,$monthNum,1,date('Y')));\n\t\t}\n\n\t\treturn $return;\n\t}", "public function monthControl(){\n\t\t$month = date('m', time());\n\t\t\t\t\n\t\t//remakes $month to the month's name\n\t\tswitch ($month) {\n\t\t\tcase 1:\t$month = \"Januari\";\t\tbreak;\n\t\t\tcase 2:\t$month = \"Februari\";\tbreak;\n\t\t\tcase 3:\t$month = \"Mars\";\t\tbreak;\n\t\t\tcase 4:\t$month = \"April\";\t\tbreak;\n\t\t\tcase 5:\t$month = \"Maj\";\t\t\tbreak;\n\t\t\tcase 6:\t$month = \"Juni\";\t\tbreak;\n\t\t\tcase 7:\t$month = \"Juli\";\t\tbreak;\n\t\t\tcase 8:\t$month = \"Augusti\";\t\tbreak;\n\t\t\tcase 9:\t$month = \"September\";\tbreak;\n\t\t\tcase 10:$month = \"Oktober\";\t\tbreak;\n\t\t\tcase 11:$month = \"November\";\tbreak;\t\n\t\t\tcase 12:$month = \"December\";\tbreak;\n\t\t}\n\t\t\n\t\treturn $month;\n\t}", "public function beginLabelSheet ()\r\n {\r\n $this->label_column = 1;\r\n $this->label_row = 1;\r\n return '\r\n <div class=\"labelpage\">\r\n <div class=\"labelrow\">\r\n <div class=\"labelbody\">';\r\n }", "function showMonth($showNoMonthDays=false){\n$this->showNoMonthDays=$showNoMonthDays;\n$out=$this->mkMonthHead(); // this should remain first: opens table tag\n$out.=$this->mkMonthTitle(); // tr tag: month title and navigation\n$out.=$this->mkDatePicker(); // tr tag: month date picker (month and year selection)\n$out.=$this->mkWeekDays(); // tr tag: the weekday names\n\tif ($this->showNoMonthDays==false) $out.=$this->mkMonthBody(); // tr tags: the days of the month\n\telse $out.=$this->mkMonthBody(1); // tr tags: the days of the month\n$out.=$this->mkMonthFoot(); // this should remain last: closes table tag\nreturn $out;\n}", "function _putDataDetailSchedules0501s(&$pdf, $font, $item, $margin_line_top) {\n $x_col1 = 97;\n $x_col2 = 127;\n $x_col3 = 157;\n $x_col4 = 187;\n\n $pdf->SetFont($font, null, 8, true);\n $pdf->SetXY(37, 59.4 + $margin_line_top);\n if(!empty($item['CalculationDetail']['item_name_for5'])){\n $pdf->MultiCell(36, 5, $item['CalculationDetail']['item_name_for5'], 0, 'C');\n } else if(!empty($item['CalculationDetail']['item_name'])){\n $pdf->MultiCell(36, 5, $item['CalculationDetail']['item_name'], 0, 'C');\n }\n\n if (!empty($item['CalculationDetail']['account_beggining_sum']) &&\n strlen(number_format($item['CalculationDetail']['account_beggining_sum'])) < 14) {\n $this->_putBaseNumber($pdf, $font, $item['CalculationDetail']['account_beggining_sum'], $x_col1, 59.4 + $margin_line_top, 10, 5, 'R', 9);\n }\n\n if (!empty($item['CalculationDetail']['subtraction']) &&\n strlen(number_format($item['CalculationDetail']['subtraction'])) < 14) {\n $this->_putBaseNumber($pdf, $font, $item['CalculationDetail']['subtraction'], $x_col2, 59.4 + $margin_line_top, 10, 5, 'R', 9);\n }\n\n if (!empty($item['CalculationDetail']['adding']) &&\n strlen(number_format($item['CalculationDetail']['adding'])) < 14) {\n $this->_putBaseNumber($pdf, $font, $item['CalculationDetail']['adding'], $x_col3, 59.4 + $margin_line_top, 10, 5, 'R', 9);\n }\n\n if (!empty($item['next_sum']) &&\n strlen(number_format($item['next_sum'])) < 14) {\n $this->_putBaseNumber($pdf, $font, $item['next_sum'], $x_col4, 59.4 + $margin_line_top, 10, 5, 'R', 9);\n }\n }", "public function get_month_permastruct()\n {\n }", "public static function setDateFormatMonth()\n {\n self::$settings[0] = 'Y-m';\n }", "function display_month($month, $year) {\n\techo '<br/>';\n\techo \"month = $month, year = $year<br/>\"; \n\t//demo mktime, get unix timestamp for a date\n\t// mktime syntax: mktime($hour, $minute, $second, $month, $day, $year)\n\t$first_day_of_month = mktime(0, 0, 0, $month, 1, $year);\n\n\techo '<br/>';\n\n\techo \" \\n \\r The day's Unix time stamp is: \" . $first_day_of_month . \". &nbsp &nbsp This way of showing time is not user friendly!\";\n\techo '<br/>';\n\t// To display the timestamp in a user readable form \n\n\techo \" The first day of the \" . $month . \"&nbsp month of the year &nbsp\" . $year . \" is: &nbsp\" . date('Y-M-d', $first_day_of_month) . \"!\";\n\techo '<br/>';\n\techo \" The day is: \" . date('Y-M-d H:i:sa', $first_day_of_month) . \"!\";\n\n}", "function setLineBetweenColumns() {\t \r\n\t \t$this->lineBetweenColumns = true;\t\r\n\t}", "function monthPeriod_start_end($begin, $end)\n{\n $begin = (new DateTime($begin.'-01-01'))->modify('first day of this month');\n $end = (new DateTime($end.'-12-01 +1 month'))->modify('first day of this month');\n $daterange = new DatePeriod($begin, new DateInterval('P1M'), $end);\n\n foreach ($daterange as $date) {\n $dates[] = $date->format(\"m\");\n }\n return $dates;\n}", "function Footer()\n {\n $this->SetY(-12);\n $this->SetFont('Arial','B',5); \n $this->Cell(505,10,utf8_decode(\"TI. Fecha de creación: \").date(\"d-m-Y H:i\").\" \".\"Pag \".$this->PageNo(),0,0,'C'); \n }", "function Footer()\n {\n $this->SetY(-12);\n $this->SetFont('Arial','B',5); \n $this->Cell(505,10,utf8_decode(\"TI. Fecha de creación: \").date(\"d-m-Y H:i\").\" \".\"Pag \".$this->PageNo(),0,0,'C'); \n }", "public function __construct()\n {\n parent::__construct('P', 'mm', $this->paperFormat);\n\n $this->incrementY = 6;\n $this->SetMargins(0, 0);\n\n $this->SetFont('Times', '', 14);\n $this->SetAutoPageBreak(false);\n $this->AddPage();\n }", "public function Header()\r\n\t{\r\n\t\t$this->Ln();\r\n\t\t$this->SetFont('Arial','',14);\r\n\t\t$this->Cell(170,7,\"Date :: \". $this->today_date ,1,0,'C');\r\n\t\t$this->Ln();\r\n\t\t$this->SetFont('Arial','',14); \r\n\t\t$this->MultiCell(170,8,\"Room Things Report \\n\".$this->title,1,'C');\r\n\t\t$this->Ln(5);\r\n\r\n\t}", "function BeginMonth($time,$week,$backwards) {\n\tif ($backwards > 0) { $time = $time - ($backwards * 604800); } \n\t$month = date(\"n\", $time);\n\t$year = date(\"Y\", $time);\n\t$firstday = mktime(12,0,0,$month,1,$year);\n\tif ($week != NULL) { $firstday = BeginWeek($firstday); }\n\treturn($firstday);\n}", "function blank_cell($num=1, $css='', $extras='') {\n $this->end_cell();\n\n if (!is_numeric($num)) {\n $num = 1;\n }\n\n for($i=1;$i<=$num;$i++) {\n $this->new_cell($css,$extras);\n echo '&nbsp;';\n }\n }", "public function setToFirstDayOfMonth(int $month = null) : Time /*PHP8:static*/\n {\n if ($this->frozen) {\n throw new \\RuntimeException(get_class($this) . ' is read-only, frozen.');\n }\n if ($month !== null) {\n if ($month < 1 || $month > 12) {\n throw new \\InvalidArgumentException('Arg month[' . $month . '] isn\\'t null or 1 through 12.');\n }\n $mnth = $month;\n }\n else {\n $mnth = (int) $this->format('m');\n }\n return $this->setDate(\n (int) $this->format('Y'),\n $mnth,\n 1\n );\n }", "function\tsetupHeaderMid( $_frm) {\n\n\t\t$_frm->addLine( \"Kommissionierung\", $this->defParaFmt) ;\n\t\t$_frm->addLine( sprintf( \"Kommission Nr. %s, %s\", $this->myCustomerCommission->CustomerCommissionNo, $this->myCustomerCommission->Datum), $this->defParaFmt) ;\n\n\t\t/**\n\t\t * draw the separating line between the header and the document content\n\t\t */\n\t\t$this->myfpdf->Line( $_frm->horOffs, $_frm->verOffs + $_frm->height + mmToPt( 1.0),\n\t\t\t\t\t\t\t\t$_frm->horOffs + $_frm->width, $_frm->verOffs + $_frm->height + mmToPt( 1.0)) ;\n\t}", "public function setNearday(){\n\t\n\t$this_month_day=$this->getMonth_day();\n\t\n\tif($this->day!=1 && $this->day!=$this_month_day){\n\t\t\n\t\t$this->predate=$this->makeDate($this->month,$this->day-1);\n\t\t\n\t\t$this->nextdate=$this->makeDate($this->month,$this->day+1);\n\t\t\n\t\t\n\t\t\n\t}elseif($this->day==1){\n\t\t\n\t\t$pre_month=$this->month==1?12:($this->month-1);\n\t\t\n\t\t$pre_month_day=$this->getMonth_day($pre_month);\n\t\t\n\t\t$this->predate=$this->makeDate($pre_month,$pre_month_day);\n\t\t\n\t\t$this->nextdate=$this->makeDate($this->month,2);\n\t\t\n\t}else{\n\t\t\n\t\t$this->predate=$this->makeDate($this->month,$this->day-1);\n\t\t\n\t\t$next_month=$this->month==12?1:($this->month+1);\n\t\t\n\t\t$this->nextdate=$this->makeDate($next_month,1);\n\n\t\t}\n\t\t\n\treturn;\n\n\t}", "function _putDataSub51Schedules0501s(&$pdf, $font, $item, $margin_line_top) {\n $x_col1 = 97;\n $x_col2 = 127;\n $x_col3 = 157;\n $x_col4 = 187;\n\n $pdf->SetFont($font, null, 8, true);\n $pdf->SetXY(37, 59.4 + $margin_line_top);\n $pdf->MultiCell(36, 5, $item['Sub51']['item_name'], 0, 'C');\n\n if (!empty($item['Sub51']['account_beggining_sum']) &&\n strlen(number_format($item['Sub51']['account_beggining_sum'])) < 14) {\n $this->_putBaseNumber($pdf, $font, $item['Sub51']['account_beggining_sum'], $x_col1, 59.4 + $margin_line_top, 10, 5, 'R', 9);\n }\n\n if (!empty($item['Sub51']['subtraction_sum']) &&\n strlen(number_format($item['Sub51']['subtraction_sum'])) < 14) {\n $this->_putBaseNumber($pdf, $font, $item['Sub51']['subtraction_sum'], $x_col2, 59.4 + $margin_line_top, 10, 5, 'R', 9);\n }\n\n if (!empty($item['Sub51']['adding_sum']) &&\n strlen(number_format($item['Sub51']['adding_sum'])) < 14) {\n $this->_putBaseNumber($pdf, $font, $item['Sub51']['adding_sum'], $x_col3, 59.4 + $margin_line_top, 10, 5, 'R', 9);\n }\n\n if (!empty($item['next_sum']) &&\n strlen(number_format($item['next_sum'])) < 14) {\n $this->_putBaseNumber($pdf, $font, $item['next_sum'], $x_col4, 59.4 + $margin_line_top, 10, 5, 'R', 9);\n }\n }", "function _buildMay()\n {\n \n $this->_addHoliday(\n 'May',\n $this->_year . '-05-01',\n 'May\\'s Day'\n );\n \n }", "private function set_date()\r\n\t{\r\n\t\tif ($this->month > 12)\r\n\t\t{\r\n\t\t\t$this->month=1;\r\n\t\t\t$this->year++;\r\n\t\t}\r\n\r\n\t\tif ($this->month < 1)\r\n\t\t{\r\n\t\t\t$this->month=12;\r\n\t\t\t$this->year--;\r\n\t\t}\r\n\r\n\t\tif ($this->year > 2037) $this->year = 2037;\r\n\t\tif ($this->year < 1971) $this->year = 1971;\r\n\t}", "public function showPreviousMonthAction()\r\n {\r\n\t\t$startDate = date('Y-m-d', strtotime(\"first day of last month\"));\r\n\t\t$endDate = date('Y-m-d', strtotime(\"last day of last month\"));\r\n\t\t\r\n\t\t$period = ' - poprzedni miesiąc';\r\n\t\t\r\n\t\tstatic::show($startDate, $endDate, $period);\r\n }", "function Header()\n\t\t{\n\t\t\t$this->SetFont('Helvetica','B',18);\n\t\t\t$this->SetTextColor(184,10,10);\n\t\t\t$this->Cell(30);\n\t\t\t$this->Cell(120,10,utf8_decode(\"Mensajes Contestados\"),0,0,'C');\n\t\t\t$this->Ln(20);\n\t\t}", "public function start_sheet($columns) {\n if ($this->sheetstarted) {\n echo \",\";\n } else {\n $this->sheetstarted = true;\n }\n $this->sheetdatadded = false;\n echo \"[\";\n }", "function nextMonth($interval=1){ return $this->_getDate(0,$interval); }", "function Header() {\r\n\r\n $this->setPrintFooter(false);\r\n //$this->setFooterData(array(0,64,0), array(0,64,128));\r\n //$this->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);\r\n //$this->SetAutoPageBreak(true, PDF_MARGIN_BOTTOM);\r\n\r\n $this->SetXY(5,5);\r\n\r\n\r\n if ($this->objParam->getParametro('desde') == '' && $this->objParam->getParametro('hasta') != '') {\r\n $cabecera_datos = ' <td style=\"width: 200px; text-align: center; vertical-align: middle; height: 42px;\"><strong>Departamento:</strong> Contabilidad <br /><strong>Desde: </strong>01/01/'.$this->objParam->getParametro('gestion').' <strong>Hasta:</strong> '.$this->objParam->getParametro('hasta').'<br /><strong>Gesti&oacute;n:</strong>'.$this->objParam->getParametro('gestion').'</td>\r\n ';\r\n } elseif ($this->objParam->getParametro('hasta') == '' && $this->objParam->getParametro('desde') != '') {\r\n $cabecera_datos = '\r\n <td style=\"width: 200px; text-align: center; vertical-align: middle; height: 42px;\"><strong>Departamento:</strong> Contabilidad <br /><strong>Desde: </strong>'.$this->objParam->getParametro('desde').' <strong>Hasta:</strong> 31/12/'.$this->objParam->getParametro('gestion').'<br /><strong>Gesti&oacute;n:</strong> '.$this->objParam->getParametro('gestion').'</td>\r\n\r\n ';\r\n } elseif ($this->objParam->getParametro('hasta') != '' && $this->objParam->getParametro('desde') != '') {\r\n $cabecera_datos = '\r\n <td style=\"width: 200px; text-align: center; vertical-align: middle; height: 42px;\"><strong>Departamento:</strong> Contabilidad <br /><strong>Desde: </strong>'.$this->objParam->getParametro('desde').' <strong>Hasta:</strong> '.$this->objParam->getParametro('hasta').'<br /><strong>Gesti&oacute;n:</strong> '.$this->objParam->getParametro('gestion').'</td>\r\n ';\r\n } elseif ($this->objParam->getParametro('hasta') == '' && $this->objParam->getParametro('desde') == '') {\r\n $cabecera_datos = '\r\n <td style=\"width: 200px; text-align: center; vertical-align: middle; height: 42px;\"><strong>Departamento:</strong> Contabilidad <br /><strong>Desde: </strong> 01/01/'.$this->objParam->getParametro('gestion').' <strong>Hasta:</strong> 31/12/'.$this->objParam->getParametro('gestion').'<br /><strong>Gesti&oacute;n:</strong> '.$this->objParam->getParametro('gestion').'</td>\r\n ';\r\n }\r\n\r\n\r\n $cabecera = '<font size=\"8\">\r\n <table style=\"height: 20px;\" border = \"1\" cellspacing=\"0\" cellpadding=\"2\" >\r\n <tbody>\r\n <tr style=\"height: 40px;\">\r\n <td style=\"width: 100px; height: 42px;\">&nbsp;<img style=\"width: 80px;\" align=\"middle\" src=\"../../../lib/imagenes/Logo_libro_mayor.jpg\" alt=\"Logo\"></td>\r\n <td style=\"width: 655px; text-align: center; vertical-align: middle; height: 42px;\"><h1>REPORTE <br>LIBRO MAYOR</h1></td>\r\n '.$cabecera_datos.'\r\n </tr>\r\n </tbody>\r\n </table>\r\n </font>\r\n ';\r\n\r\n $this->writeHTML($cabecera, true, 0, true, 0);\r\n\r\n //$this->SetAutoPageBreak(true, 2);\r\n\r\n }", "function zeroMonth($readings) {\n\t$Dates = explode(\"/\", $readings);\n\t$trim_zero = ltrim($Dates[1], '0');\n\t$zero_month = $trim_zero - 1;\n\n\t$Dates_formatted = [];\n\t$Dates_formatted[] = $Dates[2];\n\t$Dates_formatted[] = $zero_month;\n\t$Dates_formatted[] = $Dates[0];\n\n\treturn $Dates_formatted;\n}", "public function setStartMonthYear($val)\n {\n $this->_propDict[\"startMonthYear\"] = $val;\n return $this;\n }", "function calendar($date) {\r\n\t //If no parameter is passed use the current date.\r\n\t if($date == null)\r\n\t $date = getDate();\r\n\r\n\t $day \t\t\t= $date[\"mday\"];\r\n\t $month \t\t= $date[\"mon\"];\r\n\t $month_name \t= $date[\"month\"];\r\n\t $year \t\t\t= $date[\"year\"];\r\n\r\n\t $this_month \t= getDate(mktime(0, 0, 0, $month, 1, $year));\r\n\t $next_month \t= getDate(mktime(0, 0, 0, $month + 1, 1, $year));\r\n\r\n\t //Find out when this month starts and ends.\r\n\t $first_week_day = $this_month[\"wday\"];\r\n\t $days_in_this_month = round(($next_month[0] - $this_month[0]) / (60 * 60 * 24));\r\n\r\n\t $calendar_html = \"<table width='100%'>\";\r\n\t $calendar_html = $calendar_html.\"<tr>\t<td class='perp_report_header' colspan='7' /> Month: \".$month_name.\" / Year: \".$year.\"</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\";\r\n\t $calendar_html = $calendar_html.\"<tr>\t<td class='perp_report_subheader'>Sunday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='perp_report_subheader'>Monday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='perp_report_subheader'>Tuesday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='perp_report_subheader'>Wednesday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='perp_report_subheader'>Thursday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='perp_report_subheader'>Friday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='perp_report_subheader'>Saterday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t\t<tr>\";\r\n\r\n\t// Fill the first week of the month with the appropriate number of blanks.\r\n\t\t\t$gapcounter = 0;\r\n\t\t\tfor($week_day = 0; $week_day < $first_week_day; $week_day++) {\r\n\t\t\t\t\t$gapcounter = $gapcounter + 1;\r\n\t\t\t\t}\r\n\t\t\t$calendar_html = $calendar_html.\"<td class='perp_report_cell' colspan='\".$gapcounter.\"'></td>\";\t\r\n\t\r\n\t// Draw Calendar Elements\r\n\t\t\t// I forget!\t\t\t\t\r\n\t $week_day = $first_week_day;\r\n\t for($day_counter = 1; $day_counter <= $days_in_this_month; $day_counter++) {\r\n\t\t\t\t\t// Determine Day of the week\r\n\t\t\t\t\t$week_day %= 7;\r\n\t\t\t\t\r\n\t\t\t\t\t// If this variable equals 0, we will need to start a new row.\r\n\t\t\t\t\tif($week_day == 0) {\r\n\t\t\t\t\t\t\t$calendar_html = $calendar_html.\"</tr><tr>\";\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$datetopull = $year.\"/\".$month.\"/\".$day_counter;\r\n\t\t\t\t\t$innercell = \"<TABLE width='100%' style='margin-bottom:0;margin-top:0;'><tr><td class='perp_report_fieldname'>Date:</td><td class='perp_report_fieldcontent'>\".$datetopull.\"</td></tr>\";\r\n\t\t\t\t\t//Now Get inspection List for this day.....\r\n\t\t\t\t\t$objconn = mysqli_connect($GLOBALS['hostdomain'], $GLOBALS['hostusername'], $GLOBALS['passwordofdatabase'], $GLOBALS['nameofdatabase']);\t\t\t\t\t\r\n\t\t\t\t\tif (mysqli_connect_errno()) {\r\n\t\t\t\t\t\t\t// there was an error trying to connect to the mysql database\r\n\t\t\t\t\t\t\t//printf(\"connect failed: %s\\n\", mysqli_connect_error());\r\n\t\t\t\t\t\t\texit();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t$sql = \"SELECT * FROM tbl_139_337_main WHERE 139337_date = '\".$datetopull.\"' ORDER BY 139337_time\";\r\n\t\t\t\t\t\t\t//echo \"The SQL Statement is :\".$sql.\"<br>\";\r\n\t\t\t\t\t\t\t$objrs = mysqli_query($objconn, $sql);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\tif ($objrs) {\r\n\t\t\t\t\t\t\t\t\t$number_of_rows = mysqli_num_rows($objrs);\r\n\t\t\t\t\t\t\t\t\twhile ($objarray = mysqli_fetch_array($objrs, MYSQLI_ASSOC)) {\r\n\t\t\t\t\t\t\t\t\t\t$counter = $counter + 1;\r\n\t\t\t\t\t\t\t\t\t\t\t$counter = $counter + 1;\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// So the Archieved or Duplicate Narrowing...\r\n\t\t\t\t\t\t\t\t\t\t\t$displayrow\t\t\t\t\t= 0;\r\n\t\t\t\t\t\t\t\t\t\t\t$displayrow_a\t\t\t\t= 0;\r\n\t\t\t\t\t\t\t\t\t\t\t$displayrow_b\t\t\t\t= 0;\r\n\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t$tmpdiscrepancyid\t\t\t= $objarray['Discrepancy_id'];\r\n\t\t\t\t\t\t\t\t\t\t\t$tmpdiscrepancycondition\t= $objarray['discrepancy_checklist_id'];\t\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$displayrow_a\t\t\t\t= preflights_tbl_139_337_main_a_yn($tmpdiscrepancyid,0); // 0 will not return a row even if it is archieved.\r\n\t\t\t\t\t\t\t\t\t\t\t//$displayrow_d\t\t\t\t= preflights_tbl_139_327_main_sub_d_d_yn($tmpdiscrepancyid,0); // 0 will not return a row even if it is duplicate.\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tif($displayrow_a == 1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$displayrow = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif($displayrow_d == 1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$displayrow = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\tif($displayrow_d == 1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$displayrow = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif($displayrow_a == 1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$displayrow = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\tif ($displayrow == 1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$innercell = $innercell.\"<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<form style='margin-bottom:0;' action='part139337_report_display.php' method='POST' name='reportform' id='reportform' target='WLHMWindow' onsubmit='window.open('', 'WLHMWindow', 'width=800,height=600,status=no,resizable=no,scrollbars=yes')'>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td colspan='2' class='formoptionsubmit'>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type='hidden' name='recordid'\tID='recordid' \t\t\tvalue=\".$tmpdiscrepancyid.\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type='submit' value='D:\".$tmpdiscrepancyid.\"' name='b1' ID='b1' class='makebuttonlooklikelargetext' style='width:100%;'>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</form>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t$innercell = $innercell.\"</table>\";\t\r\n\t\t\t\t\tif ($counter == 0) {\r\n\t\t\t\t\t\t\t$innercell = $innercell.\"Nothing Reported\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t$calendar_html = $calendar_html.\"<td align=\\\"center\\\" valign='top' class='perp_report_activecell'>&nbsp;\".$innercell.\"</td>\";\r\n\t\t\t\t\t$week_day++;\r\n\t\t\t\t\t$counter = 0;\r\n\t\t\t\t}\r\n\r\n\t $calendar_html .= \"</tr>\";\r\n\t $calendar_html .= \"</table>\";\r\n\r\n\t return($calendar_html);\r\n\t }", "function addPageSchedules4(&$pdf, $font, $template, $data_sub_plus, $data_sub_minus, $datas, $first=false)\n {\n $size_of_sub_plus = sizeof($data_sub_plus);\n $size_of_sub_minus = sizeof($data_sub_minus);\n\n $Term = ClassRegistry::init('Term');\n $target_day29 ='2017/04/01';\n\n //Term.account_beggining\n $term = $Term->getCurrentTerm();\n\n if(strtotime($target_day29) <= strtotime($term['Term']['account_end'])){\n\n if ($size_of_sub_plus <= 5 && $size_of_sub_minus <= 4) {\n if (empty($first)) {\n $this->putDataAddPageSchedules4s($pdf, $font, $datas);\n }\n $this->putDataSubPlus4s($pdf, $font, $data_sub_plus);\n $this->putDataSubMinus4s($pdf, $font, $data_sub_minus);\n } else if($size_of_sub_plus > 5 && $size_of_sub_minus <= 4) {\n $data_sub_plus_1 = array_slice($data_sub_plus, 0, 5);\n $data_sub_plus_2 = array_slice($data_sub_plus, 5);\n $data_sub_plus_1 = array_slice($data_sub_plus, 0, 5);\n $data_sub_plus_2 = array_slice($data_sub_plus, 5);\n if (empty($first)) {\n $this->putDataAddPageSchedules4s($pdf, $font, $datas);\n }\n $this->putDataSubPlus4s($pdf, $font, $data_sub_plus_1);\n $this->putDataSubMinus4s($pdf, $font, $data_sub_minus);\n $pdf->AddPage();\n $pdf->useTemplate($template, null, null, null, null, true);\n $this->putDataAddPageSchedules4s($pdf, $font, $datas);\n $this->putDataSubPlus4s($pdf, $font, $data_sub_plus_2);\n $this->putDataSubMinus4s($pdf, $font, $data_sub_minus);\n } else if($size_of_sub_plus <= 5 && $size_of_sub_minus > 4) {\n $data_sub_minus_1 = array_slice($data_sub_minus, 0, 4);\n $data_sub_minus_2 = array_slice($data_sub_minus, 4);\n if (empty($first)) {\n $this->putDataAddPageSchedules4s($pdf, $font, $datas);\n }\n $this->putDataSubPlus4s($pdf, $font, $data_sub_plus);\n $this->putDataSubMinus4s($pdf, $font, $data_sub_minus_1);\n $pdf->AddPage();\n $pdf->useTemplate($template, null, null, null, null, true);\n $this->putDataAddPageSchedules4s($pdf, $font, $datas);\n $this->putDataSubPlus4s($pdf, $font, $data_sub_plus);\n $this->putDataSubMinus4s($pdf, $font, $data_sub_minus_2);\n } else {\n $data_sub_plus_1 = array_slice($data_sub_plus, 0, 5);\n $data_sub_plus_2 = array_slice($data_sub_plus, 5);\n $data_sub_minus_1 = array_slice($data_sub_minus, 0, 4);\n $data_sub_minus_2 = array_slice($data_sub_minus, 4);\n if (empty($first)) {\n $this->putDataAddPageSchedules4s($pdf, $font, $datas);\n }\n $this->putDataSubPlus4s($pdf, $font, $data_sub_plus_1);\n $this->putDataSubMinus4s($pdf, $font, $data_sub_minus_1);\n $pdf->AddPage();\n $pdf->useTemplate($template, null, null, null, null, true);\n $this->addPageSchedules4($pdf, $font, $template, $data_sub_plus_2, $data_sub_minus_2, $datas);\n }\n } else {\n if ($size_of_sub_plus <= 4 && $size_of_sub_minus <= 4) {\n if (empty($first)) {\n $this->putDataAddPageSchedules4s($pdf, $font, $datas);\n }\n $this->putDataSubPlus4s($pdf, $font, $data_sub_plus);\n $this->putDataSubMinus4s($pdf, $font, $data_sub_minus);\n } else if($size_of_sub_plus > 4 && $size_of_sub_minus <= 4) {\n $data_sub_plus_1 = array_slice($data_sub_plus, 0, 4);\n $data_sub_plus_2 = array_slice($data_sub_plus, 4);\n if (empty($first)) {\n $this->putDataAddPageSchedules4s($pdf, $font, $datas);\n }\n $this->putDataSubPlus4s($pdf, $font, $data_sub_plus_1);\n $this->putDataSubMinus4s($pdf, $font, $data_sub_minus);\n $pdf->AddPage();\n $pdf->useTemplate($template, null, null, null, null, true);\n $this->putDataAddPageSchedules4s($pdf, $font, $datas);\n $this->putDataSubPlus4s($pdf, $font, $data_sub_plus_2);\n $this->putDataSubMinus4s($pdf, $font, $data_sub_minus);\n } else if($size_of_sub_plus <= 4 && $size_of_sub_minus > 4) {\n $data_sub_minus_1 = array_slice($data_sub_minus, 0, 4);\n $data_sub_minus_2 = array_slice($data_sub_minus, 4);\n if (empty($first)) {\n $this->putDataAddPageSchedules4s($pdf, $font, $datas);\n }\n $this->putDataSubPlus4s($pdf, $font, $data_sub_plus);\n $this->putDataSubMinus4s($pdf, $font, $data_sub_minus_1);\n $pdf->AddPage();\n $pdf->useTemplate($template, null, null, null, null, true);\n $this->putDataAddPageSchedules4s($pdf, $font, $datas);\n $this->putDataSubPlus4s($pdf, $font, $data_sub_plus);\n $this->putDataSubMinus4s($pdf, $font, $data_sub_minus_2);\n } else {\n $data_sub_plus_1 = array_slice($data_sub_plus, 0, 4);\n $data_sub_plus_2 = array_slice($data_sub_plus, 4);\n $data_sub_minus_1 = array_slice($data_sub_minus, 0, 4);\n $data_sub_minus_2 = array_slice($data_sub_minus, 4);\n if (empty($first)) {\n $this->putDataAddPageSchedules4s($pdf, $font, $datas);\n }\n $this->putDataSubPlus4s($pdf, $font, $data_sub_plus_1);\n $this->putDataSubMinus4s($pdf, $font, $data_sub_minus_1);\n $pdf->AddPage();\n $pdf->useTemplate($template, null, null, null, null, true);\n $this->addPageSchedules4($pdf, $font, $template, $data_sub_plus_2, $data_sub_minus_2, $datas);\n }\n }\n }", "public function getMonthAsTable()\n {\n // Get all days to put in calendar\n $days = $this->getDaysAsArray();\n\n // Start table\n $html = \"<table class='table'><thead><tr>\";\n\n // Add weekday names to table head\n foreach (array_keys($this->weekdayIndexes) as $key) {\n $html .= \"<th>{$key}</th>\";\n }\n $html .= \"</tr></thead><tbody>\";\n\n // Add day numbers to table body\n for ($i = 0; $i < count($days); $i++) {\n // New row at start of week\n $html .= $i % 7 === 0 ? \"<tr>\" : \"\";\n\n if (($days[$i] > $i + 7) || ($days[$i] < $i - 7)) {\n // Add class 'outside' if number is part of previous or next month\n $html .= \"<td class='outside'>\";\n } elseif ($i % 7 === 6) {\n // Add class 'red' to Sundays\n $html .= \"<td class='red'>\";\n } else {\n $html .= \"<td>\";\n }\n $html .= \"{$days[$i]}</td>\";\n // Close row at end of week\n $html .= $i % 7 === 6 ? \"</tr>\" : \"\";\n }\n $html .= \"</tbody></table>\";\n return $html;\n }", "function draw_calendar(){\r\n \r\n $year = date(\"Y\");\r\n $monthCurrent = date(\"m\");\r\n $monthNext1 = date(\"m\", strtotime('+1 month'));\r\n $monthNext2 = date(\"m\", strtotime('+2 month'));\r\n $monthNext3 = date(\"m\", strtotime('+3 month'));\r\n $monthNext4 = date(\"m\", strtotime('+4 month'));\r\n $monthNext5 = date(\"m\", strtotime('+5 month'));\r\n\r\n $monthCurrentStr = date(\"M\");\r\n $monthNext1Str = date(\"M\", strtotime('+1 month'));\r\n $monthNext2Str = date(\"M\", strtotime('+2 month'));\r\n $monthNext3Str = date(\"M\", strtotime('+3 month'));\r\n $monthNext4Str = date(\"M\", strtotime('+4 month'));\r\n $monthNext5Str = date(\"M\", strtotime('+5 month'));\r\n\r\n\r\n $numberofday1 = cal_days_in_month(CAL_GREGORIAN,$monthCurrent , $year);\r\n $numberofday2 = cal_days_in_month(CAL_GREGORIAN,$monthNext1 , $year);\r\n $numberofday3 = cal_days_in_month(CAL_GREGORIAN,$monthNext2 , $year);\r\n $numberofday4 = cal_days_in_month(CAL_GREGORIAN,$monthNext3 , $year);\r\n $numberofday5 = cal_days_in_month(CAL_GREGORIAN,$monthNext4 , $year);\r\n $numberofday6 = cal_days_in_month(CAL_GREGORIAN,$monthNext5 , $year);\r\n\r\n \r\n\t/* draw table */\r\n $calendar = '<table cellpadding=\"0\" cellspacing=\"2\" style=\"width:100%;\" class=\"calendar\"><thead>';\r\n $calendar.= '<tr>';\r\n $calendar.= '<th colspan=\"3\"> <center>'.$monthCurrentStr.'</center> </th>';\r\n $calendar.= '<th colspan=\"3\"> <center>'.$monthNext1Str.'</center> </th>';\r\n $calendar.= '<th colspan=\"3\"> <center>'.$monthNext2Str.'</center> </th>';\r\n $calendar.= '<th colspan=\"3\"> <center>'.$monthNext3Str.'</center> </th>';\r\n $calendar.= '<th colspan=\"3\"> <center>'.$monthNext4Str.'</center> </th>';\r\n $calendar.= '<th colspan=\"3\"> <center>'.$monthNext5Str.'</center> </th>';\r\n \r\n \r\n\r\n\t\r\n\t/* final row */\r\n $calendar.= '</tr></head>'; \r\n $calendar.= '<tbody><tr>';\r\n // for($i = 1 ,$j = 1 ,$k = 1 ; $i <= $numberofday1, $j = $numberofday2, $k <= $numberofday3 ; $i++, $j++, $k++)\r\n $i = 0 ;\r\n $j = 0;\r\n $k = 0;\r\n $i1 = 0 ;\r\n $j1 = 0;\r\n $k1 = 0;\r\n $u = 0;\r\n\r\n \r\n while( $i <= $numberofday1 || $j <= $numberofday2 || $k <= $numberofday3 || $i1 <= $numberofday4 || $j1 <= $numberofday5 || $k1 <= $numberofday6 )\r\n { $i++;\r\n $j++;\r\n $k++;\r\n $i1++;\r\n $j1++;\r\n $k1++;\r\n $myDay = 0;\r\n $u=0;\r\n if($i <= $numberofday1 ){\r\n\r\n //Verification des jours feries\r\n\r\n $todayCheckHoliday1 = mktime(0, 0, 0, $monthCurrent, $i, $year); \r\n $today1 = unixtojd(mktime(0, 0, 0, $monthCurrent, $i, $year));\r\n $today = cal_from_jd($today1, CAL_GREGORIAN);\r\n //$todayCheckHoliday = new DateTime($year.'-'.$monthCurrent.'-'.$i.' 00:00:00');\r\n // echo $holidays[1];\r\n // echo $todayCheckHoliday;\r\n \r\n \r\n //////////////////////////////////////////////////\r\n if(($today[\"abbrevdayname\"] == \"Sun\") || ($today[\"abbrevdayname\"] == \"Sat\")){ $color = \"gray\";}\r\n else {$color = \"\";}\r\n\r\n $calendar.= '<td class=\"small\" > '.$i.' </td>';\r\n $calendar.= '<td class=\"small\" > '.$today[\"abbrevdayname\"].' </td>'; \r\n $calendar.= '<td class=\"caseBloque\" id=\"'.$year.'-'.$monthCurrent.'-'.$i.'\" style=\"background-color:'.$color.'\" onclick=\"myEvent(this)\">';\r\n $calendar.= '<div class=\"row\"><div class=\"col-sm-2\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthCurrent.'-'.$i.':1\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-2\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthCurrent.'-'.$i.':2\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-2\"></div></div></td>';\r\n \r\n }\r\n\r\n else{\r\n\r\n $calendar.= '<td class=\"small\" style=\"background-color:'.$color.'\" ></td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> </td>';\r\n $calendar.= '<td style=\"\"> </td>';\r\n }\r\n\r\n if($j <= $numberofday2 ){\r\n\r\n $todayCheckHoliday1 = mktime(0, 0, 0, $monthNext1, $j, $year);\r\n $todayCheckHoliday = new DateTime($year.'-'.$monthNext1.'-'.$j.' 00:00:00');\r\n\r\n $today1 = unixtojd(mktime(0, 0, 0, $monthNext1,$j, $year));\r\n $today = cal_from_jd($today1, CAL_GREGORIAN);\r\n\r\n if(($today[\"abbrevdayname\"] == \"Sun\") || ($today[\"abbrevdayname\"] == \"Sat\")){ $color = \"gray\";}\r\n else {$color = \"\";}\r\n\r\n\r\n $calendar.= '<td class=\"small\" style=\"\" > '.$j.' </td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> '.$today[\"abbrevdayname\"].' </td>';\r\n $calendar.= '<td class=\"caseBloque\" id=\"'.$year.'-'.$monthNext1.'-'.$j.'\" style=\"background-color:'.$color.'\" onclick=\"myEvent(this)\">';\r\n $calendar.= '<div class=\"row\"><div class=\"col-sm-2\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext1.'-'.$j.':1\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-1\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext1.'-'.$j.':2\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-2\"></div></div></td>';\r\n \r\n }\r\n else{\r\n\r\n $calendar.= '<td class=\"small\" style=\"background-color:\" ></td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> </td>';\r\n $calendar.= '<td style=\"\"> </td>';\r\n }\r\n if($k <= $numberofday3 ){\r\n\r\n $today1 = unixtojd(mktime(0, 0, 0,$monthNext2, $k, $year));\r\n $today = cal_from_jd($today1, CAL_GREGORIAN);\r\n\r\n if(($today[\"abbrevdayname\"] == \"Sun\") || ($today[\"abbrevdayname\"] == \"Sat\")) { $color = \"gray\";}\r\n else {$color = \"\";}\r\n\r\n $calendar.= '<td class=\"small\" style=\"\" > '.$k.' </td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> '.$today[\"abbrevdayname\"].' </td>';\r\n $calendar.= '<td class=\"caseBloque\" id=\"'.$year.'-'.$monthNext2.'-'.$k.'\" style=\"background-color:'.$color.'\" onclick=\"myEvent(this)\">';\r\n $calendar.= '<div class=\"row\"><div class=\"col-sm-2\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext2.'-'.$k.':1\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-1\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext2.'-'.$k.':2\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-2\"></div></div></td>';\r\n \r\n }\r\n else{\r\n $calendar.= '<td class=\"small\" style=\"background-color:#d1d2d3\" ></td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> </td>';\r\n $calendar.= '<td style=\"\"></td>';\r\n }\r\n if($i1 <= $numberofday4 ){\r\n\r\n $today1 = unixtojd(mktime(0, 0, 0,$monthNext3, $i1, $year));\r\n $today = cal_from_jd($today1, CAL_GREGORIAN);\r\n\r\n if(($today[\"abbrevdayname\"] == \"Sun\") || ($today[\"abbrevdayname\"] == \"Sat\")){ $color = \"gray\";}\r\n else {$color = \"\";}\r\n\r\n $calendar.= '<td class=\"small\" style=\"\" > '.$i1.' </td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> '.$today[\"abbrevdayname\"].' </td>'; \r\n $calendar.= '<td class=\"caseBloque\" id=\"'.$year.'-'.$monthNext3.'-'.$i1.'\" style=\"background-color:'.$color.'\" onclick=\"myEvent(this)\">';\r\n $calendar.= '<div class=\"row\"><div class=\"col-sm-2\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext3.'-'.$i1.':1\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-1\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext3.'-'.$i1.':2\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-2\"></div></div></td>';\r\n \r\n }\r\n else{\r\n $calendar.= '<td class=\"small\" style=\"\" > </td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> </td>';\r\n $calendar.= '<td style=\"\"> </td>';\r\n }\r\n if($j1 <= $numberofday5 ){\r\n\r\n $today1 = unixtojd(mktime(0, 0, 0,$monthNext4, $j1, $year));\r\n $today = cal_from_jd($today1, CAL_GREGORIAN);\r\n\r\n if(($today[\"abbrevdayname\"] == \"Sun\") || ($today[\"abbrevdayname\"] == \"Sat\")){ $color = \"gray\";}\r\n else {$color = \"\";}\r\n\r\n $calendar.= '<td class=\"small\" style=\"\" > '.$j1.' </td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> '.$today[\"abbrevdayname\"].' </td>';\r\n $calendar.= '<td class=\"caseBloque\" id=\"'.$year.'-'.$monthNext4.'-'.$j1.'\" style=\"background-color:'.$color.'\" onclick=\"myEvent(this)\">';\r\n $calendar.= '<div class=\"row\"><div class=\"col-sm-2\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext4.'-'.$j1.':1\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-1\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext4.'-'.$j1.':2\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-2\"></div></div></td>';\r\n \r\n }\r\n else{\r\n\r\n $calendar.= '<td class=\"small\" style=\"\" > </td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> </td>';\r\n $calendar.= '<td style=\"\"> </td>';\r\n }\r\n if($k1 <= $numberofday6 ){\r\n\r\n $today1 = unixtojd(mktime(0, 0, 0,$monthNext5, $k1, $year));\r\n $today = cal_from_jd($today1, CAL_GREGORIAN);\r\n\r\n if(($today[\"abbrevdayname\"] == \"Sun\") || ($today[\"abbrevdayname\"] == \"Sat\")){ $color = \"gray\";}\r\n else {$color = \"\";}\r\n\r\n $calendar.= '<td class=\"small\" style=\"\" > '.$k1.' </td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> '.$today[\"abbrevdayname\"].' </td>';\r\n $calendar.= '<td class=\"caseBloque\" id=\"'.$year.'-'.$monthNext5.'-'.$k1.'\" style=\"background-color:'.$color.'\" onclick=\"myEvent(this)\">';\r\n $calendar.= '<div class=\"row\"><div class=\"col-sm-2\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext5.'-'.$k1.':1\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-1\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext5.'-'.$k1.':2\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-2\"></div></div></td>';\r\n \r\n }\r\n else{\r\n \r\n $calendar.= '<td class=\"small\" style=\"background-color:'.$color.'\" > </td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> </td>';\r\n $calendar.= '<td style=\"\"> </td>';\r\n }\r\n\r\n \r\n\r\n \r\n $calendar.= '</tr>';\r\n }\r\n \r\n\r\n \r\n\t\r\n\t/* final row */\r\n $calendar.= '</tr>';\r\n \r\n\r\n\r\n\t/* end the table */\r\n\t$calendar.= '</tbody></table>';\r\n\t\r\n\t/* all done, return result */\r\n\treturn $calendar;\r\n}", "function draw_calendar($year)\n {\n $calendar.= '<!DOCTYPE html>\n <html>\n <head>\n <meta charset=\"UTF-8\">\n <title>Calendar</title>\n <link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css\">\n <style>\n #today {\n background-color: lightgreen;\n }\n .day-number {\n text-align: center;\n }\n .calendar-week {\n width: 14%;\n text-align: center;\n }\n .container {\n text-align: center;\n }\n .col-centered{\n float: none;\n margin: 0 auto;\n }\n </style>\n </head>\n <body>';\n date_default_timezone_set(\"America/New_York\");\n $months = array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');\n for ($month = 1; $month <= 12; $month++)\n {\n //create header\n $header = '<h2>'.$months[$month-1].' '.$year.'</h2>';\n $calendar.= '<div class=\"row\"><div class=\"container col-xs-6 col-centered\"> <table class=\"table table-bordered\">';\n \n \t// write calendar table headings \n \t$headings = array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');\n \t$calendar.= $header.'<tr><td class=\"calendar-week\">'.implode('</td><td class=\"calendar-week\">',$headings).'</td></tr>';\n \n \t$starting_day = date('w', mktime(0, 0, 0, $month, 1, $year)); //the starting day of the week\n \t$days_in_month = date('t', mktime(0, 0, 0, $month, 1, $year));\n \t$days_this_week = 1;\n \t$day_counter = 0;\n \t$end_of_month = 0;\n \n \t// row for week one \n \t$calendar.= '<tr>';\n \t\n \t// display blank days until starting day of the current week\n \tfor($day = 0; $day < $starting_day; $day++):\n \t\t$calendar.= '<td> </td>';\n \t\t$days_this_week++; //add blank day to days\n \tendfor;\n \n \t// write days\n \tfor ($day = 1; $day <= $days_in_month; $day++):\n \t\tif ($day != date('d') && $month != date('n'))\n \t\t{\n \t\t\t$current_day = ''; //add blank td per day (that isnt today)\n \t\t}\n \t\t$calendar.= '<td class=\"calendar-day'.$current_day.'\">';\n \t\t\n \t\t\t// Add in the day number\n if ($day == date('d') && $month == date('n') && $year == date('Y')) //this day = today\n \t\t\t{\n \t\t\t\t$showtoday = '<div id=\"today\"> <strong>'.$day.'</strong></div>'; //add today (special styling)\n \t\t\t}else {\n \t\t\t $showtoday = $day;\n \t\t\t}\n \t\t\t$calendar.= '<div class=\"day-number\">'.$showtoday.'</div>'; //commit the date number to the td\n \n \t\t// end of first week\n \t\t$calendar.= '</td>';\n \t\tif($starting_day == 6):\n \t\t\t$calendar.= '</tr>'; // if end of week, end row\n \t\t\tif (($day_counter+1) != $days_in_month) //if today is not end of month, start new row\n \t\t\t{\n \t\t\t\t$calendar.= '<tr>';\n \t\t\t} else \n \t\t\t{\n \t\t\t $end_of_month = 1; // is end of month, so no need for new row\n \t\t\t}\n \t\t\t$starting_day = -1; // if end of week, mark as sunday-1 so when incrementing below, it goes to 0 (sunday)\n \t\t\t$days_this_week = 0; //reset days this week\n \t\tendif;\n \t\t$days_this_week++;\n \t\t$starting_day++;\n \t\t$day_counter++;\n \tendfor;\n \n \t// Finish the rest of blank days in the week\n \tif(($days_this_week < 8) && ($end_of_month == 0)): //last row of calendar, if end of month already has happened (ie on the last day of the previous week), do not add new cells\n \t\tfor($x = 1; $x <= (8 - $days_this_week); $x++):\n \t\t\t$calendar.= '<td> </td>';\n \t\tendfor;\n \tendif;\n \n \t// final row\n \t$calendar.= '</tr>';\n \n \t// end table tags\n \t$calendar.= '</table> </div> </div>';\n }\n // end tags and return\n $calendar.= '</body>\n </html>';\n return $calendar;\n }", "public function emptyLine()\n\t{\n\t\t//return \"\\t\\t\\t\".'<td colspan=\"2\">&nbsp;</td>'.\"\\n\";\n\t}", "function displayCurrentMonthCalenderAsTable()\n{\nglobal $year; // this year\nglobal $month; // this month\nglobal $id;\n$day=1; // start from first of month\nglobal $crypted;\nglobal $month_caption; // caption to table\n$lastmonth = $month - 1;\n$nextmonth = $month +1;\n$lastyear = $year - 1;\n$nextyear = $year + 1;\necho \"<table summary=\\\"Monthly calendar\\\" onMouseover= changeto('#CCCCCC') onMouseout= changeback('white') width = 757 cellspacing= 2 cellpadding= 2 id= ignore class=\\\"sk_bok_green\\\">\n<caption ><a href=comm.php?crypted=$_GET[crypted]&calender&lastyear=$lastyear ><font color=green>Last Year</font></a>&nbsp;&nbsp;&nbsp;<a href=comm.php?crypted=$_GET[crypted]&calender&last=$lastmonth&year=$year><font color=green>Last Month</a>&nbsp;&nbsp;&nbsp; <b>[$month_caption ]</b> &nbsp;&nbsp;&nbsp;<a href=comm.php?crypted=$_GET[crypted]&calender&next=$nextmonth&year=$year><font color= green>Next Month</font></a> &nbsp;<a href=comm.php?crypted=$_GET[crypted]&calender&lastyear=$nextyear><font color= green>Next Year<font></a></caption>\n<tr align=center id=ignore>\n<th width =308 id=ignore bgcolor=#FFC56C ><font color =Red>Sun</font></th>\n<th width =308 id=ignore bgcolor=#FFC56C><font color =Green>Mon</font></th>\n<th width =308 id=ignore bgcolor=#FFC56C><font color =Green>Tue</font></th>\n<th width =308 id=ignore bgcolor=#FFC56C><font color =Green>Wed</font></th>\n<th width =308 id=ignore bgcolor=#FFC56C><font color =Green>Thu</font></th>\n<th width =308 id=ignore bgcolor=#FFC56C><font color =Green>Fri</font></th> \n<th width =308 id=ignore bgcolor=#FFC56C><font color =blue>Sat</font></th> \n</tr>\\n\"; \n\n$ts = mktime(0,0,0,$month,$day,$year); // unix timestamp of the first day of current month\n$weekday_first_day = date(\"w\",$ts); // which is the weekday of the first day of week 0-Sunday 6-Saturday\n//$my_format = date(\"d-m-Y\");\n$slot=0;\n\nprint \"<tr align=center >\\n\"; // First row starts\nfor($i=0;$i<$weekday_first_day;$i++) // Pad the first few rows(slots)\n{\nprint \" <td id=ignore width =308></td>\"; // Empty slots \n$slot++;\n}\n\tif($day == '')\n\t{\n\t\t$ig = 'ignore';\n\t\techo \">>\";\n\t}\n\nwhile(checkdate($month,$day,$year) && $date<32) // till there are valid days in current month\n{\nif($slot == 7) // if we moved past saturday\n{\n$slot = 0; // reset and move back to sunday\nprint \"</tr>\\n\"; // end of this row\nprint \"<tr align=center width =50>\\n\"; // move on to next row\n\n}\n\t//$system_date = '$day-$month-$year';\n\t//$db_date = date('d-m-Y',$day $month $year);\n\t$system_date = mktime(0, 0, 0, $month, $day, $year);\n\t$db_date = date('d-m-Y',$system_date);\n\t$db_date_search = explode('-',$db_date);\n\t//print_r($db_date_search);\n\t$search_date = mktime(0, 0, 0, $month, $day);\n\t$search_date = sprintf(date('d-m-',$search_date));\n\t$month_no = $db_date_search[1];\n\t $query =\"select * from calender_event where active = '1' and day = '$db_date_search[0]' and `month_no` = '$month_no' and year = '$db_date_search[2]' \";\n\t\n\t$result = mysql_query($query) or die(mysql_error());\n\t$count = mysql_num_rows($result);\n\t/* echo $query;\n\techo $count; */\n\t$tr = 0;\n\t\n\tif($count != '0')\n\t{\t$msg .= \"<table id=ignore width=100%>\";\n\t\twhile($row=mysql_fetch_array($result))\n\t\t{\n\t\t\n\t\tif($row[popup] =='1')\n\t\t{\n\t\t\t$popup_link = \" onmouseout=\\\"hideTooltip()\\\" onmouseover=\\\"showTooltip(event,'$row[pop_msg]'\";\n\t\t\n\t\t}else\n\t\t{\n\t\t\t$popup_link =\"\";\n\t\t}\n\t\t\n\t\t$msg .= \"<tr ><td id=ignore bgcolor=green>$row[heading]</td></tr><tr><td id=ignore bgcolor=white><a href=\\\"comm.php?crypted=$_GET[crypted]&last=$month_no&year=$db_date_search[2]&calender&edit_event=$row[sno]\\\" $popup_link);return false\\\">$row[details]</a></td></tr>\";\n\t\t}\n\t\t$msg .= \"</table>\";\n\t}else\n\t{\n\t\t$msg ='';\n\t\n\t}\n\t//chking all db\n\t$color = \"bgcolor = white\";\n\techo \"<td $color id=$idd width =308 hight=308><DIV align=center id= tips><a href = #><font color=black><a href=comm.php?crypted=$_GET[crypted]&last=$month_no&year=$db_date_search[2]&calender&add_event=$db_date_search[0]-$db_date_search[1]-$db_date_search[2]>$day</a> </font>\n\t\t\n\t\t \";\n\t\n\t\n\t\techo \"</div ></a>$msg</div ></td>\";\n$msg ='';\n\t\n\n$day++;\n$slot++;\n}\n\nif($slot>0) // have we started off a new last row \n{\nwhile($slot<7) // padding at the end to complete the last row table\n{\nprint \" <td id=ignore></td>\"; // empty slots\n$slot++;\n}\nprint \"\\n</tr>\\n\"; // close out last row\n}\nprint '</table>'; //end of table\n}", "function _nextMonthTimestamp() {\n\t\treturn mktime(0,0,0,$this->_currentMonth+1,1,$this->_currentYear);\n\t}", "function _renderSpacer()\n {\n // ... maybe append form-spacer to class of next or previous element\n echo '<div class=\"form-spacer\">&nbsp;</div>';\n }", "public function ga_calendar_next_month()\n {\n $current_date = isset($_POST['current_month']) ? esc_html($_POST['current_month']) : '';\n $service_id = isset($_POST['service_id']) ? (int) $_POST['service_id'] : 0;\n $provider_id = isset($_POST['provider_id']) && 'ga_providers' == get_post_type($_POST['provider_id']) ? (int) $_POST['provider_id'] : 0;\n $form_id = isset($_POST['form_id']) ? (int) $_POST['form_id'] : 0;\n\n if ('ga_services' == get_post_type($service_id) && ga_valid_year_month_format($current_date)) {\n $timezone = ga_time_zone();\n\n $date = new DateTime($current_date, new DateTimeZone($timezone));\n $date->modify('+1 month');\n\n $ga_calendar = new GA_Calendar($form_id, $date->format('n'), $date->format('Y'), $service_id, $provider_id);\n echo $ga_calendar->show();\n } else {\n wp_die(\"Something went wrong.\");\n }\n\n wp_die(); // Don't forget to stop execution afterward.\n }", "public static function getFirstDayOfCurrentMonth()\n\t{\n\t\t$dateInSeconds = mktime(0, 0, 0, date('m'), 1, date('Y'));\n\t\t$date = date('Y-m-01', $dateInSeconds);\n\t\treturn $date;\n\t}", "function Header()\n\t{\n\t\t$this->SetFont('Arial','',12);\n\t\t$this->MultiCell(190,5,nombre_empresa(),'0','C');\n\t\t$this->SetFont('Arial','',10);\n\t\t$this->MultiCell(190,5,tipo_serv(),'0','C');\n\t\t$this->SetFont('Arial','B',10);\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->MultiCell(190,7,strtoupper(_('listado de clientes para cortes')),'0','C');\n\t\t$this->SetFont('Arial','B',8);\n\t\t$this->SetX(133);\n\t\t$this->Cell(12,5,strtoupper(_('fecha')).': ',0,0,'L');\n\t\t$this->SetFont('Arial','',8);\n\t\t$this->Cell(18,5,date(\"d/m/Y\"),0,0,'L');\n\t\t$this->SetFont('Arial','B',8);\n\t\t$this->Cell(12,5,strtoupper(_('hora')).': ',0,0,'L');\n\t\t$this->SetFont('Arial','',8);\n\t\t$this->Cell(18,5,date(\"h:i:s A\"),0,0,'L');\n\t\t$this->Ln();\t\t\n\t}", "public function display($month='', $year='') {\n\t\n\t\t// Remove whitespaces\n\t\t$year = trim($year);\n\t\t$month = trim($month);\n\n\t\t// Set day, month and year of calendar\n\t\t$this->day = 1;\n\t\t$this->month = ($month == '') ?\tdate('n') : $month;\n\t\t$this->year = ($year == '') ? date('Y') : $year;\n\n\t\t// Check for valid input\t\n\t\tif (!preg_match('~[0-9]{4}~', $this->year))\n\t\t\tthrow new exception('Invalid value for year');\n\t\tif (!is_numeric($this->month) || $this->month < 0 || $this->month > 13)\n\t\t\tthrow new exception('Invalid value for month');\n\n\t\t// Set the current timestamp\n\t\t$this->timeStamp = mktime(1,1,1,$this->month, $this->day, $this->year);\n\t\t// Set the number of days in teh current month\n\t\t$this->daysInMonth = date('t',$this->timeStamp);\n\n\t\t// Start table\n\t\t$calHTML = sprintf(\"<table id=\\\"%s\\\" cellpadding=\\\"0\\\" cellspacing=\\\"%d\\\"><thead><tr>\", $this->calendarName, $this->innerBorder);\n\t\t// Display previous month navigation\n\t\tif ($this->enableNav) {\n\t\t\t$pM = explode('-', date('n-Y', strtotime('-1 month', $this->timeStamp)));\n\t\t\t$calHTML .= sprintf(\"<td class=\\\"%s-%s\\\"><a href=\\\"?%smonth=%d&amp;year=%d\\\">%s</a></td>\", $this->calendarName, $this->markup['nav'], $this->queryString, $pM[0], $pM[1],$this->prevMonthNavTxt);\n\t\t}\n\t\t\n\t\t// Month name and optional year\n\t\t$calHTML .= sprintf(\"<td colspan=\\\"%d\\\" id=\\\"%s-%s\\\">%s%s</td>\", ($this->enableNav ? 5 : 7), $this->calendarName, $this->markup['header'], $this->getMonthName(), ($this->displayYear ? ' ' .$this->year : ''));\n\n\t\t// Display next month navigation\n\t\tif ($this->enableNav) {\n\t\t\t$nM = explode('-', date('n-Y', strtotime('+1 month', $this->timeStamp)));\n\t\t\t$calHTML .= sprintf(\"<td class=\\\"%s-%s\\\"><a href=\\\"?%smonth=%d&amp;year=%d\\\">%s</a></td>\", $this->calendarName, $this->markup['nav'], $this->queryString, $nM[0], $nM[1],$this->nextMonthNavTxt);\n\t\t}\n\n\t\t$calHTML .= sprintf(\"</tr></thead><tbody><tr id=\\\"%s\\\">\", $this->markup['days_of_week']);\n\n\t\t// Display day headers\n\t\tforeach($this->dayNames as $k => $dayName)\n\t\t\t$calHTML .= sprintf(\"<td>%s</td>\", $dayName);\n\n\t\t$calHTML .= \"</tr><tr>\";\n\t\t\n\t\t/// What the heck is this\n\t\t$sDay = date('N', $this->timeStamp) + $this->startDay - 1;\n\t\t\n\t\t// Print previous months days\n\t\t\tfor ($e=1;$e<=$sDay;$e++)\n\t\t\t\t$calHTML .= sprintf(\"<td class=\\\"%s-%s\\\">%s</td>\", $this->calendarName, $this->markup['prev_month'], (($this->displayNonMonthDays) ? $this->timeTravel(\"-\" . ($sDay -$e) . \" days\", 'd', $this->timeStamp) : ''));\n\t\n\t\t// Print days\n\t\tfor ($i=1;$i<=$this->daysInMonth;$i++) {\n\t\t\t// Set current day and timestamp\n\t\t\t$this->day = $i;\n\t\t\t$this->timeStamp = mktime(1,1,1,$this->month, $this->day, $this->year);\n\t\t\t\n\t\t\t// Set day as either plain text or event link\n\t\t\tif (isset($this->events[$this->year][$this->month][$this->day]))\n\t\t\t\t$this->htmlDay = sprintf(\"<a href=\\\"%s\\\" title=\\\"%s\\\">%s</a>\", $this->events[$this->year][$this->month][$this->day]['event_link'], $this->events[$this->year][$this->month][$this->day]['event_title'], $this->day);\n\t\t\telse\n\t\t\t\t$this->htmlDay = $this->day;\t\t\t\n\t\n\t\t\t// Display calendar cell\n\t\t\t$calHTML .= sprintf(\"<td %s%s>%s</td>\", ($this->timeStamp == mktime(1,1,1,date('n'),date('j'),date('Y')) ? 'id=\"' . $this->calendarName . '-' . $this->markup['current_day'] . '\" ' : ''), ((($sDay + $this->day) % 7 == 0) ? 'class=\"' . $this->calendarName . '-' . $this->markup['last_day_of_week'] . '\"' : ''), $this->htmlDay);\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t// End row if necessary\t\t\t\n\t\t\tif (($sDay + $this->day) % 7 == 0)\n\t\t\t\t$calHTML .= \"</tr><tr>\";\n\t\t}\n\t\t\n\t\t// Print next months days\n\t\tfor ($e2=1;$e2 < (7 - (($sDay + $this->daysInMonth -1) % 7)); $e2++)\n\t\t\t$calHTML .= sprintf(\"<td class=\\\"%s-next-month-day%s\\\">%s</td>\", $this->calendarName, ((($sDay + $this->day + $e2) % 7 == 0) ? ' ' . $this->calendarName . '-' . $this->markup['last_day_of_week'] : ''), (($this->displayNonMonthDays) ? $this->timeTravel(\"+$e2 days\", 'd', $this->timeStamp) : ''));\n\t\t\n\t\t$calHTML .= \"</tr></tbody></table>\";\n\t\n\t\t// Tidy up html\n\t\tif ($this->prettyHTML) {\n\t\t\t$replaceWhat = array('<tr', '<td', '</tr>', '</table>', '<thead>', '</thead>', '<tbody>', '</tbody>');\n\t\t\t$replaceWith = array(\"\\n\\t\\t<tr\", \"\\n\\t\\t\\t<td\", \"\\n\\t\\t</tr>\", \"\\n</table>\", \"\\n\\t<thead>\", \"\\n\\t</thead>\", \"\\n\\t<tbody>\", \"\\n\\t</tbody>\");\n\t\t\t$calHTML = str_replace($replaceWhat, $replaceWith, $calHTML);\n\t\t}\n\t\t\n\t\t// Print calendar\n\t\techo $calHTML;\n\t}", "public function setMonth($month) {\n\t\t$this->schedule->setMonth($month);\n\n\t\treturn $this;\n\t}", "function mkMonthBody($showNoMonthDays=0){\n\tif ($this->actmonth==1){\n\t\t$pMonth=12;\n\t\t$pYear=$this->actyear-1;\n\t}\n\telse{\n\t\t$pMonth=$this->actmonth-1;\n\t\t$pYear=$this->actyear;\n\t}\n$out=\"<tr>\";\n$cor=0;\n\tif ($this->startOnSun) $cor=1;\n\tif ($this->weekNum) $out.=\"<td class=\\\"\".$this->cssWeekNum.\"\\\">\".$this->mkWeekNum(1+$cor).\"</td>\";\n$monthday=0;\n$nmonthday=1;\n\tfor ($x=0; $x<=6; $x++){\n\t\tif ($x>=$this->firstday){\n\t\t$monthday++;\n\t\t$out.=$this->mkDay($monthday);\n\t\t}\n\t\telse{\n\t\t\tif ($showNoMonthDays==0) $out.=\"<td class=\\\"\".$this->cssNoMonthDay.\"\\\"></td>\";\n\t\t\telse $out.=\"<td class=\\\"\".$this->cssNoMonthDay.\"\\\">\".($this->getMonthDays($pMonth,$pYear)-($this->firstday-1)+$x).\"</td>\";\n\t\t}\n\t}\n$out.=\"</tr>\\n\";\n$goon=$monthday+1;\n$stop=0;\n\tfor ($x=0; $x<=6; $x++){\n\t\tif ($goon>$this->maxdays) break;\n\t\tif ($stop==1) break;\n\t\t$out.=\"<tr>\";\n\t\tif ($this->weekNum) $out.=\"<td class=\\\"\".$this->cssWeekNum.\"\\\">\".$this->mkWeekNum($goon+$cor).\"</td>\";\n\t\t\tfor ($i=$goon; $i<=$goon+6; $i++){\n\t\t\t\tif ($i>$this->maxdays){\n\t\t\t\t\tif ($showNoMonthDays==0) $out.=\"<td class=\\\"\".$this->cssNoMonthDay.\"\\\"></td>\";\n\t\t\t\t\telse $out.=\"<td class=\\\"\".$this->cssNoMonthDay.\"\\\">\".$nmonthday++.\"</td>\";\n\t\t\t\t\t$stop=1;\n\t\t\t\t}\n\t\t\t\telse $out.=$this->mkDay($i);\n\t\t\t}\n\t\t$goon=$goon+7;\n\t\t$out.=\"</tr>\\n\";\n\t}\n$this->selectedday=\"-2\";\nreturn $out;\n}", "function Fecha()\n\t{\n\t\t$this->SetFont('Arial','B',8);\n\t\t$this->SetX(133);\n\t\t$this->Cell(12,5,strtoupper(_('fecha')).': ',0,0,'L');\n\t\t$this->SetFont('Arial','',8);\n\t\t$this->Cell(18,5,date(\"d/m/Y\"),0,0,'L');\n\t\t$this->SetFont('Arial','B',8);\n\t\t$this->Cell(12,5,strtoupper(_('hora')).': ',0,0,'L');\n\t\t$this->SetFont('Arial','',8);\n\t\t$this->Cell(18,5,date(\"h:i:s A\"),0,0,'L');\n\t\t$this->Ln();\t\t\n\t}", "public function monthly()\n {\n return $this->cron('0 0 1 * * *');\n }", "function Fecha()\n\t{\n\t\t$this->SetFont('Arial','B',8);\n\t\t$this->SetX(133);\n\t\t$this->Cell(12,5,strtoupper(_('fecha')).\": \",0,0,'L');\n\t\t$this->SetFont('Arial','',8);\n\t\t$this->Cell(18,5,date(\"d/m/Y\"),0,0,'L');\n\t\t$this->SetFont('Arial','B',8);\n\t\t$this->Cell(12,5,strtoupper(_('hora')).\": \",0,0,'L');\n\t\t$this->SetFont('Arial','',8);\n\t\t$this->Cell(18,5,date(\"h:i:s A\"),0,0,'L');\n\t\t$this->Ln();\t\t\n\t}", "public function enableNonMonthDays() {\n\t\t$this->displayNonMonthDays = true;\n\t}", "public function uncleared()\n {\n// dd('Hii this is uncleared function of employeecontroller.');\n for($m=1; $m<=12; $m++) {\n $month = date('F', mktime(0,0,0,$m, 1, date('Y')));\n echo $month. '<br>';\n }\n }", "static public function getFirstDayOfMonth($month='', $year=''){\n\t\tif(!$month){\n\t\t\t$month = date('m');\n\t\t}\n\t\tif(!$year){\n\t\t\t$year = date('Y');\n\t\t}\n\t\treturn $year.'-'.sprintf('%02s', $month).'-01';\n\t}", "protected function getMonthHTML(\n $month,\n $mth_num,\n $opt,\n $year_num,\n $table_cols,\n $first_weekday,\n $today\n ) {\n $cal = '<tr>';\n // insert month name into first column of row\n $cal .= $this->getMonthNameHTML($mth_num);\n $cur_day = 0;\n for ($col = 0; $col < $table_cols; $col++) {\n $weekday_num = ($col + $first_weekday) % 7; // current day of week as a number\n\n // current day is only valid if within the month's days, and at the correct starting day\n if (($cur_day > 0 && $cur_day < $month['len']) || ($col < 7 && $weekday_num == $month['start'])) {\n $cur_day++;\n $cal .= $this->getDayHTML($cur_day, $mth_num, $today, $year_num, $weekday_num, $opt);\n } else {\n $cur_day = 0;\n $cal .= $this->getEmptyCellHTML();\n }\n }\n $cal .= '</tr>';\n\n return $cal;\n }", "public function testGetStartDate() {\n $now = new \\DateTimeImmutable('2019-09-15');\n $next_month = new \\DateTime('2019-10-15');\n\n // No date values:\n $line_item = $this->lineItemStub([], ['interval_unit' => 'monthly']);\n $date = Utils::getStartDate($line_item, $now);\n $this->assertEmpty($date);\n\n // Day of month:\n $line_item = $this->lineItemStub([], [\n 'interval_unit' => 'monthly',\n 'day_of_month' => '5',\n ]);\n $date = Utils::getStartDate($line_item, $now);\n $this->assertEqual('05', $date->format('d'));\n $this->assertTrue($date > $now);\n\n // Month:\n $line_item = $this->lineItemStub([], [\n 'interval_unit' => 'yearly',\n 'month' => '5',\n ]);\n $date = Utils::getStartDate($line_item, $now);\n $this->assertEqual('05', $date->format('m'));\n $this->assertTrue($date > $now);\n\n // Start date in the future:\n $line_item = $this->lineItemStub([], [\n 'interval_unit' => 'yearly',\n 'start_date' => $next_month,\n ]);\n $date = Utils::getStartDate($line_item, $now);\n $this->assertEquals($date->format('Y-m-d'), $next_month->format('Y-m-d'));\n\n // Start date in the past:\n $last_month = new \\DateTime('2019-08-15');\n $line_item = $this->lineItemStub([], [\n 'interval_unit' => 'yearly',\n 'start_date' => $last_month,\n ]);\n $date = Utils::getStartDate($line_item, $now);\n $this->assertNotEquals($date->format('Y-m-d'), $last_month->format('Y-m-d'));\n $this->assertTrue($date > $now);\n\n // Start date + day of month + interval value:\n $line_item = $this->lineItemStub([], [\n 'interval_unit' => 'monthly',\n 'interval_value' => '3',\n 'start_date' => new \\DateTime('2019-10-10'),\n 'day_of_month' => '1',\n ]);\n $date = Utils::getStartDate($line_item, $now);\n $this->assertEquals($date->format('Y-m-d'), '2019-11-01');\n\n // Start date + day of month + month + interval value:\n $line_item = $this->lineItemStub([], [\n 'interval_unit' => 'monthly',\n 'interval_value' => '3',\n 'start_date' => new \\DateTime('2019-10-10'),\n 'day_of_month' => '1',\n 'month' => '9',\n ]);\n $date = Utils::getStartDate($line_item, $now);\n $this->assertEqual('2019-12-01', $date->format('Y-m-d'));\n\n // Weekly: everything but start date shouldn't matter.\n $line_item = $this->lineItemStub([], [\n 'interval_unit' => 'weekly',\n 'interval_value' => '3',\n 'start_date' => new \\DateTime('2019-10-10'),\n 'day_of_month' => '1',\n 'month' => '9',\n ]);\n $date = Utils::getStartDate($line_item, $now);\n $this->assertEquals($date->format('Y-m-d'), '2019-10-10');\n }", "function Header(){\n\t\t$linha = 5;\n\t\t// define o X e Y na pagina\n\t\t$this->SetXY(10,10);\n\t\t// cria um retangulo que comeca na coordenada X,Y e\n\t\t// tem 190 de largura e 265 de altura, sendo neste caso,\n\t\t// a borda da pagina\n\t\t$this->Rect(10,10,190,265);\n\t\t\n\t\t// define a fonte a ser utilizada\n\t\t$this->SetFont('Arial', 'B', 8);\n\t\t$this->SetXY(11,11);\n\t\t\n\t\t// imprime uma celula com bordas opcionais, cor de fundo e texto.\n\t\t$agora = date(\"G:i:s\");\n\t\t$hoje = date(\"d/m/Y\");\n\t\t$this->Cell(10,$linha,$agora,0,0,'C');\n\t\t$this->Cell(150,$linha,'..:: Fatec Bauru - Relatorio de Cursos da Fatec ::..',0,0,'C');\n\t\t$this->Cell(30,$linha,$hoje,0,0,'C');\n\t\t\n\t\t// quebra de linha\n\t\t$this->ln();\n\t\t$this->SetFillColor(232,232,232);\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->SetFont('Arial', 'B', 8);\n\n\t\t$this->Cell(10,4,'ID','LTR',0,'C',1);\n\t\t$this->Cell(140,4,'Nome do Curso','LTR',0,'C',1);\n\t\t$this->Cell(40,4,'Periodo','LTR',0,'C',1);\n\t}" ]
[ "0.5999289", "0.5799576", "0.55208194", "0.5462961", "0.54257184", "0.5403874", "0.53747106", "0.5319116", "0.52447367", "0.5152501", "0.5072927", "0.5065767", "0.49980766", "0.49827915", "0.49784622", "0.4928414", "0.49255168", "0.49203742", "0.4913131", "0.49100062", "0.49091643", "0.49039856", "0.48905474", "0.48887783", "0.48851857", "0.488058", "0.4856213", "0.4855926", "0.48525944", "0.4846326", "0.48332334", "0.48237684", "0.48222834", "0.4819984", "0.48145625", "0.4786142", "0.47528648", "0.47521317", "0.47493047", "0.47315508", "0.47270337", "0.47188005", "0.47054666", "0.4701534", "0.4701159", "0.46812463", "0.46685645", "0.4662338", "0.46554878", "0.46477425", "0.4628932", "0.46232456", "0.46202636", "0.4617223", "0.46157783", "0.46081915", "0.46048924", "0.45959294", "0.45959294", "0.4594433", "0.45917645", "0.45782605", "0.4569818", "0.45689833", "0.45582026", "0.4556336", "0.4545446", "0.45328504", "0.45321524", "0.45264912", "0.45225266", "0.45210123", "0.4513485", "0.4510415", "0.45045182", "0.44839683", "0.44807416", "0.44670755", "0.44620723", "0.4456446", "0.44548213", "0.44543058", "0.44418088", "0.4438089", "0.44339553", "0.44224444", "0.4419519", "0.4408924", "0.4408652", "0.44084147", "0.4404383", "0.4403117", "0.43950996", "0.4393868", "0.4392727", "0.4391203", "0.43861893", "0.43746674", "0.43731758", "0.43724254" ]
0.834585
0
Set end of month spacers Create a spacer cell that adds blank space for the end of the month after the last day of the month.
private function endMonthSpacers() { if((8 - $this->weekDayNum) >= '1') { $this->calWeekDays .= "\t\t<td colspan=\"".(8 - $this->weekDayNum)."\" class=\"spacerDays\">&nbsp;</td>\n"; $this->outArray['lastday'] = (8 - $this->weekDayNum); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function startMonthSpacers()\n\t{\n\t\tif($this->firstDayOfTheMonth != '0') {\n\t\t\t$this->calWeekDays .= \"\\t\\t<td colspan=\\\"\".$this->firstDayOfTheMonth.\"\\\" class=\\\"spacerDays\\\">&nbsp;</td>\\n\";\n\t\t\t$this->outArray['firstday'] = $this->firstDayOfTheMonth;\n\t\t}\n\t}", "function Footer()\n {\n $this->SetY(-12);\n $this->SetFont('Arial','B',5); \n $this->Cell(505,10,utf8_decode(\"TI. Fecha de creación: \").date(\"d-m-Y H:i\").\" \".\"Pag \".$this->PageNo(),0,0,'C'); \n }", "function Footer()\n {\n $this->SetY(-12);\n $this->SetFont('Arial','B',5); \n $this->Cell(505,10,utf8_decode(\"TI. Fecha de creación: \").date(\"d-m-Y H:i\").\" \".\"Pag \".$this->PageNo(),0,0,'C'); \n }", "function mkMonthFoot(){\nreturn \"</table>\\n\";\n}", "public function Footer(){\n $this->SetFont('Arial','',8);\n $date = new Date();\n $this->SetTextColor(100);\n $this->SetFillColor(245);\n $this->SetY(-10);\n $str = \"Elaborado Por Mercurio\";\n $x = $this->GetStringWidth($str);\n $this->Cell($x+10,5,$str,'T',0,'L');\n $this->Cell(0,5,'Pagina '.$this->PageNo().' de {nb}','T',1,'R');\n }", "function Footer(){\n $this->SetY(-12);\n\n $this->Cell(0,5,'Page '.$this->PageNo(),0,0,'L');\n $this->Cell(0,5,iconv( 'UTF-8','cp874','วันที่พิมพ์ :'.date('d').'/'.date('m').'/'.(date('Y')+543)),0,0,\"R\");\n}", "function FooterRR()\n {\n //Posición: a 2 cm del final\n $this->Ln();\n $this->SetY(-12);\n $this->SetFont('Arial','B',6);\n //Número de página\n $this->Cell(190,4,'Sistema de Control de Ventas y Facturacion \"BOUTIQUE DE ZAPATERIA\"','T',0,'L');\n $this->AliasNbPages();\n $this->Cell(0,4,'Pagina '.$this->PageNo(),'T',1,'R');\n }", "private function Write_Monthly_Table() {\n\t\t$top = 445 + self::VERT_MARGIN;\n\t\t$left = self::HORZ_MARGIN;\n\t\t$label_width = 160;\n\t\t$table_left = $left + $label_width;\n\t\t$cell_width = 55;\n\t\t$row_height = 8.5;\n\t\t\n\t\t/**\n\t\t * Build label backgrounds\n\t\t */\n\t\t$this->pdf->setcolor('fill', 'gray', 0.75, 0, 0, 0);\n\t\t$this->Rect_TL($left, $top, $label_width + ($cell_width * 1), $row_height);\n\t\t$this->pdf->fill();\n\t\t\n\t\t/**\n\t\t * Add the strokes\n\t\t */\n\t\t$this->Rect_TL($table_left, $top, $cell_width, $row_height);\n\t//\t$this->Rect_TL($table_left + ($cell_width * 1), $top, $cell_width, $row_height);\n\t//\t$this->Rect_TL($table_left + ($cell_width * 2), $top, $cell_width, $row_height);\n\t\t$this->pdf->stroke();\n\t\t\n\t\t/**\n\t\t * Add the labels\n\t\t */\n\t\t$this->Text_TL(\"CURRENT PERIOD\",\n\t\t\t$left, $top, \n\t\t\t$label_width, $row_height,\n\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['ITALICS']} {$this->formats['LEFT']}\");\n\t\t\n\t\t$this->Text_TL(\"PERIOD\",\n\t\t\t$table_left, $top, \n\t\t\t$cell_width, $row_height,\n\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['ITALICS']} {$this->formats['CENTER']}\");\n\t\t\n\t\t/*$this->Text_TL(\"WEEK\",\n\t\t\t$table_left + ($cell_width * 1), $top, \n\t\t\t$cell_width, $row_height,\n\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['ITALICS']} {$this->formats['CENTER']}\");\n\t\t\n\t\t$this->Text_TL(\"MONTH\",\n\t\t\t$table_left + ($cell_width * 2), $top, \n\t\t\t$cell_width, $row_height,\n\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['ITALICS']} {$this->formats['CENTER']}\");*/\n\t\t\t\n\t\t$current_row = 1;\n\t\t$totals = array(\n\t\t\t'weekly' => 0,\n\t\t\t'biweekly' => 0,\n\t\t\t'semimonthly' => 0,\n\t\t\t'monthly' => 0,\n\t\t);\n\t\tforeach ($this->data['period'] as $label => $values) {\n\t\t\t/**\n\t\t\t * Special processing\n\t\t\t */\n\t\t\tswitch ($label) {\n\t\t\t\tcase 'nsf$':\n\t\t\t\t\tcontinue 2;\n\t\t\t\tcase 'debit returns':\n//\t\t\t\t\t$this->pdf->setcolor('fill', 'rgb', 1, 1, 176/255, 0);\n//\t\t\t\t\t$this->Rect_TL($table_left + ($cell_width * 1), $top + ($row_height * $current_row), $cell_width, $row_height);\n//\t\t\t\t\t$this->pdf->fill();\n\t\t\t\t\t\n//\t\t\t\t\t$this->Rect_TL($table_left + ($cell_width * 1), $top + ($row_height * $current_row), $cell_width, $row_height);\n//\t\t\t\t\t$this->pdf->stroke();\n\t\t\t\t\t/*$percentage = $values['month']? number_format($values['month'] / $this->data['monthly']['total debited']['month'] * 100, 1):0;\n\t\t\t\t\t$this->Text_TL($percentage.'%',\n\t\t\t\t\t\t$table_left + ($cell_width * 3), $top + ($row_height * $current_row), \n\t\t\t\t\t\t$cell_width, $row_height,\n\t\t\t\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['CENTER']}\");*/\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'net cash collected':\n\t\t\t\t\t$this->pdf->setcolor('fill', 'rgb', 1, 1, 176/255, 0);\n\t\t\t\t\t$this->Rect_TL($table_left, $top + ($row_height * $current_row), $cell_width, $row_height);\n\t\t\t\t\t//$this->Rect_TL($table_left + ($cell_width * 1), $top + ($row_height * $current_row), $cell_width, $row_height);\n\t\t\t\t\t//$this->Rect_TL($table_left + ($cell_width * 2), $top + ($row_height * $current_row), $cell_width, $row_height);\n\t\t\t\t\t$this->pdf->fill();\n\t\t\t\t\t\n\t\t\t\t\t//$this->Text_TL(number_format($this->data['period']['total debited']['span'] - $this->data['period']['debit returns']['span'], 2),\n\t\t\t\t\t$this->Text_TL(number_format($this->data['period']['total debited']['span'] - $this->data['period']['nsf$']['span'], 2),\n\t\t\t\t\t\t$table_left, $top + ($row_height * $current_row), \n\t\t\t\t\t\t$cell_width, $row_height,\n\t\t\t\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\t\t\t\t\t\t\n\t\t\t\t\t/*$this->Text_TL(number_format($this->data['monthly']['total debited']['week'] - $this->data['monthly']['debit returns']['week'], 2),\n\t\t\t\t\t\t$table_left + ($cell_width * 1), $top + ($row_height * $current_row), \n\t\t\t\t\t\t$cell_width, $row_height,\n\t\t\t\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\t\t\t\t\t$this->Text_TL(number_format($this->data['monthly']['total debited']['month'] - $this->data['monthly']['debit returns']['month'], 2),\n\t\t\t\t\t\t$table_left + ($cell_width * 2), $top + ($row_height * $current_row), \n\t\t\t\t\t\t$cell_width, $row_height,\n\t\t\t\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");*/\n\t\t\t\t\tbreak;\n\t\t\t\t//FORBIDDEN ROWS!\n\t\t\t\tcase 'moneygram deposit':\n\t\t\t\t//case 'credit card payments':\n\t\t\t\t\tcontinue 2;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t\t$format_decimals = 0;\n\t\t\tswitch ($label) {\n\t\t\t\tcase 'new customers':\n\t\t\t\tcase 'card reactivations':\n\t\t\t\tcase 'reactivated customers':\n\t\t\t\tcase 'refunded customers':\n\t\t\t\tcase 'resend customers':\n\t\t\t\tcase 'cancelled customers':\n\t\t\t\tcase 'paid out customers (ach)':\n\t\t\t\tcase 'paid out customers (non-ach)':\n\t\t\t\t\t$format_decimals = 0;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$format_decimals = 2;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t$this->pdf->setcolor('fill', 'gray', 0.75, 0, 0, 0);\n\t\t\t$this->Rect_TL($left, $top + ($row_height * $current_row), $label_width, $row_height);\n\t\t\t$this->pdf->fill();\n\t\t\t\n\t\t\t$this->Rect_TL($table_left, $top + ($row_height * $current_row), $cell_width, $row_height);\n//\t\t\t$this->Rect_TL($table_left + ($cell_width * 1), $top + ($row_height * $current_row), $cell_width, $row_height);\n//\t\t\t$this->Rect_TL($table_left + ($cell_width * 2), $top + ($row_height * $current_row), $cell_width, $row_height);\n\t\t\t$this->pdf->stroke();\n\t\t\t\n\t\t\t$this->Text_TL(strtoupper($label),\n\t\t\t\t$left + $label_indent, $top + ($row_height * $current_row), \n\t\t\t\t$label_width - $label_indent, $row_height,\n\t\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['ITALICS']} {$this->formats['RIGHT']}\");\n\t\t\t\n\t\t\tif ($label != 'net cash collected') {\n\t\t\t\t$this->Text_TL(number_format($values['span'], $format_decimals),\n\t\t\t\t\t$table_left, $top + ($row_height * $current_row), \n\t\t\t\t\t$cell_width, $row_height,\n\t\t\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\t\t\t\t\n\t\t\t\t/*$this->Text_TL(number_format($values['week'], $format_decimals),\n\t\t\t\t\t$table_left + ($cell_width * 1), $top + ($row_height * $current_row), \n\t\t\t\t\t$cell_width, $row_height,\n\t\t\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\t\t\t\t\n\t\t\t\t$this->Text_TL(number_format($values['month'], $format_decimals),\n\t\t\t\t\t$table_left + ($cell_width * 2), $top + ($row_height * $current_row), \n\t\t\t\t\t$cell_width, $row_height,\n\t\t\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");*/\n\t\t\t}\n\t\t\t\n\t\t\t$current_row++;\n\t\t}\n\t\t\n\t\t/**\n\t\t * Advances in Collection\n\t\t */\n\t\t$this->pdf->setcolor('fill', 'gray', 0.75, 0, 0, 0);\n\t\t$this->Rect_TL($left, $top + ($row_height * $current_row), $label_width, $row_height);\n\t\t$this->pdf->fill();\n\t\t\n\t\t$this->Rect_TL($table_left, $top + ($row_height * $current_row), $cell_width, $row_height);\n\t\t$this->pdf->stroke();\n\t\t\n\t\t$this->Text_TL(\"ADVANCES IN COLLECTION\",\n\t\t\t$left, $top + ($row_height * $current_row), \n\t\t\t$label_width, $row_height,\n\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['ITALICS']} {$this->formats['RIGHT']}\");\n\t\t\n\t\t$this->Text_TL(number_format($this->data['advances_collections'], 2),\n\t\t\t$table_left, $top + ($row_height * $current_row), \n\t\t\t$cell_width, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\t\t\n\t\t/**\n\t\t * Advances in Active\n\t\t */\n\t\t$this->pdf->setcolor('fill', 'gray', 0.75, 0, 0, 0);\n\t\t$this->Rect_TL($table_left + ($cell_width * 4), $top + ($row_height * $current_row), $cell_width * 2, $row_height);\n\t\t$this->pdf->fill();\n\t\t\n\t\t$this->Rect_TL($table_left + ($cell_width * 6), $top + ($row_height * $current_row), $cell_width, $row_height);\n\t\t$this->pdf->stroke();\n\t\t\n\t\t$this->Text_TL(\"ACTIVE ADVANCES OUT\",\n\t\t\t$table_left + ($cell_width * 4), $top + ($row_height * $current_row), \n\t\t\t$cell_width * 2, $row_height,\n\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['ITALICS']} {$this->formats['RIGHT']}\");\n\t\t\n\t\t$this->Text_TL(number_format($this->data['advances_active'], 2),\n\t\t\t$table_left + ($cell_width * 6), $top + ($row_height * $current_row), \n\t\t\t$cell_width, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\t\t\n\t}", "function Footer(){\n\t\t$this->Cell(190,0,'','T',1,'',true);\n\t\t\n\t\t//Go to 1.5 cm from bottom\n\t\t$this->SetY(-15);\n\t\t\t\t\n\t\t$this->SetFont('Arial','',8);\n\t\t\n\t\t//width = 0 means the cell is extended up to the right margin\n\t\t$this->Cell(0,10,'Page '.$this->PageNo().\" / {pages}\",0,0,'C');\n\t}", "function Footer() {\r\n $this->SetY(-15);\r\n // Set font\r\n $this->SetFont('Helvetica', 'I', 12);\r\n // Page number\r\n $this->Cell(0, 10, 'PvMax Summary | Schletter Inc. | (888) 608 - 0234', 0, false, 'C', 0, '', 0, false, 'T', 'M');\r\n}", "public function Footer(){\n // Posición: a 1,5 cm del final\n $this->SetY(-20);\n // Arial italic 8\n $this->AddFont('Futura-Medium');\n $this->SetFont('Futura-Medium','',10);\n $this->SetTextColor(50,50,50);\n // Número de págin\n $this->Cell(3);\n $this->Cell(0,3,utf8_decode('Generado por GetYourGames'),0,0,\"R\");\n $this->Ln(4);\n $this->Cell(3);\n $this->Cell(0,3,utf8_decode(date(\"d-m-Y g:i a\").' - Página ').$this->PageNo(),0,0,\"R\");\n\n }", "function Footer()\n{\n $this->SetY(-15);\n //Select Arial italic 8\n\t$this->Cell(0,10,' '.$this->PageNo(),0,0,'R');\n}", "function Footer()\n\t{\n\t $this->SetY(-15);\n\t //Arial italic 8\n\t $this->SetFont('Arial','I',7);\n\t //Page number\n\t $this->Cell(0,10,utf8_decode('PlatSource © '.date('Y')),0,0,'L');\n\t $this->Cell(0,10,utf8_decode('Página ').$this->PageNo().' de {nb}',0,0,'R');\n\t}", "function Footer()\n\t{\n\t $this->SetY(-15);\n\t //Arial italic 8\n\t $this->SetFont('Arial','I',7);\n\t //Page number\n\t $this->Cell(0,10,utf8_decode('Página ').$this->PageNo().' de {nb}',0,0,'R');\n\t}", "function Footer()\n\t{\n\t\t$this->SetY(-15);\n\t\t// Arial italic 8\n\t\t$this->SetFont('Arial','b',8);\n\t\t\n\t\t$this->Cell(30,1,\"----------------------------------------\",0,0,'C');\n\t\t$this->Cell(210,1,'',0,0);\n\t\t// $this->Cell(30,1,\"----------------------------------------\",0,0,'C');\n\t\t// $this->Cell(50,1,'',0,0);\n\t\t$this->Cell(30,1,\"----------------------------------------\",0,1,'C');\n\t\t\n\t\t$this->Cell(30,4,\"Prepared/Class Teacher\",0,0,'C');\n\t\t// $this->Cell(50,4,'',0,0);\n\t\t// $this->Cell(30,4,\"Controlar of Examination\",0,0,'C');\n\t\t$this->Cell(210,4,'',0,0);\n\t\t$this->Cell(30,4,\"Principal/VP\",0,1,'C');\n\t\t\n\t\t$this->Cell(50,4,date(\"d-m-y h:i:s A\"),0,0,'L');\n\t\t// Page number\n\t\t//$this->Cell(140,4,''.$this->PageNo().'/{nb}',0,0,'C');\n\t}", "function Footer()\r\n {\r\n $this->SetY(-15);\r\n //courier italic 8\r\n $this->SetFont('courier','I',8);\r\n //Page number\r\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\r\n $this->SetX(5);\r\n $this->SetFont('courier','I',6);\r\n\r\n $this->Cell(0,10,'Tanggal Cetak : '.date(\"d/m/Y\"),0,0,'L');\r\n $this->SetY($this->GetY()+3);\r\n $this->Cell(0,10,'Cetak Oleh : '.$this->printby,0,0,'L');\r\n }", "function Footer()\n {\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial','I',8);\n // Page number\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n }", "function Footer()\t{\n\t $this->SetY(-15);\n\t // Arial italic 8\n\t $this->SetFont('Arial','I',8);\n\t // Page number\n\t $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n\t}", "function Footer()\n\t{\n\t\t$this->SetY(-15);\n\t\t//buat garis horizontal\n\t\t$this->Line(30,$this->GetY(),185,$this->GetY());\n\t\t//Arial italic 9\n\t\t$this->SetFont('Arial','I',9);\n\t\t//nomor halaman\n\t\t$this->Cell(0,10,'Halaman '.$this->PageNo().' dari {nb}',0,0,'R');\n\t}", "function Footer(){\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial','I',8);\n // Page number\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n }", "function Footer(){\n ($this->kriteria=='neraca')?$this->SetY(-10):$this->SetY(-15);\n //Arial italic 8\n $this->SetFont('Arial','i',7);\n if($this->kriteria=='faktur'){\n $this->Cell(150,10,'Berlaku sebagai faktur pajak sesuai Peraturan Menkeu No. 38/PMK.03/2010',0,0,'L');\n }else{\n $this->Cell(0,10,'Print Date :'.date('d F Y'),0,0,'C');\n }\n $this->Cell(0,10,'Page '.$this->PageNo().' of {nb}',0,0,'R');\n}", "public function Footer() {\n\t\t$this->SetY(-15);\n\t\t// Set font\n\t\t$this->SetFont('helvetica', 'I', 8);\n\t\t// Page number\n\t\t$this->Cell(0, 10, 'Pagina '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');\n\t}", "function Footer() {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial', 'B', 8);\n // Print centered page number\n $this->Cell(0, 5, utf8_decode(\"[Página \") . $this->PageNo() . \"]\", 0, 0, 'L');\n }", "function Footer() {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial', 'B', 8);\n // Print centered page number\n $this->Cell(0, 5, utf8_decode(\"[Página \") . $this->PageNo() . \"]\", 0, 0, 'L');\n }", "function Footer()\n {\n $this->SetY(-11);\n $this->Cell(45);\n // Select Arial italic 8\n $this->SetFont('Arial','I',8);\n // Print centered page number\n $this->Cell(6,10,'',0,0,'C');\n $this->Cell(96,10,'Nombre y Firma','T',0,'C');\n $this->Cell(0,10,utf8_decode('Página ').$this->PageNo(),0,0,'R');\n\n }", "function Footer() {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial','I',8);\n // Print centered page number\n // $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n }", "public function Footer()\n {\n $this->SetFont('Arial', 'I', 8);\n $this->SetY(-15);\n $this->Write(4, 'Dokumen ini dicetak secara otomatis menggunakan sistem terkomputerisasi');\n\n $time = \"Dicetak pada tanggal \" . date('d-m-Y H:i:s') . \" WIB\";\n\n $this->SetX(-150);\n $this->Cell(0, 4, $time, 0, 0, 'R');\n }", "function Footer()\n {\n date_default_timezone_set('UTC+1');\n //Date\n $tDate = date('F j, Y, g:i:s a');\n // Position at 1.5 cm from bottom\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial', 'I', 12);\n // Text color in gray\n $this->SetTextColor(128);\n // Page number\n $this->Cell(0, 10,utf8_decode('Page ' . $this->PageNo().' \n CHUYC \n '.$tDate.'\n +237 693 553 454\n '.$this->Image(SITELOGO, 189, 280, 10, 10,'', URLROOT)), 0, 0, 'L');\n }", "function Footer()\n\t{\n\t\t$this->SetY(-15);\n\t\t// Select Arial italic B\n\t\t$this->setfont('Arial','I',14);\n\t\t$this->cell(250,8,\"Proyecto Final, copyright &copy; 2019\",0,0,'c');\n\t\t// Print centered page numbre\n\t\t$this->Cell(0,10,'Pag.'.$this->PageNo(),0,0,'c');\n\t}", "public function Footer(){\n // Position at 15 mm from bottom\n $this->SetY(-15);\n // Set font\n\t\t$html = \"<table>\";\n\t\t$html .= \"<tr><td>unidad de adm y serv</td><td>responsable del proyecto o accion centralizada</td><td>unidad de finanzas</td><td>unidad de planificacion ppto</td><td>presidente</td><td>secreatria de adcripcion</td><td>Secretaria de Planificacion presupuesto y control de gestion</td><td>Gobernador del estado</td></tr>\";\n\t\t$html .= \"<tr><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td></tr>\";\n\t\t$html .= \"</table>\";\n\t\t$this->writeHTMLCell($w = 0, $h = 0, $x = '', $y = '', $html, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = '', $autopadding = true);\n $this->SetFont('helvetica', 'I', 8);\n // Page number\n $this->Cell(0, 10, 'Page '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');\n }", "function Footer()\n {\n $this->SetY(-100);\n\n for ( $i=0; $i<1; $i++ ) {\n $this->SetFont( 'Arial', 'B', 8 );\n $this->Cell( 80, 5, \"ACCOUNT MANAGER'S SIGNATURE\", 1, 0, 'C', false );\n }\n\n $this->SetY(-100);\n\n for ( $i=0; $i<1; $i++ ) {\n $this->SetX(110);\n $this->SetFont( 'Arial', 'B', 8 );\n $this->Cell( 80, 5, \"EMPLOYEE'S SIGNATURE\", 1, 0, 'C', false );\n }\n\n $this->SetY(-15);\n $this->SetFont( 'Arial', 'I', 8 );\n $this->Cell( 40, 0, \"Date Printed: \".$_SESSION[\"DATE_PRINTED\"], 0, 0, 'C', false );\n\n }", "function footer() {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial', 'I', 8);\n // Print current and total page numbers\n $this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C');\n }", "function Footer()\n{\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial','I',8);\n // Page number\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n}", "function Footer()\n{\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial','I',8);\n // Page number\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n}", "public function Footer()\n {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial', 'I', 8);\n // Print centered page number\n $this->Cell(0, 4, utf8_decode('Atenea - Página ' . $this->PageNo()), 0, 0, 'C');\n }", "public function Footer() {\n $this->SetY(-15);\n // Set font\n $this->SetFont('helvetica', 'I', 8);\n // Page number\n $this->Cell(0, 10, 'Page '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');\n }", "public function Footer(){\n $this->SetY(-15);\n $this->SetFont('Arial','I',6);\n $this->Cell(0,5,'\"ESTA FACTURA CONTRIBUYE AL DESARROLLO DEL PAIS, EL USO ILICITO DE ESTA SERA SANCIONADO DE ACUERDO A LEY\"',0,0,'C');\n $this->Ln(5);\n $this->Cell(0,5,'Ley No 453: Tienes derecho a un trato equitativo sin discriminacion en la oferta de servicios.',0,0,'C');\n }", "function Footer()\n {\n $this->SetY(-6);\n //Arial italic 8\n $this->SetFont('Arial','I',8);\n //Page number\n $this->Cell(0,10,'Página '.$this->PageNo(),0,0,'C');\n }", "function Footer()\n {\n //Position at 1.5 cm from bottom\n $this->SetY(-15);\n //Arial italic 8\n $this->SetFont('Arial','I',8);\n //Page number and page amount\n $this->Cell(0,10, text(\"bill_page\").\" \".$this->PageNo().'/{nb}',0,0,'C');\n }", "public function Footer() {\r\n $this->SetTextColor(0,0,0);\r\n /* insertamos numero de pagina y total de paginas*/\r\n $this->Cell(0, 10, 'Página '.$this->getAliasNumPage().\r\n ' de un total de '.\r\n $this-> getAliasNbPages(),\r\n 0, false, 'C', 0, '', 0, false, 'T', 'M');\r\n $this->SetDrawColor(0,0,0);\r\n /* dibujamos una linea roja delimitadora del pie de página */\r\n $this->Line(15,282,195,282);\r\n\r\n }", "function Footer() {\n\n$this->SetY(-15);\n\n//Seleciona a fonte Arial itálico 8\n\n$this->SetFont('Arial','I',8);\n\n//Imprime o número da página corrente e o total de páginas\n\n$this->Cell(0,10,'Página '.$this->PageNo().' ',0,0,'C');\n\n\t}", "function Footer()\n{\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial','I',8);\n // Print centered page number\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n}", "function Footer()\n\t{\n\t\t$this->SetY(-15);\n\t\t//buat garis horizontal\n\t\t$this->Line(10,$this->GetY(),210,$this->GetY());\n\t\t//Arial italic 9\n\t\t$this->SetFont('Arial','I',9);\n $this->Cell(0,10,'copyright gubugkoding.com Semarang ' . date('Y'),0,0,'L');\n\t\t//nomor halaman\n\t\t$this->Cell(0,10,'Halaman '.$this->PageNo().' dari {nb}',0,0,'R');\n\t}", "function Footer() {\n\n$this->SetY(-15);\n\n//Seleciona a fonte Arial itálico 8\n\n$this->SetFont('courier','I',8);\n\n//Imprime o número da página corrente e o total de páginas\n\n$this->Cell(0,10,'Página '.$this->PageNo().' ',0,0,'C');\n\n\t}", "function Footer()\n\t{\n\t\t//$this->Image('../imagenes/pie.jpg',15,250,170);\n\t\t$this->AliasNbPages();\n\t\t$this->SetY(-23);\n\t\t\n\t\t$this->SetFont('Arial','B',9);\n\t\t$this->MultiCell(180,5,utf8_decode(''),'0','C');\n\t\t\n\t $this->SetFont('Arial','I',8);\n\t $this->Cell(0,7,'Pag. '.$this->PageNo().' / {nb}',0,1,'C');\n\t}", "function Footer()\n {\n $this->SetY(-15);\n\n // Police Arial italique 8\n $this->SetFont('Arial','I',6);\n // Num?ro de page\n $this->Cell(0,8,'Page '.$this->PageNo().'/{nb}',0,0,'C');$this->Ln(3);\n $this->Cell(0,8,\"Algerian Gulf Life Insurance Company, SPA au capital social de 1.000.000.000 de dinars algériens, 01 Rue Tripoli, Hussein Dey Alger, \",0,0,'C');\n $this->Ln(2);\n $this->Cell(0,8,\"RC : 16/00-1009727 B 15 NIF : 001516100972762-NIS :0015160900296000\",0,0,'C');\n $this->Ln(2);\n $this->Cell(0,8,\"Tel : +213 (0) 21 77 30 12/14/15 Fax : +213 (0) 21 77 29 56 Site Web : www.aglic.dz \",0,0,'C');\n }", "function Footer(){\r\n $this->SetY(-15); // Position at 1.5 cm from bottom\r\n $this->SetFont('Arial','I',8); // Arial italic 8\r\n $this->Cell(0,10,'Pagina '.$this->PageNo().'/{nb}',0,0,'C'); // Page number\r\n }", "function Footer()\n {\n $this->SetY(-15);\n // Police Arial italique 8\n $this->SetFont('Arial','I',6);\n // Num?ro de page\n $this->Cell(0,8,'Page '.$this->PageNo().'/{nb}',0,0,'C');$this->Ln(3);\n $this->Cell(0,8,\"Algerian Gulf Life Insurance Company, SPA au capital social de 1.000.000.000 de dinars algériens, 01 Rue Tripoli, Hussein Dey Alger, \",0,0,'C');\n $this->Ln(2);\n $this->Cell(0,8,\"RC : 16/00-1009727 B 15 NIF : 001516100972762-NIS :0015160900296000\",0,0,'C');\n $this->Ln(2);\n $this->Cell(0,8,\"Tel : +213 (0) 21 77 30 12/14/15 Fax : +213 (0) 21 77 29 56 Site Web : www.aglic.dz \",0,0,'C');\n }", "public function Footer(){\n\t\t$cur_y = $this->y;\n\t\t$this->SetTextColorArray($this->footer_text_color);\n\t\t//set style for cell border\n\t\t$line_width = (0.85 / $this->k);\n\t\t$this->SetLineStyle(array('width' => $line_width, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => $this->footer_line_color));\n\n\t\t//$w_page = isset($this->l['w_page']) ? $this->l['w_page'].' ' : '';\n\t\t//AJK, 28-JUN-2015: Could not find where l['w_page'] is set in class TCPDF, so simplifying code with own private member\n\t\tif (empty($this->pagegroups)) {\n\t\t\t$pagenumtxt = $this->w_page. ' ' . $this->getAliasNumPage().' OF '.$this->getAliasNbPages();\n\t\t} else {\n\t\t\t$pagenumtxt = $this->w_page. ' ' . $this->getPageNumGroupAlias().' OF '.$this->getPageGroupAlias();\n\t\t}\n\t\t$this->SetY($cur_y);\n\t\t//AJK, 28-JUN-2015: Print page number twice, i.e., on left and right edge of footer. \n\t\t// Taking advantage of existing code that printed once based on whether document was set for RTL or LTR\n\t\t$this->SetX($this->original_lMargin);\n\t\t$this->Cell(0, 0, $pagenumtxt, 0, 0, 'L');\n\t\t$this->SetX($this->original_rMargin);\n\t\t$this->Cell(0, 0, $this->getAliasRightShift().$pagenumtxt, 0, 0, 'R');\n\t}", "function Footer()\n{\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial','I',8);\n // Print centered page number\n $this->Cell(0,10,'Page asdjlkasjdlfkjasdjlfkjkls'.$this->PageNo(),0,0,'C');\n}", "function Footer()\n{\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial','I',8);\n // Print centered page number\n $this->Cell(0,10,'Page asdjlkasjdlfkjasdjlfkjkls'.$this->PageNo(),0,0,'C');\n}", "function Footer()\n{\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial','I',8);\n // Print current and total page numbers\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n}", "function Footer()\r\n{\r\n $this->SetY(-15);\r\n // Select Arial italic 8\r\n $this->SetFont('Arial','I',8);\r\n // Print centered page number\r\n $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');\r\n}", "function Footer()\r\n{\r\n $this->SetY(-15);\r\n // Select Arial italic 8\r\n $this->SetFont('Arial','I',8);\r\n // Print centered page number\r\n $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');\r\n}", "function Footer()\n{\n // Position at 1.5 cm from bottom\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial','I',8);\n // Page number\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n}", "public function Footer_ZZZ() {\n $this->SetY(-15);\n // Set the footer font \n $this->SetFont('helvetica', 'I', 8);\n // Page number\n $this->Cell(0, 10, 'Page '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');\n }", "function Footer()\n{\n $this->SetY(-15);\n //Arial italic 8\n $this->SetFont('Arial','I',8);\n //Page number\n $pagenum = $this->PageNo();\n $this->Cell(0,10,'Page '.$pagenum.'',0,0,'C');\n}", "public function Footer() {\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial', 'I', 8);\n // Text color in gray\n $this->SetTextColor(128);\n // Page number\n $this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C');\n }", "protected function makeFooter()\n {\n }", "function Footer()\n{\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial','I',8);\n // Print centered page number\n $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');\n}", "function Footer(){\n\t\t// Positionnement à 1,5 cm du bas\n\t\t$this->SetY(-15);\n\t\t// Police Arial italique 8\n\t\t$this->SetFont('Arial','I',8);\n\t\t// Numéro de page\n\t\t$this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n\t}", "function Footer()\n\t\t\t\t{\n\t\t\t\t $this->SetY(-15);\n\t\t\t\t // Select Arial italic 8\n\t\t\t\t $this->SetFont('Arial','I',8);\n\t\t\t\t // Print centered page number\n\t\t\t\t $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');\n\t\t\t\t}", "function Footer()\n{\n $this->SetY(-17);\n\n $this->SetFont( PDF_INV_FOOTER_TEXT_FONT,\n PDF_INV_FOOTER_TEXT_EFFECT,\n PDF_INV_FOOTER_TEXT_HEIGHT); \n \n $text_color=explode(\",\",PDF_INV_FOOTER_TEXT_COLOR );\n $this->SetTextColor($text_color[0], $text_color[1], $text_color[2]);\n \n\t$this->Cell(0,10, PDF_INV_FOOTER_TEXT, 0, 0,'C');\n\t\n\t$this->SetY(-14);\n\t//Page number\n $this->Cell(0,10,PRINT_INVOICE_PAGE_NUMBER.$this->PageNo(),0,0,'C' );\n\t}", "function Footer() {\r\n // footer line\r\n $this->SetFooterFont();\r\n $this->SetFillColor(0, 0, 0);\r\n $this->Rect(10, $this->PageBreakTrigger + 2, 190, 0.2, \"F\");\r\n $this->Rect(10, $this->PageBreakTrigger + 2.5, 190, 0.2, \"F\");\r\n $this->SetY($this->PageBreakTrigger + 5);\r\n\r\n $this->Cell(0, 0, \"Used by permission, CCLI #2752477\", 0, 1, \"L\");\r\n $this->Cell(0, 0, \"The Ridge Community Church\", 0, 1, \"R\");\r\n }", "function Footer() {\n\t$this->SetY(-15);\n\t// Arial italic 8\n\t$this->SetFont('Arial','I',8);\n\t// Text color in gray\n\t$this->SetTextColor(128);\n\t// Page number\n\t$this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');\n}", "function Footer()\n\t{\n\t\t$this->SetY(-13);\n\t\t// Arial italic 8\n\t\t$this->SetFont('Arial','I',8);\n\t\t// Page number\n\t\t$this->Cell(0,10,'Designed by winnie(+254701008108)',0,0,'C');\n\t\t$this->SetY(-18);\n\t\t$this->Cell(0,10,'www.veranevents.com',0,0,'C');\n\t}", "public function Footer()\n {\n // Go to 10 cm from bottom\n $this->SetY(-10);\n // Set font to Open Sans\n $this->SetFont('opensans', 'I', 6);\n // Print centered page number with datetime and timezone\n $this->AliasNbPages('{totalPages}');\n // The timezone of the user is retrieved from their Auth0 user's profile if available, otherwise the server time zone is used\n // related to this trello card https://trello.com/c/OjWZzsGA\n $timezone = ($_SESSION['auth0_user']['https://www.boxtribute.com/timezone']) ? $_SESSION['auth0_user']['https://www.boxtribute.com/timezone'] : date_default_timezone_get();\n\n $dt = new DateTime('now', new DateTimeZone($timezone));\n // This is quick fix for an issue with the alignment of footer text as the library incorrectly calculates the text length when template variables {totalPages} are used\n $totalPages = ($_GET['count'] && 0 != $_GET['count']) ? round(intval($_GET['count']) / 2) : 1;\n $this->Cell(0, 10, 'Page '.$this->PageNo().' of '.$totalPages.' Printed on '.$dt->format('d-m-Y H:i:s').\" {$timezone}\", 0, 0, 'C');\n }", "function Footer() {\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial', 'I', 10);\n // Text color in gray\n $this->SetTextColor(128);\n // Page number\n $this->Cell(0, 10, 'Page ' . $this->PageNo(), 0, 0, 'C');\n }", "function Footer()\n\t\t\t\t{\n\t\t\t\t\t$this->SetY(-15);\n\t\t\t\t\t//Arial italic 8\n\t\t\t\t\t$this->SetFont('Helvetica','I',8);\n\t\t\t\t\t//Page number\n\t\t\t\t\t$this->Cell(0,10,'Page '.$this->PageNo().'/'.$comp_name,'T',0,'C');\n\t\t\t\t\t$this->SetDrawColor(8, 102, 198);\n\t\t\t\t\tparent::Footer();\n\t\t\t\t}", "public function getNextMonth(){\n\t\tif($this->getMonth() == 12){return 1;}\n\t\telse{return $this->getMonth()+1;}\n\t}", "function Footer(){\n $this->SetY(-25);\n // Arial italic 8\n $this->SetFont('Arial','B',8);\n // Page number\n $this->Cell(125,10,'NOTE :','LTR',0,'L');\n $this->Cell(30,7, $this->normalize('REPORT BY'),'BR',0,'L',);\n $this->Cell(40,7, $this->normalize(''),'BR',1,'L',);\n\n $this->Cell(125,7,'','LBR',0,'L');\n $this->Cell(30,7, $this->normalize('INSPETOR BY'),'TBR',0,'L',);\n $this->Cell(40,7, $this->normalize(''),'TBR',1,'L',);\n $this->SetFont('THSarabunNew','B',12);\n $this->Cell(60,7, iconv('UTF-8', 'cp874','อายุการจัดเก็บ : 2 ปี'),'',0,'L',);\n $this->Cell(60,7,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n $this->Cell(75,7, iconv('UTF-8', 'cp874','FM-MA-04 REV.7 : 1 Nov 09'),'',1,'R',);\n\n\n}", "function Footer() {\n $this->SetY(-15);\n //Pilih font Arial italic 8\n $this->SetFont('Helvetica', 'I', 8);\n //Tampilkan nomor halaman rata tengah\n $this->Cell(0, 10, 'Page ' . $this->getAliasNumPage() . '/' . $this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');\n }", "function Footer()\n {\n //$year = date('Y');\n //$footertext = sprintf($this->xfootertext, '');\n $this->SetY(-15);\n //$this->SetFont('', '', 5);\n //$this->SetTextColor(0, 0, 0);\n //$this->SetFont($this->xfooterfont,'',$this->xfooterfontsize);\n $this->writeHTML($this->xfootertext, true, false, true, false, '');\n //$this->Cell(0,8, $footertext,'T',3,'L');\n }", "public function Footer() {\n $this->SetY(-15);\n // Select helvetica italic 8\n $this->SetFont('helvetica', '', 10);\n // Print current and total page numbers\n\n //$this->Cell(0,10,'Page '.$this->pageNo().'/{nb}',0,0,'C');\n\n $this->Cell(0, 4, 'This document shall be deemed uncontrolled unless labelled \"CONTROLLED\"', 0, 0, 'C');\n $this->ln();\n\n $this->Cell($this->w - ($this->w * 0.51), 4, 'User should verify latest', 0, 0, 'R');\n $this->SetFont('helvetica', 'B', 10);\n $this->Cell(0, 4, ' revision.', 0, 0, 'L');\n $this->ln();\n\n $this->SetFont('helvetica', 'I', 7);\n\n $pageNo = 'Page '.$this->getAliasNumPage().' of '.$this->getAliasNbPages();\n $this->Cell(0, 3, $pageNo, 0, 0, 'R');\n }", "function _renderSpacer()\n {\n // ... maybe append form-spacer to class of next or previous element\n echo '<div class=\"form-spacer\">&nbsp;</div>';\n }", "function Footer()\n\t{\n\t\t$this->SetY(-15);\n\t\t// Arial italic 8\n\t\t$this->SetFont('Arial','I',9);\n\t\t// Page number\n\t\t$this->Cell(0,10,utf8_decode('Puede contactar con nosotros a través de el correo [email protected] o en la página tapibautista.com/contact'),0,0,'C');\n\t\t\n\t}", "function Footer()\n {\n \n $this->SetY(-15);\n \n // Arial italic 8\n $this->SetFont('Arial','B',12);\n // Page number\n \n $this->Cell(180,15,''.$this->PageNo(),0,0,'R');\n $this->Image('../fpdf/footer.png',20,280,170,5);\n \n }", "public function Footer() {\r\n\t\t$this->SetY(-20);\r\n\t\tif ( ($this->PageNo() == 1 && $this->primera_pagina_con_pie) || $this->PageNo() != 1 ) {\r\n\t\t\t//$this->SetY(-15); //Position at 1.5 cm from bottom\r\n\t\t\t//$this->Formato( $this->familia, 'I', 8 );\r\n\t\t\t//$this->Celda( 0, 10, 'Página '.$this->PageNo().'/{nb}',0, 0, 'C');\r\n\t\t}\r\n\t\tswitch ($this->plantilla) {\r\n\t\t\tcase 1:\r\n\t\t\t/*\r\n\t\t\t$this->SetFillColor( 0, 0, 0 );\r\n\t\t\t$this->Celda( $this->ancho-10, 0.2, '', 0, 1, '', true );\r\n\t\t\t$this->Ln();\r\n\t\t\t$this->SetFillColor(255, 255, 255);\r\n\t\t\t$this->Celda( $this->ancho-10, 0.2, '', 0, 1, '', true );\r\n\t\t\t$this->Ln();\r\n\t\t\t$this->SetFillColor( 0, 0, 0 );\r\n\t\t\t$this->Celda( $this->ancho-10, 0.2, '', 0, 1, '', true );\r\n\t\t\t$this->Ln();\r\n\t\t\t$this->Formato( 'Helvetica', '', 9\t );\r\n\t\t\t$this->Celda( $this->ancho-10, 4, \"\\\"CONTRALORES SOMOS TODOS\\\"\", 0, 1, 'C');\r\n\t\t\t$this->SetY(-20);\r\n\t\t\t$this->SetFont('','',6);\r\n\t\t\t$this->Celda( $this->ancho-10, 6, \"C.M.S.= U.B.M. - 07(09-08-2010)\", 0, 1, 'R');\r\n\t\t\t*/\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 2:\r\n\t\t\t$this->SetY(-25);\r\n\t\t\t\t$this->Formato( 'Helvetica', '', 10 );\r\n\t\t\t\t$this->SetFillColor(255, 255, 255 );\r\n\t\t\t\t$this->Celda( 256, 6, utf8_decode($this->header['responsable']), 0, 1, 'R', true );\r\n\t\t\t\t$this->Celda( 256, 6, 'Nombre y Apellido del '.utf8_decode($this->header['cargo']), 0, 1, 'R', true );\r\n\t\t\t\t$this->Celda( 50, 6, 'Sello de la Unidad', 0, 0, 'C', true );\r\n\t\t\t\t$this->Celda( 206, 6, 'Firma', 0, 1, 'R', true );\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 3:\r\n\t\t\t$this->SetY(-25);\r\n\t\t\t\t$this->Formato( 'Helvetica', '', 10 );\r\n\t\t\t\t$this->SetFillColor(255, 255, 255 );\r\n\t\t\t\t$this->Celda( 256, 6, utf8_decode($this->header['responsable']), 0, 1, 'R', true );\r\n\t\t\t\t$this->Celda( 256, 6, 'Nombre y Apellido del '.utf8_decode($this->header['cargo']), 0, 1, 'R', true );\r\n\t\t\t\t$this->Celda( 50, 6, 'Sello de la Unidad', 0, 0, 'C', true );\r\n\t\t\t\t$this->Celda( 206, 6, 'Firma', 0, 1, 'R', true );\r\n\t\t\t\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 4:\r\n\t\t\t$this->SetY(-60);\r\n\t\t\t$this->SetFillColor( 0, 0, 0 );\r\n\t\t\t$this->Celda( $this->ancho-100, 0.2, '', 0, 1, '', true );\r\n\t\t\t$this->SetFillColor( 255, 255, 255 );\r\n\t\t\t$y = $this->GetY();\r\n\t\t\t$this->Celda( 120, 48, '', 1, 0, '', true );\r\n\t\t\t$x = $this->GetX();\r\n\t\t\t$this->Celda( 136, 48, '', 1, 1, '', true );\r\n\t\t\t$x2 = $this->GetX();\r\n\t\t\t\r\n\t\t\t$this->SetY($y+1);\r\n\t\t\t$this->SetX($x+1);\r\n\t\t\t$this->Celda( 66, 7, '12. Faltantes Determinados por:', 0, 0, '', true );\r\n\t\t\t$this->Celda( 65, 7, utf8_decode($this->header['cp_nombre']), 'B', 1, '', true );\r\n\t\t\t$this->SetX($x+1);\r\n\t\t\t$this->Celda( 66, 7, '13. Cargo que Desempeña:', 0, 0, '', true );\r\n\t\t\t$this->Celda( 65, 7, utf8_decode($this->header['cp_cargo']), 'B', 1, '', true );\r\n\t\t\t$this->SetX($x+1);\r\n\t\t\t$this->Celda( 66, 7, '14. Dependencia a la Cual está Adscrito:', 0, 0, '', true );\r\n\t\t\t$this->Celda( 65, 7, utf8_decode($this->header['cp_dp']), 'B', 1, '', true );\r\n\t\t\t$this->SetX($x+1);\r\n\t\t\t$this->Celda( 66, 7, '15. Firma', 0, 0, '', true );\r\n\t\t\t$this->Celda( 65, 7, '', 'B', 1, '', true );\r\n\t\t\t$this->SetX($x+1);\r\n\t\t\t$this->Celda( 66, 7, '16. Jefe de Unidad de Trabajo:', 0, 0, '', true );\r\n\t\t\t$this->Celda( 65, 7, utf8_decode($this->header['responsable']), 'B', 1, '', true );\r\n\t\t\t$this->SetX($x+1);\r\n\t\t\t$this->Celda( 66, 7, '17. Firma', 0, 0, '', true );\r\n\t\t\t$this->Celda( 65, 7, '', 'B', 1, '', true );\r\n\t\t\t\r\n\t\t\t$this->SetY($y+1);\r\n\t\t\t$this->SetX($x2+1);\r\n\t\t\t$this->Celda( 35, 6, '11. Observaciones:', 0, 1, '', true );\r\n\t\t\t\r\n\t\t\t$this->SetX($x2+3);\r\n\t\t\t$this->MultiCell( 114, 6, utf8_decode($this->header['observaciones']),'','');\r\n\t\t\t// \r\n\t\t\t$this->Ln();\r\n\t\t\t$this->SetY(-11);\r\n\t\t\t$this->SetFont('','',7);\r\n\t\t\t$this->Celda( $this->ancho-10, 6, \"C.M.S.= U.B.M. - 15(17-12-2007)\", 0, 1, 'R');\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "function Footer() {\n $oldColor = $this->TextColor;\n $this->SetTextColor(PDF_FOOTER_COLOR['red'],\n PDF_FOOTER_COLOR['green'],\n PDF_FOOTER_COLOR['blue']);\n $x = $this->GetX();\n $y = $this->GetY();\n $footerY = $this->GetPageHeight() -20;\n $this->SetXY(170, $footerY);\n $this->Cell(0, 10, ($this->footerPage.$this->PageNo().$this->footerOutOf.$this->AliasNbPages));\n $this->SetXY($x, $y);\n $this->TextColor = $oldColor;\n }", "static function add_eb_nom_end(): void {\r\n\t\tself::add_acf_inner_field(self::ebs, self::eb_nom_end, [\r\n\t\t\t'label' => 'Nomination period end',\r\n\t\t\t'type' => 'text',\r\n\t\t\t'instructions' => 'e.g. March 26 @ 11 p.m.',\r\n\t\t\t'required' => 1,\r\n\t\t\t'conditional_logic' => [\r\n\t\t\t\t[\r\n\t\t\t\t\t[\r\n\t\t\t\t\t\t'field' => self::qualify_field(self::eb_finished),\r\n\t\t\t\t\t\t'operator' => '!=',\r\n\t\t\t\t\t\t'value' => '1',\r\n\t\t\t\t\t],\r\n\t\t\t\t],\r\n\t\t\t],\r\n\t\t\t'wrapper' => [\r\n\t\t\t\t'width' => '',\r\n\t\t\t\t'class' => '',\r\n\t\t\t\t'id' => '',\r\n\t\t\t],\r\n\t\t]);\r\n\t}", "function Footer()\n\t\t{\n\t\t\t$this->SetY(-15);\n\t\t\t// Select Arial italic 8\n\t\t}", "function _putDateSchedules0502s($pdf, $font, $date1, $date2, $y) {\n if (!empty($date1)) {\n $y1 = date('Y', strtotime($date1)) - 1988;\n $m1 = date('n', strtotime($date1));\n $d1 = date('j', strtotime($date1));\n\n $pdf->SetFont($font, null, 9, true);\n $pdf->SetXY(32.4, $y);\n $pdf->MultiCell(10, 5, $y1, 0, 'C');\n $pdf->SetXY(41.4, $y);\n $pdf->MultiCell(10, 5, $m1, 0, 'C');\n $pdf->SetXY(49, $y);\n $pdf->MultiCell(10, 5, $d1, 0, 'C');\n }\n\n if (!empty($date2)) {\n $y2 = date('Y', strtotime($date2)) - 1988;\n $m2 = date('n', strtotime($date2));\n $d2 = date('j', strtotime($date2));\n\n $pdf->SetFont($font, null, 9, true);\n $pdf->SetXY(32.4, $y + 3);\n $pdf->MultiCell(10, 5, $y2, 0, 'C');\n $pdf->SetXY(41.4, $y + 3);\n $pdf->MultiCell(10, 5, $m2, 0, 'C');\n $pdf->SetXY(49, $y + 3);\n $pdf->MultiCell(10, 5, $d2, 0, 'C');\n }\n }", "public function hasEndMonth() {\n return $this->_has(7);\n }", "function endMonth($start_month, $timeline)\n{\n $convertStartMonthToDateFormat = strtotime($start_month);\n $convertStartMonthToMonthNumber = date('n', $convertStartMonthToDateFormat);\n $monthNum = $convertStartMonthToMonthNumber + (int)$timeline;\n\n $mytime = Carbon::now();\n $mytime = strtotime($mytime);\n $month = date('F', $mytime);\n $currentMonth = strtotime($month);\n $year = date('Y', $mytime);\n\n if($currentMonth > $convertStartMonthToDateFormat) {\n $newyear = $year + 1;\n if($monthNum > 12) {\n $monthNum = $monthNum - 12;\n $newyear = $newyear + 1;\n }\n }\n elseif($currentMonth <= $convertStartMonthToDateFormat) {\n $newyear = $year;\n if($monthNum > 12) {\n $monthNum = $monthNum - 12;\n $newyear = $newyear + 1;\n }\n }\n $convertEndMonthYear = strtotime($monthNum . '/' . 1 . '/' .$newyear);\n $endMonth = date('Y-m-d', $convertEndMonthYear);\n\n return $endMonth;\n}", "public function Footer() {\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('helvetica','I',8);\n \n }", "function Footer() {\r\n\t\t\t$this->SetY( -15 );\r\n\t\t\t\r\n\t\t\t//set font to Arial, Bold, size 10\r\n\t\t\t$this->SetFont( 'Arial', 'B', 10 );\r\n\t\t\t\r\n\t\t\t//set font color to blue\r\n\t\t\t$this->SetTextColor( 52, 98, 185 );\r\n\t\t\t\r\n\t\t\t$this->Cell( 0, 10, 'www.iFadey.com', 0, 0, 'L' );\r\n\t\t\t\r\n\t\t\t//set font color to gray\r\n\t\t\t$this->SetTextColor( 150, 150, 150 );\r\n\t\t\t\r\n\t\t\t//write Page No\r\n\t\t\t$this->Cell( 0, 10, 'Page No: ' . $this->PageNo(), 0, 0, 'R' );\r\n\t\t}", "static function add_bod_nom_end(): void {\r\n\t\tself::add_acf_inner_field(self::bods, self::bod_nom_end, [\r\n\t\t\t'label' => 'Nomination period end',\r\n\t\t\t'type' => 'text',\r\n\t\t\t'instructions' => 'e.g. March 22 @ 11 p.m.',\r\n\t\t\t'required' => 1,\r\n\t\t\t'conditional_logic' => [\r\n\t\t\t\t[\r\n\t\t\t\t\t[\r\n\t\t\t\t\t\t'field' => self::qualify_field(self::bod_finished),\r\n\t\t\t\t\t\t'operator' => '!=',\r\n\t\t\t\t\t\t'value' => '1',\r\n\t\t\t\t\t],\r\n\t\t\t\t],\r\n\t\t\t],\r\n\t\t\t'wrapper' => [\r\n\t\t\t\t'width' => '',\r\n\t\t\t\t'class' => '',\r\n\t\t\t\t'id' => '',\r\n\t\t\t],\r\n\t\t]);\r\n\t}", "function makeFooter(){\n\tglobal $pdf;\n\t$pdf->Image('img/continental-pdf.png', 27, 697, 142);\n\t$pdf->Image('img/star-pdf.png', 218, 683, 57);\n\t$pdf->Image('img/nahad-pdf.png', 320, 686, 85);\n\t$pdf->Image('img/ifps-pdf.png', 456, 686, 128);\n\t\n\t\n\t$pdf->line(27, 750, 585, 750);\n\t// draw the footer information\n\t$pdf->SetFont('Helvetica','',10);\n\t$pdf->SetTextColor(0,0,0);\n\t\n\t$pdf->SetXY(27, 755);\n\t$pdf->Cell(150,10,'1.877.632.4118', 0, 1, 'L');\n\t$pdf->SetXY(177, 755);\n\t$pdf->Cell(258,10,'725 Century St. Wpg, MB, R3H 0M2', 0, 1, 'C');\n\t$pdf->SetXY(435, 755);\n\t$pdf->Cell(150,10,'mepbrothers.com', 0, 1, 'R');\n\t\n}", "function\tendTable() {\n\n\t\t/**\n\t\t *\n\t\t */\n\t\t$frm\t=\t$this->myDoc->currMasterPage->getFrameByFlowName( \"Auto\") ;\n\t\tfor ( $actRow=$this->myTable->getFirstRow( BRow::RTFooterTE) ; $actRow !== FALSE ; $actRow=$this->myTable->getNextRow()) {\n\t\t\t$this->punchTableRow( $actRow) ;\n\t\t}\n\t\t$frm->currVerPos\t+=\t$this->myTable->currVerPos ;\n\t\t$frm->currVerPos\t+=\t1.5 ;\t\t// now add the height of everythign we have output'\n\n\t\t/**\n\t\t * if there's less than 20 mm on this page\n\t\t *\tgoto next page\n\t\t */\n//\t\t$remHeight\t=\t$frm->skipLine(\t$this->myTablePar) ;\n//\t\tif ( $remHeight < mmToPt( $this->saveZone)) {\n//\t\t\t$this->tableFoot() ;\n//\t\t\t$this->myDoc->newPage() ;\n//\t\t\t$this->tableHead() ;\n//\t\t}\n\t}", "function Footer()\n {\n $this->SetY(-20);\n // Arial italic 8\n $this->SetFont('Arial','I',8);\n // Text color in gray\n $this->SetTextColor(128);\n // Page number\n $this->Cell(0,10,'Post address: PO Box K595, Haymarket,NSW 1240, Australia',0,0,'C');\n $this->Ln(5);\n $this->Cell(0,10,'Office address: Suite 309-311 Sussex Centre. 401 Sussex St. Sydney, 2000',0,0,'C');\n $this->Ln(5);\n $this->Cell(0,10,'Tel: 00612 9281 6299 www.geic.com.au',0,0,'C');\n }", "public function Footer()\n {\n global $PMF_LANG;\n\n // Set custom footer\n $this->setCustomFooter();\n\n $date = new PMF_Date($this->_config);\n\n $footer = sprintf(\n '(c) %d %s <%s> | %s',\n date('Y'),\n $this->_config->get('main.metaPublisher'),\n $this->_config->get('main.administrationMail'),\n $date->format(date('Y-m-d H:i'))\n );\n\n if (0 < PMF_String::strlen($this->customFooter)) {\n $this->writeHTMLCell(0, 0, '', '', $this->customFooter);\n }\n\n $currentTextColor = $this->TextColor;\n $this->SetTextColor(0, 0, 0);\n $this->SetY(-25);\n $this->SetFont($this->currentFont, '', 10);\n $this->Cell(0, 10, $PMF_LANG['ad_gen_page'].' '.$this->getAliasNumPage().' / '.$this->getAliasNbPages(), 0, 0, 'C');\n $this->SetY(-20);\n $this->SetFont($this->currentFont, 'B', 8);\n $this->Cell(0, 10, $footer, 0, 1, 'C');\n if ($this->enableBookmarks == false) {\n $this->SetY(-15);\n $this->SetFont($this->currentFont, '', 8);\n $baseUrl = 'index.php';\n if (is_array($this->faq) && !empty($this->faq)) {\n $baseUrl .= '?action=artikel&amp;';\n if (array_key_exists($this->category, $this->categories)) {\n $baseUrl .= 'cat='.$this->categories[$this->category]['id'];\n } else {\n $baseUrl .= 'cat=0';\n }\n $baseUrl .= '&amp;id='.$this->faq['id'];\n $baseUrl .= '&amp;artlang='.$this->faq['lang'];\n }\n $url = $this->_config->getDefaultUrl().$baseUrl;\n $urlObj = new PMF_Link($url, $this->_config);\n $urlObj->itemTitle = $this->question;\n $_url = str_replace('&amp;', '&', $urlObj->toString());\n $this->Cell(0, 10, 'URL: '.$_url, 0, 1, 'C', 0, $_url);\n }\n $this->TextColor = $currentTextColor;\n }", "function Footer()\n {\n $this->SetY(-15);\n //Select Arial Italic 8\n $this->SetFont('Arial','I',8);\n $this->SetX(86,5);\n $this->Write(5, '[ powered by '.$this->web_str.']',$this->web_str);\n //Print centered page number\n $this->Cell(0,10,$this->page_str.' '.$this->PageNo(),0,0);\n }", "function set_end_month($endMonth,&$error)\r\n {\r\n if (strlen($endMonth) > 0 && $endMonth != \"Select A Month\")\r\n\t\t{\r\n if (!preg_match('/[a-zA-Z]/i', $endMonth))\r\n {\r\n //return a invalid css class\r\n\t\t\t return \"class='error'\";\r\n }\r\n else\r\n {\r\n $this->EndMonth = filter_var(trim($endMonth), FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH);\r\n\r\n //return a valid css class\r\n\t\t\t return \"class='valid'\";\r\n }\r\n \r\n }\r\n else\r\n {\r\n //return a invalid css class\r\n\t\t\t return \"class='error'\";\r\n }\r\n\r\n }", "public function testGetStartEndOfMonth() {\n // We only allow start dates in 31-day months.\n $now = new \\DateTimeImmutable('2019-09-15');\n $line_item = $this->lineItemStub([], [\n 'interval_unit' => 'monthly',\n 'day_of_month' => '-1',\n ]);\n $date = Utils::getStartDate($line_item, $now);\n $this->assertEqual('2019-09-30', $date->format('Y-m-d'));\n\n // Tricky value as there is a Feb 29.\n $now = new \\DateTimeImmutable('2020-02-15');\n $date = Utils::getStartDate($line_item, $now);\n $this->assertEqual('2020-02-29', $date->format('Y-m-d'));\n }", "private function row_foot() {\n\t\t\t\n\t\t$row_foot = '<div class=\"adv_listing_mid\"><hr class=\"listing_divisor\" /></div>'.LB;\n\t\t\t\n\treturn $row_foot;\n\t}", "public function month_list()\n\t{\n\t\t// -------------------------------------\n\t\t// Load 'em up\n\t\t// -------------------------------------\n\n\t\t$this->load_calendar_datetime();\n\t\t$this->load_calendar_parameters();\n\n\t\t// -------------------------------------\n\t\t// Prep the parameters\n\t\t// -------------------------------------\n\n\t\t$params = array(\n\t\t\tarray(\n\t\t\t\t'name'\t\t=> 'date_range_start',\n\t\t\t\t'required'\t=> FALSE,\n\t\t\t\t'type'\t\t=> 'date',\n\t\t\t\t'default'\t=> 'year-01-01'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name'\t\t=> 'date_range_end',\n\t\t\t\t'required'\t=> FALSE,\n\t\t\t\t'type'\t\t=> 'date'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name'\t\t=> 'limit',\n\t\t\t\t'required'\t=> FALSE,\n\t\t\t\t'type'\t\t=> 'integer',\n\t\t\t\t'default'\t=> 12\n\t\t\t)\n\t\t);\n\n//ee()->TMPL->log_item('Calendar: Processing parameters');\n\n\t\t$this->add_parameters($params);\n\n\t\t$today = $this->CDT->date_array();\n\n\t\t$this->CDT->change_ymd($this->P->value('date_range_start', 'ymd'));\n\t\t$this->CDT->set_default($this->CDT->datetime_array());\n\n\t\tif ($this->P->value('date_range_end') === FALSE)\n\t\t{\n\t\t\t$this->P->set(\n\t\t\t\t'date_range_end',\n\t\t\t\t$this->CDT->add_month($this->P->value('limit'))\n\t\t\t);\n\n\t\t\t$this->CDT->reset();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->P->set('limit', 9999);\n\t\t}\n\n\t\t$dir = (\n\t\t\t$this->P->value('date_range_end', 'ymd') >\n\t\t\t\t$this->P->value('date_range_start', 'ymd')\n\t\t) ? 1 : -1;\n\n\t\t$output = '';\n\t\t$count = 0;\n\n//ee()->TMPL->log_item('Calendar: Looping');\n\n\t\tdo\n\t\t{\n\t\t\t$vars['conditional']\t= array(\n\t\t\t\t'is_current_month'\t\t=>\t(\n\t\t\t\t\t$this->CDT->year == $today['year'] AND\n\t\t\t\t\t$this->CDT->month == $today['month']\n\t\t\t\t),\n\t\t\t\t'is_not_current_month'\t=>\t(\n\t\t\t\t\t$this->CDT->year == $today['year'] AND\n\t\t\t\t\t$this->CDT->month == $today['month']\n\t\t\t\t) ? FALSE : TRUE,\n\t\t\t\t'is_current_year'\t\t=>\t(\n\t\t\t\t\t$this->CDT->year == $today['year']\n\t\t\t\t) ? TRUE : FALSE,\n\t\t\t\t'is_not_current_year'\t=>\t(\n\t\t\t\t\t$this->CDT->year == $today['year']\n\t\t\t\t) ? FALSE : TRUE\n\t\t\t);\n\n\t\t\t$vars['single']\t= array(\n\t\t\t\t'year'\t=> $this->CDT->year,\n\t\t\t\t'month'\t=> $this->CDT->month\n\t\t\t);\n\n\t\t\t$vars['date']\t= array(\n\t\t\t\t'month'\t\t\t=> $this->CDT->datetime_array(),\n\t\t\t\t'date'\t\t\t=> $this->CDT->datetime_array(),\n\t\t\t);\n\n\t\t\t$output .= $this->swap_vars($vars, ee()->TMPL->tagdata);\n\t\t\t$this->CDT->add_month($dir);\n\t\t\t$count++;\n\t\t}\n\t\twhile (\n\t\t\t$count < $this->P->value('limit') AND\n\t\t\t$this->CDT->ymd < $this->P->value('date_range_end', 'ymd')\n\t\t);\n\n\t\treturn $output;\n\t}", "public function setLastDayOfMonth()\r\n {\r\n $this->setDay($this->getLastDayOfMonth());\r\n\r\n return $this;\r\n }", "function\ttableFoot() {\n\n\t\t/**\n\t\t *\n\t\t */\n\t\t$frm\t=\t$this->myDoc->currMasterPage->getFrameByFlowName( \"Auto\") ;\n\t\tif ( $this->myDoc->pageNr >= 1) {\n\t\t\tfor ( $actRow=$this->myTable->getFirstRow( BRow::RTFooterCT) ; $actRow !== FALSE ; $actRow=$this->myTable->getNextRow()) {\n\t\t\t\tif ( $actRow->isEnabled()) {\n\t\t\t\t\t$this->punchTableRow( $actRow) ;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$frm->currVerPos\t+=\t1.5 ;\t\t// now add the height of everything we have output'\n\t\t}\n\t\tfor ( $actRow=$this->myTable->getFirstRow( BRow::RTFooterPE) ; $actRow !== FALSE ; $actRow=$this->myTable->getNextRow()) {\n\t\t\t$this->punchTableRow( $actRow) ;\n\t\t}\n\t\t$frm->currVerPos\t+=\t1.5 ;\t\t// now add the height of everythign we have output'\n\t}", "private function generateFoot() {\n echo '</div>';\n }", "function mkMonthBody($showNoMonthDays=0){\n\tif ($this->actmonth==1){\n\t\t$pMonth=12;\n\t\t$pYear=$this->actyear-1;\n\t}\n\telse{\n\t\t$pMonth=$this->actmonth-1;\n\t\t$pYear=$this->actyear;\n\t}\n$out=\"<tr>\";\n$cor=0;\n\tif ($this->startOnSun) $cor=1;\n\tif ($this->weekNum) $out.=\"<td class=\\\"\".$this->cssWeekNum.\"\\\">\".$this->mkWeekNum(1+$cor).\"</td>\";\n$monthday=0;\n$nmonthday=1;\n\tfor ($x=0; $x<=6; $x++){\n\t\tif ($x>=$this->firstday){\n\t\t$monthday++;\n\t\t$out.=$this->mkDay($monthday);\n\t\t}\n\t\telse{\n\t\t\tif ($showNoMonthDays==0) $out.=\"<td class=\\\"\".$this->cssNoMonthDay.\"\\\"></td>\";\n\t\t\telse $out.=\"<td class=\\\"\".$this->cssNoMonthDay.\"\\\">\".($this->getMonthDays($pMonth,$pYear)-($this->firstday-1)+$x).\"</td>\";\n\t\t}\n\t}\n$out.=\"</tr>\\n\";\n$goon=$monthday+1;\n$stop=0;\n\tfor ($x=0; $x<=6; $x++){\n\t\tif ($goon>$this->maxdays) break;\n\t\tif ($stop==1) break;\n\t\t$out.=\"<tr>\";\n\t\tif ($this->weekNum) $out.=\"<td class=\\\"\".$this->cssWeekNum.\"\\\">\".$this->mkWeekNum($goon+$cor).\"</td>\";\n\t\t\tfor ($i=$goon; $i<=$goon+6; $i++){\n\t\t\t\tif ($i>$this->maxdays){\n\t\t\t\t\tif ($showNoMonthDays==0) $out.=\"<td class=\\\"\".$this->cssNoMonthDay.\"\\\"></td>\";\n\t\t\t\t\telse $out.=\"<td class=\\\"\".$this->cssNoMonthDay.\"\\\">\".$nmonthday++.\"</td>\";\n\t\t\t\t\t$stop=1;\n\t\t\t\t}\n\t\t\t\telse $out.=$this->mkDay($i);\n\t\t\t}\n\t\t$goon=$goon+7;\n\t\t$out.=\"</tr>\\n\";\n\t}\n$this->selectedday=\"-2\";\nreturn $out;\n}" ]
[ "0.66103333", "0.5805584", "0.5805584", "0.58004963", "0.5792688", "0.5748435", "0.5729793", "0.5726929", "0.57091856", "0.55485076", "0.54882425", "0.5455331", "0.54490894", "0.5418281", "0.54126287", "0.5407858", "0.53825533", "0.5380916", "0.53771776", "0.53756195", "0.53728837", "0.5372667", "0.5362468", "0.5362468", "0.5359196", "0.53557044", "0.53363115", "0.533513", "0.53298897", "0.5325255", "0.532291", "0.53168666", "0.5315186", "0.5315186", "0.5310627", "0.5310441", "0.53001744", "0.5295909", "0.52864224", "0.5283711", "0.52835804", "0.52775306", "0.5276039", "0.5272468", "0.52699846", "0.52698094", "0.526408", "0.52525085", "0.52408034", "0.5240046", "0.5240046", "0.5226116", "0.5214913", "0.5214913", "0.5213639", "0.52122283", "0.5204109", "0.51974666", "0.518297", "0.517124", "0.51639897", "0.5162666", "0.5155144", "0.5142766", "0.5142362", "0.5137236", "0.5117825", "0.51100516", "0.5100168", "0.5089107", "0.5082895", "0.50802076", "0.50763977", "0.5067767", "0.50378585", "0.50104254", "0.49966654", "0.4996437", "0.49930698", "0.4936867", "0.49216425", "0.49041793", "0.48936638", "0.4893374", "0.48726338", "0.48594648", "0.4823488", "0.48201048", "0.47694033", "0.4767108", "0.4754833", "0.47515246", "0.47507355", "0.47486234", "0.47473776", "0.47448766", "0.47350186", "0.47326994", "0.47315124", "0.4729253" ]
0.78970635
0
Create a listing of events for HTML display Creates a listing of events occuring on the given day as items. These items are added into the cell of the calendar for the given day.
private function makeDayEventListHTML() { $showtext = ""; foreach($this->eventItems as $item) { if($item['date'] == $this->curYear.'-'.$this->curMonth.'-'.$this->dayOfMonth) { $category = (strlen($item['cat']) > 0 ? 'Category: '.$item['cat'].' - ' : ''); $outevents[$n]['category'] = $item['cat']; if($item['stdurl']) { $href = '<a href="'.$item['url'].'?id='.$item['id'].'" title="'.$category.$item['desc'].'">'.$item['text'].'</a>'; $outevents[$n]['url'] = $item['url'].'?id='.$item['id']; } else { $href = (strlen($item['url']) > 0 ? '<a href="'.$item['url'].'" title="'.$category.$item['desc'].'">'.$item['text'].'</a>' : $item['text']); $outevents[$n]['url'] = $item['url']; } $style = (strlen($item['catcolor']) > 0 ? ' style="background-color:#'.str_replace('#','',$item['catcolor']).';" ' : ' style="background-color:#eeeeee;" '); $showtext .= "\n\t\t\t<div class=\"dayContent\"".$style.">".$href."</div>\n\t\t"; $outevents[$n]['summary'] = $item['text']; $outevents[$n]['description'] = $item['desc']; $outevents[$n]['categorycolor'] = (strlen($item['catcolor']) > 0 ? str_replace('#','',$item['catcolor']) : '#eeeeee'); } $n++; } return $showtext; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function makeHTMLIterator()\n\t{\n\t\t$this->weekDayNum = $this->firstDayOfTheMonth+1;\n\t\tfor($this->dayOfMonth; $this->dayOfMonth <= $this->daysInMonth; $this->dayOfMonth++) {\n\t\t\t// Set the default style\n\t\t\t$style = 'class=\"normalDay\"';\n\t\t\t\n\t\t\t// Set the style to a weekend day style\n\t\t\tif(($this->weekDayNum == 8)||($this->weekDayNum == 7)) {\n\t\t\t\t$style = 'class=\"weekendDay\"';\n\t\t\t}\n\t\t\t\n\t\t\t// Set the style to a current day style\n\t\t\tif($this->curDay == $this->dayOfMonth) {\n\t\t\t\t$style = 'class=\"currentDay\"';\n\t\t\t}\n\t\t\t\n\t\t\t// If the current day is Sunday, add a new row\n\t\t\tif($this->weekDayNum == 8) {\n\t\t\t\t$this->calWeekDays .= \"\\t</tr>\\n\\t<tr>\\n\";\n\t\t\t\t$this->weekDayNum = 1;\n\t\t\t}\n\n\t\t\t// Draw days\n\t\t\t$this->calWeekDays .= \"\\t\\t<td valign=\\\"top\\\" \".$style.'>'.$this->dayOfMonth;\n\t\t\t\n\t\t\tif($this->addWeekDay) {\n\t\t\t\t$this->calWeekDays .= \"|\".$this->weekDayNum;\n\t\t\t}\n\t\t\t\n\t\t\tif(strlen($this->addEvtDest) > 0) {\n\t\t\t\t$addevtimg = (strlen($this->addEvtImg) > 0 ? '<img src=\"'.$this->addEvtImg.'\" class=\"addevtimg\" />' : '+');\n\t\t\t\t$this->calWeekDays .= '[<a href=\"'.$this->addEvtDest.'?date='.$this->curYear.'-'.$this->curMonth.'-'.$this->dayOfMonth.'\" title=\"Add Event\" class=\"addevt\">'.$addevtimg.'</a>]';\n\t\t\t}\n\t\t\t\n\t\t\t$this->calWeekDays .= \" \".$this->makeDayEventListHTML().\"</td>\\n\";\n\t\t\t\n\t\t\t$this->weekDayNum++;\n\t\t}\n\t}", "function display_day()\n{\n global $phpcid, $phpc_cal, $phpc_script, $phpcdb, $day, $month, $year;\n\n\t$monthname = month_name($month);\n\n $results = $phpcdb->get_occurrences_by_date($phpcid, $year, $month, $day);\n\n\t$have_events = false;\n\n\t$html_table = tag('table', attributes('class=\"phpc-main\"'),\n\t\t\ttag('caption', \"$day $monthname $year\"),\n\t\t\ttag('thead',\n\t\t\t\ttag('tr',\n\t\t\t\t\ttag('th', __('Title')),\n\t\t\t\t\ttag('th', __('Time')),\n\t\t\t\t\ttag('th', __('Description'))\n\t\t\t\t )));\n\tif($phpc_cal->can_modify()) {\n\t\t$html_table->add(tag('tfoot',\n\t\t\t\t\ttag('tr',\n\t\t\t\t\t\ttag('td',\n\t\t\t\t\t\t\tattributes('colspan=\"4\"'),\n\t\t\t\t\t\t\tcreate_hidden('action', 'event_delete'),\n\t\t\t\t\t\t\tcreate_hidden('day', $day),\n\t\t\t\t\t\t\tcreate_hidden('month', $month),\n\t\t\t\t\t\t\tcreate_hidden('year', $year),\n\t\t\t\t\t\t\tcreate_submit(__('Delete Selected'))))));\n\t}\n\n\t$html_body = tag('tbody');\n\n\twhile($row = $results->fetch_assoc()) {\n\t\n\t\t$event = new PhpcOccurrence($row);\n\n\t\tif(!$event->can_read())\n\t\t\tcontinue;\n\n\t\t$have_events = true;\n\n\t\t$eid = $event->get_eid();\n\t\t$oid = $event->get_oid();\n\n\t\t$html_subject = tag('td');\n\n\t\tif($event->can_modify()) {\n\t\t\t$html_subject->add(create_checkbox('eid[]',\n\t\t\t\t\t\t$eid));\n\t\t}\n\n\t\t$html_subject->add(create_occurrence_link(tag('strong',\n\t\t\t\t\t\t$event->get_subject()),\n\t\t\t\t\t'display_event', $oid));\n\n\t\tif($event->can_modify()) {\n\t\t\t$html_subject->add(\" (\");\n\t\t\t$html_subject->add(create_event_link(\n\t\t\t\t\t\t__('Modify'), 'event_form',\n\t\t\t\t\t\t$eid));\n\t\t\t$html_subject->add(')');\n\t\t}\n\n\t\t$html_body->add(tag('tr',\n\t\t\t\t\t$html_subject,\n\t\t\t\t\ttag('td', $event->get_time_span_string()),\n\t\t\t\t\ttag('td', attributes('class=\"phpc-desc\"'), $event->get_desc())));\n\t}\n\n\t$html_table->add($html_body);\n\n\tif($phpc_cal->can_modify()) {\n\t\t$output = tag('form',\n\t\t\t\tattributes(\"action=\\\"$phpc_script\\\"\"),\n\t\t\t\t$html_table);\n\t} else {\n\t\t$output = $html_table;\n\t}\n\n\tif(!$have_events)\n\t\t$output = tag('h2', __('No events on this day.'));\n\n\treturn tag('', create_day_menu(), $output);\n}", "public function buildDayList($date){\n\t\t$events = $this->getDayEvents($date);\n\t\t$count = 0;\n\t\t\n\t\tob_start();\n\t\tif(count($events) > 0){\n\t\t\tforeach($events as $key => $event){\t\t\t\n\t\t\t\t$recurringDays = $event->getRecurringDays();\n\t\t\t\t\t\t\n\t\t\t\t$dayOfWeek = date_create($date);\n\t\t\t\t$dayOfWeek = strtolower(date_format($dayOfWeek, \"l\"));\n\t\t\t\t//echo $dayOfWeek;\n\n\t\t\t\tif(count($recurringDays)){\n\t\t\t\t\tif(in_array($dayOfWeek, $recurringDays)){\n\t\t\t\t\t\techo '<h4>Events for ' . $this->getDate($date) . '</h4>';\n\t\t\t\t\t\techo $event->toHtml('listing');\n\t\t\t\t\t\techo '<hr />';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\techo '<h4>Events for ' . $this->getDate($date) . '</h4>';\n\t\t\t\t\techo $event->toHtml('listing');\n\t\t\t\t\techo '<hr />';\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t$count++;\n\t\t\t}\n\t\t}\n\t\treturn ob_get_clean();\n\t}", "public function buildCalendarList(){\n\t\t\n\t\t$first_day = $this->getFirstDay();\t\t\t\t\t\t//Determine what day of the week the month starts on\n\t\t$current_number_of_days = $this->getNumberOfDays();\t\t//Determine the number of days in the month\n\n\t\t$number_of_previous_days = $first_day;\t\t\t\t\t\t\t\t\t\t//Determine the number of days needed to complete the first week\n\t\t$prev_month_number_of_days = $this->getNumberOfDays($this->getMonth()-1); \t//Determine the number of days in the previous month\n\t\t\n\t\t$_SESSION['month'] = $this->getMonth();\n\t\t$_SESSION['year'] = $this->getYear();\n\t\t$_SESSION['view'] = 'list';\n\t\t\n\t\tob_start();?>\n <table border=\"0\" id=\"events_calendar\" class=\"calendar_list\">\n <?php echo $this->buildCalendarHead() ?>\n <tr>\n <td>\n <?php \n /*** CURRENT MONTH CELLS ***/\n $first_day = $this->getYear() . '-' . $this->getMonth() . '-01';\n $last_day = $this->getYear() . '-' . $this->getMonth() . '-' . $current_number_of_days;\n \n $object = $this->events_ob;\n $month_events = new $object();\n $month_events = $month_events->fetchAll(\"WHERE DATE(\" . $this->events_end_date_field . \") >= '\" . $first_day . \"' AND DATE(\" . $this->events_end_date_field . \") <= '\" . $last_day . \"'\", \"ORDER BY `\" . $this->events_end_date_field . \"` DESC\");\n \n if(count($month_events) > 0){\n for($day = 1; $day <= $current_number_of_days; $day++){\t\t//For each day in the current month\n $full_date = $this->getYear() . '-' . $this->getMonth() . '-' . $day;\n \n $events = $this->buildDayList($full_date);\t//get events for each day\n if(strlen(trim($events))){\n ?>\n <div class=\"day\">\n <?php echo $events; ?>\n </div>\n <?php\n }\n }\n }\n else{?>\n \t\t<h5><?php echo 'No events in ' . $this->getMonthName() . ' ' . $this->getYear();?></h5>\n <?php\n }\n ?> \n </td>\n </tr>\n </table>\n <?php\n return ob_get_clean();\n\t}", "public static function day_calendar_item($event, $class) {\r\n global $urlServer, $is_admin, $langDuration, $langAgendaNoTitle, $langModify, $langDelete, $langHour, $langConfirmDelete, $langReferencedObject;\r\n\r\n $formatted_calendar_item = \"\";\r\n $formatted_calendar_item .= \"<tr $class>\";\r\n $formatted_calendar_item .= \"<td valign='top'><div class=\\\"legend_color\\\" style=\\\"float:left;margin:3px;height:16px;width:16px;background-color:\".Calendar_Events::$calsettings->{$event->event_group.\"_color\"}.\"\\\"></div></td>\";\r\n $formatted_calendar_item .= \"<td valign='top'>\";\r\n $eventdate = strtotime($event->start);\r\n $formatted_calendar_item .= $langHour.\": \" . ucfirst(date('H:i', $eventdate));\r\n if ($event->duration != '') {\r\n $msg = \"($langDuration: \" . q($event->duration) . \")\";\r\n } else {\r\n $msg = '';\r\n }\r\n $formatted_calendar_item .= \"<br><b><div class='event'>\";\r\n $link = str_replace('thisid', $event->id, $urlServer.Calendar_Events::$event_type_url[$event->event_type]);\r\n if ($event->event_type != 'personal' && $event->event_type != 'admin') {\r\n $link = str_replace('thiscourse', $event->course, $link);\r\n }\r\n if ($event->title == '') {\r\n $formatted_calendar_item .= $langAgendaNoTitle;\r\n } else {\r\n if (!$is_admin && $event->event_type == 'admin') {\r\n $formatted_calendar_item .= q($event->title);\r\n } else {\r\n $formatted_calendar_item .= \"<a href=\\\"\".$link.\"\\\">\".q($event->title).\"</a>\";\r\n }\r\n }\r\n if ($event->event_type == \"personal\") {\r\n $fullevent = Calendar_Events::get_event($event->id);\r\n if ($reflink = References::item_link($fullevent->reference_obj_module, $fullevent->reference_obj_type, $fullevent->reference_obj_id, $fullevent->reference_obj_course)) {\r\n $formatted_calendar_item .= \"</b> $msg \".standard_text_escape($event->content)\r\n . \"$langReferencedObject: \"\r\n .$reflink\r\n . \"</div></td>\";\r\n }\r\n }\r\n else{\r\n $formatted_calendar_item .= \"</b> $msg \".standard_text_escape($event->content). \"</div></td>\";\r\n }\r\n $formatted_calendar_item .= \"<td class='right' width='70'>\";\r\n if ($event->event_type == \"personal\" || ($event->event_type == \"admin\" && $is_admin)) {\r\n $formatted_calendar_item .= icon('fa-edit', $langModify, str_replace('thisid',$event->id,Calendar_Events::$event_type_url[$event->event_type])). \"&nbsp;\r\n \".icon('fa-times', $langDelete, \"?delete=$event->id&et=$event->event_type\", \"onClick=\\\"return confirmation('$langConfirmDelete');\\\"\"). \"&nbsp;\";\r\n }\r\n $formatted_calendar_item .= \"</td>\";\r\n $formatted_calendar_item .= \"</tr>\";\r\n\r\n return $formatted_calendar_item;\r\n }", "function obj_do_cx_events_list( $events ) {\n\tif (is_array($events) ) {\n echo '<div class=\"event-list-grid\">';\n foreach ($events as $event ) {\n obj_do_cx_event_item_output($event);\n }\n echo '</div>';\n }\n}", "public static function index($day)\n {\n $todo = ORM::for_table('todo')\n ->where_raw(\"`completed` IS NULL\")\n ->order_by_asc('order')\n ->find_many();\n \n $tasklist = '';\n foreach ($todo as $task) {\n $task->age = self::age($task);\n set('task', $task);\n $tasklist .= partial('snippets/todo.html.php'); \n }\n \n return partial(\"todolist.html.php\", array('tasklist' => $tasklist));\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 }", "function render_list($events,$detail_flag){\n\t\t$number_of_events=sizeof($events);\n\t\t$i=0;\n\t\t$return_val=\"\";\n\n\t\t$return_val=$return_val.\"<table>\";\n\t\twhile($i<$number_of_events){\n\t\t\t$next_event=$events[$i];\n\n\t\t\t$return_val=$return_val.'<tr><td class=\"eventText\">';\n\n\t\t\tif ($detail_flag==\"off\") {\n\t\t\t\t$return_val=$return_val.\"<b>\";\n\t\t\t}\n\t\t\t$return_val=$return_val.\"(\".($i+1).\")&nbsp;&nbsp;\";\n\t\t\tif ($detail_flag==\"on\") {\n\t\t\t\t$return_val=$return_val.\"<a href=\\\"#\".($i+1).\"\\\">\";\n\t\t\t}\n\t\t\t$return_val=$return_val.(htmlspecialchars($next_event->get_title()));\n\t\t\tif ($detail_flag==\"off\") {\n\t\t\t\t$return_val=$return_val.\"</b>\";\n\t\t\t}\n\n\t\t\tif ($detail_flag==\"on\") {\n\t\t\t\t$return_val=$return_val.\"</a>\";\n\t\t\t}\n\n\t\t\t$return_val=$return_val.'<br />';\n\t\t\t$date=$next_event->get_start_date_object();\n\t\t\t$return_val=$return_val.date(\"D\", $date->timestamp).\"&nbsp;\";\n\t\t\t$return_val=$return_val.date(\"M\", $date->timestamp).\".&nbsp;\";\n\t\t\t$return_val=$return_val.$next_event->get_start_day().\",&nbsp;\";\n\n\t\t\t$start_time_obj=$next_event->get_start_time_object();\n\t\t\t$display_timerange=$start_time_obj->get_display_time();\n\t\t\tif ($next_event->get_duration()>0){\n\t\t\t\t$end_time_obj=$next_event->get_end_time_object();\n\t\t\t\t$display_timerange=$display_timerange.\" - \".$end_time_obj->get_display_time();\n\t\t\t}\n\n\t\t\t$return_val=$return_val.$display_timerange.\"&nbsp;-&nbsp;\";\n\t\t\tif (strlen(trim($next_event->get_location_name()))>0){\n\t\t\t\t$return_val=$return_val.htmlspecialchars($next_event->get_location_name()).\"&nbsp;\";\n\t\t\t}\n\n\t\t\t$return_val=$return_val.'<br />';\n\t\t\t$return_val=$return_val.'Event Topic:&nbsp;&nbsp;'.(htmlspecialchars($next_event->get_event_topic_name()));\n\n\t\t\t$return_val=$return_val.'<br />';\n\t\t\t$return_val=$return_val.'Event Type:&nbsp;&nbsp;'.(htmlspecialchars($next_event->get_event_type_name()));\n\n\t\t\t$return_val=$return_val.\"</td></tr>\";\n\t\t\t$i=$i+1;\n\t\t}\n\n\t\tif ($detail_flag==\"on\") {\n\n\t\t\tif ($number_of_events >0)\n\t\t\t\t$return_val=$return_val.\"<tr><td>---------------------------------------------------</td></tr>\";\n\t\t\t$i=0;\n\n\t\t\twhile($i<$number_of_events){\n\t\t\t\t$next_event=$events[$i];\n\n\t\t\t\t$return_val=$return_val.'<tr><td class=\"eventText\"><b>';\n\t\t\t\t$return_val=$return_val.'<a name=\"'.($i+1).'\"></a>';\n\t\t\t\t$return_val=$return_val.\"(\".($i+1).\")&nbsp;&nbsp;\";\n\t\t\t\t$return_val=$return_val.(htmlspecialchars($next_event->get_title()));\n\t\t\t\t$return_val=$return_val.\"</b></td></tr>\";\n\n\t\t\t\t$return_val=$return_val.'<tr><td class=\"eventText\">';\n\t\t\t\t$date=$next_event->get_start_date_object();\n\n\t\t\t\t$return_val=$return_val.date(\"D\", $date->timestamp).\"&nbsp;\";\n\t\t\t\t$return_val=$return_val.date(\"M\", $date->timestamp).\".&nbsp;\";\n\t\t\t\t$return_val=$return_val.$next_event->get_start_day().\",&nbsp;\";\n\n\t\t\t\t$start_time_obj=$next_event->get_start_time_object();\n\t\t\t\t$display_timerange=$start_time_obj->get_display_time();\n\t\t\t\tif ($next_event->get_duration()>0){\n\t\t\t\t\t$end_time_obj=$next_event->get_end_time_object();\n\t\t\t\t\t$display_timerange=$display_timerange.\" - \".$end_time_obj->get_display_time();\n\t\t\t\t}\n\n\t\t\t\t$return_val=$return_val.$display_timerange;\n\t\t\t\t$return_val=$return_val.'<br />';\n\n\t\t\t\tif (strlen(trim($next_event->get_location_name()))>0){\n\t\t\t\t$return_val=$return_val.htmlspecialchars($next_event->get_location_name()).\"&nbsp;\";\n\t\t\t\t}\n\n\t\t\t\t$return_val=$return_val.'<br />';\n\n\t\t\t\t$return_val=$return_val.(htmlspecialchars($next_event->get_location_details()));\n\t\t\t\t$return_val=$return_val.'</td></tr>';\n\n\t\t\t\t$return_val=$return_val.'<tr><td class=\"eventText\">';\n\t\t\t\t$return_val=$return_val.\"Contact:<br />\";\n\n\t\t\t\tif (strlen(trim($next_event->get_contact_name()))>0){\n\t\t\t\t\t$return_val=$return_val.htmlspecialchars($next_event->get_contact_name()).\"<br />\";\n\t\t\t\t}\n\t\t\t\tif (strlen(trim($next_event->get_contact_phone()))>0){\n\t\t\t\t\t$return_val=$return_val.htmlspecialchars($next_event->get_contact_phone()).\"<br />\";\n\t\t\t\t}\n\t\t\t\tif (strlen(trim($next_event->get_contact_email()))>0){\n\t\t\t\t\t$return_val=$return_val.htmlspecialchars($next_event->get_contact_email()).\"<br />\";\n\t\t\t\t}\n\n\t\t\t\t$return_val=$return_val.'</td><tr>';\n\n\t\t\t\t$return_val=$return_val.'<tr><td>&nbsp;</td></tr>';\n\n\t\t\t\t$return_val=$return_val.'<tr><td class=\"eventText\">';\n\t\t\t\t$return_val=$return_val.(nl2br($next_event->get_description()));\n\t\t\t\t$return_val=$return_val.'</td></tr>';\n\n\t\t\t\t$return_val=$return_val.\"<tr><td>&nbsp;</td></tr>\";\n\t\t\t\t$i=$i+1;\n\t\t\t}\n\t\t}\n\n\t\t$return_val=$return_val.'</table>';\n\n\t\tif (strlen($return_val)==0){\n\t\t\treturn \"&nbsp;\";\n\t\t}\n\t\treturn $return_val;\n\t}", "function DisplayCalendarOfEvents()\r\n\t{\r\n\t\tglobal $_SETTINGS;\r\n\t\techo \"<div id='calendar'></div>\";\t\r\n\t}", "function displayLatestEvents()\n\t{\n\t\t$viewname = $this->getTheme();\n\n\t\t$cfg = JEVConfig::getInstance();\n\n\t\t// override global start now setting so that timelimit plugin can use it!\n\t\t$compparams = ComponentHelper::getParams(JEV_COM_COMPONENT);\n\t\t$startnow = $compparams->get(\"startnow\", 0);\n\t\t$compparams->set(\"startnow\", $this->modparams->get(\"startnow\", 0));\n\t\t$this->getLatestEventsData();\n\t\t$compparams->set(\"startnow\", $startnow);\n\n\t\t$content = \"\";\n\n\t\t$k = 0;\n\t\tif (isset($this->eventsByRelDay) && count($this->eventsByRelDay))\n\t\t{\n\t\t\t$content .= $this->getModuleHeader('<table class=\"mod_events_latest_table jevbootstrap\" width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">');\n\n\t\t\t// Now to display these events, we just start at the smallest index of the $this->eventsByRelDay array\n\t\t\t// and work our way up.\n\n\t\t\t$firstTime = true;\n\n\t\t\t// initialize name of com_jevents module and task defined to view\n\t\t\t// event detail. Note that these could change in future com_event\n\t\t\t// component revisions!! Note that the '$this->itemId' can be left out in\n\t\t\t// the link parameters for event details below since the event.php\n\t\t\t// component handler will fetch its own id from the db menu table\n\t\t\t// anyways as far as I understand it.\n\n\t\t\t$this->processFormatString();\n\n\t\t\tforeach ($this->eventsByRelDay as $relDay => $daysEvents)\n\t\t\t{\n\n\t\t\t\treset($daysEvents);\n\n\t\t\t\t// get all of the events for this day\n\t\t\t\tforeach ($daysEvents as $dayEvent)\n\t\t\t\t{\n\n\t\t\t\t\tif ($this->processTemplate($content, $dayEvent))\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$eventcontent = \"\";\n\n\t\t\t\t\t// generate output according custom string\n\t\t\t\t\tforeach ($this->splitCustomFormat as $condtoken)\n\t\t\t\t\t{\n\n\t\t\t\t\t\tif (isset($condtoken['cond']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($condtoken['cond'] == 'a' && !$dayEvent->alldayevent())\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\telse if ($condtoken['cond'] == '!a' && $dayEvent->alldayevent())\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\telse if ($condtoken['cond'] == 'e' && !($dayEvent->noendtime() || $dayEvent->alldayevent()))\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\telse if ($condtoken['cond'] == '!e' && ($dayEvent->noendtime() || $dayEvent->alldayevent()))\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\telse if ($condtoken['cond'] == '!m' && $dayEvent->getUnixStartDate() != $dayEvent->getUnixEndDate())\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\telse if ($condtoken['cond'] == 'm' && $dayEvent->getUnixStartDate() == $dayEvent->getUnixEndDate())\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tforeach ($condtoken['data'] as $token)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tunset($match);\n\t\t\t\t\t\t\tunset($dateParm);\n\t\t\t\t\t\t\t$dateParm = \"\";\n\t\t\t\t\t\t\t$match = '';\n\t\t\t\t\t\t\tif (is_array($token))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$match = $token['keyword'];\n\t\t\t\t\t\t\t\t$dateParm = isset($token['dateParm']) ? trim($token['dateParm']) : \"\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (strpos($token, '${') !== false)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$match = $token;\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$eventcontent .= $token;\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$this->processMatch($eventcontent, $match, $dayEvent, $dateParm, $relDay);\n\t\t\t\t\t\t} // end of foreach\n\t\t\t\t\t} // end of foreach\n\n\t\t\t\t\tif ($firstTime)\n\t\t\t\t\t\t$eventrow = '<tr class=\"jevrow' . $k . '\"><td class=\"mod_events_latest_first\">%s' . \"</td></tr>\\n\";\n\t\t\t\t\telse\n\t\t\t\t\t\t$eventrow = '<tr class=\"jevrow' . $k . '\"><td class=\"mod_events_latest\">%s' . \"</td></tr>\\n\";\n\n\t\t\t\t\t$templaterow = $this->modparams->get(\"modlatest_templaterow\") ? $this->modparams->get(\"modlatest_templaterow\") : $eventrow;\n\t\t\t\t\t$content .= str_replace(\"%s\", $eventcontent, $templaterow);\n\n\t\t\t\t\t$firstTime = false;\n\t\t\t\t} // end of foreach\n\t\t\t\t$k++;\n\t\t\t\t$k %= 2;\n\t\t\t} // end of foreach\n\t\t\t$content .= $this->getModuleFooter(\"</table>\\n\");\n\t\t}\n\t\telse if ($this->modparams->get(\"modlatest_NoEvents\", 1))\n\t\t{\n\t\t\t$content .= $this->modparams->get(\"modlatest_templatetop\") || $this->modparams->get(\"modlatest_templatetop\") ? $this->modparams->get(\"modlatest_templatetop\") : '<table class=\"mod_events_latest_table jevbootstrap\" width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">';\n\t\t\t$templaterow = $this->modparams->get(\"modlatest_templaterow\") ? $this->modparams->get(\"modlatest_templaterow\") : '<tr><td class=\"mod_events_latest_noevents\">%s</td></tr>' . \"\\n\";\n\t\t\t$content .= str_replace(\"%s\", Text::_('JEV_NO_EVENTS'), $templaterow);\n\t\t\t$content .= $this->modparams->get(\"modlatest_templatebottom\") ? $this->modparams->get(\"modlatest_templatebottom\") : \"</table>\\n\";\n\t\t}\n\n\t\t$callink_HTML = '<div class=\"mod_events_latest_callink\">'\n\t\t\t. $this->getCalendarLink()\n\t\t\t. '</div>';\n\n\t\tif ($this->linkToCal == 1)\n\t\t\t$content = $callink_HTML . $content;\n\t\tif ($this->linkToCal == 2)\n\t\t\t$content .= $callink_HTML;\n\n\t\tif ($this->displayRSS)\n\t\t{\n\t\t\t$rssimg = Uri::root() . \"media/system/images/livemarks.png\";\n\t\t\t$callink_HTML = '<div class=\"mod_events_latest_rsslink\">'\n\t\t\t\t. '<a href=\"' . $this->rsslink . '\" title=\"' . Text::_(\"RSS_FEED\") . '\" target=\"_blank\">'\n\t\t\t\t. '<img src=\"' . $rssimg . '\" alt=\"' . Text::_(\"RSS_FEED\") . '\" />'\n\t\t\t\t. Text::_(\"SUBSCRIBE_TO_RSS_FEED\")\n\t\t\t\t. '</a>'\n\t\t\t\t. '</div>';\n\t\t\t$content .= $callink_HTML;\n\t\t}\n\n\t\tif ($this->modparams->get(\"contentplugins\", 0))\n\t\t{\n\t\t\t$eventdata = new stdClass();\n\t\t\t$eventdata->text = $content;\n\t\t\tFactory::getApplication()->triggerEvent('onContentPrepare', array('com_jevents', &$eventdata, &$this->modparams, 0));\n\t\t\t$content = $eventdata->text;\n\t\t}\n\n\t\treturn $content;\n\n\t}", "private function buildBodyDay()\n {\n\n $events = $this->events;\n $h = \"\";\n for ($i = $this->start_hour; $i < $this->end_hour; $i++) {\n for ($t = 0; $t < 2; $t++) {\n $h .= \"<tr>\";\n $min = $t == 0 ? \":00\" : \":30\";\n $h .= \"<td class='$this->timeClass'>\" . date('g:ia', strtotime($i . $min)) . \"</td>\";\n for ($k = 0; $k < 1; $k++) {\n $wd = $this->week_days[$k];\n $time_r = $this->year . '-' . $this->month . '-' . $wd . ' ' . $i . ':00:00';\n $min = $t == 0 ? '' : '+30 minute';\n $time_1 = strtotime($time_r . $min);\n $time_2 = strtotime(date('Y-m-d H:i:s', $time_1) . '+30 minute');\n $dt = date('Y-m-d H:i:s', $time_1);\n $h .= \"<td colspan='3' data-datetime='$dt'>\";\n $h .= $this->dateWrap[0];\n\n $hasEvent = false;\n foreach ($events as $key => $event) {\n //EVENT TIME AND DATE\n $time_e = strtotime($key);\n if ($time_e >= $time_1 && $time_e < $time_2) {\n $hasEvent = true;\n $h .= $this->buildEvents(false, $event);\n }\n }\n $h .= !$hasEvent ? '&nbsp;' : '';\n $h .= $this->dateWrap[1];\n $h .= \"</td>\";\n }\n $h .= \"</tr>\";\n }\n }\n $h .= \"</tbody>\";\n $h .= \"</table>\";\n\n $this->html .= $h;\n }", "function getEvents($date = '') {\n include 'config.php';\n $eventListHTML = '';\n $date = $date ? $date : date(\"Y-m-d\");\n //Get events based on the current date\n $result = $con->query(\"SELECT * FROM med_records WHERE entry_date = '\" . $date . \"' \");\n if ($result->num_rows > 0) {\n $eventListHTML = '<h2>Events on ' . date(\"l, d M Y\", strtotime($date)) . '</h2>';\n $eventListHTML .= '<td>';\n while ($row = $result->fetch_assoc()) {\n $eventListHTML .= '<td>' . $row['emp_name'] . '</td>';\n }\n $eventListHTML .= '</td>';\n }\n echo $eventListHTML;\n}", "public function eventsAction()\n {\n $events = $this->manager->getRepository('Event\\Doctrine\\Orm\\Event')->findBy(array(), array('date' => 'ASC'));\n\n return $this->renderView('events', array(\n 'title' => 'Zusammenfassung der Grillveranstaltungen',\n 'events' => $events,\n 'meals' => $this->createMealsList($events),\n ));\n }", "function getEvents($date = '') {\r\n //Include db configuration file\r\n include 'dbConfig.php';\r\n $eventListHTML = '';\r\n $date = $date ? $date : date(\"Y-m-d\");\r\n //Get events based on the current date\r\n $result = $db->query(\"SELECT title FROM floralbookings WHERE date = '\" . $date . \"' AND status = 1\");\r\n if ($result->num_rows > 0) {\r\n $eventListHTML = '<h2>Events on ' . date(\"l, d M Y\", strtotime($date)) . '</h2>';\r\n $eventListHTML .= '<ul>';\r\n while ($row = $result->fetch_assoc()) {\r\n $eventListHTML .= '<li>' . $row['title'] . '</li>';\r\n }\r\n $eventListHTML .= '</ul>';\r\n }\r\n echo $eventListHTML;\r\n}", "function display_list(){\n\t\t\t$this->load->model('admin_career_event_model');\n\t\t\t$this->gen_contents['modal_path'] \t= '/career_event/class_details';\n\t\t\t$this->gen_contents['current_date']\t= $_POST['datecurrent'];\n \n $chp_list = $this->config->item('chapter_list');\n\t\t\t$this->gen_contents['arr_list'] \t= $this->admin_career_event_model->dbGetEventListWithSearchUser($_POST,$chp_list);\n\t\t\t$this->load->view('user/career_event/display_list_event',$this->gen_contents);\n\t\t}", "public function dayList()\n\t{\n\t\techo json_encode($this->sched_day->fetchData());\n\t}", "function showEvents() {\r\n\r\n\t// Lets import some globals, shall we?\r\n\tglobal $MySelf;\r\n\tglobal $DB;\r\n\tglobal $TIMEMARK;\r\n\t$delta = $TIMEMARK -259200;\r\n\t\r\n\t// is the events module active?\r\n\tif (!getConfig(\"events\")) {\r\n\t\tmakeNotice(\"The admin has deactivated the events module.\", \"warning\", \"Module not active\");\r\n\t}\r\n\r\n\t// Load all events.\r\n\t$EVENTS_DS = $DB->query(\"SELECT * FROM events WHERE starttime >= '\" . $delta . \"' ORDER BY starttime ASC\");\r\n\r\n\t// .. right?\r\n\tif ($EVENTS_DS->numRows() >= 1) {\r\n\r\n\t\t// Lets keep in mind: We have events.\r\n\t\t$haveEvents = true;\r\n\r\n\t\twhile ($event = $EVENTS_DS->fetchRow()) {\r\n\r\n\t\t\t// get the date.\r\n\t\t\t$date = date(\"d.m.y\", $event[starttime]);\r\n\r\n\t\t\t// open up a new table for each day.\r\n\t\t\tif ($date != $previousdate) {\r\n\r\n\t\t\t\t$workday = date(\"l\", $event[starttime]);\r\n\r\n\t\t\t\tif ($beenhere) {\r\n\t\t\t\t\t$html .= $temp->flush();\r\n\t\t\t\t\t$html .= \"<br>\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$beenhere = true;\r\n\r\n\t\t\t\t// We need an additional row if we are allowed to delete events.\r\n\t\t\t\tif ($MySelf->canDeleteEvents()) {\r\n\t\t\t\t\t$temp = new table(8, true);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$temp = new table(7, true);\r\n\t\t\t\t}\r\n\t\t\t\t$temp->addHeader(\">> Events for \" . $workday . \", the \" . $date);\r\n\t\t\t\t$previousdate = $date;\r\n\r\n\t\t\t\t$temp->addRow(\"#060622\");\r\n\t\t\t\t$temp->addCol(\"ID\");\r\n\t\t\t\t$temp->addCol(\"Starttime\");\r\n\t\t\t\t$temp->addCol(\"Starts in / Runs for\");\r\n\t\t\t\t$temp->addCol(\"Mission Type\");\r\n\t\t\t\t$temp->addCol(\"Short Description\");\r\n\t\t\t\t$temp->addCol(\"System\");\r\n\t\t\t\t$temp->addCol(\"Security\");\r\n\t\t\t\tif ($MySelf->canDeleteEvents()) {\r\n\t\t\t\t\t$temp->addCol(\"Delete\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Add Event to the current database.\r\n\t\t\t$temp->addRow();\r\n\t\t\t$temp->addCol(\"<a href=\\\"index.php?action=showevent&id=\" . $event[id] . \"\\\">\" . str_pad($event[id], 4, \"0\", STR_PAD_LEFT) . \"</a>\");\r\n\t\t\t$temp->addCol(date(\"d.m.y H:i\", $event[starttime]));\r\n\r\n\t\t\t$delta = $TIMEMARK - $event[starttime];\r\n\t\t\tif ($TIMEMARK > $event[starttime]) {\r\n\t\t\t\t// Event underway.\r\n\t\t\t\t$temp->addCol(\"<font color=\\\"#00ff00\\\">\" . numberToString($delta) . \"</font>\");\r\n\t\t\t} else {\r\n\t\t\t\t// Event not started yet.\r\n\t\t\t\t$delta = $delta * -1;\r\n\t\t\t\t$temp->addCol(\"<font color=\\\"#ffff00\\\">\" . numberToString($delta) . \"</font>\");\r\n\t\t\t}\r\n\r\n\t\t\t$temp->addCol($event[type]);\r\n\t\t\t$temp->addCol($event[sdesc]);\r\n\t\t\t$temp->addCol($event[system]);\r\n\t\t\t$temp->addCol($event[security]);\r\n\t\t\t\r\n\t\t\tif ($MySelf->canDeleteEvents()) {\r\n\t\t\t\t$temp->addCol(\"<a href=\\\"index.php?action=deleteevent&id=$event[id]\\\">delete event</a>\");\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Lets recall, did we have events scheduled?\r\n\tif ($haveEvents) {\r\n\t\t// We do!\t\t\t\r\n\t\t$html = \"<h2>Scheduled Events</h2>\" . $html . $temp->flush();\r\n\t} else {\r\n\t\t// We dont!\t\t\t\r\n\t\t$html = \"<h2>Scheduled Events</h2><b>There are currently no scheduled events in the database.</b>\";\r\n\t}\r\n\t// Return what we got.\r\n\treturn ($html);\r\n\r\n}", "function showEventList($groupId, $title) {\n\t\n\t//read config file for this portlet\n\t$config = new ConfigReader();\n\t$config->loadConfigFile('assets/core/config/widgets/showGroup/event_list.properties');\n\t\n\t$maxDisplay = $config->readValue('maxDisplay');\n\t$showSummary = $config->readValue('displaySummary');\n\t$w = $config->readValue('maxImageSizeX');\n\t$h = $config->readValue('maxImageSizeY');\n\t\n\t//create user groups validation object\n\t$userGroup = new CategoryUserGroupValidator();\n\t$excludeCategories = $userGroup->viewCategoryExclusionList('events');\n\t\n\t$return .= \"\t\t\t\t<div id=\\\"event_list\\\">\\n\";\n\t$return .= \"\t\t\t\t\t<div class=\\\"header\\\">$title</div>\\n\";\n\t$return .= \"\t\t\t\t\t<div class=\\\"body\\\">\\n\";\n\t$return .= \"\t\t\t\t\t\t<div id=\\\"upcoming_events_container\\\">\\n\";\n\t\n\t$todaysDate = getdate();\n\t\n\t$month = $todaysDate['mon'];\n\t$day = $todaysDate['mday'];\n\t$year = $todaysDate['year'];\n\t\n\t$getDate = $todaysDate['year'] . \"-\" . $todaysDate['mon'] . \"-\" . $todaysDate['mday'] . \" 00:00:00\";\n\t\n\t$s = 0;\n\t\n\t$result = mysql_query(\"SELECT events.id FROM events LEFT JOIN groupsMembers ON events.groupId = groupsMembers.parentId WHERE events.groupId = '{$groupId}' AND events.startDate >= '{$getDate}' AND events.publishState = 'Published'$excludeCategories AND ((events.private = '1' AND groupsMembers.parentId = events.groupId AND groupsMembers.username = '{$_SESSION['username']}' AND groupsMembers.status = 'approved') OR (events.private = '0')) GROUP BY events.id\");\n\t$totalRows = mysql_num_rows($result);\n\t\n\t//if there's nothing to display, just exit (remove this test to display \"no events currently scheduled\" message)\n\tif ($totalRows == 0) {\n\t\t\n\t\treturn;\n\t\t\n\t}\n\t\n\t$showTotalPages = ceil($totalRows / $maxDisplay);\n\n\tif ($totalRows > 0) {\n\n\t\t$showCurrentPage = floor($s / $maxDisplay) + 1;\n\n\t} else {\n\n\t\t$showCurrentPage = 0;\n\n\t}\n\t\n\t$result = mysql_query(\"SELECT events.id, events.title, events.summary, events.summaryImage, DATE_FORMAT(startDate, '%M %d, %Y %h:%i %p') AS newStartDate, DATE_FORMAT(expireDate, '%M %d, %Y %h:%i %p') AS newExpireDate FROM events LEFT JOIN groupsMembers ON events.groupId = groupsMembers.parentId WHERE events.groupId = '{$groupId}' AND events.startDate >= '{$getDate}' AND events.publishState = 'Published'$excludeCategories AND ((events.private = '1' AND groupsMembers.parentId = events.groupId AND groupsMembers.username = '{$_SESSION['username']}' AND groupsMembers.status = 'approved') OR (events.private = '0')) GROUP BY events.id ORDER BY startDate ASC, title ASC LIMIT $maxDisplay\");\n\t$count = mysql_num_rows($result);\n\t\n\tif ($count > 0) {\n\t\t\n\t\twhile ($row = mysql_fetch_object($result)) {\n\t\t\t\n\t\t\t$x++;\n\t\t\t\n\t\t\tif ($x < $count) {\n\t\t\t\t\n\t\t\t\t$style = \" event_item_row_separator\";\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t$style = \"\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$title = htmlentities($row->title);\n\t\t\t\n\t\t\tif (trim($row->summaryImage) != \"\") {\n\t\t\t\t\n\t\t\t\t$image = \"\t\t\t\t\t\t\t<div class=\\\"summary_image\\\">\\n<a href=\\\"/events/id/$row->id\\\"><img src=\\\"/file.php?load=$row->summaryImage&w=$w&h=$h\\\"></a></div>\\n\";\n\t\t\t\t$imageOffsetClass = \" image_offset\";\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t$image = \"\";\n\t\t\t\t$imageOffsetClass = \"\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$return .= \"\t\t\t\t\t\t<div class=\\\"event_item$style\\\">\\n\";\n\t\t\t$return .= \"$image\";\n\t\t\t$return .= \"\t\t\t\t\t\t\t<div class=\\\"details_container$imageOffsetClass\\\">\\n\";\n\t\t\t$return .= \"\t\t\t\t\t\t\t\t<div class=\\\"title\\\"><a href=\\\"/events/id/$row->id\\\">$title</a></div>\\n\";\n\t\t\t$return .= \"\t\t\t\t\t\t\t\t<table border=\\\"0\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\">\\n\";\n\t\t\t$return .= \"\t\t\t\t\t\t\t\t\t<tr><td class=\\\"start_date\\\">$row->newStartDate</td></tr><tr><td class=\\\"end_date\\\">$row->newExpireDate</td></tr>\\n\";\n\t\t\t$return .= \"\t\t\t\t\t\t\t\t</table>\\n\";\n\t\t\t\n\t\t\tif ($showSummary == \"true\") {\n\t\t\t\t\n\t\t\t\t$summary = preg_replace(\"/\\\\n/\", \"<br>\", htmlentities($row->summary));\n\t\t\t\t\t\n\t\t\t\t$return .= \"\t\t\t\t\t\t\t<div class=\\\"summary\\\">\\n\";\n\t\t\t\t$return .= \"\t\t\t\t\t\t\t\t$summary\\n\";\n\t\t\t\t$return .= \"\t\t\t\t\t\t\t</div>\\n\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$return .= \"\t\t\t\t\t\t\t</div>\\n\";\n\t\t\t$return .= \"\t\t\t\t\t\t</div>\\n\";\n\t\t\t\n\t\t}\n\t\t\n\t\t$return .= \"<div id=\\\"event_list_navigation\\\">\";\n\t\t$return .= \"\t<div class=\\\"totals\\\">$totalRows Events</div><div class=\\\"navigation\\\"><div class=\\\"pages\\\">Page: $showCurrentPage of $showTotalPages</div><div class=\\\"previous\\\"><a href=\\\"javascript:regenerateEventList('$s', 'b');\\\">Previous</a></div><div class=\\\"next\\\"><a href=\\\"javascript:regenerateEventList('$s', 'n');\\\">Next</a></div></div>\";\n\t\t$return .= \"</div>\";\n\t\t\n\t} else {\n\t\t\n\t\t$return .= \"\t\t\t\t\t\t\t<div class=\\\"event_item\\\">No events are currently scheduled.</div>\\n\";\n\t\t\n\t}\n\t\n\t$return .= \"\t\t\t\t\t\t</div>\\n\";\n\t$return .= \"\t\t\t\t\t</div>\\n\";\n\t$return .= \"\t\t\t\t</div>\\n\";\n\t\n\treturn($return);\n\t\n}", "function listEventInfo() {\n\t\t$query = \"SELECT e_description, c_name, tag_name, start_datetime, end_datetime, capacity, v.name AS vname, address,o.name AS oname, v.address, v.city, v.state, v.postal_code \n\t\tFROM yam14.F_event e, yam14.F_venue v, yam14.F_category c, yam14.F_topic t, yam14.F_organizer o\n\t\tWHERE e.venue_id = v.v_id \n\t\tAND c.c_id = e.c_id \n\t\tAND t.tag_id = e.tag_id \n\t\tAND o.o_id = e.organizer_id\n\t\tAND e.e_id = $this->eid ;\";\n\t\t\n\t\t$result = mysql_query($query);\n\t\tif (!$result) {\n\t\t\t$message='Invalid Query' .mysql_errno().\" \\n\";\n\t\t $message .= 'Whole Query' . $query;\n\t\t die($message);\n\t\t}//end if\n\t\t\n\t\twhile($row = mysql_fetch_assoc($result)){\n\t\t\t$this->category = $row['c_name'];\n\t\t\t$this->tag = $row['tag_name'];\n\t\t\t$this->description = $row['e_description'];\n\t\t\t$this->startdate = date('l, M d, Y',strtotime($row['start_datetime']));\n\t\t\t$this->starttime = date('H:i A',strtotime($row['start_datetime']));\n\t\t\t$this->enddate = date('l, M d, Y',strtotime($row['end_datetime']));\n\t\t\t$this->endtime =date('H:i A',strtotime($row['end_datetime']));\n\t\t\t$this->capacity = $row['capacity'];\n\t\t\t$this->venue = $row['vname'];\n\t\t\t$this->address = $row['address'] . \", \" . $row['city'] . \", \" . $row['state'] . \" \" . $row['postal_code'];\n\t\t\t$this->organizer = $row['oname'];\n\t\t\techo \"<hr />\";\n\t\t\techo \"<div class=\\\"panel panel-default\\\">\";\n\t\t\techo \t\"<div class=\\\"panel-heading\\\">\";\n\t\t\techo \t\"<h3 class=\\\"panel-title\\\">Event Information</h3>\";\n\t\t\techo \t\"</div>\";\n\t\t\techo \t\"<div class=\\\"panel-body\\\">\";\n\t\t\techo \"<p><b>Description: </b>$this->description</p>\";\n\t\t\techo \t\"<p><b>Category: </b>$this->category</p>\";\n\t\t\techo \t\"<p><b>Topic: </b>$this->tag</p>\";\n\t\t\techo \t\"<p><b>Start Date: </b>$this->startdate</p>\";\n\t\t\techo \t\"<p><b>Start Time: </b>$this->starttime</p>\";\n\t\t\techo \t\"<p><b>End Date: </b>$this->enddate</p>\";\n\t\t\techo \t\"<p><b>End Time: </b>$this->endtime</p>\";\n\t\t\techo \t\"<p><b>Capacity: </b>$this->capacity</p>\";\n\t\t\techo \t\"<p><b>Organizer: </b>$this->organizer</p>\";\n\t\t\techo \t\"<p><b>Location: </b>$this->venue</p>\";\n\t\t\techo \t\"<p><b>Address: </b>$this->address</p>\";\n\t\t\t\n\t\t\techo \t\"</div>\";\n\t\t\techo \t\"</div>\";\n\t\t\t\t\n\t\t\t\n\t\t\t\t\t\t\n\t\t}\t\n\t\t\n\t\tmysql_free_result($result);\n\t}", "private function makeDayHeadings()\n\t{\n\t\t$this->outArray['dayheadings'] = array();\n\t\t$this->dayHeadings .= \"\\t<tr>\\n\";\n\t\tforeach($this->daysArray as $day) {\n\t\t\t$this->dayHeadings .= \"\\t\\t<th class=\\\"dayHeading\\\">$day</th>\\n\";\n\t\t\tarray_push($this->outArray['dayheadings'], $day);\n\t\t}\n\t\t$this->dayHeadings .= \"\\t</tr>\\n\";\n\t\t\n\t\t$this->calWeekDays .= $this->dayHeadings;\n\t}", "function getEvents($date = ''){\r\n\t//Include db configuration file\r\n\tinclude 'dbConfig.php';\r\n\t$eventListHTML = '';\r\n\t$date = $date?$date:date(\"Y-m-d\");\r\n\t//Get events based on the current date\r\n\t$result = $db->query(\"SELECT title FROM cakemaker WHERE date = '\".$date.\"' AND status = 1\");\r\n\tif($result->num_rows > 0){\r\n\t\t$eventListHTML = '<h2>Events on '.date(\"l, d M Y\",strtotime($date)).'</h2>';\r\n\t\t$eventListHTML .= '<ul>';\r\n\t\twhile($row = $result->fetch_assoc()){ \r\n $eventListHTML .= '<li>'.$row['title'].'</li>';\r\n }\r\n\t\t$eventListHTML .= '</ul>';\r\n\t}\r\n\techo $eventListHTML;\r\n}", "function render($events){\n\t\t// in the weekly event view\n\t\t$number_of_events=sizeof($events);\n\t\t$i=0;\n\t\t$return_val=\"\";\n\t\twhile($i<$number_of_events){\n\t\t\t$next_event=$events[$i];\n\t\t\t$return_val=$return_val.\"<a href=\\\"event_display_detail.php?event_id=\";\n\t\t\t$return_val=$return_val.($next_event->get_id());\n\t\t\t$return_val=$return_val.\"&amp;day=\".$next_event->get_start_day();\n\t\t\t$return_val.=\"&amp;month=\".$next_event->get_start_month();\n\t\t\t$return_val.=\"&amp;year=\".$next_event->get_start_year();\n\t\t\t$return_val.=\"\\\" class=\\\"eventTitle\\\">\";\n\t\t\t$return_val=$return_val.(htmlspecialchars($next_event->get_title()));\n\t\t\t$return_val=$return_val.\"</a><br />\";\n\n\t\t\t$start_time_obj=$next_event->get_start_time_object();\n\t\t\t$display_timerange=$start_time_obj->get_display_time();\n\t\t\tif ($next_event->get_duration()>0){\n\t\t\t\t$end_time_obj=$next_event->get_end_time_object();\n\t\t\t\t$display_timerange=$display_timerange.\" - \".$end_time_obj->get_display_time();\n\n\t\t\t}\n\n\t\t\t$return_val=$return_val.$display_timerange.\"<br />\";\n\t\t\tif (strlen(trim($next_event->get_event_type_name()))>0){\n\t\t\t\t$return_val=$return_val.htmlspecialchars($next_event->get_event_type_name()).\"<br />\";\n\t\t\t}\n\t\t\tif (strlen(trim($next_event->get_location_name()))>0){\n\t\t\t\t$return_val=$return_val.htmlspecialchars($next_event->get_location_name()).\"<br />\";\n\t\t\t}\n\t\t\t$return_val=$return_val.\"<br />\";\n\t\t\t$i=$i+1;\n\t\t}\n\t\tif (strlen($return_val)==0){\n\t\t\treturn \"&nbsp;\";\n\t\t}\n\t\treturn $return_val;\n\t}", "function obj_cx_events_list_inner( $events, $bottom_banner, $pagination, $event_list_deets = null ) {\n echo '<h3 class=\"section-title green\">Upcoming events</h3>';\n obj_do_cx_events_list_filter( $events );\n obj_do_cx_events_list( $events );\n obj_do_cx_event_bottom_banner_output( $bottom_banner );\n obj_do_cx_events_list_pagination( $pagination );\n}", "public function getDateEntries()\n\t{\n\t\t//Get Date\n\t\t$dateSubmit = \\Input::get('eventDate_submit');\n\t\t//Get Week\n\t\t$week = $this->timesheet->getWeek($dateSubmit);\n\t\t//Get the user id of the currently logged in user\n\t\t$userId = \\Sentry::getUser()->id;\n\t\t//Get Tasks List\n\t\t$tasks = $this->timesheet->getIndex($userId);\n\t\t//Get Entries\n\t\t$entries = $this->timesheet->getEntries($dateSubmit,$userId);\n\t\treturn \\View::make('dashboard.timesheet.view')\n\t\t\t\t\t->with('week',$week)\n\t\t\t\t\t->with('tasks',$tasks)\n\t\t\t\t\t->with('selectedDate',$dateSubmit)\n\t\t\t\t\t->with('entries', $entries);\n\t}", "function ShowEvents()\n {\n $this->ReadEvents();\n echo\n $this->H(1,$this->MyLanguage_GetMessage(\"Events_Table_Title\")).\n $this->EventsHtmlTable(),\n \"\";\n }", "public function index() {\n $this->seo(array(\n \"title\" => \"All Events List\",\n \"keywords\" => \"events, new events, event management, create event, event tickets, book event tickets\",\n \"description\" => \"Display all the latest events. Filter the events by categories, location and much more. Register yourself to turn your passion into your business\",\n \"view\" => $this->getLayoutView()\n ));\n $view = $this->getActionView();\n\n $title = RequestMethods::get(\"title\", \"\");\n $category = RequestMethods::get(\"category\", \"\");\n $type = RequestMethods::get(\"type\", \"\");\n $limit = RequestMethods::get(\"limit\", 10);\n $page = RequestMethods::get(\"page\", 1);\n $where = array(\n \"title LIKE ?\" => \"%{$title}%\",\n \"category LIKE ?\" => \"%{$category}%\",\n \"type LIKE ?\" => \"%{$type}%\",\n \"live = ?\" => true\n );\n $events = Event::all($where, array(\"*\"), \"created\", \"desc\", $limit, $page);\n $count = Event::count($where);\n\n $view->set(\"events\", $events);\n $view->set(\"limit\", $limit);\n $view->set(\"page\", $page);\n $view->set(\"count\", $count);\n $view->set(\"title\", $title);\n $view->set(\"type\", $type);\n $view->set(\"category\", $category);\n }", "public function actionIndex()\r\n {\r\n $events = Events::find()->all();\r\n\t\t$tasks = [];\r\n\t\tforeach ($events as $eve) {\r\n\t\t $event = new \\yii2fullcalendar\\models\\Event();\r\n\t\t $event->id = $eve->id;\r\n\t\t $event->title = $eve->title;\r\n\t\t $event->start = $eve->date_created;\r\n\t\t $tasks[] = $event;\t\t\r\n\t\t}\r\n\t\t\r\n return $this->render('index', [\r\n 'events' => $tasks,\r\n ]);\r\n }", "public function dayview()\n\t{\n\t\t$input = JFactory::getApplication()->input;\n\t\t$db = JFactory::getDbo();\n\t\t$view = $this->getView('pbbooking','html');\n\n\t\t$dateparam = $input->get('dateparam',date_create(\"now\",new DateTimeZone(PBBOOKING_TIMEZONE))->format(DATE_ATOM),'string');\n\t\t$view->dateparam = date_create($dateparam,new DateTimezone(PBBOOKING_TIMEZONE));\n\t\t$cals = $db->setQuery('select * from #__pbbooking_cals')->loadObjectList();\n\t\t$config = $db->setQuery('select * from #__pbbooking_config')->loadObject();\n\t\t$opening_hours = json_decode($config->trading_hours,true);\n\t\t$start_time_arr = str_split($opening_hours[(int)$view->dateparam->format('w')]['open_time'],2);\n\t\t$end_time_arr = str_split($opening_hours[(int)$view->dateparam->format('w')]['close_time'],2);\n\n\t\t$view->cals = array();\n\t\t$view->opening_hours = $opening_hours[(int)$view->dateparam->format('w')];\n\t\t$view->day_dt_start = date_create($dateparam,new DateTimezone(PBBOOKING_TIMEZONE));\n\t\t$view->day_dt_end = date_create($dateparam,new DateTimezone(PBBOOKING_TIMEZONE));\n\t\t$view->day_dt_start->setTime($start_time_arr[0],$start_time_arr[1],0);\n\t\t$view->day_dt_end->setTime($end_time_arr[0],$end_time_arr[1],0);\n\t\t$view->config = $config;\n\n\t\t//step back one time slot on $view->day_dt_end\n\t\t$view->dt_last_slot = clone $view->day_dt_end;\n\t\t$view->dt_last_slot->modify('- '.$config->time_increment.' minutes');\n\n\t\tforeach ($cals as $i=>$cal) {\n\t\t\t$view->cals[$i] = new Calendar();\n\t\t\t$view->cals[$i]->loadCalendarFromDbase(array($cal->id)); \n\t\t}\n\n\t\t$view->setLayout('dayview');\n\t\t$view->display();\n\t\t\n\t}", "function icalendar_render_events( $url = '', $args = array() ) {\n\t$ical = new iCalendarReader();\n\treturn $ical->render( $url, $args );\n}", "public function index()\n {\n $events = [];\n $data = Event::all();\n if($data->count()) {\n foreach ($data as $key => $value) {\n $events[] = Calendar::event(\n $value->title,\n true,\n new \\DateTime($value->start_date),\n new \\DateTime($value->end_date.' +1 day'),\n null,\n // Add color and link on event\n [\n 'color' => '#0fc',\n 'url' => 'pass here url and any route',\n ]\n );\n }\n }\n $calendar = Calendar::addEvents($events);\n return view('calender.calender', compact('calendar')); \n }", "public function getEvents()\n {\n $main_actions = [\n 'event' => \\adminer\\lang('Create event'),\n ];\n\n $headers = [\n \\adminer\\lang('Name'),\n \\adminer\\lang('Schedule'),\n \\adminer\\lang('Start'),\n // \\adminer\\lang('End'),\n ];\n\n // From db.inc.php\n $events = \\adminer\\support(\"event\") ? \\adminer\\get_rows(\"SHOW EVENTS\") : [];\n $details = [];\n foreach($events as $event)\n {\n $detail = [\n 'name' => \\adminer\\h($event[\"Name\"]),\n ];\n if(($event[\"Execute at\"]))\n {\n $detail['schedule'] = \\adminer\\lang('At given time');\n $detail['start'] = $event[\"Execute at\"];\n // $detail['end'] = '';\n }\n else\n {\n $detail['schedule'] = \\adminer\\lang('Every') . \" \" .\n $event[\"Interval value\"] . \" \" . $event[\"Interval field\"];\n $detail['start'] = $event[\"Starts\"];\n // $detail['end'] = '';\n }\n $details[] = $detail;\n }\n\n return \\compact('main_actions', 'headers', 'details');\n }", "private function makeDayEventListArray()\n\t{\n\t\t$outevents = array();\n\t\t$n = 0;\n\t\tforeach($this->eventItems as $item) {\n\t\t\tif($item['date'] == $this->curYear.'-'.$this->curMonth.'-'.$this->dayOfMonth) {\t\t\n\t\t\t\t$outevents[$n]['category'] = $item['cat'];\n\t\t\t\t\n\t\t\t\tif($item['stdurl']) {\n\t\t\t\t\t$outevents[$n]['url'] = $item['url'].'?id='.$item['id'];\n\t\t\t\t} else {\n\t\t\t\t\t$outevents[$n]['url'] = $item['url'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$outevents[$n]['summary'] = $item['text'];\n\t\t\t\t$outevents[$n]['description'] = $item['desc'];\n\t\t\t\t$outevents[$n]['categorycolor'] = (strlen($item['catcolor']) > 0 ? str_replace('#','',$item['catcolor']) : '#eeeeee');\n\t\t\t}\n\t\t\t$n++;\n\t\t}\n\t\t\n\t\tif(count($outevents)) {\n\t\t\treturn $outevents;\n\t\t}\n\t\treturn false;\n\t}", "public static function week_calendar_item($event, $class) {\r\n global $urlServer,$is_admin, $langDuration, $langAgendaNoTitle, $langModify, $langDelete, $langHour, $langConfirmDelete, $langReferencedObject;\r\n\r\n $formatted_calendar_item = \"\";\r\n $formatted_calendar_item .= \"<tr $class>\";\r\n $formatted_calendar_item .= \"<td valign='top'><div class=\\\"legend_color\\\" style=\\\"float:left;margin:3px;height:16px;width:16px;background-color:\".Calendar_Events::$calsettings->{$event->event_group.\"_color\"}.\"\\\"></div></td>\";\r\n $formatted_calendar_item .= \"<td valign='top'>\";\r\n $eventdate = strtotime($event->start);\r\n $formatted_calendar_item .= $langHour.\": \" . ucfirst(date('H:i', $eventdate));\r\n if ($event->duration != '') {\r\n $msg = \"($langDuration: \" . q($event->duration) . \")\";\r\n } else {\r\n $msg = '';\r\n }\r\n $formatted_calendar_item .= \"<br><b><div class='event'>\";\r\n $link = str_replace('thisid', $event->id, $urlServer.Calendar_Events::$event_type_url[$event->event_type]);\r\n if ($event->event_type != 'personal' && $event->event_type != 'admin') {\r\n $link = str_replace('thiscourse', $event->course, $link);\r\n }\r\n if ($event->title == '') {\r\n $formatted_calendar_item .= $langAgendaNoTitle;\r\n } else {\r\n if (!$is_admin && $event->event_type == 'admin') {\r\n $formatted_calendar_item .= q($event->title);\r\n } else {\r\n $formatted_calendar_item .= \"<a href=\\\"\".$link.\"\\\">\".q($event->title).\"</a>\";\r\n }\r\n }\r\n if ($event->event_type == \"personal\") {\r\n $fullevent = Calendar_Events::get_event($event->id);\r\n if ($reflink = References::item_link($fullevent->reference_obj_module, $fullevent->reference_obj_type, $fullevent->reference_obj_id, $fullevent->reference_obj_course)) {\r\n $formatted_calendar_item .= \"</b> $msg \".standard_text_escape($event->content)\r\n . \"$langReferencedObject: \"\r\n .$reflink\r\n . \"</div></td>\";\r\n }\r\n }\r\n else{\r\n $formatted_calendar_item .= \"</b> $msg \".standard_text_escape($event->content). \"</div></td>\";\r\n }\r\n $formatted_calendar_item .= \"<td class='right' width='70'>\";\r\n if ($event->event_type == \"personal\" || ($event->event_type == \"admin\" && $is_admin)) {\r\n $formatted_calendar_item .= icon('fa-edit', $langModify, str_replace('thisid',$event->id, $urlServer.Calendar_Events::$event_type_url[$event->event_type])). \"&nbsp;\r\n \".icon('fa-times', $langDelete, \"?delete=$event->id&et=$event->event_type\", \"onClick=\\\"return confirmation('$langConfirmDelete');\\\"\"). \"&nbsp;\";\r\n }\r\n $formatted_calendar_item .= \"</td>\";\r\n $formatted_calendar_item .= \"</tr>\";\r\n\r\n return $formatted_calendar_item;\r\n }", "function mkDay($var){\n$eventContent=$this->mkEventContent($var);\n$linkstr=$this->mkUrl($this->actyear,$this->actmonth,$var);\n\tif ($this->javaScriptDay) $linkstr=\"<a href=\\\"javascript:\".$this->javaScriptDay.\"(\".$this->actyear.\",\".$this->actmonth.\",\".$var.\")\\\">\".$var.\"</a>\";\n\tif ($this->isEvent($var)){\n\t\tif ($this->eventUrl){\n\t\t\t$out=\"<td class=\\\"\".$this->eventID.\"\\\"><a href=\\\"\".$this->eventUrl.\"\\\">\".$var.\"</a>\".$eventContent.\"</td>\";\n\t\t\t$this->eventUrl=false;\n\t\t}\n\t\telseif (!$this->dayLinks) $out=\"<td class=\\\"\".$this->eventID.\"\\\">\".$var.$eventContent.\"</td>\";\n\t\telse $out=\"<td class=\\\"\".$this->eventID.\"\\\">\".$linkstr.$eventContent.\"</td>\";\n\t}\n\telseif ($var==$this->selectedday && $this->actmonth==$this->selectedmonth && $this->actyear==$this->selectedyear){\n\t\tif (!$this->dayLinks) $out=\"<td class=\\\"\".$this->cssSelecDay.\"\\\">\".$var.$eventContent.\"</td>\";\n\t\telse $out=\"<td class=\\\"\".$this->cssSelecDay.\"\\\">\".$linkstr.$eventContent.\"</td>\";\n\t}\n\telseif ($var==$this->daytoday && $this->actmonth==$this->monthtoday && $this->actyear==$this->yeartoday){\n\t\tif (!$this->dayLinks) $out=\"<td class=\\\"\".$this->cssToday.\"\\\">\".$var.$eventContent.\"</td>\";\n\t\telse $out=\"<td class=\\\"\".$this->cssToday.\"\\\">\".$linkstr.$eventContent.\"</td>\";\n\t}\n\telseif ($this->getWeekday($var)==0 && $this->crSunClass){\n\t\tif (!$this->dayLinks) $out=\"<td class=\\\"\".$this->cssSunday.\"\\\">\".$var.$eventContent.\"</td>\";\n\t\telse $out=\"<td class=\\\"\".$this->cssSunday.\"\\\">\".$linkstr.$eventContent.\"</td>\";\n\t}\n\telseif ($this->getWeekday($var)==6 && $this->crSatClass){\n\t\tif (!$this->dayLinks) $out=\"<td class=\\\"\".$this->cssSaturday.\"\\\">\".$var.$eventContent.\"</td>\";\n\t\telse $out=\"<td class=\\\"\".$this->cssSaturday.\"\\\">\".$linkstr.$eventContent.\"</td>\";\n\t}\n\telse{\n\t\tif (!$this->dayLinks) $out=\"<td class=\\\"\".$this->cssMonthDay.\"\\\">\".$var.$eventContent.\"</td>\";\n\t\telse $out=\"<td class=\\\"\".$this->cssMonthDay.\"\\\">\".$linkstr.$eventContent.\"</td>\";\n\t}\nreturn $out;\n}", "function event_grid_view() {\n\tsp_calendar_grid();\n}", "function showGrid($date) {\n\tglobal $title, $niceday, $start_time, $end_time, $venue, $city, $state, $cat, $color, $background, $ed, $usr, $o, $c, $m, $a, $y, $w, $lang;\n\tif ($start_time[$date]) {\n\t\tksort($start_time[$date]);\n\t\twhile (list($t) = each($start_time[$date])) {\n\t\t\twhile (list($id,$value) = each($start_time[$date][$t])) {\n\t\t\t\techo \"<div class=\\\"button\\\" style=\\\"\";\n\t\t\t\tif ($color[$id]) echo \" color: \".$color[$id].\"; background: \".$background[$id].\";\";\n\t\t\t\techo \"\\\">\";\n\t\t\t\techo \"<a href=\\\"show_event.php?id=\".$id.\"&o=\".$o.\"&c=\".$c.\"&m=\".$m.\"&a=\".$a.\"&y=\".$y.\"&w=\".$w.\"\\\" onClick=\\\"openPic('show_event.php?id=\".$id.\"&size=small','pop','600','400'); window.newWindow.focus(); return false\\\">\";\n\t\t\t\techo \"<div style=\\\"background: \".$color[$id].\";\\\" title=\\\"\";\n\t\t\t\techo $value;\n\t\t\t\tif ($end_time[$date][$t][$id]) echo \" - \".$end_time[$date][$t][$id];\n\t\t\t\techo \" - \";\n\t\t\t\techo $title[$id];\n\t\t\t\tif ($venue[$id]) {\n\t\t\t\t\techo \" - \".$venue[$id];\n\t\t\t\t\tif ($city[$id]) {\n\t\t\t\t\t\techo \" - \".$city[$id];\n\t\t\t\t\t\tif ($state[$id]) echo \", \".$state[$id];\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\techo \"\\\">&nbsp;</div></a></div>\";\n\t\t\t}\n\t\t}\n\t}\n}", "function aidtransparency_print_events()\r\n{\r\n $events = new IATI_Event_Collection();\r\n if( $events->findPosts() > 0 ) :\r\n ?>\r\n <ol>\r\n <?php\r\n foreach ($events->getPosts() as $event) :\r\n ?>\r\n <li><a href=\"<?php echo get_permalink($event->ID); ?>\" title=\"<?php echo $event->post_title; ?>\"><?php echo $event->post_title; ?></a>\r\n <span class=\"when\"><?php echo $event->getWhere(); ?> </span>\r\n </li>\r\n <?php endforeach; ?>\r\n </ol>\r\n <?php endif;\r\n}", "private function buildBody()\n {\n $day = 1;\n $now_date = $this->year . '-' . $this->month . '-01';\n $startingDay = date('N', strtotime('first day of this month', strtotime($now_date)));\n //Add the following line if you want to start the week with monday instead of sunday. Or change the number to suit your needs.\n //$startingDay = $startingDay - 1;\n $monthLength = $this->daysMonth[$this->month - 1];\n if ($this->month == 2 && ((($this->year % 4) == 0) && ((($this->year % 100) != 0) || (($this->year % 400) == 0)))) {\n $monthLength = $monthLength + 1;\n }\n $h = \"<tr>\";\n for ($i = $startingDay == 7 ? 1 : 0; $i < 9; $i++) {\n for ($j = 0; $j <= 6; $j++) {\n $currDate = $this->getDayDate($day);\n $class = $this->getTdClass($day);\n $h .= \"<td data-datetime='$currDate' $class>\";\n $h .= $this->dateWrap[0];\n if ($day <= $monthLength && ($i > 0 || $j >= $startingDay)) {\n $h .= $this->dayWrap[0];\n $h .= $this->getEventSearchLink($day);\n $h .= $this->dayWrap[1];\n $h .= $this->buildEvents($currDate);\n $day++;\n } else {\n $h .= \"&nbsp;\";\n }\n $h .= $this->dateWrap[1];\n $h .= \"</td>\";\n }\n // stop making rows if we've run out of days\n if ($day > $monthLength) {\n break;\n } else {\n $h .= \"</tr>\";\n $h .= \"<tr>\";\n }\n }\n $h .= \"</tr>\";\n $h .= \"</tbody>\";\n $h .= \"</table>\";\n $this->html .= $h;\n }", "function MakeCalendarGrid(){\n //get our days\n $intMonthDays = cal_days_in_month(CAL_GREGORIAN, $this->intMonth, $this->intYear);\n $intDayCounter = 0;\n $arrMonthAttributes = array('colspan'=>'7');\n //make our parent calendar table\n $objCalendarParent = $this->objCalendar->AddChildNode($this->objCalendar->objHTML,'', 'table');\n //let's make our header\n $objHeaderRow = $this->objCalendar->AddChildNode($objCalendarParent,'', 'tr');\n //establish our base attributes\n for($intWeekDay=0;$intWeekDay<7;$intWeekDay++){\n $strDay = date('l', strtotime(\"Sunday +{$intWeekDay} days\"));\n $this->objCalendar->AddChildNode($objHeaderRow,$strDay, 'th',array('class'=>'weekday'));\n }\n //get the starting date\n $intMonthStart = date('N', strtotime($this->intYear.'-'.$this->intMonth.'-1'));\n $intMonthStart++;\n //avoid empty rows\n if($intMonthStart == 8)\n $intMonthStart = 1;\n //make our days now\n for($intDay=1;$intDay<($intMonthDays + $intMonthStart);$intDay++){\n $arrDateAttributes = array('onclick'=>'SelectDay(this);');\n if($intDayCounter === 0){\n //make our new week\n $objWeekRow = $this->objCalendar->AddChildNode($objCalendarParent,'', 'tr');\n $arrDateAttributes['class'] = 'calendarday weekend';\n }\n else if($intDayCounter === 6)\n $arrDateAttributes['class'] = 'calendarday weekend';\n else if($intDay == date('j'))\n $arrDateAttributes['class'] = 'calendarday today';\n else\n $arrDateAttributes['class'] = 'calendarday weekday';\n $intDayCounter++;\n //reset our week now\n if($intDayCounter == 7)\n $intDayCounter = 0;\n if($intDay < $intMonthStart){\n unset($arrDateAttributes['onclick']);\n $this->objCalendar->AddChildNode($objWeekRow,'&nbsp;', 'td',$arrDateAttributes);\n continue 1;\n }\n $arrDateAttributes['id'] = ($intDay - ($intMonthStart - 1)).'-'.$this->arrCalendarProperties['calendarid'];\n //make our day now\n $this->objCalendar->AddChildNode($objWeekRow,($intDay - ($intMonthStart - 1)), 'td',$arrDateAttributes);\n }\n return TRUE;\n }", "function day_cell_html($text, $link, $date)\n{\n $html = '';\n $html .= tdcell(\"row_labels\", 1, array('name' => 'date', 'value' => $date));\n $html .= \"<div class=\\\"celldiv slots1\\\">\\n\";\n $html .= \"<a href=\\\"$link\\\" title=\\\"\" . get_vocab(\"viewday\") . \"\\\">$text</a>\\n\";\n $html .= \"</div></td>\\n\";\n return $html;\n}", "public static function month_calendar_item($event, $color) {\r\n global $urlServer, $is_admin;\r\n\r\n $link = str_replace('thisid', $event->id, $urlServer.Calendar_Events::$event_type_url[$event->event_type]);\r\n if ($event->event_type != 'personal' && $event->event_type != 'admin') {\r\n $link = str_replace('thiscourse', $event->course, $link);\r\n }\r\n $formatted_calendar_item = \"<a href=\\\"\".$link.\"\\\"><div class=\\\"{$event->event_group}\\\" style=\\\"padding:2px;background-color:$color;\\\">\".$event->title.\"</div></a>\";\r\n if (!$is_admin && $event->event_group == 'admin') {\r\n $formatted_calendar_item = \"<div class=\\\"{$event->event_group}\\\" style=\\\"padding:2px;background-color:$color;\\\">\".$event->title.\"</div>\";\r\n }\r\n return $formatted_calendar_item;\r\n }", "function theme_uom_event_booking($variables) {\n $booking = $variables['booking'];\n $items = array();\n\n $title = t('Booking');\n $attributes = array('class' => array('uom-event-booking'));\n $type = 'ul';\n\n if (!empty($booking->email)) {\n $items[] = array(\n 'data' => l($booking->email, 'mailto:' . $booking->email),\n 'class' => array('email'),\n );\n }\n if (!empty($booking->phone)) {\n $items[] = array(\n 'data' => (module_exists('unimelb_formatters')) ? unimelb_formatters_field_formatter_unimelb_html5_phone_link(array('safe_value' => $booking->phone)) : $booking->phone,\n 'class' => array('phone'),\n );\n }\n if (!empty($booking->url)) {\n $items[] = array(\n 'data' => l($booking->url, $booking->url),\n 'class' => array('url'),\n );\n }\n\n return (empty($items)) ? '' : theme_item_list(array('items' => $items, 'title' => $title, 'type' => $type, 'attributes' => $attributes));\n}", "private function _showDay($cellNumber){\n \n if($this->thisDay==0){\n \n $firstDayOfTheWeek = date('N',strtotime($this->thisYear.'-'.$this->thisMonth.'-01'));\n \n if(intval($cellNumber) == intval($firstDayOfTheWeek)){\n \n $this->thisDay=1;\n \n }\n }\n \n if( ($this->thisDay!=0)&&($this->thisDay<=$this->daysInMonth) ){\n \n $this->thisDate = date('Y-m-d',strtotime($this->thisYear.'-'.$this->thisMonth.'-'.($this->thisDay)));\n \n $cellContent = $this->thisDay;\n \n $this->thisDay++; \n \n }else{\n \n $this->thisDate =null;\n \n $cellContent=null;\n }\n \n \n return '<li id=\"li-'.$this->thisDate.'\" class=\"'.($cellNumber%7==1?' start ':($cellNumber%7==0?' end ':' ')).\n ($cellContent==null?'mask':'').'\">'.$cellContent.'</li>';\n }", "public function actionEvents()\n\t{\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t$this->render('events');\n\t}", "public function listEventsAction()\n {\n $events = $this->getDoctrine()->getRepository('AppBundle:Event')->findEventsByManager($this->getUser());\n\n return $this->render('AppBundle:frontend/manager:event_list.html.twig', [\n 'events' => $events,\n ]);\n }", "public function drawHTML()\n\t{\n\t\t$this->calWeekDays .= \"<table border=\\\"1\\\">\\n\";\n\t\t$this->makeCalendarTitle();\n\t\t$this->makeCalendarHead();\n\t\t$this->makeDayHeadings();\n\t\t$this->calWeekDays .= \"\\t<tr>\\n\";\n\t\t$this->startMonthSpacers();\n\t\t$this->makeHTMLIterator();\n\t\t$this->endMonthSpacers();\n\t\t$this->calWeekDays .= \"\\t</tr>\\n\";\n\t\t$this->calWeekDays .= \"</table>\\n\";\n\t\t\n\t\techo $this->calWeekDays;\n\t}", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $events = $em->getRepository('MALrmBundle:CalendarEvent')->findAll();\n\n\n return $this->render('MALrmBundle:event:index.html.twig', array(\n 'events' => $events,\n ));\n }", "function __construct(vevent $event, $from_date, $to_date)\r\n {\r\n //$this_day = date('d', $from_date);\r\n //$this_month = date('m', $from_date);\r\n //$this_year = date('Y', $from_date);\r\n\r\n //For the list view\r\n $date = getdate();\r\n $date_unixtime = mktime(0, 0, 0, $date['mon'], $date['mday'], $date['year']);\r\n // TODO: List view needs to start today, not on the last selected date.\r\n// \t$from_date = ($date_unixtime + $to_date) / 2;\r\n \t$this_day = date('d', $from_date);\r\n $this_month = date('m', $from_date);\r\n $this_year = date('Y', $from_date);\r\n// \t$this_day = $date['mday'];\r\n// \t$this_month = $date['mon'];\r\n// \t$this_year = $date['year'];\r\n\r\n $start_month = $date['mon'] - 1;\r\n $start_year = $date['year'];\r\n $end_month = $this_month + 1;\r\n $end_year = $this_year;\r\n\r\n\r\n if ($this_month == 1)\r\n {\r\n $start_month = 12;\r\n $start_year --;\r\n }\r\n if ($this_month == 12)\r\n {\r\n $end_month = 1;\r\n $end_year ++;\r\n }\r\n\r\n $this->event = $event;\r\n $this->view_start = mktime(0, 0, 0, $start_month, 1, $start_year);\r\n $this->view_end = mktime(0, 0, 0, $end_month, 31, $end_year);\r\n\r\n if ($this->debug)\r\n {\r\n echo '<hr />';\r\n echo '<b>ICAL RECURRENCE</b>';\r\n echo '<hr />';\r\n echo '<table class=\"data_table\">';\r\n echo '<thead>';\r\n echo '<tr><th>Variable</td><th>Value</td>';\r\n echo '</thead>';\r\n echo '<tbody>';\r\n echo '<tr><td>Title</td><td>' . $this->event->summary['value'] . '</td>';\r\n echo '<tr><td>View begin</td><td>' . $this->view_start . ' (' . date('r', $this->view_start) . ')</td>';\r\n echo '<tr><td>View end</td><td>' . $this->view_end . ' (' . date('r', $this->view_end) . ')</td>';\r\n // echo '<tr><td>Event</td><td>';\r\n // echo '<pre>';\r\n // echo print_r($this->event, true);\r\n // echo '</pre>';\r\n // echo '</td>';\r\n // echo '</tr>';\r\n echo '</tbody>';\r\n echo '</table>';\r\n }\r\n }", "function show_calendar_events()\n\t{\n\t\t$stats_html = \"\";\n\t\t\n\t\tif ($this->ipsclass->vars['show_birthdays'] or $this->ipsclass->vars['show_calendar'] )\n\t\t{\n\t\t\t$a = explode( ',', gmdate( 'Y,n,j,G,i,s', time() + $this->ipsclass->get_time_offset() ) );\n\t\t\n\t\t\t$day = $a[2];\n\t\t\t$month = $a[1];\n\t\t\t$year = $a[0];\n\t\t\t\n\t\t\t$birthstring = \"\";\n\t\t\t$count = 0;\n\t\t\t$users = array();\n\t\t\t\n\t\t\tif ( $this->ipsclass->vars['show_birthdays'] )\n\t\t\t{\n\t\t\t\tif ( is_array($this->ipsclass->cache['birthdays']) AND count( $this->ipsclass->cache['birthdays'] ) )\n\t\t\t\t{\n\t\t\t\t\tforeach( $this->ipsclass->cache['birthdays'] as $u )\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( $u['bday_day'] == $day and $u['bday_month'] == $month )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$users[] = $u;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if( $day == 28 && $month == 2 && !date(\"L\") )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ( $u['bday_day'] == \"29\" and $u['bday_month'] == $month )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$users[] = $u;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Spin and print...\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\tforeach ( $users as $user )\n\t\t\t\t{\n\t\t\t\t\t$birthstring .= \"<a href='{$this->ipsclass->base_url}showuser={$user['id']}'>{$user['members_display_name']}</a>\";\n\t\t\t\t\t\n\t\t\t\t\tif ($user['bday_year'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$pyear = $year - $user['bday_year'];\n\t\t\t\t\t\t$birthstring .= \"(<b>$pyear</b>)\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$birthstring .= $this->sep_char.\"\\n\";\n\t\t\t\t\t\n\t\t\t\t\t$count++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Fix up string...\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$birthstring = preg_replace( \"/\".$this->sep_char.\"$/\", \"\", trim($birthstring) );\n\t\t\t\t\n\t\t\t\t$lang = $this->ipsclass->lang['no_birth_users'];\n\t\t\t\t\n\t\t\t\tif ($count > 0)\n\t\t\t\t{\n\t\t\t\t\t$lang = ($count > 1) ? $this->ipsclass->lang['birth_users'] : $this->ipsclass->lang['birth_user'];\n\t\t\t\t\t$stats_html .= $this->ipsclass->compiled_templates['skin_boards']->birthdays( $birthstring, $count, $lang );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$count = \"\";\n\t\t\t\t\t\n\t\t\t\t\tif ( ! $this->ipsclass->vars['autohide_bday'] )\n\t\t\t\t\t{\n\t\t\t\t\t\t$stats_html .= $this->ipsclass->compiled_templates['skin_boards']->birthdays( $birthstring, $count, $lang );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Are we viewing the calendar?\n\t\t//-----------------------------------------\n\t\t\n\t\tif ($this->ipsclass->vars['show_calendar'])\n\t\t{\n\t\t\t$this->ipsclass->vars['calendar_limit'] = intval($this->ipsclass->vars['calendar_limit']) < 2 ? 1 : intval($this->ipsclass->vars['calendar_limit']);\n\t\t\t\n\t\t\t$our_unix = gmmktime( 0, 0, 0, $month, $day, $year);\n\t\t\t$max_date = $our_unix + ($this->ipsclass->vars['calendar_limit'] * 86400);\n\t\t\t$events = array();\n\t\t\t$show_events = array();\n\t\t\t\n\t\t\tif( $this->ipsclass->member['org_perm_id'] )\n\t\t\t{\n\t\t\t\t$member_permission_groups = explode( \",\", $this->ipsclass->clean_perm_string( $this->ipsclass->member['org_perm_id'] ) );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$member_permission_groups = explode( \",\", $this->ipsclass->clean_perm_string( $this->ipsclass->member['g_perm_id'] ) );\n\t\t\t\t\n\t\t\t\tif( isset($this->ipsclass->member['mgroup_others']) AND $this->ipsclass->member['mgroup_others'] )\n\t\t\t\t{\n\t\t\t\t\t$this->ipsclass->member['mgroup_others'] = $this->ipsclass->clean_perm_string($this->ipsclass->member['mgroup_others']);\n\t\t\t\t\t\n\t\t\t\t\t$mgroup_others = explode( \",\", $this->ipsclass->member['mgroup_others'] );\n\t\t\t\t\t\n\t\t\t\t\tif( count($mgroup_others) )\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach( $mgroup_others as $mgroup )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif( $mgroup )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$member_permission_groups = array_merge( $member_permission_groups, explode( \",\", $this->ipsclass->clean_perm_string( $this->ipsclass->cache['group_cache'][$mgroup]['g_perm_id'] ) ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ( is_array($this->ipsclass->cache['calendar']) AND count( $this->ipsclass->cache['calendar'] ) )\n\t\t\t{\n\t\t\t\tforeach( $this->ipsclass->cache['calendar'] as $u )\n\t\t\t\t{\n\t\t\t\t\t$set_offset = 0;\n\n\t\t\t\t\tif( $u['event_timeset'] && !($u['event_recurring'] == 0 AND $u['event_unix_to']) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$set_offset = isset($this->ipsclass->member['time_offset']) ? $this->ipsclass->member['time_offset'] * 3600 : 0;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$u['_unix_from'] = $u['event_unix_from'] - $set_offset;\n\t\t\t\t\t$u['_unix_to'] = $u['event_unix_to'] - $set_offset;\n\t\t\t\t\t\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// Private?\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t\n\t\t\t\t\tif ( $u['event_private'] == 1 and $this->ipsclass->member['id'] != $u['event_member_id'] )\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// Got perms?\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t\n\t\t\t\t\tif ( $u['event_perms'] != \"*\" )\n\t\t\t\t\t{\n\t\t\t\t\t\t$event_perms = explode( \",\", $this->ipsclass->clean_perm_string( $u['event_perms'] ) );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$check = 0;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( count($event_perms) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach( $event_perms as $mgroup_perm )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif( in_array( $mgroup_perm, $member_permission_groups ) )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$check = 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( !$check )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// Got calendar perms?\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t\n\t\t\t\t\tif ( $u['_perm_read'] != \"*\" )\n\t\t\t\t\t{\n\t\t\t\t\t\t$read_perms = explode( \",\", $this->ipsclass->clean_perm_string( $u['_perm_read'] ) );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$check = 0;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( count($read_perms) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach( $read_perms as $mgroup_perm )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif( in_array( $mgroup_perm, $member_permission_groups ) )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$check = 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( !$check )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontinue;\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\t// In range?\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t\tif ( $u['event_recurring'] == 0 AND ( ( $u['event_unix_to'] >= $our_unix AND $u['event_unix_from'] <= $max_date )\n\t\t\t\t\t\tOR ( $u['event_unix_to'] == 0 AND $u['event_unix_from'] >= $our_unix AND $u['event_unix_from'] <= $max_date ) ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$u['event_activetime'] = $u['_unix_from'];\n\t\t\t\t\t\t$events[ str_pad( $u['event_unix_from'].$u['event_id'], 15, \"0\" ) ] = $u;\n\t\t\t\t\t}\n\t\t\t\t\telseif( $u['event_recurring'] > 0 )\n\t\t\t\t\t{\n\t\t\t\t\t\t$cust_range_s = $u['event_unix_from'];\n\n\t\t\t\t\t\twhile( $cust_range_s < $u['event_unix_to'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif( $cust_range_s >= $our_unix AND $cust_range_s <= $max_date )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$u['event_activetime'] = $cust_range_s;\n\t\t\t\t\t\t\t\t$events[ str_pad( $cust_range_s.$u['event_id'], 15, \"0\" ) ] = $u;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif( $u['event_recurring'] == \"1\" )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$cust_range_s += 604800;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telseif ( $u['event_recurring'] == \"2\" )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$cust_range_s += 18144000;\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$cust_range_s += 31536000;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Print...\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\tksort($events);\n\t\t\t\n\t\t\tforeach( $events as $event )\n\t\t\t{\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Recurring?\n\t\t\t\t//-----------------------------------------\n\n\t\t\t\t$c_time = '';\n\t\t\t\t$c_time = gmdate( 'j-F-y', $event['event_activetime'] );\n\t\t\t\t\n\t\t\t\t$show_events[] = \"<a href='{$this->ipsclass->base_url}act=calendar&amp;code=showevent&amp;calendar_id={$event['event_calendar_id']}&amp;event_id={$event['event_id']}' title='$c_time'>\".$event['event_title'].\"</a>\";\n\t\t\t}\n\t\t\t\n\t\t\t$this->ipsclass->lang['calender_f_title'] = sprintf( $this->ipsclass->lang['calender_f_title'], $this->ipsclass->vars['calendar_limit'] );\n\t\t\t\n\t\t\tif ( count($show_events) > 0 )\n\t\t\t{\n\t\t\t\t$event_string = implode( $this->sep_char.' ', $show_events );\n\t\t\t\t$stats_html .= $this->ipsclass->compiled_templates['skin_boards']->calendar_events( $event_string );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ( ! $this->ipsclass->vars['autohide_calendar'] )\n\t\t\t\t{\n\t\t\t\t\t$event_string = $this->ipsclass->lang['no_calendar_events'];\n\t\t\t\t\t$stats_html .= $this->ipsclass->compiled_templates['skin_boards']->calendar_events( $event_string );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\treturn $stats_html;\n\t\n\t}", "public function render()\n {\n $result = array();\n\n if ($this->hasSources())\n {\n $visibleSources = 0;\n\n $result[] = '<div class=\"panel panel-default table-calendar-legend\">';\n $result[] = '<div class=\"panel-heading\">';\n $result[] = '<h4 class=\"panel-title\">' . Translation::get('Legend') . '</h4>';\n $result[] = '</div>';\n $result[] = '<ul class=\"list-group\">';\n\n $sources = $this->getSources();\n\n sort($sources);\n\n foreach ($sources as $source)\n {\n $sourceClasses = $this->getSourceClasses($source);\n\n if ($this->getDataProvider()->supportsVisibility())\n {\n $isSourceVisible = $this->getDataProvider()->isSourceVisible($source);\n $eventClasses = ! $isSourceVisible ? ' event-container-source-faded' : '';\n }\n else\n {\n\n $eventClasses = '';\n }\n\n $result[] = '<li class=\"list-group-item\">';\n $result[] = '<div class=\"event-source' . $eventClasses . '\" data-source-key=\"' .\n $this->addSource($source) . '\" data-source=\"' . $source . '\">';\n $result[] = '<span class=\"event-container ' . $sourceClasses . '\"></span>';\n $result[] = $source;\n $result[] = '</div>';\n $result[] = '</li>';\n\n if ($this->getDataProvider()->supportsVisibility())\n {\n if ($isSourceVisible)\n {\n $visibleSources ++;\n }\n }\n }\n\n $result[] = '</ul>';\n $result[] = '</div>';\n\n if ($this->getDataProvider()->supportsVisibility())\n {\n $result[] = '<script type=\"text/javascript\">';\n $result[] = 'var calendarVisibilityContext = ' .\n json_encode($this->getDataProvider()->getVisibilityContext()) . ';';\n $result[] = '</script>';\n\n $result[] = ResourceManager::getInstance()->get_resource_html(\n Path::getInstance()->getJavascriptPath(__NAMESPACE__, true) . 'Highlight.js');\n\n if ($visibleSources == 0)\n {\n $notificationMessageManager = new NotificationMessageManager();\n $notificationMessageManager->addMessage(\n new NotificationMessage(\n Translation::get('AllEventSourcesHidden'),\n NotificationMessage::TYPE_WARNING));\n }\n }\n }\n\n return implode(PHP_EOL, $result);\n }", "public static function day_calendar($day, $month, $year) {\r\n global $langNoEvents, $langDay, $langWeek, $langMonth, $langViewShow;\r\n\r\n $calendar_content = \"\";\r\n if (is_null($day)) {\r\n $day = 1;\r\n }\r\n $nextdaydate = new DateTime(\"$year-$month-$day\");\r\n $nextdaydate->add(new DateInterval('P1D'));\r\n $previousdaydate = new DateTime(\"$year-$month-$day\");\r\n $previousdaydate->sub(new DateInterval('P1D'));\r\n\r\n $thisday = new DateTime(\"$year-$month-$day\");\r\n $daydescription = ucfirst(format_locale_date($thisday->getTimestamp()));\r\n\r\n $backward = array('day'=>$previousdaydate->format('d'), 'month'=>$previousdaydate->format('m'), 'year' => $previousdaydate->format('Y'));\r\n $foreward = array('day'=>$nextdaydate->format('d'), 'month'=>$nextdaydate->format('m'), 'year' => $nextdaydate->format('Y'));\r\n\r\n $calendar_content .= '<div class=\"right\" style=\"width:100%\">'.$langViewShow.':&nbsp;'.\r\n '<a href=\"#\" onclick=\"show_day(selectedday, selectedmonth, selectedyear);return false;\">'.$langDay.'</a>&nbsp;|&nbsp;'.\r\n '<a href=\"#\" onclick=\"show_week(selectedday, selectedmonth, selectedyear);return false;\">'.$langWeek.'</a>&nbsp;|&nbsp;'.\r\n '<a href=\"#\" onclick=\"show_month(selectedday, selectedmonth, selectedyear);return false;\">'.$langMonth.'</a></div>';\r\n\r\n $calendar_content .= \"<table class='table-default'>\";\r\n $calendar_content .= \"<tr>\";\r\n $calendar_content .= '<td width=\"25\"><a href=\"#\" onclick=\"show_day('.$backward['day'].','.$backward['month'].','.$backward['year'].'); return false;\">&laquo;</a></td>';\r\n $calendar_content .= \"<td class='center'><b>$daydescription</b></td>\";\r\n $calendar_content .= '<td width=\"25\" class=\"right\"><a href=\"#\" onclick=\"show_day('.$foreward['day'].','.$foreward['month'].','.$foreward['year'].'); return false;\">&raquo;</a></td>';\r\n $calendar_content .= \"</tr>\";\r\n $calendar_content .= \"</table>\";\r\n\r\n $eventlist = Calendar_Events::get_calendar_events(\"day\", \"$year-$month-$day\");\r\n $calendar_content .= \"<table class='table-default'>\";\r\n\r\n $curhour = 0;\r\n $now = getdate();\r\n $today = new DateTime($now['year'].'-'.$now['mon'].'-'.$now['mday'].' '.$now['hours'].':'.$now['minutes']);\r\n if ($now['year'].'-'.$now['mon'].'-'.$now['mday'] == \"$year-$month-$day\") {\r\n $thisdayistoday = true;\r\n }\r\n else{\r\n $thisdayistoday = false;\r\n }\r\n $thishour = new DateTime($today->format('Y-m-d H:00'));\r\n $cursorhour = new DateTime(\"$year-$month-$day 00:00\");\r\n $curstarthour = \"\";\r\n\r\n foreach ($eventlist as $thisevent) {\r\n $thiseventstart = new DateTime($thisevent->start);\r\n $thiseventhour = new DateTime($thiseventstart->format('Y-m-d H:00'));\r\n if ($curstarthour != $thiseventhour) { //event date changed\r\n while($cursorhour < $thiseventhour) {\r\n if ($thisdayistoday && $thishour>=$cursorhour && intval($cursorhour->diff($thishour,true)->format('%h'))<6)\r\n $class = 'today';\r\n else\r\n $class = 'monthLabel';\r\n $calendar_content .= \"<tr><td colspan='3' class='$class'>\" . \"&nbsp;<b>\" . ucfirst($cursorhour->format('H:i')) . \"</b></td></tr>\";\r\n if (intval($cursorhour->diff($thiseventhour,true)->format('%h'))>6) {\r\n $calendar_content .= \"<tr><td colspan='3'>$langNoEvents</td></tr>\";\r\n }\r\n $cursorhour->add(new DateInterval('PT6H'));\r\n $curhour += 6;\r\n }\r\n\r\n if ($thisdayistoday && $thishour>=$cursorhour && intval($cursorhour->diff($thishour,true)->format('%h'))<6)\r\n $class = 'today';\r\n else\r\n $class = 'monthLabel';\r\n //No hour tr for the event\r\n //$calendar_content .= \"<tr><td colspan='3' class='$class'>\" . \"&nbsp;<b>\" . ucfirst($thiseventhour->format('H:i')) . \"</b></td></tr>\";\r\n if ($cursorhour <= $thiseventhour) {\r\n $cursorhour->add(new DateInterval('PT6H'));\r\n $curhour += 6;\r\n }\r\n }\r\n $calendar_content .= Calendar_Events::day_calendar_item($thisevent, 'even');\r\n $curstarthour = $thiseventhour;\r\n }\r\n /* Fill with empty days*/\r\n for($i=$curhour;$i<24;$i+=6) {\r\n if ($thisdayistoday && $thishour>=$cursorhour && intval($cursorhour->diff($thishour,true)->format('%h'))<6)\r\n $class = 'today';\r\n else\r\n $class = 'monthLabel';\r\n $calendar_content .= \"<tr><td colspan='3' class='$class'>\" . \"&nbsp;<b>\" . ucfirst($cursorhour->format('H:i')) . \"</b></td></tr>\";\r\n $calendar_content .= \"<tr><td colspan='3'>$langNoEvents</td></tr>\";\r\n $cursorhour->add(new DateInterval('PT6H'));\r\n }\r\n $calendar_content .= \"</table>\";\r\n /* Legend */\r\n $calendar_content .= Calendar_Events::calendar_legend();\r\n\r\n return $calendar_content;\r\n }", "public function indexAction()\n {\n $days = $this->sortDaysByDateAndTime(\n $this->getCollectedDays()\n );\n $this->view->assign('days', $days);\n }", "function getEvents($date, $groupe){\n\t/*La date nous est donnée au format JJ-MM-AAAA*/\n\t$ex_date = explode('-', $date);\n\t$dateCherchee = new DateTime($ex_date[2].'-'.$ex_date[1].'-'.$ex_date[0]);\n\t\n try{\n\t\t$bdd = new PDO('mysql:host=localhost;dbname=trip_manager;charset=utf8', 'root', '');\n\t}catch (Exception $e){\n\t\tdie('Erreur : ' . $e->getMessage());\n\t}\n\t\n $eventListHTML = '';\n\n $result = $bdd->query(\"SELECT * FROM events WHERE groupe = '\".$groupe.\"' AND status = 1\");\n \n while($donnees = $result->fetch()){\n\t\tif($donnees['date'] !== ''){\n\t\t\t$ranges = explode('+', $donnees['date']);\n\t\t\tfor($i=0; $i<count($ranges); $i++){\n\t\t\t\t$dates = explode(';', $ranges[$i]);\n\t\t\t\t$date_debut = $dates[0];\n\t\t\t\t$date_fin = $dates[1];\n\t\t\t\t\n\t\t\t\t$start_date = new DateTime($date_debut);\n\t\t\t\t\n\t\t\t\t$end_date = new DateTime($date_fin);\n\t\t\t\t\n\t\t\t\tif(($start_date<=$dateCherchee) && ($end_date>= $dateCherchee)){\n\t\t\t\t\t$membre_id = str_replace(\"Disponibilité de \", \"\", $donnees['title']);\n\t\t\t\t\t\n\t\t\t\t\t$couleur = getColorS($groupe,$membre_id);\n\t\t\t\t\t\n\t\t\t\t\t$eventListHTML .= '<span class=\"color\" style=\"background-color: '.$couleur.';\"></span>';\n\t\t\t\t\tbreak 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n \n return $eventListHTML;\n}", "function makeEventLink($event,$day, $title='', $noTooltip = 0){\n\n\t\t$day = $event['mday'] ? $event['mday'] : $day;\n\t\t$linkContent = !empty($title)? $title : $event['title'];\n\n\t\tif($this->conf['showEventBegin'] != 0 AND $event['i']<1) {\n\t\t\tif ($event['allday'])\n\t\t\t\t$linkContent = '<span class=\\'il-date\\'>'.$this->pi_getLL('allday').' </span>'.$linkContent;\n\t\t\telse\n\t\t\t\t$linkContent = '<span class=\\'il-date\\'>'.strftime($this->conf['timeFormat'], $event['begin']).' </span>'.$linkContent;\n\t\t}\n\n\t\tif(!empty($event['directlink'])){\n\t\t\t$link = $this->pi_linkTP_keepPIvars($linkContent, array(), $this->caching, 0, $event['directlink']);\n\t\t} else {\n\n\t\t\t$vars['year'] = strftime('%Y', $day);\n\t\t\t$vars['month'] = strftime('%m', $day);\n\t\t\t$vars['day']= strftime('%d', $day);\n\t\t\t$vars['event'] = $event['uid'];\n\n\t\t\t$PIDsingle = ($this->conf['PIDeventDisplay'] !== 0) ? $this->conf['PIDeventDisplay'] : $this->conf['pid'];\n\n\t\t\t$link = $this->pi_linkTP($linkContent, array($this->prefixId=>$vars), $this->caching, $PIDsingle);\n\t\t\tif ($this->conf['showTooltips'] == 1 AND !$noTooltip) {\n\t\t\t\t$timestamp = $event['mday'] ? $event['mday'] : $event['begin'];\n\t\t\t\t$params = array(\n\t\t\t\t\t'rel' => 'td-tooltip-'.$event['uid'].'-'.$timestamp,\n\t\t\t\t\t'class' => 'td-tooltip-trigger'\n\t\t\t\t);\n\n\t\t\t\t$this->tooltip .= $this->renderTooltip($event, $timestamp);\n\n\t\t\t\t$link = $this->cObj->addParams($link, $params);\n\t\t\t}\n }\n return $link;\n\t}", "public function index()\n {\n\n $sidebar_items = array(\n \"List Events\" => array('url' => URL::route('event.index'), 'icon' => '<i class=\"fa fa-users\"></i>'),\n );\n $FillableDropdown = new FillableDropdown();\n $active = $FillableDropdown->active($default = 2);\n $accessibility = $FillableDropdown->accessibility($default = 2);\n $operations = $FillableDropdown->eventOperations($default = 2);\n\n $authentication = \\App::make('authenticator');\n $user = $authentication->getLoggedUser();\n\n if (isset($user)) {\n\n $user_id = $user->id;\n }\n\n if (isset($user_id)) {\n\n $users = User::findOrFail($user_id);\n }\n $events = Events::orderBy('name', 'asc')->paginate(20);\n\n return view('events.event_listing_page', compact('events', 'users', 'active', 'accessibility', 'operations', 'sidebar_items'));\n\n }", "public function sprintEvents($events, $view = 'date', $articleClass = 'span4', $imageWidth = 150, $imageHeight = 150, $realImageSize = 1) {\n\t\tglobal $model;\n\t\t$content = '';\n\t\tif (is_array($events)) {\n\t\t\tif ($view == 'multiple-days') foreach($events as $day => $_events) {\n\t\t\t\t$date = strtotime($day);\n\t\t\t\t$content .= sprintf('<h1 class=\"eventDate\">%s</h1>', $date > 0 ? date('l, M j, Y', $date) : $model->lang('WEEKLY', 'CalendarModel'));\n\t\t\t\t$content .= $this->sprintEvents($_events, 'date', $articleClass, $imageWidth, $imageHeight, $realImageSize);\n\t\t\t} else foreach($events as $event) {\n\t\t\t\t$content .= $this->sprintEvent($event, $view, $articleClass, $imageWidth, $imageHeight, $realImageSize);\n\t\t\t}\n\t\t}\n\t\treturn $content;\n\t}", "public function renderDay(DayInterface $day)\n {\n $classes = array();\n\n $dayOfWeek = $day->dayOfWeek();\n\n if (DayInterface::SATURDAY === $dayOfWeek || DayInterface::SUNDAY === $dayOfWeek) {\n $classes[] = 'bm-calendar-weekend';\n }\n\n foreach ($day->getStates() as $state) {\n $classes[] = 'bm-calendar-state-' . $state->type();\n }\n\n $output = '<td>';\n if (sizeof($classes)) {\n $output = '<td class=\"' . implode(' ', $classes) . '\">';\n }\n\n if ($day->getAction()) {\n $output .= '<a class=\"timelapse-start-video\"';\n $output .= 'rel=\"'.$day->getAction()['year'] . '/' . $day->getAction()['monthName'] . '/' . $day->getAction()['dayName'] . '/' . $day->getAction()['monthName'] . '-' . $day->getAction()['dayName'].'\">';\n $output .= $day;\n $output .= '</a>';\n } else {\n $output .= $day;\n }\n $output .= '</td>';\n\n return $output;\n }", "public function index()\n\t{\n\t\t$events = Eventadd::orderBy('date', 'asc')->get();\n return View::make('events.index', compact('events'));\n\t}", "public function indexAction() {\n\t\t$this->view->viewer = $viewer = Engine_Api::_()->user()->getViewer();\n\t\tif (!Engine_Api::_()->core()->hasSubject()) {\n\t\t\treturn $this->setNoRender();\n\t\t}\n\t\t// Get subject and check auth\n\t\t$subject = Engine_Api::_()->core()->getSubject('event');\n\t\tif (!$subject->authorization()->isAllowed($viewer, 'view')) {\n\t\t\treturn $this->setNoRender();\n\t\t}\n\n\t\t// Prepare data\n\t\t$this->view->event = $event = $subject;\n\t\t$limit =$this->_getParam('max',5);\n\t\t$currentDay = date('Y') . '-' . date('m') . '-' . date('d');\n\t\t\n\t\t$table = Engine_Api::_()->getItemTable('event');\n\t\t$select = $table->select()\n ->where('category_id = ?', $event->category_id)\n ->where('event_id != ?', $event->getIdentity())\n ->order(\"DATEDIFF('{$currentDay}', starttime) DESC\")\n ->limit($limit);\n\n\t\t$showedEvents = $table->fetchAll($select);\n\t\t$this->view->showedEvents = $showedEvents;\n\t\t// Hide if nothing to show\n\t\tif( count($showedEvents) <= 0 ) {\n\t return $this->setNoRender();\n\t }\n }", "function main_content()\n{\n?>\n <h2>Events</h2>\n\n <div class=\"box\"><b>Where and When</b><br />\n Events take place in Room 86-01 of Portland State's \n <a href=\"http://www.fap.pdx.edu/floorplans/detail2.php?buildingID=12\">Fourth Avenue Building (FAB)</a>\n from 4:30pm to 5:30pm, unless circumstances dictate otherwise.</div>\n<?php\n\n// Are you looking for the events?\n/* To add the functionality the events section now enjoys, unfortunatly I\n * had to break the normal design style and add all the event handling to\n * the body.php script, with the actual events information stored in the \n * events_list.php script. \n * \n * events are stored in events_list.php for two reasons; so that the\n * sidebar can access them without accessing this page every time, and\n * so there is one file that is purely events information. In the future,\n * if we ever use a database to store events information, the \n * events_list.php script is the only script that would need to change.\n * \n * I would have gone with just using SQL, but it's easier to show new\n * people how to edit a text file than it is to create, maintain, and use\n * a secure form or other interface for SQL. Anyone can edit a text file,\n * but not everyone can use SQL.\n *\n * So why not call events_list.php from here and use this page to display\n * it? honestly I couldn't figure out how to. I tried and tried, but \n * aparently my understanding of php is not good enough to get it to work.\n * It seems to have something to do with how the main_content function is\n * actually run in body.php causing some scope issues. Anyways I suffered\n * enough trying to make it work that way. Give it a try if you feel like\n * it, I'm done struggling with it for now.\n *\n*/\n\n\n// Google calendar, which is now redundant.\n/*\n <!--<iframe src=\"https://www.google.com/calendar/embed?height=400&amp;wkst=1&amp;bgcolor=%23FFFFFF&amp;src=psuacm%40cs.pdx.edu&amp;color=%23B1440E&amp;ctz=America%2FLos_Angeles\" style=\" border-width:0 \" width=\"600\" height=\"400\" frameborder=\"0\" scrolling=\"no\"></iframe>\n\n <p>\n Sign up for the\n <a href=\"https://mailhost.cecs.pdx.edu/cgi-bin/mailman/listinfo/acm-members\">ACM Mailing List</a>\n to get messages about upcoming events.\n </p>-->\n*/\n}", "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}", "function draw_calendar($month,$year,$cal,$available_list,$price_list){\n\n /* draw table */\n $calendar = '<table cellpadding=\"0\" cellspacing=\"0\" class=\"calendar\">';\n\n /* table headings */\n $headings = array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');\n $calendar.= '<tr class=\"calendar-row\"><td class=\"calendar-day-head\">'.implode('</td><td class=\"calendar-day-head\">',$headings).'</td></tr>';\n\n /* days and weeks vars now ... */\n $running_day = date('w',mktime(0,0,0,$month,1,$year));\n $days_in_month = date('t',mktime(0,0,0,$month,1,$year));\n $days_in_this_week = 1;\n $day_counter = 0;\n $dates_array = array();\n\n /* row for week one */\n $calendar.= '<tr class=\"calendar-row\">';\n\n /* print \"blank\" days until the first of the current week */\n for($x = 0; $x < $running_day; $x++):\n $calendar.= '<td class=\"calendar-day-np\"> </td>';\n $days_in_this_week++;\n endfor;\n\n /* keep going with days.... */\n for($list_day = 1; $list_day <= $days_in_month; $list_day++):\n // echo \" cal: \".($available_list[$list_day - 1] == 't').\"\\n\";\n if ($available_list[$list_day - 1] == 't')\n {\n $calendar.= '<td class=\"calendar-day\" bgcolor=\"#00FF00\">';\n } else {\n $calendar.= '<td class=\"calendar-day\" bgcolor=\"#FF0000\">';\n\n }\n \n\n /* add in the day number */\n $calendar.= '<div class=\"day-number\" ><font size=\"+3\">'.$list_day.\"</font> \".$price_list[$list_day-1].'</div>';\n\n /** QUERY THE DATABASE FOR AN ENTRY FOR THIS DAY !! IF MATCHES FOUND, PRINT THEM !! **/\n $calendar.= str_repeat('<p> </p>',2);\n \n $calendar.= '</td>';\n if($running_day == 6):\n $calendar.= '</tr>';\n if(($day_counter+1) != $days_in_month):\n $calendar.= '<tr class=\"calendar-row\">';\n endif;\n $running_day = -1;\n $days_in_this_week = 0;\n endif;\n $days_in_this_week++; $running_day++; $day_counter++;\n endfor;\n\n /* finish the rest of the days in the week */\n if($days_in_this_week < 8):\n for($x = 1; $x <= (8 - $days_in_this_week); $x++):\n $calendar.= '<td class=\"calendar-day-np\"> </td>';\n endfor;\n endif;\n\n /* final row */\n $calendar.= '</tr>';\n\n /* end the table */\n $calendar.= '</table>';\n \n /* all done, return result */\n return $calendar;\n }", "function draw_calendar($month,$year){\r\n\t/*Naredi koledar*/\r\n\t$calendar = '<table cellpadding=\"0\" cellspacing=\"0\" class=\"calendar\">';\r\n\t\r\n\t$headings = array('Nedelja','Ponedeljek','Torek','Sreda','Cetrtek','Petek','Sobota');\r\n\t$calendar.= '<tr class=\"calendar-row\"><td class=\"calendar-day-head\">'.implode('</td><td class=\"calendar-day-head\">',$headings).'</td></tr>';\r\n\r\n\t$running_day = date('w',mktime(0,0,0,$month,1,$year));\r\n\t$days_in_month = date('t',mktime(0,0,0,$month,1,$year));\r\n\t$days_in_this_week = 1;\r\n\t$day_counter = 0;\r\n\t$dates_array = array();\r\n\r\n\t$calendar.= '<tr class=\"calendar-row\">';\r\n\r\n\tfor($x = 0; $x < $running_day; $x++):\r\n\t\t$calendar.= '<td class=\"calendar-day-np\">&nbsp;</td>';\r\n\t\t$days_in_this_week++;\r\n\tendfor;\r\n\r\n\tfor($list_day = 1; $list_day <= $days_in_month; $list_day++):\r\n\t\tif($list_day < 10) {\r\n $list_day = str_pad($list_day, 2, '0', STR_PAD_LEFT);\r\n }\r\n\t\t$month = str_pad($month, 2, '0', STR_PAD_LEFT);\r\n\t\t$event_day = $year.'-'.$month.'-'.$list_day;\r\n\r\n\t\t$calendar.= '<td class=\"calendar-day\"><div name=\"test\" style=\"height:100px; width:120px; overflow: auto; white-space:nowrap\" id=' .$event_day. ' onclick=\"modal(this.id);\">';\r\n\t\t$calendar.= '<div>'.$list_day.'</div>';\t\r\n\t\t$query = \"SELECT CONCAT_WS(' ',s.firstname,s.lastname) as Zaposleni, a.name, aa.aktivnost_id\r\n\t\t\tFROM ost_staff s, ost_agent_aktivnost aa, ost_aktivnosti a\r\n\t\t\tWHERE s.staff_id = aa.staff_id and a.id=aa.aktivnost_id and '$event_day' BETWEEN aa.aktivnost_od AND aa.aktivnost_do AND aa.aktivnost_id > 1 AND aa.aktivnost_id != 9 AND aa.aktivnost_id != 10\";\r\n\t\t\t$result = db_query($query) or die('Ne morem pridobiti rezultata!');\r\n\t\t\twhile($row = db_fetch_array($result)) {\r\n\t\t\t\t$words = explode(' ',$row['Zaposleni']);\r\n\t\t\t\t$calendar .= '<div>'.$words[0][0].'. '.$words[1][0].'. : '.$row['name'].'</div>';\r\n\t\t\t}\r\n\t\t$calendar.= '</div></td>';\r\n\t\tif($running_day == 6):\r\n\t\t\t$calendar.= '</tr>';\r\n\t\t\tif(($day_counter+1) != $days_in_month):\r\n\t\t\t\t$calendar.= '<tr class=\"calendar-row\">';\r\n\t\t\tendif;\r\n\t\t\t$running_day = -1;\r\n\t\t\t$days_in_this_week = 0;\r\n\t\tendif;\r\n\t\t$days_in_this_week++; $running_day++; $day_counter++;\r\n\tendfor;\r\n\r\n\tif($days_in_this_week < 8):\r\n\t\tfor($x = 1; $x <= (8 - $days_in_this_week); $x++):\r\n\t\t\t$calendar.= '<td class=\"calendar-day-np\">&nbsp;</td>';\r\n\t\tendfor;\r\n\tendif;\r\n\r\n\t$calendar.= '</tr>';\r\n\r\n\t$calendar.= '</table>';\r\n\r\n\t$calendar = str_replace('</td>','</td>'.\"\\n\",$calendar);\r\n\t$calendar = str_replace('</tr>','</tr>'.\"\\n\",$calendar);\r\n\r\n\treturn $calendar;\r\n}", "function render_daytitle($date){\n\t\t//returns a formatted date and time for an event\n\t\t$return_string= date (\"D\", $date->get_unix_time());\n\t\t$return_string=$return_string.\"<br />\";\n\t\t$return_string=$return_string.date(\"M d\", $date->get_unix_time());\n\t\treturn $return_string;\n\t}", "function StandardListView( $searchstring = NULL ) {\r\n global $mainframe, $database, $mosConfig_list_limit, $cat_id, $field, $order, $task;\r\n\r\n if ( $field && $order <> \"none\" ) {\r\n $ordering = \"\\n ORDER BY e.$field \" . $order;\r\n } else {\r\n $ordering = \"\\n ORDER BY e.start_date DESC, e.recur_week\";\r\n }\r\n\r\n if (isset($searchstring)) $searcharray[] = $searchstring;\r\n \r\n if(($cat_id <> 0) && is_numeric($cat_id) ) {\r\n\t $searcharray[] = \" e.catid=\" . $cat_id;\r\n } else if ($cat_id === \"old\") {\r\n $today = getDate();\r\n $searcharray[] = \"e.end_date < $today[0]\";\r\n }\r\n\r\n if ($task == \"unpublished\") {\r\n $searcharray[] = \"e.published = '0'\";\r\n }\r\n\r\n //filter-options\r\n $search = mosGetParam($_REQUEST, \"search\", false);\r\n if ($search)\r\n $searcharray[] = \"(e.title LIKE '%$search%' OR e.description LIKE '%$search%')\";\r\n \r\n $searchstring = (@$searcharray)?implode(\" AND \", $searcharray):\"1\";\r\n \r\n $database->setQuery( \"SELECT COUNT(*) FROM #__eventcal AS e WHERE $searchstring\");\r\n\r\n // page navigation\r\n $total = $database->loadResult();\r\n $limitstart = $mainframe->getUserStateFromRequest( \"view{eventcal}\", 'limitstart', 0 );\r\n $limit = $mainframe->getUserStateFromRequest( \"viewlistlimit\", 'limit', $mosConfig_list_limit ); \r\n $pageNav = new mosPageNav( $total, $limitstart, $limit );\r\n\r\n $database->setQuery(\r\n \"SELECT e.*, u.name AS editor, c.title AS cat_name, c.params AS cat_params FROM #__eventcal AS e\" .\r\n \"\\n LEFT JOIN #__users AS u ON u.id = e.checked_out\" .\r\n\t\t\"\\n LEFT JOIN #__categories AS c ON c.id = e.catid\" .\r\n \"\\n WHERE \" . $searchstring .\r\n $ordering .\r\n \"\\n LIMIT $pageNav->limitstart, $pageNav->limit\"\r\n );\r\n $results = $database->loadObjectList();\r\n\t\r\n \t$categories[] = mosHTML::makeOption( \"0\", _ALL_EVENTS );\r\n $categories[] = mosHTML::makeOption( \"old\", _OLD_EVENTS );\r\n \r\n \t$query = \"SELECT id AS value, name AS text\"\r\n . \"\\n FROM #__categories\"\r\n . \"\\n WHERE section = 'com_eventcal'\"\r\n\t . \"\\n AND published = '1'\";\r\n $database->setQuery( $query );\r\n $categories = array_merge( $categories, $database->loadObjectList() );\r\n\r\n\t$catlist = mosHTML::selectList( $categories, 'catid', 'class=\"inputbox\" size=\"1\" onchange=\"document.adminForm.submit();\"', 'value', 'text', $cat_id );\r\n\r\n\tHTML_admin_eventcal::mkStandardTable($results, $pageNav, $catlist );\r\n}", "public function index() {\n\t\t$this->load->helper('date');\n\t\t$data['events'] = $this->event_model->get();\n\t\tfor($iii = 0; $iii < sizeof($data['events']); $iii++) {\n\t\t\t$event_info = $this->event_info_model->get_event($data['events'][$iii]['event_id']);\n\t\t\t$data['events'][$iii]['info'] = $event_info;\n\t\t\tif($event_info != NULL) {\n\t\t\t\t$data['events'][$iii]['account'] = $this->account_model->get($event_info->event_accounts_account_id);\n\t\t\t} else {\n\t\t\t\t$data['events'][$iii]['account'] = NULL;\n\t\t\t}\n\t\t}\n\n\t\t$data['content'] = 'events/index';\n\t\t$data['stylesheets'] = 'events/index_stylesheets';\n\t\t$data['scripts'] = 'events/index_scripts';\n\t\t$data['title'] = 'Events';\n\t\t$data['sub_title'] = 'The page for the events';\n\t\t$this->load->view($this->layout, $data);\n\t}", "function formatEvent($time, $date, $firstInList=false)\n{\n\t$str = \"\";\n\t$event = $time->get(\"-event:time\");\n\t$organisers = array();\n\tgetOrganisers($organisers, $event);\n\t$places = array();\n\tgetPlaces($places, $event);\n\n\t$sid = sid($time);\n\n\tglobal $eventcounter;\n\tglobal $eventdate;\n\t$eventcounter++;\n\tif($eventcounter <= 10 || $eventdate == $date) { $featured = \"featured \"; } else { $featured = \"\"; }\n\tif($eventcounter <= 10) { $eventdate = $date; }\n\t$starts = \"\";\n\tif( $time->has( \"tl:start\" ) && substr($time->getString(\"tl:start\"), 0, 10) == $date )\n\t{\n\t\t$starts = \" <span class='date'>(\".formatTime($time->getString( \"tl:start\" ), $date).\")</span>\";\n\t}\n\t$str .= \"<div class='event $featured\".($firstInList?\"first-event \":\"\").implode(\" \", array_keys($organisers)).\" \".implode(\" \", array_keys($places)).\"' itemscope itemtype='http://data-vocabulary.org/Event'>\\n\";\n\t$str .= \"\\t<h3 itemprop='summary'><img class='small-chevron' src='img/chevron_small_right.png' alt='' />\".htmlspecialchars($event->label()).\"$starts</h3><div class='event-links'><a href='#' class='expand-link'>Read more</a>\";\n\tif( $event->has( \"foaf:homepage\" ) )\n\t{\n\t\t$str .= \" | <a href='\".htmlspecialchars($event->get( \"foaf:homepage\" )).\"' itemprop='url' target='_blank'>View event</a>\";\n\t}\n\t$str .= \"</div>\\n\";\n\t$str .= \"\\t<div class='event-more' id='\".$sid.\"'>\\n\";\n\t$str .= \"\\t\\t<div class='event-info'>\\n\";\n\tif( $time->has( \"tl:start\" ) && substr($time->getString(\"tl:start\"), 0, 10) == $date )\n\t{\n\t\t$str .= \"\\t\\t\\t<div>\";\n\t\t$str .= formatTime($time->getString( \"tl:start\" ), $date);\n\t\tif( $time->has( \"tl:end\" ) )\n\t\t{\n\t\t\t$str .= \" - \".formatTime($time->getString( \"tl:end\" ), $date);\n\t\t}\n\t\t$str .= \"</div>\\n\";\n\t\t$str .= \"<span style='display:none' itemprop='startDate'>\".$time->getString( \"tl:start\" ).\"</span>\";\n\t\tif( $time->has( \"tl:end\" ) )\n\t\t{\n\t\t\t$str .= \"<span style='display:none' itemprop='endDate'>\".$time->getString( \"tl:end\" ).\"</span>\";\n\t\t}\n\t}\n\t$str .= getEventPlaces($event, \"Place\");\n\t$str .= getEventPlaces($event, \"Additional Place Info\");\n\t$organisers = getEventAgents($event, \"Organiser\");\n\tif(count($organisers) > 0)\n\t{\n\t\tsort($organisers);\n\t\t$str .= \"\\t\\t\\t<div class='organisers'>Organised by: \";\n\t\tforeach($organisers as $organiser)\n\t\t{\n\t\t\t$str .= $organiser.\" \";\n\t\t}\n\t\t$str .= \"</div>\\n\";\n\t}\n\t$str .= \"\\t\\t</div>\\n\";\n\t//$str .= \"\\t<div style='clear:left'></div>\\n\";\n\t$speakers = getEventAgents($event, \"Speaker\");\n\tif(count($speakers) > 0)\n\t{\n\t\t$str .= \"\\t\\t<div class='speakers'>Speaker\".((count($speakers) > 1) ? \"s\" : \"\").\": \";\n\t\tforeach($speakers as $speaker)\n\t\t{\n\t\t\t$str .= $speaker.\" \";\n\t\t}\n\t\t$str .= \"</div>\\n\";\n\t}\n\tif( $event->has( \"dct:description\" ) )\n\t{\n\t\t$str .= \"\\t\\t<div class='description' itemprop='description'>\".$event->getString( \"dct:description\" ).\"</div>\\n\";\n\t}\n\t$str .= \"\\t\\t<div style='clear:both'></div>\\n\";\n\t$str .= \"\\t</div>\\n\";\n\t$str .= \"</div>\\n\";\n\treturn $str;\n}", "function insert_events( $events ){\n\t// Informationen zu den Events holen\n\t$results = eventoni_fetch('',false,$events);\n\n\t// Falls keine Informationen zu Events gefunden, aus Methode rausspringen\n\tif( $results['total'] <= 0 )\n\t{\n\t\treturn;\n\t}\n\n\t// HTML Code erstellen\n\t$result = '';\n\t$result.= '<div class=\"events-container\">';\n\t$result.= '<img src=\"'.get_bloginfo('wpurl').'/wp-content/plugins/eventoni-events/img/logo.png\" />';\n\n\t// Jedes Event durchlaufen\n\tforeach($results['xml'] as $event)\n\t{\n\t\t// Berechnung der Zeitangabe und Tageszeit als Wort\n\t\t$datetime = strtotime($event->start_date.' '.$event->start_time);\n\t\t$hours = getdate($datetime);\n\t\t$hour = $hours['hours'];\n\t\t$tageszeit = '';\n\t\tif( $hour < 6 ){\n\t\t\t$tageszeit = 'nachts';\n\t\t} else if( $hour < 12 ){\n\t\t\t$tageszeit = 'morgens';\n\t\t} else if( $hour < 14 ){\n\t\t\t$tageszeit = 'mittags';\n\t\t} else if( $hour < 18 ){\n\t\t\t$tageszeit = 'nachmittags';\n\t\t} else if( $hour < 22 ){\n\t\t\t$tageszeit = 'abends';\n\t\t} else {\n\t\t\t$tageszeit = 'nachts';\n\t\t}\n\t\t$result.= ' <div class=\"event-item\">';\n\t\t$result.= '<a class=\"event-item-link\" href=\"'.$event->permalink.'\">';\n\n\t\t// Falls kein Vorschaubild vorhanden, nehme Standardbild\n\t\tif(isset($event->media_list->media->thumbnail_url)) {\n\t\t\t$result.= '<img width=\"60px\" height\"60px\" align=\"left\" src=\"'.$event->media_list->media->thumbnail_url.'\"/>';\n\t\t} else {\n\t\t\t$result.= '<img width=\"60px\" height\"60px\" align=\"left\" src=\"http://static.eventoni.com/images/image-blank.png\"/>';\n\t\t}\n\t\t$result.= '</a>';\n\t\t$result.= '\t <div class=\"event-item-content\">';\n\t\t$result.= '\t\t<div class=\"event-item-content-date\">'.date( \"d.m.Y\", $datetime ).', '.date( \"H:i \\U\\h\\\\r\", $datetime ).'</div>';\n\t\t$result.= '\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$result.= '\t </div>';\n\t\t$result.= '\t <div class=\"event-item-content-name\"><b><a class=\"event-item-link\" href=\"'.$event->permalink.'\">'.$event->title.'</a></b></div>';\n\t\t$result.= '<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$result.= '<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$result.= ' </div>';\n\n\t}\n\t$result.= '</div>';\n\n\t// HTML code zurückgeben\n\treturn $result;\n}", "function draw_calendar($month,$year,$events = array()){\n\t\t$dayofweek = array('<td class=\"calendar-header\">Sunday</td>',\n\t\t'<td class=\"calendar-header\">Monday</td>',\n\t\t'<td class=\"calendar-header\">Tuesday</td>',\n\t\t'<td class=\"calendar-header\">Wednesday</td>',\n\t\t'<td class=\"calendar-header\">Thursday</td>',\n\t\t'<td class=\"calendar-header\">Friday</td>',\n\t\t'<td class=\"calendar-header\">Saturday</td>');\n\t\t\n\t\t/* draw table\n\t\t\t- fill top row with array using implode */\n\t\t$calendar = '<table class=\"calendar\"><tr class=\"calendar-row\">'.implode($dayofweek).'</tr>';\n\t\t\n\t\t// mktime(hour,minute,second,month,day,year);\n\t\t// figures out the which day of the week 1st is based on provided $month and $year\n\t\t$startDay = date('w',mktime(0,0,0,$month,1,$year)); // return days of the week\n\t\t$days = cal_days_in_month(CAL_GREGORIAN,$month,$year);\n\t\t$daysFilled;\n\t\t$counter = 0;\n\t\n\t\t/* row 2 */\n\t\t$calendar.= '<tr class=\"calendar-row\">';\n\t\n\t\t/* print \"blank\" days until the first of the month */\n\t\tfor($i = 0; $i < $startDay; $i++){\n\t\t\t$calendar.= '<td class=\"calendar-empty\"> </td>';\n\t\t\t$daysFilled++;\n\t\t}\n\t\n\t\t/* for loop to add days */\n\t\tfor($i = 1; $i <= $days; $i++):\n\t\t\t$calendar.= '<td class=\"calendar-day\"><div style=\"position:relative;height:100px;\"><div class=\"date\">'.$i.'</div>';\n\t\t\t\n\t\t\tif ($i < 10){\n\t\t\t\t$i = \"0\".$i;\n\t\t\t}\n\t\t\t\n\t\t\t// input event into calendar\n\t\t\t$eventDay = $year.'-'.$month.'-'.$i;\n\t\t\t\tif(isset($events[$eventDay])) { // if there are events on $eventDay\n\t\t\t\t\tforeach($events[$eventDay] as $eventid) { // for each event, add to calendar\n\t\t\t\t\t\t$mysql = new mysql();\n\t\t\t\t\t\t$tripdetail = $mysql->get_specifictrip($eventid);\n\t\t\t\t\t\t$calendar.= '<div class=\"event\"';\n\t\t\t\t\t\tif($tripdetail[approval]==0){\n\t\t\t\t\t\t\t$calendar.=' style=\"color:#FF6666;\"';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif($tripdetail[approval]==-1){\n\t\t\t\t\t\t\t$calendar.=' style=\"color:#6666E0; text-decoration:line-through;\"';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$calendar.='><a style=\"text-decoration:none; color:inherit;\" href=\"?page=detail2&trip='.$tripdetail[eventid].'\"';\n\t\t\t\t\t\t$calendar.='>'.$tripdetail[destination].'</div>';\n\t\t\t\t\t}\n\t\t\t\t\t$calendar.='</td>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse {\n\t\t\t\t\t$calendar.= '<p> </p><p> </p></div></td>';\n\t\t\t\t}\n\n\t\t\tif($startDay == 6){ // if the month starts on Saturday, end current row\n\t\t\t\t$calendar.= '</tr>';\n\t\t\t\tif(($counter+1) != $days){ // if there are still days left to fill, new row\n\t\t\t\t\t$calendar.= '<tr class=\"calendar-row\">';\n\t\t\t\t}\n\t\t\t\t$startDay = -1;\n\t\t\t\t$daysFilled = 0;\n\t\t\t}\n\t\t\t$daysFilled++;\n\t\t\t$startDay++;\n\t\t\t$counter++;\n\t\tendfor;\n\t\n\t\t// finish filling in the rest of the days with blanks\n\t\tif($daysFilled < 8 && $daysFilled !=1):\n\t\t\tfor($x = 1; $x <= (8 - $daysFilled); $x++):\n\t\t\t\t$calendar.= '<td class=\"calendar-empty\"> </td>';\n\t\t\tendfor;\n\t\tendif;\n\t\n\t\t// end row, table\n\t\t$calendar.= '</tr></table>';\n\t\t\n\t\t\n\t\t// return HTML code for calendar\n\t\treturn $calendar;\n\t}", "public function buildCalendar(){\n\n\t\t$first_day = $this->getFirstDay();\t\t\t\t\t\t//Determine what day of the week the month starts on\n\t\t$current_number_of_days = $this->getNumberOfDays();\t\t//Determine the number of days in the month\n\n\t\t$number_of_previous_days = $first_day;\t\t\t\t\t\t\t\t\t\t//Determine the number of days needed to complete the first week\n\t\t$prev_month_number_of_days = $this->getNumberOfDays($this->getMonth()-1); \t//Determine the number of days in the previous month\n\t\t\n\t\t$_SESSION['month'] = $this->getMonth();\n\t\t$_SESSION['year'] = $this->getYear();\n\t\t$_SESSION['view'] = 'calendar';\n\n\t\tob_start();?>\n <table border=\"0\" id=\"events_calendar\">\n <?php echo $this->buildCalendarHead() ?>\n <tr id=\"events_calendar_weekdays\">\n <th>\n\t\t\t\t\t<div class=\"full_week_name\">Sunday</div>\n\t\t\t\t\t<div class=\"short_week_name\">Sun</div>\n\t\t\t\t\t<div class=\"abrev_week_name\">S</div>\n </th>\n <th>\n\t\t\t\t\t<div class=\"full_week_name\">Monday</div>\n\t\t\t\t\t<div class=\"short_week_name\">Mon</div>\n\t\t\t\t\t<div class=\"abrev_week_name\">M</div>\n </th>\n <th>\n\t\t\t\t\t<div class=\"full_week_name\">Tuesday</div>\n\t\t\t\t\t<div class=\"short_week_name\">Tue</div>\n\t\t\t\t\t<div class=\"abrev_week_name\">T</div>\n </th>\n <th>\n\t\t\t\t\t<div class=\"full_week_name\">Wednesday</div>\n\t\t\t\t\t<div class=\"short_week_name\">Wed</div>\n\t\t\t\t\t<div class=\"abrev_week_name\">W</div>\n </th>\n <th>\n\t\t\t\t\t<div class=\"full_week_name\">Thursday</div>\n\t\t\t\t\t<div class=\"short_week_name\">Thu</div>\n\t\t\t\t\t<div class=\"abrev_week_name\">T</div>\n </th>\n <th>\n\t\t\t\t\t<div class=\"full_week_name\">Friday</div>\n\t\t\t\t\t<div class=\"short_week_name\">Fri</div>\n\t\t\t\t\t<div class=\"abrev_week_name\">F</div>\n </th>\n <th>\n\t\t\t\t\t<div class=\"full_week_name\">Saturday</div>\n\t\t\t\t\t<div class=\"short_week_name\">Sat</div>\n\t\t\t\t\t<div class=\"abrev_week_name\">S</div>\n </th>\n </tr>\n <?php\n $dayCounter = 0;\t\t\t\t\t\t\t\t\t\t\t//Keeps count of the days in a week\n\n /*** PREVIOUS MONTH CELLS ***/\n for($day = $number_of_previous_days; $day >= 1; $day--){\t//For each day in the previous month needed for a full week\n $dayNumber = $prev_month_number_of_days - ($day-1);\t\t\n \n //Get full date (YYYY-MM-DD)\n $year = ($this->getPrevMonth() == 12)? ($this->getYear()-1): $this->getYear();\n $full_date = $year . '-' . $this->getPrevMonth() . '-' . $dayNumber;\n \n $dayCounter ++;\n if($dayCounter == 1){\t\t\t\t\t//Start new row\n echo '<tr>';\n }\n \n echo $this->buildCalendarCell($full_date, $dayNumber, 'prev_month');\t//Create Calendar Cell\n\n if($dayCounter == 7){\t\t\t\t\t//End new row\n echo '</tr>';\n $dayCounter = 0;\n }\n }\n\n /*** CURRENT MONTH CELLS ***/\n for($day = 1; $day <= $current_number_of_days; $day++){\t\t//For each day in the current month\n $full_date = $this->getYear() . '-' . $this->getMonth() . '-' . $day;\n $dayCounter ++;\n if($dayCounter == 1){\t\t\t\t\t//Start new row\n echo '<tr>';\n }\n\n echo $this->buildCalendarCell($full_date, $day, 'current_month');\t//Create Calendar Cell\n\n if($dayCounter == 7){\t\t\t\t\t//End new row\n echo '</tr>';\n $dayCounter = 0;\n }\n }\n\n /*** NEXT MONTH CELLS ***/\n for($day = 1; $day <= $dayCounter; $day++){\t//For each day in the current month\n //Get full date (YYYY-MM-DD)\n $year = ($this->getNextMonth() == 1)? ($this->getYear()+1): $this->getYear();\n $full_date = $year . '-' . $this->getNextMonth() . '-' . $day;\n \n $dayCounter ++;\n if($dayCounter == 1){\t\t\t\t\t//Start new row\n echo '<tr>';\n }\n\n echo $this->buildCalendarCell($full_date, $day, 'next_month');\t//Create Calendar Cell\n\n if($dayCounter == 7){\t\t\t\t\t//End new row\n echo '</tr>';\n $dayCounter = 0;\n }\n }\n ?>\n </table>\n <style>\n\t\t\t<?php \n\t\t\tforeach($this->getCategories() as $c){?>\n\t\t\t#events_calendar .event.category_<?php echo $c->getId(); ?>:before{color: <?php echo $c->getColor(); ?> !important;}\n\t\t\t<?php } ?>\n\t\t</style>\n <?php\n\t\treturn ob_get_clean();\n\t}", "public function drawSpecificItem($item){\r\n \tif (! $this->id) {\r\n \t\t//return;\r\n \t}\r\n $today=date('Y-m-d');\r\n \tglobal $bankHolidays,$bankWorkdays;\r\n //$result=\"<br/>\";\r\n $result=\"\";\r\n if ($item=='calendarView') { \t\r\n if ($this->year) {\r\n $y=$this->year;\r\n } else {\r\n \t$y=date('Y');\r\n }\r\n //echo $y.'#'.$this->idCalendarDefinition;\r\n //if (! isset($bankWorkdays[$y.'#'.$this->idCalendarDefinition])) {return;\t}\r\n if (! $this->idCalendarDefinition) { return;}\r\n $result .='<table >';\r\n $result .='<tr><td class=\"calendarHeader\" colspan=\"32\">' .$y . '</td></tr>';\r\n for ($m=1; $m<=12; $m++) {\r\n \t$mx=($m<10)?'0'.$m:''.$m;\r\n \t$time=mktime(0, 0, 0, $m, 1, $y);\r\n $libMonth=i18n(strftime(\"%B\", $time));\r\n \t$result .= '<tr style=\"height:30px\">';\r\n \t$result .= '<td class=\"calendar\" style=\"background:#F0F0F0; width: 150px;\">' . $libMonth . '</td>';\r\n \tfor ($d=1;$d<=date('t',strtotime($y.'-'.$mx.'-01'));$d++) {\r\n \t\t$dx=($d<10)?'0'.$d:''.$d;\r\n \t\t$day=$y.'-'.$mx.'-'.$dx;\r\n \t\t$iDay=strtotime($day);\r\n \t\t$isOff=isOffDay($day,$this->idCalendarDefinition);\r\n \t\t$style='';\r\n \t\tif ($day==$today) {\r\n \t\t\t$style.='font-weight: bold; font-size: 9pt;';\r\n \t\t}\r\n \t\tif (in_array (date ('Ymd', $iDay), $bankWorkdays[$y.'#'.$this->idCalendarDefinition])) {\r\n \t\t\t$style.='color: #FF0000; background: #FFF0F0;';\r\n \t\t} else if (in_array (date ('Ymd', $iDay), $bankHolidays[$y.'#'.$this->idCalendarDefinition])) {\r\n $style.='color: #0000FF; background: #D0D0FF;';\r\n } else {\r\n $style.='background: ';\r\n \t$style.=($isOff)?'#DDDDDD;':'#FFFFFF;';\r\n }\r\n \t\t$result.= '<td class=\"calendar\" style=\"'.$style.'\">';\r\n \t\t$result.= '<div style=\"cursor: pointer;\" onClick=\"loadContent(\\'../tool/saveCalendar.php?idCalendarDefinition='.$this->idCalendarDefinition.'&day='. $day . '\\',\\'CalendarDefinition_Calendar\\');\">';\r\n \t\t$result.= substr(i18n(date('l',$iDay)),0,1) . $d ;\r\n \t\t$result.= '</div>';\r\n \t\t$result.= '</td>';\r\n \t}\r\n \t$result .= '</tr>';\r\n }\r\n $result .='</table>';\r\n return $result;\r\n }\r\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}", "function display() {\n\t\t$events = $this->events;\n\t\tif (!$events) return '';\n\t\t$olddate = '';\n\t\t$displaystring .= '<div class=\"gw-post\">';\n\n\t\tforeach($events as $event) {\n\t\t\t$start = $event['starttime'];\n\t\t\t// check for new dates\n\t\t\t$newdate = date('l, n/j/y', $start);\n\t\t\tif (strcmp($newdate, $olddate)) {\n\t\t\t\t// $newdate != $olddate\n\t\t\t\t$displaystring .= '<div class=\"gw-date-wrap\"><div class=\"gw-date\">' . $newdate . '</div></div>';\n\t\t\t\t$olddate = $newdate;\n\t\t\t}\n\t\t\tif ($event['isfeatured']) {\n\t\t\t $displaystring .= '<div class=\"gw-featured\">';\n\t\t\t}\n\t\t\tif ($event['post_link']) {\n\t\t\t $displaystring .= '<a href=\"'.$event['post_link'].'\">';\n\t\t\t}\n\t\t\t$displaystring .= '<div class=\"gw-event ' . $event['tag'] . '\">';\n\t\t\t$displaystring .= '<span class=\"gw-bullet\">&nbsp;</span><div class=\"gw-time\">' . date('g:i a', $start) . '</div>';\n\t\t\t$displaystring .= '<div class=\"gw-title\">' . $event['title'];\n\t\t\tif ($event['location']) {\n\t\t\t\t$displaystring .= ' @ ' . $event['location'] . $this->displayMap($event['address']);\n\t\t\t}\n\t\t\t$displaystring .= '</div>'; //close .gw-title\n\t\t\t$displaystring .= '</div>'; // close .gw-event \n\t\t\tif ($event['post_link']) {\n\t\t\t $displaystring .= '</a>';\n\t\t\t}\n\t\t\tif ($event['isfeatured']) {\n\t\t\t $displaystring .= '</div>';\n\t\t\t}\n\t\t\t\n\n\t\t} // end foreach\n\t\t\n\t\t$displaystring .= '</div>'; // close .textwidget\n\t\treturn $displaystring;\n\t}", "function output_calendar() // Generating calendar HTML content\r\n\t{\r\n\t\t# Apparently, it's not possible to dereference $this->callback()\r\n\t\t$cb = $this->callback;\r\n\r\n\t\t# Preliminary calculations\r\n\t\t$t = getdate(strtotime($this->date));\r\n\t\t$today = $t[\"mday\"];\r\n\t\t$year = $t[\"year\"];\r\n\t\t$month = $t[\"mon\"];\r\n\t\t# Get first day of the month (monday = 0)\r\n\t\t$first_wday = ((int) date(\"w\", mktime(0, 0, 0, $month, 1, $year))+6)%7;\r\n\t\t# Last day of the month\r\n\t\t$last_mday = (int) date(\"d\", mktime(0, 0, 0, $month+1, 0, $year));\r\n\r\n\t\t# Anchor\r\n\t\t//$this->content[].=\"<a name=\\\"calendar\\\">\";\r\n\r\n\t\t# Table\r\n\t\t$this->content[].=\"<table width=\\\"100%\\\" align=\\\"center\\\" cellpadding=\\\"0\\\" cellspacing=\\\"2\\\" class=\\\"calendar\\\">\\n\";\r\n\r\n\t\t# Table head\r\n\t\t$this->content[].=\"<tr><td colspan=\\\"7\\\" class=\\\"calendar_header\\\">{$this->month_name[$month - 1]}&nbsp;&nbsp;&nbsp;{$t['year']}</td></tr>\\n<tr>\\n\";\r\n\t\tfor ($j = 0;$j <= 6;$j++) {\r\n\t\t\t$this->content[].=\"<th class=\\\"calendar_title\\\">\";\r\n\t\t\t$this->content[].=\"{$this->day_name[$j]}\";\r\n\t\t\t$this->content[].=\"</th>\\n\";\r\n\t\t}\r\n\t\t$this->content[].=\"</tr>\\n\";\r\n\r\n\t\t// Day row\r\n\t\t// A month is displayed on 6 rows\r\n\t\t// except for a 28 days month starting on Monday\r\n\t\tif (($last_mday == 28) and ($first_wday == 0))\r\n\t\t$jmax = 27;\r\n\t\telse\r\n\t\t$jmax = 41;\r\n\r\n\t\tfor ($j = 0;$j <= $jmax;$j++) {\r\n\t\t\t# Start new row on Monday\r\n\t\t\tif ($j % 7 == 0)\r\n\t\t\t$this->content[].=\"<tr>\\n\";\r\n\r\n\t\t\t// Title colour for current day and checking week end days\r\n\r\n\t\t\tif (($j == $today+$first_wday-1) and ($j % 7 == 6)) // if today and weekend day\r\n\t\t\t$this->content[].=\"<td class=\\\"calendar_title_we\\\">\";\r\n\r\n\t\t\tif (($j % 7 == 6) and ($j != $today+$first_wday-1)) // if weekend day and not today\r\n\t\t\t$this->content[].=\"<td class=\\\"calendar_day_we\\\">\";\r\n\r\n\r\n\t\t\tif (($j == $today+$first_wday-1) and ($j % 7 != 6)) // if today and not weekend day\r\n\t\t\t$this->content[].=\"<td class=\\\"calendar_title\\\">\";\r\n\r\n\t\t\tif (($j % 7 != 6) and ($j != $today+$first_wday-1)) // if not today and not weekend day\r\n\t\t\t$this->content[].=\"<td class=\\\"calendar_day\\\">\";\r\n\r\n\t\t\tif (($j<$first_wday) or ($j>=$last_mday + $first_wday)) {\r\n\r\n\t\t\t\t# Empty boxes\r\n\t\t\t\t$this->content[].=\"&nbsp;\";\r\n\t\t\t} else {\r\n\t\t\t\tif (isset($cb))\r\n\t\t\t\techo $cb(mktime(0, 0, 0, $month, $j - $first_wday + 1, $year));\r\n\t\t\t\t$this->content[].=date($this->date_format, mktime(0, 0, 0, $month, $j - $first_wday + 1, $year));\r\n\t\t\t\tif (isset($cb))\r\n\t\t\t\t$this->content[].=\"</a>\\n\";\r\n\t\t\t}\r\n\t\t\t$this->content[].=\"</td>\\n\";\r\n\r\n\t\t\t# End of row on Sunday\r\n\t\t\tif ($j % 7 == 6)\r\n\t\t\t$this->content[].=\"</tr>\\n\";\r\n\t\t}\r\n\t\t$this->content[].=\"</table>\\n\";\r\n\t}", "public function index() {\n $events[] = \\Calendar::event(\n 'Event One', //event title\n false, //full day event?\n '2016-04-01T0800', //start time (you can also use Carbon instead of DateTime)\n '2016-04-01T1200', //end time (you can also use Carbon instead of DateTime)\n 0 //optionally, you can specify an event ID\n );\n \n //$eloquentEvent = EventModel::first(); //EventModel implements MaddHatter\\LaravelFullcalendar\\Event \n\n \n $calendar = \\Calendar::addEvents($events) //add an array with addEvents\n ->setOptions([ //set fullcalendar options\n 'firstDay' => 1\n ])->setCallbacks([ //set fullcalendar callback options (will not be JSON encoded)\n 'viewRender' => 'function() {alert(\"Callbacks!\");}'\n ]); \n \n \n return view('calendar', compact('calendar'));\n }", "public function showAction($day)\n {\n /** @var \\JWeiland\\Events2\\Domain\\Model\\Day $dayObject */\n $dayObject = $this->dayRepository->findByIdentifier($day);\n $dayObject->getEvents(\n GeneralUtility::trimExplode(',', $this->settings['categories'], true),\n $this->getStoragePids()\n );\n $this->view->assign('day', $dayObject);\n }", "function ajax_event_table_basic($db, $eventID)\r\n{\r\n?>\r\n<table class='pizzaOrder'>\r\n<tr>\r\n\t<td class='MANheader' width='600px' colspan='2'>\r\n\t&nbsp;&nbsp;Current Events: \r\n\t<font size=\"2\" class=\"subtitle\">Click on an event to see more information below</font></td>\r\n</tr>\r\n\r\n<?php\r\n$query = \"SELECT * FROM event WHERE startDate >= CURDATE() AND event_started != 2 ORDER BY startDate ASC\";\r\n$result = $db->query($query);\r\nif ($result->num_rows == 0)\r\n{\r\n\techo '<tr><td><i>There are no current events in the system</i></td></tr>';\r\n\tdie();\r\n}\r\n\r\n\r\n// Now we can output the option fields to populate the list box.\r\nfor ($i=0; $i<$result->num_rows; $i++) \r\n{\r\n\t$row = $result->fetch_assoc(); \r\n\r\n\techo '<tr class=\"pointer\" id=\"eventRow_'.$i.'\" onclick=\"getEvent('.$row[\"eventID\"].')\">';\r\n\t\techo '<td width=\"70px\">';\r\n\t\t\techo '<div style=\"position: relative; top: 5px;\">';\r\n\t\t?>\r\n\t\t\t<!-- // DELETE EVENT BUTTON -->\r\n\t\t\t<img class=\"pointer\"\r\n\t\t\t\tsrc=\"../images/buttons/delete_60.png\"';\r\n\t\t\t\talt=\"Delete this event\" \r\n\t\t\t\tonclick=\"deleteEvent(<?php echo $row[\"eventID\"]; ?>, '<?php echo $row[\"event_name\"]; ?>')\" />\r\n\t\t<?php\r\n\t\t\techo '</div>';\r\n\t\techo '</td>';\r\n\t\techo '<td>';\r\n\t\t\techo $row['event_name'];\r\n\t\t\techo '&nbsp;-&nbsp;<font size=\"1\">['.dateToScreen($row['startDate']).']</font>';\r\n\t\techo '</td>';\r\n\techo '</tr>';\r\n}\r\necho '</table>';\r\n?>\r\n\r\n\r\n\r\n\r\n\r\n<?php\r\n\t//Create the general select query.\r\n $query = \"SELECT * FROM event WHERE startDate >= CURDATE() AND eventID=\".$eventID.\";\"; \t\r\n $result = $db->query($query); \t\t\t\r\n\r\n\r\n\t//use it first for the title\t\r\n $row1 = $result->fetch_array(MYSQLI_BOTH);\t\t\r\n\t\r\n\t//then close it ready for the next execution\r\n $result->close();\t\t\t\t\t\t\t\t\r\n $result = $db->query($query); \t\r\n\r\n\r\n\techo '<br />';\r\n\r\n\r\necho '<table class=\"pizzaOrder\">';\r\n $on = 'this.src=\"../images/buttons/edit_dwn.png\"';\r\n $off = 'this.src=\"../images/buttons/edit_up.png\"';\r\n\r\n echo '<tr>';\r\n\t\techo '<td colspan=\"2\" id=\"headCell_left\">&nbsp;&nbsp;';\r\n\t\techo '<font class=\"subtitle\" style=\"font-size: 14pt;\">'.$row1['event_name'].'</font></td>';\r\n\t\techo '<td id=\"headCell_right\">';\r\n\t\techo '<img class=\"button\" src=\"../images/buttons/edit_dwn.png\"';\r\n\t\t\techo 'alt=\"Edit The Selected Event\" onclick=\"editEvent('.$row1['eventID'].')\"';\r\n\t\t\techo 'onmouseover='.$off.' onmouseout='.$on.' /></td>';\r\n\techo '</tr>';\r\n\r\n\t\t\t\t\t\r\n\t//While Loop starts here - \r\n\t// Retrieve the data for the table. There should only be one row.\r\n\twhile($row = $result->fetch_assoc())\r\n\t{\r\n\t\techo '<tr>';\r\n\t\t\techo '<td width=\"150px\"><b>Event Location: </b></td>';\r\n\t\t\techo '<td>'.$row['event_location'].'</td>';\r\n\t\t\techo '<td>&nbsp;</td>';\r\n\t\techo '</tr>';\r\n\r\n\t\techo '<tr>';\r\n\t\t\techo '<td><b>Start Date: </b></td>';\r\n\t\t\techo '<td>'.dateToScreen($row['startDate']).'</td>';\r\n\t\t\techo '<td></td>';\r\n\t\techo '</tr>';\r\n\r\n\t\techo '<tr>';\r\n\t\t\techo '<td><b>Day Count: </b></td>';\r\n\t\t\techo '<td>'.$row['days'].'</td>';\r\n\t\t\techo '<td></td>';\r\n\t\techo '</tr>';\r\n\r\n\t\techo '<tr>';\r\n\t\t\techo '<td><b>Start Time: </b></td>';\r\n\t\t\techo '<td>'.$row['startTime'].'</td>';\r\n\t\t\techo '<td></td>';\r\n\t\techo '</tr>';\r\n\r\n\t\techo '<tr>';\r\n\t\t\techo '<td><b>Server IP Address: </b></td>';\r\n\t\t\techo '<td>'.$row['server_IP_address'].'</td>';\r\n\t\t\techo '<td></td>';\r\n\t\techo '</tr>';\r\n\r\n\t\techo '<tr>';\r\n\t\t\techo '<td><b>Number of Seats: </b></td>';\r\n\t\t\techo '<td>'.$row['seatQuantity'].'</td>';\r\n\t\t\techo '<td></td>';\r\n\t\techo '</tr>';\r\n\r\n\t\t$on = 'this.src=\"../images/buttons/stop_dwn.png\"';\r\n\t\t$off = 'this.src=\"../images/buttons/stop.png\"';\r\n\t\t\r\n\t\t$on1 = 'this.src=\"../images/buttons/start_dwn.png\"';\r\n\t\t$off1 = 'this.src=\"../images/buttons/start.png\"';\r\n\r\n\t\t// If the event has started place the stop event button in the table.\r\n\t\tif($row['event_started'] == 1) \r\n\t\t{\r\n\t\t\techo '<tr>';\r\n\t\t\techo '<td><b>Event Started: </b></td>';\r\n\t\t\techo '<td>Yes</td>';\r\n\t\t\techo '<td><img src=\"../images/buttons/stop_dwn.png\" class=\"button\"'; \r\n\t\t\t\techo 'alt=\"Stop the current event.\" onclick=\"stopEvent(' . $row['eventID'] . ')\" ';\r\n\t\t\t\techo 'onmouseover='.$off.' onmouseout='.$on.' /></td>';\r\n\t\t\techo '</tr>';\r\n\t\t}\r\n\t\t// If the event has not started place the start event button in the table. \r\n\t\t\r\n\r\n\t\t\r\n\t\telseif ($row['event_started'] == 0)\r\n\t\t{\r\n\t\t\techo '<tr>';\r\n\t\t\t\techo '<td><b>Event Started: </b></td>';\r\n\t\t\t\techo '<td>No</td>';\r\n\t\t\t\techo '<td><img src=\"../images/buttons/start_dwn.png\" class=\"button\"';\r\n\t\t\t\t\techo 'alt=\"Start the selected event. Stops all others.\" onclick=\"startEvent(' . $row['eventID'] . ')\"'; \r\n\t\t\t\t\techo 'onmouseover='.$off1.' onmouseout='.$on1.' /></td>';\r\n\t\t\techo '</tr>';\r\n\t\t}\r\n\t\t// If the event has completed or been stopped. \r\n\t\telseif ($row['event_started'] == 2)\r\n\t\t{\r\n\t\t\techo '<tr>';\r\n\t\t\t\techo '<td><b>Event Started: </b></td>';\r\n\t\t\t\techo '<td>Finished</td>';\r\n\t\t\t\techo '<td>&nbsp;</td>';\r\n\t\t\techo '</tr>';\r\n\t\t}\r\n\t}\r\necho '</table>';\r\n}", "public function listing() {\n check_access($this->session->userdata('role_id'),3);\n \n $data = array();\n $data['title'] = \"Day Listings\";\n $data['content'] = \"admin/dayopenclose/listing\";\n $this->load->view(ADMIN_BODY, $data);\n }", "public function index()\n {\n $events = Evenement::orderBy('created_at', 'desc')->paginate(10);\n return view('user.events.index')->with(compact('events' ) );\n }", "public function eventsList()\n {\n $alumniId = session('alumni_id');\n $alumni = AlumniBasicInfo::find($alumniId);\n $events = Event::where('dept_info_id',$alumni->dept_info_id)->latest()->paginate(3);\n return view('frontend.events.events-list',compact('events'));\n }", "function show_day_events2($username, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint=0, $maxnbofchar=16, $newparam='', $showinfo=0, $minheight=60, $showheader=false, $colorsbytype=array(), $var=false)\n{\n\tglobal $db;\n\tglobal $user, $conf, $langs, $hookmanager, $action;\n\tglobal $filter, $filtert, $status, $actioncode;\t// Filters used into search form\n\tglobal $theme_datacolor;\t// Array with a list of different we can use (come from theme)\n\tglobal $cachethirdparties, $cachecontacts, $colorindexused;\n\tglobal $begin_h, $end_h;\n\n\t$cases1 = array();\t// Color first half hour\n\t$cases2 = array(); // Color second half hour\n\n\t$curtime = dol_mktime(0, 0, 0, $month, $day, $year);\n\n\t$i=0; $nummytasks=0; $numother=0; $numbirthday=0; $numical=0; $numicals=array();\n\t$ymd=sprintf(\"%04d\",$year).sprintf(\"%02d\",$month).sprintf(\"%02d\",$day);\n\n\t$nextindextouse=count($colorindexused);\t// At first run, this is 0, so fist user has 0, next 1, ...\n\t//if ($username->id && $day==1) var_dump($eventarray);\n\n\t// We are in a particular day for $username, now we scan all events\n\tforeach ($eventarray as $daykey => $notused)\n\t{\n\t\t$annee = date('Y',$daykey);\n\t\t$mois = date('m',$daykey);\n\t\t$jour = date('d',$daykey);\n\t\t//print $annee.'-'.$mois.'-'.$jour.' '.$year.'-'.$month.'-'.$day.\"<br>\\n\";\n\n\t\tif ($day==$jour && $month==$mois && $year==$annee)\t// Is it the day we are looking for when calling function ?\n\t\t{\n\t\t\t// Scan all event for this date\n\t\t\tforeach ($eventarray[$daykey] as $index => $event)\n\t\t\t{\n\t\t\t\t//var_dump($event);\n\n\t\t\t\t$keysofuserassigned=array_keys($event->userassigned);\n\t\t\t\tif (! in_array($username->id,$keysofuserassigned)) continue;\t// We discard record if event is from another user than user we want to show\n\t\t\t\t//if ($username->id != $event->userownerid) continue;\t// We discard record if event is from another user than user we want to show\n\n\t\t\t\t$parameters=array();\n\t\t\t\t$reshook=$hookmanager->executeHooks('formatEvent',$parameters,$event,$action); // Note that $action and $object may have been modified by some hooks\n\t\t\t\tif ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');\n\n\t\t\t\t$ponct=($event->date_start_in_calendar == $event->date_end_in_calendar);\n\n\t\t\t\t// Define $color (Hex string like '0088FF') and $cssclass of event\n\t\t\t\t$color=-1; $cssclass=''; $colorindex=-1;\n\t\t\t\tif (in_array($user->id, $keysofuserassigned))\n\t\t\t\t{\n\t\t\t\t\t$nummytasks++; $cssclass='family_mytasks';\n\t\t\t\t\tif (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) $color=$event->type_color;\n\t\t\t\t}\n\t\t\t\telse if ($event->type_code == 'ICALEVENT')\n\t\t\t\t{\n\t\t\t\t\t$numical++;\n\t\t\t\t\tif (! empty($event->icalname))\n\t\t\t\t\t{\n\t\t\t\t\t\tif (! isset($numicals[dol_string_nospecial($event->icalname)])) {\n\t\t\t\t\t\t\t$numicals[dol_string_nospecial($event->icalname)] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$numicals[dol_string_nospecial($event->icalname)]++;\n\t\t\t\t\t}\n\n\t\t\t\t\t$color=$event->icalcolor;\n\t\t\t\t\t$cssclass=(! empty($event->icalname)?'family_ext'.md5($event->icalname):'family_other unsortable');\n\t\t\t\t}\n\t\t\t\telse if ($event->type_code == 'BIRTHDAY')\n\t\t\t\t{\n\t\t\t\t\t$numbirthday++; $colorindex=2; $cssclass='family_birthday unsortable'; $color=sprintf(\"%02x%02x%02x\",$theme_datacolor[$colorindex][0],$theme_datacolor[$colorindex][1],$theme_datacolor[$colorindex][2]);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$numother++; $cssclass='family_other';\n\t\t\t\t\tif (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) $color=$event->type_color;\n\t\t\t\t}\n\n\t\t\t\tif ($color < 0)\t// Color was not forced. Set color according to color index.\n\t\t\t\t{\n\t\t\t\t\t// Define color index if not yet defined\n\t\t\t\t\t$idusertouse=($event->userownerid?$event->userownerid:0);\n\t\t\t\t\tif (isset($colorindexused[$idusertouse]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$colorindex=$colorindexused[$idusertouse];\t// Color already assigned to this user\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$colorindex=$nextindextouse;\n\t\t\t\t\t\t$colorindexused[$idusertouse]=$colorindex;\n\t\t\t\t\t\tif (! empty($theme_datacolor[$nextindextouse+1])) $nextindextouse++;\t// Prepare to use next color\n\t\t\t\t\t}\n\t\t\t\t\t// Define color\n\t\t\t\t\t$color=sprintf(\"%02x%02x%02x\",$theme_datacolor[$colorindex][0],$theme_datacolor[$colorindex][1],$theme_datacolor[$colorindex][2]);\n\t\t\t\t}\n\t\t\t\t//$cssclass=$cssclass.' '.$cssclass.'_day_'.$ymd;\n\n\t\t\t\t// Define all rects with event (cases1 is first half hour, cases2 is second half hour)\n\t\t\t\tfor ($h = $begin_h; $h < $end_h; $h++)\n\t\t\t\t{\n\t\t\t\t\t//if ($username->id == 1 && $day==1) print 'h='.$h;\n\t\t\t\t\t$newcolor = ''; //init\n\t\t\t\t\tif (empty($event->fulldayevent))\n\t\t\t\t\t{\n\t\t\t\t\t\t$a = dol_mktime((int) $h,0,0,$month,$day,$year,false,0);\n\t\t\t\t\t\t$b = dol_mktime((int) $h,30,0,$month,$day,$year,false,0);\n\t\t\t\t\t\t$c = dol_mktime((int) $h+1,0,0,$month,$day,$year,false,0);\n\n\t\t\t\t\t\t$dateendtouse=$event->date_end_in_calendar;\n\t\t\t\t\t\tif ($dateendtouse==$event->date_start_in_calendar) $dateendtouse++;\n\n\t\t\t\t\t\t//print dol_print_date($event->date_start_in_calendar,'dayhour').'-'.dol_print_date($a,'dayhour').'-'.dol_print_date($b,'dayhour').'<br>';\n\n\t\t\t\t\t\tif ($event->date_start_in_calendar < $b && $dateendtouse > $a)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$busy=$event->transparency;\n\t\t\t\t\t\t\t$cases1[$h][$event->id]['busy']=$busy;\n\t\t\t\t\t\t\t$cases1[$h][$event->id]['string']=dol_print_date($event->date_start_in_calendar,'dayhour');\n\t\t if ($event->date_end_in_calendar && $event->date_end_in_calendar != $event->date_start_in_calendar)\n\t\t\t \t\t{\n\t\t\t\t \t\t$tmpa=dol_getdate($event->date_start_in_calendar,true);\n\t\t\t\t \t\t$tmpb=dol_getdate($event->date_end_in_calendar,true);\n\t\t\t\t \t\tif ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) $cases1[$h][$event->id]['string'].='-'.dol_print_date($event->date_end_in_calendar,'hour');\n\t\t\t\t \t\telse $cases1[$h][$event->id]['string'].='-'.dol_print_date($event->date_end_in_calendar,'dayhour');\n\t\t\t \t\t}\n\t\t\t\t\t\t\t$cases1[$h][$event->id]['string'].=' - '.$event->label;\n\t\t\t\t\t\t\t$cases1[$h][$event->id]['typecode']=$event->type_code;\n\t\t\t\t\t\t\tif ($event->socid)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//$cases1[$h][$event->id]['string'].='xxx';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$cases1[$h][$event->id]['color']=$color;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($event->date_start_in_calendar < $c && $dateendtouse > $b)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$busy=$event->transparency;\n\t\t\t\t\t\t\t$cases2[$h][$event->id]['busy']=$busy;\n\t\t\t\t\t\t\t$cases2[$h][$event->id]['string']=dol_print_date($event->date_start_in_calendar,'dayhour');\n\t\t\t\t\t\t\tif ($event->date_end_in_calendar && $event->date_end_in_calendar != $event->date_start_in_calendar)\n\t\t\t \t\t{\n\t\t\t\t \t\t$tmpa=dol_getdate($event->date_start_in_calendar,true);\n\t\t\t\t \t\t$tmpb=dol_getdate($event->date_end_in_calendar,true);\n\t\t\t\t \t\tif ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) $cases2[$h][$event->id]['string'].='-'.dol_print_date($event->date_end_in_calendar,'hour');\n\t\t\t\t \t\telse $cases2[$h][$event->id]['string'].='-'.dol_print_date($event->date_end_in_calendar,'dayhour');\n\t\t\t \t\t}\n\t\t\t\t\t\t\t$cases2[$h][$event->id]['string'].=' - '.$event->label;\n\t\t\t\t\t\t\t$cases2[$h][$event->id]['typecode']=$event->type_code;\n\t\t\t\t\t\t\tif ($event->socid)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//$cases2[$h][$event->id]['string'].='xxx';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$cases2[$h][$event->id]['color']=$color;\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$busy=$event->transparency;\n\t\t\t\t\t\t$cases1[$h][$event->id]['busy']=$busy;\n\t\t\t\t\t\t$cases2[$h][$event->id]['busy']=$busy;\n\t\t\t\t\t\t$cases1[$h][$event->id]['string']=$event->label;\n\t\t\t\t\t\t$cases2[$h][$event->id]['string']=$event->label;\n\t\t\t\t\t\t$cases1[$h][$event->id]['typecode']=$event->type_code;\n\t\t\t\t\t\t$cases2[$h][$event->id]['typecode']=$event->type_code;\n\t\t\t\t\t\t$cases1[$h][$event->id]['color']=$color;\n\t\t\t\t\t\t$cases2[$h][$event->id]['color']=$color;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$i++;\n\t\t\t}\n\n\t\t\tbreak;\t// We found the date we were looking for. No need to search anymore.\n\t\t}\n\t}\n\n\tfor ($h = $begin_h; $h < $end_h; $h++)\n\t{\n\t\t$color1='';$color2='';\n\t\t$style1='';$style2='';\n\t\t$string1='&nbsp;';$string2='&nbsp;';\n\t\t$title1='';$title2='';\n\t\tif (isset($cases1[$h]) && $cases1[$h] != '')\n\t\t{\n\t\t\t//$title1.=count($cases1[$h]).' '.(count($cases1[$h])==1?$langs->trans(\"Event\"):$langs->trans(\"Events\"));\n\t\t\tif (count($cases1[$h]) > 1) $title1.=count($cases1[$h]).' '.(count($cases1[$h])==1?$langs->trans(\"Event\"):$langs->trans(\"Events\"));\n\t\t\t$string1='&nbsp;';\n\t\t\tif (empty($conf->global->AGENDA_NO_TRANSPARENT_ON_NOT_BUSY)) $style1='peruser_notbusy';\n\t\t\telse $style1='peruser_busy';\n\t\t\tforeach($cases1[$h] as $id => $ev)\n\t\t\t{\n\t\t\t\tif ($ev['busy']) $style1='peruser_busy';\n\t\t\t}\n\t\t}\n\t\tif (isset($cases2[$h]) && $cases2[$h] != '')\n\t\t{\n\t\t\t//$title2.=count($cases2[$h]).' '.(count($cases2[$h])==1?$langs->trans(\"Event\"):$langs->trans(\"Events\"));\n\t\t\tif (count($cases2[$h]) > 1) $title2.=count($cases2[$h]).' '.(count($cases2[$h])==1?$langs->trans(\"Event\"):$langs->trans(\"Events\"));\n\t\t\t$string2='&nbsp;';\n\t\t\tif (empty($conf->global->AGENDA_NO_TRANSPARENT_ON_NOT_BUSY)) $style2='peruser_notbusy';\n\t\t\telse $style2='peruser_busy';\n\t\t\tforeach($cases2[$h] as $id => $ev)\n\t\t\t{\n\t\t\t\tif ($ev['busy']) $style2='peruser_busy';\n\t\t\t}\n\t\t}\n\n\t\t$ids1='';$ids2='';\n\t\tif (count($cases1[$h]) && array_keys($cases1[$h])) $ids1=join(',',array_keys($cases1[$h]));\n\t\tif (count($cases2[$h]) && array_keys($cases2[$h])) $ids2=join(',',array_keys($cases2[$h]));\n\n\t\tif ($h == $begin_h) echo '<td class=\"'.$style.'_peruserleft cal_peruser'.($var?' cal_impair '.$style.'_impair':'').'\">';\n\t\telse echo '<td class=\"'.$style.' cal_peruser'.($var?' cal_impair '.$style.'_impair':'').'\">';\n\t\tif (count($cases1[$h]) == 1)\t// only 1 event\n\t\t{\n\t\t\t$output = array_slice($cases1[$h], 0, 1);\n\t\t\t$title1=$langs->trans(\"Ref\").' '.$ids1.($title1?' - '.$title1:'');\n\t\t\tif ($output[0]['string']) $title1.=($title1?' - ':'').$output[0]['string'];\n\t\t\tif ($output[0]['color']) $color1 = $output[0]['color'];\n\t\t}\n\t\telse if (count($cases1[$h]) > 1)\n\t\t{\n\t\t\t$title1=$langs->trans(\"Ref\").' '.$ids1.($title1?' - '.$title1:'');\n\t\t\t$color1='222222';\n\t\t}\n\n\t\tif (count($cases2[$h]) == 1)\t// only 1 event\n\t\t{\n\t\t\t$output = array_slice($cases2[$h], 0, 1);\n\t\t\t$title2=$langs->trans(\"Ref\").' '.$ids2.($title2?' - '.$title2:'');\n\t\t\tif ($output[0]['string']) $title2.=($title2?' - ':'').$output[0]['string'];\n\t\t\tif ($output[0]['color']) $color2 = $output[0]['color'];\n\t\t}\n\t\telse if (count($cases2[$h]) > 1)\n\t\t{\n\t\t\t$title2=$langs->trans(\"Ref\").' '.$ids2.($title2?' - '.$title2:'');\n\t\t\t$color2='222222';\n\t\t}\n\t\tprint '<table class=\"nobordernopadding\" width=\"100%\">';\n\t\tprint '<tr><td '.($color1?'style=\"background: #'.$color1.';\"':'').'class=\"'.($style1?$style1.' ':'').'onclickopenref'.($title1?' cursorpointer':'').'\" ref=\"ref_'.$username->id.'_'.sprintf(\"%04d\",$year).'_'.sprintf(\"%02d\",$month).'_'.sprintf(\"%02d\",$day).'_'.sprintf(\"%02d\",$h).'_00_'.($ids1?$ids1:'none').'\"'.($title1?' title=\"'.$title1.'\"':'').'>';\n\t\tprint $string1;\n\t\tprint '</td><td '.($color2?'style=\"background: #'.$color2.';\"':'').'class=\"'.($style2?$style2.' ':'').'onclickopenref'.($title1?' cursorpointer':'').'\" ref=\"ref_'.$username->id.'_'.sprintf(\"%04d\",$year).'_'.sprintf(\"%02d\",$month).'_'.sprintf(\"%02d\",$day).'_'.sprintf(\"%02d\",$h).'_30_'.($ids2?$ids2:'none').'\"'.($title2?' title=\"'.$title2.'\"':'').'>';\n\t\tprint $string2;\n\t\tprint '</td></tr>';\n\t\tprint '</table>';\n\t\tprint '</td>';\n\t}\n}", "public function index()\n {\n\n $events = DB::table('events')\n ->where('event_date', '>', date('Y-m-d').' 00:00:00')\n ->orderBy('event_date', 'asc')\n ->take(8)\n ->get();\n\n return view('events.index')->withEvents($events);\n\n }", "public function index()\n {\n $id = Auth::user()->id;\n $events = [];\n $data = Event::where(['user_id'=>$id])->get();\n if($data->count()) {\n foreach ($data as $key => $value) {\n $events[] = Calendar::event(\n $value->title,\n true,\n new \\DateTime($value->start_date),\n new \\DateTime($value->end_date.' +1 day'),\n null,\n // Add color and link on event\n [\n 'color' => '#3490dc',\n 'url' => '/update/' . $value->id,\n ]\n );\n }\n }\n $calendar = Calendar::addEvents($events);\n return view('home', compact('calendar'));\n }", "public function index()\n {\n $listing=Event::all();\n return view('events.list', compact('listing'));\n }", "public function index()\n {\n return view(\"admin.event\")->with([\n \"events\" => Event::query()->orderBy(\"created_at\", \"desc\")->paginate()\n ]);\n }", "function EventsTable()\n {\n return \n $this->ItemsTableDataGroup\n (\n \"\",\n 0,\n $this->ApplicationObj()->EventGroup,\n $this->ApplicationObj()->Events\n );\n }", "function getEvents(){\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->where(array('is_closed'=>false));\r\n\t\t$recordSet = $this->db->get(TBL_EVENTS);\r\n\t\t$events=$recordSet->result() ;\t\t\r\n\t\t//return json_encode($events);\r\n\t\tif (stristr($_SERVER[\"HTTP_ACCEPT\"],\"application/xhtml+xml\") ) {\r\n\t\t\t\theader(\"Content-type: application/xhtml+xml\"); } \r\n\t\telse{\r\n\t\t\t\theader(\"Content-type: text/xml\");\r\n\t\t}\r\n\t\t$xml=\"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\" ?>\";\r\n\t\t$xmlinner=\"\";\r\n\t\t$xmlinner=\"<newslist title=\\\"Event Calendar:\\\">\";\r\n\t\tforeach($events as $row){\r\n\t\t\t$xmlinner=$xmlinner.\"<news url=\\\"javascript:void(0)\\\" date='\".dateformat($row->event_date).\"' time='\".$row->event_time.\"'>\";\r\n\t\t\t$xmlinner=$xmlinner.\"<headline><![CDATA[\".$row->title.\"]]></headline>\";\r\n\t\t\t$xmlinner=$xmlinner.\"<detail><![CDATA[\".$row->venue.\"]]></detail>\";\r\n\t\t\t$xmlinner=$xmlinner.\"</news>\";\t\t\t\r\n\t\t}\r\n\t\t$xmlinner=$xmlinner.\"</newslist>\";\r\n\t\treturn $xml.$xmlinner;\r\n\t}", "public function index()\n {\n $calendar_events = CalendarEvent::all();\n\n return view('calendar::calendar_events.index', compact('calendar_events'));\n }", "function getEventsFeed($args = array()) {\n\t \t$events = $this->getEventsExternal($args);\n\n\t \t$esc_chars = \",;\\\\\";\n\n\t \t// Get Page url if any\n\t \t$page_id = intval(get_option('fse_page'));\n\t \tif (!empty($page_id)) {\n\t \t\t$page_url = get_permalink($page_id);\n\t \t\tif (!empty($page_url)) {\n\t \t\t\tif (strpos($page_url, '?') === false)\n\t \t\t\t$page_url .= '?event=';\n\t \t\t\telse\n\t \t\t\t$page_url .= '&event=';\n\t \t\t}\n\t \t}\n\n\t \t$feed = array();\n\t \t$feed[] = 'BEGIN:VCALENDAR';\n\t \t$feed[] = 'METHOD:PUBLISH';\n\t \t$feed[] = 'PRODID:http://www.faebusoft.ch/webentwicklung/wpcalendar/';\n\t \t$feed[] = 'VERSION:2.0';\n\t \t$feed[] = 'X-WR-TIMEZONE:'.get_option('timezone_string');\n\n\t \t//print_r($events);\n\n\t \tforeach($events as $e) {\n\n\t \t\t$feed[] = 'BEGIN:VEVENT';\n\n\t \t\t$feed[] = 'UID:'.get_bloginfo('url').'/feed/ical/'.$e->eventid;\n\t \t\t//$feed[] = 'UID:'.md5(uniqid());\n\n\t \t\t// Add description\n\t \t\t$feed[] = 'DESCRIPTION:'.str_replace(array(\"\\r\",\"\\n\"), array('','\\n'),addcslashes(trim(strip_tags($e->getDescription())), $esc_chars));\n\n\t \t\t// Categories\n\t \t\tforeach($e->categories_t as $k => $c) {\n\t \t\t\t$e->categories_t[$k] = addcslashes($c, $esc_chars);\n\t \t\t}\n\t \t\t$feed[] = 'CATEGORIES:'.implode(',',$e->categories_t);\n\n\t \t\t// Location\n\t \t\t$feed[] = 'LOCATION:'.addcslashes($e->location, $esc_chars);\n\n\t \t\t// Summary\n\t \t\t$feed[] = 'SUMMARY:'.addcslashes($e->subject, $esc_chars);\n\n\t \t\t// Times\n\t \t\tif ($e->allday == true) {\n\t \t\t\t$feed[] = 'DTSTART;TZID='.get_option('timezone_string').';VALUE=DATE:'.mysql2date('Ymd', $e->from);\n\n\t \t\t\t// End has to be + 1!\n\t \t\t\t$end = strtotime($e->to)+(60*60*24);\n\t \t\t\t$feed[] = 'DTEND;TZID='.get_option('timezone_string').';VALUE=DATE:'.date('Ymd', $end);\n\t \t\t} else {\n\t \t\t\t$feed[] = 'DTSTART;TZID='.get_option('timezone_string').':'.mysql2date('Ymd\\THis', $e->from);\n\t \t\t\t$feed[] = 'DTEND;TZID='.get_option('timezone_string').':'.mysql2date('Ymd\\THis', $e->to);\n\t \t\t}\n\n\t \t\t// Classification\n\t \t\t$feed[] = 'CLASS:PUBLIC';\n\n\t \t\t// Publish Date of event\n\t \t\t$feed[] = 'DTSTAMP;TZID='.get_option('timezone_string').':'.mysql2date('Ymd\\THis', $e->publishdate);\n\n\t \t\t// URL of event\n\t \t\tif (!empty($e->postid)) {\n\t \t\t\t$feed[] = 'URL:'.get_permalink($e->postid);\n\t \t\t} elseif (!empty($page_url)) {\n\t \t\t\t$feed[] = 'URL:'.$page_url.$e->eventid;\n\t \t\t}\n\n\t \t\t$feed[] = 'END:VEVENT';\n\t \t}\n\n\t \t$feed[] = 'END:VCALENDAR';\n\n\t \t// Now trim all date to maxium 75chars\n\t \t$output = '';\n\t \tforeach ($feed as $f) {\n\t \t\t$new_line = true;\n\t \t\twhile(strlen($f) > 0) {\n\t \t\t\tif (!$new_line) {\n\t \t\t\t\t$output .= \"\\r\\n \"; // Add CRLF + Space!\n\t \t\t\t}\n\t \t\t\t$output .= substr($f, 0, 72);\n\t \t\t\t// String kürzen\n\t \t\t\tif (strlen($f) > 72) {\n\t \t\t\t\t$f = substr($f, 72);\n\t \t\t\t\t$new_line = false;\n\t \t\t\t} else {\n\t \t\t\t\t$f = '';\n\t \t\t\t}\n\t \t\t}\n\t \t\t$output .= \"\\r\\n\";\n\t \t}\n\n\t \treturn $output;\n\t }", "private function display_custom_events_table()\n\t{\n\t\t// Show the custom PHP events\n\t\t// Firstly, convert our custom event list to a proper map\n\t\t$map = [];\n\n\t\t// Sort alphabetically\n\t\tksort($this->custom_php_events);\n\n\t\tforeach ($this->custom_php_events as $extension => $events)\n\t\t{\n\t\t\tksort($events);\n\n\t\t\t// Grab each event\n\t\t\tforeach ($events as $event)\n\t\t\t{\n\t\t\t\t$map[] = [$extension, $event];\n\t\t\t}\n\t\t}\n\n\t\t// Show the table\n\t\t$table_header = [$this->language->lang('CLI_EXTENSION_EVENTS_EXTENSION_NAME'), $this->language->lang('CLI_EXTENSION_EVENTS_NAME')];\n\t\t$this->render_table($table_header, $map);\n\t}", "function EventsHtmlTable()\n {\n return \n $this->Html_Table\n (\n \"\",\n $this->EventsTable()\n );\n }", "public function index()\n {\n $events = Events::where([\n ['event_date', '>', Carbon::now()->toDateString()],\n ['status', '=', 'PUBLISHED']\n ])\n ->latest()\n ->get();\n $items = menu('guest', '_json');\n $segment = 'Events';\n return view('pages.events', [\n 'events' => $events,\n 'items' => $items,\n 'segment' => $segment,\n ]);\n }", "function DisplayEvents()\r\n\t{\t\r\n\t\tglobal $_GET;\r\n\t\tglobal $_POST;\r\n\t\tglobal $_REQUEST;\r\n\t\tglobal $_SETTINGS;\r\n\t\tglobal $_SESSION;\t\r\n\t\t\r\n\t\t//\r\n\t\t// PAGE FLAG\r\n\t\t//\r\n\t\t$flag = $_SETTINGS['events_page_clean_url'];\r\n\t\tif($flag == $_REQUEST['page']){\r\n\t\t\t\r\n\t\t\t//\r\n\t\t\t// DEBUG SECTION\r\n\t\t\t//\r\n\t\t\tif($_SETTINGS['debug'] == 1){\r\n\t\t\t\techo \"<br>PAGE: \".$_REQUEST['page'].\"<br>\";\r\n\t\t\t\techo \"<br>FORM1: \".$_REQUEST['FORM1'].\"<br>\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//\r\n\t\t\t// IF FORM1 CALENDAR\r\n\t\t\t//\r\n\t\t\tif($_REQUEST['FORM1'] == 'calendar'){\r\n\t\t\t\t$this->DisplayCalendarOfEvents();\r\n\t\t\t}\r\n\t\t\t//\r\n\t\t\t// ELSE DISPLAY EVENTS BY DEFAULT\r\n\t\t\t//\r\n\t\t\telse {\t\t\r\n\t\t\t\techo \"<div class='events'>\";\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t// CHECK FOR A CATEGORY\r\n\t\t\t\tif($_REQUEST['form1'] != ''){\r\n\t\t\t\t\r\n\t\t\t\t\t$form1Array = explode(\":\",$_REQUEST['FORM1']);\r\n\t\t\t\t\t$categoryName = $form1Array[0];\r\n\t\t\t\t\t$pageNum = $form1Array[1];\r\n\t\t\t\t\t$eventName = $form1Array[2];\r\n\t\t\t\t\t\r\n\t\t\t\t\t$cagegorySQL = \"AND ec.name='\".$categoryName.\"' \";\r\n\t\t\t\t\t$nameSQL = \"AND ev.name='\".$eventName.\"' \";\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// PAGINATION\r\n\t\t\t\t$page = 1; // start page\t\t\t\r\n\t\t\t\t$size = 4; // records per page\r\n\t\t\t\t$select = \t\"SELECT * FROM events \".\r\n\t\t\t\t\t\t\t\"WHERE events.active='1' \".\r\n\t\t\t\t\t\t\t\"AND events.published='1' \".\r\n\t\t\t\t\t\t\t\"\".$_SETTINGS['demosqland'].\" \".\r\n\t\t\t\t\t\t\t\"ORDER BY events.date DESC \";\t\r\n\t\t\t\t$total_records = mysql_num_rows(doQuery($select)); // total records\r\n\t\t\t\tif($pageNum){ $page = (int) $pageNum; } // current page\r\n\t\t\t\t$pagination = new Pagination();\r\n\t\t\t\t$pagination->setLink(\"\".$_SETTINGS['website'].\"/\".$_REQUEST['page'].\"/\".$categoryName.\":%s\");\r\n\t\t\t\t$pagination->setPage($page);\r\n\t\t\t\t$pagination->setSize($size);\r\n\t\t\t\t$pagination->setTotalRecords($total_records);\r\n\t\t\t\t$select2 = \t$select.$pagination->getLimitSql();\t\t\t\t\r\n\t\t\t\t$result = doQuery($select);\r\n\t\t\t\t\r\n\t\t\t\t$i=0;\r\n\t\t\t\twhile ($row = mysql_fetch_array($result)){\r\n\t\t\t\t\t\r\n\t\t\t\t\techo \"<div class='event_cont'>\";\r\n\t\t\t\t\t\r\n\t\t\t\t\techo \"<div class='eventmaps' id='eventmap\".$i.\"'></div>\";\r\n\t\t\t\t\techo \"<div class='event_cont_img_box'><img src='\".$_SETTINGS['website'].\"uploads/\".$row['image'].\"' class='event_cont_img' alt='' /></div>\";\r\n\t\t\t\t\t\r\n\t\t\t\t\techo \"<strong>\".$row['title'].\"</strong>\";\r\n\t\t\t\t\techo \"<label>\".TimestampIntoDate($row['date']).\"</label>\";\r\n\t\t\t\t\techo \"<label>\".$row['location'].\"</label>\";\r\n\t\t\t\t\t\r\n\t\t\t\t\techo \"\".truncateString($row['content'], 300, $stopanywhere=false).\"\";\r\n\t\t\t\t\t\r\n\t\t\t\t\techo \"<ul class='event_list'>\";\r\n\t\t\t\t\techo \"<li><b>Location:</b> \".$row['location'].\"</li>\";\r\n\t\t\t\t\techo \"<li><b>Address:</b> \".$row['address'].\"</li>\";\r\n\t\t\t\t\techo \"<li><b>Openings:</b></li>\";\r\n\t\t\t\t\techo \"<li><b>Price:</b> $\".$row['price'].\"</li>\";\t\t\t\t\t\r\n\t\t\t\t\techo \"</ul>\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t// CHECKOUT FORM\r\n\t\t\t\t\tif($row['price'] != 0){\r\n\t\t\t\t\t\techo\t\"<form class='product-form' method='post'>\".\r\n\t\t\t\t\t\t\t\t\"<input class='hidden' type='hidden' name='pid' value='\".$product_id.\"' >\".\r\n\t\t\t\t\t\t\t\t\"<input type='hidden' class='qtyinput' name='qty' value='1' size='2' >\";\r\n\t\t\t\t\t\techo\t\"<input type='submit' name='ADDTOCART' class='event-submit' value='Attend This Event'>\";\r\n\t\t\t\t\t\techo\t\"<input type='button' class='event-directions' value='Get Directions'>\".\r\n\t\t\t\t\t\t\t\t\"</form>\";\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\techo\t\"<form>\";\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\techo\t\"<input type='submit' name='ATTENDEVENT' class='event-submit' value='Attend This Event'>\";\r\n\t\t\t\t\t\techo\t\"<input type='button' class='event-directions' value='Get Directions'>\".\r\n\t\t\t\t\t\t\t\t\"</form>\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\techo \"</div>\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t$i++;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif($i==0){\r\n\t\t\t\t\techo \"There are currently no events listed\";\t\t\t\r\n\t\t\t\t}\r\n\r\n\t\t\t\t?>\r\n\t\t\t\t\r\n\t\t\t\t<?\r\n\t\t\t\t\r\n\t\t\t\t$navigation = $pagination->create_links();\r\n\t\t\t\techo $navigation; // will draw our page navigation\r\n\t\t\t\r\n\t\t\t\techo \"</div>\";\t\r\n\t\t\t\techo \"<div id='map_canvas'></div>\";\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function draw_calendar($month,$year, $day=1){\n /* draw table */\n $draw_calendar_time_start = microtime(true);\n $get_xml_start_time = microtime(true);\n \n $calendar = '';\n $xml = autoCache(\"get_event_xml\", array());\n\n $after_xml_time_start = microtime(true);\n $classes = array(\n 1 => 'sun',\n 2 => 'mon',\n 3 => 'tue',\n 4 => 'wed',\n 5 => 'thu',\n 6 => 'fri',\n 7 => 'sat',\n );\n /* days and weeks vars now ... */\n $running_day = date('w',mktime(0,0,0,$month,1,$year));\n $days_in_month = date('t',mktime(0,0,0,$month,1,$year));\n $days_in_this_week = 1;\n $day_counter = 0;\n /* row for week one */\n $calendar.= '<ul class=\"calendar-row\">';\n /* print previous month days until the first of the current month */\n for($x = 0; $x < $running_day; $x++) {\n //Go in the past $x many days in the past\n $back = ($running_day - $x);\n $back = '-' . ($back) . ' days';\n $last_month_date = date('j', strtotime($back, strtotime($year . '-' . $month . '-01')));\n $calendar .= '<li class=\"' . $classes[$days_in_this_week] . ' event not-current\"><span>' . $last_month_date . '</span></li>';\n $days_in_this_week++;\n }\n\n $twig = makeTwigEnviron('/code/events/twig');\n $twig->getExtension('Twig_Extension_Core')->setTimezone('America/Chicago');\n $calendar .= $twig->render('calendar_rest.html',array(\n 'running_day' => $running_day,\n 'days_in_month' => $days_in_month,\n 'days_in_this_week' => $days_in_this_week,\n 'day_counter' => $day_counter,\n 'classes' => $classes,\n 'xml' => $xml,\n 'year' => $year,\n 'month' => $month));\n\n /* all done, return result */\n $draw_calendar_time_end = microtime(true);\n\n $draw_calendar_time = $draw_calendar_time_end - $draw_calendar_time_start;\n $after_xml_time = $draw_calendar_time_end - $after_xml_time_start;\n error_log(\"After XML draw_calendar in $after_xml_time seconds\\n\", 3, '/tmp/calendar.log');\n error_log(\"Full draw_calendar in $draw_calendar_time seconds\\n\", 3, '/tmp/calendar.log');\n return $calendar;\n}", "function listEventTitle($e_id) {\n\t\t$e_id = mysql_real_escape_string($e_id);\n\t\t$this->eid = $e_id;\n\t\t$query = \"SELECT e_title, v.name, start_datetime, end_datetime \n\t\tFROM yam14.F_event e, yam14.F_venue v \n\t\tWHERE e.venue_id = v.v_id\n\t\tAND e_id = $this->eid;\";\n\t\t\n\t\t$result = mysql_query($query);\n\t\tif (!$result) {\n\t\t\t$message='Invalid Query' .mysql_errno().\" \\n\";\n\t\t $message .= 'Whole Query' . $query;\n\t\t die($message);\n\t\t}//end if\n\t\t\n\t\twhile($row = mysql_fetch_assoc($result)){\n\t\t\t\n\t\t\t$this->title = $row['e_title'];\n\t\t\t$this->venue = $row['name'];\n\t\t\t$this->startdate = date('l, M d, Y',strtotime($row['start_datetime']));\n\t\t\t$this->starttime = date('H:i A',strtotime($row['start_datetime']));\n\t\t\t$this->enddate = date('l, M d, Y',strtotime($row['end_datetime']));\n\t\t\t$this->endtime =date('H:i A',strtotime($row['end_datetime']));\n\t\t\t\n\t\t\techo \"<div>\";\n\t\t\techo \"<h3>$this->title</h3>\";\n\t\t\techo \"<h4>$this->venue</h4>\";\n\t\t\techo \"<h4>From $this->startdate $this->starttime </h4><h4>To $this->enddate $this->endtime </h4>\";\n\t\t\techo \"<hr />\";\n\t\t\techo \"</div>\";\n\t\t}\t\n\t\t\n\t\tmysql_free_result($result);\n\t\t\n\t}", "public function getEventsByDay( $day ) {\n\n\t\t$rangestart = strtotime($day) * 1000; // zimbra always works with milliseconds in timestamps\n\t\t$rangeend = $rangestart + (24 * 60 * 60 * 1000);\n\n\t\t/**\n\t\t* build full call url\n\t\t*/\n\t\t$calendar = $this->getFromZimbra(\"/calendar?start=\" . $rangestart . \"&end=\" . $rangeend);\n\n\t\t$events = array();\n\t\tif( !property_exists($calendar, \"appt\") ) return $events;\n\n\t\tforeach ($calendar->appt as $meetingSeries) {\n\n\t\t\t/**\n\t\t\t* collect values for the current appointment\n\t\t\t*/\n\t\t\t$finalstartdate = null;\n\t\t\t$finalenddate = null;\n\t\t\t$finalname = null;\n\t\t\t$finallocation = null;\n\n\t\t\t/**\n\t\t\t* iterate over all sub events in order to find the right one\n\t\t\t* single events just have one item = easy, we just take this one\n\t\t\t* series of events contain the original item plus all execptions, more difficult to handle\n\t\t\t*/\n\t\t\tforeach ($meetingSeries->inv as $meeting) {\n\n\t\t\t\t$startdate = isset($meeting->comp[0]->s[0]->u) ? $meeting->comp[0]->s[0]->u : \"\";\n\t\t\t\t$enddate = isset($meeting->comp[0]->e[0]->u) ? $meeting->comp[0]->e[0]->u: \"\";\n\t\t\t\t$name = $meeting->comp[0]->name;\n\t\t\t\t$location = $meeting->comp[0]->loc;\n\n\t\t\t\t/**\n\t\t\t\t* we take the original, if nothing is set yet\n\t\t\t\t* the original events hold the time from the original day only, so we need to recalculate\n\t\t\t\t* since we are only getting the data from one day, we can kill the day information on extract the hours only\n\t\t\t\t*/\n\t\t\t\tif( $finalstartdate == null && !property_exists($meeting->comp[0], \"recurId\")) {\n\t\t\t\t\t$finalstartdate = date(\"Y-m-d\", $rangestart/1000) . \" \" . date(\"H:i\", $startdate / 1000);\n\t\t\t\t\t$finalenddate = date(\"Y-m-d\", $rangestart/1000) . \" \" . date(\"H:i\", $enddate / 1000);\n\t\t\t\t\t$finalname = $name;\n\t\t\t\t\t$finallocation = $location;\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t* overwrite if got an exception of the series taking place on the current day\n\t\t\t\t*/\n\t\t\t\tif( property_exists($meeting, \"recurId\") &&\n\t\t\t\t\t($startdate <= $rangeend && $enddate >= $rangestart)) {\n\t\t\t\t\t$finalstartdate = date(\"Y-m-d H:i\", $startdate / 1000);\n\t\t\t\t\t$finalenddate = date(\"Y-m-d H:i\", $enddate / 1000);\n\t\t\t\t\t$finalname = $name;\n\t\t\t\t\t$finallocation = $location; \n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$events[]= array(\n\t\t\t\t\"name\" => $finalname,\n\t\t\t\t\"location\" => $finallocation,\n\t\t\t\t\"startdate\" => $finalstartdate, // timestamp has milli seconds as well\n\t\t\t\t\"enddate\" => $finalenddate\n\t\t\t);\n\t\t}\n\n\t\tusort($events, array(\"self\", \"cmp\"));\n\t\treturn $events;\n\t}", "public function render()\r\n\t{\r\n\t\t$days = 1;\r\n\t\t$this->redirect = isset($this->redirect) ? $this->redirect: $this->getURL() ;\r\n\t\t$this->set_date();\r\n\t\t$total_days = cal_days_in_month(CAL_GREGORIAN, $this->month, $this->year);\r\n\t\t$first_spaces = date(\"w\", mktime(0, 0, 0, $this->month, 1, $this->year));\r\n\t\t$currentday = $this->UID('day');\r\n\r\n\t\tif (isset($this->inForm))\r\n\t\t{\r\n\t\t\t$CObjID = $this->UID('calendar');\r\n\t\t\t$DateString = ($this->Value()) ? '\",\"'.$this->Value() : '';\r\n\t\t\t$this->output = '<script language=\"javascript\">'.\"\\n\".'var '.$CObjID.' = new Calendar(\"'.$this->ID.$DateString.'\");'.\"\\n\"\r\n\t\t\t.$CObjID.'.currentDateStyle = \"'.$this->currentDateStyle.'\";'.\"\\n\"\r\n\t\t\t.$CObjID.'.selectedDateStyle = \"'.$this->selectedDateStyle.'\";'.\"\\n\"\r\n\t\t\t.$CObjID.'.normalDateStyle = \"'.$this->normalDateStyle.'\";'.\"\\n\"\r\n\t\t\t.$CObjID.'.setStyles();'.\"\\n\"\r\n\t\t\t.'</script>'.\"\\n\"\r\n\t\t\t.'<input type=\"hidden\" id=\"'.$CObjID.'\" name=\"'.$CObjID.'\" value=\"'.$this->Value().'\"/>'.\"\\n\";\r\n\t\t}\r\n\t\telse $this->output = '';\r\n\r\n\t\t$NavUrls = $this->url_params($this->UID('year'),$this->UID('month'),$this->UID('day'),array_keys($this->add_params_sel));\r\n\r\n\t\t$this->output.= '<table class=\"calendar\"><tr><td class=\"'.$this->navigateStyle.'\"><a id=\"'.$this->UID('navigateback').'\" class=\"'.$this->navigateStyle.'\" href=\"'.$this->getURL().\r\n\t\t\t'?'.$this->add_params_sel().'&'.$this->UID('month').'='.($this->month-1).'&'.$this->UID('year').'='.$this->year.$NavUrls.'\"><</a>\r\n\t\t </td><td id=\"'.$this->UID('Month').'\" colspan=\"5\" class=\"'.$this->monthStyle.'\">'.$this->RUS_MONTHS[date(\"n\", mktime(0, 0, 0, $this->month, 1, $this->year))-1].'&nbsp;'.$this->year.'\r\n\t\t </td><td class=\"'.$this->navigateStyle.'\"><a id=\"'.$this->UID('navigatenext').'\" class=\"'.$this->navigateStyle.'\" href=\"'.$this->getURL().'?'.$this->add_params_sel().'&'.$this->UID('month').'='.($this->month+1).'&'.$this->UID('year').'='.$this->year.$NavUrls.'\">></a>\r\n\t\t </td></tr><tr class=\"'.$this->daysOfTheWeekStyle.'\"><td>Ïí</td><td>Âò</td><td>Ñð</td><td>×ò</td><td>Ïò</td><td>Ñá</td><td>Âñ</td></tr>';\r\n\r\n \tfor ($Week=0;$Week<6;$Week++)\r\n \t{\r\n \t$this->output.= '<tr>';\r\n\r\n\t\t\t\tfor ($Day=0;$Day<7;$Day++)\r\n \t{\r\n\r\n\t\t\t\t\t$days++;\r\n\t\t\t\t\t$dDay = $days - $first_spaces;\r\n\t\t\t\t\t$norm_style = ($this->isDayAvailable($dDay))?$this->availDateStyle:$this->normalDateStyle;\r\n\t\t\t\t\t\r\n//\t\t\t\t\techo('dDay='.$dDay.'<br/>avail dates:');\r\n//\t\t\t\t\tforeach($this->availDates as $date)\r\n//\t\t\t\t\t\techo(date('d/m/Y',$date).'<br/>');\r\n\r\n\t\t\t\t\t$CellID = $this->UID('item['.$days.']');\r\n\r\n\t\t\t\t\tif ($days > $first_spaces && ($dDay) < $total_days + 1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$LinkID = $this->UID('hlink['.$days.']');\r\n\t\t\t\t\t\t$currentSelectedDay = '<td id=\"'.$CellID.'\" class=\"'.$this->selectedDateStyle.'\"><a id=\"'.$LinkID.'\" class=\"'.$this->selectedDateStyle.'\"';\r\n\t\t\t\t\t\t$CurrentDate = isset($_REQUEST[$currentday]) ? $_REQUEST[$currentday]: '';\r\n\r\n\t\t\t\t\t\tif ($CurrentDate == $dDay)\t$this->output.= $currentSelectedDay;\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$this->output.='<td id=\"'.$CellID.'\" class=';\r\n\t\t\t\t\t\t\t$this->output.= ($dDay==date(\"j\") && $this->year==date(\"Y\") && $this->month==date(\"n\")) ?\r\n\t\t\t\t\t\t\t\t'\"'.$this->currentDateStyle.'\"><a id=\"'.$LinkID.'\" class=\"'.$this->currentDateStyle.'\"' :\r\n\t\t\t\t\t\t\t\t'\"'.$norm_style.'\"><a id=\"'.$LinkID.'\" class=\"'.$this->normalDateStyle.'\"';\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif($this->isDayAvailable($dDay))\r\n\t\t\t\t\t\t\t$this->output.= 'href=\"'.$this->redirect.'?'.$this->add_params_day().'&'.$currentday.'='.$dDay.$this->url_params($currentday,array_keys($this->add_params_day)).'\">'.$dDay.'</a></td>';\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t$this->output.= '>'.$dDay.'</a></td>';\r\n\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$this->output.='<td id=\"'.$CellID.'\" class=\"'.$this->normalDateStyle.'\"></td>'.\"\\n\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$this->output.=\"</tr>\";\r\n \t}\r\n\r\n\t\t$this->output.= '</table>';\r\n\r\n\t\treturn $this->output;\r\n\t}", "protected function makeEntries()\n {\n $this->setY($this->getY() + $this->layout['entriesPaddingTop']);\n $widths = $this->layout['entriesColumnWidths'];\n $alignment = $this->layout['entriesColumnAlignment'];\n\n $makeHeader = function ($widths, $alignment) {\n $header = [\n $this->t('quantity'),\n $this->t('item'),\n $this->t('price'),\n $this->t('total'),\n ];\n $this->setFont('', 'b');\n foreach ($widths as $index => $width) {\n $this->cell($width, $this->layout['titleCellHeight'], utf8_decode($header[$index]), 'BT', 0, $alignment[$index]);\n }\n $this->setFont('', '');\n $this->ln();\n };\n\n $makeHeader($widths, $alignment);\n $currentY = 0;\n $nextY = $this->getY();\n\n foreach ($this->entries as $entry) {\n $this->setY($nextY);\n if ($this->needsNewPage()) {\n $this->newPage();\n $makeHeader($widths, $alignment);\n $nextY = $this->getY();\n }\n $currentY = $nextY;\n $this->cell($widths[0], $this->layout['contentCellHeight'], $this->numberFormat($entry['quantity']), '', 0, $alignment[0]);\n $this->multiCell($widths[1], $this->layout['contentCellHeight'], utf8_decode($entry['description']), 0, $alignment[1]);\n $nextY = max($nextY, $this->getY());\n $this->setXY($this->layout['pagePaddingLeft'] + $widths[0] + $widths[1], $currentY);\n $this->cell($widths[2], $this->layout['contentCellHeight'], $this->numberFormat($entry['price']), '', 0, $alignment[2]);\n $total = $entry['quantity'] * $entry['price'];\n $this->cell($widths[3], $this->layout['contentCellHeight'], $this->numberFormat($total), '', 1, $alignment[3]);\n }\n\n $this->setY($nextY);\n $this->setFont('', 'b');\n $this->cell($widths[0], $this->layout['contentCellHeight'], '', 'BT');\n $this->cell($widths[1], $this->layout['contentCellHeight'], '', 'BT');\n $this->cell($widths[2], $this->layout['contentCellHeight'], '', 'BT');\n $this->cell($widths[3], $this->layout['contentCellHeight'], $this->variables['total'], 'BT', 0, $alignment[3]);\n $this->setFont('', '');\n }", "public function showEventsTable() {\r\n\t\t$stmt = $this->connect()->query(\"SELECT * FROM event\");\r\n\t\techo \"<h3>Event Table</h3>\";\r\n\t\techo \"<table><tr><td>\" . \"id\" . \"</td><td>\" . \"competition_id\" . \"</td><td>\" . \"name\" . \"</td><td>\" . \"score\" . \"</td><td>\" . \"time\" . \"</td><td>\" . \"tie_break\" . \"</td></tr>\";\r\n\t\twhile ($row = $stmt->fetch()) {\r\n\t\t\techo \"<tr><td>\" . $row['id'] . \"</td><td>\" . $row['competition_id'] . \"</td><td>\" . $row['name'] . \"</td><td>\" . $row['score'] . \"</td><td>\" . $row['time'] . \"</td><td>\" . $row['tie_break'] . \"</td></tr>\"; \r\n\t\t}\r\n\t\techo \"</table>\";\r\n\t}" ]
[ "0.6988883", "0.691454", "0.68001527", "0.6761365", "0.6699765", "0.6596786", "0.65746707", "0.6560422", "0.64417326", "0.63765466", "0.6351477", "0.6351217", "0.6314671", "0.62700576", "0.6258939", "0.6229247", "0.6220041", "0.6211291", "0.618858", "0.61027926", "0.6087735", "0.6085074", "0.6078856", "0.6072163", "0.6061979", "0.6041157", "0.60038865", "0.5997636", "0.5993342", "0.5972942", "0.5955699", "0.5949564", "0.5939848", "0.5928272", "0.59056556", "0.59047997", "0.5873716", "0.5868068", "0.5866602", "0.58277607", "0.58263725", "0.5823869", "0.5812885", "0.5802514", "0.5801671", "0.5797467", "0.57925326", "0.5774351", "0.5770574", "0.57696366", "0.57636094", "0.5761261", "0.57553333", "0.57483286", "0.57351995", "0.57326126", "0.5731888", "0.5720008", "0.5719547", "0.571596", "0.57040334", "0.57025665", "0.56981826", "0.5691767", "0.5687285", "0.5683744", "0.5683123", "0.5678492", "0.56784433", "0.56583637", "0.56568944", "0.5656059", "0.5643864", "0.5642152", "0.5635169", "0.5633843", "0.5628046", "0.5627629", "0.5626813", "0.5614045", "0.5607705", "0.5594389", "0.55903834", "0.55886436", "0.55840015", "0.5577317", "0.55724674", "0.5571394", "0.5569814", "0.5567444", "0.55664027", "0.55616945", "0.55604607", "0.55563754", "0.55517477", "0.5551266", "0.5545136", "0.553429", "0.5528789", "0.55259097" ]
0.78295594
0
Create a listing of events as an array Creates a listing of events occuring on the given day as array items. These items are added into the cell of the calendar for the given day.
private function makeDayEventListArray() { $outevents = array(); $n = 0; foreach($this->eventItems as $item) { if($item['date'] == $this->curYear.'-'.$this->curMonth.'-'.$this->dayOfMonth) { $outevents[$n]['category'] = $item['cat']; if($item['stdurl']) { $outevents[$n]['url'] = $item['url'].'?id='.$item['id']; } else { $outevents[$n]['url'] = $item['url']; } $outevents[$n]['summary'] = $item['text']; $outevents[$n]['description'] = $item['desc']; $outevents[$n]['categorycolor'] = (strlen($item['catcolor']) > 0 ? str_replace('#','',$item['catcolor']) : '#eeeeee'); } $n++; } if(count($outevents)) { return $outevents; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEventsByDay( $day ) {\n\n\t\t$rangestart = strtotime($day) * 1000; // zimbra always works with milliseconds in timestamps\n\t\t$rangeend = $rangestart + (24 * 60 * 60 * 1000);\n\n\t\t/**\n\t\t* build full call url\n\t\t*/\n\t\t$calendar = $this->getFromZimbra(\"/calendar?start=\" . $rangestart . \"&end=\" . $rangeend);\n\n\t\t$events = array();\n\t\tif( !property_exists($calendar, \"appt\") ) return $events;\n\n\t\tforeach ($calendar->appt as $meetingSeries) {\n\n\t\t\t/**\n\t\t\t* collect values for the current appointment\n\t\t\t*/\n\t\t\t$finalstartdate = null;\n\t\t\t$finalenddate = null;\n\t\t\t$finalname = null;\n\t\t\t$finallocation = null;\n\n\t\t\t/**\n\t\t\t* iterate over all sub events in order to find the right one\n\t\t\t* single events just have one item = easy, we just take this one\n\t\t\t* series of events contain the original item plus all execptions, more difficult to handle\n\t\t\t*/\n\t\t\tforeach ($meetingSeries->inv as $meeting) {\n\n\t\t\t\t$startdate = isset($meeting->comp[0]->s[0]->u) ? $meeting->comp[0]->s[0]->u : \"\";\n\t\t\t\t$enddate = isset($meeting->comp[0]->e[0]->u) ? $meeting->comp[0]->e[0]->u: \"\";\n\t\t\t\t$name = $meeting->comp[0]->name;\n\t\t\t\t$location = $meeting->comp[0]->loc;\n\n\t\t\t\t/**\n\t\t\t\t* we take the original, if nothing is set yet\n\t\t\t\t* the original events hold the time from the original day only, so we need to recalculate\n\t\t\t\t* since we are only getting the data from one day, we can kill the day information on extract the hours only\n\t\t\t\t*/\n\t\t\t\tif( $finalstartdate == null && !property_exists($meeting->comp[0], \"recurId\")) {\n\t\t\t\t\t$finalstartdate = date(\"Y-m-d\", $rangestart/1000) . \" \" . date(\"H:i\", $startdate / 1000);\n\t\t\t\t\t$finalenddate = date(\"Y-m-d\", $rangestart/1000) . \" \" . date(\"H:i\", $enddate / 1000);\n\t\t\t\t\t$finalname = $name;\n\t\t\t\t\t$finallocation = $location;\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t* overwrite if got an exception of the series taking place on the current day\n\t\t\t\t*/\n\t\t\t\tif( property_exists($meeting, \"recurId\") &&\n\t\t\t\t\t($startdate <= $rangeend && $enddate >= $rangestart)) {\n\t\t\t\t\t$finalstartdate = date(\"Y-m-d H:i\", $startdate / 1000);\n\t\t\t\t\t$finalenddate = date(\"Y-m-d H:i\", $enddate / 1000);\n\t\t\t\t\t$finalname = $name;\n\t\t\t\t\t$finallocation = $location; \n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$events[]= array(\n\t\t\t\t\"name\" => $finalname,\n\t\t\t\t\"location\" => $finallocation,\n\t\t\t\t\"startdate\" => $finalstartdate, // timestamp has milli seconds as well\n\t\t\t\t\"enddate\" => $finalenddate\n\t\t\t);\n\t\t}\n\n\t\tusort($events, array(\"self\", \"cmp\"));\n\t\treturn $events;\n\t}", "function _makeDay($carbon){\n $_date = $carbon->year.'-'.$carbon->month.'-'.$carbon->day;\n $day = $carbon->englishDayOfWeek;\n return [\n 'date' => $carbon->day,\n 'month' => $carbon->month,\n 'year' => $carbon->year,\n 'english_month' => $carbon->englishMonth,\n 'full_date' => $_date,\n 'day' => $day,\n 'items' => [],\n ];\n }", "function get_event_days(){\r\n\t\t$event_days = array();\r\n\r\n\t\tforeach($this->merged_feed_data as $item){\r\n\t\t\t$start_date = $item->get_start_date();\r\n\r\n\t\t\t//Round start date to nearest day\r\n\t\t\t$start_date = mktime(0, 0, 0, date('m', $start_date), date('d', $start_date) , date('Y', $start_date));\r\n\r\n\t\t\tif(!isset($event_days[$start_date])){\r\n\t\t\t\t//Create new array in $event_days for this date (only dates with events will go into array, so, for \r\n\t\t\t\t//example $event_days[26] will exist if 26th of month has events, but won't if it has no events)\r\n\t\t\t\t//(Now uses unix timestamp rather than day number, but same concept applies).\r\n\t\t\t\t$event_days[$start_date] = array();\r\n\t\t\t}\r\n\r\n\t\t\t//Push event into array just created (may be another event for this date later in feed)\r\n\t\t\tarray_push($event_days[$start_date], $item);\r\n\t\t}\r\n\r\n\t\treturn $event_days;\r\n\t}", "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 }", "private function makeArrayIterator()\n\t{\n\t\t$this->weekDayNum = $this->firstDayOfTheMonth+1;\t\t\n\t\tfor($this->dayOfMonth; $this->dayOfMonth <= $this->daysInMonth; $this->dayOfMonth++) {\n\t\t\t// Set the default style\n\t\t\t$this->outArray['days'][$this->dayOfMonth]['style'] = 'normalDay';\n\t\t\t\n\t\t\t// Set the style to a weekend day style\n\t\t\tif(($this->weekDayNum == 8)||($this->weekDayNum == 7)) {\n\t\t\t\t$this->outArray['days'][$this->dayOfMonth]['style'] = 'weekendDay';\n\t\t\t}\n\t\t\t\n\t\t\t// Set the style to a current day style\n\t\t\tif($this->curDay == $this->dayOfMonth) {\n\t\t\t\t$this->outArray['days'][$this->dayOfMonth]['style'] = 'currentDay';\n\t\t\t}\n\t\t\t\n\t\t\t// If the current day is Sunday, add a new row\n\t\t\tif($this->weekDayNum == 8) {\n\t\t\t\t$this->weekDayNum = 1;\n\t\t\t} \n\t\t\t\n\t\t\t$this->outArray['days'][$this->dayOfMonth]['dayname'] = $this->daysArray[$this->weekDayNum - 1];\n\t\t\t$this->outArray['days'][$this->dayOfMonth]['weekdaynumber'] = $this->weekDayNum;\n\t\t\t\t\t\t\t\t\t\n\t\t\t// Draw days\n\t\t\tif($this->makeDayEventListArray()) {\n\t\t\t\t$this->outArray['days'][$this->dayOfMonth]['events'] = $this->makeDayEventListArray();\n\t\t\t}\n\t\t\t\n\t\t\t$this->outArray['days'][$this->dayOfMonth]['datestamp'] = $this->curYear.'-'.$this->curMonth.'-'.$this->dayOfMonth;\n\t\t\t\n\t\t\t$this->weekDayNum++;\n\t\t}\n\t}", "public function buildDayList($date){\n\t\t$events = $this->getDayEvents($date);\n\t\t$count = 0;\n\t\t\n\t\tob_start();\n\t\tif(count($events) > 0){\n\t\t\tforeach($events as $key => $event){\t\t\t\n\t\t\t\t$recurringDays = $event->getRecurringDays();\n\t\t\t\t\t\t\n\t\t\t\t$dayOfWeek = date_create($date);\n\t\t\t\t$dayOfWeek = strtolower(date_format($dayOfWeek, \"l\"));\n\t\t\t\t//echo $dayOfWeek;\n\n\t\t\t\tif(count($recurringDays)){\n\t\t\t\t\tif(in_array($dayOfWeek, $recurringDays)){\n\t\t\t\t\t\techo '<h4>Events for ' . $this->getDate($date) . '</h4>';\n\t\t\t\t\t\techo $event->toHtml('listing');\n\t\t\t\t\t\techo '<hr />';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\techo '<h4>Events for ' . $this->getDate($date) . '</h4>';\n\t\t\t\t\techo $event->toHtml('listing');\n\t\t\t\t\techo '<hr />';\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t$count++;\n\t\t\t}\n\t\t}\n\t\treturn ob_get_clean();\n\t}", "private function getNewTicketsByDayList() {\r\n\t\t$sql = \"SELECT dateadd(DAY,0, datediff(day,0, Date_Entered_UTC)) AS day, count(TicketNbr) as count \";\r\n\t\t$sql .= \"FROM v_rpt_Service \";\r\n\t\t$sql .= \"WHERE Date_Entered_UTC >= DATEADD(day, -30, GETDATE()) \";\r\n\t\t$sql .= \"GROUP BY dateadd(DAY,0, datediff(day,0, Date_Entered_UTC)) \";\r\n\t\t$sql .= \"ORDER BY dateadd(DAY,0, datediff(day,0, Date_Entered_UTC)) \";\r\n\t\t$result = sqlsrv_query($this->conn, $sql) or die ('Error in SQL: ' . $sql);\r\n\r\n\t\t$i = 0;\r\n\t\twhile($row = sqlsrv_fetch_array($result)) {\r\n\t\t\t$r[$i]['date'] = (strtotime($row['day'])*1000)-6*60*60*1000;\r\n\t\t\t$r[$i]['count'] = (string)$row['count'];\r\n\t\t\t$i++;\r\n\t\t}\r\n\r\n\t\treturn($r);\r\n\t}", "public function drawArray()\n\t{\n\t\t$this->outArray['days'] = array();\n\t\t$this->makeCalendarTitle();\n\t\t$this->makeCalendarHead();\n\t\t$this->makeDayHeadings();\n\t\t$this->startMonthSpacers();\n\t\t$this->makeArrayIterator();\n\t\t$this->endMonthSpacers();\t\t\n\t\t\n\t\treturn $this->outArray;\n\t}", "public function getDayEvents($date){\n\t\t$object = $this->events_ob;\n\t\t$event = new $object();\n\t\t$events = array();\n\t\t\n\t\t# Get Non-Reoccurring events\n\t\t$query = \"WHERE `start_date` = '\".$date.\"' AND `repeating` = '0' AND `active` = '1'\";\n\t\t$events = array_merge($events, $event->fetchQuery($query));\n\t\t\n\t\t# Get Reoccurring events\n\t\t# Get Events that Reoccur on a daily basis\n\t\t$query = \"WHERE `repeating` = '1' AND `start_date` <= '\".$date.\"' AND (`repeat_end` >= '\".$date.\"' OR `repeat_end` = '0000-00-00') AND `repeat_type` = 'daily' AND `repeat_every` <> 0 AND MOD(TIMESTAMPDIFF(DAY, `start_date`, '\".$date.\"'), `repeat_every`) = 0 AND `active` = '1'\";\n\t\t$events = array_merge($events, $event->fetchQuery($query));\n\t\t\n\t\t# Get Events that Reoccur on a weekly basis\n\t\t$query = \"WHERE `repeating` = '1' AND `start_date` <= '\".$date.\"' AND (`repeat_end` >= '\".$date.\"' OR `repeat_end` = '0000-00-00') AND `repeat_type` = 'weekly' AND `repeat_wednesday` = '1' AND `repeat_every` <> 0 AND MOD(TIMESTAMPDIFF(WEEK, `start_date`, '\".$date.\"'), `repeat_every`) = 0 AND `active` = '1'\";\n\t\t$events = array_merge($events, $event->fetchQuery($query));\n\t\t\n\t\t# Get Events that Reoccur on a monthly basis\n\t\t$query = \"WHERE `repeating` = '1' AND `start_date` <= '\".$date.\"' AND (`repeat_end` >= '\".$date.\"' OR `repeat_end` = '0000-00-00') AND `repeat_type` = 'monthly' AND ((`repeat_by` = 'day_of_month' AND DAY(`start_date`) = '16') OR (`repeat_by` = 'day_of_week' AND DAYOFWEEK(`start_date`) = '4' AND MOD((TIMESTAMPDIFF(WEEK, '2017-08-01', '\".$date.\"')+1), `repeat_every`) = 0)) AND `repeat_every` <> 0 AND `active` = '1'\";\n\t\t$events = array_merge($events, $event->fetchQuery($query));\n\t\t\n\t\t# Get Events that Reoccur on a yearly basis\n\t\t$query = \"WHERE `repeating` = '1' AND `start_date` <= '\".$date.\"' AND (`repeat_end` >= '\".$date.\"' OR `repeat_end` = '0000-00-00') AND `repeat_type` = 'yearly' AND DAY(`start_date`) = '16' AND MONTH(`start_date`) = '8' AND `repeat_every` <> 0 AND MOD(TIMESTAMPDIFF(YEAR, `start_date`, '\".$date.\"'), `repeat_every`) = 0 AND `active` = '1'\";\n\t\t$events = array_merge($events, $event->fetchQuery($query));\n\t\t\n\t\treturn $events;\n\t}", "private function _get_calendar_array()\n\t{\n\t $this->all_events = $this->result->xpath(\".//event\");\n\t \n\t foreach($this->all_events as $an_event):\n\t $start_at = $an_event->xpath(\"./start-at\");\n \t $start_at = $start_at[0];\n \t $end_at = $an_event->xpath(\"./end-at\");\n \t $end_at = $end_at[0];\n \t \n \t $start_at = new DateTime($start_at);\n \t $start_at->setTimezone(new DateTimeZone('America/Chicago'));\n \t $start_at->setTime(0, 0, 0);\n \t $end_at = new DateTime($end_at);\n \t $end_at->setTimezone(new DateTimeZone('America/Chicago'));\n \t $end_at->setTime(0, 0, 0);\n \t \n \t $start_timestamp = strtotime($start_at->format('Y-m-d'));\n $end_timestamp = strtotime($end_at->format('Y-m-d'));\n \n $start_year = date(\"Y\", $start_timestamp);\n $end_year = date(\"Y\", $end_timestamp);\n $start_month = date(\"m\", $start_timestamp);\n $end_month = date(\"m\", $end_timestamp);\n $start_day = date(\"d\", $start_timestamp);\n $start_day = $start_day + 1;\n $end_day = date(\"d\", $end_timestamp);\n $end_day = $end_day + 1;\n \n if(($start_year == $this->year && $start_month == $this->month) || ($end_year == $this->year && $end_month == $this->month)):\n if($start_year == $end_year):\n if($start_month == $end_month):\n $this->_calendar_array_one($start_day, $end_day);\n else:\n if($end_month != $this->month):\n $this->_calendar_array_two($start_day);\n else:\n $this->_calendar_array_three($end_day);\n endif;\n endif;\n endif;\n endif;\n endforeach;\n \n\t foreach($this->callinks as $callinks):\n\t foreach($callinks as $key => $value):\n\t $this->combined_callinks[\"$key\"] = $value;\n\t endforeach;\n\t endforeach;\n\t}", "private function _calendar_array_one($start_d, $end_d)\n\t{\n\t $days_array = array();\n $days_url_array = array();\n for($i = $start_d; $i <= $end_d; $i++):\n array_push($days_array, $i);\n endfor;\n \n foreach($days_array as $day):\n $stampeddate = strtotime($this->year.\"-\".$this->month.\"-\".$day);\n array_push($days_url_array, URL::base(TRUE, TRUE).\"calendar_day/\".date(\"j\", $stampeddate).\"/\".date(\"n\", $stampeddate).\"/\".date(\"Y\", $stampeddate));\n endforeach;\n \n array_push($this->callinks, array_combine($days_array, $days_url_array));\n\t}", "private function makeDayEventListHTML()\n\t{\n\t\t$showtext = \"\";\n\t\tforeach($this->eventItems as $item) {\n\t\t\tif($item['date'] == $this->curYear.'-'.$this->curMonth.'-'.$this->dayOfMonth) {\n\t\t\t\t$category = (strlen($item['cat']) > 0 ? 'Category: '.$item['cat'].' - ' : '');\n\t\t\t\t$outevents[$n]['category'] = $item['cat'];\n\t\t\t\t\n\t\t\t\tif($item['stdurl']) {\n\t\t\t\t\t$href = '<a href=\"'.$item['url'].'?id='.$item['id'].'\" title=\"'.$category.$item['desc'].'\">'.$item['text'].'</a>';\n\t\t\t\t\t$outevents[$n]['url'] = $item['url'].'?id='.$item['id'];\n\t\t\t\t} else {\n\t\t\t\t\t$href = (strlen($item['url']) > 0 ? '<a href=\"'.$item['url'].'\" title=\"'.$category.$item['desc'].'\">'.$item['text'].'</a>' : $item['text']);\n\t\t\t\t\t$outevents[$n]['url'] = $item['url'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$style = (strlen($item['catcolor']) > 0 ? ' style=\"background-color:#'.str_replace('#','',$item['catcolor']).';\" ' : ' style=\"background-color:#eeeeee;\" ');\n\t\t\t\t\n\t\t\t\t$showtext .= \"\\n\\t\\t\\t<div class=\\\"dayContent\\\"\".$style.\">\".$href.\"</div>\\n\\t\\t\";\n\t\t\t\t\n\t\t\t\t$outevents[$n]['summary'] = $item['text'];\n\t\t\t\t$outevents[$n]['description'] = $item['desc'];\n\t\t\t\t$outevents[$n]['categorycolor'] = (strlen($item['catcolor']) > 0 ? str_replace('#','',$item['catcolor']) : '#eeeeee');\n\t\t\t}\n\t\t\t$n++;\n\t\t}\n\t\treturn $showtext;\n\t}", "public static function twoDArrayforCalender()\n {\n $array = [];\n for ($i = 0; $i < 6; $i++) \n {\n $array1 = array();\n for ($j = 0; $j < 7; $j++) \n {\n //initializing array values to '-'\n $array1[$j] = '-';\n }\n //pushing array to each row of 2d array\n array_push($array, $array1);\n }\n return $array;\n }", "private function baseCalendarArray($date, $fday, $lday, $monthHolidays){\n $calendar = array();\n for($day = $fday; $day < $lday+1; $day++)\n {\n\n $calendar = $this->setDay($calendar, $day);\n $calendar = $this->setDayName($calendar, $day, $this->date, \"D\");\n\n if(!empty($event[$day]))\n $calendar = $this->setDayEvent($calendar, $day, $event[$day]);\n \n\n if($date->isWeekend())\n {\n $calendar = $this->setDayWeekend($calendar, $day, \"Weekend\");\n $calendar = $this->setDayColor($calendar, $day, 'purple');\n }\n else \n {\n $calendar = $this->setDayColor($calendar, $day, 'white');\n }\n\n if(!empty($monthHolidays[$day]))\n {\n $calendar = $this->setDayEvent($calendar, $day, $monthHolidays[$day]['event']);\n $calendar = $this->setDayColor($calendar, $day, 'pink');\n }\n \n $date->addDay();\n }\n\n return $calendar;\n }", "public function getEvents()\n {\n $main_actions = [\n 'event' => \\adminer\\lang('Create event'),\n ];\n\n $headers = [\n \\adminer\\lang('Name'),\n \\adminer\\lang('Schedule'),\n \\adminer\\lang('Start'),\n // \\adminer\\lang('End'),\n ];\n\n // From db.inc.php\n $events = \\adminer\\support(\"event\") ? \\adminer\\get_rows(\"SHOW EVENTS\") : [];\n $details = [];\n foreach($events as $event)\n {\n $detail = [\n 'name' => \\adminer\\h($event[\"Name\"]),\n ];\n if(($event[\"Execute at\"]))\n {\n $detail['schedule'] = \\adminer\\lang('At given time');\n $detail['start'] = $event[\"Execute at\"];\n // $detail['end'] = '';\n }\n else\n {\n $detail['schedule'] = \\adminer\\lang('Every') . \" \" .\n $event[\"Interval value\"] . \" \" . $event[\"Interval field\"];\n $detail['start'] = $event[\"Starts\"];\n // $detail['end'] = '';\n }\n $details[] = $detail;\n }\n\n return \\compact('main_actions', 'headers', 'details');\n }", "private function getNewOpportunitiesByDayList() {\r\n\t\t$sql = \"SELECT dateadd(DAY,0, datediff(day,0, Date_Became_Lead)) AS day, count(Opportunity_RecID) as count \";\r\n\t\t$sql .= \"FROM v_rpt_Opportunity \";\r\n\t\t$sql .= \"WHERE Date_Became_Lead >= DATEADD(day, -30, GETDATE()) \";\r\n\t\t$sql .= \"GROUP BY dateadd(DAY,0, datediff(day,0, Date_Became_Lead)) \";\r\n\t\t$sql .= \"ORDER BY dateadd(DAY,0, datediff(day,0, Date_Became_Lead)) \";\r\n\t\t$result = sqlsrv_query($this->conn, $sql) or die ('Error in SQL: ' . $sql);\r\n\r\n\t\t$i = 0;\r\n\t\twhile($row = sqlsrv_fetch_array($result)) {\r\n\t\t\t$r[$i]['date'] = (strtotime($row['day'])*1000);\r\n\t\t\t$r[$i]['count'] = (string)$row['count'];\r\n\t\t\t$i++;\r\n\t\t}\r\n\r\n\t\treturn($r);\r\n\t}", "public function reminders($day)\n {\n return $this->events->eventsByDay($day);\n }", "public function dayList()\n\t{\n\t\techo json_encode($this->sched_day->fetchData());\n\t}", "public function dataProvider_for_createCalendarEvent()\n {\n return [\n 'not_recurring' => [\n [\n 'title' => str_random(16),\n 'start_datetime' => Carbon::parse('2017-08-25 10:00:00'),\n 'end_datetime' => Carbon::parse('2017-08-25 12:00:00'),\n 'description' => str_random(32),\n 'is_recurring' => false,\n 'is_public' => true,\n ],\n ],\n 'recurring' => [\n [\n 'title' => str_random(16),\n 'start_datetime' => Carbon::parse('2017-08-25 10:00:00'),\n 'end_datetime' => Carbon::parse('2017-08-25 12:00:00'),\n 'description' => str_random(32),\n 'is_recurring' => true,\n 'frequence_number_of_recurring' => 1,\n 'frequence_type_of_recurring' => RecurringFrequenceType::WEEK,\n 'is_public' => true,\n ],\n ],\n ];\n }", "public function date_get_eventlist($date, $gid = 0)\n {\n if (is_array($date)) {\n $from = $this->esc($date[0]);\n $to = $this->esc($date[1]);\n } else {\n $date = $from = $to = $this->esc($date);\n }\n // Support for filtering out events from groups not included in result set according to query type\n $eventListFilter = $this->getQueryTypeFilter($gid);\n $gidFilter = $this->getGroupAndShareFilter($gid);\n\n $return = array();\n $query = 'SELECT DISTINCT e.`id` '\n .', IF(rp.`type`!=\"-\", UNIX_TIMESTAMP(CONCAT(DATE_FORMAT(\"'.$date.'\", \"%Y-%m-%d\"), \" \",DATE_FORMAT(e.`starts`, \"%T\")) ), UNIX_TIMESTAMP(e.`starts`) ) as start'\n .', IF(rp.`type`!=\"-\", UNIX_TIMESTAMP(CONCAT(DATE_FORMAT(\"'.$date.'\", \"%Y-%m-%d\"), \" \",DATE_FORMAT(e.`ends`, \"%T\")) ), UNIX_TIMESTAMP(e.`ends`) ) as end'\n .',e.`starts`, e.`ends`, e.`location`, e.`title`, e.`description`, e.`type`, e.`status`, e.`opaque`, rp.`type` `repeat_type`, rp.`until` `repeat_until`'\n .',IF(fs.`val` IS NULL, \"\", fs.`val`) `colour`'\n .', (SELECT `mode` FROM '.$this->Tbl['cal_reminder'].' WHERE `uid`='.$this->uid.' AND `eid`=e.`id` AND `ref`=\"evt\" LIMIT 1) `warn_mode`'\n .' FROM '.$this->Tbl['cal_repetition'].' rp, '.$this->Tbl['cal_event'].' e'\n .' LEFT JOIN '.$this->Tbl['cal_group'].' eg ON eg.`gid`=e.`gid`'\n .' LEFT JOIN '.$this->Tbl['user_foldersettings'].' fs ON fs.`fid`=e.`gid` AND fs.`handler`=\"calendar\" AND fs.`key`=\"foldercolour\" AND fs.uid='.$this->uid\n .$eventListFilter[0]\n .' WHERE rp.`eid`=e.`id` AND rp.`ref`=\"evt\" AND ('.$gidFilter.')'.$eventListFilter[1]\n .' AND IF (rp.`type`!=\"-\", DATE_FORMAT(e.`starts`, \"%Y%m%d\") <= DATE_FORMAT(\"'.$from.'\", \"%Y%m%d\"), 1)'\n .' AND IF (rp.`type`!=\"-\" AND rp.`until` IS NOT NULL AND rp.`until` != \"0-0-0 0:0:0\", rp.`until`>\"'.$to.'\",1) AND ('\n // Begins or ends today\n .'DATE_FORMAT(e.`starts`, \"%Y%m%d\")=DATE_FORMAT(\"'.$date.'\", \"%Y%m%d\") OR DATE_FORMAT(e.`ends`, \"%Y%m%d\")=DATE_FORMAT(\"'.$date.'\", \"%Y%m%d\") OR '\n // Begins in the past AND ends in the future\n .'( DATE_FORMAT(e.`starts`, \"%Y%m%d\")<=DATE_FORMAT(\"'.$date.'\", \"%Y%m%d\") AND DATE_FORMAT(e.`ends`, \"%Y%m%d\")>=DATE_FORMAT(\"'.$date.'\", \"%Y%m%d\") ) OR '\n // Is an event occuring yearly. Todays date matches the repetition date\n .'(rp.`type`=\"year\" AND (DATE_FORMAT(e.`starts`,\"%m%d\")=DATE_FORMAT(\"'.$date.'\", \"%m%d\") OR DATE_FORMAT(e.`ends`,\"%m%d\")=DATE_FORMAT(\"'.$date.'\",\"%m%d\"))) OR '\n // A monthly event, repetition day is today, repetition month is empty or matches\n .'(rp.`type`=\"month\" AND rp.`repeat`=DATE_FORMAT(\"'.$date.'\", \"%e\") AND (rp.`extra`=\"\" OR FIND_IN_SET(DATE_FORMAT(\"'.$date.'\", \"%c\"), rp.`extra`)>0) ) OR '\n // Monthly event on e.g. the 31st of month with months shorter than 31 days, this is only supported from MySQL 4.1.1 onward\n .'(rp.`type`=\"month\" AND rp.`repeat`=31 AND (rp.`extra`=\"\" OR FIND_IN_SET(DATE_FORMAT(\"'.$date.'\", \"%c\"), rp.`extra`)>0) AND LAST_DAY(\"'.$date.'\")=DATE_FORMAT(\"'.$date.'\", \"%Y-%m-%d\"))'\n // A weekly event, repetition weekday is today\n .' OR (rp.`type`=\"week\" AND rp.`repeat`=DATE_FORMAT(\"'.$date.'\", \"%w\") AND IF(rp.`extra` IN(\"\", \"1\"), 1, ABS(MOD(DATEDIFF(e.`starts`, \"'.$date.'\")/7, rp.`extra`))=0) ) OR '\n // A \"daily\" event, where the bit pattern should match today's weekday\n .'(rp.`type`=\"day\" AND (rp.`repeat`=\"0\" OR SUBSTRING(LPAD(BIN(rp.`repeat`), 8, 0), IF(DATE_FORMAT(\"'.$date.'\", \"%w\")=0, 8, DATE_FORMAT(\"'.$date.'\", \"%w\")+1), 1) = 1 ) )'\n .') ORDER BY `start` ASC';\n $qh = $this->query($query);\n while ($line = $this->assoc($qh)) {\n if ($line['warn_mode'] == '?') {\n $qid2 = $this->query('SELECT `mode` FROM '.$this->Tbl['cal_reminder']\n .' WHERE `uid`='.$this->uid.' AND `eid`='.$line['id'].' AND `ref`=\"evt\" AND `mode` != \"-\" LIMIT 1');\n list ($rem) = $this->fetchrow($qid2);\n $line['warn_mode'] = $rem ? $rem : '-';\n } elseif ($line['warn_mode'] == '' || is_null($line['warn_mode'])) {\n $line['warn_mode'] = '-';\n }\n $return[] = $line;\n }\n return $return;\n }", "function get_calendar_link($contents) {\n $data = array();\n foreach($contents as $k=>$row) :\n $data[$row['day']] = $row['cal_link'];\n endforeach;\n\n return $data;\n }", "function add_event_to_array($dates, $page_data, &$datePaths) {\n foreach ($page_data['dates'] as $date) {\n $start_date = (int)($date['start-date']) / 1000;\n $end_date = (int)($date['end-date']) / 1000;\n $specific_start = date(\"Y-m-d\", $start_date );\n $specific_end = date(\"Y-m-d\", $end_date );\n\n $page_data['time_string'] = $date['time-string'];\n $page_data['specific_start'] = $date['start-date'];\n $page_data['specific_end'] = $date['end-date'];\n $page_data['specific_all_day'] = $date['all-day'];\n $page_data['specific_need_time_zone'] = $date['outside-of-minnesota'];\n if($page_data['specific_need_time_zone'] == true) {\n $time_zone = $date['time-zone'];\n if ($time_zone == \"Hawaii-Aleutian Time\") {\n $page_data['specific_time_zone'] = \"HT\";\n } elseif ($time_zone == \"Alaska Time\") {\n $page_data['specific_time_zone'] = \"AT\";\n } elseif ($time_zone == \"Pacific Time\") {\n $page_data['specific_time_zone'] = \"PT\";\n } elseif ($time_zone == \"Mountain Time\") {\n $page_data['specific_time_zone'] = \"MT\";\n } elseif ($time_zone == \"Eastern Time\") {\n $page_data['specific_time_zone'] = \"ET\";\n } else {\n $page_data['specific_time_zone'] = \"CT\";\n }\n } else {\n $page_data['specific_time_zone'] = \"\";\n }\n\n if($specific_start == $specific_end){\n //Don't need a date range.\n $key = date(\"Y-m-d\", $start_date);\n add_page_to_day($dates[$key], $page_data, $datePaths[$key]);\n }\n // range of dates\n else{\n $page_data['specific_all_day'] = true;\n $start = date(\"Y-n-j\", $start_date);\n // Add 1 day to $end so that the DatePeriod includes the last day in 'end-date'\n $end = date(\"Y-n-j\", strtotime('+1 day', $end_date));\n // Create a date period for each of the dates this event-date spans.\n // This will put it on the calendar each day.\n $period = new DatePeriod(\n new DateTime($start),\n new DateInterval('P1D'),\n new DateTime($end)\n );\n // Add a listng to the array for each event / event date\n $foreach_start_time = microtime(true);\n foreach ($period as $inner_date) {\n $key = $inner_date->format('Y-m-d');\n add_page_to_day($dates[$key], $page_data, $datePaths[$key]);\n }\n\n }\n\n }\n return $dates;\n}", "public function getEntries($day)\n\t{\n\t\t//Get the user id of the currently logged in user\n\t\t$userId = Sentry::getUser()->id;\n\t\t//Get Data\n\t\t$entriesArray = $this->timesheet->getEntries($day,$userId);\n\t\t//Encode to JSON format\n\t\t$entriesJson = json_encode($entriesArray);\n\t\treturn $entriesJson;\n\t}", "function setItems($item,$from,$to,$exc_entries){\n if ($item['allday'] > 0) {\n\t\t\t$item['begin'] = strtotime(strftime('%Y-%m-%d', $item['begin']));\n\t\t\tif ($item['begin'] > $item['end'])\n\t\t\t\t$item['end'] = strtotime(strftime('%Y-%m-%d', $item['begin']).'+1day')-1;\n\t\t\telse\n\t\t\t\t$item['end'] = strtotime(strftime('%Y-%m-%d', $item['end']).'+1day')-1;\n\t\t}\n\n\t\tif($item['event_type'] > 0)\n return $this->setRecurItemsList($item, $from, $to, $exc_entries);\n $itemarray = array();\n if(strtotime(strftime('%Y-%m-%d', $item['begin']))== strtotime(strftime(\"%Y-%m-%d\", $item['end']))){\n\t\t\t$itemarray[]=$item;\n return $itemarray;\n }\n if(($item['end'] && $item['begin'] != $item['end']) AND $this->conf['showMultiDayOnlyOnce'] == 0){\n\t\t\t\t$new_item = $item;\n\t\t\t\t$lastday = $item['end'];\n\t\t\t\t$firstday = $item['begin'];\n\t\t\t\t$time = $item['begin'];\n\t\t\t\t$new_item['mday']= $item['begin'];\n\t\t\t\t$i=0;\n\t\t\t\twhile($firstday<$lastday){\n\t\t\t\t\t$new_item['begin'] = $firstday;\n\t\t\t\t\t$new_item['end'] = $lastday;\n\t\t\t\t\t$new_item['i'] = $i;\n\t\t\t\t\t$itemarray[]= $new_item;\n\t\t\t\t\t$i++;\n\t\t\t\t\t$firstday = strtotime(strftime('%Y-%m-%d', $time).'+'.$i.'days');\n\t\t\t\t}\n } else\n\t\t\t$itemarray[]=$item;\n\t\treturn $itemarray;\n }", "private function makeHTMLIterator()\n\t{\n\t\t$this->weekDayNum = $this->firstDayOfTheMonth+1;\n\t\tfor($this->dayOfMonth; $this->dayOfMonth <= $this->daysInMonth; $this->dayOfMonth++) {\n\t\t\t// Set the default style\n\t\t\t$style = 'class=\"normalDay\"';\n\t\t\t\n\t\t\t// Set the style to a weekend day style\n\t\t\tif(($this->weekDayNum == 8)||($this->weekDayNum == 7)) {\n\t\t\t\t$style = 'class=\"weekendDay\"';\n\t\t\t}\n\t\t\t\n\t\t\t// Set the style to a current day style\n\t\t\tif($this->curDay == $this->dayOfMonth) {\n\t\t\t\t$style = 'class=\"currentDay\"';\n\t\t\t}\n\t\t\t\n\t\t\t// If the current day is Sunday, add a new row\n\t\t\tif($this->weekDayNum == 8) {\n\t\t\t\t$this->calWeekDays .= \"\\t</tr>\\n\\t<tr>\\n\";\n\t\t\t\t$this->weekDayNum = 1;\n\t\t\t}\n\n\t\t\t// Draw days\n\t\t\t$this->calWeekDays .= \"\\t\\t<td valign=\\\"top\\\" \".$style.'>'.$this->dayOfMonth;\n\t\t\t\n\t\t\tif($this->addWeekDay) {\n\t\t\t\t$this->calWeekDays .= \"|\".$this->weekDayNum;\n\t\t\t}\n\t\t\t\n\t\t\tif(strlen($this->addEvtDest) > 0) {\n\t\t\t\t$addevtimg = (strlen($this->addEvtImg) > 0 ? '<img src=\"'.$this->addEvtImg.'\" class=\"addevtimg\" />' : '+');\n\t\t\t\t$this->calWeekDays .= '[<a href=\"'.$this->addEvtDest.'?date='.$this->curYear.'-'.$this->curMonth.'-'.$this->dayOfMonth.'\" title=\"Add Event\" class=\"addevt\">'.$addevtimg.'</a>]';\n\t\t\t}\n\t\t\t\n\t\t\t$this->calWeekDays .= \" \".$this->makeDayEventListHTML().\"</td>\\n\";\n\t\t\t\n\t\t\t$this->weekDayNum++;\n\t\t}\n\t}", "private function getSameDayTicketsByDayList() {\r\n\t\t$sql = \"SELECT dateadd(DAY,0, datediff(day,0, Date_Resolved_UTC)) AS day, count(TicketNbr) as count \";\r\n\t\t$sql .= \"FROM v_rpt_Service \";\r\n\t\t$sql .= \"WHERE Date_Resolved_UTC >= DATEADD(day, -30, GETDATE()) \";\r\n\t\t$sql .= \"AND ( \";\r\n\t\t$sql .= \"status_description LIKE '>%' \";\r\n\t\t$sql .= \"OR status_description LIKE 'Completed' \";\r\n\t\t$sql .= \") \";\r\n\t\t$sql .= \"AND dateadd(DAY,0, datediff(day,0, Date_Resolved_UTC)) = dateadd(DAY,0, datediff(day,0, Date_Entered_UTC)) \";\r\n\t\t$sql .= \"GROUP BY dateadd(DAY,0, datediff(day,0, Date_Resolved_UTC)) \";\r\n\t\t$sql .= \"ORDER BY dateadd(DAY,0, datediff(day,0, Date_Resolved_UTC)) \";\r\n\t\t$result = sqlsrv_query($this->conn, $sql) or die ('Error in SQL: ' . $sql);\r\n\r\n\t\t$i = 0;\r\n\t\twhile($row = sqlsrv_fetch_array($result)) {\r\n\t\t\t$r[$i]['date'] = (strtotime($row['day'])*1000)-6*60*60*1000;\r\n\t\t\t$r[$i]['count'] = (string)$row['count'];\r\n\t\t\t$i++;\r\n\t\t}\r\n\r\n\t\treturn($r);\r\n\t}", "public static function initialize_calendar(){\n \n $event_array[] = array();\n $schedules = \\App\\Event::get();\n if(!empty($schedules)){\n foreach($schedules as $schedule){\n $event_array[] = array(\n 'id' => uniqid(),\n 'title' => $schedule->description,\n 'start' => date('Y-m-d', strtotime($schedule->event_date)),\n 'end' => date('Y-m-d', strtotime($schedule->event_date)),\n 'color' => \"lightblue\",\n \"textEscape\"=> 'false' ,\n 'textColor' => 'black',\n );\n }\n return $get_schedule = json_encode($event_array);\n }\n }", "public function getEvents() : array\n {\n $events = [];\n\n for ($i = 1; $i <= 2; $i++) {\n for ($j = 1; $j <= 4; $j++) {\n for ($k = 1; $k <= 10; $k++) {\n $events []= new Event('install', $i, $j);\n\n if ($k < 3 || $j == 2)\n $events []= new Event('purchase', $i, $j);\n }\n }\n }\n\n return $events;\n }", "private function _calendar_array_two($start_d)\n\t{\n\t $days_array = array();\n $days_url_array = array();\n $days_in_month = days_in_month($this->month, $this->year) + 1;\n \n for($i = $start_d; $i < $days_in_month; $i++):\n array_push($days_array, $i);\n endfor;\n \n foreach($days_array as $day):\n $stampeddate = strtotime($this->year.\"-\".$this->month.\"-\".$day);\n array_push($days_url_array, URL::base(TRUE, TRUE).\"calendar_day/\".date(\"j\", $stampeddate).\"/\".date(\"n\", $stampeddate).\"/\".date(\"Y\", $stampeddate));\n endforeach;\n \n array_push($this->callinks, array_combine($days_array, $days_url_array));\n\t}", "public function get_event_list()\n\t{\n\treturn $this->cal['VEVENT'];\n\t}", "public function daily()\n {\n $days = [];\n if ($this->daily) {\n setlocale(LC_ALL, 'sv_SV');\n $comingDays = array_slice($this->daily[\"data\"], 1, 30);\n foreach ($comingDays as $i => $data) {\n if ($data[\"time\"]) {\n $this->parseDate(\"daily\", $i, $data[\"time\"]);\n $days[$i] = $this->pushInfo(\n $this->daily[\"data\"][$i],\n [\n \"weekday\",\n \"date\",\n \"icon\",\n \"summary\",\n \"temperatureMax\",\n \"apparentTemperatureMax\",\n \"temperatureMin\",\n \"apparentTemperatureMin\",\n \"time\"\n ]\n );\n }\n }\n }\n return $days;\n }", "public function findByDate($date){\r\n $stmt = $this->db->prepare(\"SELECT * FROM event WHERE date =?\");\r\n $stmt->execute(array($date));\r\n\r\n $events_db = $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n\r\n $events = array();\r\n\r\n foreach($events_db as $event){\r\n array_push($events, new Event($event[\"id_event\"], $event[\"type\"], $event[\"name\"],$event[\"moment\"], $event[\"date\"],\r\n $event[\"guests\"], $event[\"children\"], $event[\"sweet_table\"], $event[\"observations\"],\r\n $event[\"restaurant\"], $event[\"phone\"],$event[\"price\"] ));\r\n }\r\n\r\n return $events;\r\n }", "public function getEventsCreatedHere()\n {\n $options = array(\n 'calendar' => $this->shortname,\n 'created_only' => true\n );\n\n # create new events class. On constructor it will get the stuff\n $events = new Events($options);\n return $events;\n }", "public function CreateSelectArray()\n {\n\t\t//Make the array relative to today.... ill do later.\n\t\t$this->TodayDate = \"\";\n\t\t$this->TodaysDate = $this->GetTodaysDate();\t \t\n\t\t$days = 0;\t\t\n \n\t\t$LISTofDATES = [];\n\t\t\n\t\tfor($ya = 2020; $ya < 2040; $ya++) {\n\t\t\t$year = \"\".$ya.\"\";\n\t\t\t$LISTofDATES[$year] = [ \"January\" => 0, \"February\" => 0, \"March\" => 0, \"April\" => 0, \"May\" => 0, \"June\" => 0, \"July\" => 0, \"August\" => 0, \"September\" => 0, \"October\" => 0, \"November\" => 0, \"December\" => 0 ];\t \n\t\t}\n\n\t\tforeach ( $LISTofDATES as $Year => $Months )\n\t\t{\t\t\t\n\t\t\tfor( $Month = 1; $Month <= 12; $Month++ )\n\t\t\t{\n\t\t\t\tif ( $Month == 1 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['January'] = $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 2 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['February'] = $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 3 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['March'] = $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 4 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['April'] = $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 5 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['May'] = $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 6 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['June'] = $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 7 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['July'] = $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 8 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['August'] = $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 9 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['September'] = $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 10 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['October'] = $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 11 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['November']= $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 12 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['December'] = $days;\n\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t}\t \n\t\t}//For each Year done\t\t\n\t\t/*Should have a fully populated array of days for each month in 2 years*/\t\t\n\t\treturn json_encode($LISTofDATES);\t\t\t\t\n }", "private function setDayNames()\n\t{\n\t $range = range(1,7);\n\t $return = array();\n\t foreach($range AS $key => $dayNum)\n\t {\n\t \t$fmt = datefmt_create ($this->locale, null, null, null, IntlDateFormatter::GREGORIAN, 'eee');\n\t \t$key = strtolower(datefmt_format( $fmt , mktime(12,0,0,4,$dayNum+5,2014))); //we force the date so things start on Sunday\n\t \t\n\t \t$fmt = datefmt_create ($this->locale, null, null, null, IntlDateFormatter::GREGORIAN, 'EEEE');\n\t \t$return[$key] = datefmt_format( $fmt , mktime(12,0,0,4,$dayNum+5,2014));\n\t }\n\n\t return $return;\n\t}", "public function getDateList()\n {\n $return = array();\n \n for (\n $i = strtotime($this->from_date); \n $i <= strtotime($this->to_date); \n $i = strtotime('+ 1 day', $i)\n )\n {\n $date = date('Y-m-d', $i);\n $weekday = date('w', $i);\n $weekend = (in_array($weekday, array(0,6))) ? true : false;\n $calendarWeek = (int) date('W', $i); //cast to integer to remove leading 0\n \n $return[$date] = array('date' => $date, 'weekend' => $weekend, 'calendarWeek' => $calendarWeek);\n }\n \n return $return;\n }", "function obj_do_cx_events_list( $events ) {\n\tif (is_array($events) ) {\n echo '<div class=\"event-list-grid\">';\n foreach ($events as $event ) {\n obj_do_cx_event_item_output($event);\n }\n echo '</div>';\n }\n}", "public function buildCalendarList(){\n\t\t\n\t\t$first_day = $this->getFirstDay();\t\t\t\t\t\t//Determine what day of the week the month starts on\n\t\t$current_number_of_days = $this->getNumberOfDays();\t\t//Determine the number of days in the month\n\n\t\t$number_of_previous_days = $first_day;\t\t\t\t\t\t\t\t\t\t//Determine the number of days needed to complete the first week\n\t\t$prev_month_number_of_days = $this->getNumberOfDays($this->getMonth()-1); \t//Determine the number of days in the previous month\n\t\t\n\t\t$_SESSION['month'] = $this->getMonth();\n\t\t$_SESSION['year'] = $this->getYear();\n\t\t$_SESSION['view'] = 'list';\n\t\t\n\t\tob_start();?>\n <table border=\"0\" id=\"events_calendar\" class=\"calendar_list\">\n <?php echo $this->buildCalendarHead() ?>\n <tr>\n <td>\n <?php \n /*** CURRENT MONTH CELLS ***/\n $first_day = $this->getYear() . '-' . $this->getMonth() . '-01';\n $last_day = $this->getYear() . '-' . $this->getMonth() . '-' . $current_number_of_days;\n \n $object = $this->events_ob;\n $month_events = new $object();\n $month_events = $month_events->fetchAll(\"WHERE DATE(\" . $this->events_end_date_field . \") >= '\" . $first_day . \"' AND DATE(\" . $this->events_end_date_field . \") <= '\" . $last_day . \"'\", \"ORDER BY `\" . $this->events_end_date_field . \"` DESC\");\n \n if(count($month_events) > 0){\n for($day = 1; $day <= $current_number_of_days; $day++){\t\t//For each day in the current month\n $full_date = $this->getYear() . '-' . $this->getMonth() . '-' . $day;\n \n $events = $this->buildDayList($full_date);\t//get events for each day\n if(strlen(trim($events))){\n ?>\n <div class=\"day\">\n <?php echo $events; ?>\n </div>\n <?php\n }\n }\n }\n else{?>\n \t\t<h5><?php echo 'No events in ' . $this->getMonthName() . ' ' . $this->getYear();?></h5>\n <?php\n }\n ?> \n </td>\n </tr>\n </table>\n <?php\n return ob_get_clean();\n\t}", "public function getEventInfos() {\n // today will be useful \n $today = new \\DateTime(\"today midnight\");\n \n // get all events\n $events = $this->_machine->plugin(\"DB\")->getEventsFromDB(\"AND events.active = 1\");\n \n // retrieve dates with events\n $dates = [];\n foreach ($events as $ev) {\n $from = new \\DateTimeImmutable($ev[\"time_from\"]);\n $to = new \\DateTimeImmutable($ev[\"time_to\"]);\n $date = $from;\n while ($date <= $to) {\n $dates = $this->_insertDate($dates, $date);\n $date = $date->modify(\"+1 day\");\n }\n }\n \n // retrieve events for today\n $today_events = $this->getEventsForRange(\n $today, $today\n );\n \n // retrieve events for next weekend\n $next_weekend_events = $this->getNextWeekendEvents();\n\n $result = [\n \"tot\" => count($events),\n \"dates\" => $dates,\n \"today\" => $today_events,\n \"next_weekend\" => $next_weekend_events,\n \"events\" => $events\n ];\n \n return $result;\n }", "public function dataProvider_for_generateNextCalendarEvent()\n {\n return [\n [Carbon::parse('2017-08-10'), 4, RecurringFrequenceType::DAY, Carbon::parse('2017-08-14')],\n [Carbon::parse('2017-08-10'), 2, RecurringFrequenceType::WEEK, Carbon::parse('2017-08-24')],\n [Carbon::parse('2017-08-10'), 3, RecurringFrequenceType::MONTH, Carbon::parse('2017-11-10')],\n [Carbon::parse('2017-08-10'), 1, RecurringFrequenceType::YEAR, Carbon::parse('2018-08-10')],\n ];\n }", "private function getEventsOnADate($date)\n {\n # Load EventLinks\n $eventlinks = $this->eventlinks;\n\n # Convert Date to currently displayed month\n $dayDate = $this->getDayDate($date);\n\n # get all events on a day\n $events = array_first($eventlinks, function ($eventDate, $url) use ($dayDate) {\n return $eventDate == $dayDate;\n }, false);\n\n return $events ;\n }", "public function buildDayArray(\\JWeiland\\Events2\\Domain\\Model\\Day $day, \\JWeiland\\Events2\\Domain\\Model\\Time $time)\n {\n $dayArray = array();\n\n // add original day and time object\n $dayArray['day'] = $day;\n $dayArray['time'] = $time;\n\n // add event date as timestamp (for sorting)\n $eventDate = $this->dateTimeUtility->standardizeDateTimeObject($day->getDay());\n $dayArray['eventDate'] = $eventDate->format('U');\n\n // add event time as string (for sorting)\n $dayArray['eventTime'] = $time->getTimeBegin();\n\n // add flag to mark removed days\n $removedExceptions = $this->eventUtility->getExceptionsForDay($this->event, $day, 'remove');\n if ($removedExceptions->count()) {\n $dayArray['isRemoved'] = true;\n } else {\n $dayArray['isRemoved'] = false;\n }\n\n // add exceptions\n $dayArray['infos'] = $this->eventUtility->getExceptionsForDay($this->event, $day);\n\n return $dayArray;\n }", "function create_calendar_array($used_dates){\n\n\t//create array of dates for October with false attributes\n\t$october = array();\n\tfor($day=1;$day<=31;$day++){\n\t\t$october[$day]=FALSE;\n\t}\n\t\n\t//compare used dates to whole month\n\tforeach\t($used_dates as $post_id=>$date){\n\t\t$october[intval($date['day'])][]=$post_id;\n\t}\n\t\t\n\t\n\treturn $october;\n}", "public function calendar_get_list($ews,$startdate, $enddate){\n\t\t// Set init class\n\t\t$request = new EWSType_FindItemType();\n\t\t// Use this to search only the items in the parent directory in question or use ::SOFT_DELETED\n\t\t// to identify \"soft deleted\" items, i.e. not visible and not in the trash can.\n\t\t$request->Traversal = EWSType_ItemQueryTraversalType::SHALLOW;\n\t\t// This identifies the set of properties to return in an item or folder response\n\t\t$request->ItemShape = new EWSType_ItemResponseShapeType();\n\t\t$request->ItemShape->BaseShape = EWSType_DefaultShapeNamesType::DEFAULT_PROPERTIES;//Returns ID_ONLY - DEFAULT_PROPERTIES - ALL_PROPERTIES\n\t\t\n\t\t// Define the timeframe to load calendar items\n\t\t$request->CalendarView = new EWSType_CalendarViewType();\n\t\t$request->CalendarView->StartDate = $startdate; // an ISO8601 date e.g. 2012-06-12T15:18:34+03:00\n\t\t$request->CalendarView->EndDate = $enddate; // an ISO8601 date later than the above\n\t\t\n\t\t// Only look in the \"calendars folder\"\n\t\t$request->ParentFolderIds = new EWSType_NonEmptyArrayOfBaseFolderIdsType();\n\t\t$request->ParentFolderIds->DistinguishedFolderId = new EWSType_DistinguishedFolderIdType();\n\t\t$request->ParentFolderIds->DistinguishedFolderId->Id = EWSType_DistinguishedFolderIdNameType::CALENDAR;\n\t\t\n\t\t// Send request\n\t\t$response = $ews->FindItem($request);\n\t\t\n\t\t// Add events to array if event(s) were found in the timeframe specified\n\t\tif ($response->ResponseMessages->FindItemResponseMessage->RootFolder->TotalItemsInView > 0){\n\t\t $events = $response->ResponseMessages->FindItemResponseMessage->RootFolder->Items->CalendarItem;\t\n\t\t}\n\t\telse{\n\t\t\tif(empty($events)){\n\t\t\t\t$events = \"No Events Found\"; \t\n\t\t\t}\n\t\t}\n\t\t \n\t\treturn $events; //remember to use the php function urlencode on the id and changekey else it will not work when sent to other EWS functions\n\t }", "function getArrEvents(){\n $conn = $this->conectarBD(); \n $i=0;\n $arrEvents = null; \n $sql = \"SELECT * FROM eventos WHERE id_evento IN\n\t\t\t\t\t\t(SELECT id_evento FROM usuarios_eventos \n\t\t\t\t\t\t\tWHERE id_usuario= \".$this->id_user.\" and fecha >= CURDATE());\";\n\t\t$result = mysqli_query($conn, $sql);\n\t\twhile($row=mysqli_fetch_array($result, MYSQL_ASSOC)){ \n\t\t\t$arrEvents [$i]= array('id' => $row['id_evento'], 'description' => $row['descripcion'], 'date' => $row['fecha']);\n\t\t\t$i++;\n }\n\n $this->desconectarBD($conn);\n return $arrEvents;\n }", "protected function getData()\n\t{\n\t\t$today = $this->get(\"events\", array(\n\t\t\t\"per_page\" => -1,\n\t\t\t\"date\" => date(\"Y-m-d\", time())\n\t\t));\n\n\t\t$tomorrow = $this->get(\"events\", array(\n\t\t\t\"per_page\" => -1,\n\t\t\t\"date\" => date(\"Y-m-d\", strtotime(\"+1 day\"))\n\t\t));\n\n\t\t// if it's not friday, return\n\t\tif (date(\"N\", time()) != 5) {\n\t\t\treturn $this->combineData(array($today, $tomorrow));\n\t\t}\n\n\n\t\t// if today is friday, also get sunday and monday's events\n\t\t$sunday = $this->get(\"events\", array(\n\t\t\t\"per_page\" => -1,\n\t\t\t\"date\" => date(\"Y-m-d\", strtotime(\"+2 days\"))\n\t\t));\n\n\t\t$monday = $this->get(\"events\", array(\n\t\t\t\"per_page\" => -1,\n\t\t\t\"date\" => date(\"Y-m-d\", strtotime(\"+3 days\"))\n\t\t));\n\n\t\treturn $this->combineData(array($today, $tomorrow, $sunday, $monday));\n\t}", "private function _calendar_array_three($end_d)\n\t{\n\t $days_array = array();\n $days_url_array = array();\n \n for($i = 1; $i <= $end_d; $i++):\n array_push($days_array, $i);\n endfor;\n \n foreach($days_array as $day):\n $stampeddate = strtotime($this->year.\"-\".$this->month.\"-\".$day);\n array_push($days_url_array, URL::base(TRUE, TRUE).\"calendar_day/\".date(\"j\", $stampeddate).\"/\".date(\"n\", $stampeddate).\"/\".date(\"Y\", $stampeddate));\n endforeach;\n \n array_push($this->callinks, array_combine($days_array, $days_url_array));\n\t}", "function setRecItemArray($from, $to, $item, $getdate,$item_array,$exc_entries) {\n\n\t\tfor($c = $getdate['lastint']*$getdate['interval'];; $c= $c + $getdate['interval']) {\n\t\t\t$time = strtotime(strftime('%Y-%m-%d %H:%M:0 ', $item['begin']).$c.$getdate['steps']);\n\t\t\t$new_item = $item;\n\t\t\t$new_item['begin'] = $time;\n\n\t\t\tif (($time > $to) OR ($getdate['end'] > 0 AND $time >= $getdate['end'])) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif(($time >= $from) AND ($time <= $to) AND ($item['event_type'] != 2 OR $getdate['begin'] <= $time) AND (empty($getdate['end']) OR $time <= $getdate['end'])) {\n\t\t\t\tif($this->checkExcEvents($time, $item, $exc_entries) == FALSE) {\n\t\t\t\t\tif(($item['end'] AND $item['begin'] < $item['end']) AND $this->conf['showMultiDayOnlyOnce'] == 0){\n\t\t\t\t\t\t$lastday = $time+($item['end']-$item['begin']);\n\t\t\t\t\t\t$firstday = $time;\n\t\t\t\t\t\t$new_item['mday']= $time;\n\t\t\t\t\t\t$i=0;\n\t\t\t\t\t\twhile($firstday<$lastday){\n\t\t\t\t\t\t\t$new_item['begin'] = $firstday;\n\t\t\t\t\t\t\t$new_item['end'] = $lastday;\n\t\t\t\t\t\t\t$new_item['i'] = $i;\n\t\t\t\t\t\t\t$item_array[]= $new_item;\n\n\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t\t$firstday = strtotime(strftime('%Y-%m-%d', $time).'+'.$i.'days');\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$new_item['end'] = $item['begin'] > $item['end'] ? 0 : $time + ($item['end'] - $item['begin']);\n\t\t\t\t\t\t$item_array[] = $new_item;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $item_array;\n\t}", "public function actionBookeddays(): array\n {\n $request = Yii::$app->request;\n\n if ($request->isPost) {\n return Appointments::getBookedDays($request->post('service_id'), $request->post('date'));\n }\n \n return [];\n }", "function makeArray($res,$from,$to,$exc_entries){\n /* order result by days */\n\t\t$entries=array();\n\t\twhile ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {\n\t\t\t$row = $this->setItems($row, $from, $to, $exc_entries);\n if (is_array($row)) {\n\t\t\t\tforeach($row as $item){\n\t\t\t\t\t$d = strftime('%d', $item['begin']);\n\t\t\t\t\t$m = strftime('%m', $item['begin']);\n\t\t\t\t\t $entries[$m][$d][] = $item;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $entries;\n\t}", "public static function icalendar() {\r\n $ical = \"BEGIN:VCALENDAR\".PHP_EOL;\r\n $ical .= \"VERSION:2.0\".PHP_EOL;\r\n\r\n $show_personal_bak = Calendar_Events::$calsettings->show_personal;\r\n $show_course_bak = Calendar_Events::$calsettings->show_course;\r\n $show_deadline_bak = Calendar_Events::$calsettings->show_deadline;\r\n $show_admin_bak = Calendar_Events::$calsettings->show_admin;\r\n Calendar_Events::set_calendar_settings(1,1,1,1);\r\n Calendar_Events::get_calendar_settings();\r\n $eventlist = Calendar_Events::get_calendar_events();\r\n Calendar_Events::set_calendar_settings($show_personal_bak,$show_course_bak,$show_deadline_bak,$show_admin_bak);\r\n Calendar_Events::get_calendar_settings();\r\n\r\n $events = array();\r\n foreach ($eventlist as $event) {\r\n $ical .= \"BEGIN:VEVENT\".PHP_EOL;\r\n $startdatetime = new DateTime($event->start);\r\n $ical .= \"DTSTART:\".$startdatetime->format(\"Ymd\\THis\").PHP_EOL;\r\n $duration = new DateTime($event->duration);\r\n $ical .= \"DURATION:\".$duration->format(\"\\P\\TH\\Hi\\Ms\\S\").PHP_EOL;\r\n $ical .= \"SUMMARY:[\".strtoupper($event->event_group).\"] \".$event->title.PHP_EOL;\r\n $ical .= \"DESCRIPTION:\".canonicalize_whitespace(strip_tags($event->content)).PHP_EOL;\r\n if ($event->event_group == 'deadline')\r\n {\r\n $ical .= \"BEGIN:VALARM\".PHP_EOL;\r\n $ical .= \"TRIGGER:-PT24H\".PHP_EOL;\r\n $ical .= \"DURATION:PT10H\".PHP_EOL;\r\n $ical .= \"ACTION:DISPLAY\".PHP_EOL;\r\n $ical .= \"DESCRIPTION:DEADLINE REMINDER for \".canonicalize_whitespace(strip_tags($event->title)).PHP_EOL;\r\n $ical .= \"END:VALARM\".PHP_EOL;\r\n }\r\n $ical .= \"END:VEVENT\".PHP_EOL;\r\n }\r\n $ical .= \"END:VCALENDAR\".PHP_EOL;\r\n return $ical;\r\n }", "function calendar_events($events, $YEAR, $MONTH_START, $DAY_START, $WEEKENDS, $MONTH_END, $DOW, $OVERRIDE, $BOX) {\n $results = array('year'=>$YEAR, 'month_start'=>$MONTH_START, 'month_end'=>$MONTH_END, 'box'=>$BOX);\n $results_counter = array();\n $POSDOW = array(0 => 'sun', 1 => 'mon', 2 => 'tue', 3 => 'wed', 4 => 'thu', 5 => 'fri', 6 => 'sat', 7 => 'sun');\n for($month=$MONTH_START; $month <= $MONTH_END; $month++) {\n $month_len = cal_days_in_month(CAL_GREGORIAN, $month, $YEAR);\n $month_name = cal_info(0);\n $month_name = $month_name['months'][$month];\n $first = date(\"w\", mktime(0, 0, 0, $month, 1, $YEAR));\n for($day=1; $day <= $month_len; $day++) {\n $day_type = '';\n $day_num = '';\n $force_day = False;\n if ($month == $MONTH_START && $day < $DAY_START) {\n } elseif (isset($OVERRIDE[$month][$day])) {\n $day_type = $OVERRIDE[$month][$day];\n $force_day = True;\n } elseif (isset($DOW[$POSDOW[$first]])) {\n $day_type = $DOW[$POSDOW[$first]];\n }\n if ($day_type != '') {\n if (isset($events[$day_type])) {\n if (!isset($results_counter[$day_type])) {\n $results_counter[$day_type] = 1;\n } else {\n $results_counter[$day_type]++;\n }\n }\n if (isset($events[$day_type]) && isset($events[$day_type][$results_counter[$day_type]])) {\n $event = $events[$day_type][$results_counter[$day_type]];\n $day_num = $results_counter[$day_type];\n } else {\n $event = array();\n }\n if ($force_day || !empty($event)) {\n $results[$month][$day] = array('month'=>$month, 'day'=>$day, 'type'=>$day_type, 'type_num'=>$day_num, 'dow'=>$first, 'dow_eng'=>$POSDOW[$first], 'event'=>$event);\n }\n }\n $first++;\n if ($first == 7) {$first = 0;}\n }\n }\n return $results;\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 getEventList() {\n $response = $this->client->get(\n $this->apiUrl . \"events\");\n return $response->json();\n }", "public function toArray()\n {\n $event = array();\n\n if ($this->id !== null) {\n $event['id'] = $this->id;\n }\n\n $event['title'] = $this->title;\n $event['mainTitle'] = $this->title;\n $event['note'] = $this->note;\n $event['start'] = $this->startDatetime->format(\"Y-m-d\\TH:i:sP\");\n\n if ($this->url !== null) {\n $event['url'] = $this->url;\n }\n\n if ($this->project !== null) {\n $event['project']['id'] = $this->project->getId();\n $event['project']['title'] = $this->project->getTitle();\n $event['project']['acronym'] = $this->project->getAcronym();\n $event['mainTitle'] = '['.$this->project->getAcronym().'] '.$this->title;\n }\n\n if ($this->category !== null) {\n $event['categoryId'] = $this->category->getId();\n $event['category']['id'] = $this->category->getId();\n $event['category']['title'] = $this->category->getTitle();\n }\n\n if ($this->bgColor !== null) {\n $event['backgroundColor'] = $this->bgColor;\n $event['borderColor'] = $this->bgColor;\n }\n\n if ($this->fgColor !== null) {\n $event['textColor'] = $this->fgColor;\n }\n\n if ($this->cssClass !== null) {\n $event['className'] = $this->cssClass;\n }\n\n if ($this->endDatetime !== null) {\n $event['end'] = $this->endDatetime->format(\"Y-m-d\\TH:i:sP\");\n }\n\n $event['allDay'] = $this->allDay;\n\n foreach ($this->otherFields as $field => $value) {\n $event[$field] = $value;\n }\n\n return $event;\n }", "function submitted_events_calendar($submission) {\n\tif (submitted_events_starts_with ( $submission->brunelgroup, 'Joint' )) {\n\t\treturn array (\n\t\t\t\t23,\n\t\t\t\t24 \n\t\t);\n\t} elseif (submitted_events_starts_with ( $submission->brunelgroup, '20' )) {\n\t\treturn array (\n\t\t\t\t23 \n\t\t);\n\t} elseif (submitted_events_starts_with ( $submission->brunelgroup, '40' )) {\n\t\treturn array (\n\t\t\t\t24 \n\t\t);\n\t} else {\n\t\treturn array ();\n\t}\n}", "function GetIncidentsByDay($date)\n\t\t{\n\t\t\t$db = new DatabaseManager();\n\t\t\t$db->Connect();\n\t\t\t\n\t\t\t// sanitize inputs\n\t\t\t$date = $db->SanitizeInput($date);\n\t\t\t\n\t\t\t// create the query\n\t\t\t$query = 'SELECT DISTINCT itemid,event,address,pubdate,pubtime,status,itemid,scrapedatetime,agencyid FROM incidents WHERE pubdate=\"' . $date . '\" GROUP BY itemid ORDER BY pubtime DESC';\n\t\t\t\n\t\t\t// execute the query\n\t\t\t$results = $db->Query($query);\n\t\t\t\n\t\t\t// create an array to put our results into\n\t\t\t$incidents = array();\n\t\t\t\n\t\t\t// decode the rows\n\t\t\twhile($r = mysql_fetch_assoc($results)) {\n\t\t\t\n\t\t\t\t$incident = new Incident();\n\t\t\t\n\t\t\t\t// pull the information from the row\n\t\t\t\t$incident->event = $r['event'];\n\t\t\t\t$incident->address = $r['address'];\n\t\t\t\t$incident->pubdate = $r['pubdate'];\n\t\t\t\t$incident->pubtime = $r['pubtime'];\n\t\t\t\t$incident->status = $r['status'];\n\t\t\t\t$incident->itemid = $r['itemid'];\n\t\t\t\t$incident->scrapedatetime = $r['scrapedatetime'];\n\t\t\t\t$incident->agencyid = $r['agencyid'];\n\t\t\t\t\n\t\t\t\t$incidents[] = $incident;\n\t\t\t}\n\t\t\t\n\t\t\treturn $incidents;\n\t\t}", "function _getCalendarData( $year, $month, $day){\t\t\t\t\n\t\t$rows = $this->_listIcalEventsByMonth( $year, $month);\n \t\t\n\t\t$rowcount = count( $rows );\t\t\n\t\t$data = array();\n\t\t$data['year'] = $year;\n\t\t$data['month'] = $month;\n\t\t$month = intval($month);\n\t\tif( $month <= '9' ) {\n\t\t\t$month = '0' . $month;\n\t\t}\n\t\t$data['startday'] = $startday = (int) EventBookingHelper::getConfigValue('calendar_start_date');\t\t\n\t\t// get days in week\n\t\t$data[\"daynames\"] = array();\n\t\tfor( $i = 0; $i < 7; $i++ ) {\n\t\t\t$data[\"daynames\"][$i] = $this->_getDayName(($i+$startday)%7, true );\n\t\t}\t\t\n\t\t$data[\"dates\"]=array();\t\t\n\t\t//Start days\n\t\t$start = (( date( 'w', mktime( 0, 0, 0, $month, 1, $year )) - $startday + 7 ) % 7 );\t\t\n\t\t// previous month\n\t\t$priorMonth = $month-1;\n\t\t$priorYear = $year;\t\t\n\t\tif ($priorMonth <= 0) {\n\t\t\t$priorMonth += 12;\n\t\t\t$priorYear -= 1;\n\t\t}\t\t\t\n\t\t$dayCount=0;\n\t\tfor( $a = $start; $a > 0; $a-- ){\n\t\t\t$data[\"dates\"][$dayCount] = array();\n\t\t\t$data[\"dates\"][$dayCount][\"monthType\"] = \"prior\";\n\t\t\t$data[\"dates\"][$dayCount][\"month\"] = $priorMonth;\n\t\t\t$data[\"dates\"][$dayCount][\"year\"] = $priorYear;\n\t\t\t$data[\"dates\"][$dayCount]['countDisplay'] = 0;\n\t\t\t$dayCount++;\n\t\t}\n\t\tsort($data[\"dates\"]);\n\t\t//Current month\n\t\t$end = date( 't', mktime( 0, 0, 0,( $month + 1 ), 0, $year ));\n\t\tfor( $d = 1; $d <= $end; $d++ ){\n\t\t\t$data[\"dates\"][$dayCount]=array();\n\t\t\t// utility field used to keep track of events displayed in a day!\n\t\t\t$data[\"dates\"][$dayCount]['countDisplay']=0;\n\t\t\t$data[\"dates\"][$dayCount][\"monthType\"]=\"current\";\n\t\t\t$data[\"dates\"][$dayCount][\"month\"]=$month;\n\t\t\t$data[\"dates\"][$dayCount][\"year\"]=$year;\t\t\n\t\t\t\t\t\t\n\t\t\t$t_datenow = $this->_getNow();\n\t\t\t$now_adjusted = $t_datenow->toUnix(true);\n\t\t\tif( $month == strftime( '%m', $now_adjusted)\n\t\t\t&& $year == strftime( '%Y', $now_adjusted)\n\t\t\t&& $d == strftime( '%d', $now_adjusted)) {\n\t\t\t\t$data[\"dates\"][$dayCount][\"today\"]=true;\n\t\t\t}else{\n\t\t\t\t$data[\"dates\"][$dayCount][\"today\"]=false;\n\t\t\t}\n\t\t\t$data[\"dates\"][$dayCount]['d']=$d;\t\t\t\t\t\t\n\t\t\t$data[\"dates\"][$dayCount]['events'] = array();\n\t\t\tif( $rowcount > 0 ){\n\t\t\t\tforeach ($rows as $row) {\n\t\t\t\t\t\t$date_of_event = explode('-',$row->event_date);\n\t\t\t\t\t\t$date_of_event = (int)$date_of_event[2];\t\t\t\t\t\t\n\t\t\t\t\t\tif ($d == $date_of_event ){\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$i=count($data[\"dates\"][$dayCount]['events']);\n\t\t\t\t\t\t\t$data[\"dates\"][$dayCount]['events'][$i] = $row;\n\t\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t$dayCount++;\n\t\t}\t\n \t\n\t\t// followmonth\n\t\t$days \t= ( 7 - date( 'w', mktime( 0, 0, 0, $month + 1, 1, $year )) + $startday ) %7;\n\t\t$d\t\t= 1;\n\t\t$followMonth = $month+1;\n\t\t$followYear = $year;\n\t\tif ($followMonth>12) {\n\t\t\t$followMonth-=12;\n\t\t\t$followYear+=1;\n\t\t}\n\t\t$data[\"followingMonth\"]=array();\n\t\tfor( $d = 1; $d <= $days; $d++ ) {\n\t\t\t$data[\"dates\"][$dayCount]=array();\n\t\t\t$data[\"dates\"][$dayCount][\"monthType\"]=\"following\";\n\t\t\t$data[\"dates\"][$dayCount][\"month\"]=$followMonth;\n\t\t\t$data[\"dates\"][$dayCount][\"year\"]=$followYear;\n\t\t\t$data[\"dates\"][$dayCount]['countDisplay']=0;\n\t\t\t$dayCount++;\n\t\t}\n\t\treturn $data;\t\t\n\t}", "function getEvents() {\n return [];\n }", "Public function getEvents()\n\t{\n\t\t$result=$this->M_calendar->getEvents();\n\t\techo json_encode($result);\n\t}", "public function calendarStyleDayData($day, $dayArray) {\n /**\n * DayDataArray\n */\n $dayDataArray = array (\n \"Sun\" => 1,\n \"Mon\" => 2,\n \"Tue\" => 3,\n \"Wed\" => 4,\n \"Thu\" => 5,\n \"Fri\" => 6,\n \"Sat\" => 7\n );\n /**\n * check the day array data is available in $day\n */\n if (in_array ( $day, $dayArray )) {\n return $dayDataArray [$day];\n }\n }", "function getEventsArray($from,$to,$exc_entries){\n\t\t$select_fields = \t'tx_tdcalendar_events.*';\n\t\t$select_fields .=\t', tx_tdcalendar_categories.title as category';\n\t\t$select_fields .= \t', tx_tdcalendar_categories.color as catcolor';\n\t\t$select_fields .= \t', tx_tdcalendar_locations.location as location_name';\n\t\t$select_fields .= \t', tx_tdcalendar_organizer.name as organizer_name';\n\n\t\t$from_table =\t\t'((tx_tdcalendar_events'; \n\t\t$from_table .= \t\t' INNER JOIN tx_tdcalendar_categories';\n $from_table .= \t\t' ON tx_tdcalendar_events.category = tx_tdcalendar_categories.uid)';\n\t\t$from_table .= \t\t' LEFT JOIN tx_tdcalendar_locations';\n\t\t$from_table .= \t\t' ON tx_tdcalendar_events.location_id = tx_tdcalendar_locations.uid)';\n\t\t$from_table .= \t\t' LEFT JOIN tx_tdcalendar_organizer';\n\t\t$from_table .= \t\t' ON tx_tdcalendar_events.organizer_id = tx_tdcalendar_organizer.uid';\n\n\t\t$where_clause = \t\"((tx_tdcalendar_events.begin < '\".$from.\"' AND tx_tdcalendar_events.end >= '\".$from.\"')\";\n\t\t$where_clause .= \t\" OR (tx_tdcalendar_events.begin >= '\".$from.\"' AND tx_tdcalendar_events.begin < '\".$to.\"')\";\n\n\t\t$where_clause.= \t\" OR(event_type > 0 AND event_type < 5 AND ((begin < '\".$from.\"' AND rec_end_date = 0) OR (begin < '\".$from.\"' AND rec_end_date >= '\".$from.\"') )))\";\n\n\t\t$where_clause .= \t$this->enableFieldsCategories;\n\t\t$where_clause .=\t$this->enableFieldsEvents;\n\n\t\tif ($this->conf['currCat'] AND !$this->conf['hideCategorySelection'])\n\t\t\t$where_clause .= ' AND tx_tdcalendar_events.category = '.$this->conf['currCat'];\n\t\telse\n\t\t\t$where_clause .= \t$this->getCategoryQuery('tx_tdcalendar_events.category');\n\n\t\t$where_clause .=\t$this->getPagesQuery();\n\n\t\t$orderBy =\t\t\t'tx_tdcalendar_events.begin, tx_tdcalendar_events.uid';\n\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t$select_fields,\n\t\t\t$from_table,\n\t\t\t$where_clause,\n\t\t\t$groupBy='',\n\t\t\t$orderBy,\n\t\t\t$limit=''\n\t\t);\n\n\t\treturn $this->makeArray($res, $from, $to, $exc_entries);\n\t}", "public function getAllEvents(){\n\t\t//$events = EventPage::get()->sort('Date', 'DESC')->limit(5);\n\t\t$limit = 10;\n\n\t\t$items = DataObject::get(\"EventPage\", \"Date > NOW()\", \"Date\", null, $limit);\n\t\treturn $items;\n\n\t}", "public function getTimeEventsList(){\n return $this->_get(8);\n }", "public function getItems($params)\n\t{\n\t\t$eventcats = $params->get('eventcats', array());\n\t\t$eventcount = $params->get('eventcount', 5);\n\t\t$order = $params->get('order', 1);\n\t\t$Itemid = BabioonEventRouteHelper::getItemid('events');\n\t\t$db = JFactory::getDBO();\n\t\t$user\t\t= JFactory::getUser();\n\t\t$now = gmdate(\"Y-m-d\");\n\n\t\t$query = $db->getQuery(true);\n\t\t$query->select('MONTHNAME(e.sdate) AS mon')\n\t\t\t\t->select('YEAR(e.sdate) AS year')\n\t\t\t\t->select('e.*')\n\t\t\t\t->select('cc.title AS cctitle')\n\t\t\t\t->from('#__babioonevent_events AS e')\n\t\t\t\t->from('#__categories AS cc')\n\t\t\t\t->where('(e.sdate >= \"' . $now . '\" OR e.edate >= \"' . $now . '\")')\n\t\t\t\t->where('e.catid = cc.id')\n\t\t\t\t->where('e.enabled = 1')\n\t\t\t\t->where('cc.published = 1')\n\t\t\t\t->order('e.sdate, cc.title');\n\n\t\tif (!empty($eventcats) && trim($eventcats[0]) != \"\")\n\t\t{\n\t\t\t$catfilter = 'catid in (' . implode(',', $eventcats) . ') ';\n\t\t\t$query->where($catfilter);\n\t\t}\n\n\t\t// Implement View Level Access\n\t\tif (!$user->authorise('core.admin'))\n\t\t{\n\t\t\t$groups = implode(',', $user->getAuthorisedViewLevels());\n\t\t\t$query->where('cc.access IN (' . $groups . ')');\n\t\t}\n\n\t\t$db->setQuery($query, 0, $eventcount);\n\n\t\t$c = $db->loadObjectList();\n\t\t$ccount = count($c);\n\t\t$link = 'index.php?option=com_babioonevent&view=event' . '&Itemid=' . $Itemid . '&id=';\n\n\t\t$categorylist = array();\n\t\t$nr = array();\n\n\t\tfor ($i = 0; $i < $ccount; $i ++)\n\t\t{\n\t\t\t$obj = new stdClass;\n\t\t\t$crow = $c [$i];\n\t\t\t$obj = $crow;\n\t\t\t$obj->link = $link . $crow->babioonevent_event_id;\n\t\t\t$nr [] = $obj;\n\t\t\t$categorylist [$obj->catid] = $obj->cctitle;\n\t\t}\n\n\t\tif ($order == 2)\n\t\t{\n\t\t\t$result = array();\n\n\t\t\tif (!empty($eventcats))\n\t\t\t{\n\t\t\t\tforeach (explode(',', $eventcats) as $elm)\n\t\t\t\t{\n\t\t\t\t\tforeach ($nr as $r)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($elm == $r->catid)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$result [] = $r;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (asort($categorylist, SORT_LOCALE_STRING) === true)\n\t\t\t\t{\n\t\t\t\t\tforeach ($categorylist as $key => $value)\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ($nr as $r)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($key == $r->catid)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$result [] = $r;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$result = $nr;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$result = $nr;\n\t\t}\n\n\t\treturn $result;\n\t}", "function getExceptionEventsArray($from,$to){\n\t\t$select_fields = \t'tx_tdcalendar_exc_events.*';\n\t\t$select_fields .= \t', tx_tdcalendar_exc_categories.uid as category';\n\t\t$select_fields .= \t', tx_tdcalendar_exc_categories.title as cattitle';\n\t\t$select_fields .= \t', tx_tdcalendar_exc_categories.color as color';\n\t\t$select_fields .= \t', tx_tdcalendar_exc_categories.bgcolor as bgcolor';\n\t\t$from_table =\t\t'tx_tdcalendar_exc_events INNER JOIN tx_tdcalendar_exc_categories';\n\t\t$from_table .= \t\t' ON tx_tdcalendar_exc_events.exc_categories = tx_tdcalendar_exc_categories.uid';\n\t\t$where_clause = \t\"(tx_tdcalendar_exc_events.begin < '\".$from.\"' AND tx_tdcalendar_exc_events.end >= '\".$from.\"')\";\n\t\t$where_clause .= \t\" OR (tx_tdcalendar_exc_events.begin >= '\".$from.\"' AND tx_tdcalendar_exc_events.begin < '\".$to.\"')\";\n\t\t$where_clause .=\t$this->enableFieldsExcEvents;\n\t\t$where_clause .=\t$this->enableFieldsExcCategories;\n\t\t$where_clause .=\t$this->getPagesQuery(' tx_tdcalendar_exc_events');\n\t\t$orderBy =\t\t\t'tx_tdcalendar_exc_events.begin, tx_tdcalendar_exc_events.uid';\n\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t$select_fields,\n\t\t\t$from_table,\n\t\t\t$where_clause,\n\t\t\t$groupBy='',\n\t\t\t$orderBy,\n\t\t\t$limit=''\n\t\t);\n\n\t\t$exc_events = array();\n\t\twhile ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {\n\t\t\t$exc_events['category'][$row['category']][$row['uid']] = $row['title'];\n\t\t\t$row = $this->setExcItems($row, $from, $to);\n foreach($row as $item){\n $d = strftime('%d', $item['begin']);\n $m = strftime('%m', $item['begin']);\n\n $exc_events[$m][$d][] = $item;\n }\n\t\t}\n\t\treturn $exc_events;\n\t}", "public static function index($day)\n {\n $todo = ORM::for_table('todo')\n ->where_raw(\"`completed` IS NULL\")\n ->order_by_asc('order')\n ->find_many();\n \n $tasklist = '';\n foreach ($todo as $task) {\n $task->age = self::age($task);\n set('task', $task);\n $tasklist .= partial('snippets/todo.html.php'); \n }\n \n return partial(\"todolist.html.php\", array('tasklist' => $tasklist));\n }", "public function dayview()\n\t{\n\t\t$input = JFactory::getApplication()->input;\n\t\t$db = JFactory::getDbo();\n\t\t$view = $this->getView('pbbooking','html');\n\n\t\t$dateparam = $input->get('dateparam',date_create(\"now\",new DateTimeZone(PBBOOKING_TIMEZONE))->format(DATE_ATOM),'string');\n\t\t$view->dateparam = date_create($dateparam,new DateTimezone(PBBOOKING_TIMEZONE));\n\t\t$cals = $db->setQuery('select * from #__pbbooking_cals')->loadObjectList();\n\t\t$config = $db->setQuery('select * from #__pbbooking_config')->loadObject();\n\t\t$opening_hours = json_decode($config->trading_hours,true);\n\t\t$start_time_arr = str_split($opening_hours[(int)$view->dateparam->format('w')]['open_time'],2);\n\t\t$end_time_arr = str_split($opening_hours[(int)$view->dateparam->format('w')]['close_time'],2);\n\n\t\t$view->cals = array();\n\t\t$view->opening_hours = $opening_hours[(int)$view->dateparam->format('w')];\n\t\t$view->day_dt_start = date_create($dateparam,new DateTimezone(PBBOOKING_TIMEZONE));\n\t\t$view->day_dt_end = date_create($dateparam,new DateTimezone(PBBOOKING_TIMEZONE));\n\t\t$view->day_dt_start->setTime($start_time_arr[0],$start_time_arr[1],0);\n\t\t$view->day_dt_end->setTime($end_time_arr[0],$end_time_arr[1],0);\n\t\t$view->config = $config;\n\n\t\t//step back one time slot on $view->day_dt_end\n\t\t$view->dt_last_slot = clone $view->day_dt_end;\n\t\t$view->dt_last_slot->modify('- '.$config->time_increment.' minutes');\n\n\t\tforeach ($cals as $i=>$cal) {\n\t\t\t$view->cals[$i] = new Calendar();\n\t\t\t$view->cals[$i]->loadCalendarFromDbase(array($cal->id)); \n\t\t}\n\n\t\t$view->setLayout('dayview');\n\t\t$view->display();\n\t\t\n\t}", "public function index()\n {\n return $this->eventsToArray(Event::all());\n }", "function EventsTable()\n {\n return \n $this->ItemsTableDataGroup\n (\n \"\",\n 0,\n $this->ApplicationObj()->EventGroup,\n $this->ApplicationObj()->Events\n );\n }", "public function eventsSchema($rows,$userid)\n\t{\n\t\t$lang = JFactory::getLanguage();\n\t\t$lang->load('com_easysocial', JPATH_ADMINISTRATOR, '', true);\n\t\t$result = array();\t\t\n\t\tforeach($rows as $ky=>$row)\n\t\t{\n\t\t\tif(isset($row->id))\n\t\t\t{\t\n\t\t\t\t$item = new EventsSimpleSchema();\n\t\t\t\t\n\t\t\t\t/*Get Cover POsition */\n\t\t\t\t$grpobj = FD::event( $row->id );\n\t\t\t\t$x = $grpobj->cover->x;\n\t\t\t\t$y = $grpobj->cover->y;\n\t\t\t\t$item->cover_position = $x.'% '.$y.'%';\n\t\t\t\t\n\t\t\t\t$item->id=$row->id;\n\t\t\t\t$item->title=$row->title;\n\t\t\t\t$item->description=$row->description;\n\t\t\t\t//getting all event images\n\t\t\t\tforeach($row->avatars As $ky=>$avt)\n\t\t\t\t{\n\t\t\t\t\t$avt_key = 'avatar_'.$ky;\n\t\t\t\t\t$item->$avt_key = JURI::root().'media/com_easysocial/avatars/event/'.$row->id.'/'.$avt;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$fst = JFile::exists('media/com_easysocial/avatars/event/'.$row->id.'/'.$avt);\n\t\t\t\t\t//set default image\n\t\t\t\t\tif(!$fst)\n\t\t\t\t\t{\n\t\t\t\t\t\t$item->$avt_key = JURI::root().'media/com_easysocial/defaults/avatars/event/'.$ky.'.png';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//end\n\t\t\t\n\t\t\t\t$item->params=json_decode($row->params);\n\t\t\t\t$item->details=$row->meta;\n\t\t\t\t//ios format date\n\t\t\t\tif(!empty($item->details->start))\n\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t$item->details->ios_start = $this->listDate($item->details->start);\n\t\t\t\t\t$item->start_date = date('D M j Y h:i a',strtotime($row->meta->start));\t\t\t\t\t\n\t\t\t\t\t$item->start_date_unix = strtotime($row->meta->start);\n\t\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\tif( $item->details->end == \"0000-00-00 00:00:00\")\n\t\t\t\t{\n\t\t\t\t\t$item->details->ios_end = null;\n\t\t\t\t\t$item->end_date = null;\n\t\t\t\t\t$item->end_date_unix = null;\n\t\t\t\t}\n\t\t\t\telse\t\t\t\t\n\t\t\t\t{\n\t\t\t\t\t$item->details->ios_end = $this->listDate($item->details->end);\n\t\t\t\t\t$item->end_date = date('D M j Y h:i a ',strtotime($row->meta->end));\n\t\t\t\t\t$item->end_date_unix = strtotime($row->meta->end);\n\t\t\t\t}\n\n\t\t\t\t$item->start_date_unix = strtotime($row->meta->start);\n\t\t\t\t$item->end_date_unix = strtotime($row->meta->end);\n\t\t\t\t\n\t\t\t\t$event = FD::model( 'events' );\n\t\t\t\t$item->guests= $event->getTotalAttendees($row->id);\n\t\t\t\t\n\t\t\t\t$item->featured=$row->featured;\n\t\t\t\t$item->created=$row->created;\n\t\t\t\t$item->categoryId=$row->category_id;\n\t\t\t\t$item->type=$row->type;\n\t\t\t\n\t\t\t\t//get category name\n\t\t\t\t$category \t= FD::table('EventCategory');\n\t\t\t\t$category->load($row->category_id);\t\t\t\t\n\t\t\t\t$item->category_name = $category->get('title');\n\t\t\t\t\n\t\t\t\t//event guest status\n\t\t\t\t$eventobj=FD::event($row->id);\t\n\t\t\t\t$item->isAttending=$eventobj->isAttending($userid);\n\t\t\t\t$item->isNotAttending=$eventobj->isNotAttending($userid);\n\t\t\t\t$item->isOwner=$eventobj->isOwner($userid);\n\t\t\t\t$item->isPendingMember = $eventobj->isPendingMember($userid);\n\t\t\t\t$item->isMember=$eventobj->isMember($userid);\t\n\t\t\t\t$item->isRecurring=$eventobj->isRecurringEvent(); \n\t\t\t\t$item->hasRecurring=$eventobj->hasRecurringEvents();\t\t\t\t\n\t\t\t\t\n\t\t\t\t$event_owner = reset($row->admins);\n\t\t\t\tif($event_owner)\n\t\t\t\t{\n\t\t\t\t$item->owner = $this->createUserObj($event_owner)->username;\n\t\t\t\t$item->owner_id = $event_owner;\n\t\t\t\t} \t\t\n\t\t\t\t//$item->owner=$user->username;\n\t\t\t\t\n\t\t\t\t$item->isMaybe=in_array($userid,$row->maybe);\n\t\t\t\t$item->total_guest=$eventobj->getTotalGuests();\n\t\t\t\t// this node is for past events\n\t\t\t\t$item->isoverevent=$eventobj->isOver();\n\t\t\t\tif($item->end_date == null){\n\t\t\t\t\t$item->isoverevent = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$item->location=$row->address;\n\t\t\t\t$item->longitude=$row->longitude;\n\t\t\t\t$item->latitude=$row->latitude;\n\t\t\t\t$NameLocationLabel = $item->location;\n\t\t\t\t$item->event_map_url_andr = \"geo:\".$item->latitude.\",\".$item->longitude.\"?q=\".$NameLocationLabel;\n\t\t\t\t$item->event_map_url_ios = \"http://maps.apple.com/?q=\".$NameLocationLabel.\"&sll=\".$item->latitude.\",\".$item->longitude;\t\t\t\t\n\t\t\t\t$item->share_url = JURI::root().$eventobj->getPermalink(true, false, 'item', false);\n\t\t\t\t//getting cover image of event\n\t\t\t\t$eve = FD::table( 'Cover' );\n\t\t\t\t$eve->type='event';\n\t\t\t\t$eve->photo_id=$row->cover->photo_id;\n\t\t\t\t$item->cover_image=$eve->getSource();\n\t\t\t\t//end\n\t\t\t\t$item->isInvited = false;\n\t\t\t\t$event = FD::event($row->id);\n\t\t\t\t$guest = $event->getGuest($userid);\n\t\t\t\tif ($guest->invited_by) {\t\n\t\t\t\t\t$item->isInvited = true;\n\t\t\t\t}\n\t\t\t\t$result[] = $item;\n\t\t\t}\n\t\t}\n\t\treturn($result);\t\n\t}", "private function getClosedTicketsByDayList() {\r\n\t\t$sql = \"SELECT dateadd(DAY,0, datediff(day,0, Date_Resolved_UTC)) AS day, count(TicketNbr) as count \";\r\n\t\t$sql .= \"FROM v_rpt_Service \";\r\n\t\t$sql .= \"WHERE Date_Resolved_UTC >= DATEADD(day, -30, GETDATE()) \";\r\n\t\t$sql .= \"AND ( \";\r\n\t\t$sql .= \"status_description LIKE '>%' \";\r\n\t\t$sql .= \"OR status_description LIKE 'Completed' \";\r\n\t\t$sql .= \")\";\r\n\t\t$sql .= \"GROUP BY dateadd(DAY,0, datediff(day,0, Date_Resolved_UTC)) \";\r\n\t\t$sql .= \"ORDER BY dateadd(DAY,0, datediff(day,0, Date_Resolved_UTC)) \";\r\n\t\t$result = sqlsrv_query($this->conn, $sql) or die ('Error in SQL: ' . $sql);\r\n\r\n\t\t$i = 0;\r\n\t\twhile($row = sqlsrv_fetch_array($result)) {\r\n\t\t\t$r[$i]['date'] = (strtotime($row['day'])*1000)-6*60*60*1000;\r\n\t\t\t$r[$i]['count'] = (string)$row['count'];\r\n\t\t\t$i++;\r\n\t\t}\r\n\r\n\t\treturn($r);\r\n\t}", "function build_feed(array $calendars, $start = \"today\", $end = \"tomorrow\") {\n $feed = array();\n foreach( $calendars as $name => $id ) {\n try { $raw_feed = fetch_feed($id, strtotime($start), strtotime($end)); }\n catch( Exception $e ) {\n $feed[$name] = array();\n continue;\n }\n\n $clean_feed = array();\n\n foreach( $raw_feed['items'] as $item ) {\n array_push($clean_feed, calendar_scrub($item));\n }\n\n usort($clean_feed, function($a, $b) {\n return strtotime($a['dateTime']['start']) - strtotime($b['dateTime']['start']);\n });\n\n $feed[$name] = $clean_feed;\n }\n\n return json_encode($feed);\n}", "private function makeDayHeadings()\n\t{\n\t\t$this->outArray['dayheadings'] = array();\n\t\t$this->dayHeadings .= \"\\t<tr>\\n\";\n\t\tforeach($this->daysArray as $day) {\n\t\t\t$this->dayHeadings .= \"\\t\\t<th class=\\\"dayHeading\\\">$day</th>\\n\";\n\t\t\tarray_push($this->outArray['dayheadings'], $day);\n\t\t}\n\t\t$this->dayHeadings .= \"\\t</tr>\\n\";\n\t\t\n\t\t$this->calWeekDays .= $this->dayHeadings;\n\t}", "private function createinstallevent()\n {\n $cat = CategoryUtil::getCategoryByPath('/__SYSTEM__/Modules/PostCalendar/Events');\n\n $eventArray = array(\n 'title' => $this->__('PostCalendar Installed'),\n 'hometext' => ':text:' . $this->__('On this date, the PostCalendar module was installed. Thank you for trying PostCalendar! This event can be safely deleted if you wish.'),\n 'alldayevent' => true,\n 'eventstatus' => PostCalendar_Entity_CalendarEvent::APPROVED,\n 'sharing' => PostCalendar_Entity_CalendarEvent::SHARING_GLOBAL,\n 'website' => 'https://github.com/craigh/PostCalendar/wiki',\n 'categories' => array(\n 'Main' => $cat['id']));\n\n try {\n $event = new PostCalendar_Entity_CalendarEvent();\n $event->setFromArray($eventArray);\n $this->entityManager->persist($event);\n $this->entityManager->flush();\n } catch (Exception $e) {\n return LogUtil::registerError($e->getMessage());\n }\n\n return true;\n }", "function display_day()\n{\n global $phpcid, $phpc_cal, $phpc_script, $phpcdb, $day, $month, $year;\n\n\t$monthname = month_name($month);\n\n $results = $phpcdb->get_occurrences_by_date($phpcid, $year, $month, $day);\n\n\t$have_events = false;\n\n\t$html_table = tag('table', attributes('class=\"phpc-main\"'),\n\t\t\ttag('caption', \"$day $monthname $year\"),\n\t\t\ttag('thead',\n\t\t\t\ttag('tr',\n\t\t\t\t\ttag('th', __('Title')),\n\t\t\t\t\ttag('th', __('Time')),\n\t\t\t\t\ttag('th', __('Description'))\n\t\t\t\t )));\n\tif($phpc_cal->can_modify()) {\n\t\t$html_table->add(tag('tfoot',\n\t\t\t\t\ttag('tr',\n\t\t\t\t\t\ttag('td',\n\t\t\t\t\t\t\tattributes('colspan=\"4\"'),\n\t\t\t\t\t\t\tcreate_hidden('action', 'event_delete'),\n\t\t\t\t\t\t\tcreate_hidden('day', $day),\n\t\t\t\t\t\t\tcreate_hidden('month', $month),\n\t\t\t\t\t\t\tcreate_hidden('year', $year),\n\t\t\t\t\t\t\tcreate_submit(__('Delete Selected'))))));\n\t}\n\n\t$html_body = tag('tbody');\n\n\twhile($row = $results->fetch_assoc()) {\n\t\n\t\t$event = new PhpcOccurrence($row);\n\n\t\tif(!$event->can_read())\n\t\t\tcontinue;\n\n\t\t$have_events = true;\n\n\t\t$eid = $event->get_eid();\n\t\t$oid = $event->get_oid();\n\n\t\t$html_subject = tag('td');\n\n\t\tif($event->can_modify()) {\n\t\t\t$html_subject->add(create_checkbox('eid[]',\n\t\t\t\t\t\t$eid));\n\t\t}\n\n\t\t$html_subject->add(create_occurrence_link(tag('strong',\n\t\t\t\t\t\t$event->get_subject()),\n\t\t\t\t\t'display_event', $oid));\n\n\t\tif($event->can_modify()) {\n\t\t\t$html_subject->add(\" (\");\n\t\t\t$html_subject->add(create_event_link(\n\t\t\t\t\t\t__('Modify'), 'event_form',\n\t\t\t\t\t\t$eid));\n\t\t\t$html_subject->add(')');\n\t\t}\n\n\t\t$html_body->add(tag('tr',\n\t\t\t\t\t$html_subject,\n\t\t\t\t\ttag('td', $event->get_time_span_string()),\n\t\t\t\t\ttag('td', attributes('class=\"phpc-desc\"'), $event->get_desc())));\n\t}\n\n\t$html_table->add($html_body);\n\n\tif($phpc_cal->can_modify()) {\n\t\t$output = tag('form',\n\t\t\t\tattributes(\"action=\\\"$phpc_script\\\"\"),\n\t\t\t\t$html_table);\n\t} else {\n\t\t$output = $html_table;\n\t}\n\n\tif(!$have_events)\n\t\t$output = tag('h2', __('No events on this day.'));\n\n\treturn tag('', create_day_menu(), $output);\n}", "function getIcsEventsAsArray($file) {\n $icalString = file_get_contents ( $file );\n $icsDates = array ();\n /* Explode the ICs Data to get datas as array according to string ‘BEGIN:’ */\n $icsData = explode ( \"BEGIN:\", $icalString );\n /* Iterating the icsData value to make all the start end dates as sub array */\n foreach ( $icsData as $key => $value ) {\n $icsDatesMeta [$key] = explode ( \"\\n\", $value );\n } \n /* Itearting the Ics Meta Value */\n foreach ( $icsDatesMeta as $key => $value ) {\n foreach ( $value as $subKey => $subValue ) {\n /* to get ics events in proper order */\n $icsDates = $this->getICSDates ( $key, $subKey, $subValue, $icsDates );\n } \n } \n return $icsDates;\n }", "function eventcard_array($array, $pmv, $eventid, $__repeatInterval){\n\t\t\t\t$array['evorsvp']= array(\n\t\t\t\t\t'event_id' => $eventid,\n\t\t\t\t\t'value'=>'tt',\n\t\t\t\t\t'__repeatInterval'=>(!empty($__repeatInterval)? $__repeatInterval:0)\n\t\t\t\t);\n\t\t\t\treturn $array;\n\t\t\t}", "private function getWeekDays()\n {\n $time = date('Y-m-d', strtotime($this->year . '-' . $this->month . '-' . $this->day));\n if ($this->view == 'week') {\n $sunday = strtotime('last sunday', strtotime($time . ' +1day'));\n $day = date('j', $sunday);\n $startingDay = date('N', $sunday);\n $cnt = 6;\n }\n if ($this->view == 'day') {\n $day = $this->day;\n $cnt = 0;\n }\n\n $this->week_days = array();\n $mlen = $this->daysMonth[intval($this->month) - 1];\n if ($this->month == 2 && ((($this->year % 4) == 0) && ((($this->year % 100) != 0) || (($this->year % 400) == 0)))) {\n $mlen = $mlen + 1;\n }\n $h = \"<tr class='\" . $this->labelsClass . \"'>\";\n $h .= \"<td>&nbsp;</td>\";\n for ($j = 0; $j <= $cnt; $j++) {\n $cs = $cnt == 0 ? 3 : 1;\n $h .= \"<td colspan='$cs'>\";\n if ($this->view == 'day') {\n $getDayNumber = date('w', strtotime($time));\n } else {\n $getDayNumber = $j;\n }\n if ($day <= $mlen) {\n } else {\n $day = 1;\n }\n $h .= $this->dayLabels[$getDayNumber] . ' ';\n $h .= intval($day);\n $this->week_days[] = $day;\n $day++;\n $h .= \"</td>\";\n }\n\n $h .= \"</tr>\";\n return $h;\n }", "public function getEvents();", "public function getEvents();", "private function getData()\n {\n $data = array();\n\n $data = array_merge($data,\n $this->services->CalendarData->currentUserData(),\n $this->services->Common->subPageName( $this->timber->translator->trans('Calendar') . \" | \" ),\n $this->services->Common->runtimeScripts( 'calendar' ),\n $this->services->Common->injectScripts(array(\n 'projectsEvents' => $this->services->CalendarData->projectsEvents(),\n 'tasksEvents' => $this->services->CalendarData->tasksEvents(),\n 'projectsEventsColor' => '#ecf0f1',\n 'projectsEventsTextColor' => '#2c3e50',\n 'tasksEventsColor' => '#bdc3c7',\n 'tasksEventsTextColor' => '#2980b9',\n 'calEvent_id' => $this->timber->translator->trans('ID'),\n 'calEvent_iden' => $this->timber->translator->trans('Identifier'),\n 'calEvent_type' => $this->timber->translator->trans('Type'),\n 'calEvent_mi_id' => $this->timber->translator->trans('Milestone ID'),\n 'calEvent_mi_title' => $this->timber->translator->trans('Milestone Title'),\n 'calEvent_pr_id' => $this->timber->translator->trans('Project ID'),\n 'calEvent_owner_id' => $this->timber->translator->trans('Owner ID'),\n 'calEvent_assign_to' => $this->timber->translator->trans('Assignee ID'),\n 'calEvent_assign_to_name' => $this->timber->translator->trans('Assignee Name'),\n 'calEvent_assign_to_email' => $this->timber->translator->trans('Assignee Email'),\n 'calEvent_title' => $this->timber->translator->trans('Title'),\n 'calEvent_description' => $this->timber->translator->trans('Description'),\n 'calEvent_status' => $this->timber->translator->trans('Status'),\n 'calEvent_progress' => $this->timber->translator->trans('Progress'),\n 'calEvent_priority' => $this->timber->translator->trans('Priority'),\n 'calEvent_start_at' => $this->timber->translator->trans('Start at'),\n 'calEvent_end_at' => $this->timber->translator->trans('End at'),\n 'calEvent_created_at' => $this->timber->translator->trans('Created at'),\n 'calEvent_updated_at' => $this->timber->translator->trans('Updated at'),\n 'calEvent_currency' => $this->timber->translator->trans('Currency'),\n 'calEvent_reference' => $this->timber->translator->trans('Reference'),\n 'calEvent_ref_id' => $this->timber->translator->trans('Reference ID'),\n 'calEvent_version' => $this->timber->translator->trans('Version'),\n 'calEvent_budget' => $this->timber->translator->trans('Budget'),\n 'calEvent_tax_value' => $this->timber->translator->trans('Tax Value'),\n 'calEvent_tax_type' => $this->timber->translator->trans('Tax Type'),\n 'calEvent_discount_value' => $this->timber->translator->trans('Discount Value'),\n 'calEvent_discount_type' => $this->timber->translator->trans('Discount Type'),\n 'calEvent_attach' => $this->timber->translator->trans('Attachments'),\n 'calEvent_owners' => $this->timber->translator->trans('Owners'),\n 'calEvent_staff' => $this->timber->translator->trans('Staff'),\n 'calEvent_clients' => $this->timber->translator->trans('Clients'),\n 'calEvent_staff_ids' => $this->timber->translator->trans('Staff IDs'),\n 'calEvent_clients_ids' => $this->timber->translator->trans('Clients IDs'),\n ))\n );\n\n return $data;\n }", "public function getDateEntries()\n\t{\n\t\t//Get Date\n\t\t$dateSubmit = \\Input::get('eventDate_submit');\n\t\t//Get Week\n\t\t$week = $this->timesheet->getWeek($dateSubmit);\n\t\t//Get the user id of the currently logged in user\n\t\t$userId = \\Sentry::getUser()->id;\n\t\t//Get Tasks List\n\t\t$tasks = $this->timesheet->getIndex($userId);\n\t\t//Get Entries\n\t\t$entries = $this->timesheet->getEntries($dateSubmit,$userId);\n\t\treturn \\View::make('dashboard.timesheet.view')\n\t\t\t\t\t->with('week',$week)\n\t\t\t\t\t->with('tasks',$tasks)\n\t\t\t\t\t->with('selectedDate',$dateSubmit)\n\t\t\t\t\t->with('entries', $entries);\n\t}", "public function getEvents()\n {\n $startDate = new \\DateTime(\"-1 months\");\n $endDate = new \\DateTime(\"+3 months\");\n\n $repo = EntityUtils::getRepository(\"EventLegacy\");\n\n //Use a different function for getting events for a student\n if ($this->user_context->isStudent()) {\n return $this->getStudentEvents($startDate, $endDate);\n }\n\n $eventResults = $repo->getStudentEventsByProgram($this->user_context->program->id, $startDate, $endDate, $this->filters);\n $quickAddResults = $repo->getStudentQuickAddShiftsByProgram($this->user_context->program->id, $startDate, $endDate, $this->filters);\n\n return ['events' => $eventResults, 'quick_add_shifts' => $quickAddResults];\n }", "public function findAll($restaurant){\r\n $stmt = $this->db->prepare(\"SELECT id_event, type, name, moment, date, guests, children, sweet_table, \r\n observations, restaurant, phone, price FROM event WHERE restaurant =? ORDER BY date\");\r\n $stmt->execute(array($restaurant));\r\n\r\n $events_db = $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n $events = array();\r\n\r\n foreach ($events_db as $event){\r\n array_push($events, new Event($event[\"id_event\"], $event[\"type\"], $event[\"name\"], $event[\"moment\"], $event[\"date\"],\r\n $event[\"guests\"], $event[\"children\"], $event[\"sweet_table\"], $event[\"observations\"],\r\n $event[\"restaurant\"], $event[\"phone\"], $event[\"price\"]));\r\n }\r\n\r\n return $events;\r\n }", "public static function makeDateOptions(array &$items)\n\t{\n\t\t$_items = array();\n\t\tforeach ($items as $item)\n\t\t{\n\t\t\t$_items[] = PBEventsHelper::formatDateHours($item->date,\n\t\t\t\t\t\tarray($item->hstart, $item->hend), \n\t\t\t\t\t\t$item->henable);\n\t\t}\n\t\treturn $_items;\n\t}", "private function createSchedule()\n {\n $days = DisplayScheduleDay::singleton()->dbObject('Day')->enumValues();\n foreach ($days as $day) {\n $scheduleDay = DisplayScheduleDay::create();\n $scheduleDay->Day = $day;\n $this->Schedule()->add($scheduleDay);\n }\n }", "public function get_timetable() {\n $week = $this->qc->timetable_get_week();\n $days = array();\n\n for ($i=2; $i < count($week); $i++) {\n $day = $this->qc->timetable_get_day($week[$i]);\n array_push($days, $day);\n }\n }", "function getActivityForDay($day){\n\t\t\treturn new articleEventSet( $this->articleEvents->getDay($day) );\n\t\t}", "public function findDaysWithEvents($id) {\n \n if (is_numeric($id)) {\n $this->db->where('venueId', $id);\n } elseif (is_array($id)) {\n $this->db->where_in('venueId', $id);\n }\n \n $this->db->select('timeDay');\n $this->db->distinct();\n $query = $this->db->get('event');\n $results = $query->result();\n \n $days = array();\n foreach ($results as $result) {\n $days[] = $result->timeDay;\n }\n \n return $days;\n }", "public function toArray($request)\n {\n return [\n 'day_name' => $this->day_name,\n 'date' => $this->date,\n 'delivery_times' => $this->deliveryTimes\n ];\n }", "private function build()\n\t{\n\t\t$locations = locations::getLocations();\n\t\t$currDate = date('Y/m/d');\n\n\t\t$nextDate = strtotime($currDate) + (86400*count(self::$schedule));\n\n\t\twhile (count(self::$schedule) < 7) {\n\n\t\t\t$day = new stdClass();\n\n\t\t\t$day->date = date('Y/m/d',$nextDate);\n\t\t\t$day->location = $locations[rand(0, max(0, (count($locations)-1)))];\n\n\t\t\tself::$schedule[] = $day;\n\n\t\t\t$nextDate += 86400;\n\n\t\t}\n\n\t\t$this->storeSchedule();\n\t}", "public function toArray()\n {\n $event = array();\n\n if ($this->id !== null) {\n $event['id'] = \"$this->id\";\n }\n\n $event['title'] = $this->activite->getDesignation();\n $event['start'] = $this->heureDebut->format(\"H:i:s\");\n if ($this->heureFin !== null) {\n $event['end'] = $this->heureFin->format(\"H:i:s\");\n }\n $event['resourceId'] = $this->enfant->getId() . \"-\" . $this->jour->getId();\n\n return $event;\n }", "private function buildBodyDay()\n {\n\n $events = $this->events;\n $h = \"\";\n for ($i = $this->start_hour; $i < $this->end_hour; $i++) {\n for ($t = 0; $t < 2; $t++) {\n $h .= \"<tr>\";\n $min = $t == 0 ? \":00\" : \":30\";\n $h .= \"<td class='$this->timeClass'>\" . date('g:ia', strtotime($i . $min)) . \"</td>\";\n for ($k = 0; $k < 1; $k++) {\n $wd = $this->week_days[$k];\n $time_r = $this->year . '-' . $this->month . '-' . $wd . ' ' . $i . ':00:00';\n $min = $t == 0 ? '' : '+30 minute';\n $time_1 = strtotime($time_r . $min);\n $time_2 = strtotime(date('Y-m-d H:i:s', $time_1) . '+30 minute');\n $dt = date('Y-m-d H:i:s', $time_1);\n $h .= \"<td colspan='3' data-datetime='$dt'>\";\n $h .= $this->dateWrap[0];\n\n $hasEvent = false;\n foreach ($events as $key => $event) {\n //EVENT TIME AND DATE\n $time_e = strtotime($key);\n if ($time_e >= $time_1 && $time_e < $time_2) {\n $hasEvent = true;\n $h .= $this->buildEvents(false, $event);\n }\n }\n $h .= !$hasEvent ? '&nbsp;' : '';\n $h .= $this->dateWrap[1];\n $h .= \"</td>\";\n }\n $h .= \"</tr>\";\n }\n }\n $h .= \"</tbody>\";\n $h .= \"</table>\";\n\n $this->html .= $h;\n }", "private static function get_events() {\n\t\treturn array(\n\t\t\t'formidable_send_usage' => 'weekly',\n\t\t);\n\t}", "public function index()\n {\n $event = Event::latest()->first();\n\n $dates = CarbonPeriod::create($event->from, $event->to);\n\n $dates = collect($dates->toArray())->filter(function($date) use($event){\n\n $day = strtolower(Carbon::parse($date)->format('l'));\n\n return in_array($day, $event->days);\n\n })->map(function($date) use($event) {\n return $date->format('Y-m-d');\n })->values();\n\n return response()->json([\n 'dates' => $dates,\n 'title' => $event->name,\n 'class' => 'bg-blue-500 text-white mx-2'\n ], 200);\n }", "public function findAllTimesArray()\n {\n\n $times = $this->entityManager\n ->createQueryBuilder()\n ->select('t, d.date')\n ->from('SiowebDummyBundle:Test', 'd')\n ->leftJoin('SiowebDummyBundle:Time', 't', 'WITH', 'd.id = t.dateid')\n ->where('d.id LIKE t.dateid')\n ->andWhere('t.count != 0')\n ->orderBy('t.time', 'ASC')\n ->getQuery()\n ->getResult();\n\n\n $avaibledates = array();\n\n $i = 0;\n foreach ($times as $time ) {\n $avaibledates[$i]['date'] = $time['date']->format('d.m.Y');\n $avaibledates[$i]['time'] = $time[0]->getTime();\n $avaibledates[$i]['id'] = $time[0]->getId();\n $avaibledates[$i]['description'] = $time[0]->getDescription();\n $i++;\n }\n\n #return $avaibledates;\n\n return $avaibledates;\n }", "function getReadDays($day = null){\n\t\t\tif (get_class($day)=='rupu_timestamp'){\n\t\t\t\t$day = $day->getDate();\n\t\t\t}\n\t\t\t\n\t\t\t$readPapers = new newspaperSet();\n\t\t\t$dates = $this->getActivityDates();\n\t\t\tforeach ($dates as $date){\n\t\t\t\tif ($day){\n\t\t\t\t\tif ($date == $day){\n\t\t\t\t\t\t$d = new newspaper($date,$this,$this->db);\n\t\t\t\t\t\t$readPapers->add($d);\n\t\t\t\t\t}\t\t\n\t\t\t\t} else {\n\t\t\t\t\t$d = new newspaper($date,$this,$this->db);\n\t\t\t\t\t$readPapers->add($d);\t\t\t\t\t\n\t\t\t\t}\t\t\t\n\t\t\t}\t\t\t\n\t\t\treturn $readPapers;\n\t\t}", "public function getDataCollectionEventsList() {\n return $this->_get(8);\n }", "public function getArticlesByDayOfWeek(string $day): array {\n\t\t$selected = [];\n\t\tforeach($this->articles as $a){\n\t\t\t/* @var $a \\Article */\n\t\t\tif(date_format($a->getPublishDate(), \"l\") == $day){\n\t\t\t\t$selected[] = $a;\n\t\t\t}\n\t\t}\n\t\treturn $selected;\n\t}" ]
[ "0.6671869", "0.6494189", "0.6369033", "0.63672584", "0.62191", "0.6172734", "0.61669075", "0.6152314", "0.61197495", "0.6069392", "0.59930086", "0.5899545", "0.5881705", "0.5879517", "0.5862057", "0.5854946", "0.5847806", "0.5821305", "0.5820824", "0.5739708", "0.5734776", "0.5721672", "0.56829286", "0.5669619", "0.56557584", "0.5638684", "0.5633027", "0.5621582", "0.5610921", "0.5595896", "0.55712116", "0.5521069", "0.55036247", "0.54965645", "0.5489775", "0.5489155", "0.5489005", "0.548634", "0.54831225", "0.54826534", "0.548258", "0.5478787", "0.54671615", "0.5464213", "0.5457505", "0.54539704", "0.5448782", "0.5447618", "0.54398", "0.5418458", "0.5414061", "0.54013205", "0.53879035", "0.5387762", "0.5366366", "0.53378564", "0.533165", "0.5325713", "0.5323339", "0.53090674", "0.53064317", "0.5302281", "0.5296755", "0.52881616", "0.52871925", "0.52668005", "0.52663493", "0.5262888", "0.52577496", "0.5256721", "0.5255189", "0.5242087", "0.52377355", "0.52316386", "0.5227461", "0.5225173", "0.5209486", "0.51954085", "0.51919097", "0.51724935", "0.51724935", "0.51724833", "0.5167017", "0.51535296", "0.5147255", "0.51464343", "0.5145473", "0.5138452", "0.5138", "0.51377714", "0.5134603", "0.5132862", "0.5127656", "0.5127541", "0.51200974", "0.51160216", "0.5114085", "0.51126546", "0.5108317", "0.51039845" ]
0.7613199
0
Iterate calendar days (HTML version) Loop through the calendar days for the given month and create cells for each day. Populate each cell with it's given events (if any) and output as a complete table contents.
private function makeHTMLIterator() { $this->weekDayNum = $this->firstDayOfTheMonth+1; for($this->dayOfMonth; $this->dayOfMonth <= $this->daysInMonth; $this->dayOfMonth++) { // Set the default style $style = 'class="normalDay"'; // Set the style to a weekend day style if(($this->weekDayNum == 8)||($this->weekDayNum == 7)) { $style = 'class="weekendDay"'; } // Set the style to a current day style if($this->curDay == $this->dayOfMonth) { $style = 'class="currentDay"'; } // If the current day is Sunday, add a new row if($this->weekDayNum == 8) { $this->calWeekDays .= "\t</tr>\n\t<tr>\n"; $this->weekDayNum = 1; } // Draw days $this->calWeekDays .= "\t\t<td valign=\"top\" ".$style.'>'.$this->dayOfMonth; if($this->addWeekDay) { $this->calWeekDays .= "|".$this->weekDayNum; } if(strlen($this->addEvtDest) > 0) { $addevtimg = (strlen($this->addEvtImg) > 0 ? '<img src="'.$this->addEvtImg.'" class="addevtimg" />' : '+'); $this->calWeekDays .= '[<a href="'.$this->addEvtDest.'?date='.$this->curYear.'-'.$this->curMonth.'-'.$this->dayOfMonth.'" title="Add Event" class="addevt">'.$addevtimg.'</a>]'; } $this->calWeekDays .= " ".$this->makeDayEventListHTML()."</td>\n"; $this->weekDayNum++; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function draw_calendar($month,$year,$events = array()){\n\t\t$dayofweek = array('<td class=\"calendar-header\">Sunday</td>',\n\t\t'<td class=\"calendar-header\">Monday</td>',\n\t\t'<td class=\"calendar-header\">Tuesday</td>',\n\t\t'<td class=\"calendar-header\">Wednesday</td>',\n\t\t'<td class=\"calendar-header\">Thursday</td>',\n\t\t'<td class=\"calendar-header\">Friday</td>',\n\t\t'<td class=\"calendar-header\">Saturday</td>');\n\t\t\n\t\t/* draw table\n\t\t\t- fill top row with array using implode */\n\t\t$calendar = '<table class=\"calendar\"><tr class=\"calendar-row\">'.implode($dayofweek).'</tr>';\n\t\t\n\t\t// mktime(hour,minute,second,month,day,year);\n\t\t// figures out the which day of the week 1st is based on provided $month and $year\n\t\t$startDay = date('w',mktime(0,0,0,$month,1,$year)); // return days of the week\n\t\t$days = cal_days_in_month(CAL_GREGORIAN,$month,$year);\n\t\t$daysFilled;\n\t\t$counter = 0;\n\t\n\t\t/* row 2 */\n\t\t$calendar.= '<tr class=\"calendar-row\">';\n\t\n\t\t/* print \"blank\" days until the first of the month */\n\t\tfor($i = 0; $i < $startDay; $i++){\n\t\t\t$calendar.= '<td class=\"calendar-empty\"> </td>';\n\t\t\t$daysFilled++;\n\t\t}\n\t\n\t\t/* for loop to add days */\n\t\tfor($i = 1; $i <= $days; $i++):\n\t\t\t$calendar.= '<td class=\"calendar-day\"><div style=\"position:relative;height:100px;\"><div class=\"date\">'.$i.'</div>';\n\t\t\t\n\t\t\tif ($i < 10){\n\t\t\t\t$i = \"0\".$i;\n\t\t\t}\n\t\t\t\n\t\t\t// input event into calendar\n\t\t\t$eventDay = $year.'-'.$month.'-'.$i;\n\t\t\t\tif(isset($events[$eventDay])) { // if there are events on $eventDay\n\t\t\t\t\tforeach($events[$eventDay] as $eventid) { // for each event, add to calendar\n\t\t\t\t\t\t$mysql = new mysql();\n\t\t\t\t\t\t$tripdetail = $mysql->get_specifictrip($eventid);\n\t\t\t\t\t\t$calendar.= '<div class=\"event\"';\n\t\t\t\t\t\tif($tripdetail[approval]==0){\n\t\t\t\t\t\t\t$calendar.=' style=\"color:#FF6666;\"';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif($tripdetail[approval]==-1){\n\t\t\t\t\t\t\t$calendar.=' style=\"color:#6666E0; text-decoration:line-through;\"';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$calendar.='><a style=\"text-decoration:none; color:inherit;\" href=\"?page=detail2&trip='.$tripdetail[eventid].'\"';\n\t\t\t\t\t\t$calendar.='>'.$tripdetail[destination].'</div>';\n\t\t\t\t\t}\n\t\t\t\t\t$calendar.='</td>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse {\n\t\t\t\t\t$calendar.= '<p> </p><p> </p></div></td>';\n\t\t\t\t}\n\n\t\t\tif($startDay == 6){ // if the month starts on Saturday, end current row\n\t\t\t\t$calendar.= '</tr>';\n\t\t\t\tif(($counter+1) != $days){ // if there are still days left to fill, new row\n\t\t\t\t\t$calendar.= '<tr class=\"calendar-row\">';\n\t\t\t\t}\n\t\t\t\t$startDay = -1;\n\t\t\t\t$daysFilled = 0;\n\t\t\t}\n\t\t\t$daysFilled++;\n\t\t\t$startDay++;\n\t\t\t$counter++;\n\t\tendfor;\n\t\n\t\t// finish filling in the rest of the days with blanks\n\t\tif($daysFilled < 8 && $daysFilled !=1):\n\t\t\tfor($x = 1; $x <= (8 - $daysFilled); $x++):\n\t\t\t\t$calendar.= '<td class=\"calendar-empty\"> </td>';\n\t\t\tendfor;\n\t\tendif;\n\t\n\t\t// end row, table\n\t\t$calendar.= '</tr></table>';\n\t\t\n\t\t\n\t\t// return HTML code for calendar\n\t\treturn $calendar;\n\t}", "public function getMonthAsTable()\n {\n // Get all days to put in calendar\n $days = $this->getDaysAsArray();\n\n // Start table\n $html = \"<table class='table'><thead><tr>\";\n\n // Add weekday names to table head\n foreach (array_keys($this->weekdayIndexes) as $key) {\n $html .= \"<th>{$key}</th>\";\n }\n $html .= \"</tr></thead><tbody>\";\n\n // Add day numbers to table body\n for ($i = 0; $i < count($days); $i++) {\n // New row at start of week\n $html .= $i % 7 === 0 ? \"<tr>\" : \"\";\n\n if (($days[$i] > $i + 7) || ($days[$i] < $i - 7)) {\n // Add class 'outside' if number is part of previous or next month\n $html .= \"<td class='outside'>\";\n } elseif ($i % 7 === 6) {\n // Add class 'red' to Sundays\n $html .= \"<td class='red'>\";\n } else {\n $html .= \"<td>\";\n }\n $html .= \"{$days[$i]}</td>\";\n // Close row at end of week\n $html .= $i % 7 === 6 ? \"</tr>\" : \"\";\n }\n $html .= \"</tbody></table>\";\n return $html;\n }", "function build_month_days($month, $number_of_days) {\r\n $days_of_month_html = '<tr class=\"week-day\">';\r\n \r\n $days_in_week = 1;\r\n for ($days = 1; $days <= $number_of_days; $days++) {\r\n\r\n // Split the weeks in rows\r\n if ($days_in_week == 8) {\r\n $days_of_month_html = $days_of_month_html . '</tr>';\r\n $days_of_month_html = $days_of_month_html . '<tr class=\"week-day\">'; \r\n $days_in_week = 1;\r\n }\r\n\r\n // Render days of week in the correct position\r\n if ($days == 1) {\r\n $initial_position = get_first_day($month);\r\n for($i = 1; $i < $initial_position; $i++) {\r\n $days_of_month_html = $days_of_month_html . '<td class=\"day\"></td>';\r\n $days_in_week++;\r\n }\r\n if ($initial_position == 1) {\r\n $days_of_month_html = $days_of_month_html . '<td class=\"day sunday\">'.$days.'</td>';\r\n } else {\r\n $days_of_month_html = $days_of_month_html . '<td class=\"day\">'.$days.'</td>';\r\n }\r\n } else if ($days_in_week == 1) {\r\n $days_of_month_html = $days_of_month_html . '<td class=\"day sunday\">'.$days.'</td>';\r\n } else {\r\n $days_of_month_html = $days_of_month_html . '<td class=\"day\">'.$days.'</td>'; \r\n }\r\n\r\n $days_in_week++;\r\n }\r\n $days_of_month_html = $days_of_month_html . '</tr>';\r\n \r\n return $days_of_month_html;\r\n }", "public function buildCalendarList(){\n\t\t\n\t\t$first_day = $this->getFirstDay();\t\t\t\t\t\t//Determine what day of the week the month starts on\n\t\t$current_number_of_days = $this->getNumberOfDays();\t\t//Determine the number of days in the month\n\n\t\t$number_of_previous_days = $first_day;\t\t\t\t\t\t\t\t\t\t//Determine the number of days needed to complete the first week\n\t\t$prev_month_number_of_days = $this->getNumberOfDays($this->getMonth()-1); \t//Determine the number of days in the previous month\n\t\t\n\t\t$_SESSION['month'] = $this->getMonth();\n\t\t$_SESSION['year'] = $this->getYear();\n\t\t$_SESSION['view'] = 'list';\n\t\t\n\t\tob_start();?>\n <table border=\"0\" id=\"events_calendar\" class=\"calendar_list\">\n <?php echo $this->buildCalendarHead() ?>\n <tr>\n <td>\n <?php \n /*** CURRENT MONTH CELLS ***/\n $first_day = $this->getYear() . '-' . $this->getMonth() . '-01';\n $last_day = $this->getYear() . '-' . $this->getMonth() . '-' . $current_number_of_days;\n \n $object = $this->events_ob;\n $month_events = new $object();\n $month_events = $month_events->fetchAll(\"WHERE DATE(\" . $this->events_end_date_field . \") >= '\" . $first_day . \"' AND DATE(\" . $this->events_end_date_field . \") <= '\" . $last_day . \"'\", \"ORDER BY `\" . $this->events_end_date_field . \"` DESC\");\n \n if(count($month_events) > 0){\n for($day = 1; $day <= $current_number_of_days; $day++){\t\t//For each day in the current month\n $full_date = $this->getYear() . '-' . $this->getMonth() . '-' . $day;\n \n $events = $this->buildDayList($full_date);\t//get events for each day\n if(strlen(trim($events))){\n ?>\n <div class=\"day\">\n <?php echo $events; ?>\n </div>\n <?php\n }\n }\n }\n else{?>\n \t\t<h5><?php echo 'No events in ' . $this->getMonthName() . ' ' . $this->getYear();?></h5>\n <?php\n }\n ?> \n </td>\n </tr>\n </table>\n <?php\n return ob_get_clean();\n\t}", "function build_calendar($month,$year,$dateArray) {\r\n $daysOfWeek = array('S','M','T','W','T','F','S');\r\n\r\n // What is the first day of the month in question?\r\n $firstDayOfMonth = mktime(0,0,0,$month,1,$year);\r\n\r\n // How many days does this month contain?\r\n $numberDays = date('t',$firstDayOfMonth);\r\n\r\n // Retrieve some information about the first day of the\r\n // month in question.\r\n $dateComponents = getdate($firstDayOfMonth);\r\n\r\n // What is the name of the month in question?\r\n $monthName = $dateComponents['month'];\r\n\r\n // What is the index value (0-6) of the first day of the\r\n // month in question.\r\n $dayOfWeek = $dateComponents['wday'];\r\n\r\n // Create the table tag opener and day headers\r\n\r\n $calendar = \"<table class='table table-bordered'>\";\r\n $calendar .= \"<caption>$monthName $year</caption>\";\r\n $calendar .= \"<tr>\";\r\n\r\n // Create the calendar headers\r\n\r\n foreach($daysOfWeek as $day) {\r\n $calendar .= \"<th class='header'>$day</th>\";\r\n } \r\n\r\n // Create the rest of the calendar\r\n\r\n // Initiate the day counter, starting with the 1st.\r\n\r\n $currentDay = 1;\r\n\r\n $calendar .= \"</tr><tr>\";\r\n\r\n // The variable $dayOfWeek is used to\r\n // ensure that the calendar\r\n // display consists of exactly 7 columns.\r\n\r\n if ($dayOfWeek > 0) { \r\n $calendar .= \"<td colspan='$dayOfWeek'>&nbsp;</td>\"; \r\n }\r\n \r\n $month = str_pad($month, 2, \"0\", STR_PAD_LEFT);\r\n \r\n while ($currentDay <= $numberDays) {\r\n\r\n // Seventh column (Saturday) reached. Start a new row.\r\n\r\n if ($dayOfWeek == 7) {\r\n\r\n $dayOfWeek = 0;\r\n $calendar .= \"</tr><tr>\";\r\n\r\n }\r\n \r\n $currentDayRel = str_pad($currentDay, 2, \"0\", STR_PAD_LEFT);\r\n \r\n $date = \"$year-$month-$currentDayRel\";\r\n\t\tif($date == date('Y-m-d')){\r\n\t\t\t$calendar .= \"<td class='col-md-1 col-xs-1' rel='$date' bgcolor='#ADD8E6'>$currentDay<br/>\";\r\n\t\t}else{\r\n\t\t\t$calendar .= \"<td class='col-md-1 col-xs-1' rel='$date'>$currentDay<br/>\";\r\n\t\t}\r\n \r\n\t\t $sql = mysql_query(\"SELECT * FROM leavesys.leave_details WHERE date = '\".$date.\"'\");\r\n\t\t while($result = mysql_fetch_array($sql)){\r\n\t\t\t $sql2 = mysql_query(\"SELECT * FROM user WHERE id = '\".$result['applicant_id'].\"'\");\r\n\t\t\t $result2 = mysql_fetch_assoc($sql2);\r\n\t\t\t\tif($result['half'] == 1){\r\n\t\t\t\t\t$c_content = \" (am)\";\r\n\t\t\t\t}else if($result['half'] == 2){\r\n\t\t\t\t\t$c_content = \" (pm)\";\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$c_content = \"\";\r\n\t\t\t\t}\r\n\t\t\t\t$calendar .= $result2['country_code'].\" - \".$result2['name'].$c_content.\"<br/>\";\r\n\t\t }\r\n\t\t $sql1 = mysql_query(\"SELECT * FROM leavesys.holiday WHERE date = '\".$date.\"'\");\r\n\t\t while($result1 = mysql_fetch_array($sql1)){\r\n\t\t\t if($result1['country'] == \"al\"){\r\n\t\t\t\t $calendar .= \"<font color='blue;'>\".$result1['name'].\"</font><br/>\";\r\n\t\t\t }else{\r\n\t\t\t\t$calendar .= \"<font color='blue;'>\".$result1['name'].\" (\".$result1['country'].\")</font><br/>\";\r\n\t\t\t }\r\n\t\t }\r\n\t\t $calendar .= \"</td>\";\r\n\r\n // Increment counters\r\n \r\n $currentDay++;\r\n $dayOfWeek++;\r\n\r\n }\r\n \r\n \r\n\r\n // Complete the row of the last week in month, if necessary\r\n\r\n if ($dayOfWeek != 7) { \r\n \r\n $remainingDays = 7 - $dayOfWeek;\r\n $calendar .= \"<td colspan='$remainingDays'>&nbsp;</td>\"; \r\n\r\n }\r\n \r\n $calendar .= \"</tr>\";\r\n\r\n $calendar .= \"</table>\";\r\n\r\n return $calendar;\r\n\r\n}", "function display_day()\n{\n global $phpcid, $phpc_cal, $phpc_script, $phpcdb, $day, $month, $year;\n\n\t$monthname = month_name($month);\n\n $results = $phpcdb->get_occurrences_by_date($phpcid, $year, $month, $day);\n\n\t$have_events = false;\n\n\t$html_table = tag('table', attributes('class=\"phpc-main\"'),\n\t\t\ttag('caption', \"$day $monthname $year\"),\n\t\t\ttag('thead',\n\t\t\t\ttag('tr',\n\t\t\t\t\ttag('th', __('Title')),\n\t\t\t\t\ttag('th', __('Time')),\n\t\t\t\t\ttag('th', __('Description'))\n\t\t\t\t )));\n\tif($phpc_cal->can_modify()) {\n\t\t$html_table->add(tag('tfoot',\n\t\t\t\t\ttag('tr',\n\t\t\t\t\t\ttag('td',\n\t\t\t\t\t\t\tattributes('colspan=\"4\"'),\n\t\t\t\t\t\t\tcreate_hidden('action', 'event_delete'),\n\t\t\t\t\t\t\tcreate_hidden('day', $day),\n\t\t\t\t\t\t\tcreate_hidden('month', $month),\n\t\t\t\t\t\t\tcreate_hidden('year', $year),\n\t\t\t\t\t\t\tcreate_submit(__('Delete Selected'))))));\n\t}\n\n\t$html_body = tag('tbody');\n\n\twhile($row = $results->fetch_assoc()) {\n\t\n\t\t$event = new PhpcOccurrence($row);\n\n\t\tif(!$event->can_read())\n\t\t\tcontinue;\n\n\t\t$have_events = true;\n\n\t\t$eid = $event->get_eid();\n\t\t$oid = $event->get_oid();\n\n\t\t$html_subject = tag('td');\n\n\t\tif($event->can_modify()) {\n\t\t\t$html_subject->add(create_checkbox('eid[]',\n\t\t\t\t\t\t$eid));\n\t\t}\n\n\t\t$html_subject->add(create_occurrence_link(tag('strong',\n\t\t\t\t\t\t$event->get_subject()),\n\t\t\t\t\t'display_event', $oid));\n\n\t\tif($event->can_modify()) {\n\t\t\t$html_subject->add(\" (\");\n\t\t\t$html_subject->add(create_event_link(\n\t\t\t\t\t\t__('Modify'), 'event_form',\n\t\t\t\t\t\t$eid));\n\t\t\t$html_subject->add(')');\n\t\t}\n\n\t\t$html_body->add(tag('tr',\n\t\t\t\t\t$html_subject,\n\t\t\t\t\ttag('td', $event->get_time_span_string()),\n\t\t\t\t\ttag('td', attributes('class=\"phpc-desc\"'), $event->get_desc())));\n\t}\n\n\t$html_table->add($html_body);\n\n\tif($phpc_cal->can_modify()) {\n\t\t$output = tag('form',\n\t\t\t\tattributes(\"action=\\\"$phpc_script\\\"\"),\n\t\t\t\t$html_table);\n\t} else {\n\t\t$output = $html_table;\n\t}\n\n\tif(!$have_events)\n\t\t$output = tag('h2', __('No events on this day.'));\n\n\treturn tag('', create_day_menu(), $output);\n}", "function build_calendar($month,$year,$dateArray) {\n $daysOfWeek = array('S','M','T','W','T','F','S');\n\n // What is the first day of the month in question?\n $firstDayOfMonth = mktime(0,0,0,$month,1,$year);\n\n // How many days does this month contain?\n $numberDays = date('t',$firstDayOfMonth);\n\n // Retrieve some information about the first day of the\n // month in question.\n $dateComponents = getdate($firstDayOfMonth);\n\n // What is the name of the month in question?\n $monthName = $dateComponents['month'];\n\n // What is the index value (0-6) of the first day of the\n // month in question.\n $dayOfWeek = $dateComponents['wday'];\n\n // Create the table tag opener and day headers\n\n $calendar = \"<table class='calendar'>\";\n $calendar .= \"<caption>$monthName $year</caption>\";\n $calendar .= \"<tr>\";\n\n // Create the calendar headers\n\n foreach($daysOfWeek as $day) {\n $calendar .= \"<th class='header'>$day</th>\";\n }\n\n // Create the rest of the calendar\n\n // Initiate the day counter, starting with the 1st.\n\n $currentDay = 1;\n\n $calendar .= \"</tr><tr>\";\n\n // The variable $dayOfWeek is used to\n // ensure that the calendar\n // display consists of exactly 7 columns.\n\n if ($dayOfWeek > 0) {\n $calendar .= \"<td colspan='$dayOfWeek'>&nbsp;</td>\";\n }\n\n $month = str_pad($month, 2, \"0\", STR_PAD_LEFT);\n\n while ($currentDay <= $numberDays) {\n\n // Seventh column (Saturday) reached. Start a new row.\n\n if ($dayOfWeek == 7) {\n\n $dayOfWeek = 0;\n $calendar .= \"</tr><tr>\";\n\n }\n\n $currentDayRel = str_pad($currentDay, 2, \"0\", STR_PAD_LEFT);\n\n $date = \"$year-$month-$currentDayRel\";\n\n $calendar .= \"<td class='day' rel='$date'>$currentDay</td>\";\n\n // Increment counters\n\n $currentDay++;\n $dayOfWeek++;\n\n }\n\n\n\n // Complete the row of the last week in month, if necessary\n\n if ($dayOfWeek != 7) {\n\n $remainingDays = 7 - $dayOfWeek;\n $calendar .= \"<td colspan='$remainingDays'>&nbsp;</td>\";\n\n }\n\n $calendar .= \"</tr>\";\n\n $calendar .= \"</table>\";\n\n return $calendar;\n\n}", "function draw_calendar($month,$year){\r\n\t/*Naredi koledar*/\r\n\t$calendar = '<table cellpadding=\"0\" cellspacing=\"0\" class=\"calendar\">';\r\n\t\r\n\t$headings = array('Nedelja','Ponedeljek','Torek','Sreda','Cetrtek','Petek','Sobota');\r\n\t$calendar.= '<tr class=\"calendar-row\"><td class=\"calendar-day-head\">'.implode('</td><td class=\"calendar-day-head\">',$headings).'</td></tr>';\r\n\r\n\t$running_day = date('w',mktime(0,0,0,$month,1,$year));\r\n\t$days_in_month = date('t',mktime(0,0,0,$month,1,$year));\r\n\t$days_in_this_week = 1;\r\n\t$day_counter = 0;\r\n\t$dates_array = array();\r\n\r\n\t$calendar.= '<tr class=\"calendar-row\">';\r\n\r\n\tfor($x = 0; $x < $running_day; $x++):\r\n\t\t$calendar.= '<td class=\"calendar-day-np\">&nbsp;</td>';\r\n\t\t$days_in_this_week++;\r\n\tendfor;\r\n\r\n\tfor($list_day = 1; $list_day <= $days_in_month; $list_day++):\r\n\t\tif($list_day < 10) {\r\n $list_day = str_pad($list_day, 2, '0', STR_PAD_LEFT);\r\n }\r\n\t\t$month = str_pad($month, 2, '0', STR_PAD_LEFT);\r\n\t\t$event_day = $year.'-'.$month.'-'.$list_day;\r\n\r\n\t\t$calendar.= '<td class=\"calendar-day\"><div name=\"test\" style=\"height:100px; width:120px; overflow: auto; white-space:nowrap\" id=' .$event_day. ' onclick=\"modal(this.id);\">';\r\n\t\t$calendar.= '<div>'.$list_day.'</div>';\t\r\n\t\t$query = \"SELECT CONCAT_WS(' ',s.firstname,s.lastname) as Zaposleni, a.name, aa.aktivnost_id\r\n\t\t\tFROM ost_staff s, ost_agent_aktivnost aa, ost_aktivnosti a\r\n\t\t\tWHERE s.staff_id = aa.staff_id and a.id=aa.aktivnost_id and '$event_day' BETWEEN aa.aktivnost_od AND aa.aktivnost_do AND aa.aktivnost_id > 1 AND aa.aktivnost_id != 9 AND aa.aktivnost_id != 10\";\r\n\t\t\t$result = db_query($query) or die('Ne morem pridobiti rezultata!');\r\n\t\t\twhile($row = db_fetch_array($result)) {\r\n\t\t\t\t$words = explode(' ',$row['Zaposleni']);\r\n\t\t\t\t$calendar .= '<div>'.$words[0][0].'. '.$words[1][0].'. : '.$row['name'].'</div>';\r\n\t\t\t}\r\n\t\t$calendar.= '</div></td>';\r\n\t\tif($running_day == 6):\r\n\t\t\t$calendar.= '</tr>';\r\n\t\t\tif(($day_counter+1) != $days_in_month):\r\n\t\t\t\t$calendar.= '<tr class=\"calendar-row\">';\r\n\t\t\tendif;\r\n\t\t\t$running_day = -1;\r\n\t\t\t$days_in_this_week = 0;\r\n\t\tendif;\r\n\t\t$days_in_this_week++; $running_day++; $day_counter++;\r\n\tendfor;\r\n\r\n\tif($days_in_this_week < 8):\r\n\t\tfor($x = 1; $x <= (8 - $days_in_this_week); $x++):\r\n\t\t\t$calendar.= '<td class=\"calendar-day-np\">&nbsp;</td>';\r\n\t\tendfor;\r\n\tendif;\r\n\r\n\t$calendar.= '</tr>';\r\n\r\n\t$calendar.= '</table>';\r\n\r\n\t$calendar = str_replace('</td>','</td>'.\"\\n\",$calendar);\r\n\t$calendar = str_replace('</tr>','</tr>'.\"\\n\",$calendar);\r\n\r\n\treturn $calendar;\r\n}", "private function buildBodyDay()\n {\n\n $events = $this->events;\n $h = \"\";\n for ($i = $this->start_hour; $i < $this->end_hour; $i++) {\n for ($t = 0; $t < 2; $t++) {\n $h .= \"<tr>\";\n $min = $t == 0 ? \":00\" : \":30\";\n $h .= \"<td class='$this->timeClass'>\" . date('g:ia', strtotime($i . $min)) . \"</td>\";\n for ($k = 0; $k < 1; $k++) {\n $wd = $this->week_days[$k];\n $time_r = $this->year . '-' . $this->month . '-' . $wd . ' ' . $i . ':00:00';\n $min = $t == 0 ? '' : '+30 minute';\n $time_1 = strtotime($time_r . $min);\n $time_2 = strtotime(date('Y-m-d H:i:s', $time_1) . '+30 minute');\n $dt = date('Y-m-d H:i:s', $time_1);\n $h .= \"<td colspan='3' data-datetime='$dt'>\";\n $h .= $this->dateWrap[0];\n\n $hasEvent = false;\n foreach ($events as $key => $event) {\n //EVENT TIME AND DATE\n $time_e = strtotime($key);\n if ($time_e >= $time_1 && $time_e < $time_2) {\n $hasEvent = true;\n $h .= $this->buildEvents(false, $event);\n }\n }\n $h .= !$hasEvent ? '&nbsp;' : '';\n $h .= $this->dateWrap[1];\n $h .= \"</td>\";\n }\n $h .= \"</tr>\";\n }\n }\n $h .= \"</tbody>\";\n $h .= \"</table>\";\n\n $this->html .= $h;\n }", "function drawCalendar($month, $year) {\n $first = mktime(0,0,0,$month,1,$year); // timestamp for first of the month\n $offset = date('w', $first); // what day of the week we start counting on\n $daysInMonth = date('t', $first);\n $monthName = date('F', $first);\n $weekDays = array('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat');\n $eventDays = getEventDays($month, $year);\n \n // Start drawing calendar\n $out = \"<table id=\\\"myCalendar\\\">\\n\";\n $out .= \"<tr><th colspan=\\\"3\\\">$monthName $year</th></tr>\\n\";\n $out .= \"<tr>\";\n foreach ($weekDays as $wd) $out .= \"<td class=\\\"weekDays\\\">$wd</td>\\n\";\n\n\n // Previous month link\n $prevTS = strtotime(\"$year-$month-01 -1 month\"); // timestamp of the first of last month\n $pMax = date('t', $prevTS);\n $pDay = ($day > $pMax) ? $pMax : $day;\n list($y, $m) = explode('-', date('Y-m', $prevTS)); \n $pMax = date('t', $prevTS);\n $pDay = ($day > $pMax) ? $pMax : $day;\n list($y, $m) = explode('-', date('Y-m', $prevTS));\n echo \"<p>\";\n echo \"<a href=\\\"?year=$year&month=$m&day=$pDay\\\"><< Prev</a>\\n\";\n\n // Next month link\n $nextTS = strtotime(\"$year-$month-01 +1 month\");\n $nMax = date('t', $nextTS);\n $nDay = ($day > $nMax) ? $nMax : $day;\n list($y, $m) = explode('-', date('Y-m', $nextTS));\n echo \"<a href=\\\"?year=$y&month=$m&day=$nDay\\\">Next >></a>\\n\";\n echo \"</p>\";\n\n\n // Build Previous and Next Links from untitled-6\n //$previous_link = \"<a href=\\\"\".$_SERVER['PHP_SELF'].\"?date=\";\n //if($month == 1){\n // $previous_link .= mktime(0,0,0,12,$day,($year -1));\n //} else {\n // $previous_link .= mktime(0,0,0,($month -1),$day,$year);\n //}\n\n //$previous_link .= \"\\\"><< </a>\";\n\n //$next_link = \"<a href=\\\"\".$_SERVER['PHP_SELF'].\"?date=\";\n //if($month == 12){\n // $next_link .= mktime(0,0,0,1,$day,($year + 1));\n //} else {\n // $next_link .= mktime(0,0,0,($month +1),$day,$year);\n //}\n //$next_link .= \"\\\"> >></a>\";\n\n $i = 0;\n for ($d = (1 - $offset); $d <= $daysInMonth; $d++) {\n if ($i % 7 == 0) $out .= \"<tr>\\n\"; // Start new row\n if ($d < 1) $out .= \"<td class=\\\"nonMonthDay\\\"> </td>\\n\";\n else {\n if (in_array($d, $eventDays)) {\n $out .= \"<td class=\\\"monthDay\\\">\\n\";\n $out .= \"<a href=\\\"?year=$year&month=$month&day=$d\\\">$d</a>\\n\";\n $out .= \"</td>\\n\";\n } else $out .= \"<td class=\\\"monthDay\\\">$d</td>\\n\";\n }\n ++$i; // Increment position counter\n if ($i % 7 == 0) $out .= \"</tr>\\n\"; // End row on the 7th day\n }\n \n // Round out last row if we don't have a full week\n if ($i % 7 != 0) {\n for ($j = 0; $j < (7 - ($i % 7)); $j++) {\n $out .= \"<td class=\\\"nonMonthDay\\\"> </td>\\n\";\n }\n $out .= \"</tr>\\n\";\n }\n \n $out .= \"</table>\\n\";\n \n return $out;\n }", "public function buildCalendar(){\n\n\t\t$first_day = $this->getFirstDay();\t\t\t\t\t\t//Determine what day of the week the month starts on\n\t\t$current_number_of_days = $this->getNumberOfDays();\t\t//Determine the number of days in the month\n\n\t\t$number_of_previous_days = $first_day;\t\t\t\t\t\t\t\t\t\t//Determine the number of days needed to complete the first week\n\t\t$prev_month_number_of_days = $this->getNumberOfDays($this->getMonth()-1); \t//Determine the number of days in the previous month\n\t\t\n\t\t$_SESSION['month'] = $this->getMonth();\n\t\t$_SESSION['year'] = $this->getYear();\n\t\t$_SESSION['view'] = 'calendar';\n\n\t\tob_start();?>\n <table border=\"0\" id=\"events_calendar\">\n <?php echo $this->buildCalendarHead() ?>\n <tr id=\"events_calendar_weekdays\">\n <th>\n\t\t\t\t\t<div class=\"full_week_name\">Sunday</div>\n\t\t\t\t\t<div class=\"short_week_name\">Sun</div>\n\t\t\t\t\t<div class=\"abrev_week_name\">S</div>\n </th>\n <th>\n\t\t\t\t\t<div class=\"full_week_name\">Monday</div>\n\t\t\t\t\t<div class=\"short_week_name\">Mon</div>\n\t\t\t\t\t<div class=\"abrev_week_name\">M</div>\n </th>\n <th>\n\t\t\t\t\t<div class=\"full_week_name\">Tuesday</div>\n\t\t\t\t\t<div class=\"short_week_name\">Tue</div>\n\t\t\t\t\t<div class=\"abrev_week_name\">T</div>\n </th>\n <th>\n\t\t\t\t\t<div class=\"full_week_name\">Wednesday</div>\n\t\t\t\t\t<div class=\"short_week_name\">Wed</div>\n\t\t\t\t\t<div class=\"abrev_week_name\">W</div>\n </th>\n <th>\n\t\t\t\t\t<div class=\"full_week_name\">Thursday</div>\n\t\t\t\t\t<div class=\"short_week_name\">Thu</div>\n\t\t\t\t\t<div class=\"abrev_week_name\">T</div>\n </th>\n <th>\n\t\t\t\t\t<div class=\"full_week_name\">Friday</div>\n\t\t\t\t\t<div class=\"short_week_name\">Fri</div>\n\t\t\t\t\t<div class=\"abrev_week_name\">F</div>\n </th>\n <th>\n\t\t\t\t\t<div class=\"full_week_name\">Saturday</div>\n\t\t\t\t\t<div class=\"short_week_name\">Sat</div>\n\t\t\t\t\t<div class=\"abrev_week_name\">S</div>\n </th>\n </tr>\n <?php\n $dayCounter = 0;\t\t\t\t\t\t\t\t\t\t\t//Keeps count of the days in a week\n\n /*** PREVIOUS MONTH CELLS ***/\n for($day = $number_of_previous_days; $day >= 1; $day--){\t//For each day in the previous month needed for a full week\n $dayNumber = $prev_month_number_of_days - ($day-1);\t\t\n \n //Get full date (YYYY-MM-DD)\n $year = ($this->getPrevMonth() == 12)? ($this->getYear()-1): $this->getYear();\n $full_date = $year . '-' . $this->getPrevMonth() . '-' . $dayNumber;\n \n $dayCounter ++;\n if($dayCounter == 1){\t\t\t\t\t//Start new row\n echo '<tr>';\n }\n \n echo $this->buildCalendarCell($full_date, $dayNumber, 'prev_month');\t//Create Calendar Cell\n\n if($dayCounter == 7){\t\t\t\t\t//End new row\n echo '</tr>';\n $dayCounter = 0;\n }\n }\n\n /*** CURRENT MONTH CELLS ***/\n for($day = 1; $day <= $current_number_of_days; $day++){\t\t//For each day in the current month\n $full_date = $this->getYear() . '-' . $this->getMonth() . '-' . $day;\n $dayCounter ++;\n if($dayCounter == 1){\t\t\t\t\t//Start new row\n echo '<tr>';\n }\n\n echo $this->buildCalendarCell($full_date, $day, 'current_month');\t//Create Calendar Cell\n\n if($dayCounter == 7){\t\t\t\t\t//End new row\n echo '</tr>';\n $dayCounter = 0;\n }\n }\n\n /*** NEXT MONTH CELLS ***/\n for($day = 1; $day <= $dayCounter; $day++){\t//For each day in the current month\n //Get full date (YYYY-MM-DD)\n $year = ($this->getNextMonth() == 1)? ($this->getYear()+1): $this->getYear();\n $full_date = $year . '-' . $this->getNextMonth() . '-' . $day;\n \n $dayCounter ++;\n if($dayCounter == 1){\t\t\t\t\t//Start new row\n echo '<tr>';\n }\n\n echo $this->buildCalendarCell($full_date, $day, 'next_month');\t//Create Calendar Cell\n\n if($dayCounter == 7){\t\t\t\t\t//End new row\n echo '</tr>';\n $dayCounter = 0;\n }\n }\n ?>\n </table>\n <style>\n\t\t\t<?php \n\t\t\tforeach($this->getCategories() as $c){?>\n\t\t\t#events_calendar .event.category_<?php echo $c->getId(); ?>:before{color: <?php echo $c->getColor(); ?> !important;}\n\t\t\t<?php } ?>\n\t\t</style>\n <?php\n\t\treturn ob_get_clean();\n\t}", "function draw_calendar($month,$year,$cal,$available_list,$price_list){\n\n /* draw table */\n $calendar = '<table cellpadding=\"0\" cellspacing=\"0\" class=\"calendar\">';\n\n /* table headings */\n $headings = array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');\n $calendar.= '<tr class=\"calendar-row\"><td class=\"calendar-day-head\">'.implode('</td><td class=\"calendar-day-head\">',$headings).'</td></tr>';\n\n /* days and weeks vars now ... */\n $running_day = date('w',mktime(0,0,0,$month,1,$year));\n $days_in_month = date('t',mktime(0,0,0,$month,1,$year));\n $days_in_this_week = 1;\n $day_counter = 0;\n $dates_array = array();\n\n /* row for week one */\n $calendar.= '<tr class=\"calendar-row\">';\n\n /* print \"blank\" days until the first of the current week */\n for($x = 0; $x < $running_day; $x++):\n $calendar.= '<td class=\"calendar-day-np\"> </td>';\n $days_in_this_week++;\n endfor;\n\n /* keep going with days.... */\n for($list_day = 1; $list_day <= $days_in_month; $list_day++):\n // echo \" cal: \".($available_list[$list_day - 1] == 't').\"\\n\";\n if ($available_list[$list_day - 1] == 't')\n {\n $calendar.= '<td class=\"calendar-day\" bgcolor=\"#00FF00\">';\n } else {\n $calendar.= '<td class=\"calendar-day\" bgcolor=\"#FF0000\">';\n\n }\n \n\n /* add in the day number */\n $calendar.= '<div class=\"day-number\" ><font size=\"+3\">'.$list_day.\"</font> \".$price_list[$list_day-1].'</div>';\n\n /** QUERY THE DATABASE FOR AN ENTRY FOR THIS DAY !! IF MATCHES FOUND, PRINT THEM !! **/\n $calendar.= str_repeat('<p> </p>',2);\n \n $calendar.= '</td>';\n if($running_day == 6):\n $calendar.= '</tr>';\n if(($day_counter+1) != $days_in_month):\n $calendar.= '<tr class=\"calendar-row\">';\n endif;\n $running_day = -1;\n $days_in_this_week = 0;\n endif;\n $days_in_this_week++; $running_day++; $day_counter++;\n endfor;\n\n /* finish the rest of the days in the week */\n if($days_in_this_week < 8):\n for($x = 1; $x <= (8 - $days_in_this_week); $x++):\n $calendar.= '<td class=\"calendar-day-np\"> </td>';\n endfor;\n endif;\n\n /* final row */\n $calendar.= '</tr>';\n\n /* end the table */\n $calendar.= '</table>';\n \n /* all done, return result */\n return $calendar;\n }", "function MakeCalendarGrid(){\n //get our days\n $intMonthDays = cal_days_in_month(CAL_GREGORIAN, $this->intMonth, $this->intYear);\n $intDayCounter = 0;\n $arrMonthAttributes = array('colspan'=>'7');\n //make our parent calendar table\n $objCalendarParent = $this->objCalendar->AddChildNode($this->objCalendar->objHTML,'', 'table');\n //let's make our header\n $objHeaderRow = $this->objCalendar->AddChildNode($objCalendarParent,'', 'tr');\n //establish our base attributes\n for($intWeekDay=0;$intWeekDay<7;$intWeekDay++){\n $strDay = date('l', strtotime(\"Sunday +{$intWeekDay} days\"));\n $this->objCalendar->AddChildNode($objHeaderRow,$strDay, 'th',array('class'=>'weekday'));\n }\n //get the starting date\n $intMonthStart = date('N', strtotime($this->intYear.'-'.$this->intMonth.'-1'));\n $intMonthStart++;\n //avoid empty rows\n if($intMonthStart == 8)\n $intMonthStart = 1;\n //make our days now\n for($intDay=1;$intDay<($intMonthDays + $intMonthStart);$intDay++){\n $arrDateAttributes = array('onclick'=>'SelectDay(this);');\n if($intDayCounter === 0){\n //make our new week\n $objWeekRow = $this->objCalendar->AddChildNode($objCalendarParent,'', 'tr');\n $arrDateAttributes['class'] = 'calendarday weekend';\n }\n else if($intDayCounter === 6)\n $arrDateAttributes['class'] = 'calendarday weekend';\n else if($intDay == date('j'))\n $arrDateAttributes['class'] = 'calendarday today';\n else\n $arrDateAttributes['class'] = 'calendarday weekday';\n $intDayCounter++;\n //reset our week now\n if($intDayCounter == 7)\n $intDayCounter = 0;\n if($intDay < $intMonthStart){\n unset($arrDateAttributes['onclick']);\n $this->objCalendar->AddChildNode($objWeekRow,'&nbsp;', 'td',$arrDateAttributes);\n continue 1;\n }\n $arrDateAttributes['id'] = ($intDay - ($intMonthStart - 1)).'-'.$this->arrCalendarProperties['calendarid'];\n //make our day now\n $this->objCalendar->AddChildNode($objWeekRow,($intDay - ($intMonthStart - 1)), 'td',$arrDateAttributes);\n }\n return TRUE;\n }", "public static function day_calendar($day, $month, $year) {\r\n global $langNoEvents, $langDay, $langWeek, $langMonth, $langViewShow;\r\n\r\n $calendar_content = \"\";\r\n if (is_null($day)) {\r\n $day = 1;\r\n }\r\n $nextdaydate = new DateTime(\"$year-$month-$day\");\r\n $nextdaydate->add(new DateInterval('P1D'));\r\n $previousdaydate = new DateTime(\"$year-$month-$day\");\r\n $previousdaydate->sub(new DateInterval('P1D'));\r\n\r\n $thisday = new DateTime(\"$year-$month-$day\");\r\n $daydescription = ucfirst(format_locale_date($thisday->getTimestamp()));\r\n\r\n $backward = array('day'=>$previousdaydate->format('d'), 'month'=>$previousdaydate->format('m'), 'year' => $previousdaydate->format('Y'));\r\n $foreward = array('day'=>$nextdaydate->format('d'), 'month'=>$nextdaydate->format('m'), 'year' => $nextdaydate->format('Y'));\r\n\r\n $calendar_content .= '<div class=\"right\" style=\"width:100%\">'.$langViewShow.':&nbsp;'.\r\n '<a href=\"#\" onclick=\"show_day(selectedday, selectedmonth, selectedyear);return false;\">'.$langDay.'</a>&nbsp;|&nbsp;'.\r\n '<a href=\"#\" onclick=\"show_week(selectedday, selectedmonth, selectedyear);return false;\">'.$langWeek.'</a>&nbsp;|&nbsp;'.\r\n '<a href=\"#\" onclick=\"show_month(selectedday, selectedmonth, selectedyear);return false;\">'.$langMonth.'</a></div>';\r\n\r\n $calendar_content .= \"<table class='table-default'>\";\r\n $calendar_content .= \"<tr>\";\r\n $calendar_content .= '<td width=\"25\"><a href=\"#\" onclick=\"show_day('.$backward['day'].','.$backward['month'].','.$backward['year'].'); return false;\">&laquo;</a></td>';\r\n $calendar_content .= \"<td class='center'><b>$daydescription</b></td>\";\r\n $calendar_content .= '<td width=\"25\" class=\"right\"><a href=\"#\" onclick=\"show_day('.$foreward['day'].','.$foreward['month'].','.$foreward['year'].'); return false;\">&raquo;</a></td>';\r\n $calendar_content .= \"</tr>\";\r\n $calendar_content .= \"</table>\";\r\n\r\n $eventlist = Calendar_Events::get_calendar_events(\"day\", \"$year-$month-$day\");\r\n $calendar_content .= \"<table class='table-default'>\";\r\n\r\n $curhour = 0;\r\n $now = getdate();\r\n $today = new DateTime($now['year'].'-'.$now['mon'].'-'.$now['mday'].' '.$now['hours'].':'.$now['minutes']);\r\n if ($now['year'].'-'.$now['mon'].'-'.$now['mday'] == \"$year-$month-$day\") {\r\n $thisdayistoday = true;\r\n }\r\n else{\r\n $thisdayistoday = false;\r\n }\r\n $thishour = new DateTime($today->format('Y-m-d H:00'));\r\n $cursorhour = new DateTime(\"$year-$month-$day 00:00\");\r\n $curstarthour = \"\";\r\n\r\n foreach ($eventlist as $thisevent) {\r\n $thiseventstart = new DateTime($thisevent->start);\r\n $thiseventhour = new DateTime($thiseventstart->format('Y-m-d H:00'));\r\n if ($curstarthour != $thiseventhour) { //event date changed\r\n while($cursorhour < $thiseventhour) {\r\n if ($thisdayistoday && $thishour>=$cursorhour && intval($cursorhour->diff($thishour,true)->format('%h'))<6)\r\n $class = 'today';\r\n else\r\n $class = 'monthLabel';\r\n $calendar_content .= \"<tr><td colspan='3' class='$class'>\" . \"&nbsp;<b>\" . ucfirst($cursorhour->format('H:i')) . \"</b></td></tr>\";\r\n if (intval($cursorhour->diff($thiseventhour,true)->format('%h'))>6) {\r\n $calendar_content .= \"<tr><td colspan='3'>$langNoEvents</td></tr>\";\r\n }\r\n $cursorhour->add(new DateInterval('PT6H'));\r\n $curhour += 6;\r\n }\r\n\r\n if ($thisdayistoday && $thishour>=$cursorhour && intval($cursorhour->diff($thishour,true)->format('%h'))<6)\r\n $class = 'today';\r\n else\r\n $class = 'monthLabel';\r\n //No hour tr for the event\r\n //$calendar_content .= \"<tr><td colspan='3' class='$class'>\" . \"&nbsp;<b>\" . ucfirst($thiseventhour->format('H:i')) . \"</b></td></tr>\";\r\n if ($cursorhour <= $thiseventhour) {\r\n $cursorhour->add(new DateInterval('PT6H'));\r\n $curhour += 6;\r\n }\r\n }\r\n $calendar_content .= Calendar_Events::day_calendar_item($thisevent, 'even');\r\n $curstarthour = $thiseventhour;\r\n }\r\n /* Fill with empty days*/\r\n for($i=$curhour;$i<24;$i+=6) {\r\n if ($thisdayistoday && $thishour>=$cursorhour && intval($cursorhour->diff($thishour,true)->format('%h'))<6)\r\n $class = 'today';\r\n else\r\n $class = 'monthLabel';\r\n $calendar_content .= \"<tr><td colspan='3' class='$class'>\" . \"&nbsp;<b>\" . ucfirst($cursorhour->format('H:i')) . \"</b></td></tr>\";\r\n $calendar_content .= \"<tr><td colspan='3'>$langNoEvents</td></tr>\";\r\n $cursorhour->add(new DateInterval('PT6H'));\r\n }\r\n $calendar_content .= \"</table>\";\r\n /* Legend */\r\n $calendar_content .= Calendar_Events::calendar_legend();\r\n\r\n return $calendar_content;\r\n }", "function draw_calendar($month,$year){\n\n\t\t/* draw table */\n\t\t$calendar = '<table cellpadding=\"0\" cellspacing=\"0\" class=\"calendar\">';\n\n\t\t/* table headings */\n\t\t$headings = array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');\n\t\t$calendar.= '<tr class=\"calendar-row\"><td class=\"calendar-day-head\">'.implode('</td><td class=\"calendar-day-head\">',$headings).'</td></tr>';\n\n\t\t/* days and weeks vars now ... */\n\t\t$running_day = date('w',mktime(0,0,0,$month,1,$year));\n\t\t$days_in_month = date('t',mktime(0,0,0,$month,1,$year));\n\t\t$days_in_this_week = 1;\n\t\t$day_counter = 0;\n\t\t$dates_array = array();\n\n\t\t/* row for week one */\n\t\t$calendar.= '<tr class=\"calendar-row\">';\n\n\t\t/* print \"blank\" days until the first of the current week */\n\t\tfor($x = 0; $x < $running_day; $x++):\n\t\t\t$calendar.= '<td class=\"calendar-day-np\"> </td>';\n\t\t\t$days_in_this_week++;\n\t\tendfor;\n\n\t\t/* keep going with days.... */\n\t\tfor($list_day = 1; $list_day <= $days_in_month; $list_day++):\n\t\t\t$calendar.= '<td class=\"calendar-day\"><a href=\"appointments.php?day=' . $list_day . '&month=' . $GLOBALS['curMonth'] . '&year=' . $GLOBALS['curYear'] . '\">';\n\t\t\t\t/* add in the day number */\n\t\t\t\t$calendar.= '<div class=\"day-number\">'.$list_day.'</div>';\n\n\t\t\t\t/** QUERY THE DATABASE FOR AN ENTRY FOR THIS DAY !! IF MATCHES FOUND, PRINT THEM !! **/\n\t\t\t\t$calendar.= str_repeat('<p> </p>',2);\n\t\t\t\t\n\t\t\t$calendar.= '</a></td>';\n\t\t\tif($running_day == 6):\n\t\t\t\t$calendar.= '</tr>';\n\t\t\t\tif(($day_counter+1) != $days_in_month):\n\t\t\t\t\t$calendar.= '<tr class=\"calendar-row\">';\n\t\t\t\tendif;\n\t\t\t\t$running_day = -1;\n\t\t\t\t$days_in_this_week = 0;\n\t\t\tendif;\n\t\t\t$days_in_this_week++; $running_day++; $day_counter++;\n\t\tendfor;\n\n\t\t/* finish the rest of the days in the week */\n\t\tif($days_in_this_week < 8):\n\t\t\tfor($x = 1; $x <= (8 - $days_in_this_week); $x++):\n\t\t\t\t$calendar.= '<td class=\"calendar-day-np\"> </td>';\n\t\t\tendfor;\n\t\tendif;\n\n\t\t/* final row */\n\t\t$calendar.= '</tr>';\n\n\t\t/* end the table */\n\t\t$calendar.= '</table>';\n\t\t\n\t\t/* all done, return result */\n\t\treturn $calendar;\n\t}", "function mkMonthBody($showNoMonthDays=0){\n\tif ($this->actmonth==1){\n\t\t$pMonth=12;\n\t\t$pYear=$this->actyear-1;\n\t}\n\telse{\n\t\t$pMonth=$this->actmonth-1;\n\t\t$pYear=$this->actyear;\n\t}\n$out=\"<tr>\";\n$cor=0;\n\tif ($this->startOnSun) $cor=1;\n\tif ($this->weekNum) $out.=\"<td class=\\\"\".$this->cssWeekNum.\"\\\">\".$this->mkWeekNum(1+$cor).\"</td>\";\n$monthday=0;\n$nmonthday=1;\n\tfor ($x=0; $x<=6; $x++){\n\t\tif ($x>=$this->firstday){\n\t\t$monthday++;\n\t\t$out.=$this->mkDay($monthday);\n\t\t}\n\t\telse{\n\t\t\tif ($showNoMonthDays==0) $out.=\"<td class=\\\"\".$this->cssNoMonthDay.\"\\\"></td>\";\n\t\t\telse $out.=\"<td class=\\\"\".$this->cssNoMonthDay.\"\\\">\".($this->getMonthDays($pMonth,$pYear)-($this->firstday-1)+$x).\"</td>\";\n\t\t}\n\t}\n$out.=\"</tr>\\n\";\n$goon=$monthday+1;\n$stop=0;\n\tfor ($x=0; $x<=6; $x++){\n\t\tif ($goon>$this->maxdays) break;\n\t\tif ($stop==1) break;\n\t\t$out.=\"<tr>\";\n\t\tif ($this->weekNum) $out.=\"<td class=\\\"\".$this->cssWeekNum.\"\\\">\".$this->mkWeekNum($goon+$cor).\"</td>\";\n\t\t\tfor ($i=$goon; $i<=$goon+6; $i++){\n\t\t\t\tif ($i>$this->maxdays){\n\t\t\t\t\tif ($showNoMonthDays==0) $out.=\"<td class=\\\"\".$this->cssNoMonthDay.\"\\\"></td>\";\n\t\t\t\t\telse $out.=\"<td class=\\\"\".$this->cssNoMonthDay.\"\\\">\".$nmonthday++.\"</td>\";\n\t\t\t\t\t$stop=1;\n\t\t\t\t}\n\t\t\t\telse $out.=$this->mkDay($i);\n\t\t\t}\n\t\t$goon=$goon+7;\n\t\t$out.=\"</tr>\\n\";\n\t}\n$this->selectedday=\"-2\";\nreturn $out;\n}", "function draw_calendar($month,$year,$activityStartDateArray = array()){\r\n\r\n\t/* draw table */\r\n\t$calendar = '<table cellpadding=\"0\" cellspacing=\"0\" class=\"calendar\">';\r\n\r\n\t/* table headings */\r\n\t$headings = array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');\r\n\t$calendar.= '<tr class=\"calendar-row\"><td class=\"calendar-day-head\">'.implode('</td><td class=\"calendar-day-head\">',$headings).'</td></tr>';\r\n\r\n\t/* days and weeks vars now ... */\r\n\t$running_day = date('w',mktime(0,0,0,$month,1,$year));\r\n\t$days_in_month = date('t',mktime(0,0,0,$month,1,$year));\r\n\t$days_in_this_week = 1;\r\n\t$day_counter = 0;\r\n\t$dates_array = array();\r\n\r\n\t/* row for week one */\r\n\t$calendar.= '<tr class=\"calendar-row\">';\r\n\r\n\t/* print \"blank\" days until the first of the current week */\r\n\tfor($x = 0; $x < $running_day; $x++):\r\n\t\t$calendar.= '<td class=\"calendar-day-np\">&nbsp;</td>';\r\n\t\t$days_in_this_week++;\r\n\tendfor;\r\n\r\n\t/* keep going with days.... */\r\n\tfor($list_day = 1; $list_day <= $days_in_month; $list_day++):\r\n\t\t$calendar.= '<td class=\"calendar-day\"><div style=\"position:relative;height:100px;\">';\r\n\t\t\t/* add in the day number */\r\n\t\t\t$calendar.= '<div class=\"day-number\">'.$list_day.'</div>';\r\n\t\t\t\r\n\t\t\t//eventdate=startdate and enddate, depends which we talks about \r\n\r\n\t\t\t$startDate = $year.'-'.$month.'-'.$list_day;\r\n\t\t\t//$endDate = $year.'-'.$month.'-'.$list_day;\r\n\t\t\techo \"<br>the start date is\".$startDate;\r\n\t\t\t//something is wrong wit hteh startDate, the origin code has a while loop in the beginning, think why \r\n\t\t\t\r\n\t\t\tif(isset($activityStartDateArray[$startDate])) {\r\n\t\t\t\tforeach($activityStartDateArray[$startDate] as $activity) {\r\n\t\t\t\t\t$calendar.= '<div class=\"activity\">'.$activity['activityName'].'</div>';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\r\n\t\t\telse {\r\n\t\t\t\t$calendar.= str_repeat('<p>&nbsp;</p>',2);\r\n\t\t\t}\r\n\t\t$calendar.= '</div></td>';\r\n\t\tif($running_day == 6):\r\n\t\t\t$calendar.= '</tr>';\r\n\t\t\tif(($day_counter+1) != $days_in_month):\r\n\t\t\t\t$calendar.= '<tr class=\"calendar-row\">';\r\n\t\t\tendif;\r\n\t\t\t$running_day = -1;\r\n\t\t\t$days_in_this_week = 0;\r\n\t\tendif;\r\n\t\t$days_in_this_week++; $running_day++; $day_counter++;\r\n\tendfor;\r\n\t\r\n\t\r\n\t/* finish the rest of the days in the week */\r\n\tif($days_in_this_week < 8):\r\n\t\tfor($x = 1; $x <= (8 - $days_in_this_week); $x++):\r\n\t\t\t$calendar.= '<td class=\"calendar-day-np\">&nbsp;</td>';\r\n\t\tendfor;\r\n\tendif;\r\n\r\n\t/* final row */\r\n\t$calendar.= '</tr>';\r\n\t\r\n\r\n\t/* end the table */\r\n\t$calendar.= '</table>';\r\n\r\n\t/** DEBUG **/\r\n\t$calendar = str_replace('</td>','</td>'.\"\\n\",$calendar);\r\n\t$calendar = str_replace('</tr>','</tr>'.\"\\n\",$calendar);\r\n\t\r\n\t/* all done, return result */\r\n\treturn $calendar;\r\n}", "private function buildBody()\n {\n $day = 1;\n $now_date = $this->year . '-' . $this->month . '-01';\n $startingDay = date('N', strtotime('first day of this month', strtotime($now_date)));\n //Add the following line if you want to start the week with monday instead of sunday. Or change the number to suit your needs.\n //$startingDay = $startingDay - 1;\n $monthLength = $this->daysMonth[$this->month - 1];\n if ($this->month == 2 && ((($this->year % 4) == 0) && ((($this->year % 100) != 0) || (($this->year % 400) == 0)))) {\n $monthLength = $monthLength + 1;\n }\n $h = \"<tr>\";\n for ($i = $startingDay == 7 ? 1 : 0; $i < 9; $i++) {\n for ($j = 0; $j <= 6; $j++) {\n $currDate = $this->getDayDate($day);\n $class = $this->getTdClass($day);\n $h .= \"<td data-datetime='$currDate' $class>\";\n $h .= $this->dateWrap[0];\n if ($day <= $monthLength && ($i > 0 || $j >= $startingDay)) {\n $h .= $this->dayWrap[0];\n $h .= $this->getEventSearchLink($day);\n $h .= $this->dayWrap[1];\n $h .= $this->buildEvents($currDate);\n $day++;\n } else {\n $h .= \"&nbsp;\";\n }\n $h .= $this->dateWrap[1];\n $h .= \"</td>\";\n }\n // stop making rows if we've run out of days\n if ($day > $monthLength) {\n break;\n } else {\n $h .= \"</tr>\";\n $h .= \"<tr>\";\n }\n }\n $h .= \"</tr>\";\n $h .= \"</tbody>\";\n $h .= \"</table>\";\n $this->html .= $h;\n }", "public static function month_calendar($day, $month, $year) {\r\n global $langDay_of_weekNames, $langMonthNames, $langToday, $langDay, $langWeek, $langMonth, $langViewShow;\r\n\r\n $calendar_content = \"\";\r\n //Handle leap year\r\n $numberofdays = array(0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);\r\n if (($year % 400 == 0) or ($year % 4 == 0 and $year % 100 <> 0)) {\r\n $numberofdays[2] = 29;\r\n }\r\n\r\n $eventlist = Calendar_Events::get_calendar_events(\"month\", \"$year-$month-$day\");\r\n\r\n $events = array();\r\n if ($eventlist) {\r\n foreach ($eventlist as $event) {\r\n $eventday = new DateTime($event->startdate);\r\n $eventday = $eventday->format('j');\r\n if (!array_key_exists($eventday,$events)) {\r\n $events[$eventday] = array();\r\n }\r\n array_push($events[$eventday], $event);\r\n }\r\n }\r\n\r\n //Get the first day of the month\r\n $dayone = getdate(mktime(0, 0, 0, $month, 1, $year));\r\n //Start the week on monday\r\n $startdayofweek = $dayone['wday'] <> 0 ? ($dayone['wday'] - 1) : 6;\r\n\r\n $backward = array('month'=>$month == 1 ? 12 : $month - 1, 'year' => $month == 1 ? $year - 1 : $year);\r\n $foreward = array('month'=>$month == 12 ? 1 : $month + 1, 'year' => $month == 12 ? $year + 1 : $year);\r\n\r\n $calendar_content .= '<div class=\"right\" style=\"width:100%\">'.$langViewShow.':&nbsp;'.\r\n '<a href=\"#\" onclick=\"show_day(selectedday, selectedmonth, selectedyear);return false;\">'.$langDay.'</a>&nbsp;|&nbsp;'.\r\n '<a href=\"#\" onclick=\"show_week(selectedday, selectedmonth, selectedyear);return false;\">'.$langWeek.'</a>&nbsp;|&nbsp;'.\r\n '<a href=\"#\" onclick=\"show_month(selectedday, selectedmonth, selectedyear);return false;\">'.$langMonth.'</a></div>';\r\n\r\n $calendar_content .= '<table width=100% class=\"title1\">';\r\n $calendar_content .= \"<tr>\";\r\n $calendar_content .= '<td width=\"250\"><a href=\"#\" onclick=\"show_month(1,'.$backward['month'].','.$backward['year'].'); return false;\">&laquo;</a></td>';\r\n $calendar_content .= \"<td class='center'><b>{$langMonthNames['long'][$month-1]} $year</b></td>\";\r\n $calendar_content .= '<td width=\"250\" class=\"right\"><a href=\"#\" onclick=\"show_month(1,'.$foreward['month'].','.$foreward['year'].'); return false;\">&raquo;</a></td>';\r\n $calendar_content .= \"</tr>\";\r\n $calendar_content .= \"</table><br />\";\r\n $calendar_content .= \"<table class='table-default'><tr class='list-header'>\";\r\n for ($ii = 1; $ii < 8; $ii++) {\r\n $calendar_content .= \"<th class='text-center'>\" . $langDay_of_weekNames['long'][$ii % 7] . \"</th>\";\r\n }\r\n $calendar_content .= \"</tr>\";\r\n $curday = -1;\r\n $today = getdate();\r\n\r\n while ($curday <= $numberofdays[$month]) {\r\n $calendar_content .= \"<tr>\";\r\n\r\n for ($ii = 0; $ii < 7; $ii++) {\r\n if (($curday == -1) && ($ii == $startdayofweek)) {\r\n $curday = 1;\r\n }\r\n if (($curday > 0) && ($curday <= $numberofdays[$month])) {\r\n $bgcolor = $ii < 5 ? \"class='alert alert-danger'\" : \"class='odd'\";\r\n $dayheader = \"$curday\";\r\n $class_style = \"class=odd\";\r\n if (($curday == $today['mday']) && ($year == $today['year']) && ($month == $today['mon'])) {\r\n $dayheader = \"<b>$curday</b> <small>($langToday)</small>\";\r\n $class_style = \"class='today'\";\r\n }\r\n $calendar_content .= \"<td height=50 width=14% valign=top $class_style><b>$dayheader</b>\";\r\n $thisDayItems = \"\";\r\n if (array_key_exists($curday, $events)) {\r\n foreach ($events[$curday] as $ev) {\r\n $thisDayItems .= Calendar_Events::month_calendar_item($ev, Calendar_Events::$calsettings->{$ev->event_group.\"_color\"});\r\n }\r\n $calendar_content .= \"$thisDayItems</td>\";\r\n }\r\n $curday++;\r\n } else {\r\n $calendar_content .= \"<td width=14%>&nbsp;</td>\";\r\n }\r\n }\r\n $calendar_content .= \"</tr>\";\r\n }\r\n $calendar_content .= \"</table>\";\r\n\r\n /* Legend */\r\n $calendar_content .= Calendar_Events::calendar_legend();\r\n\r\n\r\n /*************************************** Bootstrap calendar ******************************************************/\r\n\r\n $calendar_content .= '<div id=\"bootstrapcalendar\"></div>';\r\n\r\n return $calendar_content;\r\n }", "private function makeArrayIterator()\n\t{\n\t\t$this->weekDayNum = $this->firstDayOfTheMonth+1;\t\t\n\t\tfor($this->dayOfMonth; $this->dayOfMonth <= $this->daysInMonth; $this->dayOfMonth++) {\n\t\t\t// Set the default style\n\t\t\t$this->outArray['days'][$this->dayOfMonth]['style'] = 'normalDay';\n\t\t\t\n\t\t\t// Set the style to a weekend day style\n\t\t\tif(($this->weekDayNum == 8)||($this->weekDayNum == 7)) {\n\t\t\t\t$this->outArray['days'][$this->dayOfMonth]['style'] = 'weekendDay';\n\t\t\t}\n\t\t\t\n\t\t\t// Set the style to a current day style\n\t\t\tif($this->curDay == $this->dayOfMonth) {\n\t\t\t\t$this->outArray['days'][$this->dayOfMonth]['style'] = 'currentDay';\n\t\t\t}\n\t\t\t\n\t\t\t// If the current day is Sunday, add a new row\n\t\t\tif($this->weekDayNum == 8) {\n\t\t\t\t$this->weekDayNum = 1;\n\t\t\t} \n\t\t\t\n\t\t\t$this->outArray['days'][$this->dayOfMonth]['dayname'] = $this->daysArray[$this->weekDayNum - 1];\n\t\t\t$this->outArray['days'][$this->dayOfMonth]['weekdaynumber'] = $this->weekDayNum;\n\t\t\t\t\t\t\t\t\t\n\t\t\t// Draw days\n\t\t\tif($this->makeDayEventListArray()) {\n\t\t\t\t$this->outArray['days'][$this->dayOfMonth]['events'] = $this->makeDayEventListArray();\n\t\t\t}\n\t\t\t\n\t\t\t$this->outArray['days'][$this->dayOfMonth]['datestamp'] = $this->curYear.'-'.$this->curMonth.'-'.$this->dayOfMonth;\n\t\t\t\n\t\t\t$this->weekDayNum++;\n\t\t}\n\t}", "function calendar($date) {\r\n\t //If no parameter is passed use the current date.\r\n\t if($date == null)\r\n\t $date = getDate();\r\n\r\n\t $day \t\t\t= $date[\"mday\"];\r\n\t $month \t\t= $date[\"mon\"];\r\n\t $month_name \t= $date[\"month\"];\r\n\t $year \t\t\t= $date[\"year\"];\r\n\r\n\t $this_month \t= getDate(mktime(0, 0, 0, $month, 1, $year));\r\n\t $next_month \t= getDate(mktime(0, 0, 0, $month + 1, 1, $year));\r\n\r\n\t //Find out when this month starts and ends.\r\n\t $first_week_day = $this_month[\"wday\"];\r\n\t $days_in_this_month = round(($next_month[0] - $this_month[0]) / (60 * 60 * 24));\r\n\r\n\t $calendar_html = \"<table width='100%'>\";\r\n\t $calendar_html = $calendar_html.\"<tr>\t<td class='perp_report_header' colspan='7' /> Month: \".$month_name.\" / Year: \".$year.\"</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\";\r\n\t $calendar_html = $calendar_html.\"<tr>\t<td class='perp_report_subheader'>Sunday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='perp_report_subheader'>Monday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='perp_report_subheader'>Tuesday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='perp_report_subheader'>Wednesday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='perp_report_subheader'>Thursday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='perp_report_subheader'>Friday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='perp_report_subheader'>Saterday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t\t<tr>\";\r\n\r\n\t// Fill the first week of the month with the appropriate number of blanks.\r\n\t\t\t$gapcounter = 0;\r\n\t\t\tfor($week_day = 0; $week_day < $first_week_day; $week_day++) {\r\n\t\t\t\t\t$gapcounter = $gapcounter + 1;\r\n\t\t\t\t}\r\n\t\t\t$calendar_html = $calendar_html.\"<td class='perp_report_cell' colspan='\".$gapcounter.\"'></td>\";\t\r\n\t\r\n\t// Draw Calendar Elements\r\n\t\t\t// I forget!\t\t\t\t\r\n\t $week_day = $first_week_day;\r\n\t for($day_counter = 1; $day_counter <= $days_in_this_month; $day_counter++) {\r\n\t\t\t\t\t// Determine Day of the week\r\n\t\t\t\t\t$week_day %= 7;\r\n\t\t\t\t\r\n\t\t\t\t\t// If this variable equals 0, we will need to start a new row.\r\n\t\t\t\t\tif($week_day == 0) {\r\n\t\t\t\t\t\t\t$calendar_html = $calendar_html.\"</tr><tr>\";\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$datetopull = $year.\"/\".$month.\"/\".$day_counter;\r\n\t\t\t\t\t$innercell = \"<TABLE width='100%' style='margin-bottom:0;margin-top:0;'><tr><td class='perp_report_fieldname'>Date:</td><td class='perp_report_fieldcontent'>\".$datetopull.\"</td></tr>\";\r\n\t\t\t\t\t//Now Get inspection List for this day.....\r\n\t\t\t\t\t$objconn = mysqli_connect($GLOBALS['hostdomain'], $GLOBALS['hostusername'], $GLOBALS['passwordofdatabase'], $GLOBALS['nameofdatabase']);\t\t\t\t\t\r\n\t\t\t\t\tif (mysqli_connect_errno()) {\r\n\t\t\t\t\t\t\t// there was an error trying to connect to the mysql database\r\n\t\t\t\t\t\t\t//printf(\"connect failed: %s\\n\", mysqli_connect_error());\r\n\t\t\t\t\t\t\texit();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t$sql = \"SELECT * FROM tbl_139_337_main WHERE 139337_date = '\".$datetopull.\"' ORDER BY 139337_time\";\r\n\t\t\t\t\t\t\t//echo \"The SQL Statement is :\".$sql.\"<br>\";\r\n\t\t\t\t\t\t\t$objrs = mysqli_query($objconn, $sql);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\tif ($objrs) {\r\n\t\t\t\t\t\t\t\t\t$number_of_rows = mysqli_num_rows($objrs);\r\n\t\t\t\t\t\t\t\t\twhile ($objarray = mysqli_fetch_array($objrs, MYSQLI_ASSOC)) {\r\n\t\t\t\t\t\t\t\t\t\t$counter = $counter + 1;\r\n\t\t\t\t\t\t\t\t\t\t\t$counter = $counter + 1;\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// So the Archieved or Duplicate Narrowing...\r\n\t\t\t\t\t\t\t\t\t\t\t$displayrow\t\t\t\t\t= 0;\r\n\t\t\t\t\t\t\t\t\t\t\t$displayrow_a\t\t\t\t= 0;\r\n\t\t\t\t\t\t\t\t\t\t\t$displayrow_b\t\t\t\t= 0;\r\n\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t$tmpdiscrepancyid\t\t\t= $objarray['Discrepancy_id'];\r\n\t\t\t\t\t\t\t\t\t\t\t$tmpdiscrepancycondition\t= $objarray['discrepancy_checklist_id'];\t\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$displayrow_a\t\t\t\t= preflights_tbl_139_337_main_a_yn($tmpdiscrepancyid,0); // 0 will not return a row even if it is archieved.\r\n\t\t\t\t\t\t\t\t\t\t\t//$displayrow_d\t\t\t\t= preflights_tbl_139_327_main_sub_d_d_yn($tmpdiscrepancyid,0); // 0 will not return a row even if it is duplicate.\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tif($displayrow_a == 1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$displayrow = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif($displayrow_d == 1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$displayrow = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\tif($displayrow_d == 1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$displayrow = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif($displayrow_a == 1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$displayrow = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\tif ($displayrow == 1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$innercell = $innercell.\"<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<form style='margin-bottom:0;' action='part139337_report_display.php' method='POST' name='reportform' id='reportform' target='WLHMWindow' onsubmit='window.open('', 'WLHMWindow', 'width=800,height=600,status=no,resizable=no,scrollbars=yes')'>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td colspan='2' class='formoptionsubmit'>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type='hidden' name='recordid'\tID='recordid' \t\t\tvalue=\".$tmpdiscrepancyid.\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type='submit' value='D:\".$tmpdiscrepancyid.\"' name='b1' ID='b1' class='makebuttonlooklikelargetext' style='width:100%;'>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</form>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t$innercell = $innercell.\"</table>\";\t\r\n\t\t\t\t\tif ($counter == 0) {\r\n\t\t\t\t\t\t\t$innercell = $innercell.\"Nothing Reported\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t$calendar_html = $calendar_html.\"<td align=\\\"center\\\" valign='top' class='perp_report_activecell'>&nbsp;\".$innercell.\"</td>\";\r\n\t\t\t\t\t$week_day++;\r\n\t\t\t\t\t$counter = 0;\r\n\t\t\t\t}\r\n\r\n\t $calendar_html .= \"</tr>\";\r\n\t $calendar_html .= \"</table>\";\r\n\r\n\t return($calendar_html);\r\n\t }", "function draw_calendar_activ($month,$year){\n\n\t/* draw table */\n\t$calendar = '<table cellpadding=\"0\" cellspacing=\"0\" class=\"calendar\">';\n\n\t/* table headings */\n\t$headings = array('Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi');\n\t$calendar.= '<tr class=\"calendar-row-day\"><td class=\"calendar-day-head\">'.implode('</td><td class=\"calendar-day-head\">',$headings).'</td></tr>';\n\n\t/* days and weeks vars now ... */\n\t$running_day = date('w',mktime(0,0,0,$month,1,$year));\n\t$days_in_month = date('t',mktime(0,0,0,$month,1,$year));\n\t$days_in_this_week = 1;\n\t$day_counter = 0;\n\t$dates_array = array();\n\n\t/* row for week one */\n\t$calendar.= '<tr class=\"calendar-row\">';\n\n\t/* print \"blank\" days until the first of the current week */\n\tfor($x = 0; $x < $running_day; $x++):\n\t\t$calendar.= '<td class=\"calendar-day-np\"> </td>';\n\t\t$days_in_this_week++;\n\tendfor;\n\n\t/* keep going with days.... */\n\tfor($list_day = 1; $list_day <= $days_in_month; $list_day++){\n\t\t$calendar.= '<td class=\"calendar-day\">';\n\t\t\t/* add in the day number */\n $ddate = $year.\"-\".$month.\"-\".sprintf(\"%02d\", $list_day);\n $newdatabal = sprintf(\"%02d\", $list_day);\n $qq = mysql_query(\"SELECT * FROM reserver WHERE date_deb LIKE('$ddate%')\")or die(mysql_error());\n\n if(mysql_num_rows($qq) >0){\n $newblabla = $ddate.\"<br>\n <a href='afres.php?y=\".$year.\"&m=\".$month.\"&d=\".$newdatabal.\"' target='_blank' style='color: #302C87; text-decoration: none'> Il y'a : \".mysql_num_rows($qq).' reservation(s)</a>';\n }else{\n $newblabla = $ddate.\"<br>no reservations\";\n }\n\t\t\t$calendar.= '<div class=\"day-number\">\n\n '.$newblabla;\n\n\t\t\t/** QUERY THE DATABASE FOR AN ENTRY FOR THIS DAY !! IF MATCHES FOUND, PRINT THEM !! **/\n\t\t\t$calendar.= str_repeat('<p> </p>',2);\n\n\t\t$calendar.= '</td>';\n\t\tif($running_day == 6):\n\t\t\t$calendar.= '</tr>';\n\t\t\tif(($day_counter+1) != $days_in_month):\n\t\t\t\t$calendar.= '<tr class=\"calendar-row\">';\n\t\t\tendif;\n\t\t\t$running_day = -1;\n\t\t\t$days_in_this_week = 0;\n\t\tendif;\n\t\t$days_in_this_week++; $running_day++; $day_counter++;\n\n\n\t}\n\n\t/* finish the rest of the days in the week */\n\tif($days_in_this_week < 8):\n\t\tfor($x = 1; $x <= (8 - $days_in_this_week); $x++):\n\t\t\t$calendar.= '<td class=\"calendar-day-np\"> </td>';\n\t\tendfor;\n\tendif;\n\n\t/* final row */\n\t$calendar.= '</tr>';\n\n\t/* end the table */\n\t$calendar.= '</table>';\n\n\t/* all done, return result */\n\treturn $calendar;\n\n\n}", "protected function compileWeeks()\n\t{\n\t\t$intDaysInMonth = date('t', $this->Date->monthBegin);\n\t\t$intFirstDayOffset = date('w', $this->Date->monthBegin) - $this->cal_startDay;\n\n\t\tif ($intFirstDayOffset < 0)\n\t\t{\n\t\t\t$intFirstDayOffset += 7;\n\t\t}\n\n\t\t$intColumnCount = -1;\n\t\t$intNumberOfRows = ceil(($intDaysInMonth + $intFirstDayOffset) / 7);\n\t\t$arrAllEvents = $this->getAllEvents($this->iso_arrEventIDs, $this->cal_calendar, $this->Date->monthBegin, $this->Date->monthEnd);\n\t\t\n\t\t$arrDays = array();\n\n\t\t// Compile days\n\t\tfor ($i=1; $i<=($intNumberOfRows * 7); $i++)\n\t\t{\n\t\t\t$intWeek = floor(++$intColumnCount / 7);\n\t\t\t$intDay = $i - $intFirstDayOffset;\n\t\t\t$intCurrentDay = ($i + $this->cal_startDay) % 7;\n\n\t\t\t$strWeekClass = 'week_' . $intWeek;\n\t\t\t$strWeekClass .= ($intWeek == 0) ? ' first' : '';\n\t\t\t$strWeekClass .= ($intWeek == ($intNumberOfRows - 1)) ? ' last' : '';\n\n\t\t\t$strClass = ($intCurrentDay < 2) ? ' weekend' : '';\n\t\t\t$strClass .= ($i == 1 || $i == 8 || $i == 15 || $i == 22 || $i == 29 || $i == 36) ? ' col_first' : '';\n\t\t\t$strClass .= ($i == 7 || $i == 14 || $i == 21 || $i == 28 || $i == 35 || $i == 42) ? ' col_last' : '';\n\n\t\t\t// Empty cell\n\t\t\tif ($intDay < 1 || $intDay > $intDaysInMonth)\n\t\t\t{\n\t\t\t\t$arrDays[$strWeekClass][$i]['label'] = '&nbsp;';\n\t\t\t\t$arrDays[$strWeekClass][$i]['class'] = 'days empty' . $strClass ;\n\t\t\t\t$arrDays[$strWeekClass][$i]['events'] = array();\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$intKey = date('Ym', $this->Date->tstamp) . ((strlen($intDay) < 2) ? '0' . $intDay : $intDay);\n\t\t\t$strClass .= ($intKey == date('Ymd')) ? ' today' : '';\n\n\t\t\t// Mark the selected day (see #1784)\n\t\t\tif ($intKey == $this->Input->get('day'))\n\t\t\t{\n\t\t\t\t$strClass .= ' selected';\n\t\t\t}\n\n\t\t\t// Inactive days\n\t\t\tif (empty($intKey) || !isset($arrAllEvents[$intKey]))\n\t\t\t{\n\t\t\t\t$arrDays[$strWeekClass][$i]['label'] = $intDay;\n\t\t\t\t$arrDays[$strWeekClass][$i]['class'] = 'days' . $strClass;\n\t\t\t\t$arrDays[$strWeekClass][$i]['events'] = array();\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$arrEvents = array();\n\n\t\t\t// Get all events of a day\n\t\t\tforeach ($arrAllEvents[$intKey] as $v)\n\t\t\t{\n\t\t\t\tforeach ($v as $vv)\n\t\t\t\t{\n\t\t\t\t\t$arrEvents[] = $vv;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$arrDays[$strWeekClass][$i]['label'] = $intDay;\n\t\t\t$arrDays[$strWeekClass][$i]['class'] = 'days active' . $strClass;\n\t\t\t\n\t\t\t$arrDays[$strWeekClass][$i]['href'] = $this->strUrl . ($GLOBALS['TL_CONFIG']['disableAlias'] ? '?id=' . $this->Input->get('id') . '&amp;' : '?') . 'day=' . $intKey;\n\t\t\t\n\t\t\t$arrDays[$strWeekClass][$i]['title'] = sprintf(specialchars($GLOBALS['TL_LANG']['MSC']['cal_events']), count($arrEvents));\n\t\t\t$arrDays[$strWeekClass][$i]['events'] = $arrEvents;\n\t\t}\n\n\t\treturn $arrDays;\n\t}", "function output_calendar() // Generating calendar HTML content\r\n\t{\r\n\t\t# Apparently, it's not possible to dereference $this->callback()\r\n\t\t$cb = $this->callback;\r\n\r\n\t\t# Preliminary calculations\r\n\t\t$t = getdate(strtotime($this->date));\r\n\t\t$today = $t[\"mday\"];\r\n\t\t$year = $t[\"year\"];\r\n\t\t$month = $t[\"mon\"];\r\n\t\t# Get first day of the month (monday = 0)\r\n\t\t$first_wday = ((int) date(\"w\", mktime(0, 0, 0, $month, 1, $year))+6)%7;\r\n\t\t# Last day of the month\r\n\t\t$last_mday = (int) date(\"d\", mktime(0, 0, 0, $month+1, 0, $year));\r\n\r\n\t\t# Anchor\r\n\t\t//$this->content[].=\"<a name=\\\"calendar\\\">\";\r\n\r\n\t\t# Table\r\n\t\t$this->content[].=\"<table width=\\\"100%\\\" align=\\\"center\\\" cellpadding=\\\"0\\\" cellspacing=\\\"2\\\" class=\\\"calendar\\\">\\n\";\r\n\r\n\t\t# Table head\r\n\t\t$this->content[].=\"<tr><td colspan=\\\"7\\\" class=\\\"calendar_header\\\">{$this->month_name[$month - 1]}&nbsp;&nbsp;&nbsp;{$t['year']}</td></tr>\\n<tr>\\n\";\r\n\t\tfor ($j = 0;$j <= 6;$j++) {\r\n\t\t\t$this->content[].=\"<th class=\\\"calendar_title\\\">\";\r\n\t\t\t$this->content[].=\"{$this->day_name[$j]}\";\r\n\t\t\t$this->content[].=\"</th>\\n\";\r\n\t\t}\r\n\t\t$this->content[].=\"</tr>\\n\";\r\n\r\n\t\t// Day row\r\n\t\t// A month is displayed on 6 rows\r\n\t\t// except for a 28 days month starting on Monday\r\n\t\tif (($last_mday == 28) and ($first_wday == 0))\r\n\t\t$jmax = 27;\r\n\t\telse\r\n\t\t$jmax = 41;\r\n\r\n\t\tfor ($j = 0;$j <= $jmax;$j++) {\r\n\t\t\t# Start new row on Monday\r\n\t\t\tif ($j % 7 == 0)\r\n\t\t\t$this->content[].=\"<tr>\\n\";\r\n\r\n\t\t\t// Title colour for current day and checking week end days\r\n\r\n\t\t\tif (($j == $today+$first_wday-1) and ($j % 7 == 6)) // if today and weekend day\r\n\t\t\t$this->content[].=\"<td class=\\\"calendar_title_we\\\">\";\r\n\r\n\t\t\tif (($j % 7 == 6) and ($j != $today+$first_wday-1)) // if weekend day and not today\r\n\t\t\t$this->content[].=\"<td class=\\\"calendar_day_we\\\">\";\r\n\r\n\r\n\t\t\tif (($j == $today+$first_wday-1) and ($j % 7 != 6)) // if today and not weekend day\r\n\t\t\t$this->content[].=\"<td class=\\\"calendar_title\\\">\";\r\n\r\n\t\t\tif (($j % 7 != 6) and ($j != $today+$first_wday-1)) // if not today and not weekend day\r\n\t\t\t$this->content[].=\"<td class=\\\"calendar_day\\\">\";\r\n\r\n\t\t\tif (($j<$first_wday) or ($j>=$last_mday + $first_wday)) {\r\n\r\n\t\t\t\t# Empty boxes\r\n\t\t\t\t$this->content[].=\"&nbsp;\";\r\n\t\t\t} else {\r\n\t\t\t\tif (isset($cb))\r\n\t\t\t\techo $cb(mktime(0, 0, 0, $month, $j - $first_wday + 1, $year));\r\n\t\t\t\t$this->content[].=date($this->date_format, mktime(0, 0, 0, $month, $j - $first_wday + 1, $year));\r\n\t\t\t\tif (isset($cb))\r\n\t\t\t\t$this->content[].=\"</a>\\n\";\r\n\t\t\t}\r\n\t\t\t$this->content[].=\"</td>\\n\";\r\n\r\n\t\t\t# End of row on Sunday\r\n\t\t\tif ($j % 7 == 6)\r\n\t\t\t$this->content[].=\"</tr>\\n\";\r\n\t\t}\r\n\t\t$this->content[].=\"</table>\\n\";\r\n\t}", "function displayCurrentMonthCalenderAsTable()\n{\nglobal $year; // this year\nglobal $month; // this month\nglobal $id;\n$day=1; // start from first of month\nglobal $crypted;\nglobal $month_caption; // caption to table\n$lastmonth = $month - 1;\n$nextmonth = $month +1;\n$lastyear = $year - 1;\n$nextyear = $year + 1;\necho \"<table summary=\\\"Monthly calendar\\\" onMouseover= changeto('#CCCCCC') onMouseout= changeback('white') width = 757 cellspacing= 2 cellpadding= 2 id= ignore class=\\\"sk_bok_green\\\">\n<caption ><a href=comm.php?crypted=$_GET[crypted]&calender&lastyear=$lastyear ><font color=green>Last Year</font></a>&nbsp;&nbsp;&nbsp;<a href=comm.php?crypted=$_GET[crypted]&calender&last=$lastmonth&year=$year><font color=green>Last Month</a>&nbsp;&nbsp;&nbsp; <b>[$month_caption ]</b> &nbsp;&nbsp;&nbsp;<a href=comm.php?crypted=$_GET[crypted]&calender&next=$nextmonth&year=$year><font color= green>Next Month</font></a> &nbsp;<a href=comm.php?crypted=$_GET[crypted]&calender&lastyear=$nextyear><font color= green>Next Year<font></a></caption>\n<tr align=center id=ignore>\n<th width =308 id=ignore bgcolor=#FFC56C ><font color =Red>Sun</font></th>\n<th width =308 id=ignore bgcolor=#FFC56C><font color =Green>Mon</font></th>\n<th width =308 id=ignore bgcolor=#FFC56C><font color =Green>Tue</font></th>\n<th width =308 id=ignore bgcolor=#FFC56C><font color =Green>Wed</font></th>\n<th width =308 id=ignore bgcolor=#FFC56C><font color =Green>Thu</font></th>\n<th width =308 id=ignore bgcolor=#FFC56C><font color =Green>Fri</font></th> \n<th width =308 id=ignore bgcolor=#FFC56C><font color =blue>Sat</font></th> \n</tr>\\n\"; \n\n$ts = mktime(0,0,0,$month,$day,$year); // unix timestamp of the first day of current month\n$weekday_first_day = date(\"w\",$ts); // which is the weekday of the first day of week 0-Sunday 6-Saturday\n//$my_format = date(\"d-m-Y\");\n$slot=0;\n\nprint \"<tr align=center >\\n\"; // First row starts\nfor($i=0;$i<$weekday_first_day;$i++) // Pad the first few rows(slots)\n{\nprint \" <td id=ignore width =308></td>\"; // Empty slots \n$slot++;\n}\n\tif($day == '')\n\t{\n\t\t$ig = 'ignore';\n\t\techo \">>\";\n\t}\n\nwhile(checkdate($month,$day,$year) && $date<32) // till there are valid days in current month\n{\nif($slot == 7) // if we moved past saturday\n{\n$slot = 0; // reset and move back to sunday\nprint \"</tr>\\n\"; // end of this row\nprint \"<tr align=center width =50>\\n\"; // move on to next row\n\n}\n\t//$system_date = '$day-$month-$year';\n\t//$db_date = date('d-m-Y',$day $month $year);\n\t$system_date = mktime(0, 0, 0, $month, $day, $year);\n\t$db_date = date('d-m-Y',$system_date);\n\t$db_date_search = explode('-',$db_date);\n\t//print_r($db_date_search);\n\t$search_date = mktime(0, 0, 0, $month, $day);\n\t$search_date = sprintf(date('d-m-',$search_date));\n\t$month_no = $db_date_search[1];\n\t $query =\"select * from calender_event where active = '1' and day = '$db_date_search[0]' and `month_no` = '$month_no' and year = '$db_date_search[2]' \";\n\t\n\t$result = mysql_query($query) or die(mysql_error());\n\t$count = mysql_num_rows($result);\n\t/* echo $query;\n\techo $count; */\n\t$tr = 0;\n\t\n\tif($count != '0')\n\t{\t$msg .= \"<table id=ignore width=100%>\";\n\t\twhile($row=mysql_fetch_array($result))\n\t\t{\n\t\t\n\t\tif($row[popup] =='1')\n\t\t{\n\t\t\t$popup_link = \" onmouseout=\\\"hideTooltip()\\\" onmouseover=\\\"showTooltip(event,'$row[pop_msg]'\";\n\t\t\n\t\t}else\n\t\t{\n\t\t\t$popup_link =\"\";\n\t\t}\n\t\t\n\t\t$msg .= \"<tr ><td id=ignore bgcolor=green>$row[heading]</td></tr><tr><td id=ignore bgcolor=white><a href=\\\"comm.php?crypted=$_GET[crypted]&last=$month_no&year=$db_date_search[2]&calender&edit_event=$row[sno]\\\" $popup_link);return false\\\">$row[details]</a></td></tr>\";\n\t\t}\n\t\t$msg .= \"</table>\";\n\t}else\n\t{\n\t\t$msg ='';\n\t\n\t}\n\t//chking all db\n\t$color = \"bgcolor = white\";\n\techo \"<td $color id=$idd width =308 hight=308><DIV align=center id= tips><a href = #><font color=black><a href=comm.php?crypted=$_GET[crypted]&last=$month_no&year=$db_date_search[2]&calender&add_event=$db_date_search[0]-$db_date_search[1]-$db_date_search[2]>$day</a> </font>\n\t\t\n\t\t \";\n\t\n\t\n\t\techo \"</div ></a>$msg</div ></td>\";\n$msg ='';\n\t\n\n$day++;\n$slot++;\n}\n\nif($slot>0) // have we started off a new last row \n{\nwhile($slot<7) // padding at the end to complete the last row table\n{\nprint \" <td id=ignore></td>\"; // empty slots\n$slot++;\n}\nprint \"\\n</tr>\\n\"; // close out last row\n}\nprint '</table>'; //end of table\n}", "public function buildMonth()\n\t{\n\t\t$this->orderedDays = $this->getDaysInOrder();\n\t\t\n\t\t$this->monthName = $this->months[ ltrim( $this->month, '0') ];\n\t\t\n\t\t// start of whichever month we are building\n\t\t$start_of_month = getdate( mktime(12, 0, 0, $this->month, 1, $this->year ) );\n\t\t\n\t\t$first_day_of_month = $start_of_month['wday'];\n\t\t\n\t\t$days = $this->startDay - $first_day_of_month;\n\t\t\n\t\tif( $days > 1 )\n\t\t{\n\t\t\t// get an offset\n\t\t\t$days -= 7;\n\t\t\t\n\t\t}\n\n\t\t$num_days = $this->daysInMonth($this->month, $this->year);\n\t\t// 42 iterations\n\t\t$start = 0;\n\t\t$cal_dates = array();\n\t\t$cal_dates_style = array();\n\t\t$cal_events = array();\n\t\twhile( $start < 42 )\n\t\t{\n\t\t\t// off set dates\n\t\t\tif( $days < 0 )\n\t\t\t{\n\t\t\t\t$cal_dates[] = '';\n\t\t\t\t$cal_dates_style[] = 'calendar-empty';\n\t\t\t\t$cal_dates_data[] = '';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif( $days < $num_days )\n\t\t\t\t{\n\t\t\t\t\t// real days\n\t\t\t\t\t$cal_dates[] = $days+1;\n\t\t\t\t\tif( in_array( $days+1, $this->daysWithEvents ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$cal_dates_style[] = 'has-events';\n\t\t\t\t\t\t$cal_dates_data[] = $this->data[ $days+1 ];\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$cal_dates_style[] = '';\n\t\t\t\t\t\t$cal_dates_data[] = '';\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// surplus\n\t\t\t\t\t$cal_dates[] = '';\n\t\t\t\t\t$cal_dates_style[] = 'calendar-empty';\n\t\t\t\t\t$cal_dates_data[] = '';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t// increment and loop\n\t\t\t$start++;\n\t\t\t$days++;\n\t\t}\n\t\t\n\t\t// done\n\t\t$this->dates = $cal_dates;\n\t\t$this->dateStyles = $cal_dates_style;\n\t\t$this->dateData = $cal_dates_data;\n\t}", "function draw_calendar($year)\n {\n $calendar.= '<!DOCTYPE html>\n <html>\n <head>\n <meta charset=\"UTF-8\">\n <title>Calendar</title>\n <link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css\">\n <style>\n #today {\n background-color: lightgreen;\n }\n .day-number {\n text-align: center;\n }\n .calendar-week {\n width: 14%;\n text-align: center;\n }\n .container {\n text-align: center;\n }\n .col-centered{\n float: none;\n margin: 0 auto;\n }\n </style>\n </head>\n <body>';\n date_default_timezone_set(\"America/New_York\");\n $months = array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');\n for ($month = 1; $month <= 12; $month++)\n {\n //create header\n $header = '<h2>'.$months[$month-1].' '.$year.'</h2>';\n $calendar.= '<div class=\"row\"><div class=\"container col-xs-6 col-centered\"> <table class=\"table table-bordered\">';\n \n \t// write calendar table headings \n \t$headings = array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');\n \t$calendar.= $header.'<tr><td class=\"calendar-week\">'.implode('</td><td class=\"calendar-week\">',$headings).'</td></tr>';\n \n \t$starting_day = date('w', mktime(0, 0, 0, $month, 1, $year)); //the starting day of the week\n \t$days_in_month = date('t', mktime(0, 0, 0, $month, 1, $year));\n \t$days_this_week = 1;\n \t$day_counter = 0;\n \t$end_of_month = 0;\n \n \t// row for week one \n \t$calendar.= '<tr>';\n \t\n \t// display blank days until starting day of the current week\n \tfor($day = 0; $day < $starting_day; $day++):\n \t\t$calendar.= '<td> </td>';\n \t\t$days_this_week++; //add blank day to days\n \tendfor;\n \n \t// write days\n \tfor ($day = 1; $day <= $days_in_month; $day++):\n \t\tif ($day != date('d') && $month != date('n'))\n \t\t{\n \t\t\t$current_day = ''; //add blank td per day (that isnt today)\n \t\t}\n \t\t$calendar.= '<td class=\"calendar-day'.$current_day.'\">';\n \t\t\n \t\t\t// Add in the day number\n if ($day == date('d') && $month == date('n') && $year == date('Y')) //this day = today\n \t\t\t{\n \t\t\t\t$showtoday = '<div id=\"today\"> <strong>'.$day.'</strong></div>'; //add today (special styling)\n \t\t\t}else {\n \t\t\t $showtoday = $day;\n \t\t\t}\n \t\t\t$calendar.= '<div class=\"day-number\">'.$showtoday.'</div>'; //commit the date number to the td\n \n \t\t// end of first week\n \t\t$calendar.= '</td>';\n \t\tif($starting_day == 6):\n \t\t\t$calendar.= '</tr>'; // if end of week, end row\n \t\t\tif (($day_counter+1) != $days_in_month) //if today is not end of month, start new row\n \t\t\t{\n \t\t\t\t$calendar.= '<tr>';\n \t\t\t} else \n \t\t\t{\n \t\t\t $end_of_month = 1; // is end of month, so no need for new row\n \t\t\t}\n \t\t\t$starting_day = -1; // if end of week, mark as sunday-1 so when incrementing below, it goes to 0 (sunday)\n \t\t\t$days_this_week = 0; //reset days this week\n \t\tendif;\n \t\t$days_this_week++;\n \t\t$starting_day++;\n \t\t$day_counter++;\n \tendfor;\n \n \t// Finish the rest of blank days in the week\n \tif(($days_this_week < 8) && ($end_of_month == 0)): //last row of calendar, if end of month already has happened (ie on the last day of the previous week), do not add new cells\n \t\tfor($x = 1; $x <= (8 - $days_this_week); $x++):\n \t\t\t$calendar.= '<td> </td>';\n \t\tendfor;\n \tendif;\n \n \t// final row\n \t$calendar.= '</tr>';\n \n \t// end table tags\n \t$calendar.= '</table> </div> </div>';\n }\n // end tags and return\n $calendar.= '</body>\n </html>';\n return $calendar;\n }", "function draw_calendar($month,$year, $userID, $type, $dbhandle){\n\n\t/* draw table */\n\t$calendar = '<table cellpadding=\"0\" cellspacing=\"0\" class=\"calendar\">';\n\n\t/* table headings */\n\t$headings = array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');\n\t$calendar.= '<tr class=\"calendar-row\"><td class=\"calendar-day-head\">'.implode('</td><td class=\"calendar-day-head\">',$headings).'</td></tr>';\n\n\t/* days and weeks vars now ... */\n\t$running_day = date('w',mktime(0,0,0,$month,1,$year));\n\t$days_in_month = date('t',mktime(0,0,0,$month,1,$year));\n\t$days_in_this_week = 1;\n\t$day_counter = 0;\n\t$dates_array = array();\n\n\t/* row for week one */\n\t$calendar.= '<tr class=\"calendar-row\">';\n\n\t/* print \"blank\" days until the first of the current week */\n\tfor($x = 0; $x < $running_day; $x++):\n\t\t$calendar.= '<td class=\"calendar-day-np\"> </td>';\n\t\t$days_in_this_week++;\n\tendfor;\n\n\t/* keep going with days.... */\n\tfor($list_day = 1; $list_day <= $days_in_month; $list_day++):\n\t\t$calendar.= '<td class=\"calendar-day\">';\n\t\t\n\t\t\t//Alert count for this day\n\t\t\t$dateString = '20'.$year.'-'.$month.'-';\n\t\t\tif( $list_day < 10 )\n\t\t\t\t$dateString .= \"0\".$list_day;\n\t\t\telse\n\t\t\t\t$dateString .= $list_day;\n\t\t\t\t\n\t\t\t\n\t\t\t$alertSql = \"select `Date`, Description from Alerts where SubjectID=$userID and Seen=0 and CAST(`Date` AS DATE)='\".$dateString.\"';\";\n\t\t\t$alertResult = $dbhandle->query($alertSql);\n\t\t\t$alertCount = $alertResult->num_rows;\n\t\t\tif( $alertCount > 0 )\n\t\t\t{\n\t\t\t\t$calendar.= '<div><b><a href=\"../Main/Alerts.php?user='.$userID.'&date='.$dateString.'\" style=\"color:red\">'.$alertCount.'</a></b></div>';\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t/* add in the day number */\n\t\t\t$calendar.= '<div class=\"day-number\">'.$list_day.' </div>';\n\t\t\t\n\t\t\t$dayStr = \"\";\n\t\t\tif($type == \"Session\")\n\t\t\t{\n\t\t\t\t$dayAfter = $list_day+1;\n\t\t\t\t$startTime = \"$year-$month-$list_day\";//date(\"Y-m-d\n\t\t\t\t$endtTime = \"\";\n\t\t\t\t//Deal with days/months carrying over\n\t\t\t\tif( $dayAfter > $days_in_month )\t//Check that the day after wont be more than there is in the month\n\t\t\t\t{\n\t\t\t\t\tif( $month == 12 )\n\t\t\t\t\t\t$endtTime = ($year+1) .\"-01-01\";\n\t\t\t\t\telse\n\t\t\t\t\t\t$endtTime = \"$year-\". ($month+1) .\"-01\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$endtTime = \"$year-$month-$dayAfter\";\n\t\t\t\t}\n\t\t\t\t//$calendar.= '<div>'.$endtTime.'</div>';\n\t\t\t\t\t\n\t\t\t\t$sql = \"SELECT SessionID, WingmanPlayed, CyclingPlayed, TargetsPlayed, DATE_FORMAT(StartTime,'%H:%i') as Start, DATE_FORMAT(EndTime,'%H:%i') as End FROM Session WHERE UserID = $userID AND (StartTime > '$startTime' AND EndTime < '$endtTime' AND EndTime <> 0 )\";\n\t\t\t\t$result = $dbhandle->query($sql);\n\t\t\t\tif ($result->num_rows > 0) {\n\t\t\t\t\t// output data of each row\n\t\t\t\t\twhile($row = $result->fetch_assoc()) {\n\t\t\t\t\t\t$sess = $row[\"SessionID\"];\n\t\t\t\t\t\t$start = $row[\"Start\"];\n\t\t\t\t\t\t$end = $row[\"End\"];\n\t\t\t\t\t\tif($dayStr != \"\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$dayStr .= \"<br />\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($row['WingmanPlayed'] > 0 && $row['TargetsPlayed'] > 0 )\n {\n $dayStr .= \"<a style='font-size:16px;padding-bottom:2px;color:red'href='Session.php?SessionID=$sess' 'data-toggle='tooltip' title='S#$sess: Wingman (Elbow Raise) & Targets (Arm Extension)'>$start-$end</a>\";\n }\n \n else if ($row['TargetsPlayed'] > 0)\n {\n $dayStr .= \"<a style='font-size:16px;padding-bottom:2px;color:green'href='Session.php?SessionID=$sess' 'data-toggle='tooltip' title='S#$sess: Targets (Arm Extension)'>$start-$end</a>\";\n }\n else if ($row['WingmanPlayed'] > 0)\n {\n $dayStr .= \"<a style='font-size:16px;padding-bottom:2px;color:blue'href='Session.php?SessionID=$sess' 'data-toggle='tooltip' title='S#$sess: Wingman (Elbow Raise)'>$start-$end</a>\";\n } \n\t\t\t\t\t\t\t\t\t\t\t\t\t else if ($row['CyclingPlayed'] > 0)\n {\n $dayStr .= \"<a style='font-size:16px;padding-bottom:2px;color:purple'href='Session.php?SessionID=$sess' 'data-toggle='tooltip' title='S#$sess: Cycling (Elbow Raise)'>$start-$end</a>\";\n } \n\t\t\t\t\t\telse\n {\n \n }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/** QUERY THE DATABASE FOR AN ENTRY FOR THIS DAY !! IF MATCHES FOUND, PRINT THEM !! **/\n\t\t\t$calendar.= \"<p>$dayStr</p>\";\n\t\t\t\n\t\t$calendar.= '</td>';\n\t\tif($running_day == 6):\n\t\t\t$calendar.= '</tr>';\n\t\t\tif(($day_counter+1) != $days_in_month):\n\t\t\t\t$calendar.= '<tr class=\"calendar-row\">';\n\t\t\tendif;\n\t\t\t$running_day = -1;\n\t\t\t$days_in_this_week = 0;\n\t\tendif;\n\t\t$days_in_this_week++; $running_day++; $day_counter++;\n\tendfor;\n\n\t/* finish the rest of the days in the week */\n\tif($days_in_this_week < 8):\n\t\tfor($x = 1; $x <= (8 - $days_in_this_week); $x++):\n\t\t\t$calendar.= '<td class=\"calendar-day-np\"> </td>';\n\t\tendfor;\n\tendif;\n\n\t/* final row */\n\t$calendar.= '</tr>';\n\n\t/* end the table */\n\t$calendar.= '</table>';\n\t\n\t/* all done, return result */\n\treturn $calendar;\n}", "function print_calendar($mon,$year)\n\t{\n\t\tglobal $dates, $first_day, $start_day;\n\t\t\t$cellWidth =\"150\";\n\t\t$first_day = mktime(0,0,0,$mon,1,$year);\n\t\t$start_day = date(\"w\",$first_day);\n\t\t$res = getdate($first_day);\n\t\t$month_name = $res[\"month\"];\n\t\t$no_days_in_month = date(\"t\",$first_day);\n\t\t\n\t\t//If month's first day does not start with first Sunday, fill table cell with a space\n\t\tfor ($i = 1; $i <= $start_day;$i++)\n\t\t\t$dates[1][$i] = \" \";\n\n\t\t$row = 1;\n\t\t$col = $start_day+1;\n\t\t$num = 1;\n\t\twhile($num<=31)\n\t\t\t{\n\t\t\t\tif ($num > $no_days_in_month)\n\t\t\t\t\t break;\n\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$dates[$row][$col] = $num;\n\t\t\t\t\t\tif (($col + 1) > 7)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$row++;\n\t\t\t\t\t\t\t\t$col = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$col++;\n\t\t\t\t\t\t$num++;\n\t\t\t\t\t}//if-else\n\t\t\t}//while\n\t\t$mon_num = date(\"n\",$first_day);\n\t\t$temp_yr = $next_yr = $prev_yr = $year;\n\n\t\t$prev = $mon_num - 1;\n\t\t$next = $mon_num + 1;\n\n\t\t//If January is currently displayed, month previous is December of previous year\n\t\tif ($mon_num == 1)\n\t\t\t{\n\t\t\t\t$prev_yr = $year - 1;\n\t\t\t\t$prev = 12;\n\t\t\t}\n \n\t\t//If December is currently displayed, month next is January of next year\n\t\tif ($mon_num == 12)\n\t\t\t{\n\t\t\t\t$next_yr = $year + 1;\n\t\t\t\t$next = 1;\n\t\t\t}\n\n\t\techo \"<DIV ALIGN='center'><TABLE BORDER=1 WIDTH=1600px CELLSPACING=0 BORDERCOLOR='silver'>\";\n\n\t\techo \t\"\\n<TR ALIGN='center'><TD BGCOLOR='white'> \".\n\t\t\t \"<A HREF='index.php?month=$prev&year=$prev_yr' STYLE=\\\"text-decoration: none\\\"><B><<</B></A> </TD>\".\n\t\t\t \"<TD COLSPAN=5 BGCOLOR='#99CCFF'><B>\".date(\"F\",$first_day).\" \".$temp_yr.\"</B></TD>\".\n\t\t\t \"<TD BGCOLOR='white'> \".\n\t\t\t \"<A HREF='index.php?month=$next&year=$next_yr' STYLE=\\\"text-decoration: none\\\"><B>>></B></A> </TD></TR>\";\n\n\t\techo \"\\n<TR ALIGN='center'><TD width='$cellWidth'><B>Domenica</B></TD><TD width='$cellWidth'><B>Lunedi</B></TD><TD width='$cellWidth'><B>Martedi</B></TD>\";\n\t\techo \"<TD width='$cellWidth'><B>Mercoledi</B></TD><TD width='$cellWidth'><B>Giovedi</B></TD><TD width='$cellWidth'><B>Venerdi</B></TD><TD width='$cellWidth'><B>Sabato</B></TD></TR>\";\n\t\techo \"<TR><TD COLSPAN=7> </TR><TR height='100px;' ALIGN='center'>\";\n\t\t\t\t\n\t\t$end = ($start_day > 4)? 6:5;\n\t\tfor ($row=1;$row<=$end;$row++)\n\t\t\t{\n\t\t\t\tfor ($col=1;$col<=7;$col++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($dates[$row][$col] == \"\")\n\t\t\t\t\t\t$dates[$row][$col] = \" \";\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!strcmp($dates[$row][$col],\" \"))\n\t\t\t\t\t\t\t$count++;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$t = $dates[$row][$col];\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t//If date is today, highlight it\n\t\t\t\t\t\tif (($t == date(\"j\")) && ($mon == date(\"n\")) && ($year == date(\"Y\"))){\n\t\t\t\t\t\t\techo \"\\n<TD valign='top' BGCOLOR='aqua'><a onclick=\\\"NewWindow(this.href,'pg_center','780','670','no');return false;\\\" href='calendar_add_event.php?azione=add&gg=$t&mm=$mon&yyyy=$year'>\".$t.\"</a>\";\n echo '<div align=\"left\">';\n echo stampa_appuntamenti($t,$mon,$year,$_SESSION['id_utente']);\n echo '</div>';\n echo \"</TD>\";\n }\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t//If the date is absent ie after 31, print space\n\t\t\t\t\t\t\techo \"\\n<TD valign='top'>\".(($t == \" \" )? \"&nbsp;\" : \"<a onclick=\\\"NewWindow(this.href,'pg_center','780','670','no');return false;\\\" href='calendar_add_event.php?azione=add&gg=$t&mm=$mon&yyyy=$year'>\".$t.\"</a>\");\n echo '<div align=\"left\">';\n echo stampa_appuntamenti($t,$mon,$year,$_SESSION['id_utente']);\n echo '</div>';\n echo \"</TD>\";\n\t\t\t\t\t }\n }// for -col\n\t\t\t\t\n\t\t\t\tif (($row + 1) != ($end+1))\n\t\t\t\t\techo \"</TR>\\n<TR ALIGN='center' height='100px;'>\";\n\t\t\t\telse\n\t\t\t\t\techo \"</TR>\";\n\t\t\t}// for - row\n\t\techo \"\\n</TABLE><BR><BR><A HREF=\\\"index.php\\\">Visualizza mese corrente</A> </DIV>\";\n\t}", "function mkDays ($numDays, $month, $year) {\n for ($i = 1; $i <= $numDays; $i++) {\n $eachDay[$i] = $i; \n }\n foreach($eachDay as $day => &$wkday) {\n $wkday = date(\"w\", mktime(0,0,0,$month,$day,$year));\n }\n foreach($eachDay as $day=>&$wkday) {\n echo \"<table class='box' id=$day month=$month year=$year>\";\n echo \"<td>\";\n echo $day;\n echo \"</td>\";\n echo \"</table>\";\n }\n }", "function mkDay($var){\n$eventContent=$this->mkEventContent($var);\n$linkstr=$this->mkUrl($this->actyear,$this->actmonth,$var);\n\tif ($this->javaScriptDay) $linkstr=\"<a href=\\\"javascript:\".$this->javaScriptDay.\"(\".$this->actyear.\",\".$this->actmonth.\",\".$var.\")\\\">\".$var.\"</a>\";\n\tif ($this->isEvent($var)){\n\t\tif ($this->eventUrl){\n\t\t\t$out=\"<td class=\\\"\".$this->eventID.\"\\\"><a href=\\\"\".$this->eventUrl.\"\\\">\".$var.\"</a>\".$eventContent.\"</td>\";\n\t\t\t$this->eventUrl=false;\n\t\t}\n\t\telseif (!$this->dayLinks) $out=\"<td class=\\\"\".$this->eventID.\"\\\">\".$var.$eventContent.\"</td>\";\n\t\telse $out=\"<td class=\\\"\".$this->eventID.\"\\\">\".$linkstr.$eventContent.\"</td>\";\n\t}\n\telseif ($var==$this->selectedday && $this->actmonth==$this->selectedmonth && $this->actyear==$this->selectedyear){\n\t\tif (!$this->dayLinks) $out=\"<td class=\\\"\".$this->cssSelecDay.\"\\\">\".$var.$eventContent.\"</td>\";\n\t\telse $out=\"<td class=\\\"\".$this->cssSelecDay.\"\\\">\".$linkstr.$eventContent.\"</td>\";\n\t}\n\telseif ($var==$this->daytoday && $this->actmonth==$this->monthtoday && $this->actyear==$this->yeartoday){\n\t\tif (!$this->dayLinks) $out=\"<td class=\\\"\".$this->cssToday.\"\\\">\".$var.$eventContent.\"</td>\";\n\t\telse $out=\"<td class=\\\"\".$this->cssToday.\"\\\">\".$linkstr.$eventContent.\"</td>\";\n\t}\n\telseif ($this->getWeekday($var)==0 && $this->crSunClass){\n\t\tif (!$this->dayLinks) $out=\"<td class=\\\"\".$this->cssSunday.\"\\\">\".$var.$eventContent.\"</td>\";\n\t\telse $out=\"<td class=\\\"\".$this->cssSunday.\"\\\">\".$linkstr.$eventContent.\"</td>\";\n\t}\n\telseif ($this->getWeekday($var)==6 && $this->crSatClass){\n\t\tif (!$this->dayLinks) $out=\"<td class=\\\"\".$this->cssSaturday.\"\\\">\".$var.$eventContent.\"</td>\";\n\t\telse $out=\"<td class=\\\"\".$this->cssSaturday.\"\\\">\".$linkstr.$eventContent.\"</td>\";\n\t}\n\telse{\n\t\tif (!$this->dayLinks) $out=\"<td class=\\\"\".$this->cssMonthDay.\"\\\">\".$var.$eventContent.\"</td>\";\n\t\telse $out=\"<td class=\\\"\".$this->cssMonthDay.\"\\\">\".$linkstr.$eventContent.\"</td>\";\n\t}\nreturn $out;\n}", "function draw_calendar($month,$year, $day=1){\n /* draw table */\n $draw_calendar_time_start = microtime(true);\n $get_xml_start_time = microtime(true);\n \n $calendar = '';\n $xml = autoCache(\"get_event_xml\", array());\n\n $after_xml_time_start = microtime(true);\n $classes = array(\n 1 => 'sun',\n 2 => 'mon',\n 3 => 'tue',\n 4 => 'wed',\n 5 => 'thu',\n 6 => 'fri',\n 7 => 'sat',\n );\n /* days and weeks vars now ... */\n $running_day = date('w',mktime(0,0,0,$month,1,$year));\n $days_in_month = date('t',mktime(0,0,0,$month,1,$year));\n $days_in_this_week = 1;\n $day_counter = 0;\n /* row for week one */\n $calendar.= '<ul class=\"calendar-row\">';\n /* print previous month days until the first of the current month */\n for($x = 0; $x < $running_day; $x++) {\n //Go in the past $x many days in the past\n $back = ($running_day - $x);\n $back = '-' . ($back) . ' days';\n $last_month_date = date('j', strtotime($back, strtotime($year . '-' . $month . '-01')));\n $calendar .= '<li class=\"' . $classes[$days_in_this_week] . ' event not-current\"><span>' . $last_month_date . '</span></li>';\n $days_in_this_week++;\n }\n\n $twig = makeTwigEnviron('/code/events/twig');\n $twig->getExtension('Twig_Extension_Core')->setTimezone('America/Chicago');\n $calendar .= $twig->render('calendar_rest.html',array(\n 'running_day' => $running_day,\n 'days_in_month' => $days_in_month,\n 'days_in_this_week' => $days_in_this_week,\n 'day_counter' => $day_counter,\n 'classes' => $classes,\n 'xml' => $xml,\n 'year' => $year,\n 'month' => $month));\n\n /* all done, return result */\n $draw_calendar_time_end = microtime(true);\n\n $draw_calendar_time = $draw_calendar_time_end - $draw_calendar_time_start;\n $after_xml_time = $draw_calendar_time_end - $after_xml_time_start;\n error_log(\"After XML draw_calendar in $after_xml_time seconds\\n\", 3, '/tmp/calendar.log');\n error_log(\"Full draw_calendar in $draw_calendar_time seconds\\n\", 3, '/tmp/calendar.log');\n return $calendar;\n}", "private function makeDayEventListHTML()\n\t{\n\t\t$showtext = \"\";\n\t\tforeach($this->eventItems as $item) {\n\t\t\tif($item['date'] == $this->curYear.'-'.$this->curMonth.'-'.$this->dayOfMonth) {\n\t\t\t\t$category = (strlen($item['cat']) > 0 ? 'Category: '.$item['cat'].' - ' : '');\n\t\t\t\t$outevents[$n]['category'] = $item['cat'];\n\t\t\t\t\n\t\t\t\tif($item['stdurl']) {\n\t\t\t\t\t$href = '<a href=\"'.$item['url'].'?id='.$item['id'].'\" title=\"'.$category.$item['desc'].'\">'.$item['text'].'</a>';\n\t\t\t\t\t$outevents[$n]['url'] = $item['url'].'?id='.$item['id'];\n\t\t\t\t} else {\n\t\t\t\t\t$href = (strlen($item['url']) > 0 ? '<a href=\"'.$item['url'].'\" title=\"'.$category.$item['desc'].'\">'.$item['text'].'</a>' : $item['text']);\n\t\t\t\t\t$outevents[$n]['url'] = $item['url'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$style = (strlen($item['catcolor']) > 0 ? ' style=\"background-color:#'.str_replace('#','',$item['catcolor']).';\" ' : ' style=\"background-color:#eeeeee;\" ');\n\t\t\t\t\n\t\t\t\t$showtext .= \"\\n\\t\\t\\t<div class=\\\"dayContent\\\"\".$style.\">\".$href.\"</div>\\n\\t\\t\";\n\t\t\t\t\n\t\t\t\t$outevents[$n]['summary'] = $item['text'];\n\t\t\t\t$outevents[$n]['description'] = $item['desc'];\n\t\t\t\t$outevents[$n]['categorycolor'] = (strlen($item['catcolor']) > 0 ? str_replace('#','',$item['catcolor']) : '#eeeeee');\n\t\t\t}\n\t\t\t$n++;\n\t\t}\n\t\treturn $showtext;\n\t}", "private function make_calendar($year, $month){\n\t\t$first_of_month = gmmktime(0,0,0,$month,1,$year);\n\t\t#remember that mktime will automatically correct if invalid dates are entered\n\t\t# for instance, mktime(0,0,0,12,32,1997) will be the date for Jan 1, 1998\n\t\t# this provides a built in \"rounding\" feature to generate_calendar()\n\t\n\t\t$day_names = array(); #generate all the day names according to the current locale\n\t\tfor($n=0,$t=(3+$this->firstDay)*86400; $n<7; $n++,$t+=86400) #January 4, 1970 was a Sunday\n\t\t\t$day_names[$n] = ucfirst(gmstrftime('%A',$t)); #%A means full textual day name\n\t\n\t\tlist($month, $year, $month_name, $weekday) = explode(',',gmstrftime('%m,%Y,%B,%w',$first_of_month));\n\t\t$weekday = ($weekday + 7 - $this->firstDay) % 7; #adjust for $firstDay\n\t\t$title = htmlentities(ucfirst($month_name)).'&nbsp;'.$year; #note that some locales don't capitalize month and day names\n\t\n\t\t#Begin calendar. Uses a real <caption>. See http://diveintomark.org/archives/2002/07/03\n\t\t@list($p, $pl) = each($this->canonicals); @list($n, $nl) = each($this->canonicals); #previous and next links, if applicable\n\t\tif($p) $p = '<span class=\"calendar-prev\">'.($pl ? '<a href=\"'.htmlspecialchars($pl).'\">'.$p.'</a>' : $p).'</span>&nbsp;';\n\t\tif($n) $n = '&nbsp;<span class=\"calendar-next\">'.($nl ? '<a href=\"'.htmlspecialchars($nl).'\">'.$n.'</a>' : $n).'</span>';\n\t\t$calendar = '<table class=\"calendar\">'.\"\\n\".\n\t\t\t'<caption class=\"calendar-month\">'.$p.($this->monthLink ? '<a href=\"'.htmlspecialchars($this->monthLink).'\">'.$title.'</a>' : $title).$n.\"</caption>\\n<tr>\";\n\t\n\t\tif($this->dayNameLength){ #if the day names should be shown ($day_name_length > 0)\n\t\t\t#if day_name_length is >3, the full name of the day will be printed\n\t\t\tforeach($day_names as $d)\n\t\t\t\t$calendar .= '<th abbr=\"'.htmlentities($d).'\">'.htmlentities($this->dayNameLength < 4 ? substr($d,0,$this->dayNameLength) : $d).'</th>';\n\t\t\t$calendar .= \"</tr>\\n<tr>\";\n\t\t}\n\t\n\t\tif($weekday > 0) $calendar .= '<td colspan=\"'.$weekday.'\">&nbsp;</td>'; #initial 'empty' days\n\t\tfor($day=1,$days_in_month=gmdate('t',$first_of_month); $day<=$days_in_month; $day++,$weekday++){\n\t\t\tif($weekday == 7){\n\t\t\t\t$weekday = 0; #start a new week\n\t\t\t\t$calendar .= \"</tr>\\n<tr>\";\n\t\t\t}\n\t\t\tif(isset($this->days[$day]) and is_array($this->days[$day])){\n\t\t\t\t@list($link, $classes, $content) = $this->days[$day];\n\t\t\t\tif(is_null($content)) $content = $day;\n\t\t\t\t$calendar .= '<td'.($classes ? ' class=\"'.htmlspecialchars($classes).'\">' : '>').\n\t\t\t\t\t($link ? '<a href=\"'.htmlspecialchars($link).'\">'.$content.'</a>' : $content).'</td>';\n\t\t\t}\n\t\t\telse $calendar .= \"<td>$day</td>\";\n\t\t}\n\t\tif($weekday != 7) $calendar .= '<td colspan=\"'.(7-$weekday).'\">&nbsp;</td>'; #remaining \"empty\" days\n\t\n\t\treturn $calendar.\"</tr>\\n</table>\\n\";\n\t}", "function day_cell_html($text, $link, $date)\n{\n $html = '';\n $html .= tdcell(\"row_labels\", 1, array('name' => 'date', 'value' => $date));\n $html .= \"<div class=\\\"celldiv slots1\\\">\\n\";\n $html .= \"<a href=\\\"$link\\\" title=\\\"\" . get_vocab(\"viewday\") . \"\\\">$text</a>\\n\";\n $html .= \"</div></td>\\n\";\n return $html;\n}", "function calendar ($whereto=\"./index.php\") {\n global $_GET, $_SERVER;\n $currMonth = ($_GET['month']) ? $_GET['month'] : date(\"n\"); # numeric calendar month\n $currYear = ($_GET['year']) ? $_GET['year'] : date(\"Y\");\n $tm = mktime(0, 0, 0, ($currMonth +$shifted), 1, $currYear);\n $dim = date(\"t\", $tm); # days in month\n $dow = date(\"w\", $tm); # day of week month starts on\n $txm = date(\"F\", $tm); # text name of month\n $pMon = date(\"M\", mktime(0, 0, 0, $currMonth-1, 1, $currYear));\n $nMon = date(\"M\", mktime(0, 0, 0, $currMonth+1, 1, $currYear));\n $cal .= \" <tr><td><br/></td></tr>\\n<tr><th>$txm $currYear</th></tr>\\n<tr><td>\";\n $cal .= \"<table class='cal' width='15%'>\\n <tr>\";\n foreach (array(\"S\",\"M\",\"T\",\"W\",\"T\",\"F\",\"S\") as $k => $v) { $cal .= \"<th>$v</th>\"; }\n $cal .= \"</tr>\\n\";\n $day = \" \";\n for ($row=0; $row<6; $row++) {\n $cal .= \" <tr>\";\n for ($col=0; $col<7; $col++) {\n if (($row == 0) && ($col == $dow)) { $day = 1; }\n if (is_numeric($day)) {\n $dday = ($day < 10) ? \"0$day\" : $day;\n $link = \"?date=$currYear-\".(($currMonth<10)?\"0\":\"\").\"$currMonth-$dday\";\n $cal .= \"<td><a href='$link'>$dday</a></td>\";\n $day++;\n } else {\n $cal .= \"<td>&nbsp;</td>\";\n }\n if ($day > $dim) { $day = \"&nbsp;\"; }\n }\n $cal .= \"</tr>\\n\";\n if ($day >= $dim) { break; }\n }\n $cal .= \" <tr>\\n <td colspan='7' nowrap>\\n\";\n $cal .= \" <a href='?year=\".($currYear-1).\"'>\".substr(($currYear-1),2).\"</a>&nbsp;\\n\";\n $cal .= \" <a href='?month=\".((($currMonth -1) < 1)?12:$currMonth -1).\"&year=\" .((($currMonth -1) < 1)?$currYear -1:$currYear).\"'>$pMon</a>\";\n if (!(($currMonth == date(\"n\")) && ($currYear == date(\"Y\")))) {\n $cal .= \"&nbsp;<a href='?month=\".date(\"n\").\"&year=\".date(\"Y\").\"'>Home</a>\";\n } else {\n $cal .= \"&nbsp;&nbsp;--&nbsp;&nbsp;\";\n }\n $cal .= \"&nbsp;\\n <a href='?month=\".((($currMonth +1) > 12)?1:$currMonth +1).\"&year=\".((($currMonth +1) > 12)?$currYear +1:$currYear).\"'>$nMon</a>&nbsp;\\n\";\n $cal .= \" <a href='?year=\".($currYear+1).\"'>\".substr(($currYear+1),2).\"</a>\\n\";\n $cal .= \" </td>\\n </tr>\\n</table>\\n\";\n $cal .= \"<!-- end calendar -->\\n\";\n return $cal;\n}", "protected function build_month_calendar(&$tpl_var)\n {\n global $page, $lang, $conf;\n\n $query='SELECT '.pwg_db_get_dayofmonth($this->date_field).' as period,\n COUNT(DISTINCT id) as count';\n $query.= $this->inner_sql;\n $query.= $this->get_date_where();\n $query.= '\n GROUP BY period\n ORDER BY period ASC';\n\n $items=array();\n $result = pwg_query($query);\n while ($row = pwg_db_fetch_assoc($result))\n {\n $d = (int)$row['period'];\n $items[$d] = array('nb_images'=>$row['count']);\n }\n\n foreach ( $items as $day=>$data)\n {\n $page['chronology_date'][CDAY]=$day;\n $query = '\n SELECT id, file,representative_ext,path,width,height,rotation, '.pwg_db_get_dayofweek($this->date_field).'-1 as dow';\n $query.= $this->inner_sql;\n $query.= $this->get_date_where();\n $query.= '\n ORDER BY '.DB_RANDOM_FUNCTION.'()\n LIMIT 1';\n unset ( $page['chronology_date'][CDAY] );\n\n $row = pwg_db_fetch_assoc(pwg_query($query));\n $derivative = new DerivativeImage(IMG_SQUARE, new SrcImage($row));\n $items[$day]['derivative'] = $derivative;\n $items[$day]['file'] = $row['file'];\n $items[$day]['dow'] = $row['dow'];\n }\n\n if ( !empty($items) )\n {\n list($known_day) = array_keys($items);\n $known_dow = $items[$known_day]['dow'];\n $first_day_dow = ($known_dow-($known_day-1))%7;\n if ($first_day_dow<0)\n {\n $first_day_dow += 7;\n }\n //first_day_dow = week day corresponding to the first day of this month\n $wday_labels = $lang['day'];\n\n if ('monday' == $conf['week_starts_on'])\n {\n if ($first_day_dow==0)\n {\n $first_day_dow = 6;\n }\n else\n {\n $first_day_dow -= 1;\n }\n\n $wday_labels[] = array_shift($wday_labels);\n }\n\n list($cell_width, $cell_height) = ImageStdParams::get_by_type(IMG_SQUARE)->sizing->ideal_size;\n\n $tpl_weeks = array();\n $tpl_crt_week = array();\n\n //fill the empty days in the week before first day of this month\n for ($i=0; $i<$first_day_dow; $i++)\n {\n $tpl_crt_week[] = array();\n }\n\n for ( $day = 1;\n $day <= $this->get_all_days_in_month(\n $page['chronology_date'][CYEAR], $page['chronology_date'][CMONTH]\n );\n $day++)\n {\n $dow = ($first_day_dow + $day-1)%7;\n if ($dow==0 and $day!=1)\n {\n $tpl_weeks[] = $tpl_crt_week; // add finished week to week list\n $tpl_crt_week = array(); // start new week\n }\n\n if ( !isset($items[$day]) )\n {// empty day\n $tpl_crt_week[] =\n array(\n 'DAY' => $day\n );\n }\n else\n {\n $url = duplicate_index_url(\n array(\n 'chronology_date' =>\n array(\n $page['chronology_date'][CYEAR],\n $page['chronology_date'][CMONTH],\n $day\n )\n )\n );\n\n $tpl_crt_week[] =\n array(\n 'DAY' => $day,\n 'DOW' => $dow,\n 'NB_ELEMENTS' => $items[$day]['nb_images'],\n 'IMAGE' => $items[$day]['derivative']->get_url(),\n 'U_IMG_LINK' => $url,\n 'IMAGE_ALT' => $items[$day]['file'],\n );\n }\n }\n //fill the empty days in the week after the last day of this month\n while ( $dow<6 )\n {\n $tpl_crt_week[] = array();\n $dow++;\n }\n $tpl_weeks[] = $tpl_crt_week;\n\n $tpl_var['month_view'] =\n array(\n 'CELL_WIDTH' => $cell_width,\n 'CELL_HEIGHT' => $cell_height,\n 'wday_labels' => $wday_labels,\n 'weeks' => $tpl_weeks,\n );\n }\n\n return true;\n }", "function calendar_events($events, $YEAR, $MONTH_START, $DAY_START, $WEEKENDS, $MONTH_END, $DOW, $OVERRIDE, $BOX) {\n $results = array('year'=>$YEAR, 'month_start'=>$MONTH_START, 'month_end'=>$MONTH_END, 'box'=>$BOX);\n $results_counter = array();\n $POSDOW = array(0 => 'sun', 1 => 'mon', 2 => 'tue', 3 => 'wed', 4 => 'thu', 5 => 'fri', 6 => 'sat', 7 => 'sun');\n for($month=$MONTH_START; $month <= $MONTH_END; $month++) {\n $month_len = cal_days_in_month(CAL_GREGORIAN, $month, $YEAR);\n $month_name = cal_info(0);\n $month_name = $month_name['months'][$month];\n $first = date(\"w\", mktime(0, 0, 0, $month, 1, $YEAR));\n for($day=1; $day <= $month_len; $day++) {\n $day_type = '';\n $day_num = '';\n $force_day = False;\n if ($month == $MONTH_START && $day < $DAY_START) {\n } elseif (isset($OVERRIDE[$month][$day])) {\n $day_type = $OVERRIDE[$month][$day];\n $force_day = True;\n } elseif (isset($DOW[$POSDOW[$first]])) {\n $day_type = $DOW[$POSDOW[$first]];\n }\n if ($day_type != '') {\n if (isset($events[$day_type])) {\n if (!isset($results_counter[$day_type])) {\n $results_counter[$day_type] = 1;\n } else {\n $results_counter[$day_type]++;\n }\n }\n if (isset($events[$day_type]) && isset($events[$day_type][$results_counter[$day_type]])) {\n $event = $events[$day_type][$results_counter[$day_type]];\n $day_num = $results_counter[$day_type];\n } else {\n $event = array();\n }\n if ($force_day || !empty($event)) {\n $results[$month][$day] = array('month'=>$month, 'day'=>$day, 'type'=>$day_type, 'type_num'=>$day_num, 'dow'=>$first, 'dow_eng'=>$POSDOW[$first], 'event'=>$event);\n }\n }\n $first++;\n if ($first == 7) {$first = 0;}\n }\n }\n return $results;\n }", "public function print_blanc_calendar(string $month, int $year){\r\n \r\n $month_days = static::no_of_days_in_month($month, $year); \r\n $empty_days = $this->empty_days($month, $year);\r\n for ($i=1; $i<=$empty_days; $i++){\r\n echo \"<div class='cal_date empty_date'> </div>\";\r\n }\r\n \r\n \r\n for ($i=1; $i<=$month_days; $i++){\r\n echo \"<div class='cal_date cal_blanc_date'>\";\r\n echo $i;\r\n echo \"</div>\";\r\n }\r\n }", "function draw_calendar(){\r\n \r\n $year = date(\"Y\");\r\n $monthCurrent = date(\"m\");\r\n $monthNext1 = date(\"m\", strtotime('+1 month'));\r\n $monthNext2 = date(\"m\", strtotime('+2 month'));\r\n $monthNext3 = date(\"m\", strtotime('+3 month'));\r\n $monthNext4 = date(\"m\", strtotime('+4 month'));\r\n $monthNext5 = date(\"m\", strtotime('+5 month'));\r\n\r\n $monthCurrentStr = date(\"M\");\r\n $monthNext1Str = date(\"M\", strtotime('+1 month'));\r\n $monthNext2Str = date(\"M\", strtotime('+2 month'));\r\n $monthNext3Str = date(\"M\", strtotime('+3 month'));\r\n $monthNext4Str = date(\"M\", strtotime('+4 month'));\r\n $monthNext5Str = date(\"M\", strtotime('+5 month'));\r\n\r\n\r\n $numberofday1 = cal_days_in_month(CAL_GREGORIAN,$monthCurrent , $year);\r\n $numberofday2 = cal_days_in_month(CAL_GREGORIAN,$monthNext1 , $year);\r\n $numberofday3 = cal_days_in_month(CAL_GREGORIAN,$monthNext2 , $year);\r\n $numberofday4 = cal_days_in_month(CAL_GREGORIAN,$monthNext3 , $year);\r\n $numberofday5 = cal_days_in_month(CAL_GREGORIAN,$monthNext4 , $year);\r\n $numberofday6 = cal_days_in_month(CAL_GREGORIAN,$monthNext5 , $year);\r\n\r\n \r\n\t/* draw table */\r\n $calendar = '<table cellpadding=\"0\" cellspacing=\"2\" style=\"width:100%;\" class=\"calendar\"><thead>';\r\n $calendar.= '<tr>';\r\n $calendar.= '<th colspan=\"3\"> <center>'.$monthCurrentStr.'</center> </th>';\r\n $calendar.= '<th colspan=\"3\"> <center>'.$monthNext1Str.'</center> </th>';\r\n $calendar.= '<th colspan=\"3\"> <center>'.$monthNext2Str.'</center> </th>';\r\n $calendar.= '<th colspan=\"3\"> <center>'.$monthNext3Str.'</center> </th>';\r\n $calendar.= '<th colspan=\"3\"> <center>'.$monthNext4Str.'</center> </th>';\r\n $calendar.= '<th colspan=\"3\"> <center>'.$monthNext5Str.'</center> </th>';\r\n \r\n \r\n\r\n\t\r\n\t/* final row */\r\n $calendar.= '</tr></head>'; \r\n $calendar.= '<tbody><tr>';\r\n // for($i = 1 ,$j = 1 ,$k = 1 ; $i <= $numberofday1, $j = $numberofday2, $k <= $numberofday3 ; $i++, $j++, $k++)\r\n $i = 0 ;\r\n $j = 0;\r\n $k = 0;\r\n $i1 = 0 ;\r\n $j1 = 0;\r\n $k1 = 0;\r\n $u = 0;\r\n\r\n \r\n while( $i <= $numberofday1 || $j <= $numberofday2 || $k <= $numberofday3 || $i1 <= $numberofday4 || $j1 <= $numberofday5 || $k1 <= $numberofday6 )\r\n { $i++;\r\n $j++;\r\n $k++;\r\n $i1++;\r\n $j1++;\r\n $k1++;\r\n $myDay = 0;\r\n $u=0;\r\n if($i <= $numberofday1 ){\r\n\r\n //Verification des jours feries\r\n\r\n $todayCheckHoliday1 = mktime(0, 0, 0, $monthCurrent, $i, $year); \r\n $today1 = unixtojd(mktime(0, 0, 0, $monthCurrent, $i, $year));\r\n $today = cal_from_jd($today1, CAL_GREGORIAN);\r\n //$todayCheckHoliday = new DateTime($year.'-'.$monthCurrent.'-'.$i.' 00:00:00');\r\n // echo $holidays[1];\r\n // echo $todayCheckHoliday;\r\n \r\n \r\n //////////////////////////////////////////////////\r\n if(($today[\"abbrevdayname\"] == \"Sun\") || ($today[\"abbrevdayname\"] == \"Sat\")){ $color = \"gray\";}\r\n else {$color = \"\";}\r\n\r\n $calendar.= '<td class=\"small\" > '.$i.' </td>';\r\n $calendar.= '<td class=\"small\" > '.$today[\"abbrevdayname\"].' </td>'; \r\n $calendar.= '<td class=\"caseBloque\" id=\"'.$year.'-'.$monthCurrent.'-'.$i.'\" style=\"background-color:'.$color.'\" onclick=\"myEvent(this)\">';\r\n $calendar.= '<div class=\"row\"><div class=\"col-sm-2\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthCurrent.'-'.$i.':1\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-2\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthCurrent.'-'.$i.':2\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-2\"></div></div></td>';\r\n \r\n }\r\n\r\n else{\r\n\r\n $calendar.= '<td class=\"small\" style=\"background-color:'.$color.'\" ></td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> </td>';\r\n $calendar.= '<td style=\"\"> </td>';\r\n }\r\n\r\n if($j <= $numberofday2 ){\r\n\r\n $todayCheckHoliday1 = mktime(0, 0, 0, $monthNext1, $j, $year);\r\n $todayCheckHoliday = new DateTime($year.'-'.$monthNext1.'-'.$j.' 00:00:00');\r\n\r\n $today1 = unixtojd(mktime(0, 0, 0, $monthNext1,$j, $year));\r\n $today = cal_from_jd($today1, CAL_GREGORIAN);\r\n\r\n if(($today[\"abbrevdayname\"] == \"Sun\") || ($today[\"abbrevdayname\"] == \"Sat\")){ $color = \"gray\";}\r\n else {$color = \"\";}\r\n\r\n\r\n $calendar.= '<td class=\"small\" style=\"\" > '.$j.' </td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> '.$today[\"abbrevdayname\"].' </td>';\r\n $calendar.= '<td class=\"caseBloque\" id=\"'.$year.'-'.$monthNext1.'-'.$j.'\" style=\"background-color:'.$color.'\" onclick=\"myEvent(this)\">';\r\n $calendar.= '<div class=\"row\"><div class=\"col-sm-2\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext1.'-'.$j.':1\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-1\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext1.'-'.$j.':2\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-2\"></div></div></td>';\r\n \r\n }\r\n else{\r\n\r\n $calendar.= '<td class=\"small\" style=\"background-color:\" ></td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> </td>';\r\n $calendar.= '<td style=\"\"> </td>';\r\n }\r\n if($k <= $numberofday3 ){\r\n\r\n $today1 = unixtojd(mktime(0, 0, 0,$monthNext2, $k, $year));\r\n $today = cal_from_jd($today1, CAL_GREGORIAN);\r\n\r\n if(($today[\"abbrevdayname\"] == \"Sun\") || ($today[\"abbrevdayname\"] == \"Sat\")) { $color = \"gray\";}\r\n else {$color = \"\";}\r\n\r\n $calendar.= '<td class=\"small\" style=\"\" > '.$k.' </td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> '.$today[\"abbrevdayname\"].' </td>';\r\n $calendar.= '<td class=\"caseBloque\" id=\"'.$year.'-'.$monthNext2.'-'.$k.'\" style=\"background-color:'.$color.'\" onclick=\"myEvent(this)\">';\r\n $calendar.= '<div class=\"row\"><div class=\"col-sm-2\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext2.'-'.$k.':1\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-1\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext2.'-'.$k.':2\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-2\"></div></div></td>';\r\n \r\n }\r\n else{\r\n $calendar.= '<td class=\"small\" style=\"background-color:#d1d2d3\" ></td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> </td>';\r\n $calendar.= '<td style=\"\"></td>';\r\n }\r\n if($i1 <= $numberofday4 ){\r\n\r\n $today1 = unixtojd(mktime(0, 0, 0,$monthNext3, $i1, $year));\r\n $today = cal_from_jd($today1, CAL_GREGORIAN);\r\n\r\n if(($today[\"abbrevdayname\"] == \"Sun\") || ($today[\"abbrevdayname\"] == \"Sat\")){ $color = \"gray\";}\r\n else {$color = \"\";}\r\n\r\n $calendar.= '<td class=\"small\" style=\"\" > '.$i1.' </td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> '.$today[\"abbrevdayname\"].' </td>'; \r\n $calendar.= '<td class=\"caseBloque\" id=\"'.$year.'-'.$monthNext3.'-'.$i1.'\" style=\"background-color:'.$color.'\" onclick=\"myEvent(this)\">';\r\n $calendar.= '<div class=\"row\"><div class=\"col-sm-2\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext3.'-'.$i1.':1\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-1\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext3.'-'.$i1.':2\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-2\"></div></div></td>';\r\n \r\n }\r\n else{\r\n $calendar.= '<td class=\"small\" style=\"\" > </td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> </td>';\r\n $calendar.= '<td style=\"\"> </td>';\r\n }\r\n if($j1 <= $numberofday5 ){\r\n\r\n $today1 = unixtojd(mktime(0, 0, 0,$monthNext4, $j1, $year));\r\n $today = cal_from_jd($today1, CAL_GREGORIAN);\r\n\r\n if(($today[\"abbrevdayname\"] == \"Sun\") || ($today[\"abbrevdayname\"] == \"Sat\")){ $color = \"gray\";}\r\n else {$color = \"\";}\r\n\r\n $calendar.= '<td class=\"small\" style=\"\" > '.$j1.' </td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> '.$today[\"abbrevdayname\"].' </td>';\r\n $calendar.= '<td class=\"caseBloque\" id=\"'.$year.'-'.$monthNext4.'-'.$j1.'\" style=\"background-color:'.$color.'\" onclick=\"myEvent(this)\">';\r\n $calendar.= '<div class=\"row\"><div class=\"col-sm-2\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext4.'-'.$j1.':1\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-1\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext4.'-'.$j1.':2\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-2\"></div></div></td>';\r\n \r\n }\r\n else{\r\n\r\n $calendar.= '<td class=\"small\" style=\"\" > </td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> </td>';\r\n $calendar.= '<td style=\"\"> </td>';\r\n }\r\n if($k1 <= $numberofday6 ){\r\n\r\n $today1 = unixtojd(mktime(0, 0, 0,$monthNext5, $k1, $year));\r\n $today = cal_from_jd($today1, CAL_GREGORIAN);\r\n\r\n if(($today[\"abbrevdayname\"] == \"Sun\") || ($today[\"abbrevdayname\"] == \"Sat\")){ $color = \"gray\";}\r\n else {$color = \"\";}\r\n\r\n $calendar.= '<td class=\"small\" style=\"\" > '.$k1.' </td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> '.$today[\"abbrevdayname\"].' </td>';\r\n $calendar.= '<td class=\"caseBloque\" id=\"'.$year.'-'.$monthNext5.'-'.$k1.'\" style=\"background-color:'.$color.'\" onclick=\"myEvent(this)\">';\r\n $calendar.= '<div class=\"row\"><div class=\"col-sm-2\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext5.'-'.$k1.':1\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-1\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext5.'-'.$k1.':2\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-2\"></div></div></td>';\r\n \r\n }\r\n else{\r\n \r\n $calendar.= '<td class=\"small\" style=\"background-color:'.$color.'\" > </td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> </td>';\r\n $calendar.= '<td style=\"\"> </td>';\r\n }\r\n\r\n \r\n\r\n \r\n $calendar.= '</tr>';\r\n }\r\n \r\n\r\n \r\n\t\r\n\t/* final row */\r\n $calendar.= '</tr>';\r\n \r\n\r\n\r\n\t/* end the table */\r\n\t$calendar.= '</tbody></table>';\r\n\t\r\n\t/* all done, return result */\r\n\treturn $calendar;\r\n}", "public function drawHTML()\n\t{\n\t\t$this->calWeekDays .= \"<table border=\\\"1\\\">\\n\";\n\t\t$this->makeCalendarTitle();\n\t\t$this->makeCalendarHead();\n\t\t$this->makeDayHeadings();\n\t\t$this->calWeekDays .= \"\\t<tr>\\n\";\n\t\t$this->startMonthSpacers();\n\t\t$this->makeHTMLIterator();\n\t\t$this->endMonthSpacers();\n\t\t$this->calWeekDays .= \"\\t</tr>\\n\";\n\t\t$this->calWeekDays .= \"</table>\\n\";\n\t\t\n\t\techo $this->calWeekDays;\n\t}", "public static function week_calendar($day, $month, $year) {\r\n global $langNoEvents, $langDay, $langWeek, $langMonth, $langViewShow;\r\n\r\n $calendar_content = \"\";\r\n if (is_null($day)) {\r\n $day = 1;\r\n }\r\n $nextweekdate = new DateTime(\"$year-$month-$day\");\r\n $nextweekdate->add(new DateInterval('P1W'));\r\n $previousweekdate = new DateTime(\"$year-$month-$day\");\r\n $previousweekdate->sub(new DateInterval('P1W'));\r\n\r\n $thisweekday = new DateTime(\"$year-$month-$day\");\r\n $difffromMonday = ($thisweekday->format('w') == 0)? 6:$thisweekday->format('w')-1;\r\n $monday = $thisweekday->sub(new DateInterval('P'.$difffromMonday.'D')); //Sunday->1, ..., Saturday->7\r\n $weekdescription = ucfirst(format_locale_date($monday->getTimestamp()));\r\n $sunday = $thisweekday->add(new DateInterval('P6D'));\r\n $weekdescription .= ' - '.ucfirst(format_locale_date($sunday->getTimestamp()));\r\n $cursorday = $thisweekday->sub(new DateInterval('P6D'));\r\n\r\n $backward = array('day'=>$previousweekdate->format('d'), 'month'=>$previousweekdate->format('m'), 'year' => $previousweekdate->format('Y'));\r\n $foreward = array('day'=>$nextweekdate->format('d'), 'month'=>$nextweekdate->format('m'), 'year' => $nextweekdate->format('Y'));\r\n\r\n $calendar_content .= '<div class=\"right\" style=\"width:100%\">'.$langViewShow.':&nbsp;'.\r\n '<a href=\"#\" onclick=\"show_day(selectedday, selectedmonth, selectedyear);return false;\">'.$langDay.'</a>&nbsp;|&nbsp;'.\r\n '<a href=\"#\" onclick=\"show_week(selectedday, selectedmonth, selectedyear);return false;\">'.$langWeek.'</a>&nbsp;|&nbsp;'.\r\n '<a href=\"#\" onclick=\"show_month(selectedday, selectedmonth, selectedyear);return false;\">'.$langMonth.'</a></div>';\r\n\r\n $calendar_content .= \"<table class='table-default'>\";\r\n $calendar_content .= \"<tr>\";\r\n $calendar_content .= '<td width=\"25\"><a href=\"#\" onclick=\"show_week('.$backward['day'].','.$backward['month'].','.$backward['year'].'); return false;\">&laquo;</a></td>';\r\n $calendar_content .= \"<td class='center'><b>$weekdescription</b></td>\";\r\n $calendar_content .= '<td width=\"25\" class=\"right\"><a href=\"#\" onclick=\"show_week('.$foreward['day'].','.$foreward['month'].','.$foreward['year'].'); return false;\">&raquo;</a></td>';\r\n $calendar_content .= \"</tr>\";\r\n $calendar_content .= \"</table>\";\r\n $eventlist = Calendar_Events::get_calendar_events(\"week\", \"$year-$month-$day\");\r\n\r\n $calendar_content .= \"<table class='table-default'>\";\r\n\r\n $curday = 0;\r\n $now = getdate();\r\n $today = new DateTime($now['year'].'-'.$now['mon'].'-'.$now['mday']);\r\n $curstartddate = \"\";\r\n foreach ($eventlist as $thisevent) {\r\n if ($curstartddate != $thisevent->startdate) { //event date changed\r\n $thiseventdatetime = new DateTime($thisevent->startdate);\r\n while($cursorday < $thiseventdatetime) {\r\n if ($cursorday == $today)\r\n $class = 'today';\r\n else\r\n $class = 'monthLabel';\r\n $calendar_content .= \"<tr><td colspan='3' class='$class'>\" . \"&nbsp;<b>\" . ucfirst(format_locale_date($cursorday->getTimestamp())) . \"</b></td></tr>\";\r\n $calendar_content .= \"<tr><td colspan='3'>$langNoEvents</td></tr>\";\r\n $cursorday->add(new DateInterval('P1D'));\r\n $curday++;\r\n }\r\n if ($thiseventdatetime == $today)\r\n $class = 'today';\r\n else\r\n $class = 'monthLabel';\r\n $calendar_content .= \"<tr><td colspan='3' class='$class'>\" . \"&nbsp;<b>\" . ucfirst(format_locale_date(strtotime($thisevent->startdate))) . \"</b></td></tr>\";\r\n if ($cursorday <= $thiseventdatetime) {\r\n $cursorday->add(new DateInterval('P1D'));\r\n $curday++;\r\n }\r\n }\r\n $calendar_content .= Calendar_Events::week_calendar_item($thisevent, 'even');\r\n $curstartddate = $thisevent->startdate;\r\n }\r\n /* Fill with empty days*/\r\n for($i=$curday;$i<7;$i++) {\r\n if ($cursorday == $today)\r\n $class = 'today';\r\n else\r\n $class = 'monthLabel';\r\n $calendar_content .= \"<tr><td colspan='3' class='$class'>\" . \"&nbsp;<b>\" . ucfirst(format_locale_date($cursorday->getTimestamp())) . \"</b></td></tr>\";\r\n $calendar_content .= \"<tr><td colspan='3'>$langNoEvents</td></tr>\";\r\n $cursorday->add(new DateInterval('P1D'));\r\n }\r\n $calendar_content .= \"</table>\";\r\n /* Legend */\r\n $calendar_content .= Calendar_Events::calendar_legend();\r\n\r\n return $calendar_content;\r\n }", "public function getCalendar() {\n\t\t$this->setDate();\n\t\t$this->getLinks();\n\t\t $this->di->logger->stamp(__CLASS__, __METHOD__, '');\n\n\n\t\t// Get new date array\n\t\t$newDate = getdate(mktime(0,0,0,$this->newMonth, 1, $this->newYear));\n\t\t// Calculate rest days in previous and next month\n\t\t$firstDay = $newDate['wday'];\n\t\t$firstDay = ($firstDay == 0) ? 7: $firstDay;\n\t\t$daysInMonth = cal_days_in_month ( CAL_GREGORIAN , $this->newMonth , $this->newYear );\n\t\tif($this->newMonth != 1){\n\t\t\t$daysInPrevMonth = cal_days_in_month ( CAL_GREGORIAN , $this->newMonth-1 , $this->newYear );\n\t\t}\n\t\telse if($this->newMonth == 1) {\n\t\t\t$daysInPrevMonth = cal_days_in_month ( CAL_GREGORIAN , 12 , $this->newYear-1 );\n\t\t}\n\n\t\t$lastDates = $daysInPrevMonth - $firstDay +1;\n\n\t\t// Start building table\n\t\t$table =\"<section class='calendar'><header>\" . $this->prevLink . \"<h3>\" . $newDate['month'] . \" - \" . $newDate['year'] . \"</h3>\" . $this->nextLink;\n\t\t$table .= \"</header><table><thead>\\n\";\n\t\t$table .= \"<th>Mon</th><th>Tue</th><th>Wed</th><th>Thu</th><th>Fri</th><th>Sat</th><th>Sun</th>\\n\";\n\t\t$table .= \"</thead>\\n\";\n\t\t$table .= \"<tr>\";\n\t\t\n\t\tfor ($a=1; $a < $firstDay ; $a++) { \n\t\t\t$lastDates++;\n\t\t\t$table .= \"<td class='lighter'>\" . $lastDates . \"</td>\";\n\t\t}\n\n\t\t$d = 0;\n\t\tfor ($b=0; $b < $daysInMonth ; $b++) { \n\t\t\t\n\t\t\t$d++;\n\t\t\t$DATE = date('N',mktime(0,0,0, $this->newMonth, $d, $this->newYear));\n\t\t\t\n\t\t\tif ($DATE == 1) {\n\t\t\t\t$table .= \"</tr>\\n<tr>\";\n\t\t\t}\n\n\t\t\tif (($this->newMonth == $this->currentMonth && $d == $this->currentDate && $this->newYear == $this->currentYear)) {\n\t\t\t\t$table .= \"<td><strong>\" . $d . \"</strong></td>\";\n\t\t\t}\n\t\t\telse if ($DATE == 7) {\n\t\t\t\t$table .= \"<td class='red'>\" . $d . \"</td>\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$table .= \"<td>\" . $d . \"</td>\";\n\t\t\t}\n\t\t}\n\t\t\tif ($DATE != 7) {\n\t\t\t\t$nextMonthDays = 7 - $DATE;\n\t\t\t\tfor ($c=1; $c <= $nextMonthDays ; $c++) { \n\t\t\t\t\t$table .= \"<td class='lighter'>\" . $c . \"</td>\";\n\t\t\t}\n\t}\n\t\t$table .= \"</tr></table></section>\";\n\n\t\treturn $table;\n\t}", "public function api_getTable($month,$year)\n\t{\n\t\t$employees = Employee::all();\n\n\t\tforeach ($employees as $key => $value) {\n\t\t\t$calendar = Calendar::where('employee_id', '=', $value->id)->where('month',$month)->where('year',$year)->first();\n\t\t\tif($calendar == null)\n\t\t\t{\n\t\t\t\t$calendar = $this->bornCalendarEmpty($value->id, $month, $year);\n\t\t\t}\n\t\t\t$this->generatePresenteWhenInitNewDate($calendar, $month, $year);\n\t\t\t$employees[$key]->calendar = $calendar;\n\t\t}\n\n?>\n <div id=\"datafullname\" style=\"display:none\"></div>\n <div class=\"sidebar-calendar\">\n <table>\n <thead>\n <tr><th><div class=\"nameitem\">Fullname</div></th></tr>\n </thead>\n <tbody>\n <tr class=\"itemblank\">\n <td><div class=\"nameitem\"></div></td>\n </tr>\n <?php foreach($employees as $key => $value) : ?>\n <tr>\n <!-- <td><div class=\"nameitem\">{{ $value->id }}</div></td> -->\n <td><div class=\"nameitem\" idem=\"<?php echo $value->id; ?>\"><?php echo $value->lastname.\" \".$value->firstname; ?></div></td>\n </tr>\n <?php endforeach;?>\n </tbody>\n </table>\n </div>\n <div class=\"content-calendar\">\n <div id=\"datacalendar\" style=\"display:none\"></div>\n <table>\n <thead>\n <tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ($i=1;$i<=31;$i++)\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$dt = null;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (checkDateValid($i, $month, $year)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$dt = Carbon::create($year, $month, $i);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo \"<th><div class='day'>\".$i.\"<br/>\".toEnglishDate($dt->dayOfWeek).\"</div></th>\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t?>\n </tr>\n </thead>\n <tbody>\n <tr class=\"itemblank\">\n <td><div class=\"innerblank\"></div></td>\n </tr>\n <?php\n foreach($employees as $key => $value)\n {\n $calendar = $value->calendar;\n ?>\n <tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ($i=1;$i<=31;$i++)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$dt = Carbon::create($year, $month, $i);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (checkDateValid($i, $month, $year)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ($dt->dayOfWeek == 6 || $dt->dayOfWeek == 0)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td style=\"background-color:#ffbff7\"><div class=\"item\" idem=\"{{ $value->id }}\" idday=\"<?php echo $i;?>\" ><?php echo $calendar->{'n'.$i};?></div></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td><div class=\"item\" idem=\"{{ $value->id }}\" idday=\"<?php echo $i;?>\" ><?php echo $calendar->{'n'.$i};?></div></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t?>\n </tr>\n <?php\n }\n ?>\n\n </tbody>\n </table>\n </div>\n\n\t\t<?php\n\t}", "private function generate_calendar($year, $month){\n\t\t// --- calculations\n\t\t$first_of_month = gmmktime(0,0,0,$month,1,$year);\n\t\t/* remember that mktime will automatically correct if invalid dates are entered\n\t\t for instance, mktime(0,0,0,12,32,1997) will be the date for Jan 1, 1998\n\t\t this provides a built in \"rounding\" feature to generate_calendar() */\n\t\n\t\t$day_names = array(); // generate all the day names according to the current locale\n\t\tfor($n=0,$t=(3+$this->firstDay)*86400; $n<7; $n++,$t+=86400) // January 4, 1970 was a Sunday\n\t\t\t$day_names[$n] = ucfirst(gmstrftime('%A',$t)); // %A means full textual day name\n\t\n\t\tlist($month, $year, $month_name, $weekday) = explode(',',gmstrftime('%m,%Y,%B,%w',$first_of_month));\n\t\t$weekday = ($weekday + 7 - $this->firstDay) % 7; // adjust for $firstDay\n\t\t$title = htmlentities(ucfirst($month_name)).'&nbsp;'.$year; // note that some locales don't capitalize month and day names\n\t\n\t\t// --- make calendar header\n\t\t@list($p, $pl) = each($this->canonicals); @list($n, $nl) = each($this->canonicals); // previous and next links, if applicable\n\t\tif($p) $p = '<div class=\"prev\">'.($pl ? '<a href=\"'.htmlspecialchars($pl).'\">'.$p.'</a>' : $p).'</div>&nbsp;';\n\t\tif($n) $n = '&nbsp;<div class=\"next\">'.($nl ? '<a href=\"'.htmlspecialchars($nl).'\">'.$n.'</a>' : $n).'</div>';\n\t\t$calendar = '<div class=\"calendar\"><div class=\"month\">'.$p.($this->monthLink ? '<a href=\"'.htmlspecialchars($this->monthLink).'\">'.$title.'</a>' : $title).$n.\"</div>\";\n\n\t\t// --- make days of the week titles\n\t\tif($this->dayNameLength){ //if the day names should be shown ($day_name_length > 0)\n\t\t\tforeach($day_names as $d)\n\t\t\t\t$calendar .= '<div class=\"box '.htmlentities($d).'\">'.htmlentities($this->dayNameLength < 4 ? substr($d,0,$this->dayNameLength) : $d).'</div>';\n\t\t\t$calendar .= '<br><div class=\"dom\">';\n\t\t}\n\n\t\t// --- make days of the month\n\t\tif($weekday > 0) $calendar .= '<div class=\"box offset'.$weekday.'\">&nbsp;</div>'; // initial 'empty' days\n\t\tfor($day=1,$days_in_month=gmdate('t',$first_of_month); $day<=$days_in_month; $day++,$weekday++){\n\t\t\tif($weekday == 7) $weekday = 0; // start a new week\n\n\t\t\tif(isset($this->days[$day]) and is_array($this->days[$day])){\n\t\t\t\t@list($link, $classes, $content) = $this->days[$day];\n\t\t\t\tif(is_null($content)) $content = $day;\n\t\t\t\t$calendar .= '<div class=\"box'.($classes ? ' '.htmlspecialchars($classes).'\">' : '\">').\n\t\t\t\t\t($link ? '<a href=\"'.htmlspecialchars($link).'\">'.$content.'</a>' : $content).'</div>';\n\t\t\t}\n\t\t\telse $calendar .= '<div class=\"box\">'.$day.'</div>';\n\t\t}\n\t\tif($weekday != 7) $calendar .= '<div class=\"box offset'.(7-$weekday).'\">&nbsp;</div>'; // remaining \"empty\" days\n\n\t\treturn $calendar.'<br class=\"clear\"/></div></div>';\n\t}", "function _getCalendarData( $year, $month, $day){\t\t\t\t\n\t\t$rows = $this->_listIcalEventsByMonth( $year, $month);\n \t\t\n\t\t$rowcount = count( $rows );\t\t\n\t\t$data = array();\n\t\t$data['year'] = $year;\n\t\t$data['month'] = $month;\n\t\t$month = intval($month);\n\t\tif( $month <= '9' ) {\n\t\t\t$month = '0' . $month;\n\t\t}\n\t\t$data['startday'] = $startday = (int) EventBookingHelper::getConfigValue('calendar_start_date');\t\t\n\t\t// get days in week\n\t\t$data[\"daynames\"] = array();\n\t\tfor( $i = 0; $i < 7; $i++ ) {\n\t\t\t$data[\"daynames\"][$i] = $this->_getDayName(($i+$startday)%7, true );\n\t\t}\t\t\n\t\t$data[\"dates\"]=array();\t\t\n\t\t//Start days\n\t\t$start = (( date( 'w', mktime( 0, 0, 0, $month, 1, $year )) - $startday + 7 ) % 7 );\t\t\n\t\t// previous month\n\t\t$priorMonth = $month-1;\n\t\t$priorYear = $year;\t\t\n\t\tif ($priorMonth <= 0) {\n\t\t\t$priorMonth += 12;\n\t\t\t$priorYear -= 1;\n\t\t}\t\t\t\n\t\t$dayCount=0;\n\t\tfor( $a = $start; $a > 0; $a-- ){\n\t\t\t$data[\"dates\"][$dayCount] = array();\n\t\t\t$data[\"dates\"][$dayCount][\"monthType\"] = \"prior\";\n\t\t\t$data[\"dates\"][$dayCount][\"month\"] = $priorMonth;\n\t\t\t$data[\"dates\"][$dayCount][\"year\"] = $priorYear;\n\t\t\t$data[\"dates\"][$dayCount]['countDisplay'] = 0;\n\t\t\t$dayCount++;\n\t\t}\n\t\tsort($data[\"dates\"]);\n\t\t//Current month\n\t\t$end = date( 't', mktime( 0, 0, 0,( $month + 1 ), 0, $year ));\n\t\tfor( $d = 1; $d <= $end; $d++ ){\n\t\t\t$data[\"dates\"][$dayCount]=array();\n\t\t\t// utility field used to keep track of events displayed in a day!\n\t\t\t$data[\"dates\"][$dayCount]['countDisplay']=0;\n\t\t\t$data[\"dates\"][$dayCount][\"monthType\"]=\"current\";\n\t\t\t$data[\"dates\"][$dayCount][\"month\"]=$month;\n\t\t\t$data[\"dates\"][$dayCount][\"year\"]=$year;\t\t\n\t\t\t\t\t\t\n\t\t\t$t_datenow = $this->_getNow();\n\t\t\t$now_adjusted = $t_datenow->toUnix(true);\n\t\t\tif( $month == strftime( '%m', $now_adjusted)\n\t\t\t&& $year == strftime( '%Y', $now_adjusted)\n\t\t\t&& $d == strftime( '%d', $now_adjusted)) {\n\t\t\t\t$data[\"dates\"][$dayCount][\"today\"]=true;\n\t\t\t}else{\n\t\t\t\t$data[\"dates\"][$dayCount][\"today\"]=false;\n\t\t\t}\n\t\t\t$data[\"dates\"][$dayCount]['d']=$d;\t\t\t\t\t\t\n\t\t\t$data[\"dates\"][$dayCount]['events'] = array();\n\t\t\tif( $rowcount > 0 ){\n\t\t\t\tforeach ($rows as $row) {\n\t\t\t\t\t\t$date_of_event = explode('-',$row->event_date);\n\t\t\t\t\t\t$date_of_event = (int)$date_of_event[2];\t\t\t\t\t\t\n\t\t\t\t\t\tif ($d == $date_of_event ){\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$i=count($data[\"dates\"][$dayCount]['events']);\n\t\t\t\t\t\t\t$data[\"dates\"][$dayCount]['events'][$i] = $row;\n\t\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t$dayCount++;\n\t\t}\t\n \t\n\t\t// followmonth\n\t\t$days \t= ( 7 - date( 'w', mktime( 0, 0, 0, $month + 1, 1, $year )) + $startday ) %7;\n\t\t$d\t\t= 1;\n\t\t$followMonth = $month+1;\n\t\t$followYear = $year;\n\t\tif ($followMonth>12) {\n\t\t\t$followMonth-=12;\n\t\t\t$followYear+=1;\n\t\t}\n\t\t$data[\"followingMonth\"]=array();\n\t\tfor( $d = 1; $d <= $days; $d++ ) {\n\t\t\t$data[\"dates\"][$dayCount]=array();\n\t\t\t$data[\"dates\"][$dayCount][\"monthType\"]=\"following\";\n\t\t\t$data[\"dates\"][$dayCount][\"month\"]=$followMonth;\n\t\t\t$data[\"dates\"][$dayCount][\"year\"]=$followYear;\n\t\t\t$data[\"dates\"][$dayCount]['countDisplay']=0;\n\t\t\t$dayCount++;\n\t\t}\n\t\treturn $data;\t\t\n\t}", "function mkMonth ($month) {\n $head = \"<div class='fullwidth'>\";\n $head .= \"<div class='month'>\";\n $head .= date(\"F\", mktime(0,0,0,$month));\n $head .= \"</div>\";\n $head .= \"<div id='jresult'>\";\n $head .= \"</div>\";\n $head .= \"<div id='week'>\";\n $head .= \"<table class='days'>\";\n $head .= \"<td>\";\n $head .= \"Sunday\";\n $head .= \"</td>\";\n $head .= \"</table>\";\n $head .= \"<table class='days'>\";\n $head .= \"<td>\";\n $head .= \"Monday\";\n $head .= \"</td>\";\n $head .= \"</table>\";\n $head .= \"<table class='days'>\";\n $head .= \"<td>\";\n $head .= \"Tuesday\";\n $head .= \"</td>\";\n $head .= \"</table>\";\n $head .= \"<table class='days'>\";\n $head .= \"<td>\";\n $head .= \"Wednesday\";\n $head .= \"</td>\";\n $head .= \"</table>\";\n $head .= \"<table class='days'>\";\n $head .= \"<td>\";\n $head .= \"Thursday\";\n $head .= \"</td>\";\n $head .= \"</table>\";\n $head .= \"<table class='days'>\";\n $head .= \"<td>\";\n $head .= \"Friday\";\n $head .= \"</td>\";\n $head .= \"</table>\";\n $head .= \"<table class='days'>\";\n $head .= \"<td>\";\n $head .= \"Saturday\";\n $head .= \"</td>\";\n $head .= \"</table>\";\n $head .= \"</div>\";\n echo $head;\n }", "function getCalender($year = '', $month = '') {\n $dateYear = ($year != '') ? $year : date(\"Y\");\n $dateMonth = ($month != '') ? $month : date(\"m\");\n $date = $dateYear . '-' . $dateMonth . '-01';\n $currentMonthFirstDay = date(\"N\", strtotime($date));\n $totalDaysOfMonth = cal_days_in_month(CAL_GREGORIAN, $dateMonth, $dateYear);\n $totalDaysOfMonthDisplay = ($currentMonthFirstDay == 7) ? ($totalDaysOfMonth) : ($totalDaysOfMonth + $currentMonthFirstDay);\n $boxDisplay = ($totalDaysOfMonthDisplay <= 35) ? 35 : 42;\n ?>\n <div id='calendar_section'>\n <div id=\"calender_section\" class=\"month\">\n <table>\n <ul>\n <h2 name=\"month_dropdown\" disabled=\"\" class=\"month_dropdown dropdown\" value='<?php echo getAllMonths($dateMonth); ?>'>\n <?php\n if ($dateMonth === \"01\") {\n echo \"January\";\n } elseif ($dateMonth === \"02\") {\n echo \"February\";\n } elseif ($dateMonth === \"03\") {\n echo \"March\";\n } elseif ($dateMonth === \"04\") {\n echo \"April\";\n } elseif ($dateMonth === \"05\") {\n echo \"May\";\n } elseif ($dateMonth === \"06\") {\n echo \"June\";\n } elseif ($dateMonth == \"07\") {\n echo \"July\";\n } elseif ($dateMonth === \"08\") {\n echo \"August\";\n } elseif ($dateMonth === \"09\") {\n echo \"September\";\n } elseif ($dateMonth === \"10\") {\n echo \"October\";\n } elseif ($dateMonth === \"11\") {\n echo \"November\";\n } elseif ($dateMonth === \"12\") {\n echo \"December\";\n }\n ?> <?php echo ' ' .($dateYear); ?></h2>\n \n </ul>\n </table>\n\n <div id=\"calender_section_top\">\n <ul>\n <li>Sun</li>\n <li>Mon</li>\n <li>Tue</li>\n <li>Wed</li>\n <li>Thu</li>\n <li>Fri</li>\n <li>Sat</li>\n </ul>\n </div>\n <div id=\"calender_section_bot\">\n <ul>\n <?php\n $dayCount = 1;\n\n\n $time_slot = ($_GET['time_slot']);\n $med = ($_GET['med']);\n $res = ($_GET['res']);\n $emp = ($_GET['emp']);\n for ($cb = 1; $cb <= $boxDisplay; $cb++) {\n if (($cb >= $currentMonthFirstDay + 1 || $currentMonthFirstDay == 7) && $cb <= ($totalDaysOfMonthDisplay)) {\n //Current date\n if ($dayCount <= 9) {\n $currentDate = $dateYear . '-' . $dateMonth . '-' . '0' . $dayCount;\n ;\n } else {\n $currentDate = $dateYear . '-' . $dateMonth . '-' . $dayCount;\n }\n\n $eventNum = 0;\n //Include con configuration file\n include 'config.php';\n //Get number of events based on the current date\n $result = $con->query(\"SELECT * FROM med_records WHERE entry_date = '\" . $currentDate . \"' AND time_slot = '\" . $time_slot . \"' AND med_name = '$med'\");\n $eventNum = $result->num_rows;\n $eventrow = mysqli_fetch_array($result);\n //Define date cell color\n if (strtotime($currentDate) == strtotime(date(\"Y-m-d\"))) {\n echo '<li date=\"' . $currentDate . '\" class=\"grey date_cell\" >';\n } elseif ($eventNum > 0) {\n echo '<li date=\"' . $currentDate . '\" class=\"light_sky date_cell\" >';\n } else {\n echo '<li date=\"' . $currentDate . '\" class=\"date_cell\" >';\n }\n //Date cell\n echo '<span>';\n if ($eventNum > 0) {\n echo '<input class=\"calendar_button\" type=\"button\" id=' . $currentDate . ' name=\"date[]\" value=' . $dayCount . ' \">';\n echo '<strong class=\"existRecord\" >';\n echo $eventrow['status'];\n echo '</strong>';\n } else {\n echo '<input class=\"calendar_button\" type=\"button\" id=' . $currentDate . ' name=\"date[]\" value=' . $dayCount . ' onclick=\"MedRecordEntryModalOpen(this.id)\">';\n }\n echo '</span>';\n\n\n echo '</li>';\n $dayCount++;\n ?>\n <?php } else { ?>\n <li><span></span></li>\n <?php\n }\n }\n ?>\n </ul></div>\n </div>\n </div>\n <?php\n}", "function generate_calendar($year, $month, $days = array(), $day_name_length = 3, $first_day = 0, $prev_link, $next_link)\n{\n\n\t$first_of_month = gmmktime(0,0,0,$month,1,$year);\n\t#remember that mktime will automatically correct if invalid dates are entered\n\t# for instance, mktime(0,0,0,12,32,1997) will be the date for Jan 1, 1998\n\t# this provides a built in \"rounding\" feature to generate_calendar()\n\n\t$day_names = array(); #generate all the day names according to the current locale\n\tfor($n=0,$t=(3+$first_day)*86400; $n<7; $n++,$t+=86400) #January 4, 1970 was a Sunday\n\t\t$day_names[$n] = ucfirst(gmstrftime('%A',$t)); #%A means full textual day name\n\n\tlist($month, $year, $month_name, $weekday) = explode(',',gmstrftime('%m,%Y,%B,%w',$first_of_month));\n\t$weekday = ($weekday + 7 - $first_day) % 7; #adjust for $first_day\n\t$title = htmlentities(ucfirst($month_name)).'&nbsp;'.$year; #note that some locales don't capitalize month and day names\t\n\t\n\n\n\t#Begin calendar. Uses a real <caption>. See http://diveintomark.org/archives/2002/07/03\n\t\n\t$calendar = '<div id=\"calendar-box\"><table class=\"calendar\">'.\"\\n\".\n\t\t'<caption class=\"calendar-month\">'.$prev_link.'&nbsp;&nbsp;&nbsp;&nbsp;';\n\n\t$calendar .= '<form class=\"cal-select\" method=\"GET\" action=\"manage.php\">\n\t\t\t\t\t<input type=\"hidden\" name=\"display\" value=\"month\" />\n\t\t\t\t\t<select name=\"month\">';\n\t$months = array(1=>'January',2=>'February',3=>'March',4=>'April',5=>'May',6=>'June',7=>'July',8=>'August',9=>'September',10=>'October',11=>'November',12=>'December');\n\t\n\tfor ($x = 1; $x <= 12; $x++)\n\t{\n\t\tif (isset($_GET['month']) || isset($_SESSION['lastMonthViewMonth']))\n\t\t{\n\t\t\tif (isset($_GET['month'])) { $m = $_GET['month']; } else { $m = $_SESSION['lastMonthViewMonth']; }\n\t\t\tif ($m == $x)\n\t\t\t\t$calendar .= '<option value=\"'.$x.'\" SELECTED>'.$months[$x].'</option>';\n\t\t\telse\n\t\t\t\t$calendar .= '<option value=\"'.$x.'\">'.$months[$x].'</option>';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (date('n', time()) == $x)\n\t\t\t\t$calendar .= '<option value=\"'.$x.'\" SELECTED>'.$months[$x].'</option>';\n\t\t\telse\n\t\t\t\t$calendar .= '<option value=\"'.$x.'\">'.$months[$x].'</option>';\n\t\t}\n\t\t\n\t}\n\t$calendar .= '</select> <select name=\"year\">';\n\tfor ($x = 2010; $x <= 2070; $x++)\n\t{\t\n\t\tif (isset($_GET['year']) || isset($_SESSION['lastMonthViewYear']))\n\t\t{\n\t\t\tif (isset($_GET['year'])) { $y = $_GET['year']; } else { $y = $_SESSION['lastMonthViewYear']; }\n\t\t\tif ($y == $x)\n\t\t\t\t$calendar .= '<option value=\"'.$x.'\" SELECTED>'.$x.'</option>';\n\t\t\telse\n\t\t\t\t$calendar .= '<option value=\"'.$x.'\">'.$x.'</option>';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (date('Y', time()) == $x)\n\t\t\t\t$calendar .= '<option value=\"'.$x.'\" SELECTED>'.$x.'</option>';\n\t\t\telse\n\t\t\t\t$calendar .= '<option value=\"'.$x.'\">'.$x.'</option>';\n\t\t}\n\t}\n\t$calendar .= '</select> <input type=\"submit\" value=\"view\" /></form>';\n\t\n\t$calendar .= '&nbsp;&nbsp;&nbsp;&nbsp;'.$next_link.\"</caption>\\n<tr class=\\\"day-names-row\\\">\";\n\n\tif($day_name_length){ #if the day names should be shown ($day_name_length > 0)\n\t\t#if day_name_length is >3, the full name of the day will be printed\n\t\tforeach($day_names as $d)\n\t\t\t$calendar .= '<th abbr=\"'.htmlentities($d).'\">'.htmlentities($day_name_length < 4 ? substr($d,0,$day_name_length) : $d).'</th>';\n\t\t$calendar .= \"</tr>\\n<tr class=\\\"day-row\\\">\";\n\t}\n\t\n\t// begin calendar days\n\tif($weekday > 0) $calendar .= '<td colspan=\"'.$weekday.'\">&nbsp;</td>'; #initial 'empty' days\n\tfor($day=1,$days_in_month=gmdate('t',$first_of_month); $day<=$days_in_month; $day++,$weekday++){\n\t\tif($weekday == 7){\n\t\t\t$weekday = 0; #start a new week\n\t\t\t$calendar .= \"</tr>\\n<tr class=\\\"day-row\\\">\";\n\t\t}\n\t\tif(isset($days[$day]) and is_array($days[$day]))\n\t\t{\n\t\t\t@list($classes, $content) = $days[$day];\n\t\t\tif(is_null($content)) $content = $day;\n\t\t\t$calendar .= '<td'.($classes ? ' class=\"'.htmlspecialchars($classes).'\">' : '>').\n\t\t\t\t($content).'</td></a>';\n\t\t}\n\t\telse $calendar .= '<td>'.$day.'</td>';\n\t}\n\tif($weekday != 7) $calendar .= '<td colspan=\"'.(7-$weekday).'\">&nbsp;</td>'; #remaining \"empty\" days\n\n\treturn $calendar.\"</tr>\\n</table></div>\\n\";\n}", "private function makeDayHeadings()\n\t{\n\t\t$this->outArray['dayheadings'] = array();\n\t\t$this->dayHeadings .= \"\\t<tr>\\n\";\n\t\tforeach($this->daysArray as $day) {\n\t\t\t$this->dayHeadings .= \"\\t\\t<th class=\\\"dayHeading\\\">$day</th>\\n\";\n\t\t\tarray_push($this->outArray['dayheadings'], $day);\n\t\t}\n\t\t$this->dayHeadings .= \"\\t</tr>\\n\";\n\t\t\n\t\t$this->calWeekDays .= $this->dayHeadings;\n\t}", "function CalendarData($month=null, $year=null) {\n if (is_null($year)) $year = date('Y');\n if (is_null($month)) $month = date('n');\n\n // RENDER\n exec(\"cal \".$month.\" \". $year, $cal); $this->dbgMsg( ' ### calendar '.$month.\" \". $year.\" :: \", $cal );\n $rxp[] = array_fill(0,7,' ');\n for ($k=2; $k < count($cal); $k++ ) {\n $xpl = explode(' ', trim( preg_replace('{\\s+}i', ' ', $cal[$k]) ) );\n if (count($xpl) && $xpl[0]!=='' ) { // $this->dbgMsg(' xploded row', $xpl, 1,1 );\n if ( $wsp=7-count($xpl) ) {\n if ($k==2) $rx = array_merge( array_fill(0, $wsp, ' ' ), $xpl );\n else $rx = array_merge( $xpl, array_fill(count($xpl)+1, $wsp, ' ' ) );\n }\n else $rx = $xpl;\n $rxp[] = $rx;\n }\n }\n\n for ($j=1; $j < count($rxp); $j++ ) {\n for ($d=0; $d<7; $d++) {\n if ($d===0) $rxp[$j-1][6] = $rxp[$j][0];\n else $rxp[$j][$d-1] = $rxp[$j][$d];\n }\n }\n $rxp[$j-1][$d-1]=' ';\n foreach ($rxp as $j=>$r) { // $this->dbgMsg( \"str_replace(' ','',implode('',\".$rxp[$j].\") )\", str_replace(' ','',implode('',$rxp[$j]) ) );\n if ( !str_replace(' ','',implode('',$rxp[$j]) ) ) unset($rxp[$j]); // NEED FOR TESTS\n } // $this->dbgMsg(' exploded calendar : ', $rxp, 1,1 );\n\n foreach ( $rxp as $i=>$arr ) {\n foreach ( $arr as $k=>$day) {\n $clr = array();\n if ( is_numeric($day) ) { // $this->dbgMsg( 'CalDay is_numeric( '.$day.' ) ', 'YES' );\n $Mm = $month<10?('0'.$month):$month;\n $Dd = $day<10?('0'.$day):$day;\n $key_date = $year.'-'.$Mm.'-'.$Dd; // $href_date = $year.'/'.$Mm.'/'.$Dd;\n $clauses = array();\n $clauses[] = \"'\".$key_date.\"' >= s.`date_start` and '\".$key_date.\"' <= s.`date_stop`\";\n $clauses[] = \"s.`status`<>'closed'\"; // $this->dbgMsg('', $clauses );\n $sql = $this->sql10.\" where \".implode(' and ', $clauses);\n $a = $this->db->sql2array( $sql ); // $this->dbgMsg(\" cal Day :: \".$sql, $a ); // выборка фильм+площадка+сеанс\n\n if ( $key_date == $this->guide->uri_parts[1] ) {\n $clr['tpl'] = '_Curr';\n $clr['Misc'] = ' style=\"color:#333;\"';\n // } elseif ( !empty($a) ) { // так - со ссылками в прошлое\n } elseif ( !empty($a) && date(\"Y-m-d\") <= $key_date ) {\n $clr['tpl'] = '_Href';\n $clr['DayHref']= 'film/'.$key_date.'/';\n if ( $k>4 ) $clr['Misc'] = ' style=\"color:#990000;\"';\n } else {\n $clr['tpl'] = '_Item';\n }\n }\n $clr['DayNum']=$day;\n $rxp[$i][$k] = $this->tpl->ParseOne( $clr, $this->tpf.':CalDay'.$clr['tpl'], '' );\n } // $rxp[$i]['trMisc'] = ' style=\"'.(($i%2==1)?'background:#eee;\"':'\"');\n $rxp[$i]['tdMisc'] = ' style=\"text-align:right;background-color:#ffffff;color:#ccc;\"';\n } // $this->dbgMsg('EXPANDED calendar : ', $rxp, 1,1 );\n return $rxp;\n }", "protected function getMonthHTML(\n $month,\n $mth_num,\n $opt,\n $year_num,\n $table_cols,\n $first_weekday,\n $today\n ) {\n $cal = '<tr>';\n // insert month name into first column of row\n $cal .= $this->getMonthNameHTML($mth_num);\n $cur_day = 0;\n for ($col = 0; $col < $table_cols; $col++) {\n $weekday_num = ($col + $first_weekday) % 7; // current day of week as a number\n\n // current day is only valid if within the month's days, and at the correct starting day\n if (($cur_day > 0 && $cur_day < $month['len']) || ($col < 7 && $weekday_num == $month['start'])) {\n $cur_day++;\n $cal .= $this->getDayHTML($cur_day, $mth_num, $today, $year_num, $weekday_num, $opt);\n } else {\n $cur_day = 0;\n $cal .= $this->getEmptyCellHTML();\n }\n }\n $cal .= '</tr>';\n\n return $cal;\n }", "public function month_list()\n\t{\n\t\t// -------------------------------------\n\t\t// Load 'em up\n\t\t// -------------------------------------\n\n\t\t$this->load_calendar_datetime();\n\t\t$this->load_calendar_parameters();\n\n\t\t// -------------------------------------\n\t\t// Prep the parameters\n\t\t// -------------------------------------\n\n\t\t$params = array(\n\t\t\tarray(\n\t\t\t\t'name'\t\t=> 'date_range_start',\n\t\t\t\t'required'\t=> FALSE,\n\t\t\t\t'type'\t\t=> 'date',\n\t\t\t\t'default'\t=> 'year-01-01'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name'\t\t=> 'date_range_end',\n\t\t\t\t'required'\t=> FALSE,\n\t\t\t\t'type'\t\t=> 'date'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name'\t\t=> 'limit',\n\t\t\t\t'required'\t=> FALSE,\n\t\t\t\t'type'\t\t=> 'integer',\n\t\t\t\t'default'\t=> 12\n\t\t\t)\n\t\t);\n\n//ee()->TMPL->log_item('Calendar: Processing parameters');\n\n\t\t$this->add_parameters($params);\n\n\t\t$today = $this->CDT->date_array();\n\n\t\t$this->CDT->change_ymd($this->P->value('date_range_start', 'ymd'));\n\t\t$this->CDT->set_default($this->CDT->datetime_array());\n\n\t\tif ($this->P->value('date_range_end') === FALSE)\n\t\t{\n\t\t\t$this->P->set(\n\t\t\t\t'date_range_end',\n\t\t\t\t$this->CDT->add_month($this->P->value('limit'))\n\t\t\t);\n\n\t\t\t$this->CDT->reset();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->P->set('limit', 9999);\n\t\t}\n\n\t\t$dir = (\n\t\t\t$this->P->value('date_range_end', 'ymd') >\n\t\t\t\t$this->P->value('date_range_start', 'ymd')\n\t\t) ? 1 : -1;\n\n\t\t$output = '';\n\t\t$count = 0;\n\n//ee()->TMPL->log_item('Calendar: Looping');\n\n\t\tdo\n\t\t{\n\t\t\t$vars['conditional']\t= array(\n\t\t\t\t'is_current_month'\t\t=>\t(\n\t\t\t\t\t$this->CDT->year == $today['year'] AND\n\t\t\t\t\t$this->CDT->month == $today['month']\n\t\t\t\t),\n\t\t\t\t'is_not_current_month'\t=>\t(\n\t\t\t\t\t$this->CDT->year == $today['year'] AND\n\t\t\t\t\t$this->CDT->month == $today['month']\n\t\t\t\t) ? FALSE : TRUE,\n\t\t\t\t'is_current_year'\t\t=>\t(\n\t\t\t\t\t$this->CDT->year == $today['year']\n\t\t\t\t) ? TRUE : FALSE,\n\t\t\t\t'is_not_current_year'\t=>\t(\n\t\t\t\t\t$this->CDT->year == $today['year']\n\t\t\t\t) ? FALSE : TRUE\n\t\t\t);\n\n\t\t\t$vars['single']\t= array(\n\t\t\t\t'year'\t=> $this->CDT->year,\n\t\t\t\t'month'\t=> $this->CDT->month\n\t\t\t);\n\n\t\t\t$vars['date']\t= array(\n\t\t\t\t'month'\t\t\t=> $this->CDT->datetime_array(),\n\t\t\t\t'date'\t\t\t=> $this->CDT->datetime_array(),\n\t\t\t);\n\n\t\t\t$output .= $this->swap_vars($vars, ee()->TMPL->tagdata);\n\t\t\t$this->CDT->add_month($dir);\n\t\t\t$count++;\n\t\t}\n\t\twhile (\n\t\t\t$count < $this->P->value('limit') AND\n\t\t\t$this->CDT->ymd < $this->P->value('date_range_end', 'ymd')\n\t\t);\n\n\t\treturn $output;\n\t}", "public static function create($month, $year){\n\t\t$calendar = array(array());\n\t\t$cal_size = 0;\n\t\t$week = 0;\n\t\t$cell = 1;\n\t\t$month_name = \"\";\n\t\t\n\t\t//Creamos el arreglo Calendario\n\t\t$calendar = self::create_calendar($month,$year,$calendar);\n\t // Longitud del Calendario incluyendo espacios en blanco, con llamada recursiva para que sea completo;\n\t\t// Al ser recursivo nos suma tambien los renglones que son los arrays padres de las celdas, entonces restamos\n\t\t$cal_size =\tcount($calendar,COUNT_RECURSIVE) - count($calendar); \n\t\t//Imprime $month and $year\n\t\tswitch ($month) { // Obtenemos el nombre en castellano del mes\n\t\t\tcase 1 : $month_name = \"ENERO\";\n\t\t\t\tbreak;\n\t\t\tcase 2 : $month_name = \"FEBRERO\";\n\t\t\t\tbreak;\n\t\t\tcase 3 : $month_name = \"MARZO\";\n\t\t\t\tbreak;\n\t\t\tcase 4 : $month_name = \"ABRIL\";\n\t\t\t\tbreak;\n\t\t\tcase 5 : $month_name = \"MAYO\";\n\t\t\t\tbreak;\n\t\t\tcase 6 : $month_name = \"JUNIO\";\n\t\t\t\tbreak;\n\t\t\tcase 7 : $month_name = \"JULIO\";\n\t\t\t\tbreak;\n\t\t\tcase 8 : $month_name = \"AGOSTO\";\n\t\t\t\tbreak;\n\t\t\tcase 9 : $month_name = \"SEPTIEMBRE\";\n\t\t\t\tbreak;\n\t\t\tcase 10 : $month_name = \"OCTUBRE\";\n\t\t\t\tbreak;\n\t\t\tcase 11 : $month_name = \"NOVIEMBRE\";\n\t\t\t\tbreak;\n\t\t\tcase 12 : $month_name = \"DICIEMBRE\";\n\t\t\t\n\t\t}\n\t\t//Creamos las celdas de los dias de la semana\n\t\twhile ($cell <= $cal_size){\n\t\t\tself::$html .= \"<tr>\";\n\t\t\tfor ($day=0;$day<7;$day++){\n\t\t\t\tif ($calendar[$week][$day]!=0){\n\t\t\t\t\tself::$html .= \"<td>\".$calendar[$week][$day].\"</td>\";\n\t\t\t\t} else { self::$html .= \"<td></td>\"; }\n\t\t\t\t$cell++;\n\t\t\t}\n\t\t\t$week++;\n\t\t\tself::$html .= \"</tr>\";\n\t\t}\n\t\tself::$html .= \"<tr><th colspan='7'>\".$month_name.\" \".$year.\"</th></tr>\";\n\n\t\treturn self::$html;\n\t}", "function calendar($url,$class='') {\n\n\tglobal $width;\n\tglobal $cell_width;\n\tglobal $legend_height;\n\tglobal $entry_color;\n\tglobal $entry_background_color;\n\tglobal $today_color;\n\tglobal $today_background_color;\n\tglobal $l_calendar;\n\tglobal $blog_script;\n\tglobal $lang;\n\tglobal $mysql_table;\n\t\n\tif ($_GET['date'] != '') {\n\t\t$MyDate = intval($_GET['date']);\n\t\t$year = substr($MyDate,0,4);\n\t\t$month = substr($MyDate,4,-2);\n\t} else {\n\t\t$month = date(\"n\");\n\t\t$year = date(\"Y\");\n\t}\n\t\n\t$prev = $month - 1;\n\t$next = $month + 1;\n\t$yearP = $year;\n\t$yearN = $year;\n\tif ($prev == \"0\") { $yearP--; $prev = \"12\"; }\n\tif ($prev < 10) $prev = '0'.$prev;\n\tif ($next == \"13\") { $yearN++; $next = \"1\"; }\n\tif ($next < 10) $next = '0'.$next;\n\n\t$transform_month = array(\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\");\n\t$into_month = array('Janvier','F&eacute;vrier','Mars','Avril','Mai','Juin','Juillet','Août','Septembre','Octobre','Novembre','D&eacute;cembre');\n\t\n\tfor ($l = 0; $l < 12; $l++) {\n\t\tif ($month == $transform_month[$l]) {\n\t\t\t$month_word = $into_month[$l];\n\t\t}\n\t}\n\n\t$output .= '<table style=\"width: '.$width.'; height: '.$legend_height.'\" class=\"'.$class.'\">\n\t<tr>\n\t\t<!--<td style=\"width: 10%; text-align: left;\"><a href=\"'.$url.'&date='.$yearP.$prev.'00\">&laquo;</a></td>-->\n\t\t<td colspan=\"7\"><b>'.strtoupper($month_word).' '.$year.'</b></td>\n\t\t<!--<td style=\"width: 10%; text-align: right;\"><a href=\"'.$url.'&date='.$yearN.$next.'00\">&raquo;</a></td>-->\n\t</tr>\n\t<tr align=\"center\">\n\t\t<td><b>L</b></td>\n\t\t<td><b>M</b></td>\n\t\t<td><b>M</b></td>\n\t\t<td><b>J</b></td>\n\t\t<td><b>V</b></td>\n\t\t<td><b>S</b></td>\n\t\t<td><b>D</b></td>\n\t</tr>\n\t<tr align=\"center\">';\n\t\n\t$no_days = date(\"t\", mktime(0, 0, 0, $month, 1, $year));\n\t$first_day = date(\"w\", mktime(0, 0, 0, $month, 1, $year));\n\t$today_day = date(\"j\");\n\t$today_month = date(\"n\");\n\t$today_year = date(\"Y\");\n\t\n\tif ($first_day == \"0\") $first_day = \"7\";\n\t\n\tfor ($i = 0; $i < $first_day-1; $i++) $output .= '<td style=\"width:'.$cell_width.';\">&nbsp;</td>';\n\n\tfor ($i = 1; $i <= $no_days; $i++) {\n\t\t//$result = mysql_query(\"SELECT id FROM blog WHERE DAYOFMONTH(timestamp)='$i' AND MONTH(timestamp) = '$month' AND YEAR(timestamp) = '$year' ORDER BY id DESC;\");\n\t\t$selectDate = $year.$month.($i<10?'0'.$i:$i);\n\t\t$result = mysql_query(\"SELECT id FROM blog WHERE datepubli='$selectDate' LIMIT 1 \");\n\t\t$num = mysql_num_rows($result);\n\t\t//$res = mysql_fetch_array($result);\n\t\n\t\tif ($first_day == \"8\") { $first_day = \"1\"; $output .= '<tr style=\"width: '.$width.';\" align=\"center\">'; }\n\t\tif ($i < 10) $space = ' '; else $space = '';\n\t\n\t\tif ($i == $today_day && $month == $today_month && $year == $today_year) \n\t\t\t$style = 'background-color: '.$today_background_color.'; color: '.$today_color.'; font-weight: bold;';\n\t\telse $style = '';\n\t\tif (intval($_GET['date']) == $selectDate) $style .= 'border:1px solid #000000;';\n\t\t\n\t\tif ($num < 1) $output .= '<td style=\"'.$style.' width: '.$cell_width.';\">'.$i.'</td>';\n\t\telse $output .= '<td style=\"background-color:'.$entry_background_color.';'.$style.'width: '.$cell_width.';color: '.$entry_color.';\"><a href=\"'.$url.'&date='.$selectDate.'\" style=\"color: '.$today_color.'\" title=\"Voir le sujet posté à cette date\">'.$i.'</a></td>';\n\t\t\n\t\tif ($first_day == \"7\") $output .= '</tr>';\n\t\t$first_day++;\n\t}\n\t\n\t$output .= '</table>';\n\t\n\treturn $output;\n\n}", "public function buildCalendarCell($full_date, $day, $class = \"\"){\n\t\t\n\t\t// get events for specified dates\n\t\t$events = $this->getDayEvents($full_date);\n\t\t\n\t\t// determine if specified date has passed\n\t\t$pastDate = $this->isPastDate($full_date);\n\t\t\n\t\tob_start();?>\n \t<td class=\"calendar_cell <?php echo $class . ' ' . $pastDate?>\" id=\"<?php echo $full_date; ?>\">\n \t<div class=\"day_of_month\"><?php echo $day;?></div>\n <div class=\"events\">\n <?php\n\t\t\n\t\t\t\t\tforeach($events as $key => $event){\n\t\t\t\t\t\techo $event->toHtml('calendar');\n\t\t\t\t\t}\n\t\t\t\t?>\n </div>\n <div class=\"events_compact\">\n <?php \n\t\t\t\t\tforeach($events as $key => $event){?>\n\t\t\t\t\t\t<i class=\"fa fa-circle\"></i>\t\n <?php\n\t\t\t\t\t}\n\t\t\t\t?>\n </div>\n </td>\n <?php\n\t\treturn ob_get_clean();\n\t}", "protected function build_calendar()\n\t{\n\t\t//ee()->TMPL->log_item('Calendar: Building calendar output');\n\n\t\t$disable\t= array(\n\t\t\t'categories',\n\t\t\t'category_fields',\n\t\t\t'custom_fields',\n\t\t\t'member_data',\n\t\t\t'pagination',\n\t\t\t'trackbacks'\n\t\t);\n\n\t\t$this->CDT->reset();\n\t\t$today_ymd\t= $this->CDT->ymd;\n\n\t\t// -------------------------------------\n\t\t// Set dynamic=\"off\", lest Channel get uppity and try\n\t\t// to think that it's in charge here.\n\t\t// -------------------------------------\n\n\t\t//default off.\n\t\tif ( $this->check_yes( ee()->TMPL->fetch_param('dynamic') ) )\n\t\t{\n\t\t\tee()->TMPL->tagparams['dynamic'] \t= 'yes';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tee()->TMPL->tagparams['dynamic'] \t= 'no';\n\t\t}\n\n\t\tif (isset(ee()->TMPL->tagparams['category']))\n\t\t{\n\t\t\t$this->convert_category_titles();\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Collect important bits of tagdata\n\t\t// -------------------------------------\n\n\t\t//ee()->TMPL->log_item('Calendar: Collecting tagdata');\n\n\t\t$output_at\t= '';\n\t\t$tagdata\t= ee()->TMPL->tagdata;\n\t\t$each_year\t= $each_month = $each_week = $each_day = $each_hour = $each_event = '';\n\t\t$hash_event\t= 'd38bf16a9a74c63fa5eb6d1ac082d539'.\"\\n\";\n\t\t$hash_hour\t= 'fe16402ccfad7e120a7ca3a31df3a019'.\"\\n\";\n\t\t$hash_day\t= '2aa2a1a0724182b1d876232c137a6d4f'.\"\\n\";\n\t\t$hash_week\t= 'b657210371b3e2a6f955ef6a404689de'.\"\\n\";\n\t\t$hash_month\t= 'd03207661c36a3bfd43b9dd239e41676'.\"\\n\";\n\t\t$hash_year\t= '97a92770ab082652cf662bdacc311dff'.\"\\n\";\n\n\t\t//--------------------------------------------\n\t\t//\tremove pagination before we start\n\t\t//--------------------------------------------\n\n\t\t//has tags?\n\t\tif (preg_match(\n\t\t\t\t\"/\" . LD . \"calendar_paginate\" . RD .\n\t\t\t\t\t\"(.+?)\" .\n\t\t\t\tLD . preg_quote(T_SLASH, '/') . \"calendar_paginate\" . RD . \"/s\",\n\t\t\t\t$tagdata,\n\t\t\t\t$match\n\t\t\t))\n\t\t{\n\t\t\t$this->paginate_tagpair_data\t= $match[0];\n\t\t\t$tagdata \t\t\t\t\t\t= str_replace( $match[0], '', $tagdata );\n\t\t}\n\t\t//prefix comes first\n\t\telse if (preg_match(\n\t\t\t\t\"/\" . LD . \"paginate\" . RD .\n\t\t\t\t\t\"(.+?)\" .\n\t\t\t\tLD . preg_quote(T_SLASH, '/') . \"paginate\" . RD . \"/s\",\n\t\t\t\t$tagdata,\n\t\t\t\t$match\n\t\t\t))\n\t\t{\n\t\t\t$this->paginate_tagpair_data\t= $match[0];\n\t\t\t$tagdata \t\t\t\t\t\t= str_replace( $match[0], '', $tagdata );\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Replace days of the week first, cuz they're easy\n\t\t// -------------------------------------\n\n\n\t\tif (isset(ee()->TMPL->var_pair['display_each_day_of_week']))\n\t\t{\n\t\t\tpreg_match(\n\t\t\t\t'/' . LD . 'display_each_day_of_week' . RD .\n\t\t\t\t\t'(.*?)' .\n\t\t\t\tLD . preg_quote(T_SLASH, '/') . 'display_each_day_of_week' . RD . '/s',\n\t\t\t\t$tagdata,\n\t\t\t\t$match\n\t\t\t);\n\n\t\t\tif (isset($match[1]))\n\t\t\t{\n\t\t\t\t$dow_output\t\t= '';\n\t\t\t\t$vars\t\t\t= array();\n\t\t\t\t$current_dow\t= $this->CDT->day_of_week;\n\n\t\t\t\t$this->CDT->change_ymd($this->P->value('date_range_start', 'ymd'));\n\n\t\t\t\tif ($this->CDT->day_of_week != $this->first_day_of_week)\n\t\t\t\t{\n\t\t\t\t\t$this->CDT->add_day(\n\t\t\t\t\t\t$this->first_day_of_week - $this->CDT->day_of_week\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tfor ($i = 0; $i < 7; $i++)\n\t\t\t\t{\n\t\t\t\t\tif ($i > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->CDT->add_day();\n\t\t\t\t\t}\n\n\t\t\t\t\t$vars['conditional'] = array(\n\t\t\t\t\t\t'day_of_week_is_weekend'\t=> (\n\t\t\t\t\t\t\t$this->CDT->day_of_week == 0 OR\n\t\t\t\t\t\t\t$this->CDT->day_of_week == 6\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'day_of_week_is_current'\t=> (\n\t\t\t\t\t\t\t$this->CDT->day_of_week == $current_dow\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\n\t\t\t\t\t$vars['single'] = array(\n\t\t\t\t\t\t'day_of_week'\t\t\t=> $this->cdt_format_date_string($this->CDT->datetime_array(), 'l'),\n\t\t\t\t\t\t'day_of_week_one'\t\t=> $this->cdt_format_date_string($this->CDT->datetime_array(), 'b'),\n\t\t\t\t\t\t'day_of_week_short'\t\t=> $this->cdt_format_date_string($this->CDT->datetime_array(), 'D'),\n\t\t\t\t\t\t'day_of_week_N'\t\t\t=> $this->cdt_format_date_string($this->CDT->datetime_array(), 'N'),\n\t\t\t\t\t\t'day_of_week_number'\t=> $this->cdt_format_date_string($this->CDT->datetime_array(), 'w')\n\t\t\t\t\t);\n\n\t\t\t\t\t$dow_output .= $this->swap_vars($vars, $match[1]);\n\t\t\t\t}\n\t\t\t\t$tagdata = str_replace($match[0], $dow_output, $tagdata);\n\t\t\t}\n\t\t}\n\n\t\t$tagdata = trim($tagdata).\"\\n\";\n\n\t\t// -------------------------------------\n\t\t// Now the rest\n\t\t// -------------------------------------\n\n\t\tif (isset(ee()->TMPL->var_pair['events']))\n\t\t{\n\t\t\tpreg_match(\n\t\t\t\t'/'.LD.'events'.RD.'(.*?)'.LD.preg_quote(T_SLASH, '/').'events'.RD.'/s',\n\t\t\t\t$tagdata,\n\t\t\t\t$match\n\t\t\t);\n\n\t\t\tif (isset($match[1]))\n\t\t\t{\n\t\t\t\t$each_event \t\t= trim($match[1]).\"\\n\";\n\t\t\t\t$tagdata \t\t\t= str_replace($match[0], $hash_event, $tagdata);\n\t\t\t\tee()->TMPL->tagdata = $each_event;\n\t\t\t\t$output_at \t\t\t= 'event';\n\t\t\t}\n\t\t}\n\n\t\tif (isset(ee()->TMPL->var_pair['display_each_hour']))\n\t\t{\n\t\t\tpreg_match(\n\t\t\t\t'/'.LD.'display_each_hour'.RD.'(.*?)'.LD.preg_quote(T_SLASH, '/').'display_each_hour'.RD.'/s',\n\t\t\t\t$tagdata,\n\t\t\t\t$match\n\t\t\t);\n\n\t\t\tif (isset($match[1]))\n\t\t\t{\n\t\t\t\t$each_hour \t\t\t= trim($match[1]).\"\\n\";\n\t\t\t\t$tagdata \t\t\t= str_replace($match[0], $hash_hour, $tagdata);\n\t\t\t\t$output_at \t\t\t= 'hour';\n\t\t\t}\n\t\t}\n\n\t\tif (isset(ee()->TMPL->var_pair['display_each_day']))\n\t\t{\n\t\t\tpreg_match(\n\t\t\t\t'/'.LD.'display_each_day'.RD.'(.*?)'.LD.preg_quote(T_SLASH, '/').'display_each_day'.RD.'/s',\n\t\t\t\t$tagdata,\n\t\t\t\t$match\n\t\t\t);\n\n\t\t\tif (isset($match[1]))\n\t\t\t{\n\t\t\t\t$each_day \t\t\t= trim($match[1]).\"\\n\";\n\t\t\t\t$tagdata \t\t\t= str_replace($match[0], $hash_day, $tagdata);\n\t\t\t\t$output_at \t\t\t= 'day';\n\t\t\t}\n\t\t}\n\n\t\tif (isset(ee()->TMPL->var_pair['display_each_week']))\n\t\t{\n\t\t\tpreg_match(\n\t\t\t\t'/'.LD.'display_each_week'.RD.'(.*?)'.LD.preg_quote(T_SLASH, '/').'display_each_week'.RD.'/s',\n\t\t\t\t$tagdata,\n\t\t\t\t$match\n\t\t\t);\n\n\t\t\tif (isset($match[1]))\n\t\t\t{\n\t\t\t\t$each_week \t\t\t= trim($match[1]).\"\\n\";\n\t\t\t\t$tagdata \t\t\t= str_replace($match[0], $hash_week, $tagdata);\n\t\t\t\t$output_at \t\t\t= 'week';\n\t\t\t}\n\t\t}\n\n\t\tif (isset(ee()->TMPL->var_pair['display_each_month']))\n\t\t{\n\t\t\tpreg_match(\n\t\t\t\t'/'.LD.'display_each_month'.RD.'(.*?)'.LD.preg_quote(T_SLASH, '/').'display_each_month'.RD.'/s',\n\t\t\t\t$tagdata,\n\t\t\t\t$match\n\t\t\t);\n\n\t\t\tif (isset($match[1]))\n\t\t\t{\n\t\t\t\t$each_month \t\t= trim($match[1]).\"\\n\";\n\t\t\t\t$tagdata \t\t\t= str_replace($match[0], $hash_month, $tagdata);\n\t\t\t\t$output_at \t\t\t= 'month';\n\t\t\t}\n\t\t}\n\n\t\tif (isset(ee()->TMPL->var_pair['display_each_year']))\n\t\t{\n\t\t\tpreg_match(\n\t\t\t\t'/'.LD.'display_each_year'.RD.'(.*?)'.LD.preg_quote(T_SLASH, '/').'display_each_year'.RD.'/s',\n\t\t\t\t$tagdata,\n\t\t\t\t$match\n\t\t\t);\n\n\t\t\tif (isset($match[1]))\n\t\t\t{\n\t\t\t\t$each_year \t\t\t= trim($match[1]).\"\\n\";\n\t\t\t\t$tagdata \t\t\t= str_replace($match[0], $hash_year, $tagdata);\n\t\t\t\t$output_at \t\t\t= 'year';\n\t\t\t}\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// If there aren't any display_each_X var pairs, default to event\n\t\t// -------------------------------------\n\n\t\tif ($output_at == '')\n\t\t{\n\t\t\t$each_event \t= $tagdata;\n\t\t\t$tagdata \t\t= $hash_event;\n\t\t\t$output_at \t\t= 'event';\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Set the default date to the start of our range\n\t\t// -------------------------------------\n\n\t\t$start_blank = (\n\t\t\t$this->P->value('date_range_start') === FALSE AND\n\t\t\t$this->P->value('date_range_end') === FALSE\n\t\t);\n\n\t\t$start\t= $this->CDT->change_datetime(\n\t\t\t$this->P->value('date_range_start', 'year'),\n\t\t\t$this->P->value('date_range_start', 'month'),\n\t\t\t$this->P->value('date_range_start', 'day'),\n\t\t\t$this->P->value('date_range_start', 'hour'),\n\t\t\t$this->P->value('date_range_start', 'minute')\n\t\t);\n\n\t\t$end\t= $this->CDT->change_datetime(\n\t\t\t$this->P->value('date_range_end', 'year'),\n\t\t\t$this->P->value('date_range_end', 'month'),\n\t\t\t$this->P->value('date_range_end', 'day'),\n\t\t\t($start_blank ? '23' : $this->P->value('date_range_end', 'hour')),\n\t\t\t($start_blank ? '59' : $this->P->value('date_range_end', 'minute'))\n\t\t);\n\n\t\t$current_period_start\t= $start;\n\t\t$current_period_end\t\t= $end;\n\n\t\t$this->CDT->set_default($start);\n\t\t$this->CDT->reset();\n\n\t\t// -------------------------------------\n\t\t// If we are \"padding\" short weeks, modify our dates\n\t\t// -------------------------------------\n\n\t\tif ($this->P->value('pad_short_weeks') === TRUE)\n\t\t{\n\t\t\t// -------------------------------------\n\t\t\t// Adjust the start date backward to the first day of the week, if necessary\n\t\t\t// -------------------------------------\n\n\t\t\t$old_end = $end;\n\n\t\t\tif ($start['day_of_week'] != $this->first_day_of_week)\n\t\t\t{\n\t\t\t\t$offset = ($start['day_of_week'] > $this->first_day_of_week) ?\n\t\t\t\t\t$start['day_of_week'] - $this->first_day_of_week :\n\t\t\t\t\t7 - ($this->first_day_of_week - $start['day_of_week']);\n\n\t\t\t\t$start \t= $this->CDT->add_day(-$offset);\n\t\t\t\t$this->CDT->reset();\n\t\t\t}\n\n\t\t\t// -------------------------------------\n\t\t\t// Adjust the end date forward to the last day of the week, if necessary\n\t\t\t// -------------------------------------\n\n\t\t\t$last_dow = ($this->first_day_of_week > 0) ? $this->first_day_of_week - 1 : 6;\n\n\t\t\tif ($end['day_of_week'] != $last_dow)\n\t\t\t{\n\t\t\t\t$this->CDT->change_ymd($end['ymd']);\n\t\t\t\t$offset = ($end['day_of_week'] > $last_dow) ?\n\t\t\t\t\t7 - ($end['day_of_week'] - $last_dow) :\n\t\t\t\t\t$last_dow - $end['day_of_week'];\n\n\t\t\t\t$end \t= $this->CDT->add_day($offset);\n\t\t\t\t$this->CDT->reset();\n\t\t\t}\n\n\t\t\t$end['time']\t= $old_end['time'];\n\t\t\t$end['hour']\t= $old_end['hour'];\n\t\t\t$end['minute']\t= $old_end['minute'];\n\n\t\t\t$this->CDT->set_default($start);\n\t\t\t$this->P->set('date_range_start', $start);\n\t\t\t$this->P->set('date_range_end', $end);\n\t\t}\n\n\t\t//ee()->TMPL->log_item('Calendar: Date range start: '. $this->P->value('date_range_start', 'ymd'));\n\n\t\t//ee()->TMPL->log_item('Calendar: Date range end: '. $this->P->value('date_range_end', 'ymd'));\n\n\t\t// -------------------------------------\n\t\t// Let's go fetch some events\n\t\t// -------------------------------------\n\n\t\t/*$category = FALSE;\n\n\t\tif (isset(ee()->TMPL) AND\n\t\t\t is_object(ee()->TMPL) AND\n\t\t\t ee()->TMPL->fetch_param('category') !== FALSE AND\n\t\t\t ee()->TMPL->fetch_param('category') != ''\n\t\t)\n\t\t{\n\t\t\t$category = ee()->TMPL->fetch_param('category');\n\n\t\t\tunset(ee()->TMPL->tagparams['category']);\n\t\t}*/\n\n\t\t$ids \t\t\t= $this->data->fetch_event_ids($this->P /*, $category*/);\n\n\t\t//ee()->TMPL->log_item('Calendar:build_calendar() Fetching events. ' . count( $ids ) . ' events were found.');\n\n\t\t$entry_data \t= array();\n\t\t$events \t\t= array();\n\n\t\t// -------------------------------------\n\t\t// No events? You really need to work on your social calendar...\n\t\t// -------------------------------------\n\n\t\tif (empty($ids))\n\t\t{\n\t\t\t// -------------------------------------\n\t\t\t// If they used a no_results tag, let 'em have it\n\t\t\t// -------------------------------------\n\n\t\t\tif (ee()->TMPL->no_results != '')\n\t\t\t{\n\t\t\t\t//ee()->TMPL->log_item('Calendar:build_calendar() No results, going home');\n\t\t\t\treturn $this->no_results();\n\t\t\t}\n\n\t\t\t//ee()->TMPL->log_item('Calendar:build_calendar() No results, but staying around for the show');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// -------------------------------------\n\t\t\t// We only care about this stuff if:\n\t\t\t// \t* there's an {event}{/event} tag pair\n\t\t\t// \t* thar be one or more xxx_has_events variables\n\t\t\t// -------------------------------------\n\n\t\t\tif ($each_event != '' OR strpos(ee()->TMPL->tagdata, '_event_total') !== FALSE)\n\t\t\t{\n\t\t\t\twhile (TRUE)\n\t\t\t\t{\n\t\t\t\t\t//ee()->TMPL->log_item('Calendar:build_calendar() Firing up the ol Channel Module to try and process ' . count( $ids ) . ' events.');\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Fetch occurrence info\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t$occurrence_ids = $this->data->fetch_occurrence_entry_ids($ids);\n\n\t\t\t\t\t//ee()->TMPL->log_item('Calendar:build_calendar() ' . count( $occurrence_ids ) . ' occurrences were found.');\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// If the entry_id of the occurrence doesn't match the entry_id\n\t\t\t\t\t// of the entry, we need to fetch the occurrence data separately\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tforeach ($occurrence_ids as $id => $data)\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ($data as $oid => $o_entry_id)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($id != $o_entry_id)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$ids[$o_entry_id] = $id; //$o_entry_id;\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// -------------------------------------\n\t\t\t\t\t// Prepare tagdata for Calendar-specific variable pairs, which\n\t\t\t\t\t// we will process later.\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tee()->TMPL->var_single['entry_id'] = 'entry_id';\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Prepare tagdata for Calendar-specific date variables, which\n\t\t\t\t\t// we will process later.\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t$var_dates = array(\n\t\t\t\t\t\t'event_start_date' \t=> FALSE,\n\t\t\t\t\t\t'event_start_time' \t=> FALSE,\n\t\t\t\t\t\t'event_end_date' \t=> FALSE,\n\t\t\t\t\t\t'event_end_time' \t=> FALSE\n\t\t\t\t\t);\n\n\t\t\t\t\tforeach (ee()->TMPL->var_single as $k => $v)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (($pos = strpos($k, ' format')) !== FALSE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$name = substr($k, 0, $pos);\n\n\t\t\t\t\t\t\tif (array_key_exists($name, $var_dates))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$var_dates[$name][$k] \t\t= $v;\n\t\t\t\t\t\t\t\tee()->TMPL->var_single[$k] \t= $k;\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//\t----------------------------------------\n\t\t\t\t\t//\tInvoke Channel class\n\t\t\t\t\t//\t----------------------------------------\n\n\t\t\t\t\tif ( ! class_exists('Channel') )\n\t\t\t\t\t{\n\t\t\t\t\t\trequire PATH_MOD.'/channel/mod.channel.php';\n\t\t\t\t\t}\n\n\t\t\t\t\t$channel = new Channel();\n\n\t\t\t\t\t//need to remove limit here so huge amounts of events work\n\t\t\t\t\t$channel->limit = 1000000;\n\n\t\t\t\t\t// --------------------------------------------\n\t\t\t\t\t// Invoke Pagination for EE 2.4 and Above\n\t\t\t\t\t// --------------------------------------------\n\n\t\t\t\t\t$channel = $this->add_pag_to_channel($channel);\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Prepare parameters\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tee()->TMPL->tagparams['entry_id'] = implode('|', array_keys($ids));\n\n\t\t\t\t\tif ($this->P->value('enable') != FALSE)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (is_array($this->P->value('enable')))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tee()->TMPL->tagparams['disable'] = implode('|', array_diff($disable, $this->P->value('enable')));\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\tee()->TMPL->tagparams['disable'] = implode('|', array_diff($disable, array($this->P->value('enable'))));\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\tee()->TMPL->tagparams['disable'] = implode('|', $disable);\n\t\t\t\t\t}\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Pre-process related data\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t//ee()->TMPL->tagdata = ee()->TMPL->assign_relationship_data( ee()->TMPL->tagdata );\n\n\t\t\t\t\tif (version_compare($this->ee_version, '2.6.0', '<'))\n\t\t\t\t\t{\n\t\t\t\t\t\tee()->TMPL->tagdata = ee()->TMPL->assign_relationship_data(\n\t\t\t\t\t\t\t$each_event\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tee()->TMPL->var_single \t= array_merge( ee()->TMPL->var_single, ee()->TMPL->related_markers );\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Execute needed methods\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t$channel->fetch_custom_channel_fields();\n\n\t\t\t\t\t$channel->fetch_custom_member_fields();\n\n\t\t\t\t\t// --------------------------------------------\n\t\t\t\t\t// Pagination Tags Parsed Out\n\t\t\t\t\t// --------------------------------------------\n\n\t\t\t\t\t$channel = $this->fetch_pagination_data($channel);\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Querification\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t//for some reason without this in EE 2.8.x\n\t\t\t\t\t//pagination has some sort of dynamic detection\n\t\t\t\t\t//that it didn't in EE 2.7 and below and hoses our\n\t\t\t\t\t//pagination setup because we are doing it\n\t\t\t\t\t//manually later as this is just data gathering\n\t\t\t\t\t//for events.\n\t\t\t\t\tif (\n\t\t\t\t\t\tversion_compare($this->ee_version, '2.8.0', '>=') &&\n\t\t\t\t\t\tisset($channel->pagination)\n\t\t\t\t\t)\n\t\t\t\t\t{\n\t\t\t\t\t\t$channel->pagination->paginate = false;\n\t\t\t\t\t}\n\n\t\t\t\t\t$channel->build_sql_query();\n\n\t\t\t\t\tif ($channel->sql == '')\n\t\t\t\t\t{\n\t\t\t\t\t\t//ee()->TMPL->log_item('Calendar: Channel query empty');\n\n\t\t\t\t\t\tif (ee()->TMPL->no_results != '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn $this->no_results();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\t$channel->query = ee()->db->query($channel->sql);\n\n\t\t\t\t\tif ($channel->query->num_rows == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t//ee()->TMPL->log_item('Calendar: Channel Module returned no results');\n\n\t\t\t\t\t\tif (ee()->TMPL->no_results != '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn $this->no_results();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\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//ee()->TMPL->log_item('Calendar:build_calendar() Channel module found ' . $channel->query->num_rows . ' results.');\n\t\t\t\t\t}\n\n\t\t\t\t\t$channel->query->result\t= $channel->query->result_array();\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Trim IDs and build events\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t$new_ids = array();\n\n\t\t\t\t\tforeach ($channel->query->result as $k => $row)\n\t\t\t\t\t{\n\t\t\t\t\t\t$new_ids[$row['entry_id']] = $ids[$row['entry_id']];\n\t\t\t\t\t}\n\n\t\t\t\t\t$event_data = $this->data->fetch_all_event_data($new_ids);\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Turn these IDs into events\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t$events = array();\n\n\t\t\t\t\t//ee()->TMPL->log_item('Calendar:build_calendar() Beginning event creation process.');\n\n\t\t\t\t\tif ( ! class_exists('Calendar_event'))\n\t\t\t\t\t{\n\t\t\t\t\t\trequire_once CALENDAR_PATH.'calendar.event.php';\n\t\t\t\t\t}\n\n\t\t\t\t\t$calendars = array();\n\n\t\t\t\t\tforeach ($event_data as $k => $edata)\n\t\t\t\t\t{\n\t\t\t\t\t\t$temp = new Calendar_event(\n\t\t\t\t\t\t\t$edata,\n\t\t\t\t\t\t\t$this->P->params['date_range_start']['value'],\n\t\t\t\t\t\t\t$this->P->params['date_range_end']['value']\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tif ( ! empty($temp->dates))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$temp->prepare_for_output();\n\t\t\t\t\t\t\t$events[$edata['entry_id']] = $temp;\n\t\t\t\t\t\t\t$calendars[$events[$edata['entry_id']]->default_data['calendar_id']] = array();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t//ee()->TMPL->log_item('Calendar:build_calendar() Event creation resulted in the creation of ' . count( $events ) . ' events.');\n\n\t\t\t\t\t//ee()->TMPL->log_item('Calendar:build_calendar() Event creation process finished.');\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Leaving so soon?\n\t\t\t\t\t// There's no point in continuing if we're just interested\n\t\t\t\t\t// in whether or not there are events on this day.\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tif ($each_event == '')\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach (array_keys($events) as $id)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$entry_data[$id] = $id;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//ee()->TMPL->log_item('Calendar:build_calendar() Skipping further channel module processing because $each_event variable was empty string. ' . count( $entry_data ) . ' events were found and logged into the $entry_data array.');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Nor should we stay around if there's nothing to process\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\telseif (empty($calendars))\n\t\t\t\t\t{\n\t\t\t\t\t\t//ee()->TMPL->log_item('Calendar:build_calendar() Skipping further channel module processing because there were no calendars connected to the events found.');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Fetch information about the calendars\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t$calendars = $this->data->fetch_calendar_data_by_id(array_keys($calendars));\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Prepare the tagdata that will be parsed by the channel module\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t$blargle = '3138ad2081984be5dea40e593fd61f87';\n\t\t\t\t\t$bleegle = '6f8de301e6e6f2cd80ad99aa3a765b31';\n\t\t\t\t\t//ee()->TMPL->tagdata = $blargle . '[' . LD . \"entry_id\" . RD . ']' . $each_event . $bleegle;\n\t\t\t\t\tee()->TMPL->tagdata = $blargle .\n\t\t\t\t\t\t'[' . LD . \"entry_id\" . RD . ']' .\n\t\t\t\t\t\tee()->TMPL->tagdata .\n\t\t\t\t\t\t$bleegle;\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Prep variable aliases\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t$variables = array(\n\t\t\t\t\t\t'title'\t\t\t=> 'event_title',\n\t\t\t\t\t\t'url_title'\t\t=> 'event_url_title',\n\t\t\t\t\t\t'entry_id'\t\t=> 'event_id',\n\t\t\t\t\t\t'author_id'\t\t=> 'event_author_id',\n\t\t\t\t\t\t'author'\t\t=> 'event_author',\n\t\t\t\t\t\t'status'\t\t=> 'event_status'\n\t\t\t\t\t);\n\n\t\t\t\t\t//custom variables with the letters 'url' are borked in\n\t\t\t\t\t//EE 2.6. Bug reported, but this should fix.\n\t\t\t\t\t//https://support.ellislab.com/bugs/detail/19337\n\t\t\t\t\tif (version_compare($this->ee_version, '2.6.0', '>='))\n\t\t\t\t\t{\n\t\t\t\t\t\t$variables['url_title'] = 'event_borked_title';\n\n\t\t\t\t\t\tee()->TMPL->var_single['event_borked_title'] = 'event_borked_title';\n\n\t\t\t\t\t\tunset(ee()->TMPL->var_single['event_url_title']);\n\n\t\t\t\t\t\tee()->TMPL->tagdata = str_replace(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\tLD . 'event_url_title' . RD,\n\t\t\t\t\t\t\t\t'\"event_url_title\"',\n\t\t\t\t\t\t\t\t\"'event_url_title'\"\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\tLD . 'event_borked_title' . RD,\n\t\t\t\t\t\t\t\t'\"event_borked_title\"',\n\t\t\t\t\t\t\t\t\"'event_borked_title'\"\n\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tee()->TMPL->tagdata\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tee()->TMPL->var_single['event_calendar_borked_title'] = 'event_calendar_borked_title';\n\n\t\t\t\t\t\tunset(ee()->TMPL->var_single['event_calendar_url_title']);\n\n\t\t\t\t\t\tee()->TMPL->tagdata = str_replace(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\tLD . 'event_calendar_url_title' . RD,\n\t\t\t\t\t\t\t\t'\"event_calendar_url_title\"',\n\t\t\t\t\t\t\t\t\"'event_calendar_url_title'\"\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\tLD . 'event_calendar_borked_title' . RD,\n\t\t\t\t\t\t\t\t'\"event_calendar_borked_title\"',\n\t\t\t\t\t\t\t\t\"'event_calendar_borked_title'\"\n\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tee()->TMPL->tagdata\n\t\t\t\t\t\t);\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// --------------------------------------------\n\t\t\t\t\t// Typography\n\t\t\t\t\t// --------------------------------------------\n\n\t\t\t\t\tee()->load->library('typography');\n\t\t\t\t\tee()->typography->initialize();\n\t\t\t\t\tee()->typography->convert_curly = FALSE;\n\n\t\t\t\t\t$channel->fetch_categories();\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Add variables to the query result\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tforeach ($channel->query->result as $k => $row)\n\t\t\t\t\t{\n\t\t\t\t\t\t$entry_id = $row['entry_id'];\n\n\t\t\t\t\t\t$channel->query->result[$k]['author'] = ($row['screen_name'] != '') ? $row['screen_name'] : $row['username'];\n\n\t\t\t\t\t\t//ee()->TMPL->log_item('Calendar:build_calendar() We\\'re in the channel query result loop. Entry id is ' . $entry_id );\n\n\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t// Skip this result if the event data doesn't exist\n\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\tif (! isset($events[$ids[$entry_id]]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tunset($channel->query->result[$k]);\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$channel->query->result[$k]['edited_occurrence'] \t= FALSE;\n\t\t\t\t\t\t$channel->query->result[$k]['event_parent_id']\t\t= ($ids[$entry_id] == $entry_id) ? 0 : $ids[$entry_id];\n\n\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t// If this entry_id is not in the $events array, this is an edited occurrence\n\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\tif (! isset($events[$entry_id]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t// Add this info to the $events array\n\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t$events[$entry_id] = clone $events[$ids[$entry_id]];\n\n\t\t\t\t\t\t\t$channel->query->result[$k]['edited_occurrence'] = TRUE;\n\n\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t// Correct the info\n\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\tforeach ($events[$entry_id]->occurrences as $ymd => $times)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tforeach ($times as $time => $data)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ($data['entry_id'] != $entry_id)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tunset($events[$entry_id]->occurrences[$ymd][$time], $events[$entry_id]->dates[$ymd][$time]);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tunset($events[$data['event_id']]->occurrences[$ymd][$time], $events[$data['event_id']]->dates[$ymd][$time]);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// NOTE: Requires PHP >= 5.1.0\n\t\t\t\t\t\t\t$events[$entry_id]->dates = array_intersect_key($events[$entry_id]->dates, $events[$entry_id]->occurrences);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t// Alias\n\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\tforeach ($variables as $old => $new)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($old == 'title')\n\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t$channel->query->result[$k][$old]\t= ee()->typography->parse_type(\n\t\t\t\t\t\t\t\t\t$channel->query->result[$k][$old],\n\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t'text_format' \t=> 'lite',\n\t\t\t\t\t\t\t\t\t\t'html_format' \t=> 'none',\n\t\t\t\t\t\t\t\t\t\t'auto_links' \t=> 'n',\n\t\t\t\t\t\t\t\t\t\t'allow_img_url' => 'no'\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t$channel->query->result[$k][$new]\t= $channel->query->result[$k][$old];\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$channel->query->result[$k][$new]\t= $channel->query->result[$k][$old];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t// Calendar variables\n\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\tforeach ($calendars[$events[$entry_id]->default_data['calendar_id']] as $key => $val)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$channel->query->result[$k][$key] = $val;\n\n\t\t\t\t\t\t\tif ($key == 'calendar_url_title' AND\n\t\t\t\t\t\t\t\tversion_compare($this->ee_version, '2.6.0', '>='))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$channel->query->result[$k]['event_calendar_borked_title'] = $val;\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$channel->query->result[$k]['event_'.$key] = $val;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\t//\t----------------------------------------\n\t\t\t\t\t//\tRedeclare\n\t\t\t\t\t//\t----------------------------------------\n\t\t\t\t\t//\tWe will reassign the $channel->query->result with our\n\t\t\t\t\t//\treordered array of values. Thank you PHP for being so fast with array loops.\n\t\t\t\t\t//\t----------------------------------------\n\n\t\t\t\t\t$super_temp_fake = $channel->query->result_array = $channel->query->result;\n\n\t\t\t\t\t$channel->fetch_categories();\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Handle {title} and {event_title} differently\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tee()->TMPL->tagdata\t= str_replace(\n\t\t\t\t\t\tLD . 'title' . RD,\n\t\t\t\t\t\t'6c21bdf1bfdab13bc8df8fcfeb2763a6' . LD . 'entry_id' . RD,\n\t\t\t\t\t\tee()->TMPL->tagdata\n\t\t\t\t\t);\n\n\t\t\t\t\tee()->TMPL->tagdata\t= str_replace(\n\t\t\t\t\t\tLD . 'event_title' . RD,\n\t\t\t\t\t\t'6c21bdf1bfdab13bc8df8fcfeb2763a6' . LD . 'entry_id' . RD,\n\t\t\t\t\t\tee()->TMPL->tagdata\n\t\t\t\t\t);\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Remove \"ignore\" prefixes\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tee()->TMPL->tagdata = str_replace(\n\t\t\t\t\t\t'calendar_ignore_',\n\t\t\t\t\t\t'',\n\t\t\t\t\t\tee()->TMPL->tagdata\n\t\t\t\t\t);\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Parse Weblog stuff\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t//ee()->TMPL->log_item('Calendar: Parsing Weblog stuff');\n\n\t\t\t\t\t$channel->parse_channel_entries();\n\n\t\t\t\t\tforeach ($super_temp_fake as $k => $data)\n\t\t\t\t\t{\n\t\t\t\t\t\t$channel->return_data = str_replace(\n\t\t\t\t\t\t\t'6c21bdf1bfdab13bc8df8fcfeb2763a6' . $data['entry_id'],\n\t\t\t\t\t\t\t$super_temp_fake[$k]['title'],\n\t\t\t\t\t\t\t$channel->return_data\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Related entries\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t//ee()->TMPL->log_item('Calendar: Parsing related entries');\n\n\t\t\t\t\tif (version_compare($this->ee_version, '2.6.0', '<'))\n\t\t\t\t\t{\n\t\t\t\t\t\tif (count(ee()->TMPL->related_data) > 0 AND\n\t\t\t\t\t\t\tcount($channel->related_entries) > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$channel->parse_related_entries();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (count(ee()->TMPL->reverse_related_data) > 0 AND\n\t\t\t\t\t\t\tcount($channel->reverse_related_entries) > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$channel->parse_reverse_related_entries();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Collect the parsed data for use later\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tpreg_match_all('/' . $blargle . '\\[(\\d+)\\](.*?)' . $bleegle . '/s', $channel->return_data, $matches);\n\t\t\t\t\tforeach ($matches[0] as $k => $match)\n\t\t\t\t\t{\n\t\t\t\t\t\t$entry_data[$matches[1][$k]] = $matches[2][$k];\n\t\t\t\t\t}\n\n\t\t\t\t\tunset($channel);\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Stop the insanity!\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//ee()->TMPL->log_item('Calendar:build_calendar() Channel module stuff done');\n\n\t\t// -------------------------------------\n\t\t// Build the calendar\n\t\t// -------------------------------------\n\n\t\t//ee()->TMPL->log_item('Calendar: Starting to build the calendar');\n\n\t\t$start_year\t\t= $start['year'];\n\t\t$start_month\t= $start['month'];\n\t\t$start_day\t\t= $start['day'];\n\t\t$end_year\t\t= $end['year'];\n\t\t$end_month\t\t= $end['month'];\n\t\t$end_day\t\t= $end['day'];\n\t\t$w\t\t\t\t= 0;\n\n\t\t$this->CDT->reset();\n\n\t\tif ($this->P->value('pad_short_weeks') === TRUE)\n\t\t{\n\t\t\t$week_counter = 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$week_counter = ($this->CDT->day_of_week >= $this->first_day_of_week) ?\n\t\t\t\t\t\t\t\t$this->CDT->day_of_week - $this->first_day_of_week :\n\t\t\t\t\t\t\t\t7 + $this->CDT->day_of_week - $this->first_day_of_week;\n\t\t}\n\n\t\t$output = '';\n\t\t$week_temp = $month_temp = $year_temp = '';\n\t\t$day_count = 0;\n\n\t\t$next_CDT = $prev_CDT = $start;\n\n\t\t$all_day = array();\n\t\t$event_array = array();\n\n\t\t// -------------------------------------\n\t\t// Prepare the events\n\t\t// -------------------------------------\n\n\t\t//ee()->TMPL->log_item('Calendar: Preparing events');\n\n\t\tforeach ($events as $id => $event)\n\t\t{\n\t\t\t//prevent missing entry data from attempting to display and causing errors\n\t\t\tif ( ! isset($entry_data[$event->default_data['entry_id']]))\n\t\t\t{\n\t\t\t\tunset($events[$id]);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (empty($event->dates))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tforeach ($event->dates as $ymd => $items)\n\t\t\t{\n\t\t\t\tforeach ($items as $time => $ddata)\n\t\t\t\t{\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// It was over before it started\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tif ($ddata['end_date']['ymd'].$ddata['end_date']['time'] <\n\t\t\t\t\t\t$this->P->value('date_range_start', 'ymd') .\n\t\t\t\t\t\t$this->P->value('date_range_start', 'time'))\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// -------------------------------------\n\t\t\t\t\t// ...or the inverse\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tif ($ddata['date']['ymd'].$ddata['date']['time'] >\n\t\t\t\t\t\t $this->P->value('date_range_end', 'ymd') .\n\t\t\t\t\t\t $this->P->value('time_range_end', 'time'))\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// -------------------------------------\n\t\t\t\t\t// If the start date of the event is less than the first\n\t\t\t\t\t// day of the calendar, we've got ourselves a hangover.\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tif ($ddata['date']['ymd'] < $this->P->value('date_range_start', 'ymd'))\n\t\t\t\t\t{\n\t\t\t\t\t\t$event_array[$this->P->value('date_range_start', 'ymd')]['all_day'][$id]\t= $id;\n\t\t\t\t\t\t$events[$id]->dates[$this->P->value('date_range_start', 'ymd')]\t\t\t\t= $events[$id]->dates[$ymd];\n\t\t\t\t\t}\n\t\t\t\t\telseif ($ddata['all_day'] === TRUE)\n\t\t\t\t\t{\n\t\t\t\t\t\t$event_array[$ymd]['all_day'][$id] = $id;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($ddata['multi_day'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$event_array[$ymd]['all_day'][$id] = $id;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$start_hour\t= str_pad($ddata['date']['hour'], 2, 0, STR_PAD_LEFT);\n\t\t\t\t\t\t\t$start_min\t= str_pad($ddata['date']['minute'], 2, 0, STR_PAD_LEFT);\n\t\t\t\t\t\t\t$end_hour\t= str_pad($ddata['end_date']['hour'], 2, 0, STR_PAD_LEFT);\n\t\t\t\t\t\t\t$end_min\t= str_pad($ddata['end_date']['minute'], 2, 0, STR_PAD_LEFT);\n\t\t\t\t\t\t\t$event_array[$ymd][$start_hour][$start_min][$end_hour][$end_min][$id] = $id;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\n\n\t\t\t// -------------------------------------\n\t\t\t// Aliases\n\t\t\t// -------------------------------------\n\n\t\t\t$events[$id]->default_data['first_date']\t= $events[$id]->default_data['start_date'];\n\t\t}\n\n\t\t$this->CDT->reset();\n\n\t\t// -------------------------------------\n\t\t// Prune the event array, if there's an event limit.\n\t\t// NOTE: apply_event_limit() also sorts the array for us.\n\t\t// -------------------------------------\n\n\t\t//--------------------------------------------\n\t\t//\tcount all events for tag and pagination\n\t\t//--------------------------------------------\n\n\t\t$this->event_timeframe_total = $this->count_event_results($event_array);\n\n\t\t//--------------------------------------------\n\t\t//\tpagination\n\t\t//--------------------------------------------\n\n\t\t$this->paginate = FALSE;\n\n\t\tif ($this->P->value('event_limit') > 0 AND\n\t\t\t$this->event_timeframe_total > $this->P->value('event_limit'))\n\t\t{\n\t\t\t//get pagination info\n\t\t\t$pagination_data = $this->universal_pagination(array(\n\t\t\t\t'total_results'\t\t\t=> $this->event_timeframe_total,\n\t\t\t\t//had to remove this jazz before so it didn't get iterated over\n\t\t\t\t'tagdata'\t\t\t\t=> $tagdata . $this->paginate_tagpair_data,\n\t\t\t\t'limit'\t\t\t\t\t=> $this->P->value('event_limit'),\n\t\t\t\t'uri_string'\t\t\t=> ee()->uri->uri_string,\n\t\t\t\t'paginate_prefix'\t\t=> 'calendar_'\n\t\t\t));\n\n\t\t\t// -------------------------------------------\n\t\t\t// 'calendar_events_create_pagination' hook.\n\t\t\t// - Let devs maniuplate the pagination display\n\n\t\t\tif (ee()->extensions->active_hook('calendar_build_calendar_create_pagination') === TRUE)\n\t\t\t{\n\t\t\t\t$pagination_data = ee()->extensions->call(\n\t\t\t\t\t'calendar_build_calendar_create_pagination',\n\t\t\t\t\t$this,\n\t\t\t\t\t$pagination_data\n\t\t\t\t);\n\t\t\t}\n\t\t\t//\n\t\t\t// -------------------------------------------\n\n\t\t\t//if we paginated, sort the data\n\t\t\tif ($pagination_data['paginate'] === TRUE)\n\t\t\t{\n\t\t\t\t$this->paginate\t\t\t= $pagination_data['paginate'];\n\t\t\t\t$this->page_next\t\t= $pagination_data['page_next'];\n\t\t\t\t$this->page_previous\t= $pagination_data['page_previous'];\n\t\t\t\t$this->p_page\t\t\t= $pagination_data['pagination_page'];\n\t\t\t\t$this->current_page \t= $pagination_data['current_page'];\n\t\t\t\t$this->pager \t\t\t= $pagination_data['pagination_links'];\n\t\t\t\t$this->basepath\t\t\t= $pagination_data['base_url'];\n\t\t\t\t$this->total_pages\t\t= $pagination_data['total_pages'];\n\t\t\t\t$this->paginate_data\t= $pagination_data['paginate_tagpair_data'];\n\t\t\t\t$this->page_count\t\t= $pagination_data['page_count'];\n\t\t\t\t//$tagdata\t\t\t\t= $pagination_data['tagdata'];\n\t\t\t}\n\t\t}\n\n\t\t//--------------------------------------------\n\t\t//\tevent limiter\n\t\t//--------------------------------------------\n\n\t\t$offset = (\n\t\t\tee()->TMPL->fetch_param('event_offset') ?\n\t\t\t\tee()->TMPL->fetch_param('event_offset') :\n\t\t\t\t0\n\t\t);\n\n\t\t$page \t= (($this->current_page -1) * $this->P->value('event_limit'));\n\n\t\tif ($page > 0)\n\t\t{\n\t\t\t$offset += $page;\n\t\t}\n\n\t\t$event_array = $this->apply_event_limit(\n\t\t\t$event_array,\n\t\t\t$this->P->value('event_limit'),\n\t\t\t$offset\n\t\t);\n\n\t\t// -------------------------------------\n\t\t// Loopage\n\t\t// -------------------------------------\n\n\t\t//ee()->TMPL->log_item('Calendar: Beginning date loops');\n\n\t\t$week_event_count\t= 0;\n\t\t$event_count\t\t= 0;\n\t\t$year_tick\t\t\t= 0;\n\t\t$month_tick\t\t\t= 0;\n\n\t\tfor ($y = $start_year; $y <= $end_year; $y++)\n\t\t{\n\t\t\t$year_event_count = 0;\n\n\t\t\t//blank out\n\t\t\t$this->counted['year'] = array();\n\n\t\t\t$mx = ($y == $start_year) ? $start_month : 1;\n\t\t\t$my = ($y == $end_year) ? $end_month : 12;\n\n\t\t\t$year_ymd_cache = $this->CDT->ymd;\n\n\n\t\t\tfor ($m = $mx; $m <= $my; $m++)\n\t\t\t{\n\t\t\t\t$month_ymd_cache \t= $this->CDT->ymd;\n\n\n\t\t\t\t$month_event_count = 0;\n\n\t\t\t\t//blank out\n\t\t\t\t$this->counted['month'] = array();\n\n\t\t\t\t$dx = ($y == $start_year AND $m == $start_month) ?\n\t\t\t\t\t\t$start_day :\n\t\t\t\t\t\t1;\n\n\t\t\t\t$dy = ($y == $end_year AND $m == $end_month) ?\n\t\t\t\t\t\t$end_day :\n\t\t\t\t\t\t$this->CDT->days_in_month($m, $y);\n\n\t\t\t\tfor ($d = $dx; $d <= $dy; $d++)\n\t\t\t\t{\n\t\t\t\t\t$day_ymd_cache \t= $this->CDT->ymd;\n\t\t\t\t\t$day_tick\t\t= 0;\n\n\t\t\t\t\t$this->CDT->change_date($y, $m, $d);\n\t\t\t\t\t$this->CDT->set_default($this->CDT->date_array());\n\n\t\t\t\t\t$ymd = $this->CDT->ymd;\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Prepare counts and totals, also\n\t\t\t\t\t// altered later in the loop in some cases\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t$day_event_count = 0;\n\t\t\t\t\t$day_event_total = 0;\n\n\t\t\t\t\t//blank out\n\t\t\t\t\t$this->counted['day'] = array();\n\n\t\t\t\t\tif (! isset($event_array[$ymd])) $event_array[$ymd] = array();\n\n\t\t\t\t\t$day_event_total\t= $this->count_events(\n\t\t\t\t\t\t$ymd,\n\t\t\t\t\t\t$event_array,\n\t\t\t\t\t\t$all_day,\n\t\t\t\t\t\t'day',\n\t\t\t\t\t\t$events\n\t\t\t\t\t);\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Start events for the day\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t//ee()->TMPL->log_item('Calendar: Beginning ' . $ymd . count( $event_array[$ymd] ) . ' events for this day.');\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// This looks a little goofy, but it\n\t\t\t\t\t// prevents extra years/months\n\t\t\t\t\t// showing up thanks to padded weeks\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t$day_count++;\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Week stuff\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tif ($week_counter % 7 == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t//blank out\n\t\t\t\t\t\t$this->counted['week'] = array();\n\n\t\t\t\t\t\t$w = str_pad($this->CDT->week_number, 2, 0, STR_PAD_LEFT);\n\t\t\t\t\t}\n\n\t\t\t\t\t$week_counter++;\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// \"next\" stuff\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t$next_y = ($m == 12 AND $d == 31) ? $y+1 : $y;\n\t\t\t\t\t$next_m = ($d == $this->CDT->days_in_month()) ? $m + 1 : $m;\n\t\t\t\t\t$next_w = ($week_counter % 7 == 0) ? $w + 1 : $w;\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Yodelers of Mass Destruction\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t$find\t\t\t= '';\n\t\t\t\t\t$replace\t\t= '';\n\t\t\t\t\t$hour_events\t= array();\n\t\t\t\t\t$last_day\t\t= (\n\t\t\t\t\t\t$y == $end_year AND\n\t\t\t\t\t\t$m == $end_month AND\n\t\t\t\t\t\t$d == $end_day\n\t\t\t\t\t) ? TRUE : FALSE;\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Remove \"all day\" stragglers\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tforeach ($all_day as $i => $stuff)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($ymd > $stuff['end_ymd'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tunset($all_day[$i]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Each event\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// \t$each_event contains the formatting\n\t\t\t\t\t// \tto use for displaying the contents\n\t\t\t\t\t// \tof an event on a given day in the calendar.\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tif ($each_event != '')\n\t\t\t\t\t{\n\t\t\t\t\t\t$event_output = '';\n\n\t\t\t\t\t\tif ( ! empty($event_array[$ymd]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach ($event_array[$ymd] as $start_hour => $sh_data)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$hour_event_count\t= 0;\n\t\t\t\t\t\t\t\t$hour_event_total\t= count($sh_data);\n\n\t\t\t\t\t\t\t\tif ($start_hour == 'all_day')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$prev_index = 0;\n\t\t\t\t\t\t\t\t\t$index = 0;\n\n\t\t\t\t\t\t\t\t\tforeach ($sh_data as $i => $id)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t\t\t\t// Multi-day events get one time key, regular\n\t\t\t\t\t\t\t\t\t\t// all day events get another\n\t\t\t\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t\t\t\t$time_key = '00002400';\n\n\t\t\t\t\t\t\t\t\t\tif ( ! isset( $events[$id]->dates[$ymd][$time_key]))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t//so in some rare situations this\n\t\t\t\t\t\t\t\t\t\t\t//can come to us without being reset?\n\t\t\t\t\t\t\t\t\t\t\t//I hate moving pointers :p\n\t\t\t\t\t\t\t\t\t\t\treset($events[$id]->dates[$ymd]);\n\n\t\t\t\t\t\t\t\t\t\t\t$time_key = key($events[$id]->dates[$ymd]);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t$event_count++;\n\t\t\t\t\t\t\t\t\t\t$year_event_count++;\n\t\t\t\t\t\t\t\t\t\t$month_event_count++;\n\t\t\t\t\t\t\t\t\t\t$week_event_count++;\n\t\t\t\t\t\t\t\t\t\t$day_event_count++;\n\t\t\t\t\t\t\t\t\t\t$hour_event_count++;\n\n\t\t\t\t\t\t\t\t\t\t$vars = $this->get_occurrence_vars($id, $events[$id], $ymd, $time_key);\n\n\t\t\t\t\t\t\t\t\t\t$vars['conditional']['event_all_day']\t= TRUE;\n\n\t\t\t\t\t\t\t\t\t\t$vars['single']\t+= array(\n\t\t\t\t\t\t\t\t\t\t\t'event_count'\t\t\t\t=> $this->create_count_hash('event_count'),\n\t\t\t\t\t\t\t\t\t\t\t'year_event_count'\t\t\t=> $this->create_count_hash('year_event_count'),\n\t\t\t\t\t\t\t\t\t\t\t'month_event_count'\t\t\t=> $this->create_count_hash('month_event_count'),\n\t\t\t\t\t\t\t\t\t\t\t'week_event_count'\t\t\t=> $this->create_count_hash('week_event_count'),\n\t\t\t\t\t\t\t\t\t\t\t'day_event_count'\t\t\t=> $this->create_count_hash('day_event_count'),\n\t\t\t\t\t\t\t\t\t\t\t'hour_event_count'\t\t\t=> $this->create_count_hash('hour_event_count'),\n\t\t\t\t\t\t\t\t\t\t\t'all_day_event_index_difference' => $index - $prev_index,\n\t\t\t\t\t\t\t\t\t\t\t'all_day_event_index'\t\t=> $index++,\n\n\t\t\t\t\t\t\t\t\t\t\t'event_duration_minutes'\t=> (isset($events[$id]->dates[$ymd][$time_key])) ?\n\t\t\t\t\t\t\t\t\t\t\t\t\t$events[$id]->dates[$ymd][$time_key]['duration']['minutes'] :\n\t\t\t\t\t\t\t\t\t\t\t\t\t$events[$id]->default_data['duration']['minutes'],\n\n\t\t\t\t\t\t\t\t\t\t\t'event_duration_hours'\t\t=> (isset($events[$id]->dates[$ymd][$time_key])) ?\n\t\t\t\t\t\t\t\t\t\t\t\t\t$events[$id]->dates[$ymd][$time_key]['duration']['hours'] :\n\t\t\t\t\t\t\t\t\t\t\t\t\t$events[$id]->default_data['duration']['hours'],\n\n\t\t\t\t\t\t\t\t\t\t\t'event_duration_days'\t\t=> (isset($events[$id]->dates[$ymd][$time_key])) ?\n\t\t\t\t\t\t\t\t\t\t\t\t\t$events[$id]->dates[$ymd][$time_key]['duration']['days'] :\n\t\t\t\t\t\t\t\t\t\t\t\t\t$events[$id]->default_data['duration']['days']\n\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t//we have to remove conditionals for these items as well\n\t\t\t\t\t\t\t\t\t\t//because the dummy hashes screw with them\n\t\t\t\t\t\t\t\t\t\t$output_data = $this->remove_post_parse_conditionals(array(\n\t\t\t\t\t\t\t\t\t\t\t'event_count'\t=> $vars['single']['event_count'],\n\t\t\t\t\t\t\t\t\t\t\t'year_event_count'\t\t=> $vars['single']['year_event_count'],\n\t\t\t\t\t\t\t\t\t\t\t'month_event_count' \t=> $vars['single']['month_event_count'],\n\t\t\t\t\t\t\t\t\t\t\t'week_event_count'\t\t=> $vars['single']['week_event_count'],\n\t\t\t\t\t\t\t\t\t\t\t'day_event_count'\t\t=> $vars['single']['day_event_count'],\n\t\t\t\t\t\t\t\t\t\t\t'hour_event_count'\t\t=> $vars['single']['hour_event_count']\n\t\t\t\t\t\t\t\t\t\t), $entry_data[$id]);\n\n\t\t\t\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t\t\t\t// If we're outputting at the event level, then we have\n\t\t\t\t\t\t\t\t\t\t// to spit out the all day stuff here.\n\t\t\t\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t\t\t\tif ($output_at == 'event')\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$event_output .= $this->swap_vars($vars, $output_data);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t//shortcut\n\t\t\t\t\t\t\t\t\t\t$evtk =& $events[$id]->dates[$ymd][$time_key];\n\n\t\t\t\t\t\t\t\t\t\t$array = array(\n\t\t\t\t\t\t\t\t\t\t\t'output'\t\t\t\t\t=> $output_data,\n\t\t\t\t\t\t\t\t\t\t\t'vars'\t\t\t\t\t\t=> $vars,\n\t\t\t\t\t\t\t\t\t\t\t'first_day'\t\t\t\t\t=> $evtk['date']['ymd'],\n\t\t\t\t\t\t\t\t\t\t\t'last_day'\t\t\t\t\t=> $evtk['end_date']['ymd'],\n\t\t\t\t\t\t\t\t\t\t\t'start_ymd'\t\t\t\t\t=> $evtk['date']['ymd'],\n\t\t\t\t\t\t\t\t\t\t\t'end_ymd'\t\t\t\t\t=> $evtk['end_date']['ymd'],\n\t\t\t\t\t\t\t\t\t\t\t'time'\t\t\t\t\t\t=> $time_key,\n\t\t\t\t\t\t\t\t\t\t\t'id'\t\t\t\t\t\t=> $id,\n\t\t\t\t\t\t\t\t\t\t\t'event_duration_minutes'\t=> $evtk['duration']['minutes'],\n\t\t\t\t\t\t\t\t\t\t\t'event_duration_hours'\t\t=> $evtk['duration']['hours'],\n\t\t\t\t\t\t\t\t\t\t\t'event_duration_days'\t\t=> $evtk['duration']['days']\n\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t//unset($event_array[$ymd]['all_day'][$id]);\n\n\t\t\t\t\t\t\t\t\t\t$count\t\t= (empty($all_day)) ? 0 : max(array_keys($all_day));\n\t\t\t\t\t\t\t\t\t\t$inserted\t= FALSE;\n\t\t\t\t\t\t\t\t\t\t$prev_index\t= $index + 1;\n\n\t\t\t\t\t\t\t\t\t\tif (! in_array($array, $all_day))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tfor ($i = 0; $i <= $count; $i++)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t\t\t\t\t\t// Find a spot for this event\n\t\t\t\t\t\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t\t\t\t\t\tif (! isset($all_day[$i]))\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t$all_day[$i] = $array;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$inserted = TRUE;\n\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\tif ($inserted === FALSE)\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$all_day[$i] = $array;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tksort($all_day);\n\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif ($each_hour != '')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$hour_events[$start_hour] = $sh_data;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tforeach ($sh_data as $start_minute => $sm_data)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tforeach ($sm_data as $end_hour => $eh_data)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tforeach ($eh_data as $end_minute => $event_ids)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tforeach ($event_ids as $id)\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (isset($entry_data[$id]))\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$start_hour\t= str_pad($start_hour, 2, 0, STR_PAD_LEFT);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$start_min\t= str_pad($start_min, 2, 0, STR_PAD_LEFT);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$end_hour\t= str_pad($end_hour, 2, 0, STR_PAD_LEFT);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$end_min\t= str_pad($end_min, 2, 0, STR_PAD_LEFT);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$time_key = $start_hour.$start_minute.$end_hour.$end_minute;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ( ! isset($events[$id]->dates[$ymd][$time_key]))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$event_count++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$year_event_count++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$month_event_count++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$week_event_count++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$day_event_count++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$hour_event_count++;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$vars = $this->get_occurrence_vars(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$events[$id],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$ymd,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$start_hour . $start_minute . $end_hour . $end_minute\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['event_duration_minutes']\t= $events[$id]->dates[$ymd][$time_key]['duration']['minutes'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['event_duration_hours']\t\t= $events[$id]->dates[$ymd][$time_key]['duration']['hours'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['event_duration_days']\t\t= $events[$id]->dates[$ymd][$time_key]['duration']['days'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['event_count']\t\t\t\t= $this->create_count_hash('event_count');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['year_event_count']\t\t\t= $this->create_count_hash('year_event_count');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['month_event_count']\t\t= $this->create_count_hash('month_event_count');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['week_event_count']\t\t\t= $this->create_count_hash('week_event_count');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['day_event_count']\t\t\t= $this->create_count_hash('day_event_count');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['hour_event_count']\t\t\t= $this->create_count_hash('hour_event_count');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['day_event_total']\t\t\t= $day_event_total;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['hour_event_total']\t\t\t= $hour_event_total;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['all_day_event_index']\t\t= 0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['all_day_event_index_difference'] = 0;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//we have to remove conditionals for these items as well\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//because the dummy hashes screw with them\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$output_data = $this->remove_post_parse_conditionals(array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'event_count'\t\t\t=> $vars['single']['event_count'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'year_event_count'\t\t=> $vars['single']['year_event_count'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'month_event_count'\t\t=> $vars['single']['month_event_count'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'week_event_count'\t\t=> $vars['single']['week_event_count'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'day_event_count'\t\t=> $vars['single']['day_event_count'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'hour_event_count'\t\t=> $vars['single']['hour_event_count']\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t), $entry_data[$id]);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$event_output .= $this->swap_vars($vars, $output_data);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t//parse day event counts\n\t\t\t\t\t\t\t$event_output = $this->parse_count_hashes('hour_event_count', $event_output);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$find = $hash_event;\n\t\t\t\t\t\t$replace = $event_output;\n\n\t\t\t\t\t\tif ($output_at == 'event')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$output .= $replace;\n\t\t\t\t\t\t\t$replace = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// If $each_event is empty, $all_day never gets filled. Let's fix that.\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tif ($each_event == '' AND isset($event_array[$ymd]['all_day']))\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ($event_array[$ymd]['all_day'] as $id)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$time_key\t\t\t= (! isset( $events[$id]->dates[$ymd]['00002400'])) ?\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey($events[$id]->dates[$ymd]) :\n\t\t\t\t\t\t\t\t\t\t\t\t\t'00002400';\n\n\t\t\t\t\t\t\t$data['end_ymd']\t= $events[$id]->dates[$ymd][$time_key]['end_date']['ymd'];\n\n\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t// This stuff can be gibberish since it'll never show, but we\n\t\t\t\t\t\t\t// provide it because other parts of the code expect it to exist\n\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t$data['time']\t\t= '';\n\t\t\t\t\t\t\t$data['vars']\t\t= array();\n\t\t\t\t\t\t\t$data['first_day']\t= FALSE;\n\t\t\t\t\t\t\t$data['last_day']\t= FALSE;\n\t\t\t\t\t\t\t$data['output']\t\t= '';\n\n\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t// Add the all day event\n\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t$all_day[]\t\t\t= $data;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$all_day_event_total\t= count($all_day);\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// \"All day\" output\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t$all_day_output = '';\n\n\t\t\t\t\tif ( ! empty($all_day))\n\t\t\t\t\t{\n\t\t\t\t\t\t$prev_index = 0;\n\t\t\t\t\t\t$hour_event_count = 0;\n\n\t\t\t\t\t\tforeach ($all_day as $all_day_data)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$time_key\t= $all_day_data['time'];\n\t\t\t\t\t\t\t$vars\t\t= $all_day_data['vars'];\n\t\t\t\t\t\t\t$vars['single']['event_first_day']\t= ($ymd == $all_day_data['first_day']) ? TRUE : FALSE;\n\t\t\t\t\t\t\t$vars['single']['event_last_day']\t= ($ymd == $all_day_data['last_day']) ? TRUE : FALSE;\n\n\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t// Process all day variables\n\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t$all_day_output\t.= $this->swap_vars($vars, $all_day_data['output']);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this->CDT->reset();\n\t\t\t\t\t}\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Each hour\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tif ($each_hour != '')\n\t\t\t\t\t{\n\t\t\t\t\t\t$hour_output = '';\n\t\t\t\t\t\t$hour_temp = '';\n\n\t\t\t\t\t\tif ($all_day_output != '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$hour_output = $all_day_output;\n\t\t\t\t\t\t\t$all_day_output = '';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfor ($i = 0; $i < 24; $i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$hour_temp\t\t\t= '';\n\t\t\t\t\t\t\t$hour_count\t\t\t= 0;\n\t\t\t\t\t\t\t$hour_event_count\t= 0;\n\t\t\t\t\t\t\t$h\t\t\t\t\t= str_pad($i, 2, '0', STR_PAD_LEFT);\n\t\t\t\t\t\t\t//$this->cdt_format_date_string($this->CDT->datetime_array(), 'H');\n\t\t\t\t\t\t\t$minute\t\t\t\t= '00';\n\t\t\t\t\t\t\t//$this->cdt_format_date_string($this->CDT->datetime_array(), 'i');\n\n\t\t\t\t\t\t\tif (isset($hour_events[$h]))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tforeach ($hour_events[$h] as $start_minute => $sm_data)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tforeach ($sm_data as $end_hour => $eh_data)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tforeach ($eh_data as $end_minute => $event_ids)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$hour_count += count($event_ids);\n\n\t\t\t\t\t\t\t\t\t\t\tforeach ($event_ids as $id)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif (isset($entry_data[$id]))\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t$event_count++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$year_event_count++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$month_event_count++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$week_event_count++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$day_event_count++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$hour_event_count++;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t$vars = $this->get_occurrence_vars(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$events[$id],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$ymd,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$h . $start_minute . $end_hour . $end_minute\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['event_count']\t\t\t= $this->create_count_hash('event_count');\n\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['hour_event_count']\t\t= $this->create_count_hash('hour_event_count');\n\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['year_event_count']\t\t= $this->create_count_hash('year_event_count');\n\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['month_event_count']\t= $this->create_count_hash('month_event_count');\n\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['week_event_count']\t\t= $this->create_count_hash('week_event_count');\n\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['day_event_count']\t\t= $this->create_count_hash('day_event_count');\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t//we have to remove conditionals for these items as well\n\t\t\t\t\t\t\t\t\t\t\t\t\t//because the dummy hashes screw with them\n\t\t\t\t\t\t\t\t\t\t\t\t\t$output_data = $this->remove_post_parse_conditionals(array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'event_count'\t\t\t=> $vars['single']['event_count'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'year_event_count'\t\t=> $vars['single']['year_event_count'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'month_event_count'\t\t=> $vars['single']['month_event_count'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'week_event_count'\t\t=> $vars['single']['week_event_count'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'day_event_count'\t\t=> $vars['single']['day_event_count'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'hour_event_count'\t\t=> $vars['single']['hour_event_count']\n\t\t\t\t\t\t\t\t\t\t\t\t\t), $entry_data[$id]);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t$hour_temp .= $this->swap_vars($vars, $output_data);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$hour_temp = str_replace($find, $hour_temp, $each_hour);\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$hour_temp = str_replace($find, $replace, $each_hour);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$vars = array();\n\t\t\t\t\t\t\t$total_events = $hour_count;\n\t\t\t\t\t\t\t$this->CDT->change_time($i, 0);\n\n\t\t\t\t\t\t\t$vars['date'] = array(\n\t\t\t\t\t\t\t\t'time'\t\t=> $this->CDT->datetime_array(),\n\t\t\t\t\t\t\t\t'date'\t\t=> $this->CDT->datetime_array()\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t$vars['single'] = array(\n\t\t\t\t\t\t\t\t'hour'\t\t\t\t=> $h,\n\t\t\t\t\t\t\t\t'minute'\t\t\t=> $minute,\n\t\t\t\t\t\t\t\t'time'\t\t\t\t=> $h.':'.$minute,\n\t\t\t\t\t\t\t\t'hour_event_total' \t=> $total_events\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t$hour_output .= $this->swap_vars($vars, $hour_temp);\n\n\t\t\t\t\t\t\t//parse day event counts\n\t\t\t\t\t\t\t$hour_output = $this->parse_count_hashes('hour_event_count', $hour_output);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$find = $hash_hour;\n\t\t\t\t\t\t$replace = $hour_output;\n\n\t\t\t\t\t\tif ($output_at == 'hour')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$output .= $replace;\n\t\t\t\t\t\t\t$replace = '';\n\n\t\t\t\t\t\t\t//ee()->TMPL->log_item('Calendar: Outputting hour data for '.$ymd);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Each day\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t//var_dump($this->CDT->ymd . ' OUTSIDE DAY');\n\n\t\t\t\t\tif ($each_day != '')\n\t\t\t\t\t{\n\t\t\t\t\t\t$prefix = $suffix = '';\n\n\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t// Prep day variables\n\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\tif ($all_day_output != '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$replace = $all_day_output . $replace;\n\t\t\t\t\t\t\t$all_day_output = '';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//var_dump($this->CDT->ymd . ' DAY');\n\n\t\t\t\t\t\t$day_output = str_replace($find, $replace, $each_day);\n\n\t\t\t\t\t\t$next_CDT = $this->CDT->add_day(1);\n\t\t\t\t\t\t$prev_CDT = $this->CDT->add_day(-2);\n\t\t\t\t\t\t$this->CDT->reset();\n\n\t\t\t\t\t\t//var_dump($this->CDT->ymd . ' DAY 2');\n\n\t\t\t\t\t\t$vars = array();\n\n\t\t\t\t\t\t$vars['conditional'] = array(\n\t\t\t\t\t\t\t'day_is_today'\t\t\t=> ($today_ymd == $ymd) ? TRUE : FALSE,\n\t\t\t\t\t\t\t'day_is_weekend'\t\t=> ($this->CDT->day_of_week == 0 OR\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->CDT->day_of_week == 6) ? TRUE : FALSE,\n\t\t\t\t\t\t\t'day_is_weekday'\t\t=> ($this->CDT->day_of_week == 0 OR\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->CDT->day_of_week == 6) ? FALSE : TRUE,\n\t\t\t\t\t\t\t'day_in_current_month'\t=> ($this->CDT->month == $current_period_start['month']) ? TRUE : FALSE,\n\t\t\t\t\t\t\t'day_in_previous_month'\t=> ($this->CDT->month < $current_period_start['month'] OR\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->CDT->year < $current_period_start['year']) ? TRUE : FALSE,\n\t\t\t\t\t\t\t'day_in_next_month'\t\t=> ($this->CDT->month > $current_period_start['month'] OR\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->CDT->year > $current_period_start['year']) ? TRUE : FALSE\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t$vars['single'] = array(\n\t\t\t\t\t\t\t'day'\t\t\t\t\t=> $d,\n\t\t\t\t\t\t\t'prev_day'\t\t\t\t=> $prev_CDT['day'],\n\t\t\t\t\t\t\t'next_day'\t\t\t\t=> $next_CDT['day'],\n\t\t\t\t\t\t\t'day_event_total'\t\t=> $day_event_total,\n\t\t\t\t\t\t\t'all_day_event_total'\t=> $all_day_event_total\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t$vars['date'] = array(\n\t\t\t\t\t\t\t'day' \t\t=> $this->CDT->datetime_array(),\n\t\t\t\t\t\t\t'date'\t\t=> $this->CDT->datetime_array(),\n\t\t\t\t\t\t\t'prev_day' \t=> $prev_CDT,\n\t\t\t\t\t\t\t'next_day'\t=> $next_CDT\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t$day_output = $this->parse_count_hashes('day_event_count', $this->swap_vars($vars, $day_output));\n\n\n\t\t\t\t\t\t$find = $hash_day;\n\t\t\t\t\t\t$replace = $prefix.$day_output.$suffix;\n\n\t\t\t\t\t\tif ($output_at == 'day')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$output .= $replace;\n\t\t\t\t\t\t\t$replace = '';\n//ee()->TMPL->log_item('Calendar: Outputting day data for '.$ymd);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$this->CDT->reset();\n\n\t\t\t\t\t\t//var_dump($this->CDT->ymd . ' DAY 3');\n\t\t\t\t\t}\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Each week\n\t\t\t\t\t// -------------------------------------\n\n//var_dump($this->CDT->ymd . ' OUTSIDE WEEK');\n\n\t\t\t\t\tif ($each_week != '')\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($all_day_output != '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$replace = $all_day_output . $replace;\n\t\t\t\t\t\t\t$all_day_output = '';\n\t\t\t\t\t\t\tif ($each_day == '')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$all_day = array();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ($w != $next_w OR\n\t\t\t\t\t\t\t($each_month != '' AND\n\t\t\t\t\t\t\t\t(($m != $next_m OR $last_day === TRUE) AND\n\t\t\t\t\t\t\t\t\t($ymd >= $current_period_start['ymd'] AND\n\t\t\t\t\t\t\t\t\t\t(\t($last_day === TRUE AND $ymd == $current_period_end['ymd']) OR\n\t\t\t\t\t\t\t\t\t\t($ymd != $current_period_end['ymd']))))) OR\n\t\t\t\t\t\t\t$last_day === TRUE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//var_dump($this->CDT->ymd . ' WEEK');\n\n\t\t\t\t\t\t\t$week_temp .= $replace;\n\t\t\t\t\t\t\t$week_output = str_replace($find, $week_temp, $each_week);\n\n\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t// Prep week variables\n\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t$offset = ($this->CDT->day_of_week > $this->first_day_of_week) ?\n\t\t\t\t\t\t\t\t\t\t$this->CDT->day_of_week - $this->first_day_of_week :\n\t\t\t\t\t\t\t\t\t\t7 - ($this->first_day_of_week - $this->CDT->day_of_week);\n\n\t\t\t\t\t\t\t$this->CDT->add_day(-$offset);\n\t\t\t\t\t\t\t$this->CDT->set_default($this->CDT->datetime_array());\n\t\t\t\t\t\t\t$next_CDT = $this->CDT->add_day(7);\n\t\t\t\t\t\t\t$prev_CDT = $this->CDT->add_day(-14);\n\t\t\t\t\t\t\t$this->CDT->reset();\n\n\t\t\t\t\t\t\t//var_dump($this->CDT->ymd . ' WEEK 2');\n\n\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t// Calculate the number of events this week\n\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t$week_event_total \t= 0;\n\n\t\t\t\t\t\t\t//$week_count_id\t\t= 'week_event_total_' . uniqid();\n\n\t\t\t\t\t\t\tif (strpos($each_week, 'week_event_total') !== FALSE)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$low\t= $this->CDT->year .\n\t\t\t\t\t\t\t\t\t\t\tstr_pad($this->CDT->month, 2, '0', STR_PAD_LEFT) .\n\t\t\t\t\t\t\t\t\t\t\tstr_pad($this->CDT->day, 2, '0', STR_PAD_LEFT);\n\n\t\t\t\t\t\t\t\t$this->CDT->add_day(6);\n\n\t\t\t\t\t\t\t\t$high\t= $this->CDT->year .\n\t\t\t\t\t\t\t\t\t\t\tstr_pad($this->CDT->month, 2, '0', STR_PAD_LEFT) .\n\t\t\t\t\t\t\t\t\t\t\tstr_pad($this->CDT->day, 2, '0', STR_PAD_LEFT);\n\n\t\t\t\t\t\t\t\t$this->CDT->reset();\n\n\t\t\t\t\t\t\t\tforeach ($event_array as $k => $v)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ($k < $low OR $k > $high)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t$week_event_total += $this->count_events($k, $event_array, $all_day, 'week', $events);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$vars = array();\n\n\t\t\t\t\t\t\t$vars['single'] = array(\n\t\t\t\t\t\t\t\t'week'\t\t\t\t=> $w,\n\t\t\t\t\t\t\t\t'prev_week'\t\t\t=> $prev_CDT['week_number'],\n\t\t\t\t\t\t\t\t'next_week'\t\t\t=> $next_CDT['week_number'],\n\t\t\t\t\t\t\t\t'week_event_total' \t=> $week_event_total\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t$vars['date'] = array(\n\t\t\t\t\t\t\t\t'week' \t\t \t\t=> $this->CDT->datetime_array(),\n\t\t\t\t\t\t\t\t'date' \t\t \t\t=> $this->CDT->datetime_array(),\n\t\t\t\t\t\t\t\t'prev_week' \t\t=> $prev_CDT,\n\t\t\t\t\t\t\t\t'next_week'\t \t\t=> $next_CDT\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t$week_output = $this->parse_count_hashes('week_event_count', $this->swap_vars($vars, $week_output));\n\n\t\t\t\t\t\t\t$find = $hash_week;\n\t\t\t\t\t\t\t$replace = $week_output;\n\t\t\t\t\t\t\t$week_temp = '';\n\n\t\t\t\t\t\t\tif ($output_at == 'week')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$output .= $replace;\n\t\t\t\t\t\t\t\t$replace = '';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$this->CDT->reset();\n\t\t\t\t\t\t\t$week_event_count = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif ($end['day'] == $d AND\n\t\t\t\t\t\t\t\t$end['month'] == $m AND\n\t\t\t\t\t\t\t\t$d == $this->CDT->days_in_month($m, $y) AND\n\t\t\t\t\t\t\t\t$this->P->value('pad_short_weeks') === TRUE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$week_temp .= $replace;\n\t\t\t\t\t\t\t$week_output = str_replace($find, $week_temp, $each_week);\n\n\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t// Prep week variables\n\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t$this->CDT->add_day(-6);\n\t\t\t\t\t\t\t$next_CDT = $this->CDT->add_day(7);\n\t\t\t\t\t\t\t$prev_CDT = $this->CDT->add_day(-14);\n\t\t\t\t\t\t\t$this->CDT->reset();\n\n\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t// Calculate the number of events this week\n\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t$week_event_total = 0;\n\n\t\t\t\t\t\t\tif (strpos($each_week, 'week_event_total') !== FALSE)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$low\t= $this->CDT->year .\n\t\t\t\t\t\t\t\t\t\t\tstr_pad($this->CDT->month, 2, '0', STR_PAD_LEFT) .\n\t\t\t\t\t\t\t\t\t\t\tstr_pad($this->CDT->day, 2, '0', STR_PAD_LEFT);\n\n\t\t\t\t\t\t\t\t$this->CDT->add_day(6);\n\n\t\t\t\t\t\t\t\t$high\t= $this->CDT->year .\n\t\t\t\t\t\t\t\t\t\t\tstr_pad($this->CDT->month, 2, '0', STR_PAD_LEFT) .\n\t\t\t\t\t\t\t\t\t\t\tstr_pad($this->CDT->day, 2, '0', STR_PAD_LEFT);\n\n\t\t\t\t\t\t\t\t$this->CDT->reset();\n\n\t\t\t\t\t\t\t\tforeach ($event_array as $k => $v)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ($k < $low OR $k > $high)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t$week_event_total += $this->count_events($k, $event_array, $all_day, 'week', $events);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$vars = array();\n\n\t\t\t\t\t\t\t$vars['single'] = array(\n\t\t\t\t\t\t\t\t'week'\t\t\t\t=> $w,\n\t\t\t\t\t\t\t\t'prev_week'\t\t\t=> $prev_CDT['week_number'],\n\t\t\t\t\t\t\t\t'next_week'\t\t\t=> $next_CDT['week_number'],\n\t\t\t\t\t\t\t\t'week_event_total' \t=> $week_event_total\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t$vars['date'] = array(\n\t\t\t\t\t\t\t\t'week' \t\t\t\t=> $this->CDT->datetime_array(),\n\t\t\t\t\t\t\t\t'date'\t\t\t\t=> $this->CDT->datetime_array(),\n\t\t\t\t\t\t\t\t'prev_week' \t\t=> $prev_CDT,\n\t\t\t\t\t\t\t\t'next_week'\t\t\t=> $next_CDT\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t$week_output = $this->parse_count_hashes('week_event_count', $this->swap_vars($vars, $week_output));\n\n\t\t\t\t\t\t\t$find \t\t= $hash_week;\n\t\t\t\t\t\t\t$replace \t= $week_output;\n\t\t\t\t\t\t\t$week_temp \t= '';\n\n\t\t\t\t\t\t\tif ($output_at == 'week')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$output .= $replace;\n\t\t\t\t\t\t\t\t$replace = '';\n//ee()->TMPL->log_item('Calendar: Outputting week data for '.$ymd);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$this->CDT->reset();\n\t\t\t\t\t\t\t$week_event_count = 0;\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$week_temp .= $replace;\n\t\t\t\t\t\t\t$replace = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Each month\n\t\t\t\t\t// -------------------------------------\n\n//var_dump($this->CDT->ymd . ' OUTSIDE MONTH');\n\n\t\t\t\t\tif ($each_month != '')\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($all_day_output != '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$replace = $all_day_output . $replace;\n\t\t\t\t\t\t\t$all_day_output = '';\n\t\t\t\t\t\t\tif ($each_day == '')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$all_day = array();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (($m != $next_m OR $last_day === TRUE) AND\n\t\t\t\t\t\t\t(\t$ymd >= $current_period_start['ymd'] AND\n\t\t\t\t\t\t\t\t(\t($last_day === TRUE AND $ymd == $current_period_end['ymd']) OR\n\t\t\t\t\t\t\t\t\t($ymd != $current_period_end['ymd'])\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t$month_temp .= $replace;\n\t\t\t\t\t\t\t$month_output = str_replace($find, $month_temp, $each_month);\n\n\t\t\t\t\t\t\t//--------------------------------------------\n\t\t\t\t\t\t\t//\treset and add month because\n\t\t\t\t\t\t\t//\tthis gets 'off' some places\n\t\t\t\t\t\t\t//--------------------------------------------\n\t\t\t\t\t\t\t$this->CDT->set_default($current_period_start);\n\t\t\t\t\t\t\t$this->CDT->reset();\n\n\t\t\t\t\t\t\t//first month is correct\n\t\t\t\t\t\t\tif ($month_tick > 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->CDT->add_month($month_tick);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$month_tick++;\n\n\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t// Prep month variables\n\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t//add a month\n\t\t\t\t\t\t\t$next_CDT = $this->CDT->add_month();\n\n\t\t\t\t\t\t\t//subtract 2\n\t\t\t\t\t\t\t$prev_CDT = $this->CDT->add_month(-2);\n\n\t\t\t\t\t\t\t//add 1, now we are back where we started!\n\t\t\t\t\t\t\t$this->CDT->add_month();\n\t\t\t\t\t\t\t$this->CDT->change_date($this->CDT->year, $this->CDT->month, 1);\n\n\t\t\t\t\t\t\t$vars = array();\n\n\t\t\t\t\t\t\t//var_dump($this->CDT->ymd . ' MONTH 2');\n\n\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t// Calculate the number of events this month\n\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t$month_event_total = 0;\n\n\t\t\t\t\t\t\tif (strpos($each_month, 'month_event_total') !== FALSE)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$low\t= $this->CDT->year.str_pad($this->CDT->month, 2, '0', STR_PAD_LEFT).'01';\n\t\t\t\t\t\t\t\t$high\t= $this->CDT->year.str_pad($this->CDT->month, 2, '0', STR_PAD_LEFT).$this->CDT->days_in_month();\n\n\t\t\t\t\t\t\t\tforeach ($event_array as $k => $v)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ($k < $low OR $k > $high)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t$month_event_total += $this->count_events($k, $event_array, $all_day, 'month', $events);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t//$vars['conditional'] = array( 'day_in_current_month' => TRUE );\n\t\t\t\t\t\t\t$vars['single'] = array(\n\t\t\t\t\t\t\t\t'month'\t\t\t\t=> $m,\n\t\t\t\t\t\t\t\t'prev_month'\t\t=> $prev_CDT['month'],\n\t\t\t\t\t\t\t\t'next_month'\t\t=> $next_CDT['month'],\n\t\t\t\t\t\t\t\t'month_event_total' => $month_event_total\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t$vars['date'] = array(\n\t\t\t\t\t\t\t\t'month' \t\t\t=> $this->CDT->datetime_array(),\n\t\t\t\t\t\t\t\t'date'\t\t\t\t=> $this->CDT->datetime_array(),\n\t\t\t\t\t\t\t\t'prev_month' \t\t=> $prev_CDT,\n\t\t\t\t\t\t\t\t'next_month'\t\t=> $next_CDT\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t$month_output \t= $this->parse_count_hashes(\n\t\t\t\t\t\t\t\t'month_event_count',\n\t\t\t\t\t\t\t\t$this->swap_vars($vars, $month_output)\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t$replace \t\t= $month_output;\n\n\t\t\t\t\t\t\t$find = $hash_month;\n\t\t\t\t\t\t\t$month_temp = '';\n\n\t\t\t\t\t\t\tif ($output_at == 'month')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$output .= $replace;\n\t\t\t\t\t\t\t\t$replace = '';\n//ee()->TMPL->log_item('Calendar: Outputting month data for '.$ymd);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$this->CDT->reset();\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$month_temp .= $replace;\n\t\t\t\t\t\t\t$replace = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Each year\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tif ($each_year != '')\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($all_day_output != '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$replace = $all_day_output . $replace;\n\t\t\t\t\t\t\t$all_day_output = '';\n\t\t\t\t\t\t\tif ($each_day == '')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$all_day = array();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ($y != $next_y OR $last_day === TRUE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//if ($last_day !== TRUE)\n\t\t\t\t\t\t\tif ($last_day == TRUE)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$year_temp .= $replace;\n\n\t\t\t\t\t\t\t\t$year_output = str_replace($find, $year_temp, $each_year);\n\n\t\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t\t// Calculate the number of events this year\n\t\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t\t$year_event_total = 0;\n\n\t\t\t\t\t\t\t\tif (strpos(ee()->TMPL->tagdata, 'year_event_total') !== FALSE)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$low\t= $this->CDT->year.'0101';\n\t\t\t\t\t\t\t\t\t$high\t= $this->CDT->year.'1231';\n\t\t\t\t\t\t\t\t\tforeach ($event_array as $k => $v)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif ($k < $low OR $k > $high)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t$year_event_total += $this->count_events($k, $event_array, array(), 'year', $events);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t\t// Prep year variables\n\t\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t\t$this->CDT->set_default($current_period_start);\n\t\t\t\t\t\t\t\t$this->CDT->reset();\n\t\t\t\t\t\t\t\tif ($year_tick > 1)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$this->CDT->add_year($year_tick);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$year_tick++;\n\n\t\t\t\t\t\t\t\t$next_CDT = $this->CDT->add_year(1);\n\t\t\t\t\t\t\t\t$prev_CDT = $this->CDT->add_year(-2);\n\t\t\t\t\t\t\t\t$this->CDT->reset();\n\n\t\t\t\t\t\t\t\t$vars = array();\n\n\t\t\t\t\t\t\t\t$vars['conditional']\t\t= array(\n\t\t\t\t\t\t\t\t\t'year_is_leap_year'\t=> $this->CDT->is_leap_year()\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t$vars['single']\t\t\t\t= array(\n\t\t\t\t\t\t\t\t\t'year'\t\t\t\t=> $y,\n\t\t\t\t\t\t\t\t\t'prev_year'\t\t\t=> $prev_CDT['year'],\n\t\t\t\t\t\t\t\t\t'next_year'\t\t\t=> $next_CDT['year'],\n\t\t\t\t\t\t\t\t\t'year_event_total'\t=> $year_event_total\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t$vars['date']\t\t\t\t= array(\n\t\t\t\t\t\t\t\t\t'year' \t\t\t\t=> $this->CDT->datetime_array(),\n\t\t\t\t\t\t\t\t\t'date'\t\t\t\t=> $this->CDT->datetime_array(),\n\t\t\t\t\t\t\t\t\t'prev_year' \t\t=> $prev_CDT,\n\t\t\t\t\t\t\t\t\t'next_year' \t\t=> $next_CDT\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t$year_output = $this->parse_count_hashes(\n\t\t\t\t\t\t\t\t\t'year_event_count',\n\t\t\t\t\t\t\t\t\t$this->swap_vars($vars, $year_output)\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t$replace = $year_output;\n\n\t\t\t\t\t\t\t\t$this->CDT->reset();\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//$replace = '';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$find = $hash_year;\n\t\t\t\t\t\t\t$year_temp = '';\n\n\t\t\t\t\t\t\tif ($output_at == 'year')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$output .= $replace;\n\t\t\t\t\t\t\t\t$replace = '';\n//ee()->TMPL->log_item('Calendar: Outputting year data for '.$ymd);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$year_temp .= $replace;\n\t\t\t\t\t\t\t$replace = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t//parse day event counts\n\t\t\t\t\t//$output = $this->parse_count_hashes('day_event_count', $output);\n\n\t\t\t\t\t//parse week event counts\n\t\t\t\t\t//$output = $this->parse_count_hashes('week_event_count', $output);\n\t\t\t\t}\n\n\t\t\t\t//parse month event counts\n\t\t\t\t//$output = $this->parse_count_hashes('month_event_count', $output);\n\t\t\t}\n\n\t\t\t//parse year event count\n\t\t\t//$output = $this->parse_count_hashes('year_event_count', $output);\n\t\t}\n\n\t\t// -------------------------------------\n\t\t//\trunning all of these again in case\n\t\t//\tthe didn't fire. This means we\n\t\t//\tare in a straight event loop in\n\t\t//\tcal and it's probably errorsome :/\n\t\t// -------------------------------------\n\n\t\t//parse hour event counts\n\t\t$output = $this->parse_count_hashes('hour_event_count', $output);\n\n\t\t//parse day event counts\n\t\t$output = $this->parse_count_hashes('day_event_count', $output);\n\n\t\t//parse week event counts\n\t\t$output = $this->parse_count_hashes('week_event_count', $output);\n\n\t\t//parse month event counts\n\t\t$output = $this->parse_count_hashes('month_event_count', $output);\n\n\t\t//parse year event count\n\t\t$output = $this->parse_count_hashes('year_event_count', $output);\n\n\t\t//parse year event count\n\t\t$output = $this->parse_count_hashes('event_count', $output);\n\n\t\t$output = $this->swap_vars(array('single'=>array('event_total' => $event_count)), $output);\n\n\t\t$hash = 'hash_'.$output_at;\n\n\t\t$tagdata = isset($$hash) ? str_replace($$hash, $output, $tagdata) : $output;\n\n\t\t$tagdata = $this->parse_pagination($tagdata);\n\n\t\t//ee()->TMPL->log_item('Calendar: All done!');\n\n\t\t// -------------------------------------\n\t\t//\tsetting everything back thats not parsed\n\t\t//\tin case people were writing it in plain text\n\t\t// -------------------------------------\n\n\t\t//custom variables with the letters 'url' are borked in\n\t\t//EE 2.6. Bug reported, but this should fix.\n\t\t//https://support.ellislab.com/bugs/detail/19337\n\t\tif (version_compare($this->ee_version, '2.6.0', '>='))\n\t\t{\n\t\t\t$tagdata = str_replace(\n\t\t\t\tarray(\n\t\t\t\t\tLD . 'event_borked_title' . RD,\n\t\t\t\t\t'\"event_borked_title\"',\n\t\t\t\t\t\"'event_borked_title'\"\n\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\tLD . 'event_url_title' . RD,\n\t\t\t\t\t'\"event_url_title\"',\n\t\t\t\t\t\"'event_url_title'\"\n\t\t\t\t),\n\t\t\t\t$tagdata\n\t\t\t);\n\n\n\t\t\t$tagdata = str_replace(\n\t\t\t\tarray(\n\t\t\t\t\tLD . 'event_calendar_borked_title' . RD,\n\t\t\t\t\t'\"event_calendar_borked_title\"',\n\t\t\t\t\t\"'event_calendar_borked_title'\"\n\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\tLD . 'event_calendar_url_title' . RD,\n\t\t\t\t\t'\"event_calendar_url_title\"',\n\t\t\t\t\t\"'event_calendar_url_title'\"\n\t\t\t\t),\n\t\t\t\t$tagdata\n\t\t\t);\n\t\t}\n\n\t\t//--------------------------------------------\n\t\t//\tthis shouldn't ever be needed, but here we are\n\t\t//--------------------------------------------\n\n\t\tif (trim($tagdata) === '')\n\t\t{\n\t\t\treturn $this->no_results();\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Send 'em home\n\t\t// -------------------------------------\n\n\t\treturn $tagdata;\n\t}", "function getMonthsTable()\n{\n //Get months from DB\n $conn = dbConnect();\n $result = $conn->query('SELECT * FROM monthsTable') or die('Error fetching MYSQL result');\n $months = $result->fetch_all(MYSQLI_ASSOC);\n //Generate months table, styling odd and even rows\n ?>\n <table class=\"table table-striped\">\n <thead>\n <tr class=\"bg-info text-white\">\n <th>ID</th>\n <th>Name</th>\n <th>Days</th>\n </tr>\n </thead>\n <tbody>\n <?php foreach ($months as $index => $month): ?>\n <tr class=\"<?= $index % 2 == 0 ? 'bg-light text-dark' : 'bg-secondary text-white'; ?>\">\n <td><?= $month['monthsID']; ?></td>\n <td><?= $month['monthName']; ?></td>\n <td><?= $month['monthDays']; ?></td>\n </tr>\n <?php endforeach; ?>\n </tbody>\n </table>\n <?php\n}", "function table($month){\n //Feb-28, 4 weeks\n //Nov-30, 5 weeks\n //Dec and Jan: 31 5 weeks\n $ctn = 1;\n echo \"<table>\";\n if($month == \"February\"){\n for($i = 0; $i < 4; $i++){\n echo \"<tr>\";\n for($k = 0; $k < 7; $k++){\n echo \"<td>\". $ctn . \"</td>\";\n $ctn++;\n }\n echo \"</tr>\";\n }\n }\n if($month == \"December\" || $month == \"January\" || $month == \"November\"){\n for($i = 0; $i < 5; $i++){\n echo \"<tr>\";\n for($k = 0; $k < 7; $k++){\n if($month == \"December\" || $month == \"January\"){\n if($ctn < 32){\n echo \"<td>\". $ctn . \"</td>\";\n $ctn++; \n } \n }\n if($month == \"November\"){\n if($ctn < 31){\n echo \"<td>\". $ctn . \"</td>\";\n $ctn++; \n } \n }\n }\n echo \"</tr>\";\n }\n }\n\n}", "function cal_body ($erster,$dat0,$dat1,$dath,$script,$params,$seldate) {\n\t$head = <<<HTML\n<table class=\"caltab2\" width=100%>\n<tr>\n<td align=center class=\"calwt\">Mon</td>\n<td align=center class=\"calwt\">Tue</td>\n<td align=center class=\"calwt\">Wed</td>\n<td align=center class=\"calwt\">Thu</td>\n<td align=center class=\"calwt\">Fri</td>\n<td align=center class=\"calwt\">Sat</td>\n<td align=center class=\"calwt\">Sun</td>\n</tr>\nHTML;\n\tif (strpos($script,'?') === false) $script .= '?';\n\t$script .= $params;\n\tif($erster!=1) {\n\t\tif($erster==0) $erster=7;\n\t\t$body .= \"<tr>\";\n\t\tfor($i=0;$i<$erster-1;$i++) {\n\t\t\t$body .= \"<td class=\\\"calat\\\">&nbsp;</td>\\n\";\n\t\t}\n\t}\n\tfor($i=1; $i<=31; $i++) {\n\t\t$dat4 = getdate(strtotime($i.\" \".$dath));\n\t\t$heute = $dat4[wday];\n\t\tif($heute==0) $heute=7;\n\t\tif($dat1[mon]==$dat4[mon]) {\n\t\t\t$stil=\"calat\";\n\t\t\t$dum1=$dat0[mday].\".\".$dat0[mon].\".\".$dat0[year];\n\t\t\t$dum2=$dat4[mday].\".\".$dat4[mon].\".\".$dat4[year];\n\t\t\tif($dum1==$dum2) {\n\t\t\t\tif(($heute==6) || ($heute==7)) {\n\t\t\t\t\t$stil=\"calhe\"; \n\t\t\t\t\t$stil_l=\"sellinkbold\"; \n\t\t\t\t} else {\n\t\t\t\t\t$stil=\"calht\"; $stil_l=\"sellink\"; \n\t\t\t\t}\n\t\t\t} else{\n\t\t\t\tif(($heute==6) || ($heute==7)) {\n\t\t\t\t\t$stil=\"calwe\"; \n\t\t\t\t\t$stil_l=\"sellinkbold\"; \n\t\t\t\t} else {\n\t\t\t\t\t$stil=\"calat\"; \n\t\t\t\t\t$stil_l=\"sellink\"; \n\t\t\t\t}\n\t\t\t}\n\t\t\t$i = sprintf('%02d',$i);\n\t\t\tif($heute==1) $body .= \"<tr>\";\n\t\t\t$seldate = sprintf(\"%04d-%02d-%02d\",$dat1[year],$dat1[mon],$i);\n\t\t\t$body .= \"<td align=center class=\\\"\".$stil.\"\\\">\".\n\t\t\t\t \"<a class=$stil_l href=\\\"${script}$seldate\\\">\".$i.\n\t\t\t\t \"</a></td>\\n\";\n\t\t\tif($heute==7) $body .= \"</tr>\";\n\t\t\t$j = $heute;\n\t\t}\n\t}\n\tif ($j < 7) {\n\t\tfor ($i=0;$i<7-$j;$i++) {\n\t\t\t$body .= \"<td class=\\\"calat\\\">&nbsp;</td>\\n\";\n\t\t}\n\t\t$body .= \"</tr>\\n\";\n\t}\n\treturn $head.$body;\n}", "function getCalender($group, $year = '',$month = '')\n{\n $dateYear = ($year != '')?$year:date(\"Y\");\n $dateMonth = ($month != '')?$month:date(\"m\");\n $date = $dateYear.'-'.$dateMonth.'-01';\n $currentMonthFirstDay = date(\"N\",strtotime($date));\n $totalDaysOfMonth = cal_days_in_month(CAL_GREGORIAN,$dateMonth,$dateYear);\n $totalDaysOfMonthDisplay = ($currentMonthFirstDay == 1)?($totalDaysOfMonth):($totalDaysOfMonth + ($currentMonthFirstDay-1));\n $boxDisplay = ($totalDaysOfMonthDisplay <= 35)?35:42;\n?>\n <div id=\"calender_section\">\n <h2>\n\t\t\t<a href=\"javascript:void(0);\" onclick=\"getCalendar('calendar_div','<?php echo date(\"Y\"); ?>','<?php echo date(\"m\"); ?>', '<?php echo $group; ?>');\" id='today'>Today</a>\n\t \n <a href=\"javascript:void(0);\" onclick=\"getCalendar('calendar_div','<?php echo date(\"Y\",strtotime($date.' - 1 Month')); ?>','<?php echo date(\"m\",strtotime($date.' - 1 Month')); ?>', '<?php echo $group; ?>');\">&lt;&lt;</a>\n <select name=\"month_dropdown\" class=\"month_dropdown dropdown\"><?php echo getAllMonths($dateMonth); ?></select>\n <select name=\"year_dropdown\" class=\"year_dropdown dropdown\"><?php echo getYearList($dateYear); ?></select>\n <a href=\"javascript:void(0);\" onclick=\"getCalendar('calendar_div','<?php echo date(\"Y\",strtotime($date.' + 1 Month')); ?>','<?php echo date(\"m\",strtotime($date.' + 1 Month')); ?>', '<?php echo $group; ?>');\">&gt;&gt;</a>\n\t\t</h2>\n <div id=\"event_list\" class=\"none\"></div>\n <div id=\"calender_section_top\">\n <ul>\n <li>Lundi</li>\n <li>Mardi</li>\n <li>Mercredi</li>\n <li>Jeudi</li>\n <li>Vendredi</li>\n <li>Samedi</li>\n <li>Dimanche</li>\n </ul>\n </div>\n <div id=\"calender_section_bot\">\n <ul>\n <?php \n $dayCount = 1; \n for($cb=1;$cb<=$boxDisplay;$cb++){\n if(($cb >= $currentMonthFirstDay || $currentMonthFirstDay == 1) && $cb <= ($totalDaysOfMonthDisplay) && $dayCount <= ($totalDaysOfMonth)){\n //Current date\n $currentDate = $dayCount.'-'.$dateMonth.'-'.$dateYear;\n //Define date cell color\n if(strtotime($currentDate) == strtotime(date(\"Y-m-d\"))){\n echo '<li date=\"'.$currentDate.'\" class=\"grey date_cell\">';\n }else{\n echo '<li date=\"'.$currentDate.'\" class=\"date_cell\">';\n }\n //Date cell\n\t\t\t\t\t\techo '<span>';\n echo $dayCount;\n echo '</span>';\n echo getEvents($currentDate, $group);\n \n echo '</li>';\n $dayCount++;\n ?>\n <?php }else{ ?>\n <li class='empty'><span>&nbsp;</span></li>\n <?php } } ?>\n </ul>\n </div>\n </div>\n\n <script type=\"text/javascript\">\n\n\t var mouseUpped = false;\n\t var mouseDowned = false;\n\t \n\t\tfunction getCalendar(target_div,year,month, group){\n $.ajax({\n type:'POST',\n url:'functions.php',\n data:'func=getCalender&group='+group+'&year='+year+'&month='+month,\n success:function(html){\n $('#'+target_div).html(html);\n }\n });\n }\n \n $('.month_dropdown').on('change',function(){\n getCalendar('calendar_div',$('.year_dropdown').val(),$('.month_dropdown').val());\n });\n $('.year_dropdown').on('change',function(){\n\t\t\tgetCalendar('calendar_div',$('.year_dropdown').val(),$('.month_dropdown').val());\n });\n\t\t\n $('.date_cell').mousedown(function(){\n\t\t\tmouseDowned = true;\n\t\t\t/*Si la souris a été relevée, alors on a déjà fait une sélection. On recommence\n\t\t\tdonc une nouvelle sélection, et on remet mouseUpped à false*/\n\t\t\tif(mouseUpped == true){\n\t\t\t\t$('.selected').removeClass('selected');\n\t\t\t\tmouseUpped = false;\n\t\t\t}\n\t\t\t$(this).toggleClass('selected'); \n\t\t\t/*Début de la sélection*/\n });\n\t\t$('.date_cell').mouseenter(function(){\n\t\t\tif(($(this).prev().hasClass('selected')) && (mouseUpped == false)){\n\t\t\t\t$(this).toggleClass('selected');\n\t\t\t}else{\n\t\t\t\t/*Si le li d'avant n'est pas selected, on a sauté une ligne\n\t\t\t\tdonc il fait tous les sélectionner*/\n\t\t\t\tif((mouseUpped == false) && mouseDowned == true){\n\t\t\t\t\tvar index_debut = $('.selected').last().index();\n\t\t\t\t\tvar index_fin = $(this).index();\n\t\t\t\t\tfor(var i=(index_debut+1); i<=index_fin; i++){\n\t\t\t\t\t\t//On ajoute la class selected aux élements précédents;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t/*Pendant de la selection*/\t\t\t\n });\n\t\t$('.date_cell').mouseup(function(){\n\t\t\tmouseUpped=true;\n\t\t\t/*Fin de la selection*/\t\t\t\n });\n </script>\n<?php\n}", "public function renderDay(DayInterface $day)\n {\n $classes = array();\n\n $dayOfWeek = $day->dayOfWeek();\n\n if (DayInterface::SATURDAY === $dayOfWeek || DayInterface::SUNDAY === $dayOfWeek) {\n $classes[] = 'bm-calendar-weekend';\n }\n\n foreach ($day->getStates() as $state) {\n $classes[] = 'bm-calendar-state-' . $state->type();\n }\n\n $output = '<td>';\n if (sizeof($classes)) {\n $output = '<td class=\"' . implode(' ', $classes) . '\">';\n }\n\n if ($day->getAction()) {\n $output .= '<a class=\"timelapse-start-video\"';\n $output .= 'rel=\"'.$day->getAction()['year'] . '/' . $day->getAction()['monthName'] . '/' . $day->getAction()['dayName'] . '/' . $day->getAction()['monthName'] . '-' . $day->getAction()['dayName'].'\">';\n $output .= $day;\n $output .= '</a>';\n } else {\n $output .= $day;\n }\n $output .= '</td>';\n\n return $output;\n }", "public function display($month='', $year='') {\n\t\n\t\t// Remove whitespaces\n\t\t$year = trim($year);\n\t\t$month = trim($month);\n\n\t\t// Set day, month and year of calendar\n\t\t$this->day = 1;\n\t\t$this->month = ($month == '') ?\tdate('n') : $month;\n\t\t$this->year = ($year == '') ? date('Y') : $year;\n\n\t\t// Check for valid input\t\n\t\tif (!preg_match('~[0-9]{4}~', $this->year))\n\t\t\tthrow new exception('Invalid value for year');\n\t\tif (!is_numeric($this->month) || $this->month < 0 || $this->month > 13)\n\t\t\tthrow new exception('Invalid value for month');\n\n\t\t// Set the current timestamp\n\t\t$this->timeStamp = mktime(1,1,1,$this->month, $this->day, $this->year);\n\t\t// Set the number of days in teh current month\n\t\t$this->daysInMonth = date('t',$this->timeStamp);\n\n\t\t// Start table\n\t\t$calHTML = sprintf(\"<table id=\\\"%s\\\" cellpadding=\\\"0\\\" cellspacing=\\\"%d\\\"><thead><tr>\", $this->calendarName, $this->innerBorder);\n\t\t// Display previous month navigation\n\t\tif ($this->enableNav) {\n\t\t\t$pM = explode('-', date('n-Y', strtotime('-1 month', $this->timeStamp)));\n\t\t\t$calHTML .= sprintf(\"<td class=\\\"%s-%s\\\"><a href=\\\"?%smonth=%d&amp;year=%d\\\">%s</a></td>\", $this->calendarName, $this->markup['nav'], $this->queryString, $pM[0], $pM[1],$this->prevMonthNavTxt);\n\t\t}\n\t\t\n\t\t// Month name and optional year\n\t\t$calHTML .= sprintf(\"<td colspan=\\\"%d\\\" id=\\\"%s-%s\\\">%s%s</td>\", ($this->enableNav ? 5 : 7), $this->calendarName, $this->markup['header'], $this->getMonthName(), ($this->displayYear ? ' ' .$this->year : ''));\n\n\t\t// Display next month navigation\n\t\tif ($this->enableNav) {\n\t\t\t$nM = explode('-', date('n-Y', strtotime('+1 month', $this->timeStamp)));\n\t\t\t$calHTML .= sprintf(\"<td class=\\\"%s-%s\\\"><a href=\\\"?%smonth=%d&amp;year=%d\\\">%s</a></td>\", $this->calendarName, $this->markup['nav'], $this->queryString, $nM[0], $nM[1],$this->nextMonthNavTxt);\n\t\t}\n\n\t\t$calHTML .= sprintf(\"</tr></thead><tbody><tr id=\\\"%s\\\">\", $this->markup['days_of_week']);\n\n\t\t// Display day headers\n\t\tforeach($this->dayNames as $k => $dayName)\n\t\t\t$calHTML .= sprintf(\"<td>%s</td>\", $dayName);\n\n\t\t$calHTML .= \"</tr><tr>\";\n\t\t\n\t\t/// What the heck is this\n\t\t$sDay = date('N', $this->timeStamp) + $this->startDay - 1;\n\t\t\n\t\t// Print previous months days\n\t\t\tfor ($e=1;$e<=$sDay;$e++)\n\t\t\t\t$calHTML .= sprintf(\"<td class=\\\"%s-%s\\\">%s</td>\", $this->calendarName, $this->markup['prev_month'], (($this->displayNonMonthDays) ? $this->timeTravel(\"-\" . ($sDay -$e) . \" days\", 'd', $this->timeStamp) : ''));\n\t\n\t\t// Print days\n\t\tfor ($i=1;$i<=$this->daysInMonth;$i++) {\n\t\t\t// Set current day and timestamp\n\t\t\t$this->day = $i;\n\t\t\t$this->timeStamp = mktime(1,1,1,$this->month, $this->day, $this->year);\n\t\t\t\n\t\t\t// Set day as either plain text or event link\n\t\t\tif (isset($this->events[$this->year][$this->month][$this->day]))\n\t\t\t\t$this->htmlDay = sprintf(\"<a href=\\\"%s\\\" title=\\\"%s\\\">%s</a>\", $this->events[$this->year][$this->month][$this->day]['event_link'], $this->events[$this->year][$this->month][$this->day]['event_title'], $this->day);\n\t\t\telse\n\t\t\t\t$this->htmlDay = $this->day;\t\t\t\n\t\n\t\t\t// Display calendar cell\n\t\t\t$calHTML .= sprintf(\"<td %s%s>%s</td>\", ($this->timeStamp == mktime(1,1,1,date('n'),date('j'),date('Y')) ? 'id=\"' . $this->calendarName . '-' . $this->markup['current_day'] . '\" ' : ''), ((($sDay + $this->day) % 7 == 0) ? 'class=\"' . $this->calendarName . '-' . $this->markup['last_day_of_week'] . '\"' : ''), $this->htmlDay);\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t// End row if necessary\t\t\t\n\t\t\tif (($sDay + $this->day) % 7 == 0)\n\t\t\t\t$calHTML .= \"</tr><tr>\";\n\t\t}\n\t\t\n\t\t// Print next months days\n\t\tfor ($e2=1;$e2 < (7 - (($sDay + $this->daysInMonth -1) % 7)); $e2++)\n\t\t\t$calHTML .= sprintf(\"<td class=\\\"%s-next-month-day%s\\\">%s</td>\", $this->calendarName, ((($sDay + $this->day + $e2) % 7 == 0) ? ' ' . $this->calendarName . '-' . $this->markup['last_day_of_week'] : ''), (($this->displayNonMonthDays) ? $this->timeTravel(\"+$e2 days\", 'd', $this->timeStamp) : ''));\n\t\t\n\t\t$calHTML .= \"</tr></tbody></table>\";\n\t\n\t\t// Tidy up html\n\t\tif ($this->prettyHTML) {\n\t\t\t$replaceWhat = array('<tr', '<td', '</tr>', '</table>', '<thead>', '</thead>', '<tbody>', '</tbody>');\n\t\t\t$replaceWith = array(\"\\n\\t\\t<tr\", \"\\n\\t\\t\\t<td\", \"\\n\\t\\t</tr>\", \"\\n</table>\", \"\\n\\t<thead>\", \"\\n\\t</thead>\", \"\\n\\t<tbody>\", \"\\n\\t</tbody>\");\n\t\t\t$calHTML = str_replace($replaceWhat, $replaceWith, $calHTML);\n\t\t}\n\t\t\n\t\t// Print calendar\n\t\techo $calHTML;\n\t}", "private function Write_Monthly_Table() {\n\t\t$top = 445 + self::VERT_MARGIN;\n\t\t$left = self::HORZ_MARGIN;\n\t\t$label_width = 160;\n\t\t$table_left = $left + $label_width;\n\t\t$cell_width = 55;\n\t\t$row_height = 8.5;\n\t\t\n\t\t/**\n\t\t * Build label backgrounds\n\t\t */\n\t\t$this->pdf->setcolor('fill', 'gray', 0.75, 0, 0, 0);\n\t\t$this->Rect_TL($left, $top, $label_width + ($cell_width * 1), $row_height);\n\t\t$this->pdf->fill();\n\t\t\n\t\t/**\n\t\t * Add the strokes\n\t\t */\n\t\t$this->Rect_TL($table_left, $top, $cell_width, $row_height);\n\t//\t$this->Rect_TL($table_left + ($cell_width * 1), $top, $cell_width, $row_height);\n\t//\t$this->Rect_TL($table_left + ($cell_width * 2), $top, $cell_width, $row_height);\n\t\t$this->pdf->stroke();\n\t\t\n\t\t/**\n\t\t * Add the labels\n\t\t */\n\t\t$this->Text_TL(\"CURRENT PERIOD\",\n\t\t\t$left, $top, \n\t\t\t$label_width, $row_height,\n\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['ITALICS']} {$this->formats['LEFT']}\");\n\t\t\n\t\t$this->Text_TL(\"PERIOD\",\n\t\t\t$table_left, $top, \n\t\t\t$cell_width, $row_height,\n\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['ITALICS']} {$this->formats['CENTER']}\");\n\t\t\n\t\t/*$this->Text_TL(\"WEEK\",\n\t\t\t$table_left + ($cell_width * 1), $top, \n\t\t\t$cell_width, $row_height,\n\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['ITALICS']} {$this->formats['CENTER']}\");\n\t\t\n\t\t$this->Text_TL(\"MONTH\",\n\t\t\t$table_left + ($cell_width * 2), $top, \n\t\t\t$cell_width, $row_height,\n\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['ITALICS']} {$this->formats['CENTER']}\");*/\n\t\t\t\n\t\t$current_row = 1;\n\t\t$totals = array(\n\t\t\t'weekly' => 0,\n\t\t\t'biweekly' => 0,\n\t\t\t'semimonthly' => 0,\n\t\t\t'monthly' => 0,\n\t\t);\n\t\tforeach ($this->data['period'] as $label => $values) {\n\t\t\t/**\n\t\t\t * Special processing\n\t\t\t */\n\t\t\tswitch ($label) {\n\t\t\t\tcase 'nsf$':\n\t\t\t\t\tcontinue 2;\n\t\t\t\tcase 'debit returns':\n//\t\t\t\t\t$this->pdf->setcolor('fill', 'rgb', 1, 1, 176/255, 0);\n//\t\t\t\t\t$this->Rect_TL($table_left + ($cell_width * 1), $top + ($row_height * $current_row), $cell_width, $row_height);\n//\t\t\t\t\t$this->pdf->fill();\n\t\t\t\t\t\n//\t\t\t\t\t$this->Rect_TL($table_left + ($cell_width * 1), $top + ($row_height * $current_row), $cell_width, $row_height);\n//\t\t\t\t\t$this->pdf->stroke();\n\t\t\t\t\t/*$percentage = $values['month']? number_format($values['month'] / $this->data['monthly']['total debited']['month'] * 100, 1):0;\n\t\t\t\t\t$this->Text_TL($percentage.'%',\n\t\t\t\t\t\t$table_left + ($cell_width * 3), $top + ($row_height * $current_row), \n\t\t\t\t\t\t$cell_width, $row_height,\n\t\t\t\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['CENTER']}\");*/\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'net cash collected':\n\t\t\t\t\t$this->pdf->setcolor('fill', 'rgb', 1, 1, 176/255, 0);\n\t\t\t\t\t$this->Rect_TL($table_left, $top + ($row_height * $current_row), $cell_width, $row_height);\n\t\t\t\t\t//$this->Rect_TL($table_left + ($cell_width * 1), $top + ($row_height * $current_row), $cell_width, $row_height);\n\t\t\t\t\t//$this->Rect_TL($table_left + ($cell_width * 2), $top + ($row_height * $current_row), $cell_width, $row_height);\n\t\t\t\t\t$this->pdf->fill();\n\t\t\t\t\t\n\t\t\t\t\t//$this->Text_TL(number_format($this->data['period']['total debited']['span'] - $this->data['period']['debit returns']['span'], 2),\n\t\t\t\t\t$this->Text_TL(number_format($this->data['period']['total debited']['span'] - $this->data['period']['nsf$']['span'], 2),\n\t\t\t\t\t\t$table_left, $top + ($row_height * $current_row), \n\t\t\t\t\t\t$cell_width, $row_height,\n\t\t\t\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\t\t\t\t\t\t\n\t\t\t\t\t/*$this->Text_TL(number_format($this->data['monthly']['total debited']['week'] - $this->data['monthly']['debit returns']['week'], 2),\n\t\t\t\t\t\t$table_left + ($cell_width * 1), $top + ($row_height * $current_row), \n\t\t\t\t\t\t$cell_width, $row_height,\n\t\t\t\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\t\t\t\t\t$this->Text_TL(number_format($this->data['monthly']['total debited']['month'] - $this->data['monthly']['debit returns']['month'], 2),\n\t\t\t\t\t\t$table_left + ($cell_width * 2), $top + ($row_height * $current_row), \n\t\t\t\t\t\t$cell_width, $row_height,\n\t\t\t\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");*/\n\t\t\t\t\tbreak;\n\t\t\t\t//FORBIDDEN ROWS!\n\t\t\t\tcase 'moneygram deposit':\n\t\t\t\t//case 'credit card payments':\n\t\t\t\t\tcontinue 2;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t\t$format_decimals = 0;\n\t\t\tswitch ($label) {\n\t\t\t\tcase 'new customers':\n\t\t\t\tcase 'card reactivations':\n\t\t\t\tcase 'reactivated customers':\n\t\t\t\tcase 'refunded customers':\n\t\t\t\tcase 'resend customers':\n\t\t\t\tcase 'cancelled customers':\n\t\t\t\tcase 'paid out customers (ach)':\n\t\t\t\tcase 'paid out customers (non-ach)':\n\t\t\t\t\t$format_decimals = 0;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$format_decimals = 2;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t$this->pdf->setcolor('fill', 'gray', 0.75, 0, 0, 0);\n\t\t\t$this->Rect_TL($left, $top + ($row_height * $current_row), $label_width, $row_height);\n\t\t\t$this->pdf->fill();\n\t\t\t\n\t\t\t$this->Rect_TL($table_left, $top + ($row_height * $current_row), $cell_width, $row_height);\n//\t\t\t$this->Rect_TL($table_left + ($cell_width * 1), $top + ($row_height * $current_row), $cell_width, $row_height);\n//\t\t\t$this->Rect_TL($table_left + ($cell_width * 2), $top + ($row_height * $current_row), $cell_width, $row_height);\n\t\t\t$this->pdf->stroke();\n\t\t\t\n\t\t\t$this->Text_TL(strtoupper($label),\n\t\t\t\t$left + $label_indent, $top + ($row_height * $current_row), \n\t\t\t\t$label_width - $label_indent, $row_height,\n\t\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['ITALICS']} {$this->formats['RIGHT']}\");\n\t\t\t\n\t\t\tif ($label != 'net cash collected') {\n\t\t\t\t$this->Text_TL(number_format($values['span'], $format_decimals),\n\t\t\t\t\t$table_left, $top + ($row_height * $current_row), \n\t\t\t\t\t$cell_width, $row_height,\n\t\t\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\t\t\t\t\n\t\t\t\t/*$this->Text_TL(number_format($values['week'], $format_decimals),\n\t\t\t\t\t$table_left + ($cell_width * 1), $top + ($row_height * $current_row), \n\t\t\t\t\t$cell_width, $row_height,\n\t\t\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\t\t\t\t\n\t\t\t\t$this->Text_TL(number_format($values['month'], $format_decimals),\n\t\t\t\t\t$table_left + ($cell_width * 2), $top + ($row_height * $current_row), \n\t\t\t\t\t$cell_width, $row_height,\n\t\t\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");*/\n\t\t\t}\n\t\t\t\n\t\t\t$current_row++;\n\t\t}\n\t\t\n\t\t/**\n\t\t * Advances in Collection\n\t\t */\n\t\t$this->pdf->setcolor('fill', 'gray', 0.75, 0, 0, 0);\n\t\t$this->Rect_TL($left, $top + ($row_height * $current_row), $label_width, $row_height);\n\t\t$this->pdf->fill();\n\t\t\n\t\t$this->Rect_TL($table_left, $top + ($row_height * $current_row), $cell_width, $row_height);\n\t\t$this->pdf->stroke();\n\t\t\n\t\t$this->Text_TL(\"ADVANCES IN COLLECTION\",\n\t\t\t$left, $top + ($row_height * $current_row), \n\t\t\t$label_width, $row_height,\n\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['ITALICS']} {$this->formats['RIGHT']}\");\n\t\t\n\t\t$this->Text_TL(number_format($this->data['advances_collections'], 2),\n\t\t\t$table_left, $top + ($row_height * $current_row), \n\t\t\t$cell_width, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\t\t\n\t\t/**\n\t\t * Advances in Active\n\t\t */\n\t\t$this->pdf->setcolor('fill', 'gray', 0.75, 0, 0, 0);\n\t\t$this->Rect_TL($table_left + ($cell_width * 4), $top + ($row_height * $current_row), $cell_width * 2, $row_height);\n\t\t$this->pdf->fill();\n\t\t\n\t\t$this->Rect_TL($table_left + ($cell_width * 6), $top + ($row_height * $current_row), $cell_width, $row_height);\n\t\t$this->pdf->stroke();\n\t\t\n\t\t$this->Text_TL(\"ACTIVE ADVANCES OUT\",\n\t\t\t$table_left + ($cell_width * 4), $top + ($row_height * $current_row), \n\t\t\t$cell_width * 2, $row_height,\n\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['ITALICS']} {$this->formats['RIGHT']}\");\n\t\t\n\t\t$this->Text_TL(number_format($this->data['advances_active'], 2),\n\t\t\t$table_left + ($cell_width * 6), $top + ($row_height * $current_row), \n\t\t\t$cell_width, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\t\t\n\t}", "private function _get_calendar_array()\n\t{\n\t $this->all_events = $this->result->xpath(\".//event\");\n\t \n\t foreach($this->all_events as $an_event):\n\t $start_at = $an_event->xpath(\"./start-at\");\n \t $start_at = $start_at[0];\n \t $end_at = $an_event->xpath(\"./end-at\");\n \t $end_at = $end_at[0];\n \t \n \t $start_at = new DateTime($start_at);\n \t $start_at->setTimezone(new DateTimeZone('America/Chicago'));\n \t $start_at->setTime(0, 0, 0);\n \t $end_at = new DateTime($end_at);\n \t $end_at->setTimezone(new DateTimeZone('America/Chicago'));\n \t $end_at->setTime(0, 0, 0);\n \t \n \t $start_timestamp = strtotime($start_at->format('Y-m-d'));\n $end_timestamp = strtotime($end_at->format('Y-m-d'));\n \n $start_year = date(\"Y\", $start_timestamp);\n $end_year = date(\"Y\", $end_timestamp);\n $start_month = date(\"m\", $start_timestamp);\n $end_month = date(\"m\", $end_timestamp);\n $start_day = date(\"d\", $start_timestamp);\n $start_day = $start_day + 1;\n $end_day = date(\"d\", $end_timestamp);\n $end_day = $end_day + 1;\n \n if(($start_year == $this->year && $start_month == $this->month) || ($end_year == $this->year && $end_month == $this->month)):\n if($start_year == $end_year):\n if($start_month == $end_month):\n $this->_calendar_array_one($start_day, $end_day);\n else:\n if($end_month != $this->month):\n $this->_calendar_array_two($start_day);\n else:\n $this->_calendar_array_three($end_day);\n endif;\n endif;\n endif;\n endif;\n endforeach;\n \n\t foreach($this->callinks as $callinks):\n\t foreach($callinks as $key => $value):\n\t $this->combined_callinks[\"$key\"] = $value;\n\t endforeach;\n\t endforeach;\n\t}", "function displayLatestEvents()\n\t{\n\t\t$viewname = $this->getTheme();\n\n\t\t$cfg = JEVConfig::getInstance();\n\n\t\t// override global start now setting so that timelimit plugin can use it!\n\t\t$compparams = ComponentHelper::getParams(JEV_COM_COMPONENT);\n\t\t$startnow = $compparams->get(\"startnow\", 0);\n\t\t$compparams->set(\"startnow\", $this->modparams->get(\"startnow\", 0));\n\t\t$this->getLatestEventsData();\n\t\t$compparams->set(\"startnow\", $startnow);\n\n\t\t$content = \"\";\n\n\t\t$k = 0;\n\t\tif (isset($this->eventsByRelDay) && count($this->eventsByRelDay))\n\t\t{\n\t\t\t$content .= $this->getModuleHeader('<table class=\"mod_events_latest_table jevbootstrap\" width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">');\n\n\t\t\t// Now to display these events, we just start at the smallest index of the $this->eventsByRelDay array\n\t\t\t// and work our way up.\n\n\t\t\t$firstTime = true;\n\n\t\t\t// initialize name of com_jevents module and task defined to view\n\t\t\t// event detail. Note that these could change in future com_event\n\t\t\t// component revisions!! Note that the '$this->itemId' can be left out in\n\t\t\t// the link parameters for event details below since the event.php\n\t\t\t// component handler will fetch its own id from the db menu table\n\t\t\t// anyways as far as I understand it.\n\n\t\t\t$this->processFormatString();\n\n\t\t\tforeach ($this->eventsByRelDay as $relDay => $daysEvents)\n\t\t\t{\n\n\t\t\t\treset($daysEvents);\n\n\t\t\t\t// get all of the events for this day\n\t\t\t\tforeach ($daysEvents as $dayEvent)\n\t\t\t\t{\n\n\t\t\t\t\tif ($this->processTemplate($content, $dayEvent))\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$eventcontent = \"\";\n\n\t\t\t\t\t// generate output according custom string\n\t\t\t\t\tforeach ($this->splitCustomFormat as $condtoken)\n\t\t\t\t\t{\n\n\t\t\t\t\t\tif (isset($condtoken['cond']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($condtoken['cond'] == 'a' && !$dayEvent->alldayevent())\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\telse if ($condtoken['cond'] == '!a' && $dayEvent->alldayevent())\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\telse if ($condtoken['cond'] == 'e' && !($dayEvent->noendtime() || $dayEvent->alldayevent()))\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\telse if ($condtoken['cond'] == '!e' && ($dayEvent->noendtime() || $dayEvent->alldayevent()))\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\telse if ($condtoken['cond'] == '!m' && $dayEvent->getUnixStartDate() != $dayEvent->getUnixEndDate())\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\telse if ($condtoken['cond'] == 'm' && $dayEvent->getUnixStartDate() == $dayEvent->getUnixEndDate())\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tforeach ($condtoken['data'] as $token)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tunset($match);\n\t\t\t\t\t\t\tunset($dateParm);\n\t\t\t\t\t\t\t$dateParm = \"\";\n\t\t\t\t\t\t\t$match = '';\n\t\t\t\t\t\t\tif (is_array($token))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$match = $token['keyword'];\n\t\t\t\t\t\t\t\t$dateParm = isset($token['dateParm']) ? trim($token['dateParm']) : \"\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (strpos($token, '${') !== false)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$match = $token;\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$eventcontent .= $token;\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$this->processMatch($eventcontent, $match, $dayEvent, $dateParm, $relDay);\n\t\t\t\t\t\t} // end of foreach\n\t\t\t\t\t} // end of foreach\n\n\t\t\t\t\tif ($firstTime)\n\t\t\t\t\t\t$eventrow = '<tr class=\"jevrow' . $k . '\"><td class=\"mod_events_latest_first\">%s' . \"</td></tr>\\n\";\n\t\t\t\t\telse\n\t\t\t\t\t\t$eventrow = '<tr class=\"jevrow' . $k . '\"><td class=\"mod_events_latest\">%s' . \"</td></tr>\\n\";\n\n\t\t\t\t\t$templaterow = $this->modparams->get(\"modlatest_templaterow\") ? $this->modparams->get(\"modlatest_templaterow\") : $eventrow;\n\t\t\t\t\t$content .= str_replace(\"%s\", $eventcontent, $templaterow);\n\n\t\t\t\t\t$firstTime = false;\n\t\t\t\t} // end of foreach\n\t\t\t\t$k++;\n\t\t\t\t$k %= 2;\n\t\t\t} // end of foreach\n\t\t\t$content .= $this->getModuleFooter(\"</table>\\n\");\n\t\t}\n\t\telse if ($this->modparams->get(\"modlatest_NoEvents\", 1))\n\t\t{\n\t\t\t$content .= $this->modparams->get(\"modlatest_templatetop\") || $this->modparams->get(\"modlatest_templatetop\") ? $this->modparams->get(\"modlatest_templatetop\") : '<table class=\"mod_events_latest_table jevbootstrap\" width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">';\n\t\t\t$templaterow = $this->modparams->get(\"modlatest_templaterow\") ? $this->modparams->get(\"modlatest_templaterow\") : '<tr><td class=\"mod_events_latest_noevents\">%s</td></tr>' . \"\\n\";\n\t\t\t$content .= str_replace(\"%s\", Text::_('JEV_NO_EVENTS'), $templaterow);\n\t\t\t$content .= $this->modparams->get(\"modlatest_templatebottom\") ? $this->modparams->get(\"modlatest_templatebottom\") : \"</table>\\n\";\n\t\t}\n\n\t\t$callink_HTML = '<div class=\"mod_events_latest_callink\">'\n\t\t\t. $this->getCalendarLink()\n\t\t\t. '</div>';\n\n\t\tif ($this->linkToCal == 1)\n\t\t\t$content = $callink_HTML . $content;\n\t\tif ($this->linkToCal == 2)\n\t\t\t$content .= $callink_HTML;\n\n\t\tif ($this->displayRSS)\n\t\t{\n\t\t\t$rssimg = Uri::root() . \"media/system/images/livemarks.png\";\n\t\t\t$callink_HTML = '<div class=\"mod_events_latest_rsslink\">'\n\t\t\t\t. '<a href=\"' . $this->rsslink . '\" title=\"' . Text::_(\"RSS_FEED\") . '\" target=\"_blank\">'\n\t\t\t\t. '<img src=\"' . $rssimg . '\" alt=\"' . Text::_(\"RSS_FEED\") . '\" />'\n\t\t\t\t. Text::_(\"SUBSCRIBE_TO_RSS_FEED\")\n\t\t\t\t. '</a>'\n\t\t\t\t. '</div>';\n\t\t\t$content .= $callink_HTML;\n\t\t}\n\n\t\tif ($this->modparams->get(\"contentplugins\", 0))\n\t\t{\n\t\t\t$eventdata = new stdClass();\n\t\t\t$eventdata->text = $content;\n\t\t\tFactory::getApplication()->triggerEvent('onContentPrepare', array('com_jevents', &$eventdata, &$this->modparams, 0));\n\t\t\t$content = $eventdata->text;\n\t\t}\n\n\t\treturn $content;\n\n\t}", "function draw_calendar($conn, $month,$year,$alat){\n\n /* draw table */\n $calendar = '<table cellpadding=\"0\" cellspacing=\"0\" class=\"calendar\">';\n\n /* table headings */\n $headings = array('Sun','Mon','Tue','Wed','Thu','Fri','Sat');\n $calendar.= '<tr class=\"calendar-row\"><td class=\"calendar-day-head\">'.implode('</td><td class=\"calendar-day-head\">',$headings).'</td></tr>';\n\n /* days and weeks vars now ... */\n $running_day = date('w',mktime(0,0,0,$month,1,$year));\n $days_in_month = date('t',mktime(0,0,0,$month,1,$year));\n $days_in_this_week = 1;\n $day_counter = 0;\n\n $booked[] = $days_in_month;\n for($i = 0; $i<=$days_in_month; $i++){\n $booked[$i] = '';\n }\n\n $now = $month + $year *12;\n\n //PENGECEKKAN STATUS UNTUK KEPENTINGAN KALENDER\n //booking\n $result = mysqli_query($conn,\"SELECT * FROM booking NATURAL JOIN alat where nama_alat = '$alat' and ((year(tanggal_rencana_peminjaman)*12 + month(tanggal_rencana_peminjaman)) <= '$now') and ((year(tanggal_rencana_pengembalian)*12 + month(tanggal_rencana_pengembalian)) >= '$now')\");\n if(mysqli_num_rows($result)>0){\n markdate($booked,$result,$days_in_month,$month,2);\n }\n mysqli_free_result($result);\n\n //peminjaman\n $result = mysqli_query($conn,\"SELECT * FROM peminjaman NATURAL JOIN alat where nama_alat = '$alat' and tanggal_pengembalian IS NULL and ((year(tanggal_peminjaman)*12 + month(tanggal_peminjaman)) <= '$now') and ((year(tanggal_rencana_pengembalian)*12 + month(tanggal_rencana_pengembalian)) >= '$now')\");\n if(mysqli_num_rows($result)>0){\n markdate($booked,$result,$days_in_month,$month,1);\n }\n mysqli_free_result($result);\n\n //perbaikan\n $result = mysqli_query($conn,\"SELECT * FROM perbaikan NATURAL JOIN alat where nama_alat = '$alat' and tanggal_selesai_perbaikan IS NULL and ((year(tanggal_mulai_perbaikan)*12 + month(tanggal_mulai_perbaikan)) <= '$now') and ((year(estimasi_selesai_perbaikan)*12 + month(estimasi_selesai_perbaikan)) >= '$now')\");\n if(mysqli_num_rows($result)>0){\n markdate($booked,$result,$days_in_month,$month,3);\n }\n mysqli_free_result($result);\n\n //END OF PENGECEKKAN STATUS\n\n /* row for week one */\n $calendar.= '<tr class=\"calendar-row\">';\n\n /* print \"blank\" days until the first of the current week */\n for($x = 0; $x < $running_day; $x++):\n $calendar.= '<td class=\"calendar-day-np\"> </td>';\n $days_in_this_week++;\n endfor;\n\n /* keep going with days.... */\n for($list_day = 1; $list_day <= $days_in_month; $list_day++):\n\n $calendar.= '<td class=\"calendar-day\">';\n\n /* add in the day number */\n $calendar.= '<div class=\"day-number\">'.$list_day.'</div>';\n\n /** QUERY THE DATABASE FOR AN ENTRY FOR THIS DAY !! IF MATCHES FOUND, PRINT THEM !! **/\n $calendar.= $booked[$list_day-1];\n\n $calendar.= '</td>';\n if($running_day == 6):\n $calendar.= '</tr>';\n if(($day_counter+1) != $days_in_month):\n $calendar.= '<tr class=\"calendar-row\">';\n endif;\n $running_day = -1;\n $days_in_this_week = 0;\n endif;\n $days_in_this_week++; $running_day++; $day_counter++;\n\n endfor;\n\n /* finish the rest of the days in the week */\n if($days_in_this_week < 8):\n for($x = 1; $x <= (8 - $days_in_this_week); $x++):\n $calendar.= '<td class=\"calendar-day-np\"> </td>';\n endfor;\n endif;\n\n /* final row */\n $calendar.= '</tr>';\n\n /* end the table */\n $calendar.= '</table>';\n\n\n /* all done, return result */\n return $calendar;\n}", "private function getWeekDays()\n {\n $time = date('Y-m-d', strtotime($this->year . '-' . $this->month . '-' . $this->day));\n if ($this->view == 'week') {\n $sunday = strtotime('last sunday', strtotime($time . ' +1day'));\n $day = date('j', $sunday);\n $startingDay = date('N', $sunday);\n $cnt = 6;\n }\n if ($this->view == 'day') {\n $day = $this->day;\n $cnt = 0;\n }\n\n $this->week_days = array();\n $mlen = $this->daysMonth[intval($this->month) - 1];\n if ($this->month == 2 && ((($this->year % 4) == 0) && ((($this->year % 100) != 0) || (($this->year % 400) == 0)))) {\n $mlen = $mlen + 1;\n }\n $h = \"<tr class='\" . $this->labelsClass . \"'>\";\n $h .= \"<td>&nbsp;</td>\";\n for ($j = 0; $j <= $cnt; $j++) {\n $cs = $cnt == 0 ? 3 : 1;\n $h .= \"<td colspan='$cs'>\";\n if ($this->view == 'day') {\n $getDayNumber = date('w', strtotime($time));\n } else {\n $getDayNumber = $j;\n }\n if ($day <= $mlen) {\n } else {\n $day = 1;\n }\n $h .= $this->dayLabels[$getDayNumber] . ' ';\n $h .= intval($day);\n $this->week_days[] = $day;\n $day++;\n $h .= \"</td>\";\n }\n\n $h .= \"</tr>\";\n return $h;\n }", "public function render()\r\n\t{\r\n\t\t$days = 1;\r\n\t\t$this->redirect = isset($this->redirect) ? $this->redirect: $this->getURL() ;\r\n\t\t$this->set_date();\r\n\t\t$total_days = cal_days_in_month(CAL_GREGORIAN, $this->month, $this->year);\r\n\t\t$first_spaces = date(\"w\", mktime(0, 0, 0, $this->month, 1, $this->year));\r\n\t\t$currentday = $this->UID('day');\r\n\r\n\t\tif (isset($this->inForm))\r\n\t\t{\r\n\t\t\t$CObjID = $this->UID('calendar');\r\n\t\t\t$DateString = ($this->Value()) ? '\",\"'.$this->Value() : '';\r\n\t\t\t$this->output = '<script language=\"javascript\">'.\"\\n\".'var '.$CObjID.' = new Calendar(\"'.$this->ID.$DateString.'\");'.\"\\n\"\r\n\t\t\t.$CObjID.'.currentDateStyle = \"'.$this->currentDateStyle.'\";'.\"\\n\"\r\n\t\t\t.$CObjID.'.selectedDateStyle = \"'.$this->selectedDateStyle.'\";'.\"\\n\"\r\n\t\t\t.$CObjID.'.normalDateStyle = \"'.$this->normalDateStyle.'\";'.\"\\n\"\r\n\t\t\t.$CObjID.'.setStyles();'.\"\\n\"\r\n\t\t\t.'</script>'.\"\\n\"\r\n\t\t\t.'<input type=\"hidden\" id=\"'.$CObjID.'\" name=\"'.$CObjID.'\" value=\"'.$this->Value().'\"/>'.\"\\n\";\r\n\t\t}\r\n\t\telse $this->output = '';\r\n\r\n\t\t$NavUrls = $this->url_params($this->UID('year'),$this->UID('month'),$this->UID('day'),array_keys($this->add_params_sel));\r\n\r\n\t\t$this->output.= '<table class=\"calendar\"><tr><td class=\"'.$this->navigateStyle.'\"><a id=\"'.$this->UID('navigateback').'\" class=\"'.$this->navigateStyle.'\" href=\"'.$this->getURL().\r\n\t\t\t'?'.$this->add_params_sel().'&'.$this->UID('month').'='.($this->month-1).'&'.$this->UID('year').'='.$this->year.$NavUrls.'\"><</a>\r\n\t\t </td><td id=\"'.$this->UID('Month').'\" colspan=\"5\" class=\"'.$this->monthStyle.'\">'.$this->RUS_MONTHS[date(\"n\", mktime(0, 0, 0, $this->month, 1, $this->year))-1].'&nbsp;'.$this->year.'\r\n\t\t </td><td class=\"'.$this->navigateStyle.'\"><a id=\"'.$this->UID('navigatenext').'\" class=\"'.$this->navigateStyle.'\" href=\"'.$this->getURL().'?'.$this->add_params_sel().'&'.$this->UID('month').'='.($this->month+1).'&'.$this->UID('year').'='.$this->year.$NavUrls.'\">></a>\r\n\t\t </td></tr><tr class=\"'.$this->daysOfTheWeekStyle.'\"><td>Ïí</td><td>Âò</td><td>Ñð</td><td>×ò</td><td>Ïò</td><td>Ñá</td><td>Âñ</td></tr>';\r\n\r\n \tfor ($Week=0;$Week<6;$Week++)\r\n \t{\r\n \t$this->output.= '<tr>';\r\n\r\n\t\t\t\tfor ($Day=0;$Day<7;$Day++)\r\n \t{\r\n\r\n\t\t\t\t\t$days++;\r\n\t\t\t\t\t$dDay = $days - $first_spaces;\r\n\t\t\t\t\t$norm_style = ($this->isDayAvailable($dDay))?$this->availDateStyle:$this->normalDateStyle;\r\n\t\t\t\t\t\r\n//\t\t\t\t\techo('dDay='.$dDay.'<br/>avail dates:');\r\n//\t\t\t\t\tforeach($this->availDates as $date)\r\n//\t\t\t\t\t\techo(date('d/m/Y',$date).'<br/>');\r\n\r\n\t\t\t\t\t$CellID = $this->UID('item['.$days.']');\r\n\r\n\t\t\t\t\tif ($days > $first_spaces && ($dDay) < $total_days + 1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$LinkID = $this->UID('hlink['.$days.']');\r\n\t\t\t\t\t\t$currentSelectedDay = '<td id=\"'.$CellID.'\" class=\"'.$this->selectedDateStyle.'\"><a id=\"'.$LinkID.'\" class=\"'.$this->selectedDateStyle.'\"';\r\n\t\t\t\t\t\t$CurrentDate = isset($_REQUEST[$currentday]) ? $_REQUEST[$currentday]: '';\r\n\r\n\t\t\t\t\t\tif ($CurrentDate == $dDay)\t$this->output.= $currentSelectedDay;\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$this->output.='<td id=\"'.$CellID.'\" class=';\r\n\t\t\t\t\t\t\t$this->output.= ($dDay==date(\"j\") && $this->year==date(\"Y\") && $this->month==date(\"n\")) ?\r\n\t\t\t\t\t\t\t\t'\"'.$this->currentDateStyle.'\"><a id=\"'.$LinkID.'\" class=\"'.$this->currentDateStyle.'\"' :\r\n\t\t\t\t\t\t\t\t'\"'.$norm_style.'\"><a id=\"'.$LinkID.'\" class=\"'.$this->normalDateStyle.'\"';\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif($this->isDayAvailable($dDay))\r\n\t\t\t\t\t\t\t$this->output.= 'href=\"'.$this->redirect.'?'.$this->add_params_day().'&'.$currentday.'='.$dDay.$this->url_params($currentday,array_keys($this->add_params_day)).'\">'.$dDay.'</a></td>';\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t$this->output.= '>'.$dDay.'</a></td>';\r\n\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$this->output.='<td id=\"'.$CellID.'\" class=\"'.$this->normalDateStyle.'\"></td>'.\"\\n\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$this->output.=\"</tr>\";\r\n \t}\r\n\r\n\t\t$this->output.= '</table>';\r\n\r\n\t\treturn $this->output;\r\n\t}", "public function run()\n {\n $stop_date = date('07/01/2019');\n $daaa = array();\n for($y = 1; $y <= 1828; $y++){\n \n $d = date('d-m-Y', strtotime($stop_date . ' +'.$y.' days'));\n $date1 = date('Y-m-d', strtotime($stop_date . ' +'.$y.' days'));\n\n $day = date('D',strtotime($stop_date . ' +'.$y.' days'));\n $month = date('m',strtotime($stop_date . ' +'.$y.' days'));\n $year = date('Y',strtotime($stop_date . ' +'.$y.' days'));\n $mon = date('F',strtotime($stop_date . ' +'.$y.' days'));\n\n $daaa[$y]['date'] = $d;\n $daaa[$y]['day'] = $day;\n $daaa[$y]['month'] = $month;\n $daaa[$y]['year'] = $year;\n $daaa[$y]['mon'] = $mon;\n $daaa[$y]['dates'] = $date1;\n \n }\n \n foreach ($daaa as $dk => $dv) {\n\t Calender::create([\n\t 'date' => $dv['date'],\n\t 'day' => $dv['day'],\n\t 'month' => $dv['month'],\n\t 'year' => $dv['year'],\n\t 'month_name' => $dv['mon'],\n\t ]);\n\t }\n }", "function mkWeekDays(){\n\tif ($this->startOnSun){\n\t\t$out=\"<tr>\";\n\t\tif ($this->weekNum) $out.=\"<td class=\\\"\".$this->cssWeekNumTitle.\"\\\">\".$this->weekNumTitle.\"</td>\";\n\t\tfor ($x=0;$x<=6;$x++) $out.=\"<td class=\\\"\".$this->cssWeekDay.\"\\\">\".$this->getDayName($x).\"</td>\";\n\t\t$out.=\"</tr>\\n\";\n\t}\n\telse{\n\t\t$out=\"<tr>\";\n\t\tif ($this->weekNum) $out.=\"<td class=\\\"\".$this->cssWeekNumTitle.\"\\\">\".$this->weekNumTitle.\"</td>\";\n\t\tfor ($x=1;$x<=6;$x++) $out.=\"<td class=\\\"\".$this->cssWeekDay.\"\\\">\".$this->getDayName($x).\"</td>\";\n\t\t$out.=\"<td class=\\\"\".$this->cssWeekDay.\"\\\">\".$this->getDayName(0).\"</td>\";\n\t\t$out.=\"</tr>\\n\";\n\t\t$this->firstday=$this->firstday-1;\n\t\tif ($this->firstday<0) $this->firstday=6;\n\t}\nreturn $out;\n}", "public function calendar($year_month = null) {\n\n if(!isset($year_month)) {\n /* Setting the data and creating the first and last day of a month */\n $start_date = date('Y-m-01');\n $end_date = date('Y-m-t');\n }\n else {\n /* Getting the data and creating the first and last day of a month */\n $start_date = date('Y-m-d', strtotime($year_month.'-01'));\n $end_date = date('Y-m-t', strtotime($year_month.'-01'));\n }\n\n /* Querying the database to get the events for all days of certain month of the year */\n $calendar = [];\n $activities = [];\n while($start_date <= $end_date) {\n\n //Temporalmente, pedido por Amparo, ¿Qué te dije?, igual y mañana se queja de que se ven los eventos sin aprobar :P\n /*\n $events = EventDCI::whereRaw('end_day >= ? and start_day <= ? and (dci_status = ? or dci_status = ?) and user_status = ?',\n array($start_date, $start_date, 'En Proceso', 'Aprobado', 'Activo'))\n ->orderBy('time')->get();\n */\n $events = EventDCI::whereRaw('end_day >= ? and start_day <= ?',\n array($start_date, $start_date))\n ->orderBy('time')->get();\n\n $activities['activities'] = $events->toArray();\n\n //ola k ase\n $activities['date'] = $start_date;\n\n array_push($calendar, $activities);\n $activities = [];\n\n $next_date = new DateTime($start_date);\n $next_date->add(new DateInterval('P1D'));\n $s_next_date = $next_date->format('Y-m-d');\n $start_date = explode(' ', $s_next_date)[0];\n }\n\n return json_encode($calendar);\n\n }", "public function getCalendarInfo()\n\t{\n\t\t\n\t\t//get URL to calendar page\n\t\t$url = $this->calendarLink;\n\t\t//Get the sourcecode\t\t\t\n\t\t$data = $this->curl->curlGetReq($url);\n\t\t//find all links to each person\n\t\t$query = \"//a\";\n\t\t$aTagNodes = $this->curl-> getDOMData($data,$query);\n\t\t\n\t\t$calendarDates = new CalendarDateRepository();\n\t\t//loop through each link, representing a person\n\t\tforeach ($aTagNodes as $at)\n\t\t{\n\t\t\t//get the href to that persons calendar\n\t\t\t$calURL =$at->getAttribute(\"href\");\n\t\t\t//get the sourcecode of that page\n\t\t\t$data = $this->curl->curlGetReq($url.$calURL);\n\t\t\t//get the table header containing name of the days\n\t\t\t$query = \"//th\";\n\t\t\t$days = $this->curl->getDOMData($data,$query);\n\t\t\t//get the table data containing availability\n\t\t\t$query = \"//td\";\n\t\t\t$availibility = $this->curl->getDOMData($data,$query);\t\t\t\n\n\t\t\t$dates = array();\n\t\t\t/*\n\t\t\t* loop table data, if the availability of that day is ok\n\t\t\t* save that data.\n\t\t\t*/\n\t\t\tfor ($i=0; $i < $days->length ; $i++)\n\t\t\t{ \n\t\t\t\t$availibilityStr =$availibility[$i]->nodeValue;\n\t\n\t\t\t\tif(strtolower($availibilityStr) === \"ok\")\n\t\t\t\t{\t\n\t\t\t\t\t//$calendarDates->add($days[$i]->nodeValue);\n\t\t\t\t\t$dates[] = new Day($days[$i]->nodeValue);\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\t$calendarDates->add($dates);\n\t\t\t\n\t\t }\n\t\t\n\t\treturn $calendarDates; \n\t}", "function getTable($date)\n{\n list($year, $month) = explode(\"-\", $date);\n //echo $year + \", \";\n //echo $month + \", \";\n //echo $date + \", \";\n\n\n $days_in_month = cal_days_in_month(CAL_GREGORIAN, $month, $year);\n //echo \", \";\n\n // Creating connection\n include('DB_config.php');\n $conn = new mysqli($servername, $username, $password, $db_name);\n if ($conn->connect_error) {\n die(\"Connection failed: \" . $conn->connect_error);\n }\n echo '<script>console.log(\"[MySQL] Database connected successfully\")</script>';\n\n mysqli_set_charset($conn, \"utf8\");\n $sql = \"SELECT ID, NAME FROM users ORDER BY NAME\";\n $rs = $conn->query($sql);\n\n if ($rs->num_rows > 0) {\n $start = 0;\n $end = 0;\n $table = '<table id=\"dochadzka\">';\n $table .= '<col span=\"1\" class=\"wide\">';\n // first row\n $table .= '<tr><th>Meno</th>';\n $i = 1;\n while ($i != $days_in_month + 1) {\n if (isWeekend($year . \"-\" . $month . \"-\" . $i)) {\n $table .= '<th class = \"weekend\">' . $i++ . '.</th>';\n } else {\n $table .= '<th>' . $i++ . '.</th>';\n }\n\n }\n $table .= '</tr>';\n // end first row\n\n while ($row = $rs->fetch_assoc()) {\n //$table.='<option value=\"'.$row['id'].'\">'.$row['firstname'].' ' .$row['lastname'].'</option>';\n $table .= '<tr id=\"' . $row['ID'] . '\"><td id=\"name\">' . $row['NAME'] . '</td>';\n $user_id = $row['ID'];\n\n $sql = \"SELECT start_date,end_date,status_id FROM evidence WHERE user_id=\" . $user_id . \" AND MONTH(start_date)=\" . $month . \" AND YEAR(start_date)=\" . $year . \" ORDER BY id,start_date\";\n $rs1 = $conn->query($sql);\n $num_of_rows = $rs1->num_rows;\n if ($num_of_rows > 0) {\n $i = 1;\n\n $table_row = array();\n while ($i++ <= $days_in_month + 1) {\n array_push($table_row, \"<td></td>\");\n }\n\n while ($result = $rs1->fetch_assoc()) {\n\n\n list($year, $month, $day) = array_pad(explode('-', $result['start_date']), 3, null);\n $start = (int)$day;\n //echo $start.\" -> \";\n list($year, $month, $day) = array_pad(explode('-', $result['end_date']), 3, null);\n $end = (int)$day;\n //echo $end.\"<br />\";\n\n $i = $start;\n while ($end >= $i) {\n $table_row[$i++] = \"<td id=state\" . $result['status_id'] . \"></td>\";\n }\n /*\n if($num_of_rows > 1 && $j == $num_of_rows && $i < $days_in_month) {\n echo $i.\"<br />\";\n while($i++ != $days_in_month+1) {\n $table.='<th></th>';\n }\n }\n */\n\n\n //$start = 0;\n //$end = 0;\n }\n $i = 0;\n while ($i++ < $days_in_month) {\n $table .= $table_row[$i];\n }\n } else {\n $result = null;\n $i = 1;\n while ($i++ != $days_in_month + 1) {\n $table .= '<td></td>';\n }\n }\n\n }\n\n\n $table .= '</table>';\n echo $table;\n } else {\n echo \"0 results\";\n }\n\n}", "public function calender($maand)\n {\n// ->whereMonth('created_at', '=', $month)\n// ->get();\n// \n\n $datumString = [];\n date_default_timezone_set('Asia/Dhaka');\n\n// Get prev & next month\n if (isset($maand)) {\n $ym = $maand;\n } else {\n // This month\n $ym = date('Y-m');\n }\n\n// Check format\n $timestamp = strtotime($ym, \"-01\");\n if ($timestamp === false) {\n $timestamp = time();\n }\n\n// Today\n $today = date('Y-m-j', time());\n\n// For H3 title\n $html_title = date('M - Y', $timestamp);\n $datumString['titel'] = $html_title;\n// Create prev & next month link mktime(hour,minute,second,month,day,year)\n $prev = date('Y-m', mktime(0, 0, 0, date('m', $timestamp) - 1, 1, date('Y', $timestamp)));\n $next = date('Y-m', mktime(0, 0, 0, date('m', $timestamp) + 1, 1, date('Y', $timestamp)));\n\n $datumString['vorige'] = $prev;\n $datumString['volgende'] = $next;\n// Number of days in the month\n $day_count = date('t', $timestamp);\n\n// 0:Sun 1:Mon 2:Tue ...\n $str = date('w', mktime(0, 0, 0, date('m', $timestamp), 1, date('Y', $timestamp)));\n\n\n// Create Calendar!!\n $weeks = array();\n $week = '';\n\n// Add empty cell\n $week .= str_repeat('<td></td>', $str);\n\n for ($day = 1; $day <= $day_count; $day++, $str++) {\n\n $date = $ym . '-' . $day;\n\n if ($today == $date) {\n $week .= '<td class=\"today\">' . $day;\n } else {\n $week .= '<td>' . $day;\n }\n $week .= '</td>';\n\n // End of the week OR End of the month\n if ($str % 7 == 6 || $day == $day_count) {\n\n if ($day == $day_count) {\n // Add empty cell\n $week .= str_repeat('<td></td>', 6 - ($str % 7));\n }\n\n $weeks[] = '<tr>' . $week . '</tr>';\n\n // Prepare for new week\n $week = '';\n\n }\n\n }\n $datumString['weeks'] = $weeks;\n return $datumString;\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 __toString()\n {\n // Can this set of dates be rendered?\n if (!$this->bOneFullMonth) {\n throw new \\Exception(\n __METHOD__ . ' - Only one full month can be rendered (end date must be \"true\").'\n );\n }\n\n $i = 0;\n $strHtml = '<h3 class=\"sked-cal-title\">' . date('F', strtotime($this->strStart))\n . '</h3><table class=\"sked-cal\"><thead>';\n\n // Day headers\n foreach (SkeVent::WEEKDAYS as $strDay)\n $strHtml .= '<th><center>' . $strDay . '</center></th>';\n\n $strHtml .= '</thead><tr>';\n for ($j = 0; $j < $this->monthPadDates(); $j++) {\n $i++;\n $strHtml .= '<td></td>';\n }\n\n foreach ($this as $skeDate) {\n $i++;\n $strHtml .= '<td class=\"sked-cal-date' . (date('Y-m-d') !== $skeDate->format('Y-m-d') ? '' : ' sked-cal-date-current') . '\">';\n $strHtml .= '<span class=\"sked-cal-date-num\">' . $skeDate->format('j') . '</span>';\n $strHtml .= '<ul class=\"sked-cal-date-list\">';\n foreach ($skeDate->events() as $skeVent) {\n $strHtml .= '<li class=\"sked-cal-date-event\">'\n . '<a href=\"#\" class=\"sked-cal-event-link\" id=\"skevent-'\n . $skeVent->id . '\" data-owner-id=\"' . $skeVent->owner()\n . '\">'\n . $skeVent->label\n . '</a><span>' . $skeVent->time('g:ia', $this->strTimezone) . '</span>'\n . '</li>';\n }\n $strHtml .= '</ul>';\n $strHtml .= '</td>';\n if (7 === $i) {\n $i = 0;\n $strHtml .= '</tr><tr>';\n }\n }\n\n if ($i) {\n for ($j = $i; $j < 7; $j++) {\n $strHtml .= '<td></td>';\n }\n }\n\n return $strHtml . '</tr></table>';\n }", "public function buildDayList($date){\n\t\t$events = $this->getDayEvents($date);\n\t\t$count = 0;\n\t\t\n\t\tob_start();\n\t\tif(count($events) > 0){\n\t\t\tforeach($events as $key => $event){\t\t\t\n\t\t\t\t$recurringDays = $event->getRecurringDays();\n\t\t\t\t\t\t\n\t\t\t\t$dayOfWeek = date_create($date);\n\t\t\t\t$dayOfWeek = strtolower(date_format($dayOfWeek, \"l\"));\n\t\t\t\t//echo $dayOfWeek;\n\n\t\t\t\tif(count($recurringDays)){\n\t\t\t\t\tif(in_array($dayOfWeek, $recurringDays)){\n\t\t\t\t\t\techo '<h4>Events for ' . $this->getDate($date) . '</h4>';\n\t\t\t\t\t\techo $event->toHtml('listing');\n\t\t\t\t\t\techo '<hr />';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\techo '<h4>Events for ' . $this->getDate($date) . '</h4>';\n\t\t\t\t\techo $event->toHtml('listing');\n\t\t\t\t\techo '<hr />';\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t$count++;\n\t\t\t}\n\t\t}\n\t\treturn ob_get_clean();\n\t}", "function showMonth($showNoMonthDays=false){\n$this->showNoMonthDays=$showNoMonthDays;\n$out=$this->mkMonthHead(); // this should remain first: opens table tag\n$out.=$this->mkMonthTitle(); // tr tag: month title and navigation\n$out.=$this->mkDatePicker(); // tr tag: month date picker (month and year selection)\n$out.=$this->mkWeekDays(); // tr tag: the weekday names\n\tif ($this->showNoMonthDays==false) $out.=$this->mkMonthBody(); // tr tags: the days of the month\n\telse $out.=$this->mkMonthBody(1); // tr tags: the days of the month\n$out.=$this->mkMonthFoot(); // this should remain last: closes table tag\nreturn $out;\n}", "private function makeDayEventListArray()\n\t{\n\t\t$outevents = array();\n\t\t$n = 0;\n\t\tforeach($this->eventItems as $item) {\n\t\t\tif($item['date'] == $this->curYear.'-'.$this->curMonth.'-'.$this->dayOfMonth) {\t\t\n\t\t\t\t$outevents[$n]['category'] = $item['cat'];\n\t\t\t\t\n\t\t\t\tif($item['stdurl']) {\n\t\t\t\t\t$outevents[$n]['url'] = $item['url'].'?id='.$item['id'];\n\t\t\t\t} else {\n\t\t\t\t\t$outevents[$n]['url'] = $item['url'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$outevents[$n]['summary'] = $item['text'];\n\t\t\t\t$outevents[$n]['description'] = $item['desc'];\n\t\t\t\t$outevents[$n]['categorycolor'] = (strlen($item['catcolor']) > 0 ? str_replace('#','',$item['catcolor']) : '#eeeeee');\n\t\t\t}\n\t\t\t$n++;\n\t\t}\n\t\t\n\t\tif(count($outevents)) {\n\t\t\treturn $outevents;\n\t\t}\n\t\treturn false;\n\t}", "function getEvents($date = '') {\n include 'config.php';\n $eventListHTML = '';\n $date = $date ? $date : date(\"Y-m-d\");\n //Get events based on the current date\n $result = $con->query(\"SELECT * FROM med_records WHERE entry_date = '\" . $date . \"' \");\n if ($result->num_rows > 0) {\n $eventListHTML = '<h2>Events on ' . date(\"l, d M Y\", strtotime($date)) . '</h2>';\n $eventListHTML .= '<td>';\n while ($row = $result->fetch_assoc()) {\n $eventListHTML .= '<td>' . $row['emp_name'] . '</td>';\n }\n $eventListHTML .= '</td>';\n }\n echo $eventListHTML;\n}", "function show_calendar_events()\n\t{\n\t\t$stats_html = \"\";\n\t\t\n\t\tif ($this->ipsclass->vars['show_birthdays'] or $this->ipsclass->vars['show_calendar'] )\n\t\t{\n\t\t\t$a = explode( ',', gmdate( 'Y,n,j,G,i,s', time() + $this->ipsclass->get_time_offset() ) );\n\t\t\n\t\t\t$day = $a[2];\n\t\t\t$month = $a[1];\n\t\t\t$year = $a[0];\n\t\t\t\n\t\t\t$birthstring = \"\";\n\t\t\t$count = 0;\n\t\t\t$users = array();\n\t\t\t\n\t\t\tif ( $this->ipsclass->vars['show_birthdays'] )\n\t\t\t{\n\t\t\t\tif ( is_array($this->ipsclass->cache['birthdays']) AND count( $this->ipsclass->cache['birthdays'] ) )\n\t\t\t\t{\n\t\t\t\t\tforeach( $this->ipsclass->cache['birthdays'] as $u )\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( $u['bday_day'] == $day and $u['bday_month'] == $month )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$users[] = $u;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if( $day == 28 && $month == 2 && !date(\"L\") )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ( $u['bday_day'] == \"29\" and $u['bday_month'] == $month )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$users[] = $u;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Spin and print...\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\tforeach ( $users as $user )\n\t\t\t\t{\n\t\t\t\t\t$birthstring .= \"<a href='{$this->ipsclass->base_url}showuser={$user['id']}'>{$user['members_display_name']}</a>\";\n\t\t\t\t\t\n\t\t\t\t\tif ($user['bday_year'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$pyear = $year - $user['bday_year'];\n\t\t\t\t\t\t$birthstring .= \"(<b>$pyear</b>)\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$birthstring .= $this->sep_char.\"\\n\";\n\t\t\t\t\t\n\t\t\t\t\t$count++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Fix up string...\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$birthstring = preg_replace( \"/\".$this->sep_char.\"$/\", \"\", trim($birthstring) );\n\t\t\t\t\n\t\t\t\t$lang = $this->ipsclass->lang['no_birth_users'];\n\t\t\t\t\n\t\t\t\tif ($count > 0)\n\t\t\t\t{\n\t\t\t\t\t$lang = ($count > 1) ? $this->ipsclass->lang['birth_users'] : $this->ipsclass->lang['birth_user'];\n\t\t\t\t\t$stats_html .= $this->ipsclass->compiled_templates['skin_boards']->birthdays( $birthstring, $count, $lang );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$count = \"\";\n\t\t\t\t\t\n\t\t\t\t\tif ( ! $this->ipsclass->vars['autohide_bday'] )\n\t\t\t\t\t{\n\t\t\t\t\t\t$stats_html .= $this->ipsclass->compiled_templates['skin_boards']->birthdays( $birthstring, $count, $lang );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Are we viewing the calendar?\n\t\t//-----------------------------------------\n\t\t\n\t\tif ($this->ipsclass->vars['show_calendar'])\n\t\t{\n\t\t\t$this->ipsclass->vars['calendar_limit'] = intval($this->ipsclass->vars['calendar_limit']) < 2 ? 1 : intval($this->ipsclass->vars['calendar_limit']);\n\t\t\t\n\t\t\t$our_unix = gmmktime( 0, 0, 0, $month, $day, $year);\n\t\t\t$max_date = $our_unix + ($this->ipsclass->vars['calendar_limit'] * 86400);\n\t\t\t$events = array();\n\t\t\t$show_events = array();\n\t\t\t\n\t\t\tif( $this->ipsclass->member['org_perm_id'] )\n\t\t\t{\n\t\t\t\t$member_permission_groups = explode( \",\", $this->ipsclass->clean_perm_string( $this->ipsclass->member['org_perm_id'] ) );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$member_permission_groups = explode( \",\", $this->ipsclass->clean_perm_string( $this->ipsclass->member['g_perm_id'] ) );\n\t\t\t\t\n\t\t\t\tif( isset($this->ipsclass->member['mgroup_others']) AND $this->ipsclass->member['mgroup_others'] )\n\t\t\t\t{\n\t\t\t\t\t$this->ipsclass->member['mgroup_others'] = $this->ipsclass->clean_perm_string($this->ipsclass->member['mgroup_others']);\n\t\t\t\t\t\n\t\t\t\t\t$mgroup_others = explode( \",\", $this->ipsclass->member['mgroup_others'] );\n\t\t\t\t\t\n\t\t\t\t\tif( count($mgroup_others) )\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach( $mgroup_others as $mgroup )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif( $mgroup )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$member_permission_groups = array_merge( $member_permission_groups, explode( \",\", $this->ipsclass->clean_perm_string( $this->ipsclass->cache['group_cache'][$mgroup]['g_perm_id'] ) ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ( is_array($this->ipsclass->cache['calendar']) AND count( $this->ipsclass->cache['calendar'] ) )\n\t\t\t{\n\t\t\t\tforeach( $this->ipsclass->cache['calendar'] as $u )\n\t\t\t\t{\n\t\t\t\t\t$set_offset = 0;\n\n\t\t\t\t\tif( $u['event_timeset'] && !($u['event_recurring'] == 0 AND $u['event_unix_to']) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$set_offset = isset($this->ipsclass->member['time_offset']) ? $this->ipsclass->member['time_offset'] * 3600 : 0;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$u['_unix_from'] = $u['event_unix_from'] - $set_offset;\n\t\t\t\t\t$u['_unix_to'] = $u['event_unix_to'] - $set_offset;\n\t\t\t\t\t\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// Private?\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t\n\t\t\t\t\tif ( $u['event_private'] == 1 and $this->ipsclass->member['id'] != $u['event_member_id'] )\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// Got perms?\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t\n\t\t\t\t\tif ( $u['event_perms'] != \"*\" )\n\t\t\t\t\t{\n\t\t\t\t\t\t$event_perms = explode( \",\", $this->ipsclass->clean_perm_string( $u['event_perms'] ) );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$check = 0;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( count($event_perms) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach( $event_perms as $mgroup_perm )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif( in_array( $mgroup_perm, $member_permission_groups ) )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$check = 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( !$check )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// Got calendar perms?\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t\n\t\t\t\t\tif ( $u['_perm_read'] != \"*\" )\n\t\t\t\t\t{\n\t\t\t\t\t\t$read_perms = explode( \",\", $this->ipsclass->clean_perm_string( $u['_perm_read'] ) );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$check = 0;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( count($read_perms) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach( $read_perms as $mgroup_perm )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif( in_array( $mgroup_perm, $member_permission_groups ) )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$check = 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( !$check )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontinue;\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\t// In range?\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t\tif ( $u['event_recurring'] == 0 AND ( ( $u['event_unix_to'] >= $our_unix AND $u['event_unix_from'] <= $max_date )\n\t\t\t\t\t\tOR ( $u['event_unix_to'] == 0 AND $u['event_unix_from'] >= $our_unix AND $u['event_unix_from'] <= $max_date ) ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$u['event_activetime'] = $u['_unix_from'];\n\t\t\t\t\t\t$events[ str_pad( $u['event_unix_from'].$u['event_id'], 15, \"0\" ) ] = $u;\n\t\t\t\t\t}\n\t\t\t\t\telseif( $u['event_recurring'] > 0 )\n\t\t\t\t\t{\n\t\t\t\t\t\t$cust_range_s = $u['event_unix_from'];\n\n\t\t\t\t\t\twhile( $cust_range_s < $u['event_unix_to'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif( $cust_range_s >= $our_unix AND $cust_range_s <= $max_date )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$u['event_activetime'] = $cust_range_s;\n\t\t\t\t\t\t\t\t$events[ str_pad( $cust_range_s.$u['event_id'], 15, \"0\" ) ] = $u;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif( $u['event_recurring'] == \"1\" )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$cust_range_s += 604800;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telseif ( $u['event_recurring'] == \"2\" )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$cust_range_s += 18144000;\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$cust_range_s += 31536000;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Print...\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\tksort($events);\n\t\t\t\n\t\t\tforeach( $events as $event )\n\t\t\t{\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Recurring?\n\t\t\t\t//-----------------------------------------\n\n\t\t\t\t$c_time = '';\n\t\t\t\t$c_time = gmdate( 'j-F-y', $event['event_activetime'] );\n\t\t\t\t\n\t\t\t\t$show_events[] = \"<a href='{$this->ipsclass->base_url}act=calendar&amp;code=showevent&amp;calendar_id={$event['event_calendar_id']}&amp;event_id={$event['event_id']}' title='$c_time'>\".$event['event_title'].\"</a>\";\n\t\t\t}\n\t\t\t\n\t\t\t$this->ipsclass->lang['calender_f_title'] = sprintf( $this->ipsclass->lang['calender_f_title'], $this->ipsclass->vars['calendar_limit'] );\n\t\t\t\n\t\t\tif ( count($show_events) > 0 )\n\t\t\t{\n\t\t\t\t$event_string = implode( $this->sep_char.' ', $show_events );\n\t\t\t\t$stats_html .= $this->ipsclass->compiled_templates['skin_boards']->calendar_events( $event_string );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ( ! $this->ipsclass->vars['autohide_calendar'] )\n\t\t\t\t{\n\t\t\t\t\t$event_string = $this->ipsclass->lang['no_calendar_events'];\n\t\t\t\t\t$stats_html .= $this->ipsclass->compiled_templates['skin_boards']->calendar_events( $event_string );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\treturn $stats_html;\n\t\n\t}", "public function getDayEvents($date){\n\t\t$object = $this->events_ob;\n\t\t$event = new $object();\n\t\t$events = array();\n\t\t\n\t\t# Get Non-Reoccurring events\n\t\t$query = \"WHERE `start_date` = '\".$date.\"' AND `repeating` = '0' AND `active` = '1'\";\n\t\t$events = array_merge($events, $event->fetchQuery($query));\n\t\t\n\t\t# Get Reoccurring events\n\t\t# Get Events that Reoccur on a daily basis\n\t\t$query = \"WHERE `repeating` = '1' AND `start_date` <= '\".$date.\"' AND (`repeat_end` >= '\".$date.\"' OR `repeat_end` = '0000-00-00') AND `repeat_type` = 'daily' AND `repeat_every` <> 0 AND MOD(TIMESTAMPDIFF(DAY, `start_date`, '\".$date.\"'), `repeat_every`) = 0 AND `active` = '1'\";\n\t\t$events = array_merge($events, $event->fetchQuery($query));\n\t\t\n\t\t# Get Events that Reoccur on a weekly basis\n\t\t$query = \"WHERE `repeating` = '1' AND `start_date` <= '\".$date.\"' AND (`repeat_end` >= '\".$date.\"' OR `repeat_end` = '0000-00-00') AND `repeat_type` = 'weekly' AND `repeat_wednesday` = '1' AND `repeat_every` <> 0 AND MOD(TIMESTAMPDIFF(WEEK, `start_date`, '\".$date.\"'), `repeat_every`) = 0 AND `active` = '1'\";\n\t\t$events = array_merge($events, $event->fetchQuery($query));\n\t\t\n\t\t# Get Events that Reoccur on a monthly basis\n\t\t$query = \"WHERE `repeating` = '1' AND `start_date` <= '\".$date.\"' AND (`repeat_end` >= '\".$date.\"' OR `repeat_end` = '0000-00-00') AND `repeat_type` = 'monthly' AND ((`repeat_by` = 'day_of_month' AND DAY(`start_date`) = '16') OR (`repeat_by` = 'day_of_week' AND DAYOFWEEK(`start_date`) = '4' AND MOD((TIMESTAMPDIFF(WEEK, '2017-08-01', '\".$date.\"')+1), `repeat_every`) = 0)) AND `repeat_every` <> 0 AND `active` = '1'\";\n\t\t$events = array_merge($events, $event->fetchQuery($query));\n\t\t\n\t\t# Get Events that Reoccur on a yearly basis\n\t\t$query = \"WHERE `repeating` = '1' AND `start_date` <= '\".$date.\"' AND (`repeat_end` >= '\".$date.\"' OR `repeat_end` = '0000-00-00') AND `repeat_type` = 'yearly' AND DAY(`start_date`) = '16' AND MONTH(`start_date`) = '8' AND `repeat_every` <> 0 AND MOD(TIMESTAMPDIFF(YEAR, `start_date`, '\".$date.\"'), `repeat_every`) = 0 AND `active` = '1'\";\n\t\t$events = array_merge($events, $event->fetchQuery($query));\n\t\t\n\t\treturn $events;\n\t}", "function monthCreator($from,$to){\n\n$month='';\nforeach (h_many_M($from,$to) as $i) {\n\n$d = DateTime::createFromFormat('!m', $i);\n$m = $d->format('F').' '.$i;\n\n $month.=' \n<th class=\"planning_head_month\" colspan=\"28\">'.$m.'</th>\n ';\n}\necho $month;\n}", "function getCalendarsForAdmin() {\n //\n // http://dev4.krubner.com/admin.php?page=admin_calendar\n //\n // this brings back 2 months worth of days to show in a calendar\n\n global $controller; \n\n $today = new DateTime(date('Y-m-d'));\n\n //Get Calendar for this week\n if(!isset($_GET['ym'])){\n $top_month = date('Y-m');\n } else {\n $top_month = $_GET['ym'];\n }\n\n $firstDayOfMonthDateTime = new DateTime($top_month.\"-01\");\n $lastDayOfMonthDateTime = clone $firstDayOfMonthDateTime;\n $lastDayOfMonthDateTime->modify(\"+1 month\");\n $lastDayOfMonthDateTime->modify(\"-1 day\");\n\n $arrayOfDaysForThisMonth = array();\n $arrayOfDaysForThisMonth = $controller->command(\"loadAllNights\", $firstDayOfMonthDateTime, $lastDayOfMonthDateTime); \n\n $calendars = array();\n $calendars[$top_month] = $arrayOfDaysForThisMonth;\n\n $firstDayOfMonthDateTime2 = clone $firstDayOfMonthDateTime;\n $firstDayOfMonthDateTime2->modify(\"+1 month\");\n $lastDayOfMonthDateTime2 = clone $firstDayOfMonthDateTime2;\n $lastDayOfMonthDateTime2->modify(\"+1 month\");\n $lastDayOfMonthDateTime2->modify(\"-1 day\");\n\n $arrayOfDaysForThisMonth = array();\n $arrayOfDaysForThisMonth = $controller->command(\"loadAllNights\", $firstDayOfMonthDateTime2, $lastDayOfMonthDateTime2); \n\n $calendars[$lastDayOfMonthDateTime2->format('Y-m')] = $arrayOfDaysForThisMonth;\n\n return $calendars; \n}", "function allDays($month,$day,$con,$prodID){\n\t\t$m1 = date(\"m\",strtotime($month));\n\t\t$m2 = date(\"m\",strtotime(\"now\"));\n\t\t$year = \"\";\n\t\tif($m2>$m1){\n\t\t\t\n\t\t\t$year = date(\"Y\",strtotime(\"now +1 year\"));\n\t\t}\n\n $last = strtotime(\"last $day of $month $year\");\n $first = strtotime(\"first $day of $month $year\");\n $week = 0;\n for ($i=$first; $i < $last; ) {\n $i=strtotime(\"first $day of $month $year +$week week\");\n $ed = date(\"D M d Y\",$i);\n $checkReserved = $con->prepare(\"SELECT * FROM tbl_reserved WHERE prodID ='$prodID' AND EventDate = '$ed' \");\n $checkReserved->execute();\n $cr = $checkReserved->fetch(); \n if(!$cr){\n if(strtotime(\"now\") >= strtotime(date(\"M d Y\",$i))){\n echo \"<option>\".date(\"M d Y\",strtotime(date(\"M d Y\",$i).\" +1 year\")).\"</option>\";\n }else{\n echo \"<option>\".date(\"M d Y\",$i).\"</option>\";\n }\n \n }\n \n $week++;\n }\n }", "public function render(Carbon $date, $bookings)\n { \n $html = ''; \n \n // Determine the total days in the month\n $total_days = $date->daysInMonth;\n \n // Set the starting day number\n $day = $this->start_day + 1 - $date->startOfMonth()->dayOfWeek;\n\n while ($day > 1)\n {\n $day -= 7;\n }\n \n $html .= '<table id=\"'.$date->format('F').'\">';\n $html .= '<thead><tr><th colspan=\"7\">'.$date->format('F').'</th></tr>';\n \n $html .= '<tr><th>Mo</th><th>Tu</th><th>We</th><th>Th</th><th>Fr</th><th>Sa</th><th>Su</th></tr></thead>';\n \n $bookings = $this->parseBookings($bookings, $date);\n $first_night = true;\n \n while ($day <= $total_days)\n {\n $html .='<tr>';\n for($i=0;$i<7;$i++)\n { \n if($day > 0 && $day <= $total_days)\n {\n $date->day($day); // set Carbon's date\n $html_classes = array();\n $bookable = true; // default\n \n // is in the past, is today, is weekend and is start day\n if($date->lt(Carbon::now()->startOfDay())) \n $html_classes[] = 'past';\n else\n {\n if($date->isToday()) $html_classes[] = 'today';\n if($date->isWeekend()) $html_classes[] = 'weekend';\n if(in_array($date->dayOfWeek, $this->arrival_days)) $html_classes['changeover'] = 'changeover'; \n }\n \n // is booked\n if(in_array($date, $bookings)) \n {\n $bookable = false;\n $html_classes[] = 'booked';\n \n if($first_night) \n {\n $html_classes[] = 'first_night';\n $bookable = true; // can be a departure day\n }\n else\n {\n // mid week arrival date: get rid\n unset($html_classes['changeover']);\n }\n $first_night = false;\n }\n else\n {\n $first_night = true;\n }\n \n $html .= '<td class=\"'. implode(' ', $html_classes).'\" ';\n $html .= ($bookable) ? ' data-date=\"'.$date->format('Y-m-d').'\"' : '';\n $html .= '>'.$date->format('j').'</td>';\n }\n else\n {\n $html .= '<td class=\"calday_empty\">&nbsp;</td>';\n }\n \n $day++;\n }\n $html .='</tr>';\n }\n \n \n $html .= '</tbody><tfoot></tfoot></table>';\n return $html;\n }", "function print_body($link)\n{\n\t$SHOW_MONTHS=24;\n\techo '<body>';\n\techo '<table width=\"1080\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" id=\"main_table\" class=\"main_table\">';\n\techo ' <tr>';\n\techo ' <td width=\"90%\" height=\"25\" align=\"left\" valign=\"top\">';\n\tprint_banner();\n \techo ' </td></tr>';\n \techo ' <tr><td width=\"81%\" valign=\"top\" align=\"center\">';\n \tif (empty($_SESSION['page'])||$_SESSION['page']==\"\")\n \t{\n echo print_events($link,'next');\n \t\techo '<br>';\n \t}\n \telseif ($_SESSION['page']==\"families\")\n \t{\n echo family_table($link);\n \t\techo '<br>';\n \t}\n \telseif ($_SESSION['page']==\"next\")\n \t{\n echo print_events($link,'next');\n echo '<br>';\n \t}\n \telseif ($_SESSION['page']==\"RSVP\")\n \t{\n echo print_events($link,'next');\n echo '<table><tr align=\"center\"><td valign=\"top\">';\n echo add_attendance($link);\n echo '</td><td width=\"30%\"></td><td valign=\"top\">';\n echo bringing($link);\n echo '</td></tr></table>';\n \t}\n \telseif ($_SESSION['page']==\"managefam\")\n \t{\n \t\techo '<table><tr align=\"center\"><td>';\n \t\techo family_addnew($link);\n \t\techo '</td></tr><tr><td>';\n \t\techo member_addnew($link);\n \t\techo '</td></tr></table>';\n \t}\n \telseif ($_SESSION['page']==\"manageev\")\n {\n $sql = \"select * from (select e.event_id,f.family_id,f.name,d.month,d.day,d.year,str_to_date(concat(concat(month,'/',greatest(day,1)),'/',year),'%m/%d/%Y') dt from date d join event e on d.date_id=e.date_id join family f on f.family_id=e.family_id where e.cancel=0) as a where a.dt>curdate() and a.family_id=\".$_SESSION['family_id'].' limit 1';\n logger($link,$sql);\n $data = mysqli_query($link,$sql);\n if (mysqli_num_rows($data)<1)\n {\n echo '<h3>You have no upcoming events</h3>';\n }\n else\n {\n echo print_events($link,'nextfam');\n echo '<table><tr align=\"center\"><td>';\n echo set_event($link);\n echo '</td></tr><tr><td align=\"center\">';\n echo add_food_to_event($link);\n echo '</td></tr></table>';\n \t\t}\n \t}\n \telseif ($_SESSION['page']==\"upcoming\")\n \t{\n echo print_events($link,'upcoming');\n \t}\n \telseif ($_SESSION['page']==\"selectev\")\n \t{\n echo select_event($link);\n \t}\n \telseif ($_SESSION['page']==\"account\")\n \t{\n echo update_account($link);\n \t}\n \techo ' </td>';\n \techo ' <td>';\n \techo draw_calendar($link,date('n'),date('Y'),$SHOW_MONTHS);\n \techo '</td></tr></table>';\n \techo '</body>';\n}", "private function getDatesInMonth() {\n $viewer = $this->getViewer();\n\n $timezone = new DateTimeZone($viewer->getTimezoneIdentifier());\n\n $month = $this->month;\n $year = $this->year;\n\n list($next_year, $next_month) = $this->getNextYearAndMonth();\n\n $end_date = new DateTime(\"{$next_year}-{$next_month}-01\", $timezone);\n\n list($start_of_week, $end_of_week) = $this->getWeekStartAndEnd();\n\n $days_in_month = id(clone $end_date)->modify('-1 day')->format('d');\n\n $first_month_day_date = new DateTime(\"{$year}-{$month}-01\", $timezone);\n $last_month_day_date = id(clone $end_date)->modify('-1 day');\n\n $first_weekday_of_month = $first_month_day_date->format('w');\n $last_weekday_of_month = $last_month_day_date->format('w');\n\n $day_date = id(clone $first_month_day_date);\n\n $num_days_display = $days_in_month;\n if ($start_of_week !== $first_weekday_of_month) {\n $interim_start_num = ($first_weekday_of_month + 7 - $start_of_week) % 7;\n $num_days_display += $interim_start_num;\n\n $day_date->modify('-'.$interim_start_num.' days');\n }\n if ($end_of_week !== $last_weekday_of_month) {\n $interim_end_day_num = ($end_of_week - $last_weekday_of_month + 7) % 7;\n $num_days_display += $interim_end_day_num;\n $end_date->modify('+'.$interim_end_day_num.' days');\n }\n\n $days = array();\n\n for ($day = 1; $day <= $num_days_display; $day++) {\n $day_epoch = $day_date->format('U');\n $end_epoch = $end_date->format('U');\n if ($day_epoch >= $end_epoch) {\n break;\n } else {\n $days[] = clone $day_date;\n }\n $day_date->modify('+1 day');\n }\n\n return $days;\n }", "public function actionCalendar()\n {\n // Get current ID of logined user\n $userId = Yii::$app->user->getId() ?: '1000';\n $profile = (new UsersProfile())->getProfile();\n\n // Fill array keyes with [1, .., date(\"t\")].\n // date(\"t\") - count of days in current month\n $calendar = array_fill_keys(range(1, date(\"t\")), []);\n $model = new TaskQuery(Task::class);\n\n foreach ($model->getByCurrentMonth($userId)->all() as $task) {\n // Get current $task->date and create new DateTime object\n // $date->format(\"j\") -- Day of the month: 1, 2, .., 31\n // Fill array $calender with $task objects\n $date = \\DateTime::createFromFormat(\"Y-m-d H:i:s\", $task->deadline);\n $calendar[$date->format(\"j\")][] = $task;\n }\n\n return $this->render('calendar', \\compact('calendar', 'profile'));\n }", "public function actionMonthData()\n {\n $this->requireAjaxRequest();\n $this->requirePostRequest();\n\n $dateRangeStart = craft()->request->getPost('dateRangeStart');\n $dateRangeEnd = craft()->request->getPost('dateRangeEnd');\n $calendars = craft()->request->getPost('calendars', null);\n $nonEditable = craft()->request->getPost('nonEditable');\n $locale = craft()->request->getPost('locale', null);\n\n $criteria = array(\n 'dateRangeStart' => $dateRangeStart,\n 'dateRangeEnd' => $dateRangeEnd,\n );\n\n $calendarIds = null;\n if ($calendars) {\n if ($calendars !== '*') {\n $criteria['calendarId'] = explode(',', $calendars);\n }\n } else if (null !== $calendars) {\n $criteria['calendarId'] = -1;\n }\n\n /** @var Calendar_EventsService $eventsService */\n $eventsService = craft()->calendar_events;\n\n if (craft()->isLocalized()) {\n $criteria['locale'] = $locale ?: craft()->language;\n }\n\n // Check settings if disabled events should be shown\n\n /** @var Calendar_SettingsService $settings */\n $settings = craft()->calendar_settings;\n if ($settings->showDisabledEvents()) {\n $criteria['status'] = null;\n }\n\n $eventList = $eventsService->getEventList($criteria);\n $simpleEvents = $eventList->getEventsAsSimpleObject();\n\n if ($nonEditable) {\n foreach ($simpleEvents as $event) {\n $event->editable = false;\n }\n }\n\n $this->returnJson($simpleEvents);\n }", "function show_day_events2($username, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint=0, $maxnbofchar=16, $newparam='', $showinfo=0, $minheight=60, $showheader=false, $colorsbytype=array(), $var=false)\n{\n\tglobal $db;\n\tglobal $user, $conf, $langs, $hookmanager, $action;\n\tglobal $filter, $filtert, $status, $actioncode;\t// Filters used into search form\n\tglobal $theme_datacolor;\t// Array with a list of different we can use (come from theme)\n\tglobal $cachethirdparties, $cachecontacts, $colorindexused;\n\tglobal $begin_h, $end_h;\n\n\t$cases1 = array();\t// Color first half hour\n\t$cases2 = array(); // Color second half hour\n\n\t$curtime = dol_mktime(0, 0, 0, $month, $day, $year);\n\n\t$i=0; $nummytasks=0; $numother=0; $numbirthday=0; $numical=0; $numicals=array();\n\t$ymd=sprintf(\"%04d\",$year).sprintf(\"%02d\",$month).sprintf(\"%02d\",$day);\n\n\t$nextindextouse=count($colorindexused);\t// At first run, this is 0, so fist user has 0, next 1, ...\n\t//if ($username->id && $day==1) var_dump($eventarray);\n\n\t// We are in a particular day for $username, now we scan all events\n\tforeach ($eventarray as $daykey => $notused)\n\t{\n\t\t$annee = date('Y',$daykey);\n\t\t$mois = date('m',$daykey);\n\t\t$jour = date('d',$daykey);\n\t\t//print $annee.'-'.$mois.'-'.$jour.' '.$year.'-'.$month.'-'.$day.\"<br>\\n\";\n\n\t\tif ($day==$jour && $month==$mois && $year==$annee)\t// Is it the day we are looking for when calling function ?\n\t\t{\n\t\t\t// Scan all event for this date\n\t\t\tforeach ($eventarray[$daykey] as $index => $event)\n\t\t\t{\n\t\t\t\t//var_dump($event);\n\n\t\t\t\t$keysofuserassigned=array_keys($event->userassigned);\n\t\t\t\tif (! in_array($username->id,$keysofuserassigned)) continue;\t// We discard record if event is from another user than user we want to show\n\t\t\t\t//if ($username->id != $event->userownerid) continue;\t// We discard record if event is from another user than user we want to show\n\n\t\t\t\t$parameters=array();\n\t\t\t\t$reshook=$hookmanager->executeHooks('formatEvent',$parameters,$event,$action); // Note that $action and $object may have been modified by some hooks\n\t\t\t\tif ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');\n\n\t\t\t\t$ponct=($event->date_start_in_calendar == $event->date_end_in_calendar);\n\n\t\t\t\t// Define $color (Hex string like '0088FF') and $cssclass of event\n\t\t\t\t$color=-1; $cssclass=''; $colorindex=-1;\n\t\t\t\tif (in_array($user->id, $keysofuserassigned))\n\t\t\t\t{\n\t\t\t\t\t$nummytasks++; $cssclass='family_mytasks';\n\t\t\t\t\tif (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) $color=$event->type_color;\n\t\t\t\t}\n\t\t\t\telse if ($event->type_code == 'ICALEVENT')\n\t\t\t\t{\n\t\t\t\t\t$numical++;\n\t\t\t\t\tif (! empty($event->icalname))\n\t\t\t\t\t{\n\t\t\t\t\t\tif (! isset($numicals[dol_string_nospecial($event->icalname)])) {\n\t\t\t\t\t\t\t$numicals[dol_string_nospecial($event->icalname)] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$numicals[dol_string_nospecial($event->icalname)]++;\n\t\t\t\t\t}\n\n\t\t\t\t\t$color=$event->icalcolor;\n\t\t\t\t\t$cssclass=(! empty($event->icalname)?'family_ext'.md5($event->icalname):'family_other unsortable');\n\t\t\t\t}\n\t\t\t\telse if ($event->type_code == 'BIRTHDAY')\n\t\t\t\t{\n\t\t\t\t\t$numbirthday++; $colorindex=2; $cssclass='family_birthday unsortable'; $color=sprintf(\"%02x%02x%02x\",$theme_datacolor[$colorindex][0],$theme_datacolor[$colorindex][1],$theme_datacolor[$colorindex][2]);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$numother++; $cssclass='family_other';\n\t\t\t\t\tif (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) $color=$event->type_color;\n\t\t\t\t}\n\n\t\t\t\tif ($color < 0)\t// Color was not forced. Set color according to color index.\n\t\t\t\t{\n\t\t\t\t\t// Define color index if not yet defined\n\t\t\t\t\t$idusertouse=($event->userownerid?$event->userownerid:0);\n\t\t\t\t\tif (isset($colorindexused[$idusertouse]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$colorindex=$colorindexused[$idusertouse];\t// Color already assigned to this user\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$colorindex=$nextindextouse;\n\t\t\t\t\t\t$colorindexused[$idusertouse]=$colorindex;\n\t\t\t\t\t\tif (! empty($theme_datacolor[$nextindextouse+1])) $nextindextouse++;\t// Prepare to use next color\n\t\t\t\t\t}\n\t\t\t\t\t// Define color\n\t\t\t\t\t$color=sprintf(\"%02x%02x%02x\",$theme_datacolor[$colorindex][0],$theme_datacolor[$colorindex][1],$theme_datacolor[$colorindex][2]);\n\t\t\t\t}\n\t\t\t\t//$cssclass=$cssclass.' '.$cssclass.'_day_'.$ymd;\n\n\t\t\t\t// Define all rects with event (cases1 is first half hour, cases2 is second half hour)\n\t\t\t\tfor ($h = $begin_h; $h < $end_h; $h++)\n\t\t\t\t{\n\t\t\t\t\t//if ($username->id == 1 && $day==1) print 'h='.$h;\n\t\t\t\t\t$newcolor = ''; //init\n\t\t\t\t\tif (empty($event->fulldayevent))\n\t\t\t\t\t{\n\t\t\t\t\t\t$a = dol_mktime((int) $h,0,0,$month,$day,$year,false,0);\n\t\t\t\t\t\t$b = dol_mktime((int) $h,30,0,$month,$day,$year,false,0);\n\t\t\t\t\t\t$c = dol_mktime((int) $h+1,0,0,$month,$day,$year,false,0);\n\n\t\t\t\t\t\t$dateendtouse=$event->date_end_in_calendar;\n\t\t\t\t\t\tif ($dateendtouse==$event->date_start_in_calendar) $dateendtouse++;\n\n\t\t\t\t\t\t//print dol_print_date($event->date_start_in_calendar,'dayhour').'-'.dol_print_date($a,'dayhour').'-'.dol_print_date($b,'dayhour').'<br>';\n\n\t\t\t\t\t\tif ($event->date_start_in_calendar < $b && $dateendtouse > $a)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$busy=$event->transparency;\n\t\t\t\t\t\t\t$cases1[$h][$event->id]['busy']=$busy;\n\t\t\t\t\t\t\t$cases1[$h][$event->id]['string']=dol_print_date($event->date_start_in_calendar,'dayhour');\n\t\t if ($event->date_end_in_calendar && $event->date_end_in_calendar != $event->date_start_in_calendar)\n\t\t\t \t\t{\n\t\t\t\t \t\t$tmpa=dol_getdate($event->date_start_in_calendar,true);\n\t\t\t\t \t\t$tmpb=dol_getdate($event->date_end_in_calendar,true);\n\t\t\t\t \t\tif ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) $cases1[$h][$event->id]['string'].='-'.dol_print_date($event->date_end_in_calendar,'hour');\n\t\t\t\t \t\telse $cases1[$h][$event->id]['string'].='-'.dol_print_date($event->date_end_in_calendar,'dayhour');\n\t\t\t \t\t}\n\t\t\t\t\t\t\t$cases1[$h][$event->id]['string'].=' - '.$event->label;\n\t\t\t\t\t\t\t$cases1[$h][$event->id]['typecode']=$event->type_code;\n\t\t\t\t\t\t\tif ($event->socid)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//$cases1[$h][$event->id]['string'].='xxx';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$cases1[$h][$event->id]['color']=$color;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($event->date_start_in_calendar < $c && $dateendtouse > $b)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$busy=$event->transparency;\n\t\t\t\t\t\t\t$cases2[$h][$event->id]['busy']=$busy;\n\t\t\t\t\t\t\t$cases2[$h][$event->id]['string']=dol_print_date($event->date_start_in_calendar,'dayhour');\n\t\t\t\t\t\t\tif ($event->date_end_in_calendar && $event->date_end_in_calendar != $event->date_start_in_calendar)\n\t\t\t \t\t{\n\t\t\t\t \t\t$tmpa=dol_getdate($event->date_start_in_calendar,true);\n\t\t\t\t \t\t$tmpb=dol_getdate($event->date_end_in_calendar,true);\n\t\t\t\t \t\tif ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) $cases2[$h][$event->id]['string'].='-'.dol_print_date($event->date_end_in_calendar,'hour');\n\t\t\t\t \t\telse $cases2[$h][$event->id]['string'].='-'.dol_print_date($event->date_end_in_calendar,'dayhour');\n\t\t\t \t\t}\n\t\t\t\t\t\t\t$cases2[$h][$event->id]['string'].=' - '.$event->label;\n\t\t\t\t\t\t\t$cases2[$h][$event->id]['typecode']=$event->type_code;\n\t\t\t\t\t\t\tif ($event->socid)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//$cases2[$h][$event->id]['string'].='xxx';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$cases2[$h][$event->id]['color']=$color;\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$busy=$event->transparency;\n\t\t\t\t\t\t$cases1[$h][$event->id]['busy']=$busy;\n\t\t\t\t\t\t$cases2[$h][$event->id]['busy']=$busy;\n\t\t\t\t\t\t$cases1[$h][$event->id]['string']=$event->label;\n\t\t\t\t\t\t$cases2[$h][$event->id]['string']=$event->label;\n\t\t\t\t\t\t$cases1[$h][$event->id]['typecode']=$event->type_code;\n\t\t\t\t\t\t$cases2[$h][$event->id]['typecode']=$event->type_code;\n\t\t\t\t\t\t$cases1[$h][$event->id]['color']=$color;\n\t\t\t\t\t\t$cases2[$h][$event->id]['color']=$color;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$i++;\n\t\t\t}\n\n\t\t\tbreak;\t// We found the date we were looking for. No need to search anymore.\n\t\t}\n\t}\n\n\tfor ($h = $begin_h; $h < $end_h; $h++)\n\t{\n\t\t$color1='';$color2='';\n\t\t$style1='';$style2='';\n\t\t$string1='&nbsp;';$string2='&nbsp;';\n\t\t$title1='';$title2='';\n\t\tif (isset($cases1[$h]) && $cases1[$h] != '')\n\t\t{\n\t\t\t//$title1.=count($cases1[$h]).' '.(count($cases1[$h])==1?$langs->trans(\"Event\"):$langs->trans(\"Events\"));\n\t\t\tif (count($cases1[$h]) > 1) $title1.=count($cases1[$h]).' '.(count($cases1[$h])==1?$langs->trans(\"Event\"):$langs->trans(\"Events\"));\n\t\t\t$string1='&nbsp;';\n\t\t\tif (empty($conf->global->AGENDA_NO_TRANSPARENT_ON_NOT_BUSY)) $style1='peruser_notbusy';\n\t\t\telse $style1='peruser_busy';\n\t\t\tforeach($cases1[$h] as $id => $ev)\n\t\t\t{\n\t\t\t\tif ($ev['busy']) $style1='peruser_busy';\n\t\t\t}\n\t\t}\n\t\tif (isset($cases2[$h]) && $cases2[$h] != '')\n\t\t{\n\t\t\t//$title2.=count($cases2[$h]).' '.(count($cases2[$h])==1?$langs->trans(\"Event\"):$langs->trans(\"Events\"));\n\t\t\tif (count($cases2[$h]) > 1) $title2.=count($cases2[$h]).' '.(count($cases2[$h])==1?$langs->trans(\"Event\"):$langs->trans(\"Events\"));\n\t\t\t$string2='&nbsp;';\n\t\t\tif (empty($conf->global->AGENDA_NO_TRANSPARENT_ON_NOT_BUSY)) $style2='peruser_notbusy';\n\t\t\telse $style2='peruser_busy';\n\t\t\tforeach($cases2[$h] as $id => $ev)\n\t\t\t{\n\t\t\t\tif ($ev['busy']) $style2='peruser_busy';\n\t\t\t}\n\t\t}\n\n\t\t$ids1='';$ids2='';\n\t\tif (count($cases1[$h]) && array_keys($cases1[$h])) $ids1=join(',',array_keys($cases1[$h]));\n\t\tif (count($cases2[$h]) && array_keys($cases2[$h])) $ids2=join(',',array_keys($cases2[$h]));\n\n\t\tif ($h == $begin_h) echo '<td class=\"'.$style.'_peruserleft cal_peruser'.($var?' cal_impair '.$style.'_impair':'').'\">';\n\t\telse echo '<td class=\"'.$style.' cal_peruser'.($var?' cal_impair '.$style.'_impair':'').'\">';\n\t\tif (count($cases1[$h]) == 1)\t// only 1 event\n\t\t{\n\t\t\t$output = array_slice($cases1[$h], 0, 1);\n\t\t\t$title1=$langs->trans(\"Ref\").' '.$ids1.($title1?' - '.$title1:'');\n\t\t\tif ($output[0]['string']) $title1.=($title1?' - ':'').$output[0]['string'];\n\t\t\tif ($output[0]['color']) $color1 = $output[0]['color'];\n\t\t}\n\t\telse if (count($cases1[$h]) > 1)\n\t\t{\n\t\t\t$title1=$langs->trans(\"Ref\").' '.$ids1.($title1?' - '.$title1:'');\n\t\t\t$color1='222222';\n\t\t}\n\n\t\tif (count($cases2[$h]) == 1)\t// only 1 event\n\t\t{\n\t\t\t$output = array_slice($cases2[$h], 0, 1);\n\t\t\t$title2=$langs->trans(\"Ref\").' '.$ids2.($title2?' - '.$title2:'');\n\t\t\tif ($output[0]['string']) $title2.=($title2?' - ':'').$output[0]['string'];\n\t\t\tif ($output[0]['color']) $color2 = $output[0]['color'];\n\t\t}\n\t\telse if (count($cases2[$h]) > 1)\n\t\t{\n\t\t\t$title2=$langs->trans(\"Ref\").' '.$ids2.($title2?' - '.$title2:'');\n\t\t\t$color2='222222';\n\t\t}\n\t\tprint '<table class=\"nobordernopadding\" width=\"100%\">';\n\t\tprint '<tr><td '.($color1?'style=\"background: #'.$color1.';\"':'').'class=\"'.($style1?$style1.' ':'').'onclickopenref'.($title1?' cursorpointer':'').'\" ref=\"ref_'.$username->id.'_'.sprintf(\"%04d\",$year).'_'.sprintf(\"%02d\",$month).'_'.sprintf(\"%02d\",$day).'_'.sprintf(\"%02d\",$h).'_00_'.($ids1?$ids1:'none').'\"'.($title1?' title=\"'.$title1.'\"':'').'>';\n\t\tprint $string1;\n\t\tprint '</td><td '.($color2?'style=\"background: #'.$color2.';\"':'').'class=\"'.($style2?$style2.' ':'').'onclickopenref'.($title1?' cursorpointer':'').'\" ref=\"ref_'.$username->id.'_'.sprintf(\"%04d\",$year).'_'.sprintf(\"%02d\",$month).'_'.sprintf(\"%02d\",$day).'_'.sprintf(\"%02d\",$h).'_30_'.($ids2?$ids2:'none').'\"'.($title2?' title=\"'.$title2.'\"':'').'>';\n\t\tprint $string2;\n\t\tprint '</td></tr>';\n\t\tprint '</table>';\n\t\tprint '</td>';\n\t}\n}", "public function buildCalendarScripts(){\n\t\tob_start();?>\n \t<script>\n\t\t\t\t\n\t\t\t\t//on calendar cell click \n\t\t\t\t$(document).on('click', '.calendar_cell', function(e){\n\t\t\t\t\tif( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {\n\t\t\t\t\t\tvar fullDate = $(this).attr('id');\n\t\t\t\t\t\t\n\t\t\t\t\t\t$.ajax({\n\t\t\t\t\t\t url:'<?php echo $this->ajax_file; ?>',\n\t\t\t\t\t\t data:{action:'get_events', date: fullDate},\n\t\t\t\t\t\t async:false,\n\t\t\t\t\t\t success:function(data, textStatus, jqXHR) {\n\t\t\t\t\t\t\t if (data) {\n\t\t\t\t\t\t\t\t $('#day_events').replaceWith(data);\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t }\n\t\t\t\t\t\t});\t\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t//on view as calendar click\n\t\t\t\t$(document).on('click', '.view_as_calendar', function(e){\n\t\t\t\t\t$.ajax({\n\t\t\t\t\t url:'<?php echo $this->ajax_file; ?>',\n\t\t\t\t\t data:{action:'get_calendar'},\n\t\t\t\t\t async:false,\n\t\t\t\t\t success:function(data, textStatus, jqXHR) {\n\t\t\t\t\t\t if (data) {\n\t\t\t\t\t\t\t $('#events_calendar').replaceWith(data);\n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t\t});\t\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t//on view as list click\n\t\t\t\t$(document).on('click', '.view_as_list', function(e){\n\t\t\t\t\t$.ajax({\n\t\t\t\t\t url:'<?php echo $this->ajax_file; ?>',\n\t\t\t\t\t data:{action:'get_calendar_list'},\n\t\t\t\t\t async:false,\n\t\t\t\t\t success:function(data, textStatus, jqXHR) {\n\t\t\t\t\t\t if (data) {\n\t\t\t\t\t\t\t $('#day_events').html('');\n\t\t\t\t\t\t\t $('#events_calendar').replaceWith(data);\n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t\t});\t\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t//on previous month link click\n\t\t\t\t$(document).on('click', '.prev_month_link', function(e) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\n\t\t\t\t\tgetCalendar('previous');\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t//on next month link click\n\t\t\t\t$(document).on('click', '.next_month_link', function(e) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\n\t\t\t\t\tgetCalendar('next');\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\tfunction getCalendar(direction){\n\t\t\t\t\t$('.loading').show();\n\t\t\t\t\t$.ajax({\n\t\t\t\t\t url:'<?php echo $this->ajax_file; ?>',\n\t\t\t\t\t data:{action:'get_month',direction: direction},\n\t\t\t\t\t async:false,\n\t\t\t\t\t success:function(data, textStatus, jqXHR) {\n\t\t\t\t\t\t if (data) {\n\t\t\t\t\t\t\t $('.loading').delay( 800 ).hide();\n\t\t\t\t\t\t\t $('#day_events').html('');\n\t\t\t\t\t\t\t $('#events_calendar').replaceWith(data);\n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t\t});\t\n\t\t\t\t}\n </script>\n <?php\n\t\treturn ob_get_clean();\n\t}", "private function startMonthSpacers()\n\t{\n\t\tif($this->firstDayOfTheMonth != '0') {\n\t\t\t$this->calWeekDays .= \"\\t\\t<td colspan=\\\"\".$this->firstDayOfTheMonth.\"\\\" class=\\\"spacerDays\\\">&nbsp;</td>\\n\";\n\t\t\t$this->outArray['firstday'] = $this->firstDayOfTheMonth;\n\t\t}\n\t}", "public function getDateEntries()\n\t{\n\t\t//Get Date\n\t\t$dateSubmit = \\Input::get('eventDate_submit');\n\t\t//Get Week\n\t\t$week = $this->timesheet->getWeek($dateSubmit);\n\t\t//Get the user id of the currently logged in user\n\t\t$userId = \\Sentry::getUser()->id;\n\t\t//Get Tasks List\n\t\t$tasks = $this->timesheet->getIndex($userId);\n\t\t//Get Entries\n\t\t$entries = $this->timesheet->getEntries($dateSubmit,$userId);\n\t\treturn \\View::make('dashboard.timesheet.view')\n\t\t\t\t\t->with('week',$week)\n\t\t\t\t\t->with('tasks',$tasks)\n\t\t\t\t\t->with('selectedDate',$dateSubmit)\n\t\t\t\t\t->with('entries', $entries);\n\t}", "function smarty_function_calendar($params, &$smarty)\n{\n // Start input validation\n if (empty($params['url_format'])) {\n trigger_error('mandatory param is empty: url_format', E_USER_ERROR);\n }\n\n if (empty($params['year'])) {\n trigger_error('mandatory param is empty: year', E_USER_ERROR);\n }\n\n if (empty($params['month'])) {\n trigger_error('mandatory param is empty: month', E_USER_ERROR);\n }\n\n // The 'day' param is optional.\n\n // End input validation\n\n $url_format = $params['url_format'];\n $year = $params['year'];\n $month = $params['month'];\n $day = $params['day'];\n\n if ($day != '') {\n $selected_date = mktime(0, 0, 0, $month, $day, $year);\n }\n\n $prev_month_end = mktime(0, 0, 0, $month, 0, $year);\n $next_month_begin = mktime(0, 0, 0, $month + 1, 1, $year);\n\n $month_name = strftime('%B', mktime(0, 0, 0, $month, 1, $year));\n $prev_month_abbrev = strftime('%b', $prev_month_end);\n $prev_month_end_info = getdate($prev_month_end);\n $prev_month = $prev_month_end_info['mon'];\n $prev_month_year = $prev_month_end_info['year'];\n $prev_month_url = strftime(\"$url_format\", $prev_month_end);\n\n $next_month_abbrev = strftime('%b', $next_month_begin);\n $next_month_url = strftime(\"$url_format\", $next_month_begin);\n\n // TODO: make \"week starts on\" configurable: Monday vs. Sunday\n $day_of_week_abbrevs = array();\n for ($i = 0; $i < 7; $i++) {\n $day_of_week_abbrevs[] = \n smarty_function_calendar__day_of_week_abbrev($i);\n }\n\n // Build a two-dimensional array of UNIX timestamps.\n $calendar = array();\n\n // Start the first row with the final day(s) of the previous month.\n $week = array();\n $month_begin = mktime(0, 0, 0, $month, 1, $year);\n $month_begin_day_of_week = strftime('%w', $month_begin);\n $days_in_prev_month =\n smarty_function_calendar__days_in_month($prev_month, $prev_month_year);\n for ($day_of_week = 0;\n $day_of_week < $month_begin_day_of_week;\n $day_of_week++) {\n $day = $days_in_prev_month - $month_begin_day_of_week + $day_of_week;\n $week[] =\n mktime(0, 0, 0, $month - 1, $day, $year);\n }\n\n // Fill in the days of the selected month.\n $days_in_month =\n smarty_function_calendar__days_in_month($month, $year);\n for ($i = 1; $i <= $days_in_month; $i++) {\n if ($day_of_week == 7) {\n $calendar[] = $week;\n\n // re-initialize $day_of_week and $week\n $day_of_week = 0;\n unset($week);\n $week = array();\n }\n $week[] = mktime(0, 0, 0, $month, $i, $year);\n $day_of_week++;\n }\n\n // Fill out the last row with the first day(s) of the next month.\n for ($i = 1; $day_of_week < 7; $i++, $day_of_week++) {\n $week[] = mktime(0, 0, 0, $month + 1, $i, $year);\n }\n $calendar[] = $week;\n\n // Generate the URL for today, which will be null if $selected_date is\n // today.\n $today = getdate();\n $today_date =\n mktime(0, 0, 0, $today['mon'], $today['mday'], $today['year']);\n if ($selected_date == $today_date) {\n $today_url = '';\n } else {\n $today_url = strftime($url_format, $today_date);\n }\n\n /*\n $calendar_smarty = new Smarty;\n\n // Copy the configuration of the enclosing Smarty template.\n $calendar_smarty->template_dir = $smarty->template_dir;\n $calendar_smarty->compile_dir = $smarty->compile_dir;\n $calendar_smarty->config_dir = $smarty->config_dir;\n $calendar_smarty->plugins_dir = $smarty->plugins_dir;\n $calendar_smarty->debugging = $smarty->debugging;\n $calendar_smarty->compile_check = $smarty->compile_check;\n $calendar_smarty->force_compile = $smarty->force_compile;\n $calendar_smarty->cache_dir = $smarty->cache_dir;\n $calendar_smarty->cache_dir = $smarty->cache_dir;\n $calendar_smarty->cache_lifetime = $smarty->cache_lifetime;\n */\n $smarty->assign('url_format', $url_format);\n $smarty->assign('month_name', $month_name);\n $smarty->assign('selected_date', $selected_date);\n $smarty->assign('month', $month);\n $smarty->assign('year', $year);\n $smarty->assign('prev_month_end', $prev_month_end);\n $smarty->assign('prev_month_abbrev', $prev_month_abbrev);\n $smarty->assign('next_month_begin', $next_month_begin);\n $smarty->assign('next_month_abbrev', $next_month_abbrev);\n $smarty->assign('day_of_week_abbrevs', $day_of_week_abbrevs);\n $smarty->assign('calendar', $calendar);\n $smarty->assign('today_url', $today_url);\n\n $smarty->display('calendar:month');\n}", "function getCalender($year = '', $month = '') {\r\n $dateYear = ($year != '') ? $year : date(\"Y\");\r\n $dateMonth = ($month != '') ? $month : date(\"m\");\r\n $date = $dateYear . '-' . $dateMonth . '-01';\r\n $currentMonthFirstDay = date(\"N\", strtotime($date));\r\n $totalDaysOfMonth = cal_days_in_month(CAL_GREGORIAN, $dateMonth, $dateYear);\r\n $totalDaysOfMonthDisplay = ($currentMonthFirstDay == 7) ? ($totalDaysOfMonth) : ($totalDaysOfMonth + $currentMonthFirstDay);\r\n $boxDisplay = ($totalDaysOfMonthDisplay <= 35) ? 35 : 42;\r\n ?>\r\n <div id=\"calender_section\">\r\n <h2>\r\n <a href=\"javascript:void(0);\" onclick=\"getCalendar('calendar_div', '<?php echo date(\"Y\", strtotime($date . ' - 1 Month')); ?>', '<?php echo date(\"m\", strtotime($date . ' - 1 Month')); ?>');\">&lt;&lt;</a>\r\n <select name=\"month_dropdown\" class=\"month_dropdown dropdown\"><?php echo getAllMonths($dateMonth); ?></select>\r\n <select name=\"year_dropdown\" class=\"year_dropdown dropdown\"><?php echo getYearList($dateYear); ?></select>\r\n <a href=\"javascript:void(0);\" onclick=\"getCalendar('calendar_div', '<?php echo date(\"Y\", strtotime($date . ' + 1 Month')); ?>', '<?php echo date(\"m\", strtotime($date . ' + 1 Month')); ?>');\">&gt;&gt;</a>\r\n </h2>\r\n <div id=\"event_list\" class=\"none\"></div>\r\n <!--For Add Event-->\r\n <div id=\"event_add\" class=\"none\">\r\n <h5>Provide your booking details for <span id=\"eventDateView\"></span></h5><br>\r\n <form>\r\n <?php\r\n $query = mysql_query(\"SELECT * FROM suppliers WHERE supplier_id=4\") or die(mysql_error());\r\n while ($row = mysql_fetch_array($query)) {\r\n $id = $row['supplier_id'];\r\n ?>\r\n <div class=\"form-group\">\r\n\r\n <label for=\"eventTitle\">Wedding Planner: </label>\r\n <input type=\"text\" class=\"form-control\" id=\"eventTitle\" value=\"<?php echo $row['supplier_name']; ?>\" disabled>\r\n\r\n </div>\r\n\r\n <?php\r\n $con = mysqli_connect(\"localhost\", \"root\", \"\"); #connect database with the php form\r\n mysqli_select_db($con, \"jd\");\r\n\r\n $user = $_SESSION['email'];\r\n\r\n $get_user = \"select * from users where email= '$user' \";\r\n\r\n $run_user = mysqli_query($con, $get_user);\r\n\r\n $row_user = mysqli_fetch_array($run_user);\r\n\r\n $user_id = $row_user['user_id'];\r\n\r\n $user_fullname = $row_user['fullname'];\r\n\r\n $user_userName = $row_user['username'];\r\n\r\n $user_email = $row_user['email'];\r\n\r\n $user_location = $row_user['location'];\r\n\r\n $user_contact = $row_user['contact'];\r\n\r\n\r\n// Check connection\r\n if ($con->connect_error) {\r\n die(\"Connection failed: \" . $con->connect_error);\r\n }\r\n ?>\r\n <div class=\"form-group\">\r\n\r\n <label for=\"email\">Email: </label>\r\n <input type=\"text\" class=\"form-control\" id=\"email\" name=\"email\" required value=\"<?php echo $user_email; ?>\" disabled>\r\n </div>\r\n <div class=\"form-group\">\r\n\r\n <label for=\"fname\">Full Name: </label>\r\n <input type=\"text\" class=\"form-control\" id=\"fname\" required value=\"<?php echo $user_fullname; ?>\" disabled>\r\n\r\n </div>\r\n <div class=\"form-group\">\r\n <label for=\"address\">Address: </label>\r\n <input type=\"text\" class=\"form-control\" id=\"address\" required value=\"<?php echo $user_location; ?>\" disabled>\r\n </div>\r\n <div class=\"form-group\">\r\n <label for=\"contact\">Contact Number: </label>\r\n <input type=\"text\" class=\"form-control\" id=\"contact\" required value=\"<?php echo $user_contact; ?>\" disabled>\r\n </div>\r\n\r\n <div class=\"form-group\">\r\n <label for=\"location\">Ceremony Venue: </label> \r\n <select name=\"location\" id=\"location\" onchange=\"return FilterStatus()\" >\r\n <option value = \"domainesdesaubineaux\">Domaines Des Aubineaux</option>\r\n <option value = \"longbeachresort\">Long Beach spa & resort</option>\r\n <option value = \"royalparbeaux\">Royal Parbeaux Hall</option>\r\n <option value = \"chateaumondesir\">Chateau Mon Desir</option>\r\n <option value = \"Other\">Other</option>\r\n </select>\r\n &nbsp; <textarea class=\"form-control\" id=\"vlocation\" placeholder=\"Please specify your address\" pattern=\"^[a-zA-Z][a-zA-Z0-9-_\\.]{5,}$\" title =\"No special characters and at least 5 characters\" title=\"Enter a valid address \" maxlength=\"30\" required/></textarea>\r\n </div>\r\n\r\n <div class=\"form-group\">\r\n <label for=\"hour\">Ceremony Starting Time: </label>\r\n <select name=\"hour\" id=\"hour\">\r\n <option value = \"09\">09</option>\r\n <option value = \"10\">10</option>\r\n <option value = \"11\">11</option>\r\n <option value = \"12\">12</option>\r\n <option value = \"13\">13</option>\r\n <option value = \"14\">14</option>\r\n <option value = \"15\">15</option>\r\n <option value = \"16\">16</option>\r\n <option value = \"17\">17</option>\r\n <option value = \"18\">18</option>\r\n <option value = \"19\">19</option>\r\n <option value = \"20\">20</option>\r\n </select> \r\n &nbsp;\r\n : <label for=\"minutes\"> </label>\r\n <select name=\"minutes\" id=\"minutes\">\r\n <option value = \"00\">00</option>\r\n <option value = \"05\">05</option>\r\n <option value = \"10\">10</option>\r\n <option value = \"15\">15</option>\r\n <option value = \"20\">20</option>\r\n <option value = \"25\">25</option>\r\n <option value = \"30\">30</option>\r\n <option value = \"35\">35</option>\r\n <option value = \"40\">40</option>\r\n <option value = \"45\">45</option>\r\n <option value = \"50\">50</option>\r\n <option value = \"55\">55</option>\r\n </select>\r\n </div>\r\n\t\t\t\t\t <div class=\"form-group\">\r\n<label for=\"time\">Available Package: </label>\r\n <button type=\"button\" class=\"btn btn-default\" data-toggle=\"modal\" href=\"#openModal1\">View</button>\r\n <div id=\"openModal1\" class=\"modal fade\">\r\n <div class=\"modal-dialog\">\r\n <div class=\"modal-content\">\r\n <div class=\"modal-header\">\r\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\">&times;</button>\r\n <h4 class=\"modal-title\"></h4>\r\n </div>\r\n <div class=\"modal-body\">\r\n \t\t\t\t<table>\r\n <tr>\r\n <th>Standard</th>\r\n <th>Deluxe \t</th>\r\n <th>Classic</th>\r\n\t<th>Premium</th>\r\n </tr>\r\n <tr>\r\n <td><b>Venue and Décor </b></td>\r\n\t<td><b>Venue and Décor </b></td>\r\n\t<td><b>Venue and Décor </b></td>\r\n\t<td><b>Venue and Décor </b></td>\r\n </tr>\r\n <tr>\r\n <td>Mood lighting in reception venue </td>\r\n\t<td>Mood lighting in reception venue </td>\r\n\t<td>Mood lighting in reception venue </td>\r\n\t<td>Mood lighting in reception venue </td>\r\n </tr>\r\n <tr>\r\n <td>Fairy lights and draping behind maintable </td>\r\n\t<td>Fairy lights and draping behind maintable </td>\r\n\t<td>Fairy lights and draping behind maintable </td>\r\n\t<td>Fairy lights and draping behind maintable </td>\r\n </tr>\r\n <tr>\r\n <td>Red carpet from entrance door to the main table</td>\r\n\t<td>Red carpet from entrance door to the main table</td>\r\n\t<td>Red carpet from entrance door to the main table </td>\r\n\t<td>Red carpet from entrance door to the main table</td>\r\n </tr>\r\n <tr>\r\n <td>N/A</td>\r\n\t<td>N/A</td>\r\n\t<td>Black carpet from entrance door to the main table</td>\r\n\t<td>Black carpet from entrance door to the main table</td>\r\n </tr>\r\n <tr>\r\n <td>Standard table linen and chair covers</td>\r\n\t<td>Standard table linen and chair covers</td>\r\n\t<td>Standard table linen and chair covers</td>\r\n\t<td> Standard table linen and chair covers </td>\r\n </tr>\r\n <tr>\r\n <td>White trees</td>\r\n\t<td>White trees</td>\r\n\t<td>White trees</td>\r\n\t<td>White trees</td>\r\n </tr>\r\n <tr>\r\n <td>Table numbers</td>\r\n\t<td>Table numbers</td>\r\n\t<td>Table numbers</td>\r\n\t<td>Table numbers</td>\r\n </tr>\r\n <tr>\r\n <td>Perspex podium</td>\r\n\t<td>Perspex podium</td>\r\n\t<td>Perspex podium</td>\r\n\t<td>Perspex podium</td>\r\n </tr>\r\n <tr>\r\n <td>N/A</td>\r\n\t<td>N/A</td>\r\n\t<td>Clear Napoleon chair with cushion</td>\r\n\t<td>Clear Napoleon chair with cushion</td>\r\n </tr>\r\n <tr>\r\n <td>Photo backdrop with fun props</td>\r\n\t<td>Photo backdrop with fun props</td>\r\n\t<td>Photo backdrop with fun props</td>\r\n\t<td>Photo backdrop with fun props</td>\r\n </tr>\r\n <tr>\r\n <td>Silver stainless steel base plate</td>\r\n\t<td>N/A</td>\r\n\t<td>N/A</td>\r\n\t<td>N/A</td>\r\n </tr>\r\n <tr>\r\n <td>N/A</td>\r\n\t<td>N/A</td>\r\n\t<td>Glass base plates</td>\r\n\t<td>Glass base plates</td>\r\n </tr>\r\n <tr>\r\n <td>Flower of your choice</td>\r\n\t<td>Flower of your choice</td>\r\n\t<td>Flower of your choice</td>\r\n\t<td>Flower of your choice</td>\r\n </tr>\r\n <tr>\r\n <td>Visit us for more design</td>\r\n\t <td>Visit us for more design</td>\r\n\t <td>Visit us for more design</td>\r\n\t <td>Visit us for more design</td>\r\n </tr>\r\n <tr>\r\n <td>100 guests included, additional guests RS 50/guest</td>\r\n\t<td>100 guests included, additional guests RS 50/guest</td>\r\n\t<td>100 guests included, additional guests RS 50/guest</td>\r\n\t<td>100 guests included, additional guests RS 50/guest</td>\r\n </tr>\r\n <tr>\r\n <td>12 table + 100 chairs</td>\r\n\t<td>20 table + 100 chairs</td>\r\n\t<td>20 table + 100 chairs</td>\r\n\t<td>20 table + 100 chairs</td>\r\n </tr>\r\n <tr>\r\n <td>Rs <?php echo $row['price']; ?> **Refund not applicable</td>\r\n\t<td>Rs <?php echo $row['price2']; ?> **Refund not applicable</td>\r\n\t<td>Rs <?php echo $row['price3']; ?> **Refund not applicable</td>\r\n\t<td>Rs <?php echo $row['price4']; ?> **Refund not applicable</td>\r\n </tr>\r\n \r\n</table>\r\n </div>\r\n </div>\r\n </div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t&nbsp;&nbsp;&nbsp;\r\n\t\t\t\t <label for=\"deal\"> Package Type: </label>\r\n\t\t\t\t\t<select name=\"deal\" id=\"deal\">\r\n\t\t\t\t\r\n\t\t\t\t\t<option value = \"Standard\">Standard</option>\r\n\t\t\t\t\t<option value = \"Deluxe\">Deluxe</option>\r\n\t\t\t\t\t<option value = \"Classic\">Classic</option>\r\n\t\t\t\t\t<option value = \"Premium\">Premium</option>\r\n\t\t\t\t\t</select> \r\n </div>\r\n <div class=\"form-group\">\r\n <label for=\"guests\">Approx. Number of Guests: </label>\r\n <input type=\"text\" class=\"form-control\" id=\"guests\" onkeypress=\"return isNumber(event)\" maxlength=\"3\" Placeholder=\"Number of Guests\" required/>\r\n </div>\r\n\r\n <div class=\"form-group\">\r\n <label for=\"chairs\">Additional. Number of Chairs (Rs5/per chair): </label>\r\n <input type=\"text\" class=\"form-control\" id=\"chairs\" onkeypress=\"return isNumber(event)\" maxlength=\"3\" Placeholder=\"Number of Chairs\" required/>\r\n </div>\r\n <div class=\"form-group\">\r\n <label for=\"tables\">Additional. Number of Tables (Rs10/per table): </label>\r\n <input type=\"text\" class=\"form-control\" id=\"tables\" onkeypress=\"return isNumber(event)\" maxlength=\"3\" Placeholder=\"Number of Tables\" required/>\r\n </div>\r\n <div class=\"form-group\">\r\n <label for=\"style\">Seating Style: </label>\r\n <select name=\"style\" id=\"style\">\r\n <option value = \"Theater Style\">Theater Style</option>\r\n <option value = \"Classroom Style\">Classroom Style</option>\r\n <option value = \"Banquet Long\">Banquet Style (Long Table)</option>\r\n <option value = \"Banquet Round\">Banquet Style (Round Table)</option>\r\n <option value = \"Standing Room\">Standing Room (Tables Only)</option>\r\n </select>\r\n &nbsp;&nbsp;\r\n <label for=\"types\">Types of Tables: </label>\r\n <select name=\"types\" id=\"types\">\r\n <option value = \"8Long\">8'Long (seats 8) </option>\r\n <option value = \"60Round\">60\"Round (seats 6) </option>\r\n <option value = \"72Round\">72\"Round (seats 8) </option>\r\n </select>\r\n </div>\r\n <div class=\"form-group\">\r\n <label for=\"instruction\">Special Instructions: </label>\r\n <textarea class=\"form-control\" id=\"instruction\" maxlength=\"200\" placeholder=\"Optional...\"></textarea>\r\n </div>\r\n <input type=\"hidden\" id=\"eventDate\" value=\"\"/>\r\n <input type=\"hidden\" id=\"confirmation\" value=\"Pending\"/>\r\n\t\t\t\t\t<input type=\"hidden\" id=\"user_id\" value=\"<?php echo $user_id; ?>\"/>\r\n <button type=\"button\" id=\"addEventBtn\" class=\"btn btn-success pull-right\">Submit</button>\r\n\r\n </form>\r\n <?php } ?>\r\n </div>\r\n\r\n <div id=\"calender_section_top\">\r\n <ul>\r\n <li>Sun</li>\r\n <li>Mon</li>\r\n <li>Tue</li>\r\n <li>Wed</li>\r\n <li>Thu</li>\r\n <li>Fri</li>\r\n <li>Sat</li>\r\n </ul>\r\n </div>\r\n <div id=\"calender_section_bot\">\r\n <ul>\r\n <?php\r\n $dayCount = 1;\r\n for ($cb = 1; $cb <= $boxDisplay; $cb++) {\r\n if (($cb >= $currentMonthFirstDay + 1 || $currentMonthFirstDay == 7) && $cb <= ($totalDaysOfMonthDisplay)) {\r\n //Current date\r\n $currentDate = $dateYear . '-' . $dateMonth . '-' . $dayCount;\r\n $eventNum = 0;\r\n //Include db configuration file\r\n include 'dbConfig.php';\r\n //Get number of events based on the current date\r\n $result = $db->query(\"SELECT title FROM floralbookings WHERE date = '\" . $currentDate . \"' AND status = 1\");\r\n $eventNum = $result->num_rows;\r\n //Define date cell color\r\n if (strtotime($currentDate) == strtotime(date(\"Y-m-d\"))) {\r\n echo '<li date=\"' . $currentDate . '\" class=\"grey date_cell\">';\r\n } elseif ($eventNum > 0) {\r\n echo '<li date=\"' . $currentDate . '\" class=\"light_sky date_cell\">';\r\n } else {\r\n echo '<li date=\"' . $currentDate . '\" class=\"date_cell\">';\r\n }\r\n //Date cell\r\n echo '<span>';\r\n echo $dayCount;\r\n echo '</span>';\r\n\r\n //Hover event popup\r\n echo '<div id=\"date_popup_' . $currentDate . '\" class=\"date_popup_wrap none\">';\r\n echo '<div class=\"date_window\">';\r\n echo '<div class=\"popup_event\">Booking (' . $eventNum . ')</div>';\r\n\r\n //For Add Event\r\n echo '<a href=\"javascript:;\" onclick=\"addEvent(\\'' . $currentDate . '\\');\">Place Booking</a>';\r\n echo '</div></div>';\r\n\r\n echo '</li>';\r\n $dayCount++;\r\n ?>\r\n <?php } else { ?>\r\n <li><span>&nbsp;</span></li>\r\n <?php }\r\n }\r\n ?>\r\n\r\n </ul>\r\n </div>\r\n </div>\r\n\r\n <script type=\"text/javascript\">\r\n function getCalendar(target_div, year, month) {\r\n $.ajax({\r\n type: 'POST',\r\n url: 'floralplannerfunctions.php',\r\n data: 'func=getCalender&year=' + year + '&month=' + month,\r\n success: function (html) {\r\n $('#' + target_div).html(html);\r\n }\r\n });\r\n }\r\n\r\n function getEvents(date) {\r\n $.ajax({\r\n type: 'POST',\r\n url: 'floralplannerfunctions.php',\r\n data: 'func=getEvents&date=' + date,\r\n success: function (html) {\r\n $('#event_list').html(html);\r\n $('#event_add').slideUp('slow');\r\n $('#event_list').slideDown('slow');\r\n }\r\n });\r\n }\r\n //For Add Event\r\n function addEvent(date) {\r\n $('#eventDate').val(date);\r\n $('#eventDateView').html(date);\r\n $('#event_list').slideUp('slow');\r\n $('#event_add').slideDown('slow');\r\n }\r\n //For Add Event\r\n $(document).ready(function () {\r\n $('#addEventBtn').on('click', function () {\r\n var date = $('#eventDate').val();\r\n var title = $('#eventTitle').val();\r\n\t\t\t\t var user_id = $('#user_id').val();\r\n var fname = $('#fname').val();\r\n var address = $('#address').val();\r\n var contact = $('#contact').val();\r\n var email = $('#email').val();\r\n var location = $('#location').val();\r\n var vlocation = $('#vlocation').val();\r\n var hour = $('#hour').val();\r\n var minutes = $('#minutes').val();\r\n\t\t\t\t var deal = $('#deal').val();\r\n var guests = $('#guests').val();\r\n var chairs = $('#chairs').val();\r\n var tables = $('#tables').val();\r\n var style = $('#style').val();\r\n var types = $('#types').val();\r\n var instruction = $('#instruction').val();\r\n var confirmation = $('#confirmation').val();\r\n\r\n $.ajax({\r\n type: 'POST',\r\n url: 'floralplannerfunctions.php',\r\n data: 'func=addEvent&date=' + date + '&title=' + title + '&user_id=' + user_id + '&fname=' + fname + '&address=' + address + '&contact=' + contact + '&email=' + email + '&location=' + location + '&vlocation=' + vlocation + '&hour=' + hour + '&minutes=' + minutes+ '&deal=' + deal + '&guests=' + guests + '&chairs=' + chairs + '&tables=' + tables + '&style=' + style + '&types=' + types + '&instruction=' + instruction + '&confirmation=' + confirmation,\r\n success: function (msg) {\r\n if (msg == 'ok') {\r\n var dateSplit = date.split(\"-\");\r\n $('#eventTitle').val('');\r\n\t\t\t\t\t\t\t $('#user_id').val('');\r\n $('#fname').val('');\r\n $('#address').val('');\r\n $('#contact').val('');\r\n $('#email').val('');\r\n $('#location').val('');\r\n $('#vlocation').val('');\r\n $('#hour').val('');\r\n $('#minutes').val('');\r\n\t\t\t\t\t\t\t $('#deal').val('');\r\n $('#guests').val('');\r\n $('#chairs').val('');\r\n $('#tables').val('');\r\n $('#style').val('');\r\n $('#types').val('');\r\n $('#instruction').val('');\r\n $('#confirmation').val('');\r\n alert('Booking Created Successfully.');\r\n getCalendar('calendar_div', dateSplit[0], dateSplit[1]);\r\n } else {\r\n alert('Some problem occurred, please try again.');\r\n }\r\n }\r\n });\r\n });\r\n });\r\n\r\n $(document).ready(function () {\r\n $('.date_cell').mouseenter(function () {\r\n date = $(this).attr('date');\r\n $(\".date_popup_wrap\").fadeOut();\r\n $(\"#date_popup_\" + date).fadeIn();\r\n });\r\n $('.date_cell').mouseleave(function () {\r\n $(\".date_popup_wrap\").fadeOut();\r\n });\r\n $('.month_dropdown').on('change', function () {\r\n getCalendar('calendar_div', $('.year_dropdown').val(), $('.month_dropdown').val());\r\n });\r\n $('.year_dropdown').on('change', function () {\r\n getCalendar('calendar_div', $('.year_dropdown').val(), $('.month_dropdown').val());\r\n });\r\n $(document).click(function () {\r\n $('#event_list').slideUp('slow');\r\n });\r\n });\r\n </script>\r\n <?php\r\n}", "function generate_category_content()\n {\n global $conf, $page;\n\n $view_type = $page['chronology_view'];\n if ($view_type==CAL_VIEW_CALENDAR)\n {\n global $template;\n $tpl_var = array();\n if ( count($page['chronology_date'])==0 )\n {//case A: no year given - display all years+months\n if ($this->build_global_calendar($tpl_var))\n {\n $template->assign('chronology_calendar', $tpl_var);\n return true;\n }\n }\n\n if ( count($page['chronology_date'])==1 )\n {//case B: year given - display all days in given year\n if ($this->build_year_calendar($tpl_var))\n {\n $template->assign('chronology_calendar', $tpl_var);\n $this->build_nav_bar(CYEAR); // years\n return true;\n }\n }\n\n if ( count($page['chronology_date'])==2 )\n {//case C: year+month given - display a nice month calendar\n if ( $this->build_month_calendar($tpl_var) )\n {\n $template->assign('chronology_calendar', $tpl_var);\n }\n $this->build_next_prev();\n return true;\n }\n }\n\n if ($view_type==CAL_VIEW_LIST or count($page['chronology_date'])==3)\n {\n if ( count($page['chronology_date'])==0 )\n {\n $this->build_nav_bar(CYEAR); // years\n }\n if ( count($page['chronology_date'])==1)\n {\n $this->build_nav_bar(CMONTH); // month\n }\n if ( count($page['chronology_date'])==2 )\n {\n $day_labels = range( 1, $this->get_all_days_in_month(\n $page['chronology_date'][CYEAR] ,$page['chronology_date'][CMONTH] ) );\n array_unshift($day_labels, 0);\n unset( $day_labels[0] );\n $this->build_nav_bar( CDAY, $day_labels ); // days\n }\n $this->build_next_prev();\n }\n return false;\n }", "function zenbu_get_table_data($entry_ids, $field_ids, $channel_id)\n\t{\n\t\t$output = array();\n\t\tif( empty($entry_ids) || empty($field_ids))\n\t\t{\n\t\t\treturn $output;\n\t\t}\n\t\t\n\t\t$this->EE->db->select('t.title AS calendar_name,\n\t\t\t\t\t\t\t\te.entry_id, \n\t\t\t\t\t\t\t\te.start_date AS start_date, \n\t\t\t\t\t\t\t\te.start_time AS start_time, \n\t\t\t\t\t\t\t\te.end_date AS end_date, \n\t\t\t\t\t\t\t\te.end_time AS end_time, \n\t\t\t\t\t\t\t\te.all_day AS all_day, \n\t\t\t\t\t\t\t\te.recurs AS recurs, \n\t\t\t\t\t\t\t\te.last_date AS last_date,\n\t\t\t\t\t\t\t\to.entry_id AS o_entry_id, \n\t\t\t\t\t\t\t\to.start_date AS o_start_date, \n\t\t\t\t\t\t\t\to.start_time AS o_start_time, \n\t\t\t\t\t\t\t\to.end_date AS o_end_date, \n\t\t\t\t\t\t\t\to.end_time AS o_end_time, \n\t\t\t\t\t\t\t\to.all_day AS o_all_day');\n\t\t$this->EE->db->from('exp_calendar_events e');\n\t\t$this->EE->db->join('exp_calendar_events_occurrences o', 'e.entry_id = o.event_id', 'left');\n\t\t$this->EE->db->join('exp_channel_titles t', 't.entry_id = e.calendar_id', 'left');\n\t\t$this->EE->db->where_in('e.entry_id', $entry_ids);\n\t\t$this->EE->db->or_where_in('o.entry_id', $entry_ids);\n\t\t$query = $this->EE->db->get('exp_calendar_events');\n\t\t\n\t\tif($query->num_rows() > 0)\n\t\t{\n\t\t\tforeach($query->result_array() as $row)\n\t\t\t{\n\t\t\t\t$output['entry_id_'.$row['entry_id']]['calendar_name'] = $row['calendar_name'];\n\n\t\t\t\t// Start date\n\t\t\t\t$time = $row['all_day'] == 'y' ? FALSE : $row['start_time'];\n\t\t\t\t$output['entry_id_'.$row['entry_id']]['start_date'] = $this->cal_format_date($row['start_date'], $time);\n\n\t\t\t\t// End date\n\t\t\t\t$time = $row['all_day'] == 'y' ? FALSE : $row['end_time'];\n\t\t\t\t$output['entry_id_'.$row['entry_id']]['end_date'] = $this->cal_format_date($row['end_date'], $time);\n\n\t\t\t\t$output['entry_id_'.$row['entry_id']]['all_day'] = $row['all_day'];\n\t\t\t\t$output['entry_id_'.$row['entry_id']]['recurs'] = $row['recurs'];\n\t\t\t\t\n\t\t\t\t// Last date\n\t\t\t\t$output['entry_id_'.$row['entry_id']]['last_date'] = $row['last_date'] == 0 ? 0 : $this->cal_format_date($row['last_date'], FALSE);\n\n\t\t\t\t// Occurrence start/end dates\n\t\t\t\tif( ! empty($row['o_entry_id']))\n\t\t\t\t{\n\t\t\t\t\t$output['entry_id_'.$row['o_entry_id']]['o_start_date'] = $this->cal_format_date($row['o_start_date'], $row['o_start_time']);\n\t\t\t\t\t$output['entry_id_'.$row['o_entry_id']]['o_end_date'] = $this->cal_format_date($row['o_end_date'], $row['o_end_time']);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $output;\n\n\t}", "function import_the_events_calendar() {\n\t\tglobal $wgobd_view_helper,\n\t\t\t\t\t $wgobd_events_helper;\n\n\t\t$args = array(\n\t\t\t'post_type' \t=> 'post',\n\t\t\t'numberposts'\t=> -1,\n\t\t\t'meta_key'\t\t=> '_isEvent',\n\t\t\t'meta_value'\t=> 'yes'\n\t\t);\n\t\t$posts = get_posts( $args );\n\n\t\t$imported_events = 0;\n\t\tforeach( $posts as $post )\n\t\t{\n\t\t\t$event = new wgobd_Event( null );\n\t\t\t$postmeta = get_post_custom( $post->ID );\n\n\t\t\t// Need this to offset dates coming from The Events Calendar\n\t\t\t$gm_diff = mktime( 0 ) - gmmktime( 0 );\n\n\t\t\t$event->allday \t\t\t\t= $postmeta['_EventAllDay'][0] == 'yes' || $postmeta['_EventAllDay'][0] == 1;\n\t\t\t$event->start \t\t\t\t= strtotime( $postmeta['_EventStartDate'][0] ) - $gm_diff;\n\t\t\t$event->end \t\t\t\t\t= strtotime( $postmeta['_EventEndDate'][0] ) - $gm_diff;\n\t\t\t// If all-day event, align start/end to start/end of day\n\t\t\tif( $event->allday ) {\n\t\t\t\t$event->start = $wgobd_events_helper->gmgetdate( $event->start );\n\t\t\t\t$event->start = gmmktime( 0, 0, 0, $event->start['mon'], $event->start['mday'], $event->start['year'] );\n\t\t\t\t$event->end = $wgobd_events_helper->gmgetdate( $event->end );\n\t\t\t\t$event->end = gmmktime( 0, 0, 0, $event->end['mon'], $event->end['mday'], $event->end['year'] );\n\t\t\t}\n\t\t\t// Finally, convert to GMT storage format\n\t\t\t$event->start = $wgobd_events_helper->local_to_gmt( $event->start );\n\t\t\t$event->end = $wgobd_events_helper->local_to_gmt( $event->end );\n\t\t\t// Bug in The Events Calendar where some all-day events start and end at the same time\n\t\t\tif( $event->allday && $event->end - $event->start < ( 24 * 60 * 60 ) )\n\t\t\t\t$event->end = $event->start + 24 * 60 * 60;\n\t\t\t$event->venue \t\t\t\t= $postmeta['_EventVenue'][0];\n\t\t\t$event->country \t\t\t= $postmeta['_EventCountry'][0];\n\t\t\t$event->city \t\t\t\t\t= $postmeta['_EventCity'][0];\n\t\t\t$event->province \t\t\t= $postmeta['_EventState'][0];\n\t\t\t$event->postal_code \t= $postmeta['_EventZip'][0];\n\t\t\t$event->address = array();\n\t\t\tif( $postmeta['$_EventAddress'] ) $event->address[] = $postmeta['$_EventAddress'];\n\t\t\tif( $event->city ) $event->address[] = $event->city;\n\t\t\tif( $event->province ) $event->address[] = $event->province;\n\t\t\tif( $event->postal_code ) $event->address[] = $event->postal_code;\n\t\t\tif( $event->country ) $event->address[] = $event->country;\n\t\t\t$event->address = join( ', ', $event->address );\n\t\t\t$event->show_map \t\t\t= $postmeta['_EventShowMapLink'][0] == 'true' || $postmeta['_EventShowMap'][0] == 'true';\n\t\t\t$event->cost \t\t\t\t\t= $postmeta['_EventCost'][0];\n\t\t\t$event->contact_phone = $postmeta['_EventPhone'][0];\n\t\t\t$event->post \t\t\t\t\t= get_object_vars( $post );\n\t\t\t$event->post[\"post_type\"] = wgobd_POST_TYPE;\n\t\t\tunset( $event->post[\"ID\"] );\n\n\t\t\t// Transfer post categories => event categories, post tags => event tags\n\t\t\t$terms = wp_get_post_terms( $post->ID, array( 'category', 'post_tag' ) );\n\t\t\t$event->categories = array();\n\t\t\t$event->tags = array();\n\t\t\tforeach( $terms as $term )\n\t\t\t{\n\t\t\t\tswitch( $term->taxonomy )\n\t\t\t\t{\n\t\t\t\t\tcase 'category':\n\t\t\t\t\t\t// Ignore special \"Events\" category by The Events Calendar\n\t\t\t\t\t\tif( $term->name == 'Events' )\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t// Need to find out the category ID, if it exists.\n\t\t\t\t\t\t$event_term = get_term_by( 'name', $term->name, 'events_categories' );\n\t\t\t\t\t\t// If no category exists, create it.\n\t\t\t\t\t\tif( $event_term === false )\n\t\t\t\t\t\t\t$event_term = (object) wp_insert_term(\n\t\t\t\t\t\t\t\t$term->name,\n\t\t\t\t\t\t\t\t'events_categories',\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'description' => $term->description,\n\t\t\t\t\t\t\t\t\t'slug' => $term->slug\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t$event->categories[] = $event_term->term_id;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'post_tag':\n\t\t\t\t\t\t// For some reason tag-like taxonomies are treated differently; term\n\t\t\t\t\t\t// IDs cannot be used; instead the actual term name must be appended\n\t\t\t\t\t\t$event->tags[] = $term->name;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$post_id = $event->save();\n\t\t\t$wgobd_events_helper->cache_event( $event, $post_id );\n\n\t\t\t$imported_events++;\n\t\t}\n\n\t\t$wgobd_view_helper->display( \"import.php\", array( 'imported_events' => $imported_events ) );\n\t}" ]
[ "0.72028095", "0.71000516", "0.70803356", "0.70312774", "0.70239383", "0.6909667", "0.690769", "0.6813331", "0.6793757", "0.67725843", "0.67438596", "0.67350274", "0.6697026", "0.6695359", "0.6692827", "0.6680418", "0.6673593", "0.6642261", "0.65114194", "0.6481101", "0.64571977", "0.64270306", "0.63422596", "0.6319139", "0.63151604", "0.6296179", "0.62815744", "0.6277548", "0.626166", "0.62555176", "0.62539333", "0.62429494", "0.61954165", "0.61808115", "0.6178693", "0.6145154", "0.6141111", "0.6102865", "0.6086284", "0.6062157", "0.60508466", "0.6047332", "0.6025216", "0.6023521", "0.601401", "0.5978708", "0.5941388", "0.5928832", "0.5920615", "0.5912529", "0.5832166", "0.5813464", "0.57985276", "0.576024", "0.5717967", "0.5709164", "0.57087564", "0.5693989", "0.5670287", "0.5653782", "0.56533694", "0.5642062", "0.56157595", "0.5590445", "0.5553175", "0.55519533", "0.55376595", "0.55348253", "0.5530896", "0.55109966", "0.55072767", "0.5486662", "0.54676306", "0.5462005", "0.54584986", "0.5453827", "0.54502416", "0.5447468", "0.5400962", "0.5361904", "0.53516454", "0.53212595", "0.5319571", "0.5310829", "0.5310164", "0.53034776", "0.5295853", "0.5292848", "0.52646166", "0.52511865", "0.5244883", "0.5242509", "0.5241206", "0.52385616", "0.5237293", "0.5225893", "0.52256006", "0.521305", "0.5170539", "0.51689804" ]
0.7805902
0
Iterate calendar days (Array version) Loop through calendar days for the given month and create a large multidimensional array of all the elements required to draw the calendar.
private function makeArrayIterator() { $this->weekDayNum = $this->firstDayOfTheMonth+1; for($this->dayOfMonth; $this->dayOfMonth <= $this->daysInMonth; $this->dayOfMonth++) { // Set the default style $this->outArray['days'][$this->dayOfMonth]['style'] = 'normalDay'; // Set the style to a weekend day style if(($this->weekDayNum == 8)||($this->weekDayNum == 7)) { $this->outArray['days'][$this->dayOfMonth]['style'] = 'weekendDay'; } // Set the style to a current day style if($this->curDay == $this->dayOfMonth) { $this->outArray['days'][$this->dayOfMonth]['style'] = 'currentDay'; } // If the current day is Sunday, add a new row if($this->weekDayNum == 8) { $this->weekDayNum = 1; } $this->outArray['days'][$this->dayOfMonth]['dayname'] = $this->daysArray[$this->weekDayNum - 1]; $this->outArray['days'][$this->dayOfMonth]['weekdaynumber'] = $this->weekDayNum; // Draw days if($this->makeDayEventListArray()) { $this->outArray['days'][$this->dayOfMonth]['events'] = $this->makeDayEventListArray(); } $this->outArray['days'][$this->dayOfMonth]['datestamp'] = $this->curYear.'-'.$this->curMonth.'-'.$this->dayOfMonth; $this->weekDayNum++; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _getDaysArray($month, $year = 0)\n {\n if ($year == 0)\n {\n $year = $this->year;\n }\n\n $days = array();\n\n // Return everyday of the month if both bit[2] and bit[4] are '*'\n if ($this->bits[2] == '*' AND $this->bits[4] == '*')\n {\n $days = $this->_getDays($month, $year);\n }\n else\n {\n // Create an array for the weekdays\n if (substr($this->bits[4], 0, 1) == '*')\n {\n if (substr($this->bits[4], 1, 1) == '/')\n {\n $step = (int) substr($this->bits[4], 2);\n }\n else\n {\n $step = 1;\n }\n \n for ($i = 0; $i <= 6; $i += $step)\n {\n $arWeekdays[] = $i;\n }\n }\n else\n {\n $arWeekdays = $this->_expandRanges($this->bits[4]);\n $arWeekdays = $this->_sanitize($arWeekdays, 0, 7);\n\n // Map 7 to 0, both represents Sunday. Array is sorted already!\n if (in_array(7, $arWeekdays))\n {\n if (in_array(0, $arWeekdays))\n {\n array_pop($arWeekdays);\n }\n else\n {\n $tmp[] = 0;\n array_pop($arWeekdays);\n $arWeekdays = array_merge($tmp, $arWeekdays);\n }\n }\n }\n\n if ($this->bits[2] == '*')\n {\n $daysmonth = $this->_getDays($month, $year);\n }\n else\n {\n $daysmonth = $this->_expandRanges($this->bits[2]);\n\n // So that we do not end up with 31 of Feb\n $daysInMonth = $this->_daysInMonth($month, $year);\n $daysmonth = $this->_sanitize($daysmonth, 1, $daysInMonth);\n }\n\n // Now match these days with weekdays\n foreach ($daysmonth AS $day)\n {\n $wkday = date('w', mktime(0, 0, 0, $month, $day, $year));\n if (in_array($wkday, $arWeekdays))\n {\n $days[] = $day;\n }\n }\n }\n\n return $days;\n }", "public function buildMonth()\n\t{\n\t\t$this->orderedDays = $this->getDaysInOrder();\n\t\t\n\t\t$this->monthName = $this->months[ ltrim( $this->month, '0') ];\n\t\t\n\t\t// start of whichever month we are building\n\t\t$start_of_month = getdate( mktime(12, 0, 0, $this->month, 1, $this->year ) );\n\t\t\n\t\t$first_day_of_month = $start_of_month['wday'];\n\t\t\n\t\t$days = $this->startDay - $first_day_of_month;\n\t\t\n\t\tif( $days > 1 )\n\t\t{\n\t\t\t// get an offset\n\t\t\t$days -= 7;\n\t\t\t\n\t\t}\n\n\t\t$num_days = $this->daysInMonth($this->month, $this->year);\n\t\t// 42 iterations\n\t\t$start = 0;\n\t\t$cal_dates = array();\n\t\t$cal_dates_style = array();\n\t\t$cal_events = array();\n\t\twhile( $start < 42 )\n\t\t{\n\t\t\t// off set dates\n\t\t\tif( $days < 0 )\n\t\t\t{\n\t\t\t\t$cal_dates[] = '';\n\t\t\t\t$cal_dates_style[] = 'calendar-empty';\n\t\t\t\t$cal_dates_data[] = '';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif( $days < $num_days )\n\t\t\t\t{\n\t\t\t\t\t// real days\n\t\t\t\t\t$cal_dates[] = $days+1;\n\t\t\t\t\tif( in_array( $days+1, $this->daysWithEvents ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$cal_dates_style[] = 'has-events';\n\t\t\t\t\t\t$cal_dates_data[] = $this->data[ $days+1 ];\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$cal_dates_style[] = '';\n\t\t\t\t\t\t$cal_dates_data[] = '';\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// surplus\n\t\t\t\t\t$cal_dates[] = '';\n\t\t\t\t\t$cal_dates_style[] = 'calendar-empty';\n\t\t\t\t\t$cal_dates_data[] = '';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t// increment and loop\n\t\t\t$start++;\n\t\t\t$days++;\n\t\t}\n\t\t\n\t\t// done\n\t\t$this->dates = $cal_dates;\n\t\t$this->dateStyles = $cal_dates_style;\n\t\t$this->dateData = $cal_dates_data;\n\t}", "public function getDaysAsArray()\n {\n $days = [];\n $startCurrent = $this->weekdayIndexes[$this->currentMonth[\"weekday\"]];\n $startPrevious = $this->noOfDaysPrevious - ($startCurrent - 1);\n // Add days of previous month\n for ($i = $startPrevious; $i <= $this->noOfDaysPrevious; $i++) {\n $days[] = $i;\n }\n // Add days of current month\n for ($j = 1; $j <= $this->noOfDays; $j++) {\n $days[] = $j;\n }\n // Add days of next month\n for ($k = 1; count($days) % 7 !== 0; $k++) {\n $days[] = $k;\n }\n return $days;\n }", "function create_calendar_array($used_dates){\n\n\t//create array of dates for October with false attributes\n\t$october = array();\n\tfor($day=1;$day<=31;$day++){\n\t\t$october[$day]=FALSE;\n\t}\n\t\n\t//compare used dates to whole month\n\tforeach\t($used_dates as $post_id=>$date){\n\t\t$october[intval($date['day'])][]=$post_id;\n\t}\n\t\t\n\t\n\treturn $october;\n}", "protected function getDaysArray($month, $year)\n\t{\n\t\t$daysinmonth = $this->days_in_month($month, $year);\n\t\t$domStar = false;\n\t\t$dowStar = false;\n\t\t$da = array_pad([], $daysinmonth + 1, null);\n\t\tunset($da[0]);\n\t\t$dwa = array_pad([], $daysinmonth + 1, null);\n\t\tunset($dwa[0]);\n\t\tforeach ($this->_attr[self::DAY_OF_MONTH] as $d) {\n\t\t\tif ($d['dom'] === '*' || $d['dom'] === '?') {\n\t\t\t\t$domStar = (($d['dom'] == '?') || ($d['period'] == 1));\n\t\t\t\tforeach ($da as $key => $value) {\n\t\t\t\t\tif (($key - 1) % $d['period'] == 0) {\n\t\t\t\t\t\t$da[$key] = 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} elseif (is_numeric($d['dom'])) {\n\t\t\t\t$startDay = $d['dom'];\n\t\t\t\tif ($d['domWeekday']) {\n\t\t\t\t\t$datea = getdate(strtotime(\"$year-$month-$startDay\"));\n\t\t\t\t\tif ($datea['wday'] == 6) {\n\t\t\t\t\t\tif ($startDay == 1) {\n\t\t\t\t\t\t\t$startDay = 3;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$startDay--;\n\t\t\t\t\t\t}\n\t\t\t\t\t} elseif ($datea['wday'] == 0) {\n\t\t\t\t\t\tif ($startDay == $daysinmonth) {\n\t\t\t\t\t\t\t$startDay = $daysinmonth - 2;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$startDay++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$endDay = $d['end'];\n\t\t\t\tif ($d['endWeekday']) {\n\t\t\t\t\t$datea = getdate(strtotime(\"$year-$month-$endDay\"));\n\t\t\t\t\tif ($datea['wday'] == 6) {\n\t\t\t\t\t\tif ($endDay == 1) {\n\t\t\t\t\t\t\t$endDay = 3;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$endDay--;\n\t\t\t\t\t\t}\n\t\t\t\t\t} elseif ($datea['wday'] == 0) {\n\t\t\t\t\t\tif ($endDay == $daysinmonth) {\n\t\t\t\t\t\t\t$endDay = $daysinmonth - 2;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$endDay++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor ($i = $startDay; $i <= $endDay && $i <= 31; $i += $d['period']) {\n\t\t\t\t\t$da[$i] = 1;\n\t\t\t\t}\n\t\t\t} elseif ($d['dom'] == 'L') {\n\t\t\t\t$less = empty($d['end']) ? 0 : $d['end'];\n\t\t\t\t$da[$daysinmonth - $less] = 1;\n\t\t\t}\n\t\t}\n\t\t$firstDatea = getdate(strtotime(\"$year-$month-01\"));\n\t\tforeach ($this->_attr[self::DAY_OF_WEEK] as $d) {\n\t\t\tif (is_numeric($d['dow'])) {\n\t\t\t\t//start at the first sunday on or before the 1st day of the month\n\t\t\t\tfor ($i = 1 - $firstDatea['wday']; $i <= $daysinmonth; $i += 7) {\n\t\t\t\t\tfor ($ii = $d['dow']; ($ii <= $d['end']) && ($ii < 7) && (($i + $ii) <= $daysinmonth); $ii += $d['period']) {\n\t\t\t\t\t\t$iii = $i + $ii;\n\t\t\t\t\t\t$w = floor(($iii + 6) / 7);\n\t\t\t\t\t\t$lw = floor(($daysinmonth - $iii) / 7);\n\n\t\t\t\t\t\tif (($iii >= 0) && ((!$d['week'] || $d['week'] == $w) && (!$d['lastDow'] || $lw == 0))) {\n\t\t\t\t\t\t\t$dwa[$iii] = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif ($dowStar) {\n\t\t\treturn $da;\n\t\t} elseif ($domStar) {\n\t\t\treturn $dwa;\n\t\t}\n\t\tforeach ($da as $key => $value) {\n\t\t\t$da[$key] = $value && ($dwa[$key] ?? 0);\n\t\t}\n\t\treturn $da;\n\t}", "public static function create_calendar($month,$year,$calendar){\n\t\t// usamos mktime para crear la fecha exacta que queremos para crear valor $time \n\t\t$running_day = date('w',mktime(0,0,0,$month,1,$year)); // w devuelve el numero del dia de la semana\n\t\t$days_in_month = date('t',mktime(0,0,0,$month,1,$year)); //t devuelve el numero de dias del mes\n\t\t$days_in_week = 0;\n\t\t$day = 1;\n\t\t$week = 0;\n\t\t\n\t\t// Mandamos datos de los dias de la semana al arreglo\n\t\t// Imprimimos dias en blanco hasta alcanzar el primero en la semana\n\t\tfor ($days_in_week = 0; $days_in_week < $running_day; $days_in_week++){\n\t\t\t$calendar [$week][$days_in_week] = 0;\n\t\t}\n\t\t\n\t\t// Procedemos con los dias\n\t\twhile ($day <= $days_in_month) {\n\t\t// Mientras no se llegue al numero de dias del mes llenamos el arreglo\n\t\t\twhile($days_in_week < 7) { \n\t\t\t// Asignamos los dias restantes mientras no lleguemos al tope de dias de semana 7.\n\t\t\t// Al terminar los dias del mes seguimos llenando el arreglo de vacio\n\t\t\t\tif ($day <= $days_in_month){\n\t\t\t\t\t$calendar [$week][$days_in_week] = $day;\n\t\t\t\t} else {\n\t\t\t\t\t$calendar [$week][$days_in_week] = 0;\n\t\t\t\t}\n\n\t\t\t\t$days_in_week++;\n\t\t\t\t$day++;\n\t\t\t}\n\t\t\t$days_in_week = 0;\n\t\t\t$week++;\n\n\t\t}\n\t\treturn $calendar;\n\t}", "private function _get_calendar_array()\n\t{\n\t $this->all_events = $this->result->xpath(\".//event\");\n\t \n\t foreach($this->all_events as $an_event):\n\t $start_at = $an_event->xpath(\"./start-at\");\n \t $start_at = $start_at[0];\n \t $end_at = $an_event->xpath(\"./end-at\");\n \t $end_at = $end_at[0];\n \t \n \t $start_at = new DateTime($start_at);\n \t $start_at->setTimezone(new DateTimeZone('America/Chicago'));\n \t $start_at->setTime(0, 0, 0);\n \t $end_at = new DateTime($end_at);\n \t $end_at->setTimezone(new DateTimeZone('America/Chicago'));\n \t $end_at->setTime(0, 0, 0);\n \t \n \t $start_timestamp = strtotime($start_at->format('Y-m-d'));\n $end_timestamp = strtotime($end_at->format('Y-m-d'));\n \n $start_year = date(\"Y\", $start_timestamp);\n $end_year = date(\"Y\", $end_timestamp);\n $start_month = date(\"m\", $start_timestamp);\n $end_month = date(\"m\", $end_timestamp);\n $start_day = date(\"d\", $start_timestamp);\n $start_day = $start_day + 1;\n $end_day = date(\"d\", $end_timestamp);\n $end_day = $end_day + 1;\n \n if(($start_year == $this->year && $start_month == $this->month) || ($end_year == $this->year && $end_month == $this->month)):\n if($start_year == $end_year):\n if($start_month == $end_month):\n $this->_calendar_array_one($start_day, $end_day);\n else:\n if($end_month != $this->month):\n $this->_calendar_array_two($start_day);\n else:\n $this->_calendar_array_three($end_day);\n endif;\n endif;\n endif;\n endif;\n endforeach;\n \n\t foreach($this->callinks as $callinks):\n\t foreach($callinks as $key => $value):\n\t $this->combined_callinks[\"$key\"] = $value;\n\t endforeach;\n\t endforeach;\n\t}", "private function baseCalendarArray($date, $fday, $lday, $monthHolidays){\n $calendar = array();\n for($day = $fday; $day < $lday+1; $day++)\n {\n\n $calendar = $this->setDay($calendar, $day);\n $calendar = $this->setDayName($calendar, $day, $this->date, \"D\");\n\n if(!empty($event[$day]))\n $calendar = $this->setDayEvent($calendar, $day, $event[$day]);\n \n\n if($date->isWeekend())\n {\n $calendar = $this->setDayWeekend($calendar, $day, \"Weekend\");\n $calendar = $this->setDayColor($calendar, $day, 'purple');\n }\n else \n {\n $calendar = $this->setDayColor($calendar, $day, 'white');\n }\n\n if(!empty($monthHolidays[$day]))\n {\n $calendar = $this->setDayEvent($calendar, $day, $monthHolidays[$day]['event']);\n $calendar = $this->setDayColor($calendar, $day, 'pink');\n }\n \n $date->addDay();\n }\n\n return $calendar;\n }", "function get_month_days ($month) {\n $labels = array();\n $month = month_converter($month);\n $monthdays = cal_days_in_month(CAL_GREGORIAN, $month, $date->format('Y'));\n $day = $date->format('d');\n $i = 0;\n while ($i < 30) {\n if ($day <= $monthdays) {\n if (strlen($day) == 1) {\n $day = '0' . $day;\n }\n if (strlen($month) == 1) {\n $month = '0' . $month;\n }\n $labels[] = $day.'-'.$month;\n $day++;\n $i++;\n } else {\n $day = 1;\n $month++;\n $monthdays = cal_days_in_month(CAL_GREGORIAN, $month, $date->format('Y'));\n }\n }\n return $labels;\n}", "function CalendarData($month=null, $year=null) {\n if (is_null($year)) $year = date('Y');\n if (is_null($month)) $month = date('n');\n\n // RENDER\n exec(\"cal \".$month.\" \". $year, $cal); $this->dbgMsg( ' ### calendar '.$month.\" \". $year.\" :: \", $cal );\n $rxp[] = array_fill(0,7,' ');\n for ($k=2; $k < count($cal); $k++ ) {\n $xpl = explode(' ', trim( preg_replace('{\\s+}i', ' ', $cal[$k]) ) );\n if (count($xpl) && $xpl[0]!=='' ) { // $this->dbgMsg(' xploded row', $xpl, 1,1 );\n if ( $wsp=7-count($xpl) ) {\n if ($k==2) $rx = array_merge( array_fill(0, $wsp, ' ' ), $xpl );\n else $rx = array_merge( $xpl, array_fill(count($xpl)+1, $wsp, ' ' ) );\n }\n else $rx = $xpl;\n $rxp[] = $rx;\n }\n }\n\n for ($j=1; $j < count($rxp); $j++ ) {\n for ($d=0; $d<7; $d++) {\n if ($d===0) $rxp[$j-1][6] = $rxp[$j][0];\n else $rxp[$j][$d-1] = $rxp[$j][$d];\n }\n }\n $rxp[$j-1][$d-1]=' ';\n foreach ($rxp as $j=>$r) { // $this->dbgMsg( \"str_replace(' ','',implode('',\".$rxp[$j].\") )\", str_replace(' ','',implode('',$rxp[$j]) ) );\n if ( !str_replace(' ','',implode('',$rxp[$j]) ) ) unset($rxp[$j]); // NEED FOR TESTS\n } // $this->dbgMsg(' exploded calendar : ', $rxp, 1,1 );\n\n foreach ( $rxp as $i=>$arr ) {\n foreach ( $arr as $k=>$day) {\n $clr = array();\n if ( is_numeric($day) ) { // $this->dbgMsg( 'CalDay is_numeric( '.$day.' ) ', 'YES' );\n $Mm = $month<10?('0'.$month):$month;\n $Dd = $day<10?('0'.$day):$day;\n $key_date = $year.'-'.$Mm.'-'.$Dd; // $href_date = $year.'/'.$Mm.'/'.$Dd;\n $clauses = array();\n $clauses[] = \"'\".$key_date.\"' >= s.`date_start` and '\".$key_date.\"' <= s.`date_stop`\";\n $clauses[] = \"s.`status`<>'closed'\"; // $this->dbgMsg('', $clauses );\n $sql = $this->sql10.\" where \".implode(' and ', $clauses);\n $a = $this->db->sql2array( $sql ); // $this->dbgMsg(\" cal Day :: \".$sql, $a ); // выборка фильм+площадка+сеанс\n\n if ( $key_date == $this->guide->uri_parts[1] ) {\n $clr['tpl'] = '_Curr';\n $clr['Misc'] = ' style=\"color:#333;\"';\n // } elseif ( !empty($a) ) { // так - со ссылками в прошлое\n } elseif ( !empty($a) && date(\"Y-m-d\") <= $key_date ) {\n $clr['tpl'] = '_Href';\n $clr['DayHref']= 'film/'.$key_date.'/';\n if ( $k>4 ) $clr['Misc'] = ' style=\"color:#990000;\"';\n } else {\n $clr['tpl'] = '_Item';\n }\n }\n $clr['DayNum']=$day;\n $rxp[$i][$k] = $this->tpl->ParseOne( $clr, $this->tpf.':CalDay'.$clr['tpl'], '' );\n } // $rxp[$i]['trMisc'] = ' style=\"'.(($i%2==1)?'background:#eee;\"':'\"');\n $rxp[$i]['tdMisc'] = ' style=\"text-align:right;background-color:#ffffff;color:#ccc;\"';\n } // $this->dbgMsg('EXPANDED calendar : ', $rxp, 1,1 );\n return $rxp;\n }", "public function drawArray()\n\t{\n\t\t$this->outArray['days'] = array();\n\t\t$this->makeCalendarTitle();\n\t\t$this->makeCalendarHead();\n\t\t$this->makeDayHeadings();\n\t\t$this->startMonthSpacers();\n\t\t$this->makeArrayIterator();\n\t\t$this->endMonthSpacers();\t\t\n\t\t\n\t\treturn $this->outArray;\n\t}", "function get_month_days_cm ($fecha) {\n $labels = array();\n $month = month_converter($fecha->month);\n $monthdays = cal_days_in_month(CAL_GREGORIAN, $fecha->month, $fecha->year);\n $i = 0;\n while ($i < $monthdays) {\n $i++;\n $labels[] = $i;\n }\n return $labels;\n}", "function _getCalendarData( $year, $month, $day){\t\t\t\t\n\t\t$rows = $this->_listIcalEventsByMonth( $year, $month);\n \t\t\n\t\t$rowcount = count( $rows );\t\t\n\t\t$data = array();\n\t\t$data['year'] = $year;\n\t\t$data['month'] = $month;\n\t\t$month = intval($month);\n\t\tif( $month <= '9' ) {\n\t\t\t$month = '0' . $month;\n\t\t}\n\t\t$data['startday'] = $startday = (int) EventBookingHelper::getConfigValue('calendar_start_date');\t\t\n\t\t// get days in week\n\t\t$data[\"daynames\"] = array();\n\t\tfor( $i = 0; $i < 7; $i++ ) {\n\t\t\t$data[\"daynames\"][$i] = $this->_getDayName(($i+$startday)%7, true );\n\t\t}\t\t\n\t\t$data[\"dates\"]=array();\t\t\n\t\t//Start days\n\t\t$start = (( date( 'w', mktime( 0, 0, 0, $month, 1, $year )) - $startday + 7 ) % 7 );\t\t\n\t\t// previous month\n\t\t$priorMonth = $month-1;\n\t\t$priorYear = $year;\t\t\n\t\tif ($priorMonth <= 0) {\n\t\t\t$priorMonth += 12;\n\t\t\t$priorYear -= 1;\n\t\t}\t\t\t\n\t\t$dayCount=0;\n\t\tfor( $a = $start; $a > 0; $a-- ){\n\t\t\t$data[\"dates\"][$dayCount] = array();\n\t\t\t$data[\"dates\"][$dayCount][\"monthType\"] = \"prior\";\n\t\t\t$data[\"dates\"][$dayCount][\"month\"] = $priorMonth;\n\t\t\t$data[\"dates\"][$dayCount][\"year\"] = $priorYear;\n\t\t\t$data[\"dates\"][$dayCount]['countDisplay'] = 0;\n\t\t\t$dayCount++;\n\t\t}\n\t\tsort($data[\"dates\"]);\n\t\t//Current month\n\t\t$end = date( 't', mktime( 0, 0, 0,( $month + 1 ), 0, $year ));\n\t\tfor( $d = 1; $d <= $end; $d++ ){\n\t\t\t$data[\"dates\"][$dayCount]=array();\n\t\t\t// utility field used to keep track of events displayed in a day!\n\t\t\t$data[\"dates\"][$dayCount]['countDisplay']=0;\n\t\t\t$data[\"dates\"][$dayCount][\"monthType\"]=\"current\";\n\t\t\t$data[\"dates\"][$dayCount][\"month\"]=$month;\n\t\t\t$data[\"dates\"][$dayCount][\"year\"]=$year;\t\t\n\t\t\t\t\t\t\n\t\t\t$t_datenow = $this->_getNow();\n\t\t\t$now_adjusted = $t_datenow->toUnix(true);\n\t\t\tif( $month == strftime( '%m', $now_adjusted)\n\t\t\t&& $year == strftime( '%Y', $now_adjusted)\n\t\t\t&& $d == strftime( '%d', $now_adjusted)) {\n\t\t\t\t$data[\"dates\"][$dayCount][\"today\"]=true;\n\t\t\t}else{\n\t\t\t\t$data[\"dates\"][$dayCount][\"today\"]=false;\n\t\t\t}\n\t\t\t$data[\"dates\"][$dayCount]['d']=$d;\t\t\t\t\t\t\n\t\t\t$data[\"dates\"][$dayCount]['events'] = array();\n\t\t\tif( $rowcount > 0 ){\n\t\t\t\tforeach ($rows as $row) {\n\t\t\t\t\t\t$date_of_event = explode('-',$row->event_date);\n\t\t\t\t\t\t$date_of_event = (int)$date_of_event[2];\t\t\t\t\t\t\n\t\t\t\t\t\tif ($d == $date_of_event ){\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$i=count($data[\"dates\"][$dayCount]['events']);\n\t\t\t\t\t\t\t$data[\"dates\"][$dayCount]['events'][$i] = $row;\n\t\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t$dayCount++;\n\t\t}\t\n \t\n\t\t// followmonth\n\t\t$days \t= ( 7 - date( 'w', mktime( 0, 0, 0, $month + 1, 1, $year )) + $startday ) %7;\n\t\t$d\t\t= 1;\n\t\t$followMonth = $month+1;\n\t\t$followYear = $year;\n\t\tif ($followMonth>12) {\n\t\t\t$followMonth-=12;\n\t\t\t$followYear+=1;\n\t\t}\n\t\t$data[\"followingMonth\"]=array();\n\t\tfor( $d = 1; $d <= $days; $d++ ) {\n\t\t\t$data[\"dates\"][$dayCount]=array();\n\t\t\t$data[\"dates\"][$dayCount][\"monthType\"]=\"following\";\n\t\t\t$data[\"dates\"][$dayCount][\"month\"]=$followMonth;\n\t\t\t$data[\"dates\"][$dayCount][\"year\"]=$followYear;\n\t\t\t$data[\"dates\"][$dayCount]['countDisplay']=0;\n\t\t\t$dayCount++;\n\t\t}\n\t\treturn $data;\t\t\n\t}", "function getDays_ym($month, $year){\n // Start of Month\n $start = new DateTime(\"{$year}-{$month}-01\");\n $month = $start->format('F');\n\n // Prepare results array\n $results = array();\n\n // While same month\n while($start->format('F') == $month){\n // Add to array\n $day = $start->format('D');\n $sort_date = $start->format('j');\n $date = $start->format('Y-m-d');\n $results[$date] = ['day' => $day,'sort_date' => $sort_date,'date' => $date];\n\n // Next Day\n $start->add(new DateInterval(\"P1D\"));\n }\n // Return results\n return $results;\n}", "private function getDatesInMonth() {\n $viewer = $this->getViewer();\n\n $timezone = new DateTimeZone($viewer->getTimezoneIdentifier());\n\n $month = $this->month;\n $year = $this->year;\n\n list($next_year, $next_month) = $this->getNextYearAndMonth();\n\n $end_date = new DateTime(\"{$next_year}-{$next_month}-01\", $timezone);\n\n list($start_of_week, $end_of_week) = $this->getWeekStartAndEnd();\n\n $days_in_month = id(clone $end_date)->modify('-1 day')->format('d');\n\n $first_month_day_date = new DateTime(\"{$year}-{$month}-01\", $timezone);\n $last_month_day_date = id(clone $end_date)->modify('-1 day');\n\n $first_weekday_of_month = $first_month_day_date->format('w');\n $last_weekday_of_month = $last_month_day_date->format('w');\n\n $day_date = id(clone $first_month_day_date);\n\n $num_days_display = $days_in_month;\n if ($start_of_week !== $first_weekday_of_month) {\n $interim_start_num = ($first_weekday_of_month + 7 - $start_of_week) % 7;\n $num_days_display += $interim_start_num;\n\n $day_date->modify('-'.$interim_start_num.' days');\n }\n if ($end_of_week !== $last_weekday_of_month) {\n $interim_end_day_num = ($end_of_week - $last_weekday_of_month + 7) % 7;\n $num_days_display += $interim_end_day_num;\n $end_date->modify('+'.$interim_end_day_num.' days');\n }\n\n $days = array();\n\n for ($day = 1; $day <= $num_days_display; $day++) {\n $day_epoch = $day_date->format('U');\n $end_epoch = $end_date->format('U');\n if ($day_epoch >= $end_epoch) {\n break;\n } else {\n $days[] = clone $day_date;\n }\n $day_date->modify('+1 day');\n }\n\n return $days;\n }", "private function _calendar_array_two($start_d)\n\t{\n\t $days_array = array();\n $days_url_array = array();\n $days_in_month = days_in_month($this->month, $this->year) + 1;\n \n for($i = $start_d; $i < $days_in_month; $i++):\n array_push($days_array, $i);\n endfor;\n \n foreach($days_array as $day):\n $stampeddate = strtotime($this->year.\"-\".$this->month.\"-\".$day);\n array_push($days_url_array, URL::base(TRUE, TRUE).\"calendar_day/\".date(\"j\", $stampeddate).\"/\".date(\"n\", $stampeddate).\"/\".date(\"Y\", $stampeddate));\n endforeach;\n \n array_push($this->callinks, array_combine($days_array, $days_url_array));\n\t}", "public static function month_calendar($day, $month, $year) {\r\n global $langDay_of_weekNames, $langMonthNames, $langToday, $langDay, $langWeek, $langMonth, $langViewShow;\r\n\r\n $calendar_content = \"\";\r\n //Handle leap year\r\n $numberofdays = array(0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);\r\n if (($year % 400 == 0) or ($year % 4 == 0 and $year % 100 <> 0)) {\r\n $numberofdays[2] = 29;\r\n }\r\n\r\n $eventlist = Calendar_Events::get_calendar_events(\"month\", \"$year-$month-$day\");\r\n\r\n $events = array();\r\n if ($eventlist) {\r\n foreach ($eventlist as $event) {\r\n $eventday = new DateTime($event->startdate);\r\n $eventday = $eventday->format('j');\r\n if (!array_key_exists($eventday,$events)) {\r\n $events[$eventday] = array();\r\n }\r\n array_push($events[$eventday], $event);\r\n }\r\n }\r\n\r\n //Get the first day of the month\r\n $dayone = getdate(mktime(0, 0, 0, $month, 1, $year));\r\n //Start the week on monday\r\n $startdayofweek = $dayone['wday'] <> 0 ? ($dayone['wday'] - 1) : 6;\r\n\r\n $backward = array('month'=>$month == 1 ? 12 : $month - 1, 'year' => $month == 1 ? $year - 1 : $year);\r\n $foreward = array('month'=>$month == 12 ? 1 : $month + 1, 'year' => $month == 12 ? $year + 1 : $year);\r\n\r\n $calendar_content .= '<div class=\"right\" style=\"width:100%\">'.$langViewShow.':&nbsp;'.\r\n '<a href=\"#\" onclick=\"show_day(selectedday, selectedmonth, selectedyear);return false;\">'.$langDay.'</a>&nbsp;|&nbsp;'.\r\n '<a href=\"#\" onclick=\"show_week(selectedday, selectedmonth, selectedyear);return false;\">'.$langWeek.'</a>&nbsp;|&nbsp;'.\r\n '<a href=\"#\" onclick=\"show_month(selectedday, selectedmonth, selectedyear);return false;\">'.$langMonth.'</a></div>';\r\n\r\n $calendar_content .= '<table width=100% class=\"title1\">';\r\n $calendar_content .= \"<tr>\";\r\n $calendar_content .= '<td width=\"250\"><a href=\"#\" onclick=\"show_month(1,'.$backward['month'].','.$backward['year'].'); return false;\">&laquo;</a></td>';\r\n $calendar_content .= \"<td class='center'><b>{$langMonthNames['long'][$month-1]} $year</b></td>\";\r\n $calendar_content .= '<td width=\"250\" class=\"right\"><a href=\"#\" onclick=\"show_month(1,'.$foreward['month'].','.$foreward['year'].'); return false;\">&raquo;</a></td>';\r\n $calendar_content .= \"</tr>\";\r\n $calendar_content .= \"</table><br />\";\r\n $calendar_content .= \"<table class='table-default'><tr class='list-header'>\";\r\n for ($ii = 1; $ii < 8; $ii++) {\r\n $calendar_content .= \"<th class='text-center'>\" . $langDay_of_weekNames['long'][$ii % 7] . \"</th>\";\r\n }\r\n $calendar_content .= \"</tr>\";\r\n $curday = -1;\r\n $today = getdate();\r\n\r\n while ($curday <= $numberofdays[$month]) {\r\n $calendar_content .= \"<tr>\";\r\n\r\n for ($ii = 0; $ii < 7; $ii++) {\r\n if (($curday == -1) && ($ii == $startdayofweek)) {\r\n $curday = 1;\r\n }\r\n if (($curday > 0) && ($curday <= $numberofdays[$month])) {\r\n $bgcolor = $ii < 5 ? \"class='alert alert-danger'\" : \"class='odd'\";\r\n $dayheader = \"$curday\";\r\n $class_style = \"class=odd\";\r\n if (($curday == $today['mday']) && ($year == $today['year']) && ($month == $today['mon'])) {\r\n $dayheader = \"<b>$curday</b> <small>($langToday)</small>\";\r\n $class_style = \"class='today'\";\r\n }\r\n $calendar_content .= \"<td height=50 width=14% valign=top $class_style><b>$dayheader</b>\";\r\n $thisDayItems = \"\";\r\n if (array_key_exists($curday, $events)) {\r\n foreach ($events[$curday] as $ev) {\r\n $thisDayItems .= Calendar_Events::month_calendar_item($ev, Calendar_Events::$calsettings->{$ev->event_group.\"_color\"});\r\n }\r\n $calendar_content .= \"$thisDayItems</td>\";\r\n }\r\n $curday++;\r\n } else {\r\n $calendar_content .= \"<td width=14%>&nbsp;</td>\";\r\n }\r\n }\r\n $calendar_content .= \"</tr>\";\r\n }\r\n $calendar_content .= \"</table>\";\r\n\r\n /* Legend */\r\n $calendar_content .= Calendar_Events::calendar_legend();\r\n\r\n\r\n /*************************************** Bootstrap calendar ******************************************************/\r\n\r\n $calendar_content .= '<div id=\"bootstrapcalendar\"></div>';\r\n\r\n return $calendar_content;\r\n }", "protected function compileDays()\n\t{\n\t\t$arrDays = array();\n\n\t\tfor ($i=0; $i<7; $i++)\n\t\t{\n\t\t\t$intCurrentDay = ($i + $this->cal_startDay) % 7;\n\t\t\t$arrDays[$intCurrentDay] = $GLOBALS['TL_LANG']['DAYS'][$intCurrentDay];\n\t\t}\n\n\t\treturn $arrDays;\n\t}", "public function calendar($year_month = null) {\n\n if(!isset($year_month)) {\n /* Setting the data and creating the first and last day of a month */\n $start_date = date('Y-m-01');\n $end_date = date('Y-m-t');\n }\n else {\n /* Getting the data and creating the first and last day of a month */\n $start_date = date('Y-m-d', strtotime($year_month.'-01'));\n $end_date = date('Y-m-t', strtotime($year_month.'-01'));\n }\n\n /* Querying the database to get the events for all days of certain month of the year */\n $calendar = [];\n $activities = [];\n while($start_date <= $end_date) {\n\n //Temporalmente, pedido por Amparo, ¿Qué te dije?, igual y mañana se queja de que se ven los eventos sin aprobar :P\n /*\n $events = EventDCI::whereRaw('end_day >= ? and start_day <= ? and (dci_status = ? or dci_status = ?) and user_status = ?',\n array($start_date, $start_date, 'En Proceso', 'Aprobado', 'Activo'))\n ->orderBy('time')->get();\n */\n $events = EventDCI::whereRaw('end_day >= ? and start_day <= ?',\n array($start_date, $start_date))\n ->orderBy('time')->get();\n\n $activities['activities'] = $events->toArray();\n\n //ola k ase\n $activities['date'] = $start_date;\n\n array_push($calendar, $activities);\n $activities = [];\n\n $next_date = new DateTime($start_date);\n $next_date->add(new DateInterval('P1D'));\n $s_next_date = $next_date->format('Y-m-d');\n $start_date = explode(' ', $s_next_date)[0];\n }\n\n return json_encode($calendar);\n\n }", "public function daysOfMonthProvider(): array\n {\n return [\n // Time Days Match?\n ['1st January', [1], true],\n ['2nd January', [1], false],\n ['2nd January', [2], true],\n ['2nd January', [1, 2], true],\n ['31st January', [1, 8, 23, 31], true],\n ['29th February 2020', [29], true],\n ];\n }", "function get_daily_weather_for_month( \n $y = 2014, \n $m = 01 )\n {\n $days = date( 't', mktime( 0, 0, 0, $m, 1, $y ) );\n $data = array();\n for ( $i = 1; $i <= $days; $i++ ) {\n $date = date( 'Y-m-d', mktime( 0, 0, 0, $m, $i, $y ) );\n $results = $this->_db->select( \n \"SELECT * \n FROM weather_days\n WHERE date_day = '\".$date.\"'\" );\n if ( is_object( $results[0] ) ) {\n $data[$i] = $results[0];\n }\n }\n return $data;\n }", "protected function build_month_calendar(&$tpl_var)\n {\n global $page, $lang, $conf;\n\n $query='SELECT '.pwg_db_get_dayofmonth($this->date_field).' as period,\n COUNT(DISTINCT id) as count';\n $query.= $this->inner_sql;\n $query.= $this->get_date_where();\n $query.= '\n GROUP BY period\n ORDER BY period ASC';\n\n $items=array();\n $result = pwg_query($query);\n while ($row = pwg_db_fetch_assoc($result))\n {\n $d = (int)$row['period'];\n $items[$d] = array('nb_images'=>$row['count']);\n }\n\n foreach ( $items as $day=>$data)\n {\n $page['chronology_date'][CDAY]=$day;\n $query = '\n SELECT id, file,representative_ext,path,width,height,rotation, '.pwg_db_get_dayofweek($this->date_field).'-1 as dow';\n $query.= $this->inner_sql;\n $query.= $this->get_date_where();\n $query.= '\n ORDER BY '.DB_RANDOM_FUNCTION.'()\n LIMIT 1';\n unset ( $page['chronology_date'][CDAY] );\n\n $row = pwg_db_fetch_assoc(pwg_query($query));\n $derivative = new DerivativeImage(IMG_SQUARE, new SrcImage($row));\n $items[$day]['derivative'] = $derivative;\n $items[$day]['file'] = $row['file'];\n $items[$day]['dow'] = $row['dow'];\n }\n\n if ( !empty($items) )\n {\n list($known_day) = array_keys($items);\n $known_dow = $items[$known_day]['dow'];\n $first_day_dow = ($known_dow-($known_day-1))%7;\n if ($first_day_dow<0)\n {\n $first_day_dow += 7;\n }\n //first_day_dow = week day corresponding to the first day of this month\n $wday_labels = $lang['day'];\n\n if ('monday' == $conf['week_starts_on'])\n {\n if ($first_day_dow==0)\n {\n $first_day_dow = 6;\n }\n else\n {\n $first_day_dow -= 1;\n }\n\n $wday_labels[] = array_shift($wday_labels);\n }\n\n list($cell_width, $cell_height) = ImageStdParams::get_by_type(IMG_SQUARE)->sizing->ideal_size;\n\n $tpl_weeks = array();\n $tpl_crt_week = array();\n\n //fill the empty days in the week before first day of this month\n for ($i=0; $i<$first_day_dow; $i++)\n {\n $tpl_crt_week[] = array();\n }\n\n for ( $day = 1;\n $day <= $this->get_all_days_in_month(\n $page['chronology_date'][CYEAR], $page['chronology_date'][CMONTH]\n );\n $day++)\n {\n $dow = ($first_day_dow + $day-1)%7;\n if ($dow==0 and $day!=1)\n {\n $tpl_weeks[] = $tpl_crt_week; // add finished week to week list\n $tpl_crt_week = array(); // start new week\n }\n\n if ( !isset($items[$day]) )\n {// empty day\n $tpl_crt_week[] =\n array(\n 'DAY' => $day\n );\n }\n else\n {\n $url = duplicate_index_url(\n array(\n 'chronology_date' =>\n array(\n $page['chronology_date'][CYEAR],\n $page['chronology_date'][CMONTH],\n $day\n )\n )\n );\n\n $tpl_crt_week[] =\n array(\n 'DAY' => $day,\n 'DOW' => $dow,\n 'NB_ELEMENTS' => $items[$day]['nb_images'],\n 'IMAGE' => $items[$day]['derivative']->get_url(),\n 'U_IMG_LINK' => $url,\n 'IMAGE_ALT' => $items[$day]['file'],\n );\n }\n }\n //fill the empty days in the week after the last day of this month\n while ( $dow<6 )\n {\n $tpl_crt_week[] = array();\n $dow++;\n }\n $tpl_weeks[] = $tpl_crt_week;\n\n $tpl_var['month_view'] =\n array(\n 'CELL_WIDTH' => $cell_width,\n 'CELL_HEIGHT' => $cell_height,\n 'wday_labels' => $wday_labels,\n 'weeks' => $tpl_weeks,\n );\n }\n\n return true;\n }", "function draw_calendar($month,$year,$activityStartDateArray = array()){\r\n\r\n\t/* draw table */\r\n\t$calendar = '<table cellpadding=\"0\" cellspacing=\"0\" class=\"calendar\">';\r\n\r\n\t/* table headings */\r\n\t$headings = array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');\r\n\t$calendar.= '<tr class=\"calendar-row\"><td class=\"calendar-day-head\">'.implode('</td><td class=\"calendar-day-head\">',$headings).'</td></tr>';\r\n\r\n\t/* days and weeks vars now ... */\r\n\t$running_day = date('w',mktime(0,0,0,$month,1,$year));\r\n\t$days_in_month = date('t',mktime(0,0,0,$month,1,$year));\r\n\t$days_in_this_week = 1;\r\n\t$day_counter = 0;\r\n\t$dates_array = array();\r\n\r\n\t/* row for week one */\r\n\t$calendar.= '<tr class=\"calendar-row\">';\r\n\r\n\t/* print \"blank\" days until the first of the current week */\r\n\tfor($x = 0; $x < $running_day; $x++):\r\n\t\t$calendar.= '<td class=\"calendar-day-np\">&nbsp;</td>';\r\n\t\t$days_in_this_week++;\r\n\tendfor;\r\n\r\n\t/* keep going with days.... */\r\n\tfor($list_day = 1; $list_day <= $days_in_month; $list_day++):\r\n\t\t$calendar.= '<td class=\"calendar-day\"><div style=\"position:relative;height:100px;\">';\r\n\t\t\t/* add in the day number */\r\n\t\t\t$calendar.= '<div class=\"day-number\">'.$list_day.'</div>';\r\n\t\t\t\r\n\t\t\t//eventdate=startdate and enddate, depends which we talks about \r\n\r\n\t\t\t$startDate = $year.'-'.$month.'-'.$list_day;\r\n\t\t\t//$endDate = $year.'-'.$month.'-'.$list_day;\r\n\t\t\techo \"<br>the start date is\".$startDate;\r\n\t\t\t//something is wrong wit hteh startDate, the origin code has a while loop in the beginning, think why \r\n\t\t\t\r\n\t\t\tif(isset($activityStartDateArray[$startDate])) {\r\n\t\t\t\tforeach($activityStartDateArray[$startDate] as $activity) {\r\n\t\t\t\t\t$calendar.= '<div class=\"activity\">'.$activity['activityName'].'</div>';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\r\n\t\t\telse {\r\n\t\t\t\t$calendar.= str_repeat('<p>&nbsp;</p>',2);\r\n\t\t\t}\r\n\t\t$calendar.= '</div></td>';\r\n\t\tif($running_day == 6):\r\n\t\t\t$calendar.= '</tr>';\r\n\t\t\tif(($day_counter+1) != $days_in_month):\r\n\t\t\t\t$calendar.= '<tr class=\"calendar-row\">';\r\n\t\t\tendif;\r\n\t\t\t$running_day = -1;\r\n\t\t\t$days_in_this_week = 0;\r\n\t\tendif;\r\n\t\t$days_in_this_week++; $running_day++; $day_counter++;\r\n\tendfor;\r\n\t\r\n\t\r\n\t/* finish the rest of the days in the week */\r\n\tif($days_in_this_week < 8):\r\n\t\tfor($x = 1; $x <= (8 - $days_in_this_week); $x++):\r\n\t\t\t$calendar.= '<td class=\"calendar-day-np\">&nbsp;</td>';\r\n\t\tendfor;\r\n\tendif;\r\n\r\n\t/* final row */\r\n\t$calendar.= '</tr>';\r\n\t\r\n\r\n\t/* end the table */\r\n\t$calendar.= '</table>';\r\n\r\n\t/** DEBUG **/\r\n\t$calendar = str_replace('</td>','</td>'.\"\\n\",$calendar);\r\n\t$calendar = str_replace('</tr>','</tr>'.\"\\n\",$calendar);\r\n\t\r\n\t/* all done, return result */\r\n\treturn $calendar;\r\n}", "function getCalendarsForAdmin() {\n //\n // http://dev4.krubner.com/admin.php?page=admin_calendar\n //\n // this brings back 2 months worth of days to show in a calendar\n\n global $controller; \n\n $today = new DateTime(date('Y-m-d'));\n\n //Get Calendar for this week\n if(!isset($_GET['ym'])){\n $top_month = date('Y-m');\n } else {\n $top_month = $_GET['ym'];\n }\n\n $firstDayOfMonthDateTime = new DateTime($top_month.\"-01\");\n $lastDayOfMonthDateTime = clone $firstDayOfMonthDateTime;\n $lastDayOfMonthDateTime->modify(\"+1 month\");\n $lastDayOfMonthDateTime->modify(\"-1 day\");\n\n $arrayOfDaysForThisMonth = array();\n $arrayOfDaysForThisMonth = $controller->command(\"loadAllNights\", $firstDayOfMonthDateTime, $lastDayOfMonthDateTime); \n\n $calendars = array();\n $calendars[$top_month] = $arrayOfDaysForThisMonth;\n\n $firstDayOfMonthDateTime2 = clone $firstDayOfMonthDateTime;\n $firstDayOfMonthDateTime2->modify(\"+1 month\");\n $lastDayOfMonthDateTime2 = clone $firstDayOfMonthDateTime2;\n $lastDayOfMonthDateTime2->modify(\"+1 month\");\n $lastDayOfMonthDateTime2->modify(\"-1 day\");\n\n $arrayOfDaysForThisMonth = array();\n $arrayOfDaysForThisMonth = $controller->command(\"loadAllNights\", $firstDayOfMonthDateTime2, $lastDayOfMonthDateTime2); \n\n $calendars[$lastDayOfMonthDateTime2->format('Y-m')] = $arrayOfDaysForThisMonth;\n\n return $calendars; \n}", "public function CreateSelectArray()\n {\n\t\t//Make the array relative to today.... ill do later.\n\t\t$this->TodayDate = \"\";\n\t\t$this->TodaysDate = $this->GetTodaysDate();\t \t\n\t\t$days = 0;\t\t\n \n\t\t$LISTofDATES = [];\n\t\t\n\t\tfor($ya = 2020; $ya < 2040; $ya++) {\n\t\t\t$year = \"\".$ya.\"\";\n\t\t\t$LISTofDATES[$year] = [ \"January\" => 0, \"February\" => 0, \"March\" => 0, \"April\" => 0, \"May\" => 0, \"June\" => 0, \"July\" => 0, \"August\" => 0, \"September\" => 0, \"October\" => 0, \"November\" => 0, \"December\" => 0 ];\t \n\t\t}\n\n\t\tforeach ( $LISTofDATES as $Year => $Months )\n\t\t{\t\t\t\n\t\t\tfor( $Month = 1; $Month <= 12; $Month++ )\n\t\t\t{\n\t\t\t\tif ( $Month == 1 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['January'] = $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 2 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['February'] = $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 3 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['March'] = $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 4 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['April'] = $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 5 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['May'] = $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 6 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['June'] = $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 7 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['July'] = $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 8 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['August'] = $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 9 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['September'] = $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 10 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['October'] = $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 11 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['November']= $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 12 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['December'] = $days;\n\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t}\t \n\t\t}//For each Year done\t\t\n\t\t/*Should have a fully populated array of days for each month in 2 years*/\t\t\n\t\treturn json_encode($LISTofDATES);\t\t\t\t\n }", "function ShowDayOfMonth($get_month){\n\t$arr_d1 = explode(\"-\",$get_month);\n\t$xdd = \"01\";\n\t$xmm = \"$arr_d1[1]\";\n\t$xyy = \"$arr_d1[0]\";\n\t$get_date = \"$xyy-$xmm-$xdd\"; // วันเริ่มต้น\n\t//echo $get_date.\"<br>\";\n\t$xFTime1 = getdate(date(mktime(0, 0, 0, intval($xmm+1), intval($xdd-1), intval($xyy))));\n\t$numcount = $xFTime1['mday']; // ฝันที่สุดท้ายของเดือน\n\tif($numcount > 0){\n\t\t$j=1;\n\t\t\tfor($i = 0 ; $i < $numcount ; $i++){\n\t\t\t\t$xbasedate = strtotime(\"$get_date\");\n\t\t\t\t $xdate = strtotime(\"$i day\",$xbasedate);\n\t\t\t\t $xsdate = date(\"Y-m-d\",$xdate);// วันถัดไป\t\t\n\t\t\t\t $arr_d2 = explode(\"-\",$xsdate);\n\t\t\t\t $xFTime = getdate(date(mktime(0, 0, 0, intval($arr_d2[1]), intval($arr_d2[2]), intval($arr_d2[0]))));\t\n\t\t\t\t if($xFTime['wday'] == 0){\n\t\t\t\t\t $j++;\n\t\t\t\t\t\t \n\t\t\t\t\t}\n\t\t\t\t\tif($xFTime['wday'] != \"0\"){\n\t\t\t\t\t\t$arr_date[$j][$xFTime['wday']] = $xsdate;\t\n\t\t\t\t\t}\n\t\t\t\t \n\t\t\t}\n\t\t\t\n\t}//end if($numcount > 0){\n\treturn $arr_date;\t\n}", "function draw_calendar($month,$year){\r\n\t/*Naredi koledar*/\r\n\t$calendar = '<table cellpadding=\"0\" cellspacing=\"0\" class=\"calendar\">';\r\n\t\r\n\t$headings = array('Nedelja','Ponedeljek','Torek','Sreda','Cetrtek','Petek','Sobota');\r\n\t$calendar.= '<tr class=\"calendar-row\"><td class=\"calendar-day-head\">'.implode('</td><td class=\"calendar-day-head\">',$headings).'</td></tr>';\r\n\r\n\t$running_day = date('w',mktime(0,0,0,$month,1,$year));\r\n\t$days_in_month = date('t',mktime(0,0,0,$month,1,$year));\r\n\t$days_in_this_week = 1;\r\n\t$day_counter = 0;\r\n\t$dates_array = array();\r\n\r\n\t$calendar.= '<tr class=\"calendar-row\">';\r\n\r\n\tfor($x = 0; $x < $running_day; $x++):\r\n\t\t$calendar.= '<td class=\"calendar-day-np\">&nbsp;</td>';\r\n\t\t$days_in_this_week++;\r\n\tendfor;\r\n\r\n\tfor($list_day = 1; $list_day <= $days_in_month; $list_day++):\r\n\t\tif($list_day < 10) {\r\n $list_day = str_pad($list_day, 2, '0', STR_PAD_LEFT);\r\n }\r\n\t\t$month = str_pad($month, 2, '0', STR_PAD_LEFT);\r\n\t\t$event_day = $year.'-'.$month.'-'.$list_day;\r\n\r\n\t\t$calendar.= '<td class=\"calendar-day\"><div name=\"test\" style=\"height:100px; width:120px; overflow: auto; white-space:nowrap\" id=' .$event_day. ' onclick=\"modal(this.id);\">';\r\n\t\t$calendar.= '<div>'.$list_day.'</div>';\t\r\n\t\t$query = \"SELECT CONCAT_WS(' ',s.firstname,s.lastname) as Zaposleni, a.name, aa.aktivnost_id\r\n\t\t\tFROM ost_staff s, ost_agent_aktivnost aa, ost_aktivnosti a\r\n\t\t\tWHERE s.staff_id = aa.staff_id and a.id=aa.aktivnost_id and '$event_day' BETWEEN aa.aktivnost_od AND aa.aktivnost_do AND aa.aktivnost_id > 1 AND aa.aktivnost_id != 9 AND aa.aktivnost_id != 10\";\r\n\t\t\t$result = db_query($query) or die('Ne morem pridobiti rezultata!');\r\n\t\t\twhile($row = db_fetch_array($result)) {\r\n\t\t\t\t$words = explode(' ',$row['Zaposleni']);\r\n\t\t\t\t$calendar .= '<div>'.$words[0][0].'. '.$words[1][0].'. : '.$row['name'].'</div>';\r\n\t\t\t}\r\n\t\t$calendar.= '</div></td>';\r\n\t\tif($running_day == 6):\r\n\t\t\t$calendar.= '</tr>';\r\n\t\t\tif(($day_counter+1) != $days_in_month):\r\n\t\t\t\t$calendar.= '<tr class=\"calendar-row\">';\r\n\t\t\tendif;\r\n\t\t\t$running_day = -1;\r\n\t\t\t$days_in_this_week = 0;\r\n\t\tendif;\r\n\t\t$days_in_this_week++; $running_day++; $day_counter++;\r\n\tendfor;\r\n\r\n\tif($days_in_this_week < 8):\r\n\t\tfor($x = 1; $x <= (8 - $days_in_this_week); $x++):\r\n\t\t\t$calendar.= '<td class=\"calendar-day-np\">&nbsp;</td>';\r\n\t\tendfor;\r\n\tendif;\r\n\r\n\t$calendar.= '</tr>';\r\n\r\n\t$calendar.= '</table>';\r\n\r\n\t$calendar = str_replace('</td>','</td>'.\"\\n\",$calendar);\r\n\t$calendar = str_replace('</tr>','</tr>'.\"\\n\",$calendar);\r\n\r\n\treturn $calendar;\r\n}", "public static function twoDArrayforCalender()\n {\n $array = [];\n for ($i = 0; $i < 6; $i++) \n {\n $array1 = array();\n for ($j = 0; $j < 7; $j++) \n {\n //initializing array values to '-'\n $array1[$j] = '-';\n }\n //pushing array to each row of 2d array\n array_push($array, $array1);\n }\n return $array;\n }", "function build_calendar($month,$year,$dateArray) {\n $daysOfWeek = array('S','M','T','W','T','F','S');\n\n // What is the first day of the month in question?\n $firstDayOfMonth = mktime(0,0,0,$month,1,$year);\n\n // How many days does this month contain?\n $numberDays = date('t',$firstDayOfMonth);\n\n // Retrieve some information about the first day of the\n // month in question.\n $dateComponents = getdate($firstDayOfMonth);\n\n // What is the name of the month in question?\n $monthName = $dateComponents['month'];\n\n // What is the index value (0-6) of the first day of the\n // month in question.\n $dayOfWeek = $dateComponents['wday'];\n\n // Create the table tag opener and day headers\n\n $calendar = \"<table class='calendar'>\";\n $calendar .= \"<caption>$monthName $year</caption>\";\n $calendar .= \"<tr>\";\n\n // Create the calendar headers\n\n foreach($daysOfWeek as $day) {\n $calendar .= \"<th class='header'>$day</th>\";\n }\n\n // Create the rest of the calendar\n\n // Initiate the day counter, starting with the 1st.\n\n $currentDay = 1;\n\n $calendar .= \"</tr><tr>\";\n\n // The variable $dayOfWeek is used to\n // ensure that the calendar\n // display consists of exactly 7 columns.\n\n if ($dayOfWeek > 0) {\n $calendar .= \"<td colspan='$dayOfWeek'>&nbsp;</td>\";\n }\n\n $month = str_pad($month, 2, \"0\", STR_PAD_LEFT);\n\n while ($currentDay <= $numberDays) {\n\n // Seventh column (Saturday) reached. Start a new row.\n\n if ($dayOfWeek == 7) {\n\n $dayOfWeek = 0;\n $calendar .= \"</tr><tr>\";\n\n }\n\n $currentDayRel = str_pad($currentDay, 2, \"0\", STR_PAD_LEFT);\n\n $date = \"$year-$month-$currentDayRel\";\n\n $calendar .= \"<td class='day' rel='$date'>$currentDay</td>\";\n\n // Increment counters\n\n $currentDay++;\n $dayOfWeek++;\n\n }\n\n\n\n // Complete the row of the last week in month, if necessary\n\n if ($dayOfWeek != 7) {\n\n $remainingDays = 7 - $dayOfWeek;\n $calendar .= \"<td colspan='$remainingDays'>&nbsp;</td>\";\n\n }\n\n $calendar .= \"</tr>\";\n\n $calendar .= \"</table>\";\n\n return $calendar;\n\n}", "public static function day_calendar($day, $month, $year) {\r\n global $langNoEvents, $langDay, $langWeek, $langMonth, $langViewShow;\r\n\r\n $calendar_content = \"\";\r\n if (is_null($day)) {\r\n $day = 1;\r\n }\r\n $nextdaydate = new DateTime(\"$year-$month-$day\");\r\n $nextdaydate->add(new DateInterval('P1D'));\r\n $previousdaydate = new DateTime(\"$year-$month-$day\");\r\n $previousdaydate->sub(new DateInterval('P1D'));\r\n\r\n $thisday = new DateTime(\"$year-$month-$day\");\r\n $daydescription = ucfirst(format_locale_date($thisday->getTimestamp()));\r\n\r\n $backward = array('day'=>$previousdaydate->format('d'), 'month'=>$previousdaydate->format('m'), 'year' => $previousdaydate->format('Y'));\r\n $foreward = array('day'=>$nextdaydate->format('d'), 'month'=>$nextdaydate->format('m'), 'year' => $nextdaydate->format('Y'));\r\n\r\n $calendar_content .= '<div class=\"right\" style=\"width:100%\">'.$langViewShow.':&nbsp;'.\r\n '<a href=\"#\" onclick=\"show_day(selectedday, selectedmonth, selectedyear);return false;\">'.$langDay.'</a>&nbsp;|&nbsp;'.\r\n '<a href=\"#\" onclick=\"show_week(selectedday, selectedmonth, selectedyear);return false;\">'.$langWeek.'</a>&nbsp;|&nbsp;'.\r\n '<a href=\"#\" onclick=\"show_month(selectedday, selectedmonth, selectedyear);return false;\">'.$langMonth.'</a></div>';\r\n\r\n $calendar_content .= \"<table class='table-default'>\";\r\n $calendar_content .= \"<tr>\";\r\n $calendar_content .= '<td width=\"25\"><a href=\"#\" onclick=\"show_day('.$backward['day'].','.$backward['month'].','.$backward['year'].'); return false;\">&laquo;</a></td>';\r\n $calendar_content .= \"<td class='center'><b>$daydescription</b></td>\";\r\n $calendar_content .= '<td width=\"25\" class=\"right\"><a href=\"#\" onclick=\"show_day('.$foreward['day'].','.$foreward['month'].','.$foreward['year'].'); return false;\">&raquo;</a></td>';\r\n $calendar_content .= \"</tr>\";\r\n $calendar_content .= \"</table>\";\r\n\r\n $eventlist = Calendar_Events::get_calendar_events(\"day\", \"$year-$month-$day\");\r\n $calendar_content .= \"<table class='table-default'>\";\r\n\r\n $curhour = 0;\r\n $now = getdate();\r\n $today = new DateTime($now['year'].'-'.$now['mon'].'-'.$now['mday'].' '.$now['hours'].':'.$now['minutes']);\r\n if ($now['year'].'-'.$now['mon'].'-'.$now['mday'] == \"$year-$month-$day\") {\r\n $thisdayistoday = true;\r\n }\r\n else{\r\n $thisdayistoday = false;\r\n }\r\n $thishour = new DateTime($today->format('Y-m-d H:00'));\r\n $cursorhour = new DateTime(\"$year-$month-$day 00:00\");\r\n $curstarthour = \"\";\r\n\r\n foreach ($eventlist as $thisevent) {\r\n $thiseventstart = new DateTime($thisevent->start);\r\n $thiseventhour = new DateTime($thiseventstart->format('Y-m-d H:00'));\r\n if ($curstarthour != $thiseventhour) { //event date changed\r\n while($cursorhour < $thiseventhour) {\r\n if ($thisdayistoday && $thishour>=$cursorhour && intval($cursorhour->diff($thishour,true)->format('%h'))<6)\r\n $class = 'today';\r\n else\r\n $class = 'monthLabel';\r\n $calendar_content .= \"<tr><td colspan='3' class='$class'>\" . \"&nbsp;<b>\" . ucfirst($cursorhour->format('H:i')) . \"</b></td></tr>\";\r\n if (intval($cursorhour->diff($thiseventhour,true)->format('%h'))>6) {\r\n $calendar_content .= \"<tr><td colspan='3'>$langNoEvents</td></tr>\";\r\n }\r\n $cursorhour->add(new DateInterval('PT6H'));\r\n $curhour += 6;\r\n }\r\n\r\n if ($thisdayistoday && $thishour>=$cursorhour && intval($cursorhour->diff($thishour,true)->format('%h'))<6)\r\n $class = 'today';\r\n else\r\n $class = 'monthLabel';\r\n //No hour tr for the event\r\n //$calendar_content .= \"<tr><td colspan='3' class='$class'>\" . \"&nbsp;<b>\" . ucfirst($thiseventhour->format('H:i')) . \"</b></td></tr>\";\r\n if ($cursorhour <= $thiseventhour) {\r\n $cursorhour->add(new DateInterval('PT6H'));\r\n $curhour += 6;\r\n }\r\n }\r\n $calendar_content .= Calendar_Events::day_calendar_item($thisevent, 'even');\r\n $curstarthour = $thiseventhour;\r\n }\r\n /* Fill with empty days*/\r\n for($i=$curhour;$i<24;$i+=6) {\r\n if ($thisdayistoday && $thishour>=$cursorhour && intval($cursorhour->diff($thishour,true)->format('%h'))<6)\r\n $class = 'today';\r\n else\r\n $class = 'monthLabel';\r\n $calendar_content .= \"<tr><td colspan='3' class='$class'>\" . \"&nbsp;<b>\" . ucfirst($cursorhour->format('H:i')) . \"</b></td></tr>\";\r\n $calendar_content .= \"<tr><td colspan='3'>$langNoEvents</td></tr>\";\r\n $cursorhour->add(new DateInterval('PT6H'));\r\n }\r\n $calendar_content .= \"</table>\";\r\n /* Legend */\r\n $calendar_content .= Calendar_Events::calendar_legend();\r\n\r\n return $calendar_content;\r\n }", "function _makeMonth($date){\n // YYYY-MM and return an array of all the days\n // in the the month. The array that is returned\n // is in the same formate which is returned by\n // 'makeWeek' function\n $start = Carbon::parse($date)->startOfMonth();\n $end = Carbon::parse($date)->endOfMonth();\n $month = [];\n while ($start->lte($end)) {\n $carbon = $start;\n $month[] = $this->_makeDay($carbon);\n $start->addDay();\n }\n return $month;\n }", "protected function unav_days_to_dates(string $month, int $year, Room $room_for_check){\r\n $days = $this->row_to_days($month, $year, $room_for_check);\r\n// var_dump($days);\r\n \r\n if (!$days){\r\n return;\r\n }\r\n\r\n $this->year = $year;\r\n $this->active_month = $month;\r\n\r\n $unav_dates_in_month = array();\r\n \r\n foreach($days as $day){\r\n $fixed_month = ucfirst ($this->active_month); \r\n $date_string = $day.\"/\".$fixed_month.\"/\".$this->year;\r\n $new_date = DateTime::createFromFormat('d/M/Y', $date_string);\r\n// var_dump($new_date);\r\n $unav_dates_in_month[] = $new_date;\r\n// var_dump($new_date->format('d/M/Y'));\r\n\r\n //OVIM SU NAPRAVLJENI DATUMI ZA POREDJENJE OD UNESENIH ARGUMENATA\r\n }\r\n// var_dump($unav_dates_in_month);\r\n $this->$month = $unav_dates_in_month;\r\n return $unav_dates_in_month;\r\n}", "function build_calendar($month,$year,$dateArray) {\r\n $daysOfWeek = array('S','M','T','W','T','F','S');\r\n\r\n // What is the first day of the month in question?\r\n $firstDayOfMonth = mktime(0,0,0,$month,1,$year);\r\n\r\n // How many days does this month contain?\r\n $numberDays = date('t',$firstDayOfMonth);\r\n\r\n // Retrieve some information about the first day of the\r\n // month in question.\r\n $dateComponents = getdate($firstDayOfMonth);\r\n\r\n // What is the name of the month in question?\r\n $monthName = $dateComponents['month'];\r\n\r\n // What is the index value (0-6) of the first day of the\r\n // month in question.\r\n $dayOfWeek = $dateComponents['wday'];\r\n\r\n // Create the table tag opener and day headers\r\n\r\n $calendar = \"<table class='table table-bordered'>\";\r\n $calendar .= \"<caption>$monthName $year</caption>\";\r\n $calendar .= \"<tr>\";\r\n\r\n // Create the calendar headers\r\n\r\n foreach($daysOfWeek as $day) {\r\n $calendar .= \"<th class='header'>$day</th>\";\r\n } \r\n\r\n // Create the rest of the calendar\r\n\r\n // Initiate the day counter, starting with the 1st.\r\n\r\n $currentDay = 1;\r\n\r\n $calendar .= \"</tr><tr>\";\r\n\r\n // The variable $dayOfWeek is used to\r\n // ensure that the calendar\r\n // display consists of exactly 7 columns.\r\n\r\n if ($dayOfWeek > 0) { \r\n $calendar .= \"<td colspan='$dayOfWeek'>&nbsp;</td>\"; \r\n }\r\n \r\n $month = str_pad($month, 2, \"0\", STR_PAD_LEFT);\r\n \r\n while ($currentDay <= $numberDays) {\r\n\r\n // Seventh column (Saturday) reached. Start a new row.\r\n\r\n if ($dayOfWeek == 7) {\r\n\r\n $dayOfWeek = 0;\r\n $calendar .= \"</tr><tr>\";\r\n\r\n }\r\n \r\n $currentDayRel = str_pad($currentDay, 2, \"0\", STR_PAD_LEFT);\r\n \r\n $date = \"$year-$month-$currentDayRel\";\r\n\t\tif($date == date('Y-m-d')){\r\n\t\t\t$calendar .= \"<td class='col-md-1 col-xs-1' rel='$date' bgcolor='#ADD8E6'>$currentDay<br/>\";\r\n\t\t}else{\r\n\t\t\t$calendar .= \"<td class='col-md-1 col-xs-1' rel='$date'>$currentDay<br/>\";\r\n\t\t}\r\n \r\n\t\t $sql = mysql_query(\"SELECT * FROM leavesys.leave_details WHERE date = '\".$date.\"'\");\r\n\t\t while($result = mysql_fetch_array($sql)){\r\n\t\t\t $sql2 = mysql_query(\"SELECT * FROM user WHERE id = '\".$result['applicant_id'].\"'\");\r\n\t\t\t $result2 = mysql_fetch_assoc($sql2);\r\n\t\t\t\tif($result['half'] == 1){\r\n\t\t\t\t\t$c_content = \" (am)\";\r\n\t\t\t\t}else if($result['half'] == 2){\r\n\t\t\t\t\t$c_content = \" (pm)\";\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$c_content = \"\";\r\n\t\t\t\t}\r\n\t\t\t\t$calendar .= $result2['country_code'].\" - \".$result2['name'].$c_content.\"<br/>\";\r\n\t\t }\r\n\t\t $sql1 = mysql_query(\"SELECT * FROM leavesys.holiday WHERE date = '\".$date.\"'\");\r\n\t\t while($result1 = mysql_fetch_array($sql1)){\r\n\t\t\t if($result1['country'] == \"al\"){\r\n\t\t\t\t $calendar .= \"<font color='blue;'>\".$result1['name'].\"</font><br/>\";\r\n\t\t\t }else{\r\n\t\t\t\t$calendar .= \"<font color='blue;'>\".$result1['name'].\" (\".$result1['country'].\")</font><br/>\";\r\n\t\t\t }\r\n\t\t }\r\n\t\t $calendar .= \"</td>\";\r\n\r\n // Increment counters\r\n \r\n $currentDay++;\r\n $dayOfWeek++;\r\n\r\n }\r\n \r\n \r\n\r\n // Complete the row of the last week in month, if necessary\r\n\r\n if ($dayOfWeek != 7) { \r\n \r\n $remainingDays = 7 - $dayOfWeek;\r\n $calendar .= \"<td colspan='$remainingDays'>&nbsp;</td>\"; \r\n\r\n }\r\n \r\n $calendar .= \"</tr>\";\r\n\r\n $calendar .= \"</table>\";\r\n\r\n return $calendar;\r\n\r\n}", "public function getCalendarColumns() {\n $dates = array();\n $date = new DateTime();\n\n $dates[] = $date->format(\"Y-m\");\n\n for ($i = 1; $i < 12; $i++) {\n $date->modify('+1 month');\n $dates[] = $date->format(\"Y-m\");\n }\n return $dates;\n }", "function draw_calendar($month,$year,$events = array()){\n\t\t$dayofweek = array('<td class=\"calendar-header\">Sunday</td>',\n\t\t'<td class=\"calendar-header\">Monday</td>',\n\t\t'<td class=\"calendar-header\">Tuesday</td>',\n\t\t'<td class=\"calendar-header\">Wednesday</td>',\n\t\t'<td class=\"calendar-header\">Thursday</td>',\n\t\t'<td class=\"calendar-header\">Friday</td>',\n\t\t'<td class=\"calendar-header\">Saturday</td>');\n\t\t\n\t\t/* draw table\n\t\t\t- fill top row with array using implode */\n\t\t$calendar = '<table class=\"calendar\"><tr class=\"calendar-row\">'.implode($dayofweek).'</tr>';\n\t\t\n\t\t// mktime(hour,minute,second,month,day,year);\n\t\t// figures out the which day of the week 1st is based on provided $month and $year\n\t\t$startDay = date('w',mktime(0,0,0,$month,1,$year)); // return days of the week\n\t\t$days = cal_days_in_month(CAL_GREGORIAN,$month,$year);\n\t\t$daysFilled;\n\t\t$counter = 0;\n\t\n\t\t/* row 2 */\n\t\t$calendar.= '<tr class=\"calendar-row\">';\n\t\n\t\t/* print \"blank\" days until the first of the month */\n\t\tfor($i = 0; $i < $startDay; $i++){\n\t\t\t$calendar.= '<td class=\"calendar-empty\"> </td>';\n\t\t\t$daysFilled++;\n\t\t}\n\t\n\t\t/* for loop to add days */\n\t\tfor($i = 1; $i <= $days; $i++):\n\t\t\t$calendar.= '<td class=\"calendar-day\"><div style=\"position:relative;height:100px;\"><div class=\"date\">'.$i.'</div>';\n\t\t\t\n\t\t\tif ($i < 10){\n\t\t\t\t$i = \"0\".$i;\n\t\t\t}\n\t\t\t\n\t\t\t// input event into calendar\n\t\t\t$eventDay = $year.'-'.$month.'-'.$i;\n\t\t\t\tif(isset($events[$eventDay])) { // if there are events on $eventDay\n\t\t\t\t\tforeach($events[$eventDay] as $eventid) { // for each event, add to calendar\n\t\t\t\t\t\t$mysql = new mysql();\n\t\t\t\t\t\t$tripdetail = $mysql->get_specifictrip($eventid);\n\t\t\t\t\t\t$calendar.= '<div class=\"event\"';\n\t\t\t\t\t\tif($tripdetail[approval]==0){\n\t\t\t\t\t\t\t$calendar.=' style=\"color:#FF6666;\"';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif($tripdetail[approval]==-1){\n\t\t\t\t\t\t\t$calendar.=' style=\"color:#6666E0; text-decoration:line-through;\"';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$calendar.='><a style=\"text-decoration:none; color:inherit;\" href=\"?page=detail2&trip='.$tripdetail[eventid].'\"';\n\t\t\t\t\t\t$calendar.='>'.$tripdetail[destination].'</div>';\n\t\t\t\t\t}\n\t\t\t\t\t$calendar.='</td>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse {\n\t\t\t\t\t$calendar.= '<p> </p><p> </p></div></td>';\n\t\t\t\t}\n\n\t\t\tif($startDay == 6){ // if the month starts on Saturday, end current row\n\t\t\t\t$calendar.= '</tr>';\n\t\t\t\tif(($counter+1) != $days){ // if there are still days left to fill, new row\n\t\t\t\t\t$calendar.= '<tr class=\"calendar-row\">';\n\t\t\t\t}\n\t\t\t\t$startDay = -1;\n\t\t\t\t$daysFilled = 0;\n\t\t\t}\n\t\t\t$daysFilled++;\n\t\t\t$startDay++;\n\t\t\t$counter++;\n\t\tendfor;\n\t\n\t\t// finish filling in the rest of the days with blanks\n\t\tif($daysFilled < 8 && $daysFilled !=1):\n\t\t\tfor($x = 1; $x <= (8 - $daysFilled); $x++):\n\t\t\t\t$calendar.= '<td class=\"calendar-empty\"> </td>';\n\t\t\tendfor;\n\t\tendif;\n\t\n\t\t// end row, table\n\t\t$calendar.= '</tr></table>';\n\t\t\n\t\t\n\t\t// return HTML code for calendar\n\t\treturn $calendar;\n\t}", "private function makeDayEventListArray()\n\t{\n\t\t$outevents = array();\n\t\t$n = 0;\n\t\tforeach($this->eventItems as $item) {\n\t\t\tif($item['date'] == $this->curYear.'-'.$this->curMonth.'-'.$this->dayOfMonth) {\t\t\n\t\t\t\t$outevents[$n]['category'] = $item['cat'];\n\t\t\t\t\n\t\t\t\tif($item['stdurl']) {\n\t\t\t\t\t$outevents[$n]['url'] = $item['url'].'?id='.$item['id'];\n\t\t\t\t} else {\n\t\t\t\t\t$outevents[$n]['url'] = $item['url'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$outevents[$n]['summary'] = $item['text'];\n\t\t\t\t$outevents[$n]['description'] = $item['desc'];\n\t\t\t\t$outevents[$n]['categorycolor'] = (strlen($item['catcolor']) > 0 ? str_replace('#','',$item['catcolor']) : '#eeeeee');\n\t\t\t}\n\t\t\t$n++;\n\t\t}\n\t\t\n\t\tif(count($outevents)) {\n\t\t\treturn $outevents;\n\t\t}\n\t\treturn false;\n\t}", "private function makeHTMLIterator()\n\t{\n\t\t$this->weekDayNum = $this->firstDayOfTheMonth+1;\n\t\tfor($this->dayOfMonth; $this->dayOfMonth <= $this->daysInMonth; $this->dayOfMonth++) {\n\t\t\t// Set the default style\n\t\t\t$style = 'class=\"normalDay\"';\n\t\t\t\n\t\t\t// Set the style to a weekend day style\n\t\t\tif(($this->weekDayNum == 8)||($this->weekDayNum == 7)) {\n\t\t\t\t$style = 'class=\"weekendDay\"';\n\t\t\t}\n\t\t\t\n\t\t\t// Set the style to a current day style\n\t\t\tif($this->curDay == $this->dayOfMonth) {\n\t\t\t\t$style = 'class=\"currentDay\"';\n\t\t\t}\n\t\t\t\n\t\t\t// If the current day is Sunday, add a new row\n\t\t\tif($this->weekDayNum == 8) {\n\t\t\t\t$this->calWeekDays .= \"\\t</tr>\\n\\t<tr>\\n\";\n\t\t\t\t$this->weekDayNum = 1;\n\t\t\t}\n\n\t\t\t// Draw days\n\t\t\t$this->calWeekDays .= \"\\t\\t<td valign=\\\"top\\\" \".$style.'>'.$this->dayOfMonth;\n\t\t\t\n\t\t\tif($this->addWeekDay) {\n\t\t\t\t$this->calWeekDays .= \"|\".$this->weekDayNum;\n\t\t\t}\n\t\t\t\n\t\t\tif(strlen($this->addEvtDest) > 0) {\n\t\t\t\t$addevtimg = (strlen($this->addEvtImg) > 0 ? '<img src=\"'.$this->addEvtImg.'\" class=\"addevtimg\" />' : '+');\n\t\t\t\t$this->calWeekDays .= '[<a href=\"'.$this->addEvtDest.'?date='.$this->curYear.'-'.$this->curMonth.'-'.$this->dayOfMonth.'\" title=\"Add Event\" class=\"addevt\">'.$addevtimg.'</a>]';\n\t\t\t}\n\t\t\t\n\t\t\t$this->calWeekDays .= \" \".$this->makeDayEventListHTML().\"</td>\\n\";\n\t\t\t\n\t\t\t$this->weekDayNum++;\n\t\t}\n\t}", "public function print_blanc_calendar(string $month, int $year){\r\n \r\n $month_days = static::no_of_days_in_month($month, $year); \r\n $empty_days = $this->empty_days($month, $year);\r\n for ($i=1; $i<=$empty_days; $i++){\r\n echo \"<div class='cal_date empty_date'> </div>\";\r\n }\r\n \r\n \r\n for ($i=1; $i<=$month_days; $i++){\r\n echo \"<div class='cal_date cal_blanc_date'>\";\r\n echo $i;\r\n echo \"</div>\";\r\n }\r\n }", "private function _calendar_array_one($start_d, $end_d)\n\t{\n\t $days_array = array();\n $days_url_array = array();\n for($i = $start_d; $i <= $end_d; $i++):\n array_push($days_array, $i);\n endfor;\n \n foreach($days_array as $day):\n $stampeddate = strtotime($this->year.\"-\".$this->month.\"-\".$day);\n array_push($days_url_array, URL::base(TRUE, TRUE).\"calendar_day/\".date(\"j\", $stampeddate).\"/\".date(\"n\", $stampeddate).\"/\".date(\"Y\", $stampeddate));\n endforeach;\n \n array_push($this->callinks, array_combine($days_array, $days_url_array));\n\t}", "public function buildCalendar($month, $year);", "public static function create($month, $year){\n\t\t$calendar = array(array());\n\t\t$cal_size = 0;\n\t\t$week = 0;\n\t\t$cell = 1;\n\t\t$month_name = \"\";\n\t\t\n\t\t//Creamos el arreglo Calendario\n\t\t$calendar = self::create_calendar($month,$year,$calendar);\n\t // Longitud del Calendario incluyendo espacios en blanco, con llamada recursiva para que sea completo;\n\t\t// Al ser recursivo nos suma tambien los renglones que son los arrays padres de las celdas, entonces restamos\n\t\t$cal_size =\tcount($calendar,COUNT_RECURSIVE) - count($calendar); \n\t\t//Imprime $month and $year\n\t\tswitch ($month) { // Obtenemos el nombre en castellano del mes\n\t\t\tcase 1 : $month_name = \"ENERO\";\n\t\t\t\tbreak;\n\t\t\tcase 2 : $month_name = \"FEBRERO\";\n\t\t\t\tbreak;\n\t\t\tcase 3 : $month_name = \"MARZO\";\n\t\t\t\tbreak;\n\t\t\tcase 4 : $month_name = \"ABRIL\";\n\t\t\t\tbreak;\n\t\t\tcase 5 : $month_name = \"MAYO\";\n\t\t\t\tbreak;\n\t\t\tcase 6 : $month_name = \"JUNIO\";\n\t\t\t\tbreak;\n\t\t\tcase 7 : $month_name = \"JULIO\";\n\t\t\t\tbreak;\n\t\t\tcase 8 : $month_name = \"AGOSTO\";\n\t\t\t\tbreak;\n\t\t\tcase 9 : $month_name = \"SEPTIEMBRE\";\n\t\t\t\tbreak;\n\t\t\tcase 10 : $month_name = \"OCTUBRE\";\n\t\t\t\tbreak;\n\t\t\tcase 11 : $month_name = \"NOVIEMBRE\";\n\t\t\t\tbreak;\n\t\t\tcase 12 : $month_name = \"DICIEMBRE\";\n\t\t\t\n\t\t}\n\t\t//Creamos las celdas de los dias de la semana\n\t\twhile ($cell <= $cal_size){\n\t\t\tself::$html .= \"<tr>\";\n\t\t\tfor ($day=0;$day<7;$day++){\n\t\t\t\tif ($calendar[$week][$day]!=0){\n\t\t\t\t\tself::$html .= \"<td>\".$calendar[$week][$day].\"</td>\";\n\t\t\t\t} else { self::$html .= \"<td></td>\"; }\n\t\t\t\t$cell++;\n\t\t\t}\n\t\t\t$week++;\n\t\t\tself::$html .= \"</tr>\";\n\t\t}\n\t\tself::$html .= \"<tr><th colspan='7'>\".$month_name.\" \".$year.\"</th></tr>\";\n\n\t\treturn self::$html;\n\t}", "function build_month_days($month, $number_of_days) {\r\n $days_of_month_html = '<tr class=\"week-day\">';\r\n \r\n $days_in_week = 1;\r\n for ($days = 1; $days <= $number_of_days; $days++) {\r\n\r\n // Split the weeks in rows\r\n if ($days_in_week == 8) {\r\n $days_of_month_html = $days_of_month_html . '</tr>';\r\n $days_of_month_html = $days_of_month_html . '<tr class=\"week-day\">'; \r\n $days_in_week = 1;\r\n }\r\n\r\n // Render days of week in the correct position\r\n if ($days == 1) {\r\n $initial_position = get_first_day($month);\r\n for($i = 1; $i < $initial_position; $i++) {\r\n $days_of_month_html = $days_of_month_html . '<td class=\"day\"></td>';\r\n $days_in_week++;\r\n }\r\n if ($initial_position == 1) {\r\n $days_of_month_html = $days_of_month_html . '<td class=\"day sunday\">'.$days.'</td>';\r\n } else {\r\n $days_of_month_html = $days_of_month_html . '<td class=\"day\">'.$days.'</td>';\r\n }\r\n } else if ($days_in_week == 1) {\r\n $days_of_month_html = $days_of_month_html . '<td class=\"day sunday\">'.$days.'</td>';\r\n } else {\r\n $days_of_month_html = $days_of_month_html . '<td class=\"day\">'.$days.'</td>'; \r\n }\r\n\r\n $days_in_week++;\r\n }\r\n $days_of_month_html = $days_of_month_html . '</tr>';\r\n \r\n return $days_of_month_html;\r\n }", "function drawCalendar($month, $year) {\n $first = mktime(0,0,0,$month,1,$year); // timestamp for first of the month\n $offset = date('w', $first); // what day of the week we start counting on\n $daysInMonth = date('t', $first);\n $monthName = date('F', $first);\n $weekDays = array('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat');\n $eventDays = getEventDays($month, $year);\n \n // Start drawing calendar\n $out = \"<table id=\\\"myCalendar\\\">\\n\";\n $out .= \"<tr><th colspan=\\\"3\\\">$monthName $year</th></tr>\\n\";\n $out .= \"<tr>\";\n foreach ($weekDays as $wd) $out .= \"<td class=\\\"weekDays\\\">$wd</td>\\n\";\n\n\n // Previous month link\n $prevTS = strtotime(\"$year-$month-01 -1 month\"); // timestamp of the first of last month\n $pMax = date('t', $prevTS);\n $pDay = ($day > $pMax) ? $pMax : $day;\n list($y, $m) = explode('-', date('Y-m', $prevTS)); \n $pMax = date('t', $prevTS);\n $pDay = ($day > $pMax) ? $pMax : $day;\n list($y, $m) = explode('-', date('Y-m', $prevTS));\n echo \"<p>\";\n echo \"<a href=\\\"?year=$year&month=$m&day=$pDay\\\"><< Prev</a>\\n\";\n\n // Next month link\n $nextTS = strtotime(\"$year-$month-01 +1 month\");\n $nMax = date('t', $nextTS);\n $nDay = ($day > $nMax) ? $nMax : $day;\n list($y, $m) = explode('-', date('Y-m', $nextTS));\n echo \"<a href=\\\"?year=$y&month=$m&day=$nDay\\\">Next >></a>\\n\";\n echo \"</p>\";\n\n\n // Build Previous and Next Links from untitled-6\n //$previous_link = \"<a href=\\\"\".$_SERVER['PHP_SELF'].\"?date=\";\n //if($month == 1){\n // $previous_link .= mktime(0,0,0,12,$day,($year -1));\n //} else {\n // $previous_link .= mktime(0,0,0,($month -1),$day,$year);\n //}\n\n //$previous_link .= \"\\\"><< </a>\";\n\n //$next_link = \"<a href=\\\"\".$_SERVER['PHP_SELF'].\"?date=\";\n //if($month == 12){\n // $next_link .= mktime(0,0,0,1,$day,($year + 1));\n //} else {\n // $next_link .= mktime(0,0,0,($month +1),$day,$year);\n //}\n //$next_link .= \"\\\"> >></a>\";\n\n $i = 0;\n for ($d = (1 - $offset); $d <= $daysInMonth; $d++) {\n if ($i % 7 == 0) $out .= \"<tr>\\n\"; // Start new row\n if ($d < 1) $out .= \"<td class=\\\"nonMonthDay\\\"> </td>\\n\";\n else {\n if (in_array($d, $eventDays)) {\n $out .= \"<td class=\\\"monthDay\\\">\\n\";\n $out .= \"<a href=\\\"?year=$year&month=$month&day=$d\\\">$d</a>\\n\";\n $out .= \"</td>\\n\";\n } else $out .= \"<td class=\\\"monthDay\\\">$d</td>\\n\";\n }\n ++$i; // Increment position counter\n if ($i % 7 == 0) $out .= \"</tr>\\n\"; // End row on the 7th day\n }\n \n // Round out last row if we don't have a full week\n if ($i % 7 != 0) {\n for ($j = 0; $j < (7 - ($i % 7)); $j++) {\n $out .= \"<td class=\\\"nonMonthDay\\\"> </td>\\n\";\n }\n $out .= \"</tr>\\n\";\n }\n \n $out .= \"</table>\\n\";\n \n return $out;\n }", "private function generate_calendar($year, $month){\n\t\t// --- calculations\n\t\t$first_of_month = gmmktime(0,0,0,$month,1,$year);\n\t\t/* remember that mktime will automatically correct if invalid dates are entered\n\t\t for instance, mktime(0,0,0,12,32,1997) will be the date for Jan 1, 1998\n\t\t this provides a built in \"rounding\" feature to generate_calendar() */\n\t\n\t\t$day_names = array(); // generate all the day names according to the current locale\n\t\tfor($n=0,$t=(3+$this->firstDay)*86400; $n<7; $n++,$t+=86400) // January 4, 1970 was a Sunday\n\t\t\t$day_names[$n] = ucfirst(gmstrftime('%A',$t)); // %A means full textual day name\n\t\n\t\tlist($month, $year, $month_name, $weekday) = explode(',',gmstrftime('%m,%Y,%B,%w',$first_of_month));\n\t\t$weekday = ($weekday + 7 - $this->firstDay) % 7; // adjust for $firstDay\n\t\t$title = htmlentities(ucfirst($month_name)).'&nbsp;'.$year; // note that some locales don't capitalize month and day names\n\t\n\t\t// --- make calendar header\n\t\t@list($p, $pl) = each($this->canonicals); @list($n, $nl) = each($this->canonicals); // previous and next links, if applicable\n\t\tif($p) $p = '<div class=\"prev\">'.($pl ? '<a href=\"'.htmlspecialchars($pl).'\">'.$p.'</a>' : $p).'</div>&nbsp;';\n\t\tif($n) $n = '&nbsp;<div class=\"next\">'.($nl ? '<a href=\"'.htmlspecialchars($nl).'\">'.$n.'</a>' : $n).'</div>';\n\t\t$calendar = '<div class=\"calendar\"><div class=\"month\">'.$p.($this->monthLink ? '<a href=\"'.htmlspecialchars($this->monthLink).'\">'.$title.'</a>' : $title).$n.\"</div>\";\n\n\t\t// --- make days of the week titles\n\t\tif($this->dayNameLength){ //if the day names should be shown ($day_name_length > 0)\n\t\t\tforeach($day_names as $d)\n\t\t\t\t$calendar .= '<div class=\"box '.htmlentities($d).'\">'.htmlentities($this->dayNameLength < 4 ? substr($d,0,$this->dayNameLength) : $d).'</div>';\n\t\t\t$calendar .= '<br><div class=\"dom\">';\n\t\t}\n\n\t\t// --- make days of the month\n\t\tif($weekday > 0) $calendar .= '<div class=\"box offset'.$weekday.'\">&nbsp;</div>'; // initial 'empty' days\n\t\tfor($day=1,$days_in_month=gmdate('t',$first_of_month); $day<=$days_in_month; $day++,$weekday++){\n\t\t\tif($weekday == 7) $weekday = 0; // start a new week\n\n\t\t\tif(isset($this->days[$day]) and is_array($this->days[$day])){\n\t\t\t\t@list($link, $classes, $content) = $this->days[$day];\n\t\t\t\tif(is_null($content)) $content = $day;\n\t\t\t\t$calendar .= '<div class=\"box'.($classes ? ' '.htmlspecialchars($classes).'\">' : '\">').\n\t\t\t\t\t($link ? '<a href=\"'.htmlspecialchars($link).'\">'.$content.'</a>' : $content).'</div>';\n\t\t\t}\n\t\t\telse $calendar .= '<div class=\"box\">'.$day.'</div>';\n\t\t}\n\t\tif($weekday != 7) $calendar .= '<div class=\"box offset'.(7-$weekday).'\">&nbsp;</div>'; // remaining \"empty\" days\n\n\t\treturn $calendar.'<br class=\"clear\"/></div></div>';\n\t}", "function _makeDay($carbon){\n $_date = $carbon->year.'-'.$carbon->month.'-'.$carbon->day;\n $day = $carbon->englishDayOfWeek;\n return [\n 'date' => $carbon->day,\n 'month' => $carbon->month,\n 'year' => $carbon->year,\n 'english_month' => $carbon->englishMonth,\n 'full_date' => $_date,\n 'day' => $day,\n 'items' => [],\n ];\n }", "public function month_list()\n\t{\n\t\t// -------------------------------------\n\t\t// Load 'em up\n\t\t// -------------------------------------\n\n\t\t$this->load_calendar_datetime();\n\t\t$this->load_calendar_parameters();\n\n\t\t// -------------------------------------\n\t\t// Prep the parameters\n\t\t// -------------------------------------\n\n\t\t$params = array(\n\t\t\tarray(\n\t\t\t\t'name'\t\t=> 'date_range_start',\n\t\t\t\t'required'\t=> FALSE,\n\t\t\t\t'type'\t\t=> 'date',\n\t\t\t\t'default'\t=> 'year-01-01'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name'\t\t=> 'date_range_end',\n\t\t\t\t'required'\t=> FALSE,\n\t\t\t\t'type'\t\t=> 'date'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name'\t\t=> 'limit',\n\t\t\t\t'required'\t=> FALSE,\n\t\t\t\t'type'\t\t=> 'integer',\n\t\t\t\t'default'\t=> 12\n\t\t\t)\n\t\t);\n\n//ee()->TMPL->log_item('Calendar: Processing parameters');\n\n\t\t$this->add_parameters($params);\n\n\t\t$today = $this->CDT->date_array();\n\n\t\t$this->CDT->change_ymd($this->P->value('date_range_start', 'ymd'));\n\t\t$this->CDT->set_default($this->CDT->datetime_array());\n\n\t\tif ($this->P->value('date_range_end') === FALSE)\n\t\t{\n\t\t\t$this->P->set(\n\t\t\t\t'date_range_end',\n\t\t\t\t$this->CDT->add_month($this->P->value('limit'))\n\t\t\t);\n\n\t\t\t$this->CDT->reset();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->P->set('limit', 9999);\n\t\t}\n\n\t\t$dir = (\n\t\t\t$this->P->value('date_range_end', 'ymd') >\n\t\t\t\t$this->P->value('date_range_start', 'ymd')\n\t\t) ? 1 : -1;\n\n\t\t$output = '';\n\t\t$count = 0;\n\n//ee()->TMPL->log_item('Calendar: Looping');\n\n\t\tdo\n\t\t{\n\t\t\t$vars['conditional']\t= array(\n\t\t\t\t'is_current_month'\t\t=>\t(\n\t\t\t\t\t$this->CDT->year == $today['year'] AND\n\t\t\t\t\t$this->CDT->month == $today['month']\n\t\t\t\t),\n\t\t\t\t'is_not_current_month'\t=>\t(\n\t\t\t\t\t$this->CDT->year == $today['year'] AND\n\t\t\t\t\t$this->CDT->month == $today['month']\n\t\t\t\t) ? FALSE : TRUE,\n\t\t\t\t'is_current_year'\t\t=>\t(\n\t\t\t\t\t$this->CDT->year == $today['year']\n\t\t\t\t) ? TRUE : FALSE,\n\t\t\t\t'is_not_current_year'\t=>\t(\n\t\t\t\t\t$this->CDT->year == $today['year']\n\t\t\t\t) ? FALSE : TRUE\n\t\t\t);\n\n\t\t\t$vars['single']\t= array(\n\t\t\t\t'year'\t=> $this->CDT->year,\n\t\t\t\t'month'\t=> $this->CDT->month\n\t\t\t);\n\n\t\t\t$vars['date']\t= array(\n\t\t\t\t'month'\t\t\t=> $this->CDT->datetime_array(),\n\t\t\t\t'date'\t\t\t=> $this->CDT->datetime_array(),\n\t\t\t);\n\n\t\t\t$output .= $this->swap_vars($vars, ee()->TMPL->tagdata);\n\t\t\t$this->CDT->add_month($dir);\n\t\t\t$count++;\n\t\t}\n\t\twhile (\n\t\t\t$count < $this->P->value('limit') AND\n\t\t\t$this->CDT->ymd < $this->P->value('date_range_end', 'ymd')\n\t\t);\n\n\t\treturn $output;\n\t}", "private function _calendar_array_three($end_d)\n\t{\n\t $days_array = array();\n $days_url_array = array();\n \n for($i = 1; $i <= $end_d; $i++):\n array_push($days_array, $i);\n endfor;\n \n foreach($days_array as $day):\n $stampeddate = strtotime($this->year.\"-\".$this->month.\"-\".$day);\n array_push($days_url_array, URL::base(TRUE, TRUE).\"calendar_day/\".date(\"j\", $stampeddate).\"/\".date(\"n\", $stampeddate).\"/\".date(\"Y\", $stampeddate));\n endforeach;\n \n array_push($this->callinks, array_combine($days_array, $days_url_array));\n\t}", "private function make_calendar($year, $month){\n\t\t$first_of_month = gmmktime(0,0,0,$month,1,$year);\n\t\t#remember that mktime will automatically correct if invalid dates are entered\n\t\t# for instance, mktime(0,0,0,12,32,1997) will be the date for Jan 1, 1998\n\t\t# this provides a built in \"rounding\" feature to generate_calendar()\n\t\n\t\t$day_names = array(); #generate all the day names according to the current locale\n\t\tfor($n=0,$t=(3+$this->firstDay)*86400; $n<7; $n++,$t+=86400) #January 4, 1970 was a Sunday\n\t\t\t$day_names[$n] = ucfirst(gmstrftime('%A',$t)); #%A means full textual day name\n\t\n\t\tlist($month, $year, $month_name, $weekday) = explode(',',gmstrftime('%m,%Y,%B,%w',$first_of_month));\n\t\t$weekday = ($weekday + 7 - $this->firstDay) % 7; #adjust for $firstDay\n\t\t$title = htmlentities(ucfirst($month_name)).'&nbsp;'.$year; #note that some locales don't capitalize month and day names\n\t\n\t\t#Begin calendar. Uses a real <caption>. See http://diveintomark.org/archives/2002/07/03\n\t\t@list($p, $pl) = each($this->canonicals); @list($n, $nl) = each($this->canonicals); #previous and next links, if applicable\n\t\tif($p) $p = '<span class=\"calendar-prev\">'.($pl ? '<a href=\"'.htmlspecialchars($pl).'\">'.$p.'</a>' : $p).'</span>&nbsp;';\n\t\tif($n) $n = '&nbsp;<span class=\"calendar-next\">'.($nl ? '<a href=\"'.htmlspecialchars($nl).'\">'.$n.'</a>' : $n).'</span>';\n\t\t$calendar = '<table class=\"calendar\">'.\"\\n\".\n\t\t\t'<caption class=\"calendar-month\">'.$p.($this->monthLink ? '<a href=\"'.htmlspecialchars($this->monthLink).'\">'.$title.'</a>' : $title).$n.\"</caption>\\n<tr>\";\n\t\n\t\tif($this->dayNameLength){ #if the day names should be shown ($day_name_length > 0)\n\t\t\t#if day_name_length is >3, the full name of the day will be printed\n\t\t\tforeach($day_names as $d)\n\t\t\t\t$calendar .= '<th abbr=\"'.htmlentities($d).'\">'.htmlentities($this->dayNameLength < 4 ? substr($d,0,$this->dayNameLength) : $d).'</th>';\n\t\t\t$calendar .= \"</tr>\\n<tr>\";\n\t\t}\n\t\n\t\tif($weekday > 0) $calendar .= '<td colspan=\"'.$weekday.'\">&nbsp;</td>'; #initial 'empty' days\n\t\tfor($day=1,$days_in_month=gmdate('t',$first_of_month); $day<=$days_in_month; $day++,$weekday++){\n\t\t\tif($weekday == 7){\n\t\t\t\t$weekday = 0; #start a new week\n\t\t\t\t$calendar .= \"</tr>\\n<tr>\";\n\t\t\t}\n\t\t\tif(isset($this->days[$day]) and is_array($this->days[$day])){\n\t\t\t\t@list($link, $classes, $content) = $this->days[$day];\n\t\t\t\tif(is_null($content)) $content = $day;\n\t\t\t\t$calendar .= '<td'.($classes ? ' class=\"'.htmlspecialchars($classes).'\">' : '>').\n\t\t\t\t\t($link ? '<a href=\"'.htmlspecialchars($link).'\">'.$content.'</a>' : $content).'</td>';\n\t\t\t}\n\t\t\telse $calendar .= \"<td>$day</td>\";\n\t\t}\n\t\tif($weekday != 7) $calendar .= '<td colspan=\"'.(7-$weekday).'\">&nbsp;</td>'; #remaining \"empty\" days\n\t\n\t\treturn $calendar.\"</tr>\\n</table>\\n\";\n\t}", "public function SelectArrayStartingToday()\n {\n\t\t$ListOfDates;\n\t\t\n\t\t\n\t\t$TodayDay = $this->GetThisDay();\n\t\t$ThisMonth = date('m');\n\t\t$ThisYear = $this->GetThisYear();\n\t\t$NextYear = $ThisYear+1;\n\t\t$ListOfDates = [ $ThisYear, $NextYear ];\n\t\t\n\t\t$rangeMonths = array();\n\t\tfor ($i = $ThisMonth; $i <= 12; $i++ )\n\t\t{\n\t\t\tarray_push( $rangeMonths, $i);\n\t\t}\n\t\t$ListOfDates[$ThisYear] = $rangeMonths;\n\t\t\n\t\t$rangeMonths = array();\n\t\tfor ($i = 1; $i <= 12; $i++ )\n\t\t{\n\t\t\tarray_push($rangeMonths, $i );\n\t\t}\n\t\t$ListOfDates[$NextYear] = $rangeMonths;\n\t\t\n\t\t//Get the number of days in this month\n\t\t$NumberofDays = cal_days_in_month(CAL_GREGORIAN, $ThisMonth, $ThisYear);\n\t\t\n\t\t//Subtract NumberofDays by $TodayDay to get days left. 31 - 14 = 17days left 15, 16 , 17 to 31 \n\t\t$Daysleft = $NumberofDays - $TodayDay;\n\t\t$rangeofdaysleft = array(); // will hold the array of days left in the month, including today.\n\t\t\n\t\tfor( $i = $TodayDay; $i <= $NumberofDays; $i++ )\n\t\t{\n\t\t\tarray_push($rangeofdaysleft, $i);\n\t\t}\n\t\n\t\t//$ListOfDates[$ThisYear];\n\t\tfor( $i = $ThisMonth; $i <= 12 ; $i++)\n\t\t{\n\t\t\tif($i == $ThisMonth)\n\t\t\t{\n\t\t\t\t$ListOfDates[$ThisYear][$i] = $rangeofdaysleft;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$range = array();\n\t\t\t\t$MaxDays = cal_days_in_month(CAL_GREGORIAN, $i, $ThisYear);\n\t\t\t\tfor($d = 1; $d <= $MaxDays; $d++)\n\t\t\t\t{\n\t\t\t\t\tarray_push($range, $d);\n\t\t\t\t}\n\t\t\t\t$ListOfDates[$ThisYear][$i] = $range;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t//array_push($ListOfDates, $arrCurrentYear);\n\t\t\n\t\n\t\tfor( $i = 1 ; $i <= 12; $i++\t)\n\t\t{\n\t\t\t$range = array();\n\t\t\t$MaxDays = cal_days_in_month(CAL_GREGORIAN, $i, $NextYear);\n\t\t\tfor($d = 1; $d <= $MaxDays; $d++)\n\t\t\t{\n\t\t\t\tarray_push($range, $d);\n\t\t\t}\n\t\t\t$ListOfDates[$NextYear][$i] = $range;\n\t\t\t\n\t\t}\n\t\t//array_push($ListOfDates, $arrNextYear);\n\t\t\n\t\t\n\t\t\n\t\treturn json_encode($ListOfDates);\n\t\n\t}", "function createNextMonthArray() { \n\t\t$date = date(\"Ymd\");\n\t\t$result = array($date);\n\n\n\t\tfor ($i=0; $i < 5; $i++) { \n\t\t\t$timestamp = strtotime($date);\n\t\t\t$date =date(\"Ymd\", strtotime('+1 day', $timestamp));\n\t\t\tarray_push($result,$date);\n\t\t}\n\t\treturn $result;\n\t}", "function getMonthArray()\n{\n\t$arrMonths = array();\n\n\tfor ($i=1; $i<13; $i++)\n\t{\n\t\t$arrMonths[$i] = date('M', mktime(0, 0, 1, $i, 1));\n\t}\n\t\n\treturn $arrMonths;\n}", "function get_event_days(){\r\n\t\t$event_days = array();\r\n\r\n\t\tforeach($this->merged_feed_data as $item){\r\n\t\t\t$start_date = $item->get_start_date();\r\n\r\n\t\t\t//Round start date to nearest day\r\n\t\t\t$start_date = mktime(0, 0, 0, date('m', $start_date), date('d', $start_date) , date('Y', $start_date));\r\n\r\n\t\t\tif(!isset($event_days[$start_date])){\r\n\t\t\t\t//Create new array in $event_days for this date (only dates with events will go into array, so, for \r\n\t\t\t\t//example $event_days[26] will exist if 26th of month has events, but won't if it has no events)\r\n\t\t\t\t//(Now uses unix timestamp rather than day number, but same concept applies).\r\n\t\t\t\t$event_days[$start_date] = array();\r\n\t\t\t}\r\n\r\n\t\t\t//Push event into array just created (may be another event for this date later in feed)\r\n\t\t\tarray_push($event_days[$start_date], $item);\r\n\t\t}\r\n\r\n\t\treturn $event_days;\r\n\t}", "function getDay($month, $year)\n {\n if ( empty($year) ) {\n $year = date('Y');\n }\n $day_arr = array();\n if ( $month != 0 ) {\n $number = date('t', mktime(0, 0, 0, $month, 1, $year));\n for ( $i = 1; $i <= $number; $i++ ) {\n $i = sprintf('%02d', $i);\n $day_arr[$i] = $i;\n }\n }\n\n return $day_arr;\n }", "function draw_calendar($month,$year,$cal,$available_list,$price_list){\n\n /* draw table */\n $calendar = '<table cellpadding=\"0\" cellspacing=\"0\" class=\"calendar\">';\n\n /* table headings */\n $headings = array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');\n $calendar.= '<tr class=\"calendar-row\"><td class=\"calendar-day-head\">'.implode('</td><td class=\"calendar-day-head\">',$headings).'</td></tr>';\n\n /* days and weeks vars now ... */\n $running_day = date('w',mktime(0,0,0,$month,1,$year));\n $days_in_month = date('t',mktime(0,0,0,$month,1,$year));\n $days_in_this_week = 1;\n $day_counter = 0;\n $dates_array = array();\n\n /* row for week one */\n $calendar.= '<tr class=\"calendar-row\">';\n\n /* print \"blank\" days until the first of the current week */\n for($x = 0; $x < $running_day; $x++):\n $calendar.= '<td class=\"calendar-day-np\"> </td>';\n $days_in_this_week++;\n endfor;\n\n /* keep going with days.... */\n for($list_day = 1; $list_day <= $days_in_month; $list_day++):\n // echo \" cal: \".($available_list[$list_day - 1] == 't').\"\\n\";\n if ($available_list[$list_day - 1] == 't')\n {\n $calendar.= '<td class=\"calendar-day\" bgcolor=\"#00FF00\">';\n } else {\n $calendar.= '<td class=\"calendar-day\" bgcolor=\"#FF0000\">';\n\n }\n \n\n /* add in the day number */\n $calendar.= '<div class=\"day-number\" ><font size=\"+3\">'.$list_day.\"</font> \".$price_list[$list_day-1].'</div>';\n\n /** QUERY THE DATABASE FOR AN ENTRY FOR THIS DAY !! IF MATCHES FOUND, PRINT THEM !! **/\n $calendar.= str_repeat('<p> </p>',2);\n \n $calendar.= '</td>';\n if($running_day == 6):\n $calendar.= '</tr>';\n if(($day_counter+1) != $days_in_month):\n $calendar.= '<tr class=\"calendar-row\">';\n endif;\n $running_day = -1;\n $days_in_this_week = 0;\n endif;\n $days_in_this_week++; $running_day++; $day_counter++;\n endfor;\n\n /* finish the rest of the days in the week */\n if($days_in_this_week < 8):\n for($x = 1; $x <= (8 - $days_in_this_week); $x++):\n $calendar.= '<td class=\"calendar-day-np\"> </td>';\n endfor;\n endif;\n\n /* final row */\n $calendar.= '</tr>';\n\n /* end the table */\n $calendar.= '</table>';\n \n /* all done, return result */\n return $calendar;\n }", "private function _getDays($month, $year)\n {\n $daysInMonth = $this->_daysInMonth($month, $year);\n $days = array();\n\n for ($i = 1; $i <= $daysInMonth; $i++)\n {\n $days[] = $i;\n }\n\n return $days;\n }", "function draw_calendar($month,$year){\n\n\t\t/* draw table */\n\t\t$calendar = '<table cellpadding=\"0\" cellspacing=\"0\" class=\"calendar\">';\n\n\t\t/* table headings */\n\t\t$headings = array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');\n\t\t$calendar.= '<tr class=\"calendar-row\"><td class=\"calendar-day-head\">'.implode('</td><td class=\"calendar-day-head\">',$headings).'</td></tr>';\n\n\t\t/* days and weeks vars now ... */\n\t\t$running_day = date('w',mktime(0,0,0,$month,1,$year));\n\t\t$days_in_month = date('t',mktime(0,0,0,$month,1,$year));\n\t\t$days_in_this_week = 1;\n\t\t$day_counter = 0;\n\t\t$dates_array = array();\n\n\t\t/* row for week one */\n\t\t$calendar.= '<tr class=\"calendar-row\">';\n\n\t\t/* print \"blank\" days until the first of the current week */\n\t\tfor($x = 0; $x < $running_day; $x++):\n\t\t\t$calendar.= '<td class=\"calendar-day-np\"> </td>';\n\t\t\t$days_in_this_week++;\n\t\tendfor;\n\n\t\t/* keep going with days.... */\n\t\tfor($list_day = 1; $list_day <= $days_in_month; $list_day++):\n\t\t\t$calendar.= '<td class=\"calendar-day\"><a href=\"appointments.php?day=' . $list_day . '&month=' . $GLOBALS['curMonth'] . '&year=' . $GLOBALS['curYear'] . '\">';\n\t\t\t\t/* add in the day number */\n\t\t\t\t$calendar.= '<div class=\"day-number\">'.$list_day.'</div>';\n\n\t\t\t\t/** QUERY THE DATABASE FOR AN ENTRY FOR THIS DAY !! IF MATCHES FOUND, PRINT THEM !! **/\n\t\t\t\t$calendar.= str_repeat('<p> </p>',2);\n\t\t\t\t\n\t\t\t$calendar.= '</a></td>';\n\t\t\tif($running_day == 6):\n\t\t\t\t$calendar.= '</tr>';\n\t\t\t\tif(($day_counter+1) != $days_in_month):\n\t\t\t\t\t$calendar.= '<tr class=\"calendar-row\">';\n\t\t\t\tendif;\n\t\t\t\t$running_day = -1;\n\t\t\t\t$days_in_this_week = 0;\n\t\t\tendif;\n\t\t\t$days_in_this_week++; $running_day++; $day_counter++;\n\t\tendfor;\n\n\t\t/* finish the rest of the days in the week */\n\t\tif($days_in_this_week < 8):\n\t\t\tfor($x = 1; $x <= (8 - $days_in_this_week); $x++):\n\t\t\t\t$calendar.= '<td class=\"calendar-day-np\"> </td>';\n\t\t\tendfor;\n\t\tendif;\n\n\t\t/* final row */\n\t\t$calendar.= '</tr>';\n\n\t\t/* end the table */\n\t\t$calendar.= '</table>';\n\t\t\n\t\t/* all done, return result */\n\t\treturn $calendar;\n\t}", "function getDaysWithPosts($monthBeginn) {\n\t\t$monthEnd = $monthBeginn + ((int)date('t', $monthBeginn) * 24 * 3600);\n\n\t\t$userAgent = t3lib_div::getIndpEnv('HTTP_USER_AGENT');\n\t\tif (strstr($userAgent, 'MSIE') || strstr(strtolower($userAgent), 'camino') || strstr(strtolower($userAgent), 'safari')) {\n\t\t\t//IE, Camino, Safari\n\t\t\t$titleSeparator = \"\\n\";\n\t\t} else {\n\t\t\t//every other browser\n\t\t\t$titleSeparator = ', ';\n\t\t}\n\n\t\t$result = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(\n\t\t\t'title, datetime',\n\t\t\t'tt_news',\n\t\t\t'datetime > '.$monthBeginn.' AND datetime < '.$monthEnd.$this->enableFields,\n\t\t\t'datetime ASC'\n\t\t);\n\n\t\t$daysWithPosts = array();\n\t\tforeach($result as $row) {\n\t\t\t$day = date('j', $row['datetime']);\n\t\t\tif(!empty($daysWithPosts[$day])) {\n\t\t\t\t$daysWithPosts[$day] .= $titleSeparator.$row['title'];\n\t\t\t} else {\n\t\t\t\t$daysWithPosts[$day] = $row['title'];\n\t\t\t}\n\t\t}\n\n\t\treturn $daysWithPosts;\n\t}", "function mkDays ($numDays, $month, $year) {\n for ($i = 1; $i <= $numDays; $i++) {\n $eachDay[$i] = $i; \n }\n foreach($eachDay as $day => &$wkday) {\n $wkday = date(\"w\", mktime(0,0,0,$month,$day,$year));\n }\n foreach($eachDay as $day=>&$wkday) {\n echo \"<table class='box' id=$day month=$month year=$year>\";\n echo \"<td>\";\n echo $day;\n echo \"</td>\";\n echo \"</table>\";\n }\n }", "function allDays($month,$day,$con,$prodID){\n\t\t$m1 = date(\"m\",strtotime($month));\n\t\t$m2 = date(\"m\",strtotime(\"now\"));\n\t\t$year = \"\";\n\t\tif($m2>$m1){\n\t\t\t\n\t\t\t$year = date(\"Y\",strtotime(\"now +1 year\"));\n\t\t}\n\n $last = strtotime(\"last $day of $month $year\");\n $first = strtotime(\"first $day of $month $year\");\n $week = 0;\n for ($i=$first; $i < $last; ) {\n $i=strtotime(\"first $day of $month $year +$week week\");\n $ed = date(\"D M d Y\",$i);\n $checkReserved = $con->prepare(\"SELECT * FROM tbl_reserved WHERE prodID ='$prodID' AND EventDate = '$ed' \");\n $checkReserved->execute();\n $cr = $checkReserved->fetch(); \n if(!$cr){\n if(strtotime(\"now\") >= strtotime(date(\"M d Y\",$i))){\n echo \"<option>\".date(\"M d Y\",strtotime(date(\"M d Y\",$i).\" +1 year\")).\"</option>\";\n }else{\n echo \"<option>\".date(\"M d Y\",$i).\"</option>\";\n }\n \n }\n \n $week++;\n }\n }", "function calendar_events($events, $YEAR, $MONTH_START, $DAY_START, $WEEKENDS, $MONTH_END, $DOW, $OVERRIDE, $BOX) {\n $results = array('year'=>$YEAR, 'month_start'=>$MONTH_START, 'month_end'=>$MONTH_END, 'box'=>$BOX);\n $results_counter = array();\n $POSDOW = array(0 => 'sun', 1 => 'mon', 2 => 'tue', 3 => 'wed', 4 => 'thu', 5 => 'fri', 6 => 'sat', 7 => 'sun');\n for($month=$MONTH_START; $month <= $MONTH_END; $month++) {\n $month_len = cal_days_in_month(CAL_GREGORIAN, $month, $YEAR);\n $month_name = cal_info(0);\n $month_name = $month_name['months'][$month];\n $first = date(\"w\", mktime(0, 0, 0, $month, 1, $YEAR));\n for($day=1; $day <= $month_len; $day++) {\n $day_type = '';\n $day_num = '';\n $force_day = False;\n if ($month == $MONTH_START && $day < $DAY_START) {\n } elseif (isset($OVERRIDE[$month][$day])) {\n $day_type = $OVERRIDE[$month][$day];\n $force_day = True;\n } elseif (isset($DOW[$POSDOW[$first]])) {\n $day_type = $DOW[$POSDOW[$first]];\n }\n if ($day_type != '') {\n if (isset($events[$day_type])) {\n if (!isset($results_counter[$day_type])) {\n $results_counter[$day_type] = 1;\n } else {\n $results_counter[$day_type]++;\n }\n }\n if (isset($events[$day_type]) && isset($events[$day_type][$results_counter[$day_type]])) {\n $event = $events[$day_type][$results_counter[$day_type]];\n $day_num = $results_counter[$day_type];\n } else {\n $event = array();\n }\n if ($force_day || !empty($event)) {\n $results[$month][$day] = array('month'=>$month, 'day'=>$day, 'type'=>$day_type, 'type_num'=>$day_num, 'dow'=>$first, 'dow_eng'=>$POSDOW[$first], 'event'=>$event);\n }\n }\n $first++;\n if ($first == 7) {$first = 0;}\n }\n }\n return $results;\n }", "function draw_calendar_activ($month,$year){\n\n\t/* draw table */\n\t$calendar = '<table cellpadding=\"0\" cellspacing=\"0\" class=\"calendar\">';\n\n\t/* table headings */\n\t$headings = array('Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi');\n\t$calendar.= '<tr class=\"calendar-row-day\"><td class=\"calendar-day-head\">'.implode('</td><td class=\"calendar-day-head\">',$headings).'</td></tr>';\n\n\t/* days and weeks vars now ... */\n\t$running_day = date('w',mktime(0,0,0,$month,1,$year));\n\t$days_in_month = date('t',mktime(0,0,0,$month,1,$year));\n\t$days_in_this_week = 1;\n\t$day_counter = 0;\n\t$dates_array = array();\n\n\t/* row for week one */\n\t$calendar.= '<tr class=\"calendar-row\">';\n\n\t/* print \"blank\" days until the first of the current week */\n\tfor($x = 0; $x < $running_day; $x++):\n\t\t$calendar.= '<td class=\"calendar-day-np\"> </td>';\n\t\t$days_in_this_week++;\n\tendfor;\n\n\t/* keep going with days.... */\n\tfor($list_day = 1; $list_day <= $days_in_month; $list_day++){\n\t\t$calendar.= '<td class=\"calendar-day\">';\n\t\t\t/* add in the day number */\n $ddate = $year.\"-\".$month.\"-\".sprintf(\"%02d\", $list_day);\n $newdatabal = sprintf(\"%02d\", $list_day);\n $qq = mysql_query(\"SELECT * FROM reserver WHERE date_deb LIKE('$ddate%')\")or die(mysql_error());\n\n if(mysql_num_rows($qq) >0){\n $newblabla = $ddate.\"<br>\n <a href='afres.php?y=\".$year.\"&m=\".$month.\"&d=\".$newdatabal.\"' target='_blank' style='color: #302C87; text-decoration: none'> Il y'a : \".mysql_num_rows($qq).' reservation(s)</a>';\n }else{\n $newblabla = $ddate.\"<br>no reservations\";\n }\n\t\t\t$calendar.= '<div class=\"day-number\">\n\n '.$newblabla;\n\n\t\t\t/** QUERY THE DATABASE FOR AN ENTRY FOR THIS DAY !! IF MATCHES FOUND, PRINT THEM !! **/\n\t\t\t$calendar.= str_repeat('<p> </p>',2);\n\n\t\t$calendar.= '</td>';\n\t\tif($running_day == 6):\n\t\t\t$calendar.= '</tr>';\n\t\t\tif(($day_counter+1) != $days_in_month):\n\t\t\t\t$calendar.= '<tr class=\"calendar-row\">';\n\t\t\tendif;\n\t\t\t$running_day = -1;\n\t\t\t$days_in_this_week = 0;\n\t\tendif;\n\t\t$days_in_this_week++; $running_day++; $day_counter++;\n\n\n\t}\n\n\t/* finish the rest of the days in the week */\n\tif($days_in_this_week < 8):\n\t\tfor($x = 1; $x <= (8 - $days_in_this_week); $x++):\n\t\t\t$calendar.= '<td class=\"calendar-day-np\"> </td>';\n\t\tendfor;\n\tendif;\n\n\t/* final row */\n\t$calendar.= '</tr>';\n\n\t/* end the table */\n\t$calendar.= '</table>';\n\n\t/* all done, return result */\n\treturn $calendar;\n\n\n}", "private function return_dates($dados)\n {\n\n $var_month = $dados[0]->mes;\n $var_year = $dados[0]->ano;\n $var_dayOfWeek = $dados[0]->dia_encontro;\n $var_counting_days = cal_days_in_month(CAL_GREGORIAN, $var_month, $var_year); //days of month\n\n $dini = mktime(0,0,0,$var_month,1,$var_year);\n $dfim = mktime(0,0,0,$var_month,$var_counting_days,$var_year);\n\n $return_d = array();\n\n while($dini <= $dfim) //Enquanto uma data for inferior a outra\n {\n $dt = date(\"d/m/Y\",$dini); //Convertendo a data no formato dia/mes/ano\n $diasemana = date(\"w\", $dini);\n\n if($diasemana == $var_dayOfWeek)\n { // [0 Domingo] - [1 Segunda] - [2 Terca] - [3 Quarta] - [4 Quinta] - [5 Sexta] - [6 Sabado]\n array_push($return_d, $dt);\n }\n\n $dini += 86400; // Adicionando mais 1 dia (em segundos) na data inicial\n }\n\n //Segundo dia encontro\n $var_month = $dados[0]->mes;\n $var_year = $dados[0]->ano;\n $var_dayOfWeek = $dados[0]->segundo_dia_encontro;\n $var_counting_days = cal_days_in_month(CAL_GREGORIAN, $var_month, $var_year); //days of month\n\n $dini = mktime(0,0,0,$var_month,1,$var_year);\n $dfim = mktime(0,0,0,$var_month,$var_counting_days,$var_year);\n\n $bPrimeiro = false;\n\n while($dini <= $dfim) //Enquanto uma data for inferior a outra\n {\n $dt = date(\"d/m/Y\",$dini); //Convertendo a data no formato dia/mes/ano\n $diasemana = date(\"w\", $dini);\n\n if($diasemana == $var_dayOfWeek)\n { // [0 Domingo] - [1 Segunda] - [2 Terca] - [3 Quarta] - [4 Quinta] - [5 Sexta] - [6 Sabado]\n\n if ($bPrimeiro==false) {\n array_push($return_d, \"\");\n array_push($return_d, \" Segundo Dia Encontro \");\n }\n\n array_push($return_d, $dt);\n $bPrimeiro=true;\n }\n\n $dini += 86400; // Adicionando mais 1 dia (em segundos) na data inicial\n }\n\n array_push($return_d, \"\");\n array_push($return_d, \" Encontro Avulso (Criar Novo) \");\n\n //Verifica se houve encontro avulso para a celula / mes / ano\n $dt_encontro_avulso = $this->buscar_data_avulsa($dados[0]->celulas_id, $var_month, $var_year);\n\n if ($dt_encontro_avulso!=null) {\n array_push($return_d, \"\");\n array_push($return_d, \" Houve Encontro Avulso : \");\n\n foreach ($dt_encontro_avulso as $item) {\n array_push($return_d, date(\"d/m/Y\", strtotime($item->data_encontro)));\n }\n }\n\n return ($return_d);\n\n }", "private function daysDefault(){\n $data = array();\n\n for($i=1; $i<=31; $i++){\n $data['day_'.$i] = 0;\n }\n\n return $data;\n }", "public function get_day_types(int $y,int $m){\n\t\t$domingos=0;\n\t\t$feriados=0;\n\t\t$laborables=0;\n\t\t$laborados=0;\n\t\t$permisos=0;\n\t\t$inasistencias=0;\n\t\t$total_days=cal_days_in_month(0,$m,$y);\n\t\tif($y==date('Y') && $m==date('m')){\n\t\t\t$days=date('d');\n\t\t}\n\t\telse{\n\t\t\t$days=cal_days_in_month(0,$m,$y);\n\t\t}\n\t\tfor($d=1;$d<=$days;$d++){\n\t\t\tif(Timemanager::is_holiday($y,$m,$d)){\n\t\t\t\t$feriados++;\n\t\t\t}\n\t\t\telseif(!Timemanager::is_laborable($y,$m,$d)){\n\t\t\t\t$domingos++;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$laborables++;\n\t\t\t}\n\t\t\tif(Timemanager::is_laborable($y,$m,$d) && !Timemanager::is_holiday($y,$m,$d)){\n\t\t\t\ttry {\n\t\t\t\t\tif(!$this->asistio($y,$m,$d)){\n\t\t\t\t\t\tif(Baja::count([\n\t\t\t\t\t\t\t'conditions'=>[\n\t\t\t\t\t\t\t\t'employee_id = ? and start => ? AND end <= ?',\n\t\t\t\t\t\t\t\t$this->id,\n\t\t\t\t\t\t\t\t$y.'-'.$m.'-'.$d,\n\t\t\t\t\t\t\t\t$y.'-'.$m.'-'.$d\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t])>0){\n\t\t\t\t\t\t\t$permisos++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t$inasistencias++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t$laborados++;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\tBaja::table()->last_sql;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\treturn['transcurridos'=>$days,'total_days'=>$total_days,'domingos'=>$domingos,'feriados'=>$feriados,'laborados'=>$laborados,'laborables'=>$laborables,'permisos'=>$permisos,'inasistencias'=>$inasistencias];\n\n\t}", "public static function week_calendar($day, $month, $year) {\r\n global $langNoEvents, $langDay, $langWeek, $langMonth, $langViewShow;\r\n\r\n $calendar_content = \"\";\r\n if (is_null($day)) {\r\n $day = 1;\r\n }\r\n $nextweekdate = new DateTime(\"$year-$month-$day\");\r\n $nextweekdate->add(new DateInterval('P1W'));\r\n $previousweekdate = new DateTime(\"$year-$month-$day\");\r\n $previousweekdate->sub(new DateInterval('P1W'));\r\n\r\n $thisweekday = new DateTime(\"$year-$month-$day\");\r\n $difffromMonday = ($thisweekday->format('w') == 0)? 6:$thisweekday->format('w')-1;\r\n $monday = $thisweekday->sub(new DateInterval('P'.$difffromMonday.'D')); //Sunday->1, ..., Saturday->7\r\n $weekdescription = ucfirst(format_locale_date($monday->getTimestamp()));\r\n $sunday = $thisweekday->add(new DateInterval('P6D'));\r\n $weekdescription .= ' - '.ucfirst(format_locale_date($sunday->getTimestamp()));\r\n $cursorday = $thisweekday->sub(new DateInterval('P6D'));\r\n\r\n $backward = array('day'=>$previousweekdate->format('d'), 'month'=>$previousweekdate->format('m'), 'year' => $previousweekdate->format('Y'));\r\n $foreward = array('day'=>$nextweekdate->format('d'), 'month'=>$nextweekdate->format('m'), 'year' => $nextweekdate->format('Y'));\r\n\r\n $calendar_content .= '<div class=\"right\" style=\"width:100%\">'.$langViewShow.':&nbsp;'.\r\n '<a href=\"#\" onclick=\"show_day(selectedday, selectedmonth, selectedyear);return false;\">'.$langDay.'</a>&nbsp;|&nbsp;'.\r\n '<a href=\"#\" onclick=\"show_week(selectedday, selectedmonth, selectedyear);return false;\">'.$langWeek.'</a>&nbsp;|&nbsp;'.\r\n '<a href=\"#\" onclick=\"show_month(selectedday, selectedmonth, selectedyear);return false;\">'.$langMonth.'</a></div>';\r\n\r\n $calendar_content .= \"<table class='table-default'>\";\r\n $calendar_content .= \"<tr>\";\r\n $calendar_content .= '<td width=\"25\"><a href=\"#\" onclick=\"show_week('.$backward['day'].','.$backward['month'].','.$backward['year'].'); return false;\">&laquo;</a></td>';\r\n $calendar_content .= \"<td class='center'><b>$weekdescription</b></td>\";\r\n $calendar_content .= '<td width=\"25\" class=\"right\"><a href=\"#\" onclick=\"show_week('.$foreward['day'].','.$foreward['month'].','.$foreward['year'].'); return false;\">&raquo;</a></td>';\r\n $calendar_content .= \"</tr>\";\r\n $calendar_content .= \"</table>\";\r\n $eventlist = Calendar_Events::get_calendar_events(\"week\", \"$year-$month-$day\");\r\n\r\n $calendar_content .= \"<table class='table-default'>\";\r\n\r\n $curday = 0;\r\n $now = getdate();\r\n $today = new DateTime($now['year'].'-'.$now['mon'].'-'.$now['mday']);\r\n $curstartddate = \"\";\r\n foreach ($eventlist as $thisevent) {\r\n if ($curstartddate != $thisevent->startdate) { //event date changed\r\n $thiseventdatetime = new DateTime($thisevent->startdate);\r\n while($cursorday < $thiseventdatetime) {\r\n if ($cursorday == $today)\r\n $class = 'today';\r\n else\r\n $class = 'monthLabel';\r\n $calendar_content .= \"<tr><td colspan='3' class='$class'>\" . \"&nbsp;<b>\" . ucfirst(format_locale_date($cursorday->getTimestamp())) . \"</b></td></tr>\";\r\n $calendar_content .= \"<tr><td colspan='3'>$langNoEvents</td></tr>\";\r\n $cursorday->add(new DateInterval('P1D'));\r\n $curday++;\r\n }\r\n if ($thiseventdatetime == $today)\r\n $class = 'today';\r\n else\r\n $class = 'monthLabel';\r\n $calendar_content .= \"<tr><td colspan='3' class='$class'>\" . \"&nbsp;<b>\" . ucfirst(format_locale_date(strtotime($thisevent->startdate))) . \"</b></td></tr>\";\r\n if ($cursorday <= $thiseventdatetime) {\r\n $cursorday->add(new DateInterval('P1D'));\r\n $curday++;\r\n }\r\n }\r\n $calendar_content .= Calendar_Events::week_calendar_item($thisevent, 'even');\r\n $curstartddate = $thisevent->startdate;\r\n }\r\n /* Fill with empty days*/\r\n for($i=$curday;$i<7;$i++) {\r\n if ($cursorday == $today)\r\n $class = 'today';\r\n else\r\n $class = 'monthLabel';\r\n $calendar_content .= \"<tr><td colspan='3' class='$class'>\" . \"&nbsp;<b>\" . ucfirst(format_locale_date($cursorday->getTimestamp())) . \"</b></td></tr>\";\r\n $calendar_content .= \"<tr><td colspan='3'>$langNoEvents</td></tr>\";\r\n $cursorday->add(new DateInterval('P1D'));\r\n }\r\n $calendar_content .= \"</table>\";\r\n /* Legend */\r\n $calendar_content .= Calendar_Events::calendar_legend();\r\n\r\n return $calendar_content;\r\n }", "function MakeCalendarGrid(){\n //get our days\n $intMonthDays = cal_days_in_month(CAL_GREGORIAN, $this->intMonth, $this->intYear);\n $intDayCounter = 0;\n $arrMonthAttributes = array('colspan'=>'7');\n //make our parent calendar table\n $objCalendarParent = $this->objCalendar->AddChildNode($this->objCalendar->objHTML,'', 'table');\n //let's make our header\n $objHeaderRow = $this->objCalendar->AddChildNode($objCalendarParent,'', 'tr');\n //establish our base attributes\n for($intWeekDay=0;$intWeekDay<7;$intWeekDay++){\n $strDay = date('l', strtotime(\"Sunday +{$intWeekDay} days\"));\n $this->objCalendar->AddChildNode($objHeaderRow,$strDay, 'th',array('class'=>'weekday'));\n }\n //get the starting date\n $intMonthStart = date('N', strtotime($this->intYear.'-'.$this->intMonth.'-1'));\n $intMonthStart++;\n //avoid empty rows\n if($intMonthStart == 8)\n $intMonthStart = 1;\n //make our days now\n for($intDay=1;$intDay<($intMonthDays + $intMonthStart);$intDay++){\n $arrDateAttributes = array('onclick'=>'SelectDay(this);');\n if($intDayCounter === 0){\n //make our new week\n $objWeekRow = $this->objCalendar->AddChildNode($objCalendarParent,'', 'tr');\n $arrDateAttributes['class'] = 'calendarday weekend';\n }\n else if($intDayCounter === 6)\n $arrDateAttributes['class'] = 'calendarday weekend';\n else if($intDay == date('j'))\n $arrDateAttributes['class'] = 'calendarday today';\n else\n $arrDateAttributes['class'] = 'calendarday weekday';\n $intDayCounter++;\n //reset our week now\n if($intDayCounter == 7)\n $intDayCounter = 0;\n if($intDay < $intMonthStart){\n unset($arrDateAttributes['onclick']);\n $this->objCalendar->AddChildNode($objWeekRow,'&nbsp;', 'td',$arrDateAttributes);\n continue 1;\n }\n $arrDateAttributes['id'] = ($intDay - ($intMonthStart - 1)).'-'.$this->arrCalendarProperties['calendarid'];\n //make our day now\n $this->objCalendar->AddChildNode($objWeekRow,($intDay - ($intMonthStart - 1)), 'td',$arrDateAttributes);\n }\n return TRUE;\n }", "function getCalender($year = '', $month = '') {\n $dateYear = ($year != '') ? $year : date(\"Y\");\n $dateMonth = ($month != '') ? $month : date(\"m\");\n $date = $dateYear . '-' . $dateMonth . '-01';\n $currentMonthFirstDay = date(\"N\", strtotime($date));\n $totalDaysOfMonth = cal_days_in_month(CAL_GREGORIAN, $dateMonth, $dateYear);\n $totalDaysOfMonthDisplay = ($currentMonthFirstDay == 7) ? ($totalDaysOfMonth) : ($totalDaysOfMonth + $currentMonthFirstDay);\n $boxDisplay = ($totalDaysOfMonthDisplay <= 35) ? 35 : 42;\n ?>\n <div id='calendar_section'>\n <div id=\"calender_section\" class=\"month\">\n <table>\n <ul>\n <h2 name=\"month_dropdown\" disabled=\"\" class=\"month_dropdown dropdown\" value='<?php echo getAllMonths($dateMonth); ?>'>\n <?php\n if ($dateMonth === \"01\") {\n echo \"January\";\n } elseif ($dateMonth === \"02\") {\n echo \"February\";\n } elseif ($dateMonth === \"03\") {\n echo \"March\";\n } elseif ($dateMonth === \"04\") {\n echo \"April\";\n } elseif ($dateMonth === \"05\") {\n echo \"May\";\n } elseif ($dateMonth === \"06\") {\n echo \"June\";\n } elseif ($dateMonth == \"07\") {\n echo \"July\";\n } elseif ($dateMonth === \"08\") {\n echo \"August\";\n } elseif ($dateMonth === \"09\") {\n echo \"September\";\n } elseif ($dateMonth === \"10\") {\n echo \"October\";\n } elseif ($dateMonth === \"11\") {\n echo \"November\";\n } elseif ($dateMonth === \"12\") {\n echo \"December\";\n }\n ?> <?php echo ' ' .($dateYear); ?></h2>\n \n </ul>\n </table>\n\n <div id=\"calender_section_top\">\n <ul>\n <li>Sun</li>\n <li>Mon</li>\n <li>Tue</li>\n <li>Wed</li>\n <li>Thu</li>\n <li>Fri</li>\n <li>Sat</li>\n </ul>\n </div>\n <div id=\"calender_section_bot\">\n <ul>\n <?php\n $dayCount = 1;\n\n\n $time_slot = ($_GET['time_slot']);\n $med = ($_GET['med']);\n $res = ($_GET['res']);\n $emp = ($_GET['emp']);\n for ($cb = 1; $cb <= $boxDisplay; $cb++) {\n if (($cb >= $currentMonthFirstDay + 1 || $currentMonthFirstDay == 7) && $cb <= ($totalDaysOfMonthDisplay)) {\n //Current date\n if ($dayCount <= 9) {\n $currentDate = $dateYear . '-' . $dateMonth . '-' . '0' . $dayCount;\n ;\n } else {\n $currentDate = $dateYear . '-' . $dateMonth . '-' . $dayCount;\n }\n\n $eventNum = 0;\n //Include con configuration file\n include 'config.php';\n //Get number of events based on the current date\n $result = $con->query(\"SELECT * FROM med_records WHERE entry_date = '\" . $currentDate . \"' AND time_slot = '\" . $time_slot . \"' AND med_name = '$med'\");\n $eventNum = $result->num_rows;\n $eventrow = mysqli_fetch_array($result);\n //Define date cell color\n if (strtotime($currentDate) == strtotime(date(\"Y-m-d\"))) {\n echo '<li date=\"' . $currentDate . '\" class=\"grey date_cell\" >';\n } elseif ($eventNum > 0) {\n echo '<li date=\"' . $currentDate . '\" class=\"light_sky date_cell\" >';\n } else {\n echo '<li date=\"' . $currentDate . '\" class=\"date_cell\" >';\n }\n //Date cell\n echo '<span>';\n if ($eventNum > 0) {\n echo '<input class=\"calendar_button\" type=\"button\" id=' . $currentDate . ' name=\"date[]\" value=' . $dayCount . ' \">';\n echo '<strong class=\"existRecord\" >';\n echo $eventrow['status'];\n echo '</strong>';\n } else {\n echo '<input class=\"calendar_button\" type=\"button\" id=' . $currentDate . ' name=\"date[]\" value=' . $dayCount . ' onclick=\"MedRecordEntryModalOpen(this.id)\">';\n }\n echo '</span>';\n\n\n echo '</li>';\n $dayCount++;\n ?>\n <?php } else { ?>\n <li><span></span></li>\n <?php\n }\n }\n ?>\n </ul></div>\n </div>\n </div>\n <?php\n}", "private function getWeekDays()\n {\n $time = date('Y-m-d', strtotime($this->year . '-' . $this->month . '-' . $this->day));\n if ($this->view == 'week') {\n $sunday = strtotime('last sunday', strtotime($time . ' +1day'));\n $day = date('j', $sunday);\n $startingDay = date('N', $sunday);\n $cnt = 6;\n }\n if ($this->view == 'day') {\n $day = $this->day;\n $cnt = 0;\n }\n\n $this->week_days = array();\n $mlen = $this->daysMonth[intval($this->month) - 1];\n if ($this->month == 2 && ((($this->year % 4) == 0) && ((($this->year % 100) != 0) || (($this->year % 400) == 0)))) {\n $mlen = $mlen + 1;\n }\n $h = \"<tr class='\" . $this->labelsClass . \"'>\";\n $h .= \"<td>&nbsp;</td>\";\n for ($j = 0; $j <= $cnt; $j++) {\n $cs = $cnt == 0 ? 3 : 1;\n $h .= \"<td colspan='$cs'>\";\n if ($this->view == 'day') {\n $getDayNumber = date('w', strtotime($time));\n } else {\n $getDayNumber = $j;\n }\n if ($day <= $mlen) {\n } else {\n $day = 1;\n }\n $h .= $this->dayLabels[$getDayNumber] . ' ';\n $h .= intval($day);\n $this->week_days[] = $day;\n $day++;\n $h .= \"</td>\";\n }\n\n $h .= \"</tr>\";\n return $h;\n }", "protected function compileWeeks()\n\t{\n\t\t$intDaysInMonth = date('t', $this->Date->monthBegin);\n\t\t$intFirstDayOffset = date('w', $this->Date->monthBegin) - $this->cal_startDay;\n\n\t\tif ($intFirstDayOffset < 0)\n\t\t{\n\t\t\t$intFirstDayOffset += 7;\n\t\t}\n\n\t\t$intColumnCount = -1;\n\t\t$intNumberOfRows = ceil(($intDaysInMonth + $intFirstDayOffset) / 7);\n\t\t$arrAllEvents = $this->getAllEvents($this->iso_arrEventIDs, $this->cal_calendar, $this->Date->monthBegin, $this->Date->monthEnd);\n\t\t\n\t\t$arrDays = array();\n\n\t\t// Compile days\n\t\tfor ($i=1; $i<=($intNumberOfRows * 7); $i++)\n\t\t{\n\t\t\t$intWeek = floor(++$intColumnCount / 7);\n\t\t\t$intDay = $i - $intFirstDayOffset;\n\t\t\t$intCurrentDay = ($i + $this->cal_startDay) % 7;\n\n\t\t\t$strWeekClass = 'week_' . $intWeek;\n\t\t\t$strWeekClass .= ($intWeek == 0) ? ' first' : '';\n\t\t\t$strWeekClass .= ($intWeek == ($intNumberOfRows - 1)) ? ' last' : '';\n\n\t\t\t$strClass = ($intCurrentDay < 2) ? ' weekend' : '';\n\t\t\t$strClass .= ($i == 1 || $i == 8 || $i == 15 || $i == 22 || $i == 29 || $i == 36) ? ' col_first' : '';\n\t\t\t$strClass .= ($i == 7 || $i == 14 || $i == 21 || $i == 28 || $i == 35 || $i == 42) ? ' col_last' : '';\n\n\t\t\t// Empty cell\n\t\t\tif ($intDay < 1 || $intDay > $intDaysInMonth)\n\t\t\t{\n\t\t\t\t$arrDays[$strWeekClass][$i]['label'] = '&nbsp;';\n\t\t\t\t$arrDays[$strWeekClass][$i]['class'] = 'days empty' . $strClass ;\n\t\t\t\t$arrDays[$strWeekClass][$i]['events'] = array();\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$intKey = date('Ym', $this->Date->tstamp) . ((strlen($intDay) < 2) ? '0' . $intDay : $intDay);\n\t\t\t$strClass .= ($intKey == date('Ymd')) ? ' today' : '';\n\n\t\t\t// Mark the selected day (see #1784)\n\t\t\tif ($intKey == $this->Input->get('day'))\n\t\t\t{\n\t\t\t\t$strClass .= ' selected';\n\t\t\t}\n\n\t\t\t// Inactive days\n\t\t\tif (empty($intKey) || !isset($arrAllEvents[$intKey]))\n\t\t\t{\n\t\t\t\t$arrDays[$strWeekClass][$i]['label'] = $intDay;\n\t\t\t\t$arrDays[$strWeekClass][$i]['class'] = 'days' . $strClass;\n\t\t\t\t$arrDays[$strWeekClass][$i]['events'] = array();\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$arrEvents = array();\n\n\t\t\t// Get all events of a day\n\t\t\tforeach ($arrAllEvents[$intKey] as $v)\n\t\t\t{\n\t\t\t\tforeach ($v as $vv)\n\t\t\t\t{\n\t\t\t\t\t$arrEvents[] = $vv;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$arrDays[$strWeekClass][$i]['label'] = $intDay;\n\t\t\t$arrDays[$strWeekClass][$i]['class'] = 'days active' . $strClass;\n\t\t\t\n\t\t\t$arrDays[$strWeekClass][$i]['href'] = $this->strUrl . ($GLOBALS['TL_CONFIG']['disableAlias'] ? '?id=' . $this->Input->get('id') . '&amp;' : '?') . 'day=' . $intKey;\n\t\t\t\n\t\t\t$arrDays[$strWeekClass][$i]['title'] = sprintf(specialchars($GLOBALS['TL_LANG']['MSC']['cal_events']), count($arrEvents));\n\t\t\t$arrDays[$strWeekClass][$i]['events'] = $arrEvents;\n\t\t}\n\n\t\treturn $arrDays;\n\t}", "public function run()\n {\n $stop_date = date('07/01/2019');\n $daaa = array();\n for($y = 1; $y <= 1828; $y++){\n \n $d = date('d-m-Y', strtotime($stop_date . ' +'.$y.' days'));\n $date1 = date('Y-m-d', strtotime($stop_date . ' +'.$y.' days'));\n\n $day = date('D',strtotime($stop_date . ' +'.$y.' days'));\n $month = date('m',strtotime($stop_date . ' +'.$y.' days'));\n $year = date('Y',strtotime($stop_date . ' +'.$y.' days'));\n $mon = date('F',strtotime($stop_date . ' +'.$y.' days'));\n\n $daaa[$y]['date'] = $d;\n $daaa[$y]['day'] = $day;\n $daaa[$y]['month'] = $month;\n $daaa[$y]['year'] = $year;\n $daaa[$y]['mon'] = $mon;\n $daaa[$y]['dates'] = $date1;\n \n }\n \n foreach ($daaa as $dk => $dv) {\n\t Calender::create([\n\t 'date' => $dv['date'],\n\t 'day' => $dv['day'],\n\t 'month' => $dv['month'],\n\t 'year' => $dv['year'],\n\t 'month_name' => $dv['mon'],\n\t ]);\n\t }\n }", "public function actionCalendar( $month = null, $year = null, $selected = null, $filter = null, $city = null){\n\t\tif(!$month){\n\t\t\t$month = date('m');\n\t\t\t$year = date('Y');\n\t\t}\n\t\t$start = new \\Datetime($year.'-'.$month.'-01');\n\t\t$month_first_day = clone $start;\n\t\tif($start->format('w') != 1){\n\t\t\t$start->modify('previous monday');\n\t\t}\n\t\tif(!empty($selected)){\n\t\t\t$selected_day = new \\Datetime($selected);\n\t\t}else if($month == date('m') && $year == date('Y')){\n\t\t\t$selected_day = new \\Datetime();\n\t\t}else{\n\t\t\t$selected_day = clone $month_first_day;\n\t\t}\n\t\t$end = clone $start;\n\t\t$end->modify('4 weeks');\n\t\t$weeks = $this->weeks_in_month($month, $year);\n\t\t$events_sets = array();\n\t\t$events = $this->getEvents( $weeks * 7, $filter, $start, null, $city);\n\t\t// if(isset($_GET['debug'])){\n\t\t// \tvar_dump($events);\n\t\t// \tdie();\n\t\t// }\n\t\t$events_by_date = array();\n\t\tforeach ($events as $event) {\n\t\t\tif(isset($event['start']['date'])){\n\t\t\t\t$date = substr($event['start']['date'], 0, 4).substr($event['start']['date'], 5, 2).substr($event['start']['date'], 8, 2);\n\t\t\t}else{\n\t\t\t\t$date = (new \\Datetime($event['start']['dateTime']))->format('Ymd');\n\t\t\t}\n\t\t\t\n\t\t\t$events_by_date[$date][] = $event;\n\t\t}\n\t\tforeach ($events_by_date as $date => $date_events) {\n\t\t\t$events_by_date[$date] = array();\n\t\t\t$milongas = $this->filterEvents(self::DEFAULT_FILTER, $date_events);\n\t\t\tif(sizeof($milongas))\n\t\t\t\t$events_by_date[$date]['Milongas'] = $milongas;\n\t\t\t$workshops = $this->filterEvents('workshop:,workhop:', $date_events);\n\t\t\tif(sizeof($workshops))\n\t\t\t\t$events_by_date[$date]['Workshops'] = $workshops;\n\t\t}\n\n\t\t// Adding festivals in their own special categories\n\t\t// There must be an instance on all days of the festival\n\t\t$festivals = $this->filterEvents('FESTIVAL:,MARATHON:', $events);\n\t\tforeach($festivals as $event){\n\t\t\tif(isset($event['start']['dateTime'])){\n\t\t\t\t$start_datetime = new \\Datetime($event['start']['dateTime']);\n\t\t\t\t$end_datetime = new \\Datetime($event['end']['dateTime']);\n\t\t\t\twhile($start_datetime <= $end_datetime){\n\t\t\t\t\t$date = $start_datetime->format('Ymd');\n\t\t\t\t\tif(isset($events_by_date[$date]['Festivals']))\n\t\t\t\t\t\tarray_unshift($events_by_date[$date]['Festivals'], $event);\n\t\t\t\t\telse\n\t\t\t\t\t\t$events_by_date[$date]['Festivals/Marathons'][] = $event;\n\t\t\t\t\t$start_datetime->modify('+1 day');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Adding the holidays in the workshops\n\t\t// There must be an instance on all days of the holidays\n\t\t$holidays = $this->filterEvents('HOLIDAYS:', $events);\n\t\tforeach($holidays as $event){\n\t\t\tif(isset($event['start']['dateTime'])){\n\t\t\t\t$start_datetime = new \\Datetime($event['start']['dateTime']);\n\t\t\t\t$end_datetime = new \\Datetime($event['end']['dateTime']);\n\t\t\t\twhile($start_datetime <= $end_datetime){\n\t\t\t\t\t$date = $start_datetime->format('Ymd');\n\t\t\t\t\tif(isset($events_by_date[$date]['Workshops']))\n\t\t\t\t\t\tarray_unshift($events_by_date[$date]['Workshops'], $event);\n\t\t\t\t\telse\n\t\t\t\t\t\t$events_by_date[$date]['Workshops'][] = $event;\n\t\t\t\t\t$start_datetime->modify('+1 day');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\treturn $this->render('calendar', [ 'events_by_date' => $events_by_date , 'start' => $start, 'month_first_day' => $month_first_day , 'weeks' => $weeks, 'selected_day' => $selected_day, 'city' => $city]);\n\t}", "function calendar($date) {\r\n\t //If no parameter is passed use the current date.\r\n\t if($date == null)\r\n\t $date = getDate();\r\n\r\n\t $day \t\t\t= $date[\"mday\"];\r\n\t $month \t\t= $date[\"mon\"];\r\n\t $month_name \t= $date[\"month\"];\r\n\t $year \t\t\t= $date[\"year\"];\r\n\r\n\t $this_month \t= getDate(mktime(0, 0, 0, $month, 1, $year));\r\n\t $next_month \t= getDate(mktime(0, 0, 0, $month + 1, 1, $year));\r\n\r\n\t //Find out when this month starts and ends.\r\n\t $first_week_day = $this_month[\"wday\"];\r\n\t $days_in_this_month = round(($next_month[0] - $this_month[0]) / (60 * 60 * 24));\r\n\r\n\t $calendar_html = \"<table width='100%'>\";\r\n\t $calendar_html = $calendar_html.\"<tr>\t<td class='perp_report_header' colspan='7' /> Month: \".$month_name.\" / Year: \".$year.\"</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\";\r\n\t $calendar_html = $calendar_html.\"<tr>\t<td class='perp_report_subheader'>Sunday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='perp_report_subheader'>Monday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='perp_report_subheader'>Tuesday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='perp_report_subheader'>Wednesday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='perp_report_subheader'>Thursday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='perp_report_subheader'>Friday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='perp_report_subheader'>Saterday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t\t<tr>\";\r\n\r\n\t// Fill the first week of the month with the appropriate number of blanks.\r\n\t\t\t$gapcounter = 0;\r\n\t\t\tfor($week_day = 0; $week_day < $first_week_day; $week_day++) {\r\n\t\t\t\t\t$gapcounter = $gapcounter + 1;\r\n\t\t\t\t}\r\n\t\t\t$calendar_html = $calendar_html.\"<td class='perp_report_cell' colspan='\".$gapcounter.\"'></td>\";\t\r\n\t\r\n\t// Draw Calendar Elements\r\n\t\t\t// I forget!\t\t\t\t\r\n\t $week_day = $first_week_day;\r\n\t for($day_counter = 1; $day_counter <= $days_in_this_month; $day_counter++) {\r\n\t\t\t\t\t// Determine Day of the week\r\n\t\t\t\t\t$week_day %= 7;\r\n\t\t\t\t\r\n\t\t\t\t\t// If this variable equals 0, we will need to start a new row.\r\n\t\t\t\t\tif($week_day == 0) {\r\n\t\t\t\t\t\t\t$calendar_html = $calendar_html.\"</tr><tr>\";\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$datetopull = $year.\"/\".$month.\"/\".$day_counter;\r\n\t\t\t\t\t$innercell = \"<TABLE width='100%' style='margin-bottom:0;margin-top:0;'><tr><td class='perp_report_fieldname'>Date:</td><td class='perp_report_fieldcontent'>\".$datetopull.\"</td></tr>\";\r\n\t\t\t\t\t//Now Get inspection List for this day.....\r\n\t\t\t\t\t$objconn = mysqli_connect($GLOBALS['hostdomain'], $GLOBALS['hostusername'], $GLOBALS['passwordofdatabase'], $GLOBALS['nameofdatabase']);\t\t\t\t\t\r\n\t\t\t\t\tif (mysqli_connect_errno()) {\r\n\t\t\t\t\t\t\t// there was an error trying to connect to the mysql database\r\n\t\t\t\t\t\t\t//printf(\"connect failed: %s\\n\", mysqli_connect_error());\r\n\t\t\t\t\t\t\texit();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t$sql = \"SELECT * FROM tbl_139_337_main WHERE 139337_date = '\".$datetopull.\"' ORDER BY 139337_time\";\r\n\t\t\t\t\t\t\t//echo \"The SQL Statement is :\".$sql.\"<br>\";\r\n\t\t\t\t\t\t\t$objrs = mysqli_query($objconn, $sql);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\tif ($objrs) {\r\n\t\t\t\t\t\t\t\t\t$number_of_rows = mysqli_num_rows($objrs);\r\n\t\t\t\t\t\t\t\t\twhile ($objarray = mysqli_fetch_array($objrs, MYSQLI_ASSOC)) {\r\n\t\t\t\t\t\t\t\t\t\t$counter = $counter + 1;\r\n\t\t\t\t\t\t\t\t\t\t\t$counter = $counter + 1;\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// So the Archieved or Duplicate Narrowing...\r\n\t\t\t\t\t\t\t\t\t\t\t$displayrow\t\t\t\t\t= 0;\r\n\t\t\t\t\t\t\t\t\t\t\t$displayrow_a\t\t\t\t= 0;\r\n\t\t\t\t\t\t\t\t\t\t\t$displayrow_b\t\t\t\t= 0;\r\n\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t$tmpdiscrepancyid\t\t\t= $objarray['Discrepancy_id'];\r\n\t\t\t\t\t\t\t\t\t\t\t$tmpdiscrepancycondition\t= $objarray['discrepancy_checklist_id'];\t\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$displayrow_a\t\t\t\t= preflights_tbl_139_337_main_a_yn($tmpdiscrepancyid,0); // 0 will not return a row even if it is archieved.\r\n\t\t\t\t\t\t\t\t\t\t\t//$displayrow_d\t\t\t\t= preflights_tbl_139_327_main_sub_d_d_yn($tmpdiscrepancyid,0); // 0 will not return a row even if it is duplicate.\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tif($displayrow_a == 1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$displayrow = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif($displayrow_d == 1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$displayrow = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\tif($displayrow_d == 1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$displayrow = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif($displayrow_a == 1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$displayrow = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\tif ($displayrow == 1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$innercell = $innercell.\"<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<form style='margin-bottom:0;' action='part139337_report_display.php' method='POST' name='reportform' id='reportform' target='WLHMWindow' onsubmit='window.open('', 'WLHMWindow', 'width=800,height=600,status=no,resizable=no,scrollbars=yes')'>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td colspan='2' class='formoptionsubmit'>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type='hidden' name='recordid'\tID='recordid' \t\t\tvalue=\".$tmpdiscrepancyid.\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type='submit' value='D:\".$tmpdiscrepancyid.\"' name='b1' ID='b1' class='makebuttonlooklikelargetext' style='width:100%;'>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</form>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t$innercell = $innercell.\"</table>\";\t\r\n\t\t\t\t\tif ($counter == 0) {\r\n\t\t\t\t\t\t\t$innercell = $innercell.\"Nothing Reported\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t$calendar_html = $calendar_html.\"<td align=\\\"center\\\" valign='top' class='perp_report_activecell'>&nbsp;\".$innercell.\"</td>\";\r\n\t\t\t\t\t$week_day++;\r\n\t\t\t\t\t$counter = 0;\r\n\t\t\t\t}\r\n\r\n\t $calendar_html .= \"</tr>\";\r\n\t $calendar_html .= \"</table>\";\r\n\r\n\t return($calendar_html);\r\n\t }", "function draw_calendar(){\r\n \r\n $year = date(\"Y\");\r\n $monthCurrent = date(\"m\");\r\n $monthNext1 = date(\"m\", strtotime('+1 month'));\r\n $monthNext2 = date(\"m\", strtotime('+2 month'));\r\n $monthNext3 = date(\"m\", strtotime('+3 month'));\r\n $monthNext4 = date(\"m\", strtotime('+4 month'));\r\n $monthNext5 = date(\"m\", strtotime('+5 month'));\r\n\r\n $monthCurrentStr = date(\"M\");\r\n $monthNext1Str = date(\"M\", strtotime('+1 month'));\r\n $monthNext2Str = date(\"M\", strtotime('+2 month'));\r\n $monthNext3Str = date(\"M\", strtotime('+3 month'));\r\n $monthNext4Str = date(\"M\", strtotime('+4 month'));\r\n $monthNext5Str = date(\"M\", strtotime('+5 month'));\r\n\r\n\r\n $numberofday1 = cal_days_in_month(CAL_GREGORIAN,$monthCurrent , $year);\r\n $numberofday2 = cal_days_in_month(CAL_GREGORIAN,$monthNext1 , $year);\r\n $numberofday3 = cal_days_in_month(CAL_GREGORIAN,$monthNext2 , $year);\r\n $numberofday4 = cal_days_in_month(CAL_GREGORIAN,$monthNext3 , $year);\r\n $numberofday5 = cal_days_in_month(CAL_GREGORIAN,$monthNext4 , $year);\r\n $numberofday6 = cal_days_in_month(CAL_GREGORIAN,$monthNext5 , $year);\r\n\r\n \r\n\t/* draw table */\r\n $calendar = '<table cellpadding=\"0\" cellspacing=\"2\" style=\"width:100%;\" class=\"calendar\"><thead>';\r\n $calendar.= '<tr>';\r\n $calendar.= '<th colspan=\"3\"> <center>'.$monthCurrentStr.'</center> </th>';\r\n $calendar.= '<th colspan=\"3\"> <center>'.$monthNext1Str.'</center> </th>';\r\n $calendar.= '<th colspan=\"3\"> <center>'.$monthNext2Str.'</center> </th>';\r\n $calendar.= '<th colspan=\"3\"> <center>'.$monthNext3Str.'</center> </th>';\r\n $calendar.= '<th colspan=\"3\"> <center>'.$monthNext4Str.'</center> </th>';\r\n $calendar.= '<th colspan=\"3\"> <center>'.$monthNext5Str.'</center> </th>';\r\n \r\n \r\n\r\n\t\r\n\t/* final row */\r\n $calendar.= '</tr></head>'; \r\n $calendar.= '<tbody><tr>';\r\n // for($i = 1 ,$j = 1 ,$k = 1 ; $i <= $numberofday1, $j = $numberofday2, $k <= $numberofday3 ; $i++, $j++, $k++)\r\n $i = 0 ;\r\n $j = 0;\r\n $k = 0;\r\n $i1 = 0 ;\r\n $j1 = 0;\r\n $k1 = 0;\r\n $u = 0;\r\n\r\n \r\n while( $i <= $numberofday1 || $j <= $numberofday2 || $k <= $numberofday3 || $i1 <= $numberofday4 || $j1 <= $numberofday5 || $k1 <= $numberofday6 )\r\n { $i++;\r\n $j++;\r\n $k++;\r\n $i1++;\r\n $j1++;\r\n $k1++;\r\n $myDay = 0;\r\n $u=0;\r\n if($i <= $numberofday1 ){\r\n\r\n //Verification des jours feries\r\n\r\n $todayCheckHoliday1 = mktime(0, 0, 0, $monthCurrent, $i, $year); \r\n $today1 = unixtojd(mktime(0, 0, 0, $monthCurrent, $i, $year));\r\n $today = cal_from_jd($today1, CAL_GREGORIAN);\r\n //$todayCheckHoliday = new DateTime($year.'-'.$monthCurrent.'-'.$i.' 00:00:00');\r\n // echo $holidays[1];\r\n // echo $todayCheckHoliday;\r\n \r\n \r\n //////////////////////////////////////////////////\r\n if(($today[\"abbrevdayname\"] == \"Sun\") || ($today[\"abbrevdayname\"] == \"Sat\")){ $color = \"gray\";}\r\n else {$color = \"\";}\r\n\r\n $calendar.= '<td class=\"small\" > '.$i.' </td>';\r\n $calendar.= '<td class=\"small\" > '.$today[\"abbrevdayname\"].' </td>'; \r\n $calendar.= '<td class=\"caseBloque\" id=\"'.$year.'-'.$monthCurrent.'-'.$i.'\" style=\"background-color:'.$color.'\" onclick=\"myEvent(this)\">';\r\n $calendar.= '<div class=\"row\"><div class=\"col-sm-2\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthCurrent.'-'.$i.':1\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-2\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthCurrent.'-'.$i.':2\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-2\"></div></div></td>';\r\n \r\n }\r\n\r\n else{\r\n\r\n $calendar.= '<td class=\"small\" style=\"background-color:'.$color.'\" ></td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> </td>';\r\n $calendar.= '<td style=\"\"> </td>';\r\n }\r\n\r\n if($j <= $numberofday2 ){\r\n\r\n $todayCheckHoliday1 = mktime(0, 0, 0, $monthNext1, $j, $year);\r\n $todayCheckHoliday = new DateTime($year.'-'.$monthNext1.'-'.$j.' 00:00:00');\r\n\r\n $today1 = unixtojd(mktime(0, 0, 0, $monthNext1,$j, $year));\r\n $today = cal_from_jd($today1, CAL_GREGORIAN);\r\n\r\n if(($today[\"abbrevdayname\"] == \"Sun\") || ($today[\"abbrevdayname\"] == \"Sat\")){ $color = \"gray\";}\r\n else {$color = \"\";}\r\n\r\n\r\n $calendar.= '<td class=\"small\" style=\"\" > '.$j.' </td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> '.$today[\"abbrevdayname\"].' </td>';\r\n $calendar.= '<td class=\"caseBloque\" id=\"'.$year.'-'.$monthNext1.'-'.$j.'\" style=\"background-color:'.$color.'\" onclick=\"myEvent(this)\">';\r\n $calendar.= '<div class=\"row\"><div class=\"col-sm-2\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext1.'-'.$j.':1\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-1\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext1.'-'.$j.':2\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-2\"></div></div></td>';\r\n \r\n }\r\n else{\r\n\r\n $calendar.= '<td class=\"small\" style=\"background-color:\" ></td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> </td>';\r\n $calendar.= '<td style=\"\"> </td>';\r\n }\r\n if($k <= $numberofday3 ){\r\n\r\n $today1 = unixtojd(mktime(0, 0, 0,$monthNext2, $k, $year));\r\n $today = cal_from_jd($today1, CAL_GREGORIAN);\r\n\r\n if(($today[\"abbrevdayname\"] == \"Sun\") || ($today[\"abbrevdayname\"] == \"Sat\")) { $color = \"gray\";}\r\n else {$color = \"\";}\r\n\r\n $calendar.= '<td class=\"small\" style=\"\" > '.$k.' </td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> '.$today[\"abbrevdayname\"].' </td>';\r\n $calendar.= '<td class=\"caseBloque\" id=\"'.$year.'-'.$monthNext2.'-'.$k.'\" style=\"background-color:'.$color.'\" onclick=\"myEvent(this)\">';\r\n $calendar.= '<div class=\"row\"><div class=\"col-sm-2\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext2.'-'.$k.':1\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-1\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext2.'-'.$k.':2\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-2\"></div></div></td>';\r\n \r\n }\r\n else{\r\n $calendar.= '<td class=\"small\" style=\"background-color:#d1d2d3\" ></td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> </td>';\r\n $calendar.= '<td style=\"\"></td>';\r\n }\r\n if($i1 <= $numberofday4 ){\r\n\r\n $today1 = unixtojd(mktime(0, 0, 0,$monthNext3, $i1, $year));\r\n $today = cal_from_jd($today1, CAL_GREGORIAN);\r\n\r\n if(($today[\"abbrevdayname\"] == \"Sun\") || ($today[\"abbrevdayname\"] == \"Sat\")){ $color = \"gray\";}\r\n else {$color = \"\";}\r\n\r\n $calendar.= '<td class=\"small\" style=\"\" > '.$i1.' </td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> '.$today[\"abbrevdayname\"].' </td>'; \r\n $calendar.= '<td class=\"caseBloque\" id=\"'.$year.'-'.$monthNext3.'-'.$i1.'\" style=\"background-color:'.$color.'\" onclick=\"myEvent(this)\">';\r\n $calendar.= '<div class=\"row\"><div class=\"col-sm-2\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext3.'-'.$i1.':1\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-1\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext3.'-'.$i1.':2\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-2\"></div></div></td>';\r\n \r\n }\r\n else{\r\n $calendar.= '<td class=\"small\" style=\"\" > </td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> </td>';\r\n $calendar.= '<td style=\"\"> </td>';\r\n }\r\n if($j1 <= $numberofday5 ){\r\n\r\n $today1 = unixtojd(mktime(0, 0, 0,$monthNext4, $j1, $year));\r\n $today = cal_from_jd($today1, CAL_GREGORIAN);\r\n\r\n if(($today[\"abbrevdayname\"] == \"Sun\") || ($today[\"abbrevdayname\"] == \"Sat\")){ $color = \"gray\";}\r\n else {$color = \"\";}\r\n\r\n $calendar.= '<td class=\"small\" style=\"\" > '.$j1.' </td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> '.$today[\"abbrevdayname\"].' </td>';\r\n $calendar.= '<td class=\"caseBloque\" id=\"'.$year.'-'.$monthNext4.'-'.$j1.'\" style=\"background-color:'.$color.'\" onclick=\"myEvent(this)\">';\r\n $calendar.= '<div class=\"row\"><div class=\"col-sm-2\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext4.'-'.$j1.':1\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-1\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext4.'-'.$j1.':2\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-2\"></div></div></td>';\r\n \r\n }\r\n else{\r\n\r\n $calendar.= '<td class=\"small\" style=\"\" > </td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> </td>';\r\n $calendar.= '<td style=\"\"> </td>';\r\n }\r\n if($k1 <= $numberofday6 ){\r\n\r\n $today1 = unixtojd(mktime(0, 0, 0,$monthNext5, $k1, $year));\r\n $today = cal_from_jd($today1, CAL_GREGORIAN);\r\n\r\n if(($today[\"abbrevdayname\"] == \"Sun\") || ($today[\"abbrevdayname\"] == \"Sat\")){ $color = \"gray\";}\r\n else {$color = \"\";}\r\n\r\n $calendar.= '<td class=\"small\" style=\"\" > '.$k1.' </td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> '.$today[\"abbrevdayname\"].' </td>';\r\n $calendar.= '<td class=\"caseBloque\" id=\"'.$year.'-'.$monthNext5.'-'.$k1.'\" style=\"background-color:'.$color.'\" onclick=\"myEvent(this)\">';\r\n $calendar.= '<div class=\"row\"><div class=\"col-sm-2\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext5.'-'.$k1.':1\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-1\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext5.'-'.$k1.':2\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-2\"></div></div></td>';\r\n \r\n }\r\n else{\r\n \r\n $calendar.= '<td class=\"small\" style=\"background-color:'.$color.'\" > </td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> </td>';\r\n $calendar.= '<td style=\"\"> </td>';\r\n }\r\n\r\n \r\n\r\n \r\n $calendar.= '</tr>';\r\n }\r\n \r\n\r\n \r\n\t\r\n\t/* final row */\r\n $calendar.= '</tr>';\r\n \r\n\r\n\r\n\t/* end the table */\r\n\t$calendar.= '</tbody></table>';\r\n\t\r\n\t/* all done, return result */\r\n\treturn $calendar;\r\n}", "function makeArray($res,$from,$to,$exc_entries){\n /* order result by days */\n\t\t$entries=array();\n\t\twhile ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {\n\t\t\t$row = $this->setItems($row, $from, $to, $exc_entries);\n if (is_array($row)) {\n\t\t\t\tforeach($row as $item){\n\t\t\t\t\t$d = strftime('%d', $item['begin']);\n\t\t\t\t\t$m = strftime('%m', $item['begin']);\n\t\t\t\t\t $entries[$m][$d][] = $item;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $entries;\n\t}", "public function buildCalendarList(){\n\t\t\n\t\t$first_day = $this->getFirstDay();\t\t\t\t\t\t//Determine what day of the week the month starts on\n\t\t$current_number_of_days = $this->getNumberOfDays();\t\t//Determine the number of days in the month\n\n\t\t$number_of_previous_days = $first_day;\t\t\t\t\t\t\t\t\t\t//Determine the number of days needed to complete the first week\n\t\t$prev_month_number_of_days = $this->getNumberOfDays($this->getMonth()-1); \t//Determine the number of days in the previous month\n\t\t\n\t\t$_SESSION['month'] = $this->getMonth();\n\t\t$_SESSION['year'] = $this->getYear();\n\t\t$_SESSION['view'] = 'list';\n\t\t\n\t\tob_start();?>\n <table border=\"0\" id=\"events_calendar\" class=\"calendar_list\">\n <?php echo $this->buildCalendarHead() ?>\n <tr>\n <td>\n <?php \n /*** CURRENT MONTH CELLS ***/\n $first_day = $this->getYear() . '-' . $this->getMonth() . '-01';\n $last_day = $this->getYear() . '-' . $this->getMonth() . '-' . $current_number_of_days;\n \n $object = $this->events_ob;\n $month_events = new $object();\n $month_events = $month_events->fetchAll(\"WHERE DATE(\" . $this->events_end_date_field . \") >= '\" . $first_day . \"' AND DATE(\" . $this->events_end_date_field . \") <= '\" . $last_day . \"'\", \"ORDER BY `\" . $this->events_end_date_field . \"` DESC\");\n \n if(count($month_events) > 0){\n for($day = 1; $day <= $current_number_of_days; $day++){\t\t//For each day in the current month\n $full_date = $this->getYear() . '-' . $this->getMonth() . '-' . $day;\n \n $events = $this->buildDayList($full_date);\t//get events for each day\n if(strlen(trim($events))){\n ?>\n <div class=\"day\">\n <?php echo $events; ?>\n </div>\n <?php\n }\n }\n }\n else{?>\n \t\t<h5><?php echo 'No events in ' . $this->getMonthName() . ' ' . $this->getYear();?></h5>\n <?php\n }\n ?> \n </td>\n </tr>\n </table>\n <?php\n return ob_get_clean();\n\t}", "public function getCalendarData($uid,$year, $month){\n $query = $this->db->select('date, data')->from('calendar')->where('uid',$uid)->like('date', \"$year-$month\", 'after')->get();\n $calendarData = array();\n foreach ($query->result() as $row){\n // important: convert date string to integer can solve the problem that\n // \"no events showing for the first 9 days of the month\"\n $calendarData[intval(substr($row->date,8,2))] = $row->data;\n }\n return $calendarData;\n }", "public function chartLineDataByMonth($meeting_nodes = array(), $by_event = TRUE, $step = 1) {\n $output = [];\n\n for ($j = 1; $j < 13; $j += $step) {\n $months = array($j);\n if ($step == 3) {\n $months = array($j, $j + 1, $j + 2);\n }\n\n $meeting_nodes_by_month = \\Drupal::getContainer()->get('flexinfo.querynode.service')->meetingNodesByMonth($meeting_nodes, $months);\n\n if ($by_event) {\n $output[] = count($meeting_nodes_by_month);\n }\n else {\n $output[] = array_sum(\n \\Drupal::getContainer()->get('flexinfo.field.service')\n ->getFieldFirstValueCollection($meeting_nodes_by_month, 'field_meeting_signature')\n );\n }\n }\n\n return $output;\n }", "protected function getMonthsArray()\n\t{\n\t\t$ma = array_pad([], 13, null);\n\t\tunset($ma[0]);\n\t\tforeach ($this->_attr[self::MONTH_OF_YEAR] as $m) {\n\t\t\tif (is_numeric($m['moy'])) {\n\t\t\t\tfor ($i = $m['moy']; $i <= $m['end'] && $i <= 12; $i += $m['period']) {\n\t\t\t\t\t$ma[$i] = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $ma;\n\t}", "function __construct($month)\n\t{\n\t\tforeach ($month as $date)\n\t\t{\n\t\t\t\n\t\t\t$this->schema[$date][0] = ShiftFactory::createShift($date , 0);\n\t\t\t$this->schema[$date][1] = ShiftFactory::createShift($date , 1);\n\t\t\t$this->schema[$date][2] = ShiftFactory::createShift($date , 2);\n\t\t\t$this->schema[$date][3] = ShiftFactory::createShift($date , 3);\n\t\t\t\n\t\t}\n\t}", "protected function get_all_days_in_month($year, $month)\n {\n $md= array(1=>31,28,31,30,31,30,31,31,30,31,30,31);\n\n if ( is_numeric($year) and $month==2)\n {\n $nb_days = $md[2];\n if ( ($year%4==0) and ( ($year%100!=0) or ($year%400!=0) ) )\n {\n $nb_days++;\n }\n }\n elseif ( is_numeric($month) )\n {\n $nb_days = $md[ $month ];\n }\n else\n {\n $nb_days = 31;\n }\n return $nb_days;\n }", "public function getCalendarDays($calendarOfLessons)\n {\n\t\t$calendarDays = array('checkedays' =>array(), 'uncheckedays' =>array(), 'total_checked_duration' => 0);\n\n\t\tforeach ($calendarOfLessons as $daysForMonth)\n\t\t{\n\t\t\tif (isset($daysForMonth[\"days\"] ))\n\t\t\t{\n\t\t\t\tforeach ($daysForMonth[\"days\"] as $i => $day)\n\t\t\t\t{\n\t\t\t\t\tif(isset($day[\"checked\"]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$calendarDays['checkedays'][$i] = $day;\n\t\t\t\t\t\t$calendarDays['total_checked_duration'] += (int)$day['duration'];\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$calendarDays['uncheckedays'][$i] = $day;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\t\t\t\t\t\n\t\treturn $calendarDays;\n\t}", "public function getMonthlyCalendarEntries($model = null, $userId = null, $year = null, $month = null) {\n\t\t// Use today's date if no date given.\n\t\tif(is_null($month)) $month = gmdate(\"F\");\n\t\tif(is_null($year)) $year = gmdate(\"Y\");\n\t\n\t\t// Calculate the month number and week-beginning date for the first of the month\n\t\t$monthnum = gmdate('n', strtotime(\"2:00 1 \".$month. \" \".$year));\n\t\t$monthStartDate = gmmktime(2,0,0,$monthnum,1,$year);\n\t\t$monthWeekBeginning = $this->_getWeekBeginningDate(gmdate(\"Ymd\",$monthStartDate));\n\t\n\t\t// Retrieve all the weekly entries between the start week and the last day of the month\n\t\t$allEntries = $model->find('all',array(\n\t\t\t\t'conditions' => array(\n\t\t\t\t\t\t'user_id' => $userId,\n\t\t\t\t\t\t'week_beginning >=' => gmdate(\"Y-m-d\",$monthWeekBeginning),\n\t\t\t\t\t\t'week_beginning <=' => gmdate(\"Y-m-t\",$monthStartDate)\n\t\t\t\t),\n\t\t\t\t'order' => array('week_beginning' => 'asc')\n\t\t));\n\t\n\t\t$records = array();\n\t\t$weekdayList = array('monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday');\n\t\n\t\t// Iterate through the entries and reformat them as, e.g., array( 1 => '10', 2 => '5', 14 => '2'... 31 => '12')\n\t\tforeach($allEntries as $key => $weeklyEntry) {\n\t\t\tforeach($weekdayList as $weekDayNo => $weekday) {\n\t\t\t\t$weekDayDate = strtotime(\"2:00 \" . $weeklyEntry[get_class($model)]['week_beginning']\n\t\t\t\t\t\t. \" +\" . $weekDayNo . \" day\");\n\t\t\t\tif(date('n Y', $weekDayDate) == $monthnum . \" \" . $year) {\n\t\t\t\t\t$comment = \"Daily entry: \".$weeklyEntry[get_class($model)][$weekday];\n\t\t\t\t\tif(!empty($weeklyEntry[get_class($model)]['what_worked'])) {\n\t\t\t\t\t\t$comment .= \"<br />What worked for me this week: \".$weeklyEntry[get_class($model)]['what_worked'];\n\t\t\t\t\t}\n\t\t\t\t\t$records[date('j', $weekDayDate)] = array(\n\t\t\t\t\t\t\t'entry' => $weeklyEntry[get_class($model)][$weekday],\n\t\t\t\t\t\t\t'comment' => $comment\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\treturn $records;\n\t}", "public function getTwelveMonth() {\n $result = array();\n $cur = strtotime(date('Y-m-01', time()));\n for ($i = 0; $i <= 11; $i++) {\n $result[$i] = date('M', $cur);\n $cur = strtotime('next month', $cur);\n }\n\n return $result;\n }", "public function get_days() {\n\t\t\treturn iterator_to_array( $this->days );\n\t\t}", "public function getMonth($date){\n // OUTPUT : JSON format of all the month according the the DB\n $month = $this->_makeMonth($date);\n for($i = 0; $i < count($month); $i += 1){\n $_day = $month[$i];\n $day = \\App\\Day::where('date', $_day['full_date'])->first(); // Same as in $this->getWeek($date)\n if ($day != null){\n foreach($day->Agenda as $agenda){\n $month[$i]['items'][] = $this->_makeAgenda($agenda);\n }\n }\n }\n return $month;\n }", "function draw_calendar($month,$year, $day=1){\n /* draw table */\n $draw_calendar_time_start = microtime(true);\n $get_xml_start_time = microtime(true);\n \n $calendar = '';\n $xml = autoCache(\"get_event_xml\", array());\n\n $after_xml_time_start = microtime(true);\n $classes = array(\n 1 => 'sun',\n 2 => 'mon',\n 3 => 'tue',\n 4 => 'wed',\n 5 => 'thu',\n 6 => 'fri',\n 7 => 'sat',\n );\n /* days and weeks vars now ... */\n $running_day = date('w',mktime(0,0,0,$month,1,$year));\n $days_in_month = date('t',mktime(0,0,0,$month,1,$year));\n $days_in_this_week = 1;\n $day_counter = 0;\n /* row for week one */\n $calendar.= '<ul class=\"calendar-row\">';\n /* print previous month days until the first of the current month */\n for($x = 0; $x < $running_day; $x++) {\n //Go in the past $x many days in the past\n $back = ($running_day - $x);\n $back = '-' . ($back) . ' days';\n $last_month_date = date('j', strtotime($back, strtotime($year . '-' . $month . '-01')));\n $calendar .= '<li class=\"' . $classes[$days_in_this_week] . ' event not-current\"><span>' . $last_month_date . '</span></li>';\n $days_in_this_week++;\n }\n\n $twig = makeTwigEnviron('/code/events/twig');\n $twig->getExtension('Twig_Extension_Core')->setTimezone('America/Chicago');\n $calendar .= $twig->render('calendar_rest.html',array(\n 'running_day' => $running_day,\n 'days_in_month' => $days_in_month,\n 'days_in_this_week' => $days_in_this_week,\n 'day_counter' => $day_counter,\n 'classes' => $classes,\n 'xml' => $xml,\n 'year' => $year,\n 'month' => $month));\n\n /* all done, return result */\n $draw_calendar_time_end = microtime(true);\n\n $draw_calendar_time = $draw_calendar_time_end - $draw_calendar_time_start;\n $after_xml_time = $draw_calendar_time_end - $after_xml_time_start;\n error_log(\"After XML draw_calendar in $after_xml_time seconds\\n\", 3, '/tmp/calendar.log');\n error_log(\"Full draw_calendar in $draw_calendar_time seconds\\n\", 3, '/tmp/calendar.log');\n return $calendar;\n}", "public static function getDaysInMonth($month, $year) {}", "public static function getMonthDates()\n {\n $current_year = date('Y-01-01 00:00:00');\n $month_names = self::getMonthNames();\n $months = array();\n for ($i=0; $i<12; $i++) {\n $months[$i] = array( 'name'=>$month_names[$i],'date'=>date('Y-m-d 00:00:00',strtotime(\"$current_year + $i months\")));\n }\n\n return $months;\n }", "function print_calendar($mon,$year)\n\t{\n\t\tglobal $dates, $first_day, $start_day;\n\t\t\t$cellWidth =\"150\";\n\t\t$first_day = mktime(0,0,0,$mon,1,$year);\n\t\t$start_day = date(\"w\",$first_day);\n\t\t$res = getdate($first_day);\n\t\t$month_name = $res[\"month\"];\n\t\t$no_days_in_month = date(\"t\",$first_day);\n\t\t\n\t\t//If month's first day does not start with first Sunday, fill table cell with a space\n\t\tfor ($i = 1; $i <= $start_day;$i++)\n\t\t\t$dates[1][$i] = \" \";\n\n\t\t$row = 1;\n\t\t$col = $start_day+1;\n\t\t$num = 1;\n\t\twhile($num<=31)\n\t\t\t{\n\t\t\t\tif ($num > $no_days_in_month)\n\t\t\t\t\t break;\n\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$dates[$row][$col] = $num;\n\t\t\t\t\t\tif (($col + 1) > 7)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$row++;\n\t\t\t\t\t\t\t\t$col = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$col++;\n\t\t\t\t\t\t$num++;\n\t\t\t\t\t}//if-else\n\t\t\t}//while\n\t\t$mon_num = date(\"n\",$first_day);\n\t\t$temp_yr = $next_yr = $prev_yr = $year;\n\n\t\t$prev = $mon_num - 1;\n\t\t$next = $mon_num + 1;\n\n\t\t//If January is currently displayed, month previous is December of previous year\n\t\tif ($mon_num == 1)\n\t\t\t{\n\t\t\t\t$prev_yr = $year - 1;\n\t\t\t\t$prev = 12;\n\t\t\t}\n \n\t\t//If December is currently displayed, month next is January of next year\n\t\tif ($mon_num == 12)\n\t\t\t{\n\t\t\t\t$next_yr = $year + 1;\n\t\t\t\t$next = 1;\n\t\t\t}\n\n\t\techo \"<DIV ALIGN='center'><TABLE BORDER=1 WIDTH=1600px CELLSPACING=0 BORDERCOLOR='silver'>\";\n\n\t\techo \t\"\\n<TR ALIGN='center'><TD BGCOLOR='white'> \".\n\t\t\t \"<A HREF='index.php?month=$prev&year=$prev_yr' STYLE=\\\"text-decoration: none\\\"><B><<</B></A> </TD>\".\n\t\t\t \"<TD COLSPAN=5 BGCOLOR='#99CCFF'><B>\".date(\"F\",$first_day).\" \".$temp_yr.\"</B></TD>\".\n\t\t\t \"<TD BGCOLOR='white'> \".\n\t\t\t \"<A HREF='index.php?month=$next&year=$next_yr' STYLE=\\\"text-decoration: none\\\"><B>>></B></A> </TD></TR>\";\n\n\t\techo \"\\n<TR ALIGN='center'><TD width='$cellWidth'><B>Domenica</B></TD><TD width='$cellWidth'><B>Lunedi</B></TD><TD width='$cellWidth'><B>Martedi</B></TD>\";\n\t\techo \"<TD width='$cellWidth'><B>Mercoledi</B></TD><TD width='$cellWidth'><B>Giovedi</B></TD><TD width='$cellWidth'><B>Venerdi</B></TD><TD width='$cellWidth'><B>Sabato</B></TD></TR>\";\n\t\techo \"<TR><TD COLSPAN=7> </TR><TR height='100px;' ALIGN='center'>\";\n\t\t\t\t\n\t\t$end = ($start_day > 4)? 6:5;\n\t\tfor ($row=1;$row<=$end;$row++)\n\t\t\t{\n\t\t\t\tfor ($col=1;$col<=7;$col++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($dates[$row][$col] == \"\")\n\t\t\t\t\t\t$dates[$row][$col] = \" \";\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!strcmp($dates[$row][$col],\" \"))\n\t\t\t\t\t\t\t$count++;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$t = $dates[$row][$col];\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t//If date is today, highlight it\n\t\t\t\t\t\tif (($t == date(\"j\")) && ($mon == date(\"n\")) && ($year == date(\"Y\"))){\n\t\t\t\t\t\t\techo \"\\n<TD valign='top' BGCOLOR='aqua'><a onclick=\\\"NewWindow(this.href,'pg_center','780','670','no');return false;\\\" href='calendar_add_event.php?azione=add&gg=$t&mm=$mon&yyyy=$year'>\".$t.\"</a>\";\n echo '<div align=\"left\">';\n echo stampa_appuntamenti($t,$mon,$year,$_SESSION['id_utente']);\n echo '</div>';\n echo \"</TD>\";\n }\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t//If the date is absent ie after 31, print space\n\t\t\t\t\t\t\techo \"\\n<TD valign='top'>\".(($t == \" \" )? \"&nbsp;\" : \"<a onclick=\\\"NewWindow(this.href,'pg_center','780','670','no');return false;\\\" href='calendar_add_event.php?azione=add&gg=$t&mm=$mon&yyyy=$year'>\".$t.\"</a>\");\n echo '<div align=\"left\">';\n echo stampa_appuntamenti($t,$mon,$year,$_SESSION['id_utente']);\n echo '</div>';\n echo \"</TD>\";\n\t\t\t\t\t }\n }// for -col\n\t\t\t\t\n\t\t\t\tif (($row + 1) != ($end+1))\n\t\t\t\t\techo \"</TR>\\n<TR ALIGN='center' height='100px;'>\";\n\t\t\t\telse\n\t\t\t\t\techo \"</TR>\";\n\t\t\t}// for - row\n\t\techo \"\\n</TABLE><BR><BR><A HREF=\\\"index.php\\\">Visualizza mese corrente</A> </DIV>\";\n\t}", "function generate_calendar($year, $month, $days = array(), $day_name_length = 3, $first_day = 0, $prev_link, $next_link)\n{\n\n\t$first_of_month = gmmktime(0,0,0,$month,1,$year);\n\t#remember that mktime will automatically correct if invalid dates are entered\n\t# for instance, mktime(0,0,0,12,32,1997) will be the date for Jan 1, 1998\n\t# this provides a built in \"rounding\" feature to generate_calendar()\n\n\t$day_names = array(); #generate all the day names according to the current locale\n\tfor($n=0,$t=(3+$first_day)*86400; $n<7; $n++,$t+=86400) #January 4, 1970 was a Sunday\n\t\t$day_names[$n] = ucfirst(gmstrftime('%A',$t)); #%A means full textual day name\n\n\tlist($month, $year, $month_name, $weekday) = explode(',',gmstrftime('%m,%Y,%B,%w',$first_of_month));\n\t$weekday = ($weekday + 7 - $first_day) % 7; #adjust for $first_day\n\t$title = htmlentities(ucfirst($month_name)).'&nbsp;'.$year; #note that some locales don't capitalize month and day names\t\n\t\n\n\n\t#Begin calendar. Uses a real <caption>. See http://diveintomark.org/archives/2002/07/03\n\t\n\t$calendar = '<div id=\"calendar-box\"><table class=\"calendar\">'.\"\\n\".\n\t\t'<caption class=\"calendar-month\">'.$prev_link.'&nbsp;&nbsp;&nbsp;&nbsp;';\n\n\t$calendar .= '<form class=\"cal-select\" method=\"GET\" action=\"manage.php\">\n\t\t\t\t\t<input type=\"hidden\" name=\"display\" value=\"month\" />\n\t\t\t\t\t<select name=\"month\">';\n\t$months = array(1=>'January',2=>'February',3=>'March',4=>'April',5=>'May',6=>'June',7=>'July',8=>'August',9=>'September',10=>'October',11=>'November',12=>'December');\n\t\n\tfor ($x = 1; $x <= 12; $x++)\n\t{\n\t\tif (isset($_GET['month']) || isset($_SESSION['lastMonthViewMonth']))\n\t\t{\n\t\t\tif (isset($_GET['month'])) { $m = $_GET['month']; } else { $m = $_SESSION['lastMonthViewMonth']; }\n\t\t\tif ($m == $x)\n\t\t\t\t$calendar .= '<option value=\"'.$x.'\" SELECTED>'.$months[$x].'</option>';\n\t\t\telse\n\t\t\t\t$calendar .= '<option value=\"'.$x.'\">'.$months[$x].'</option>';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (date('n', time()) == $x)\n\t\t\t\t$calendar .= '<option value=\"'.$x.'\" SELECTED>'.$months[$x].'</option>';\n\t\t\telse\n\t\t\t\t$calendar .= '<option value=\"'.$x.'\">'.$months[$x].'</option>';\n\t\t}\n\t\t\n\t}\n\t$calendar .= '</select> <select name=\"year\">';\n\tfor ($x = 2010; $x <= 2070; $x++)\n\t{\t\n\t\tif (isset($_GET['year']) || isset($_SESSION['lastMonthViewYear']))\n\t\t{\n\t\t\tif (isset($_GET['year'])) { $y = $_GET['year']; } else { $y = $_SESSION['lastMonthViewYear']; }\n\t\t\tif ($y == $x)\n\t\t\t\t$calendar .= '<option value=\"'.$x.'\" SELECTED>'.$x.'</option>';\n\t\t\telse\n\t\t\t\t$calendar .= '<option value=\"'.$x.'\">'.$x.'</option>';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (date('Y', time()) == $x)\n\t\t\t\t$calendar .= '<option value=\"'.$x.'\" SELECTED>'.$x.'</option>';\n\t\t\telse\n\t\t\t\t$calendar .= '<option value=\"'.$x.'\">'.$x.'</option>';\n\t\t}\n\t}\n\t$calendar .= '</select> <input type=\"submit\" value=\"view\" /></form>';\n\t\n\t$calendar .= '&nbsp;&nbsp;&nbsp;&nbsp;'.$next_link.\"</caption>\\n<tr class=\\\"day-names-row\\\">\";\n\n\tif($day_name_length){ #if the day names should be shown ($day_name_length > 0)\n\t\t#if day_name_length is >3, the full name of the day will be printed\n\t\tforeach($day_names as $d)\n\t\t\t$calendar .= '<th abbr=\"'.htmlentities($d).'\">'.htmlentities($day_name_length < 4 ? substr($d,0,$day_name_length) : $d).'</th>';\n\t\t$calendar .= \"</tr>\\n<tr class=\\\"day-row\\\">\";\n\t}\n\t\n\t// begin calendar days\n\tif($weekday > 0) $calendar .= '<td colspan=\"'.$weekday.'\">&nbsp;</td>'; #initial 'empty' days\n\tfor($day=1,$days_in_month=gmdate('t',$first_of_month); $day<=$days_in_month; $day++,$weekday++){\n\t\tif($weekday == 7){\n\t\t\t$weekday = 0; #start a new week\n\t\t\t$calendar .= \"</tr>\\n<tr class=\\\"day-row\\\">\";\n\t\t}\n\t\tif(isset($days[$day]) and is_array($days[$day]))\n\t\t{\n\t\t\t@list($classes, $content) = $days[$day];\n\t\t\tif(is_null($content)) $content = $day;\n\t\t\t$calendar .= '<td'.($classes ? ' class=\"'.htmlspecialchars($classes).'\">' : '>').\n\t\t\t\t($content).'</td></a>';\n\t\t}\n\t\telse $calendar .= '<td>'.$day.'</td>';\n\t}\n\tif($weekday != 7) $calendar .= '<td colspan=\"'.(7-$weekday).'\">&nbsp;</td>'; #remaining \"empty\" days\n\n\treturn $calendar.\"</tr>\\n</table></div>\\n\";\n}", "function generar_dias ($dia_inicio, $dia_fin, $mes_inicio, $mes_fin, $i, $dias_seleccionados, $meses_intermedios){\n //guardamos los dias del periodo\n $dias=array();\n $anio=date('Y');\n switch($i){\n case 'mm' : while($dia_inicio <= $dia_fin){\n $fecha= date('d-m-Y', strtotime(\"$dia_inicio-$mes_inicio-$anio\"));\n //print_r(\"<br>\");\n //print_r($fecha);\n //print_r(\"<br>\");\n if($this->es_dia_valido(date('N', strtotime($fecha)), $dias_seleccionados)){\n $dias[]=$fecha;\n }\n\n $dia_inicio += 1;\n }\n\n break;\n\n case 'mc' : $this->obtener_dias($dia_inicio, $mes_inicio, $this->_meses[intval($mes_inicio)], $dias_seleccionados, &$dias);\n $this->obtener_dias(1, $mes_fin, $dia_fin, $dias_seleccionados, &$dias);\n\n break;\n\n case 'mnc': //obtenemos los dias para dia_inicio y mes_inicio\n $this->obtener_dias($dia_inicio, $mes_inicio, $this->_meses[intval($mes_inicio)], $dias_seleccionados, &$dias);\n \n //para los meses intermedios podemos obtener los dias sin problemas, avanzamos desde 1 \n //hasta el ultimo dia del mes y realizamos el descarte adecuado.\n foreach ($meses_intermedios as $clave=>$mes_i){ //mes_i contiene un valor entero\n $this->obtener_dias(1, $mes_i, $this->_meses[$mes_i], $dias_seleccionados, &$dias);\n }\n\n //obtenemos los dias para dia_fin y mes_fin\n $this->obtener_dias(1, $mes_fin, $dia_fin, $dias_seleccionados, &$dias);\n\n break;\n }\n\n return $dias;\n }", "private function build_calendar($annoMesDia){\n $mes = Carbon::createFromFormat('Y-m-d', $annoMesDia);\n $primerDiaCalendario = $mes->copy()->startOfMonth()->startOfWeek();\n $ultimoDiaCalendario = $mes->copy()->lastOfMonth()->endOfWeek();\n\n // construir las semanas\n $day = $primerDiaCalendario->copy();\n $weeks = [];\n $week = ['weekNumber'=>$day->weekOfYear, 'days'=>[]];\n while($day->between($primerDiaCalendario, $ultimoDiaCalendario)){\n // agregar DAY a la WEEK\n array_push($week['days'], [\n '_day' => $day->copy(),// Objecto para hacer operacione\n 'day' => $day->format('Y-m-d'),\n 'isWeekend' => $day->dayOfWeek==6 || $day->dayOfWeek==0,\n 'number' => $day->day,\n 'sameMonth' => $day->month==$mes->month\n ]);\n\n // si es domingo, pasar a la siguiente semana\n if($day->dayOfWeek==0){\n array_push($weeks, $week);\n $week = ['weekNumber'=>$day->weekOfYear, 'days'=>[]];\n }\n\n $day->addDay();\n }\n return (object)[\n 'firstDayOfCalendar' => $primerDiaCalendario->format('Y-m-d'),\n 'lastDayOfCalendar' => $ultimoDiaCalendario->format('Y-m-d'),\n 'weeks' => $weeks\n ];\n }", "function dateContent() {\n\t\t//printvar(func_get_arg());\n\t\tif (func_num_args() >= 2) {\n\t\t\t$day = intval(func_get_arg(0));\n\t\t\t$content = trim(func_get_arg(1));\n\t\t\t\n\t\t\tif ($day >= 1 && $day <= 31) {\n\t\t\t\t$this->_dateArray[$day] = $content;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telseif (func_num_args() == 1) {\n\t\t\t$day = intval(func_get_arg(0));\n\t\t\t\n\t\t\tif (array_key_exists($day,$this->_dateArray)) {\n\t\t\t\treturn $this->_fillContent($this->_dateArray[$day]);\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t} \n\t\telse {\n\t\t\treturn $this->_dateArray;\n\t\t\t//user_error(\"You must pass at least one argument to the dateContent function of the Calendar class\", E_NOTICE);\n\t\t}\n\t}", "public function getRepeatDates()\n {\n $repeatDateStart = clone $this->getDateStart();\n $repeatDateEnd = clone $this->getDateEnd();\n $repeatDates = array(array('start' => clone $repeatDateStart, 'end' => clone $repeatDateEnd));\n $repeatDays = $this->getRepeatDays();\n\n $dayInterval = new DateInterval('P1D');\n for ($i = 0; $i < 6; ++$i) {\n $repeatDateStart->add($dayInterval);\n $repeatDateEnd->add($dayInterval);\n if (in_array($repeatDateStart->format('w'), $repeatDays)) {\n $repeatDates[] = array('start' => clone $repeatDateStart, 'end' => clone $repeatDateEnd);\n }\n }\n\n return $repeatDates;\n }", "function get_imc($dataSet) {\n $index_imc = 2;\n $column_imc = $dataSet[0][$index_imc];\n $imc = array();\n for ($i = 1; $i < count($dataSet); $i++){\n $daily_imc = $dataSet[$i][$column_imc];\n $imc[] = array(\"date\" => $dataSet[$i][\"date\"],\n $dataSet[0][$index_imc] => $daily_imc);\n }\n return $imc;\n}", "private function getNewTicketsByDayList() {\r\n\t\t$sql = \"SELECT dateadd(DAY,0, datediff(day,0, Date_Entered_UTC)) AS day, count(TicketNbr) as count \";\r\n\t\t$sql .= \"FROM v_rpt_Service \";\r\n\t\t$sql .= \"WHERE Date_Entered_UTC >= DATEADD(day, -30, GETDATE()) \";\r\n\t\t$sql .= \"GROUP BY dateadd(DAY,0, datediff(day,0, Date_Entered_UTC)) \";\r\n\t\t$sql .= \"ORDER BY dateadd(DAY,0, datediff(day,0, Date_Entered_UTC)) \";\r\n\t\t$result = sqlsrv_query($this->conn, $sql) or die ('Error in SQL: ' . $sql);\r\n\r\n\t\t$i = 0;\r\n\t\twhile($row = sqlsrv_fetch_array($result)) {\r\n\t\t\t$r[$i]['date'] = (strtotime($row['day'])*1000)-6*60*60*1000;\r\n\t\t\t$r[$i]['count'] = (string)$row['count'];\r\n\t\t\t$i++;\r\n\t\t}\r\n\r\n\t\treturn($r);\r\n\t}", "public function buildCalendar(){\n\n\t\t$first_day = $this->getFirstDay();\t\t\t\t\t\t//Determine what day of the week the month starts on\n\t\t$current_number_of_days = $this->getNumberOfDays();\t\t//Determine the number of days in the month\n\n\t\t$number_of_previous_days = $first_day;\t\t\t\t\t\t\t\t\t\t//Determine the number of days needed to complete the first week\n\t\t$prev_month_number_of_days = $this->getNumberOfDays($this->getMonth()-1); \t//Determine the number of days in the previous month\n\t\t\n\t\t$_SESSION['month'] = $this->getMonth();\n\t\t$_SESSION['year'] = $this->getYear();\n\t\t$_SESSION['view'] = 'calendar';\n\n\t\tob_start();?>\n <table border=\"0\" id=\"events_calendar\">\n <?php echo $this->buildCalendarHead() ?>\n <tr id=\"events_calendar_weekdays\">\n <th>\n\t\t\t\t\t<div class=\"full_week_name\">Sunday</div>\n\t\t\t\t\t<div class=\"short_week_name\">Sun</div>\n\t\t\t\t\t<div class=\"abrev_week_name\">S</div>\n </th>\n <th>\n\t\t\t\t\t<div class=\"full_week_name\">Monday</div>\n\t\t\t\t\t<div class=\"short_week_name\">Mon</div>\n\t\t\t\t\t<div class=\"abrev_week_name\">M</div>\n </th>\n <th>\n\t\t\t\t\t<div class=\"full_week_name\">Tuesday</div>\n\t\t\t\t\t<div class=\"short_week_name\">Tue</div>\n\t\t\t\t\t<div class=\"abrev_week_name\">T</div>\n </th>\n <th>\n\t\t\t\t\t<div class=\"full_week_name\">Wednesday</div>\n\t\t\t\t\t<div class=\"short_week_name\">Wed</div>\n\t\t\t\t\t<div class=\"abrev_week_name\">W</div>\n </th>\n <th>\n\t\t\t\t\t<div class=\"full_week_name\">Thursday</div>\n\t\t\t\t\t<div class=\"short_week_name\">Thu</div>\n\t\t\t\t\t<div class=\"abrev_week_name\">T</div>\n </th>\n <th>\n\t\t\t\t\t<div class=\"full_week_name\">Friday</div>\n\t\t\t\t\t<div class=\"short_week_name\">Fri</div>\n\t\t\t\t\t<div class=\"abrev_week_name\">F</div>\n </th>\n <th>\n\t\t\t\t\t<div class=\"full_week_name\">Saturday</div>\n\t\t\t\t\t<div class=\"short_week_name\">Sat</div>\n\t\t\t\t\t<div class=\"abrev_week_name\">S</div>\n </th>\n </tr>\n <?php\n $dayCounter = 0;\t\t\t\t\t\t\t\t\t\t\t//Keeps count of the days in a week\n\n /*** PREVIOUS MONTH CELLS ***/\n for($day = $number_of_previous_days; $day >= 1; $day--){\t//For each day in the previous month needed for a full week\n $dayNumber = $prev_month_number_of_days - ($day-1);\t\t\n \n //Get full date (YYYY-MM-DD)\n $year = ($this->getPrevMonth() == 12)? ($this->getYear()-1): $this->getYear();\n $full_date = $year . '-' . $this->getPrevMonth() . '-' . $dayNumber;\n \n $dayCounter ++;\n if($dayCounter == 1){\t\t\t\t\t//Start new row\n echo '<tr>';\n }\n \n echo $this->buildCalendarCell($full_date, $dayNumber, 'prev_month');\t//Create Calendar Cell\n\n if($dayCounter == 7){\t\t\t\t\t//End new row\n echo '</tr>';\n $dayCounter = 0;\n }\n }\n\n /*** CURRENT MONTH CELLS ***/\n for($day = 1; $day <= $current_number_of_days; $day++){\t\t//For each day in the current month\n $full_date = $this->getYear() . '-' . $this->getMonth() . '-' . $day;\n $dayCounter ++;\n if($dayCounter == 1){\t\t\t\t\t//Start new row\n echo '<tr>';\n }\n\n echo $this->buildCalendarCell($full_date, $day, 'current_month');\t//Create Calendar Cell\n\n if($dayCounter == 7){\t\t\t\t\t//End new row\n echo '</tr>';\n $dayCounter = 0;\n }\n }\n\n /*** NEXT MONTH CELLS ***/\n for($day = 1; $day <= $dayCounter; $day++){\t//For each day in the current month\n //Get full date (YYYY-MM-DD)\n $year = ($this->getNextMonth() == 1)? ($this->getYear()+1): $this->getYear();\n $full_date = $year . '-' . $this->getNextMonth() . '-' . $day;\n \n $dayCounter ++;\n if($dayCounter == 1){\t\t\t\t\t//Start new row\n echo '<tr>';\n }\n\n echo $this->buildCalendarCell($full_date, $day, 'next_month');\t//Create Calendar Cell\n\n if($dayCounter == 7){\t\t\t\t\t//End new row\n echo '</tr>';\n $dayCounter = 0;\n }\n }\n ?>\n </table>\n <style>\n\t\t\t<?php \n\t\t\tforeach($this->getCategories() as $c){?>\n\t\t\t#events_calendar .event.category_<?php echo $c->getId(); ?>:before{color: <?php echo $c->getColor(); ?> !important;}\n\t\t\t<?php } ?>\n\t\t</style>\n <?php\n\t\treturn ob_get_clean();\n\t}", "protected function getMesesArray(){\n\n $dt = new \\DateTime();\n $dt->modify('-13 months');\n for ($i = 0 ; $i < 12 ; $i ++){\n \t\t$dt->modify('+1 month');\n $meses[$i] = strftime(\"%b %Y\" , $dt->getTimeStamp());\n }\n return json_encode($meses);\n }", "function SemanasEnElMes(){\n \n $fecha_hoy = date('Y-m-01');\n $fecha_fin = date('Y-m-t');\n $dia_fin = date('t');\n $j=1;\n $diaf = '';\n //dia finales\n for($i=1;$i <= $dia_fin;$i++){ \n if(($i%7) == 0){\n $diaf .= $i.',';\n $j++; \n } \n }\n \n $diaf = substr($diaf, 0, -1);\n $sep_fd = explode(\",\", $diaf);\n $count_d = count($sep_fd); \n $ini_semana = array();\n $inicios = array();\n //dias iniciales\n for($i=0;$i< $count_d;$i++){ \n \n \n $fecha_actual = date(\"Y-m-$sep_fd[$i]\"); \n $ini_semana = date(\"Y-m-d\",strtotime($fecha_actual.\"- 6 days\")); \n array_push($inicios,$ini_semana); \n }\n \n //semanas del mes\n $semanas_mes = array();\n $semana_dia_final = array();\n for($i=0;$i< $count_d;$i++){\n if(($count_d-1) == $i){\n $semanas_mes[$i] = array('fi'=>$inicios[$i],'ff'=>date(\"Y-m-t\")); \n } else{ \n $semanas_mes[$i] = array('fi'=>$inicios[$i],'ff'=>date(\"Y-m-$sep_fd[$i]\")); \n }\n }\n \n //var_dump($semanas_mes);\n return $semanas_mes;\n\n \n}", "public function graphmonthused()\n \t{\n \t\t// announce return variable\n \t\t$return \t= \tarray();\n \t\t$count \t\t=\tarray();\n \t\t// select logger collection \n \t\t$use_data \t= \t$this->mongo_db->db->used;\n \t\t// preparing query data\n \t\t$splitday \t= \texplode('-', $this->use_date);\n \t\t// check day in month\n \t\t$lastday \t= \tcal_days_in_month(CAL_GREGORIAN,$splitday[1],$splitday[0]);\n \t\tfor ($i = 1; $i <= $lastday; $i++) \n \t\t{\n \t\t\tif (strlen($i) == 1) \n \t\t\t{\n \t\t\t\t// build query data\n \t\t\t\t$querydata \t= \tarray(\n \t\t\t\t\t'use_date' \t\t=> \t\t$splitday[0].'-'.$splitday[1].'-0'.$i, \n \t\t\t\t\t'use_appid' \t=> \t\t$this->use_appid\n \t\t\t\t\t);\n \t\t\t\t// count and insert data to array\n \t\t\t\tarray_push($count, $use_data->count($querydata));\n \t\t\t} \n \t\t\telse \n \t\t\t{\n \t\t\t\t// build query data\n \t\t\t\t$querydata \t\t= \tarray(\n \t\t\t\t\t'use_date' \t=> \t$splitday[0].'-'.$splitday[1].'-'.$i, \n \t\t\t\t\t'use_appid' => \t$this->use_appid\n \t\t\t\t\t);\n \t\t\t\t// count and insert data to array\n \t\t\t\tarray_push($count, $use_data->count($querydata));\n \t\t\t}\n \t\t}\n\n \t\t$return\t\t=\tarray(\n \t\t\t'lastday'\t=>\t$lastday,\n \t\t\t'data'\t\t=>\tarray(\n\t\t\t\t'name'\t\t=>\t\t'User',\n \t\t\t\t'data'\t\t=>\t\t$count\n \t\t\t\t)\n \t\t\t);\n\n \t\treturn $return;\t\n \t}" ]
[ "0.7222785", "0.69435954", "0.69158983", "0.68997", "0.6889217", "0.6864905", "0.6826922", "0.68108207", "0.6707525", "0.67010236", "0.6694331", "0.66921747", "0.6622807", "0.65878236", "0.65718424", "0.6504943", "0.64617896", "0.6432567", "0.6409523", "0.64075303", "0.63794696", "0.63785", "0.63744175", "0.6306545", "0.62953717", "0.6292728", "0.6278373", "0.62777454", "0.61962736", "0.61920756", "0.61762744", "0.61628497", "0.6144565", "0.6135886", "0.6135137", "0.6130821", "0.61298317", "0.6123673", "0.6101574", "0.6100296", "0.6081457", "0.6061109", "0.60251206", "0.60217416", "0.6011241", "0.60083926", "0.6000718", "0.59930366", "0.5986617", "0.5975125", "0.5969675", "0.59692425", "0.59325427", "0.5900932", "0.5895705", "0.58806014", "0.58780175", "0.5860814", "0.5859573", "0.58250135", "0.57984436", "0.57334393", "0.57286805", "0.5723607", "0.57114613", "0.57109725", "0.5693774", "0.56910324", "0.56796324", "0.5645594", "0.5638896", "0.5636798", "0.5609328", "0.560677", "0.5605915", "0.55893934", "0.55675167", "0.55575085", "0.55403817", "0.5500785", "0.5485286", "0.547495", "0.547458", "0.5454496", "0.54408675", "0.543599", "0.54311186", "0.5421474", "0.54090935", "0.5403569", "0.53880537", "0.53863114", "0.5375894", "0.53657407", "0.5356923", "0.5354178", "0.53511184", "0.53496534", "0.5347688", "0.53450304" ]
0.73546946
0
Set the calendar title string If a custom calendar title string is desired, this method is used to set it. Otherwise, no calendar title is used.
public function setTitle($str) { $this->headerTitle = $str; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function setTitle()\n {\n $this->title = $this->start_date;\n\n if ($this->start_date != $this->end_date) {\n $this->title .= ' - '.$this->end_date;\n }\n }", "public function setEventTitle($eventTitle)\n {\n $this->eventTitle = isset($eventTitle) ? $eventTitle : '';\n }", "protected function setTitle()\n\t{\n\t\tglobal $APPLICATION;\n\n\t\tif ($this->arParams[\"SET_TITLE\"] == 'Y')\n\t\t\t$APPLICATION->SetTitle(Localization\\Loc::getMessage(\"SPOL_DEFAULT_TITLE\"));\n\t}", "private function makeCalendarTitle()\n\t{\n\t\tif(strlen($this->headerTitle) > 0) {\n\t\t\t$this->calWeekDays .= \"\\t<tr>\\n\\t\\t<th class=\\\"headerTitle\\\" colspan=\\\"7\\\">\".$this->headerTitle.\"</th>\\n\\t</tr>\";\n\t\t\t$this->outArray['title'] = $this->headerTitle;\n\t\t}\n\t}", "function SetTitle($title, $isUTF8 = false) {\n parent::SetTitle($title, $isUTF8);\n $this->title = ($isUTF8 ? utf8_encode($title) : $title);\n }", "public function setEventTitle($value)\n {\n return $this->set('EventTitle', $value);\n }", "public function setTitle($title = '')\n {\n $this->title = $title;\n }", "public function setTitle(string $title) {\n\t\t$this->title = $title;\n\t}", "public static function setTitle(string $title) {}", "public function setTitle(string $title)\n {\n if (strlen($title) > 3) {\n $this->title = $title;\n }\n }", "public function setTitle($title)\r\n\t\t{\r\n\t\t\t$this->_title = $title;\r\n\t\t}", "public function setTitle($title) {\r\n $this->_title = $title;\r\n }", "public function setTitle($title) {\n $this->_title = $title;\n }", "function set_title($title){\r\n\t\t$this->_title = $title;\r\n\t}", "public function setTitle($title) {\n\t\t\n\t\t\t$this->_title = $title;\n\t\t\n\t\t}", "public function setTitle($title){\n\t\t$this->mail_title = $title;\n\t}", "public function setTitle(string $title = null);", "public function setTitle($title) {\n\t\t$this->title = $title;\n\t}", "public function setTitle($title) {\n\t\t$this->title = $title;\n\t}", "public function setTitle($title) {\n\t\t$this->title = $title;\n\t}", "public function setTitle($title) {\n $this->_title = $title;\n }", "public function setTitle($title)\n {\n $this->_title = $title;\n }", "public function setTitle($title)\n {\n $this->_title = $title;\n }", "public function setTitle(string $title);", "protected function setPageTitle() {\r\n\t\t$pageTitleText = (empty($this->settings['news']['semantic']['general']['pageTitle']['useAlternate'])) ? $this->newsItem->getTitle() : $this->newsItem->getAlternativeTitle();\r\n\t\t$pageTitleAction = $this->settings['news']['semantic']['general']['pageTitle']['action'];\r\n\r\n\t\tif (!empty($pageTitleAction)) {\r\n\t\t\tswitch ($pageTitleAction) {\r\n\t\t\t\tcase 'prepend':\r\n\t\t\t\t\t$pageTitleText .= ': ' . $GLOBALS['TSFE']->page['title'];\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'append':\r\n\t\t\t\t\t$pageTitleText = $GLOBALS['TSFE']->page['title'] . ': ' . $pageTitleText;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t}\r\n\t\t\t$this->pageTitle = html_entity_decode($pageTitleText, ENT_QUOTES, \"UTF-8\");\r\n\t\t\t$GLOBALS['TSFE']->page['title'] = $this->pageTitle;\r\n\t\t\t$GLOBALS['TSFE']->indexedDocTitle = $this->pageTitle;\r\n\t\t}\r\n\t}", "public function setTitle($title)\n\t{\n\t\tif (!empty($title)) {\n\t\t\t$this->title = $title;\n\t\t}\n\t}", "function setTitle($title) {\n\t\t$this->_title = $title;\n\t}", "public function set_title($title)\n {\n $this->title = $title;\n }", "public function setTitle($title) {\r\n $this->title = $title;\r\n }", "public function setTitle($title)\r\n {\r\n $this->title = $title;\r\n }", "function setTitle($title) {\r\n $this->_title = $title;\r\n }", "function setTitle($title) {\r\n $this->_title = $title;\r\n }", "public function setTitle($value)\n {\n $this->_title = $value;\n }", "public function setTitle(string $title)\n {\n $this->title = $title;\n }", "public function setTitle(string $title)\n {\n $this->title = $title;\n }", "public function setTitle($value)\n {\n if (!is_string($value))\n throw new CException(Yii::t('EWebFeed', 'title must be a string'));\n $this->title = $value;\n }", "public function setTitle($title = ''){\n $this->setVar('TITLE', $title);\n }", "public function setTitle($title)\n\t{\n\t\t$this->title = $title;\n\t}", "public function setTitle($title)\n\t{\n\t\t$this->title = $title;\n\t}", "public function setTitle($title) {\n $this->title = $title;\n }", "public function setTitle($title) {\n $this->title = $title;\n }", "public function setTitle($title){\n $this->title = $title;\n }", "public function setTitle($title) {\n $this->title = $title ;\n }", "public function setTitle($title)\n {\n $this->title = (string) $title;\n }", "public function setTitle($newTitle) {\n\t\t$this->title = $newTitle;\n\t}", "function setTitle( $title )\n {\n $title = trim( $title );\n $this->properties['TITLE'] = $title;\n }", "public function setTitle($title)\n {\n $this->title = $title;\n }", "public function setTitle($title)\n {\n $this->title = $title;\n }", "public function setTitle($title)\n {\n $this->title = $title;\n }", "public function setTitle($title)\n {\n $this->title = $title;\n }", "public function setTitle($title)\n {\n $this->title = $title;\n }", "public function setTitle($title)\n {\n $this->title = $title;\n }", "function setTitle($title)\n {\n $this->m_title = $title;\n }", "public function setTitle( $newTitle )\n {\n\t\t$this->title = $newTitle;\n\t}", "public function setTitle($title)\n {\n $this->title = $title;\n }", "function setTitle($title) {\n\t\t$this->title = $title;\n\t}", "public function set_title($text){\n $this->title=$text;\n }", "public function setTitle($title);", "public function setTitle($title);", "public function setTitle($title);", "public function setTitle($title);", "public function setTitle($title);", "public function setTitle($title);", "public function setTitle($title);", "public function setTitle($title){\n $this->title = $title;\n }", "public function setTitle($newTitle) { $this->Title = $newTitle; }", "public function set_title($title)\n {\n $this->set_default_property(self::PROPERTY_TITLE, $title);\n }", "public function setTitle($var)\n {\n GPBUtil::checkString($var, True);\n $this->title = $var;\n\n return $this;\n }", "public function setTitle($var)\n {\n GPBUtil::checkString($var, True);\n $this->title = $var;\n\n return $this;\n }", "public function setTitle($var)\n {\n GPBUtil::checkString($var, True);\n $this->title = $var;\n\n return $this;\n }", "public function setTitle($var)\n {\n GPBUtil::checkString($var, True);\n $this->title = $var;\n\n return $this;\n }", "public function setTitle($var)\n {\n GPBUtil::checkString($var, True);\n $this->title = $var;\n\n return $this;\n }", "public function setTitle($var)\n {\n GPBUtil::checkString($var, True);\n $this->title = $var;\n\n return $this;\n }", "public function set_title($title){\n\t\t$this->set_channel_element('title', $title);\n\t}", "function setTitle($title)\r\n {\r\n $this->title = $title;\r\n }", "public function setTitle($value)\n {\n $this->title = $value;\n }", "function setTitle($title)\r\n\t{\r\n\t\t$this->title = $title;\r\n\t}", "public function setTitle($title){\n \t$this->title = $title;\n }", "function setTitle($a_title)\n\t{\n\t\t$this->title = $a_title;\n\t}", "public function setTitle(string $value)\n {\n $this->title = $value;\n }", "function set_title($title) \r\n\t{\r\n\t\t//$this->title = $title;\r\n\t\t$this->data['title_for_layout'] = $title;\r\n\t\t$this;\r\n\t}", "function setTitle($title)\n {\n $this->title = $title;\n }", "function setTitle($title)\n {\n $this->title = $title;\n }", "function setTitle($title)\n {\n $this->title = $title;\n }", "public function setTitle(string $title): void {\n\t\t$this->m_title = $title;\n\t}", "function set_the_title($title) {\n\n md_set_the_title($title);\n \n }", "public static function setTitle($projectTitle=\"Default App\")\n {\n global $application_name;\n $application_name = $projectTitle;\n }", "public function setTitle($var)\n {\n $this->_title = $var;\n }", "public function setTitle($title)\n {\n if(strlen($title) <= 50 && strlen($title) > 0 && preg_match('#^[a-zA-Z0-9- ]*$#', $title)) {\n $this->title = $title;\n }\n }", "public function setTitle($title)\n {\n $this->setValue('title', $title);\n }", "public function setTitle(string $title): void\n {\n $this->_title = $title;\n }", "private function setTitle(\\Scrivo\\Str $title) {\n\t\t$this->title = $title;\n\t}", "function edan_search_set_title( $title )\n {\n $options = new esw_options_handler();\n $cache = new esw_cache_handler();\n\n /**\n * if in the loop and the title is cached (or if object group is retrieved successfully)\n * modify the page title on display.\n */\n if(in_the_loop() && edan_search_name_from_url() == $options->get_path() && $options->get_title() != '')\n {\n if(get_query_var('edanUrl'))\n {\n $object = $cache->get()['object'];\n\n if($object)\n {\n if(property_exists($object, 'content') && property_exists($object->{'content'}, 'descriptiveNonRepeating'))\n {\n if(property_exists($object->{'content'}->{'descriptiveNonRepeating'}, 'title'))\n {\n $title = $object->{'content'}->{'descriptiveNonRepeating'}->{'title'}->{'content'};\n }\n }\n elseif(property_exists($object, 'title'))\n {\n if(property_exists($object->{'title'}, 'content'))\n {\n $title = $this->object->{'title'}->{'content'};\n }\n else\n {\n $title = $this->object->{'title'};\n }\n }\n }\n }\n else\n {\n $title = $options->get_title();\n }\n }\n\n return $title;\n }", "function setTitle(string $title): void\n {\n $this->data['head']['title'] = $title;\n }", "function setTitle($title, $append = false, $default = false) {\n\n if ($default && $this->title) return;\n\n if ($append) {\n $title = $this->title . $append . $title;\n }\n $this->title = $title;\n }", "public function setTitle($title) {\n\t\t$title = str_replace(\"\\r\\n\", \"|\", $title);\n\t\t$title = str_replace(\" \", \"+\", $title);\n\t\t$this -> setProperty('chtt', $title);\n\t}", "public function setPageTitle($title);", "public function setTitle(string $title) {\n\t\t$this->_config = Hash::insert($this->_config, 'title', $title);\n\n\t\treturn $this;\n\t}", "public function setTitle(string $_title)\n {\n $this->_title = $_title;\n\n return $this;\n }", "public function set_title($title = null)\n\t{\n\t\t$title or $title = config('site.name');\n\t\t$this->title = $title;\n\t\treturn $this;\n\t}", "public function setSpreadsheetTitle($value)\n {\n return $this->set('SpreadsheetTitle', $value);\n }" ]
[ "0.6799438", "0.6777323", "0.67509794", "0.6608078", "0.6603208", "0.6578803", "0.657034", "0.6551813", "0.6529491", "0.65267116", "0.6501285", "0.6496687", "0.6484237", "0.6476406", "0.64763075", "0.6455568", "0.64471817", "0.6444261", "0.6444261", "0.6444261", "0.644399", "0.64415824", "0.64415824", "0.6436635", "0.64349055", "0.6430877", "0.6428661", "0.64238554", "0.64190346", "0.6405993", "0.6399114", "0.6399114", "0.6395274", "0.63918483", "0.63918483", "0.6389487", "0.63825876", "0.6378943", "0.6378943", "0.6363762", "0.6363762", "0.6363591", "0.63608843", "0.6359205", "0.6353304", "0.635262", "0.6347578", "0.6347578", "0.6347578", "0.6347578", "0.6347578", "0.6347578", "0.63455904", "0.63438386", "0.6342734", "0.63416344", "0.63371164", "0.63357705", "0.63357705", "0.63357705", "0.63357705", "0.63357705", "0.63357705", "0.63357705", "0.6335723", "0.6329986", "0.6312135", "0.63069373", "0.63069373", "0.63069373", "0.63069373", "0.63069373", "0.63069373", "0.6279253", "0.62738967", "0.62689906", "0.6265069", "0.6246293", "0.62386906", "0.62380797", "0.6236161", "0.62294495", "0.62294495", "0.62294495", "0.62178123", "0.6213721", "0.6209724", "0.6205195", "0.61892045", "0.6184786", "0.6183427", "0.61430705", "0.6132449", "0.6115643", "0.6113887", "0.6100543", "0.6098351", "0.609156", "0.6088691", "0.6087354", "0.6086474" ]
0.0
-1
Set the calendar header string If a custom header string is desired, this method is used to set it. Otherwise, a generated string is used.
public function setHeader($str) { $this->headerStr = $str; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setHeader($string)\n {\n if (!empty($this->header))\n {\n $this->header .= $string;\n }\n else \n {\n $this->header = $string;\n }\n }", "private function makeCalendarHead()\n\t{\n\t\tif(strlen($this->headerStr) < 1) {\n\t\t\t$head = \"\\t<tr>\\n\\t\\t<th colspan=\\\"7\\\" class=\\\"headerString\\\">\";\n\t\t\tif(!is_null($this->curDay)) {\n\t\t\t\t$head .= $this->curDayName.' the '.$this->curDayS.' of '.$this->curMonthName.', '.$this->curYear;\n\t\t\t} else {\n\t\t\t\t$head .= $this->curMonthName.', '.$this->curYear;\n\t\t\t}\n\t\t\t$head .= \"</th>\\n\\t</tr>\\n\";\n\t\t} else {\n\t\t\t$head = $this->headerStr;\n\t\t}\n\t\t\n\t\t$this->calWeekDays .= $head;\n\t\t$this->outArray['head'] = $head;\n\t}", "function setHeaderText($value) {\n $this->header_text = $value;\n}", "public static function setHeader($string) {\n header($string, false);\n }", "public function setHeader($header);", "protected function setHeader(){\n $this->header = [\n 'Auth-id' => $this->username,\n 'Auth-token' => $this->generateToken(),\n 'Timestamp' => time()\n ];\n }", "public function header($string)\n\t{\n\t\t$this->headers[] = $string;\n\t}", "private function makeCalendarTitle()\n\t{\n\t\tif(strlen($this->headerTitle) > 0) {\n\t\t\t$this->calWeekDays .= \"\\t<tr>\\n\\t\\t<th class=\\\"headerTitle\\\" colspan=\\\"7\\\">\".$this->headerTitle.\"</th>\\n\\t</tr>\";\n\t\t\t$this->outArray['title'] = $this->headerTitle;\n\t\t}\n\t}", "protected function setHeaderWithSportAndYear() {\n\t\t$HeaderParts = array();\n\n\t\tif ($this->sportid > 0 && $this->ShowSportsNavigation) {\n\t\t\t$Sport = new Sport($this->sportid);\n\t\t\t$HeaderParts[] = $Sport->name();\n\t\t}\n\n\t\tif ($this->ShowYearsNavigation) {\n\t\t\t$HeaderParts[] = $this->getYearString();\n\t\t}\n\n\t\tif (!empty($HeaderParts)) {\n\t\t\t$this->setHeader($this->name().': '.implode(', ', $HeaderParts));\n\t\t}\n\t}", "public function setTitle($str)\n\t{\n\t\t$this->headerTitle = $str;\n\t}", "public function set_header($header, $value);", "public function setHeader($header = null, $value=null)\n{\n if($header && !is_null($value))\n {\n $header .= ': '. $value;\n }\n array_push($this->headers, $header);\n}", "function setHeader($a_sHeader)\n {\n $this->_sHeader = (string) $a_sHeader;\n $this->setSearchParameter('header', $this->_sHeader);\n }", "function setHeaderTitle($value) {\n $this->header_title = $value;\n}", "public function setHeader($name, $value) {}", "protected function makeDateHeaderString() {\n\t\t$timeZone = date(\"Z\");\n\t\t$op = ($timeZone[0] == '-') ? '-' : '+';\n\t\t$timeZone = abs($timeZone);\n\t\t$timeZone = floor($timeZone / 3600) * 100 + ($timeZone % 3600) / 60;\n\t\t$dateString = sprintf(\"%s %s%04d\", date(\"D, j M Y H:i:s\"), $op, $timeZone);\n\t\treturn \"Date: \" . $dateString . $this->_endString;\n\t}", "protected function setHeader($header_extra = '') {\n $this->header = \"<!DOCTYPE html> \\n <html> \\n <head> \\n <meta charset='utf-8'> \\n <title>Log-in Page Project</title>\";\n $this->loadConfig();\n $this->addMeta();\n $this->addJS();\n $this->addCSS();\n $this->header.=$header_extra;\n $this->header.=\"</head>\";\n return $this->header;\n }", "protected function generateHeader($headerString)\n {\n $function = \"header\";\n\n if (!$this->allowGenerateHeader) {\n $function = function ($string) {\n echo $string . \"\\n\";\n };\n }\n\n $function($headerString);\n }", "public function setDefaultHeader()\n {\n $this->headers[] = \"Mime-Version: 1.0\";\n $this->headers[] = \"Date: \" . date(\"r\");\n $this->headers[] = \"X-Mailer: PHP/\".phpversion();\n\n if ($this->subject) {\n $this->headers[] = \"Subject: \" . $this->subject;\n }\n }", "function setHeader($a_sHeader)\n {\n if (!is_null($this->_sHeader) && $this->_sHeader !== (string) $a_sHeader) {\n $this->_markModified();\n }\n $this->_sHeader = (string) $a_sHeader;\n }", "public function setHeader(string $header_name, string $header_value): void;", "protected function makeMailerHeaderString() {\n\t\treturn 'X-Mailer: ' . $this->_mailMailer . $this->_endString;\n\t}", "public function set_header($header, $value)\n {\n }", "public function setHeader($name, $value);", "public function setHeader($name, $value);", "public function setHeader($header)\n {\n $this->_header = $header;\n }", "private function setHeader($header)\n {\n $this->header = trim((string) $header);\n $this->headerComment = '';\n\n if ('' !== $this->header) {\n $this->headerComment = $this->encloseTextInComment($this->header);\n }\n }", "public static function setHeader($name, $value = null, $replace = null) {}", "public function addHeader(string $header, string $value)\n {\n $this->mailObj->addCustomHeader($header, $value);\n }", "private function do_header() {\n $m_header = '';\n $m_header .= '<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />';\n $m_header .= '<meta http-equiv=\"Content-Language\" content=\"en-gb\" />';\n // $m_header .= '<link rel=stylesheet href=' . $this->c_path . '/../css/reset.css type=text/css />';\n // $m_header .= '<link rel=stylesheet href=' . $this->c_path . '/../css/style.css type=text/css />';\n $this->c_header = $m_header;\n }", "public function _header( $key, $value = null ) {\n\t\tif ( null === $value ) {\n\t\t\treturn $key;\n\t\t}\n\n\t\t$key = str_replace( ' ', '-', ucwords( str_replace( ' - ', ' ', $key ) ) );\n\n\t\treturn \"$key: $value\";\n\t}", "function SetHeader()\n\t{\n\t\tif (!func_num_args())\n\t\t{\n\t\t\t// No parameters were passed\n\t\t\treturn NULL;\n\t\t}\n\t\t\n\t\t// Store the header values\n\t\t$this->_arrHeader = func_get_args();\n\n\t\treturn $this->_arrHeader;\n\t}", "public function setHeader($headerName, $headerValue);", "public function format_for_header()\n {\n }", "protected function _addCustomHeaders() {\n // FIXME ExternalDesc is not into the mail..\n //$this->addHeader(\"X-Clab-SmartRelay-External\", $this->_templateId);\n //$this->addHeader(\"X-Clab-SmartRelay-ExternalDesc\", $this->_templateCode);\n\n $this->addHeader(\"X-Clab-SmartRelay-DeliveryId\", sprintf(\"%u\", $this->_crc16($this->_templateCode)));\n $this->addHeader(\"X-Clab-SmartRelay-DeliveryLabel\", $this->_templateCode);\n // Mage::log(\"Template code is: \". $this->_templateCode, null, null, true);\n }", "protected function _custom_header()\n\t{\n\t\tif(is_array($this->_custom_headers) && count($this->_custom_headers) > 0)\n\t\t{\n\t\t\tforeach($this->_custom_headers as $_header_string)\n\t\t\t{\n\t\t\t\theader($_header_string);\n\t\t\t}\n\t\t}\n\t}", "public static function setHTMLHeader($header) \n\t{\n\t\tacPhpCas::setReporting();\n\t\tphpCAS::setHTMLHeader($header);\t\t\n\t}", "function setHeader($name,$value = \"\"){\n\t\tsettype($name,\"string\");\n\t\tsettype($value,\"string\");\n\n\t\tif($value==\"\" && preg_match('/^([a-z0-9-]+):\\s?(.+)/i',$name,$matches)){\n\t\t\t$name = $matches[1];\n\t\t\t$value = $matches[2];\n\t\t}\n\n\t\tif(strtolower($name)==\"content-type\"){\n\t\t\t$this->setContentType($value);\n\t\t\treturn;\n\t\t}\n\n\t\t// pokud uz tato header existuje, smazeme ji\n\t\tforeach(array_keys($this->_Headers) as $_key){\n\t\t\tif(strtoupper($_key)== strtoupper($name)){\n\t\t\t\tunset($this->_Headers[$_key]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif(strlen($value)==0){\n\t\t\treturn;\n\t\t}\n\n\t\t$this->_Headers[$name] = $value;\n\t}", "public function setHeader($key,$val){ return $this->headers->set($key,$val); }", "public function set_header($header, $value)\r\n {\r\n $this->headers[$header] = $value;\r\n }", "public function __construct(string $header) {\n\t\t$this->header = $header;\n\t}", "public function _header($string, $replace = true, $http_response_code = 200)\n {\n header($string, $replace, $http_response_code);\n }", "abstract public function SetHeaders();", "function header($string, $replace = true, $statusCode = null)\n{\n HeaderStack::push([\n 'header' => $string,\n 'replace' => $replace,\n 'status_code' => $statusCode\n ]);\n}", "public function set_header($key, $value)\n {\n }", "public function setHeader($header, $value) {\r\n $this->headers[$header] = $value;\r\n }", "function header($string, $replace = true, $http_response_code = null)\n{\n HeaderStack::push(\n [\n 'header' => $string,\n 'replace' => $replace,\n 'status_code' => $http_response_code,\n ]\n );\n}", "protected function replaceHeaders($string)\n\t{\n\t\t// For closures\n\t\t$obj = $this;\n\n\t\t// Header\n\t\t// #####\n\t\t$string = preg_replace_callback('/^(.+)[ \\t]*\\n(=+|-+)[ \\t]*(?:\\n+|\\Z)/m', function($match) use ($obj)\n\t\t{\n\t\t\t$level = $match[2][0] == '=' ? 1 : 2;\n\t\t\treturn \"<h$level>{$obj->replaceInline($match[1])}</h$level>\\n\\n\";\n\t\t}, $string);\n\n\t\t// # Header #\n\t\t$string = preg_replace_callback('/^(#{1,6})[ \\t]*(.+?)[ \\t]*#*(?:\\n+|\\Z)/m', function($match) use ($obj)\n\t\t{\n\t\t\t$level = strlen($match[1]);\n\t\t\treturn \"<h$level>{$obj->replaceInline($match[2])}</h$level>\\n\\n\";\n\t\t}, $string);\n\n\t\treturn $string;\n\t}", "public function setContentTypeHeader(string $header)\n {\n if (Validation::isValidContentType($header)) {\n $this->contentTypeHeader = $header;\n } else {\n throw new CustomException('Invalid content type');\n }\n }", "public function setHeader($array) {\n $this->colName= $array;\n $this->headerWritten= FALSE;\n }", "private function setHeader($data)\n {\n $this->headers = array_map('self::formatString', $data[0]);\n array_unshift($this->headers, 'row');\n }", "public function setHeader($attribute, $value);", "public function setHeaderId($id) {\r\n $this->headerId = \"id=\\\"$id\\\"\";\r\n }", "public function setHeaders(array $header) {}", "public function setHeaderText($value)\n {\n if (is_array($value)) {\n $this->fields['options']['header_text_left'] = $value[0];\n $this->fields['options']['header_text_center'] = $value[1];\n $this->fields['options']['header_text_right'] = $value[2];\n } else {\n $this->fields['options']['header_text_left'] = $value;\n }\n }", "public static function replaceHeader($string) {\n header($string, true);\n }", "public function addHeader($header);", "protected function makeUserAgentHeaderString() {\n\t\treturn 'User-Agent: ' . $this->_mailMailer . $this->_endString;\n\t}", "protected function header ( $string, $replace = true, $http_response_code = null ) {\n\t\theader( $string, $replace, $http_response_code );\n\t}", "public function setHeader($header, $value)\r\n {\r\n $this->_headers[$header] = $value;\r\n }", "function setHeader($header_template_name)\n\t{\n\n\t\t$header_string\t\t=\t\t$this->gCache->cache_or_get(CACHE_CACHE_TIME_TINY, \"\",$header_template_name, \"load_template_file\",$header_template_name);\n\n\t\t# the header has special substitutions for jquery css and jquery js\n\t\t$jquery_ui_css_string\t=\t\"<link rel='stylesheet' href='\" . \tJQUERY_UI_CSS\t.\t\"' />\";\n\t\t$jquery_ui_js_string\t=\t'<script src=\"' . \tJQUERY_UI_JS\t.\t'\"></script>';\n\n\t\t$jquery_js_string\t\t=\t'<script src=\"' . \tJQUERY_JS\t\t.\t'\"></script>'. \"\\n\";\n\t\t$jquery_js_string\t\t.=\t'<script> window.jQuery || document.write(\"<script src=/app/includes/js/jquery/jquery-1.10.2.min.js><\\/script>\")</script>';\n\n\n\t\t$basic_tags\t\t\t=\n\n\t\t\tarray\n\t\t\t(\n\t\t\t\t\"{{header}}\"\t\t\t\t=>\t$header_string,\n\t\t\t\t\"{{jquery_ui_css}}\"\t\t\t=>\t$jquery_ui_css_string,\n\t\t\t\t\"{{jquery_ui_js}}\"\t\t\t=>\t$jquery_ui_js_string,\n\t\t\t\t\"{{jquery_js}}\"\t\t\t\t=>\t$jquery_js_string,\n\t\t\t);\n\n\n\t\t# append the array\n\t\t$this->sub_tags($basic_tags);\n\n\n\t}", "function setHeaders() {\r\n global $CONFIGURATION;\r\n $this->charset = $CONFIGURATION['charset'];\r\n $this->headerType();\r\n\r\n if (!empty($this->cc))\r\n $this->headers.= \"Cc: {$this->cc}\\r\\n\";\r\n if (!empty($this->bcc))\r\n $this->headers.= \"Bcc: {$this->bcc}\\r\\n\";\r\n $this->headerType();\r\n }", "public function setHeaderId($id) {\n $this->headerId = \"id=\\\"$id\\\"\";\n }", "private function build_header() {\n\t\t// if we've already got the cart ID, use it\n\t\t$header = self::fetch('cart_header', [':cart_id' => $this->id()]);\n\n\t\t$header['date_created'] = ck_datetime::datify(@$header['date_created']);\n\t\tif (!empty($header['date_updated'])) $header['date_updated'] = ck_datetime::datify($header['date_updated']);\n\n\t\t$this->skeleton->load('header', $header);\n\t}", "public function addHeader()\n {\n }", "public function add_header() {\n }", "function setHeader($headerName, $headerValue){ \n if(!isset($this->requestHeaders)){\n $this->requestHeaders = array($headerName => $headerValue);\n }else{\n if (array_key_exists ($headerName, $this->requestHeaders )){\n $this->requestHeaders[$headerName] = array_merge($this->requestHeaders[$headerName],$headerValue);\n }else{\n $this->requestHeaders[$headerName] = $headerValue;\n }\n \n }\n $headers = array();\n foreach($this->requestHeaders as $key => $values){\n array_push($headers, new SoapHeader(\"urn:QueryService2\", $key, new SoapVar($values, SOAP_ENC_OBJECT),false));\n } \n \n $this->soapHeaders = $headers;\n\t}", "public static function setHeader($header)\n {\n header($header, true);\n }", "public function addHeader($name, $value) {\n $this->customHeader[$name]= $value;\n }", "protected function makeHeader()\n {\n }", "private function getHeaderString(): string {\r\n //TODO: actually do multiple types of Authentication\r\n $headerString = \"OAuth \";\r\n\r\n $overloadedClientParams = $this->clientParams;\r\n $overloadedClientParams['oauth_signature'] = $this->getSignature();\r\n $paramCount = count($overloadedClientParams);\r\n $tracker = 0;\r\n foreach($overloadedClientParams as $key => $value){\r\n $headerString .= urlencode($key) . '=\"' . urlencode($value) . '\"';\r\n if (++$tracker !== $paramCount) {\r\n $headerString .= \", \";\r\n }\r\n }\r\n\r\n return $headerString;\r\n }", "public function setHeader( $call )\r\n\t{\r\n\t\t// Find the end head tag first\r\n\t\t$parts\t\t=\texplode( '</head>', $call->htmlheader );\r\n\t\t$body\t\t=\tarray_pop( $parts );\r\n\t\t$body\t\t.=\t\"\\r\\n\"\r\n\t\t\t\t\t.\t'<!-- Begin setHeader -->'\r\n\t\t\t\t\t.\t'<div id=\"jblestawrapper\">';\r\n\t\t$this->htmlheader =\t$body;\r\n\t}", "protected function set_default_headers() {\n\t\t$meta = $this->get_meta_data();\n\n\t\t$this->translations->setHeader( 'Project-Id-Version', $meta['name'] . ' ' . $meta['version'] );\n\t\t$this->translations->setHeader( 'Report-Msgid-Bugs-To', $meta['msgid-bugs-address'] );\n\t\t$this->translations->setHeader( 'Last-Translator', 'FULL NAME <EMAIL@ADDRESS>' );\n\t\t$this->translations->setHeader( 'Language-Team', 'LANGUAGE <[email protected]>' );\n\t}", "static public function setAdditionalHeader($new_header) {\n\t\tif (is_string($new_header)) {\n\t\t\tself::$additional_headers = array($new_header);\n\t\t}\n\t\tself::$additional_headers = (array)$new_header;\n\t}", "public function setEventRequestHeader(\\EventRequestHeader $value=null)\n {\n return $this->set(self::EVENT_REQUEST_HEADER, $value);\n }", "public function buildHeader() {\n $header['label'] = $this->t('Label');\n $header['workflow'] = $this->t('Workflow');\n $header['status'] = $this->t('Status');\n $header['transition'] = $this->t('Transitions');\n $header['roles'] = $this->t('Email Roles');\n $header['author'] = $this->t('Email Author');\n $header['emails'] = $this->t('Adhoc Emails');\n return $header + parent::buildHeader();\n }", "private function writeHeader(): void\n {\n $record = 0x0014; // Record identifier\n\n /* removing for now\n // need to fix character count (multibyte!)\n if (strlen($this->phpSheet->getHeaderFooter()->getOddHeader()) <= 255) {\n $str = $this->phpSheet->getHeaderFooter()->getOddHeader(); // header string\n } else {\n $str = '';\n }\n */\n\n $recordData = StringHelper::UTF8toBIFF8UnicodeLong($this->phpSheet->getHeaderFooter()->getOddHeader());\n $length = strlen($recordData);\n\n $header = pack('vv', $record, $length);\n\n $this->append($header . $recordData);\n }", "public function setHeader( $header, $value = NULL )\n\t{\n\t\tif ( is_array( $header ) ) {\n\t\t\t$this->headers = array_merge( $this->headers, $header );\n\t\t}\n\t\telse {\n\t\t\t$this->headers[$header] = $value;\n\t\t}\n\t}", "function setCustomHttpHeader($custom_http_header) {\n if (!preg_match(\"/^.+:.+$/\", $custom_http_header))\n throw new Error(create_invalid_value_message($custom_http_header, \"custom_http_header\", \"html-to-pdf\", \"A string containing the header name and value separated by a colon.\", \"set_custom_http_header\"), 470);\n \n $this->fields['custom_http_header'] = $custom_http_header;\n return $this;\n }", "function addHeader( $header )\n\t\t{\n\t\t\tif( is_string( $header ))\n\t\t\t{\n\t\t\t\t$this->_requestHeaders[] = (string) $header;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new \\System\\Base\\InvalidArgumentException(\"Argument 1 passed to \".get_class($this).\"::setRequestHeader() must be a string\");\n\t\t\t}\n\t\t}", "protected function setHeaders(): void\n {\n if (empty($this->headers) === false || empty($this->data) === true) {\n return;\n }\n\n $headers = array_keys(reset($this->data));\n\n array_walk($headers, fn(&$header) => $header = ucwords(str_replace(\"_\", \" \", $header)));\n\n $this->headers = $headers;\n }", "public static function set_headers()\n {\n }", "protected function setCurlHeaderElement() {\n // set header for cur\n $this->header[] = 'Content-type: application/json';\n $this->header[] = 'Authorization: Bearer '.$this->accessToken;\n }", "public function defineHeader()\n {\n $this->header = new Header();\n }", "public static function header($key, $value = '') {\r\n\t $key = str_replace(' ', '-', ucwords(str_replace('-', ' ', $key)));\r\n\t header(\"$key: $value\");\r\n\t}", "private function setSoapHeader()\n {\n $headerXML =<<<XML\n<ROClientIDHeader xmlns=\"http://tempuri.org/\">\n <ID>$this->loginID</ID>\n</ROClientIDHeader>\nXML;\n $sHeaderVar = new SoapVar($headerXML, XSD_ANYXML);\n $this->soapHeader = new SoapHeader('http://tempuri.org/','RequestParams',$sHeaderVar);\n }", "abstract public function header($name, $value);", "function setMessageHeader($inParamValue) {\n\t\treturn $this->setParam(self::PARAM_MESSAGE_HEADER, $inParamValue);\n\t}", "public function setHeader($name = NULL, $val = NULL) {\n\t\tif (empty ( $name ))\n\t\t\treturn false;\n\t\t$this->request_headers [str_replace ( ' ', '-', ucwords ( str_replace ( '-', ' ', $name ) ) )] = $val;\n\t}", "public function setHeader($header)\n\t{\n\t\t$header = trim($header);\n\n\t\tif ((substr($header, 0, 3) !== '/**') && (substr($header, 0, 2) !== '/*'))\n\t\t{\n\t\t\t$header = '/** ' . $header;\n\t\t}\n\n\t\tif ((substr($header, -2) !== '*/'))\n\t\t{\n\t\t\t$header = $header . ' */';\n\t\t}\n\n\t\t$header = $this->minifiPhpdocs($header);\n\n\t\t$this->header = $header;\n\t}", "function pxlz_edgtf_set_header_object() {\n $header_type = pxlz_edgtf_get_meta_field_intersect('header_type', pxlz_edgtf_get_page_id());\n $header_types_option = pxlz_edgtf_get_header_type_options();\n\n $object = Lib\\HeaderFactory::getInstance()->build($header_type, $header_types_option);\n\n if (Lib\\HeaderFactory::getInstance()->validHeaderObject()) {\n $header_connector = new Lib\\PxlzEdgefHeaderConnector($object);\n $header_connector->connect($object->getConnectConfig());\n }\n }", "public function setHeaders()\n {\n }", "protected function makeMimeVersionHeaderString() {\n\t\treturn $this->_mailMimeVersion . $this->_endString;\n\t}", "function iver_select_set_header_object() {\n \t$header_type = iver_select_get_meta_field_intersect('header_type', iver_select_get_page_id());\n\t $header_types_option = iver_select_get_header_type_options();\n\t \n $object = Lib\\HeaderFactory::getInstance()->build($header_type, $header_types_option);\n\n if(Lib\\HeaderFactory::getInstance()->validHeaderObject()) {\n $header_connector = new Lib\\IverSelectHeaderConnector($object);\n $header_connector->connect($object->getConnectConfig());\n }\n }", "public function get_sched_header($view_type) {\n\t\t$header_title = 'Today - ' . date('F d, Y');\n\n\t\tswitch ($view_type) {\n\t\t\tcase 'weekly':\n\t\t\t\t$week_start = date(\"F d, Y\",strtotime('monday this week'));\n \t\t$week_end = date(\"F d, Y \",strtotime(\"next monday\"));\n \t\t$header_title = $week_start . '-' .$week_end;\n\t\t\tbreak;\n\t\t\tcase 'monthly':\n\t\t\t\t$header_title = date(\"F\");\n\t\t\tbreak;\n\n\t\t}\n\n\t\treturn $header_title;\n\t}", "function httpHeader($header) {\r\n\t\t$this->customHeaders[] = $header;\r\n\t}", "function get_custom_header()\n {\n }", "public function setCustomHead($customHead) {\n $this->_customHead = $customHead;\n }", "function setHeader($header)\t{\n\t\tif(isset($header))\t{\n\t\t\tcurl_setopt($this->ch, CURLOPT_HTTPHEADER, $header);\n\t\t}\n\t\telse {\n\t\t\techo \"** Expecting header.\\n\";\n\t\t}\n\t}", "final public function setOptionHeader($option)\n {\n $this->options->header = $option;\n }" ]
[ "0.71618253", "0.6479801", "0.63369775", "0.62824106", "0.6113401", "0.60724556", "0.6051226", "0.6004536", "0.59938663", "0.5974067", "0.5961257", "0.59480304", "0.5910625", "0.58400047", "0.5788465", "0.5784349", "0.5776362", "0.5725765", "0.5719432", "0.57146394", "0.5712152", "0.56794065", "0.56774676", "0.5674356", "0.5674356", "0.56498706", "0.562317", "0.5616726", "0.559655", "0.5594105", "0.55406034", "0.5527798", "0.5521776", "0.55160004", "0.5500766", "0.5490354", "0.54781854", "0.54729337", "0.5466581", "0.54568124", "0.54500365", "0.54444337", "0.5438668", "0.54261583", "0.54167175", "0.5413917", "0.5412654", "0.5397773", "0.5391493", "0.53780633", "0.5373147", "0.53696704", "0.5359772", "0.53555727", "0.5350439", "0.53459716", "0.53453404", "0.5343235", "0.5342251", "0.5336619", "0.5331554", "0.5326649", "0.53263044", "0.5322196", "0.5310562", "0.52990025", "0.5292944", "0.52926266", "0.52836853", "0.5279959", "0.5275875", "0.5275122", "0.52584386", "0.52580816", "0.5250494", "0.52479035", "0.5230121", "0.52261055", "0.5212965", "0.5202001", "0.51999015", "0.51987857", "0.5195771", "0.51823467", "0.51681376", "0.5168083", "0.51569283", "0.5155518", "0.51490116", "0.5146983", "0.5146608", "0.51453614", "0.51253897", "0.51204205", "0.51056165", "0.5093914", "0.5092921", "0.50875294", "0.508462", "0.50841075" ]
0.62983215
3
Toggle add event Set whether or not to show an "Add Event" link. Requires a destination for processing the "Add Event" logic.
public function setAddEvt($dest,$img=null) { $this->addEvtDest = $dest; $this->addEvtImg = (!is_null($img) ? $img : ''); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addFeedOptions($event) {\r\n return $this->linkedService\r\n ? $this->linkedService->addFeedOptions($event)\r\n : false;\r\n }", "function add()\n\t{\n\t\t// Initialize variables.\n\t\t$app = & JFactory::getApplication();\n\n\t\t// Clear the link id from the session.\n\t\t$app->setUserState('redirect.edit.link.id', null);\n\n\t\t// Redirect to the edit screen.\n\t\t$this->setRedirect(JRoute::_('index.php?option=com_redirect&view=link&layout=edit&hidemainmenu=1', false));\n\t}", "function fusion_should_add_fe_edit_link() {\n\tif ( 0 === fusion_library()->get_page_id() || false === fusion_library()->get_page_id() || '0-archive' === fusion_library()->get_page_id() || is_preview_only() ) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}", "final public function addAdmin() {\n $eventclass = $this->event;\n $admin_data = $eventclass::getAdminData();\n\n if ($admin_data) {\n if (!isset($admin_data['usertype'])) {\n $admin_data['usertype'] = self::getDefaultUserType();\n }\n $this->addToRecipientsList($admin_data);\n }\n }", "public function addUrl() {\r\n\t\t$current = $this->params['url']['url'];\r\n\t\t$accept = array('show', 'admin_show', 'admin_index');\r\n\t\tif(in_array($this->action, $accept)) {\r\n\t\t\tif ($this->Session->read('history.current') != $current){\r\n\t\t\t\t//$this->Session->write('history.previous', $this->Session->read('history.current'))->write('history.current', $current);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function addAdditionalTargets($event = '') {\n }", "private function hasEventLinks()\n {\n return !empty($this->eventlinks);\n }", "public static function handleAddToUrl(AddToUrlEvent $event)\n {\n $event->setUrl(\\Controller::addToUrl($event->getSuffix()));\n }", "public function addDestination($destination) {\n $this->destination = $destination;\n }", "function SetupOtherOptions() {\n\t\tglobal $Language, $Security;\n\t\t$options = &$this->OtherOptions;\n\t\t$option = $options[\"addedit\"];\n\n\t\t// Add\n\t\t$item = &$option->Add(\"add\");\n\t\t$addcaption = ew_HtmlTitle($Language->Phrase(\"AddLink\"));\n\t\t$item->Body = \"<a class=\\\"ewAddEdit ewAdd\\\" title=\\\"\" . $addcaption . \"\\\" data-caption=\\\"\" . $addcaption . \"\\\" href=\\\"\" . ew_HtmlEncode($this->AddUrl) . \"\\\">\" . $Language->Phrase(\"AddLink\") . \"</a>\";\n\t\t$item->Visible = ($this->AddUrl <> \"\" && $Security->CanAdd());\n\t\t$option = $options[\"detail\"];\n\t\t$DetailTableLink = \"\";\n\t\t$item = &$option->Add(\"detailadd_avaluo\");\n\t\t$url = $this->GetAddUrl(EW_TABLE_SHOW_DETAIL . \"=avaluo\");\n\t\t$caption = $Language->Phrase(\"Add\") . \"&nbsp;\" . $this->TableCaption() . \"/\" . $GLOBALS[\"avaluo\"]->TableCaption();\n\t\t$item->Body = \"<a class=\\\"ewDetailAddGroup ewDetailAdd\\\" title=\\\"\" . ew_HtmlTitle($caption) . \"\\\" data-caption=\\\"\" . ew_HtmlTitle($caption) . \"\\\" href=\\\"\" . ew_HtmlEncode($url) . \"\\\">\" . $caption . \"</a>\";\n\t\t$item->Visible = ($GLOBALS[\"avaluo\"]->DetailAdd && $Security->AllowAdd(CurrentProjectID() . 'avaluo') && $Security->CanAdd());\n\t\tif ($item->Visible) {\n\t\t\tif ($DetailTableLink <> \"\") $DetailTableLink .= \",\";\n\t\t\t$DetailTableLink .= \"avaluo\";\n\t\t}\n\n\t\t// Add multiple details\n\t\tif ($this->ShowMultipleDetails) {\n\t\t\t$item = &$option->Add(\"detailsadd\");\n\t\t\t$url = $this->GetAddUrl(EW_TABLE_SHOW_DETAIL . \"=\" . $DetailTableLink);\n\t\t\t$caption = $Language->Phrase(\"AddMasterDetailLink\");\n\t\t\t$item->Body = \"<a class=\\\"ewDetailAddGroup ewDetailAdd\\\" title=\\\"\" . ew_HtmlTitle($caption) . \"\\\" data-caption=\\\"\" . ew_HtmlTitle($caption) . \"\\\" href=\\\"\" . ew_HtmlEncode($url) . \"\\\">\" . $caption . \"</a>\";\n\t\t\t$item->Visible = ($DetailTableLink <> \"\" && $Security->CanAdd());\n\n\t\t\t// Hide single master/detail items\n\t\t\t$ar = explode(\",\", $DetailTableLink);\n\t\t\t$cnt = count($ar);\n\t\t\tfor ($i = 0; $i < $cnt; $i++) {\n\t\t\t\tif ($item = &$option->GetItem(\"detailadd_\" . $ar[$i]))\n\t\t\t\t\t$item->Visible = FALSE;\n\t\t\t}\n\t\t}\n\t\t$option = $options[\"action\"];\n\n\t\t// Set up options default\n\t\tforeach ($options as &$option) {\n\t\t\t$option->UseImageAndText = TRUE;\n\t\t\t$option->UseDropDownButton = TRUE;\n\t\t\t$option->UseButtonGroup = TRUE;\n\t\t\t$option->ButtonClass = \"btn-sm\"; // Class for button group\n\t\t\t$item = &$option->Add($option->GroupOptionName);\n\t\t\t$item->Body = \"\";\n\t\t\t$item->Visible = FALSE;\n\t\t}\n\t\t$options[\"addedit\"]->DropDownButtonPhrase = $Language->Phrase(\"ButtonAddEdit\");\n\t\t$options[\"detail\"]->DropDownButtonPhrase = $Language->Phrase(\"ButtonDetails\");\n\t\t$options[\"action\"]->DropDownButtonPhrase = $Language->Phrase(\"ButtonActions\");\n\n\t\t// Filter button\n\t\t$item = &$this->FilterOptions->Add(\"savecurrentfilter\");\n\t\t$item->Body = \"<a class=\\\"ewSaveFilter\\\" data-form=\\\"fsolicitudlistsrch\\\" href=\\\"#\\\">\" . $Language->Phrase(\"SaveCurrentFilter\") . \"</a>\";\n\t\t$item->Visible = TRUE;\n\t\t$item = &$this->FilterOptions->Add(\"deletefilter\");\n\t\t$item->Body = \"<a class=\\\"ewDeleteFilter\\\" data-form=\\\"fsolicitudlistsrch\\\" href=\\\"#\\\">\" . $Language->Phrase(\"DeleteFilter\") . \"</a>\";\n\t\t$item->Visible = TRUE;\n\t\t$this->FilterOptions->UseDropDownButton = TRUE;\n\t\t$this->FilterOptions->UseButtonGroup = !$this->FilterOptions->UseDropDownButton;\n\t\t$this->FilterOptions->DropDownButtonPhrase = $Language->Phrase(\"Filters\");\n\n\t\t// Add group option item\n\t\t$item = &$this->FilterOptions->Add($this->FilterOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->Visible = FALSE;\n\t}", "protected function addEvent($objEvent, $intStart, $intEnd, $strUrl, $strLink)\n\t{\n\t\tparent::addEvent($objEvent, $intStart, $intEnd, $strUrl, $strLink);\n\t\tif ($GLOBALS['tags']['showInFeeds'])\n\t\t{\n\t\t\tif ($intStart < time())\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$intKey = date('Ymd', $intStart);\n\t\t\t$lastindex = count($this->arrEvents[$intKey][$intStart])-1;\n\t\t\t$tags = $this->getTagsForTableAndId('tl_calendar_events', $objEvent->id);\n\t\t\tif (strlen($tags))\n\t\t\t{\n\t\t\t\t$this->arrEvents[$intKey][$intStart][$lastindex]['description'] .= $tags;\n\t\t\t}\n\t\t}\n\t}", "function show_add_button(){\n if($this->session->system_admin){\n return true;\n }\n \n }", "public function addEvent( $event )\n\t{\n\t\t// database connection and sql query\n $core = Core::dbOpen();\n $sql = \"INSERT INTO user_log (userID, action, ip_address ) VALUES ( :userID, :event, :ip )\";\n $stmt = $core->dbh->prepare($sql);\n $stmt->bindParam(':userID', $this->userID);\n $stmt->bindParam(':event', $event);\n $stmt->bindParam(':ip', $_SERVER['REMOTE_ADDR']);\n Core::dbClose();\n\n\t\ttry\n {\n if( $stmt->execute()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} catch ( PDOException $e ) {\n echo \"Add history event failed!\";\n }\n\t\treturn false;\t\t\n\t}", "function SetupOtherOptions() {\r\n\t\tglobal $Language, $Security;\r\n\t\t$options = &$this->OtherOptions;\r\n\t\t$option = &$options[\"action\"];\r\n\r\n\t\t// Add\r\n\t\t$item = &$option->Add(\"add\");\r\n\t\t$addcaption = ew_HtmlTitle($Language->Phrase(\"ViewPageAddLink\"));\r\n\t\tif ($this->IsModal) // Modal\r\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewAdd\\\" title=\\\"\" . $addcaption . \"\\\" data-caption=\\\"\" . $addcaption . \"\\\" href=\\\"javascript:void(0);\\\" onclick=\\\"ew_ModalDialogShow({lnk:this,url:'\" . ew_HtmlEncode($this->AddUrl) . \"',caption:'\" . $addcaption . \"'});\\\">\" . $Language->Phrase(\"ViewPageAddLink\") . \"</a>\";\r\n\t\telse\r\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewAdd\\\" title=\\\"\" . $addcaption . \"\\\" data-caption=\\\"\" . $addcaption . \"\\\" href=\\\"\" . ew_HtmlEncode($this->AddUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageAddLink\") . \"</a>\";\r\n\t\t$item->Visible = ($this->AddUrl <> \"\" && $Security->CanAdd());\r\n\r\n\t\t// Edit\r\n\t\t$item = &$option->Add(\"edit\");\r\n\t\t$editcaption = ew_HtmlTitle($Language->Phrase(\"ViewPageEditLink\"));\r\n\t\tif ($this->IsModal) // Modal\r\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewEdit\\\" title=\\\"\" . $editcaption . \"\\\" data-caption=\\\"\" . $editcaption . \"\\\" href=\\\"javascript:void(0);\\\" onclick=\\\"ew_ModalDialogShow({lnk:this,url:'\" . ew_HtmlEncode($this->EditUrl) . \"',caption:'\" . $editcaption . \"'});\\\">\" . $Language->Phrase(\"ViewPageEditLink\") . \"</a>\";\r\n\t\telse\r\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewEdit\\\" title=\\\"\" . $editcaption . \"\\\" data-caption=\\\"\" . $editcaption . \"\\\" href=\\\"\" . ew_HtmlEncode($this->EditUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageEditLink\") . \"</a>\";\r\n\t\t$item->Visible = ($this->EditUrl <> \"\" && $Security->CanEdit());\r\n\r\n\t\t// Copy\r\n\t\t$item = &$option->Add(\"copy\");\r\n\t\t$copycaption = ew_HtmlTitle($Language->Phrase(\"ViewPageCopyLink\"));\r\n\t\tif ($this->IsModal) // Modal\r\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewCopy\\\" title=\\\"\" . $copycaption . \"\\\" data-caption=\\\"\" . $copycaption . \"\\\" href=\\\"javascript:void(0);\\\" onclick=\\\"ew_ModalDialogShow({lnk:this,url:'\" . ew_HtmlEncode($this->CopyUrl) . \"',caption:'\" . $copycaption . \"'});\\\">\" . $Language->Phrase(\"ViewPageCopyLink\") . \"</a>\";\r\n\t\telse\r\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewCopy\\\" title=\\\"\" . $copycaption . \"\\\" data-caption=\\\"\" . $copycaption . \"\\\" href=\\\"\" . ew_HtmlEncode($this->CopyUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageCopyLink\") . \"</a>\";\r\n\t\t$item->Visible = ($this->CopyUrl <> \"\" && $Security->CanAdd());\r\n\r\n\t\t// Delete\r\n\t\t$item = &$option->Add(\"delete\");\r\n\t\t$item->Body = \"<a onclick=\\\"return ew_ConfirmDelete(this);\\\" class=\\\"ewAction ewDelete\\\" title=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode($this->DeleteUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageDeleteLink\") . \"</a>\";\r\n\t\t$item->Visible = ($this->DeleteUrl <> \"\" && $Security->CanDelete());\r\n\t\t$option = &$options[\"detail\"];\r\n\t\t$DetailTableLink = \"\";\r\n\t\t$DetailViewTblVar = \"\";\r\n\t\t$DetailCopyTblVar = \"\";\r\n\t\t$DetailEditTblVar = \"\";\r\n\r\n\t\t// \"detail_observacion_tutor\"\r\n\t\t$item = &$option->Add(\"detail_observacion_tutor\");\r\n\t\t$body = $Language->Phrase(\"ViewPageDetailLink\") . $Language->TablePhrase(\"observacion_tutor\", \"TblCaption\");\r\n\t\t$body .= str_replace(\"%c\", $this->observacion_tutor_Count, $Language->Phrase(\"DetailCount\"));\r\n\t\t$body = \"<a class=\\\"btn btn-default btn-sm ewRowLink ewDetail\\\" data-action=\\\"list\\\" href=\\\"\" . ew_HtmlEncode(\"observacion_tutorlist.php?\" . EW_TABLE_SHOW_MASTER . \"=tutores&fk_Dni_Tutor=\" . urlencode(strval($this->Dni_Tutor->CurrentValue)) . \"\") . \"\\\">\" . $body . \"</a>\";\r\n\t\t$links = \"\";\r\n\t\tif ($GLOBALS[\"observacion_tutor_grid\"] && $GLOBALS[\"observacion_tutor_grid\"]->DetailView && $Security->CanView() && $Security->AllowView(CurrentProjectID() . 'observacion_tutor')) {\r\n\t\t\t$links .= \"<li><a class=\\\"ewRowLink ewDetailView\\\" data-action=\\\"view\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"MasterDetailViewLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode($this->GetViewUrl(EW_TABLE_SHOW_DETAIL . \"=observacion_tutor\")) . \"\\\">\" . ew_HtmlImageAndText($Language->Phrase(\"MasterDetailViewLink\")) . \"</a></li>\";\r\n\t\t\tif ($DetailViewTblVar <> \"\") $DetailViewTblVar .= \",\";\r\n\t\t\t$DetailViewTblVar .= \"observacion_tutor\";\r\n\t\t}\r\n\t\tif ($GLOBALS[\"observacion_tutor_grid\"] && $GLOBALS[\"observacion_tutor_grid\"]->DetailEdit && $Security->CanEdit() && $Security->AllowEdit(CurrentProjectID() . 'observacion_tutor')) {\r\n\t\t\t$links .= \"<li><a class=\\\"ewRowLink ewDetailEdit\\\" data-action=\\\"edit\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"MasterDetailEditLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode($this->GetEditUrl(EW_TABLE_SHOW_DETAIL . \"=observacion_tutor\")) . \"\\\">\" . ew_HtmlImageAndText($Language->Phrase(\"MasterDetailEditLink\")) . \"</a></li>\";\r\n\t\t\tif ($DetailEditTblVar <> \"\") $DetailEditTblVar .= \",\";\r\n\t\t\t$DetailEditTblVar .= \"observacion_tutor\";\r\n\t\t}\r\n\t\tif ($GLOBALS[\"observacion_tutor_grid\"] && $GLOBALS[\"observacion_tutor_grid\"]->DetailAdd && $Security->CanAdd() && $Security->AllowAdd(CurrentProjectID() . 'observacion_tutor')) {\r\n\t\t\t$links .= \"<li><a class=\\\"ewRowLink ewDetailCopy\\\" data-action=\\\"add\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"MasterDetailCopyLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode($this->GetCopyUrl(EW_TABLE_SHOW_DETAIL . \"=observacion_tutor\")) . \"\\\">\" . ew_HtmlImageAndText($Language->Phrase(\"MasterDetailCopyLink\")) . \"</a></li>\";\r\n\t\t\tif ($DetailCopyTblVar <> \"\") $DetailCopyTblVar .= \",\";\r\n\t\t\t$DetailCopyTblVar .= \"observacion_tutor\";\r\n\t\t}\r\n\t\tif ($links <> \"\") {\r\n\t\t\t$body .= \"<button class=\\\"dropdown-toggle btn btn-default btn-sm ewDetail\\\" data-toggle=\\\"dropdown\\\"><b class=\\\"caret\\\"></b></button>\";\r\n\t\t\t$body .= \"<ul class=\\\"dropdown-menu\\\">\". $links . \"</ul>\";\r\n\t\t}\r\n\t\t$body = \"<div class=\\\"btn-group\\\">\" . $body . \"</div>\";\r\n\t\t$item->Body = $body;\r\n\t\t$item->Visible = $Security->AllowList(CurrentProjectID() . 'observacion_tutor');\r\n\t\tif ($item->Visible) {\r\n\t\t\tif ($DetailTableLink <> \"\") $DetailTableLink .= \",\";\r\n\t\t\t$DetailTableLink .= \"observacion_tutor\";\r\n\t\t}\r\n\t\tif ($this->ShowMultipleDetails) $item->Visible = FALSE;\r\n\r\n\t\t// Multiple details\r\n\t\tif ($this->ShowMultipleDetails) {\r\n\t\t\t$body = $Language->Phrase(\"MultipleMasterDetails\");\r\n\t\t\t$body = \"<div class=\\\"btn-group\\\">\";\r\n\t\t\t$links = \"\";\r\n\t\t\tif ($DetailViewTblVar <> \"\") {\r\n\t\t\t\t$links .= \"<li><a class=\\\"ewRowLink ewDetailView\\\" data-action=\\\"view\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"MasterDetailViewLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode($this->GetViewUrl(EW_TABLE_SHOW_DETAIL . \"=\" . $DetailViewTblVar)) . \"\\\">\" . ew_HtmlImageAndText($Language->Phrase(\"MasterDetailViewLink\")) . \"</a></li>\";\r\n\t\t\t}\r\n\t\t\tif ($DetailEditTblVar <> \"\") {\r\n\t\t\t\t$links .= \"<li><a class=\\\"ewRowLink ewDetailEdit\\\" data-action=\\\"edit\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"MasterDetailEditLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode($this->GetEditUrl(EW_TABLE_SHOW_DETAIL . \"=\" . $DetailEditTblVar)) . \"\\\">\" . ew_HtmlImageAndText($Language->Phrase(\"MasterDetailEditLink\")) . \"</a></li>\";\r\n\t\t\t}\r\n\t\t\tif ($DetailCopyTblVar <> \"\") {\r\n\t\t\t\t$links .= \"<li><a class=\\\"ewRowLink ewDetailCopy\\\" data-action=\\\"add\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"MasterDetailCopyLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode($this->GetCopyUrl(EW_TABLE_SHOW_DETAIL . \"=\" . $DetailCopyTblVar)) . \"\\\">\" . ew_HtmlImageAndText($Language->Phrase(\"MasterDetailCopyLink\")) . \"</a></li>\";\r\n\t\t\t}\r\n\t\t\tif ($links <> \"\") {\r\n\t\t\t\t$body .= \"<button class=\\\"dropdown-toggle btn btn-default btn-sm ewMasterDetail\\\" title=\\\"\" . ew_HtmlTitle($Language->Phrase(\"MultipleMasterDetails\")) . \"\\\" data-toggle=\\\"dropdown\\\">\" . $Language->Phrase(\"MultipleMasterDetails\") . \"<b class=\\\"caret\\\"></b></button>\";\r\n\t\t\t\t$body .= \"<ul class=\\\"dropdown-menu ewMenu\\\">\". $links . \"</ul>\";\r\n\t\t\t}\r\n\t\t\t$body .= \"</div>\";\r\n\r\n\t\t\t// Multiple details\r\n\t\t\t$oListOpt = &$option->Add(\"details\");\r\n\t\t\t$oListOpt->Body = $body;\r\n\t\t}\r\n\r\n\t\t// Set up detail default\r\n\t\t$option = &$options[\"detail\"];\r\n\t\t$options[\"detail\"]->DropDownButtonPhrase = $Language->Phrase(\"ButtonDetails\");\r\n\t\t$option->UseImageAndText = TRUE;\r\n\t\t$ar = explode(\",\", $DetailTableLink);\r\n\t\t$cnt = count($ar);\r\n\t\t$option->UseDropDownButton = ($cnt > 1);\r\n\t\t$option->UseButtonGroup = TRUE;\r\n\t\t$item = &$option->Add($option->GroupOptionName);\r\n\t\t$item->Body = \"\";\r\n\t\t$item->Visible = FALSE;\r\n\r\n\t\t// Set up action default\r\n\t\t$option = &$options[\"action\"];\r\n\t\t$option->DropDownButtonPhrase = $Language->Phrase(\"ButtonActions\");\r\n\t\t$option->UseImageAndText = TRUE;\r\n\t\t$option->UseDropDownButton = TRUE;\r\n\t\t$option->UseButtonGroup = TRUE;\r\n\t\t$item = &$option->Add($option->GroupOptionName);\r\n\t\t$item->Body = \"\";\r\n\t\t$item->Visible = FALSE;\r\n\t}", "public function addEvent($event){\n $this->events[]=$event;\n }", "function admin_add() {\n\t\tif (!empty($this->data)) {\n\t\t\t$this->Event->create();\n\t\t\tif ($this->Event->save($this->data)) {\n\t\t\t\t$this->Session->setFlash('This Event has been saved.');\n\t\t\t\t$this->redirect(array('action'=>'admin_index'),null,true);\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash('This Event could not be saved. Please try again.');\n\t\t\t}\n\t\t}\n\t\t$tags = $this->Event->Tag->find('list');\n\t\t$this->set(compact('tags'));\n\t}", "function SetupOtherOptions() {\n\t\tglobal $Language, $Security;\n\t\t$options = &$this->OtherOptions;\n\t\t$option = &$options[\"action\"];\n\n\t\t// Add\n\t\t$item = &$option->Add(\"add\");\n\t\t$addcaption = ew_HtmlTitle($Language->Phrase(\"ViewPageAddLink\"));\n\t\tif ($this->IsModal) // Modal\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewAdd\\\" title=\\\"\" . $addcaption . \"\\\" data-caption=\\\"\" . $addcaption . \"\\\" href=\\\"javascript:void(0);\\\" onclick=\\\"ew_ModalDialogShow({lnk:this,url:'\" . ew_HtmlEncode($this->AddUrl) . \"'});\\\">\" . $Language->Phrase(\"ViewPageAddLink\") . \"</a>\";\n\t\telse\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewAdd\\\" title=\\\"\" . $addcaption . \"\\\" data-caption=\\\"\" . $addcaption . \"\\\" href=\\\"\" . ew_HtmlEncode($this->AddUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageAddLink\") . \"</a>\";\n\t\t$item->Visible = ($this->AddUrl <> \"\" && $Security->CanAdd());\n\n\t\t// Edit\n\t\t$item = &$option->Add(\"edit\");\n\t\t$editcaption = ew_HtmlTitle($Language->Phrase(\"ViewPageEditLink\"));\n\t\tif ($this->IsModal) // Modal\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewEdit\\\" title=\\\"\" . $editcaption . \"\\\" data-caption=\\\"\" . $editcaption . \"\\\" href=\\\"javascript:void(0);\\\" onclick=\\\"ew_ModalDialogShow({lnk:this,url:'\" . ew_HtmlEncode($this->EditUrl) . \"'});\\\">\" . $Language->Phrase(\"ViewPageEditLink\") . \"</a>\";\n\t\telse\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewEdit\\\" title=\\\"\" . $editcaption . \"\\\" data-caption=\\\"\" . $editcaption . \"\\\" href=\\\"\" . ew_HtmlEncode($this->EditUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageEditLink\") . \"</a>\";\n\t\t$item->Visible = ($this->EditUrl <> \"\" && $Security->CanEdit());\n\n\t\t// Copy\n\t\t$item = &$option->Add(\"copy\");\n\t\t$copycaption = ew_HtmlTitle($Language->Phrase(\"ViewPageCopyLink\"));\n\t\tif ($this->IsModal) // Modal\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewCopy\\\" title=\\\"\" . $copycaption . \"\\\" data-caption=\\\"\" . $copycaption . \"\\\" href=\\\"javascript:void(0);\\\" onclick=\\\"ew_ModalDialogShow({lnk:this,btn:'AddBtn',url:'\" . ew_HtmlEncode($this->CopyUrl) . \"'});\\\">\" . $Language->Phrase(\"ViewPageCopyLink\") . \"</a>\";\n\t\telse\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewCopy\\\" title=\\\"\" . $copycaption . \"\\\" data-caption=\\\"\" . $copycaption . \"\\\" href=\\\"\" . ew_HtmlEncode($this->CopyUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageCopyLink\") . \"</a>\";\n\t\t$item->Visible = ($this->CopyUrl <> \"\" && $Security->CanAdd());\n\n\t\t// Delete\n\t\t$item = &$option->Add(\"delete\");\n\t\tif ($this->IsModal) // Handle as inline delete\n\t\t\t$item->Body = \"<a onclick=\\\"return ew_ConfirmDelete(this);\\\" class=\\\"ewAction ewDelete\\\" title=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode(ew_UrlAddQuery($this->DeleteUrl, \"a_delete=1\")) . \"\\\">\" . $Language->Phrase(\"ViewPageDeleteLink\") . \"</a>\";\n\t\telse\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewDelete\\\" title=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode($this->DeleteUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageDeleteLink\") . \"</a>\";\n\t\t$item->Visible = ($this->DeleteUrl <> \"\" && $Security->CanDelete());\n\n\t\t// Set up action default\n\t\t$option = &$options[\"action\"];\n\t\t$option->DropDownButtonPhrase = $Language->Phrase(\"ButtonActions\");\n\t\t$option->UseImageAndText = TRUE;\n\t\t$option->UseDropDownButton = FALSE;\n\t\t$option->UseButtonGroup = TRUE;\n\t\t$item = &$option->Add($option->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->Visible = FALSE;\n\t}", "function SetupOtherOptions() {\n\t\tglobal $Language, $Security;\n\t\t$options = &$this->OtherOptions;\n\t\t$option = &$options[\"action\"];\n\n\t\t// Add\n\t\t$item = &$option->Add(\"add\");\n\t\t$addcaption = ew_HtmlTitle($Language->Phrase(\"ViewPageAddLink\"));\n\t\tif ($this->IsModal) // Modal\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewAdd\\\" title=\\\"\" . $addcaption . \"\\\" data-caption=\\\"\" . $addcaption . \"\\\" href=\\\"javascript:void(0);\\\" onclick=\\\"ew_ModalDialogShow({lnk:this,url:'\" . ew_HtmlEncode($this->AddUrl) . \"'});\\\">\" . $Language->Phrase(\"ViewPageAddLink\") . \"</a>\";\n\t\telse\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewAdd\\\" title=\\\"\" . $addcaption . \"\\\" data-caption=\\\"\" . $addcaption . \"\\\" href=\\\"\" . ew_HtmlEncode($this->AddUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageAddLink\") . \"</a>\";\n\t\t$item->Visible = ($this->AddUrl <> \"\" && $Security->CanAdd());\n\n\t\t// Edit\n\t\t$item = &$option->Add(\"edit\");\n\t\t$editcaption = ew_HtmlTitle($Language->Phrase(\"ViewPageEditLink\"));\n\t\tif ($this->IsModal) // Modal\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewEdit\\\" title=\\\"\" . $editcaption . \"\\\" data-caption=\\\"\" . $editcaption . \"\\\" href=\\\"javascript:void(0);\\\" onclick=\\\"ew_ModalDialogShow({lnk:this,url:'\" . ew_HtmlEncode($this->EditUrl) . \"'});\\\">\" . $Language->Phrase(\"ViewPageEditLink\") . \"</a>\";\n\t\telse\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewEdit\\\" title=\\\"\" . $editcaption . \"\\\" data-caption=\\\"\" . $editcaption . \"\\\" href=\\\"\" . ew_HtmlEncode($this->EditUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageEditLink\") . \"</a>\";\n\t\t$item->Visible = ($this->EditUrl <> \"\" && $Security->CanEdit());\n\n\t\t// Copy\n\t\t$item = &$option->Add(\"copy\");\n\t\t$copycaption = ew_HtmlTitle($Language->Phrase(\"ViewPageCopyLink\"));\n\t\tif ($this->IsModal) // Modal\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewCopy\\\" title=\\\"\" . $copycaption . \"\\\" data-caption=\\\"\" . $copycaption . \"\\\" href=\\\"javascript:void(0);\\\" onclick=\\\"ew_ModalDialogShow({lnk:this,btn:'AddBtn',url:'\" . ew_HtmlEncode($this->CopyUrl) . \"'});\\\">\" . $Language->Phrase(\"ViewPageCopyLink\") . \"</a>\";\n\t\telse\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewCopy\\\" title=\\\"\" . $copycaption . \"\\\" data-caption=\\\"\" . $copycaption . \"\\\" href=\\\"\" . ew_HtmlEncode($this->CopyUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageCopyLink\") . \"</a>\";\n\t\t$item->Visible = ($this->CopyUrl <> \"\" && $Security->CanAdd());\n\n\t\t// Delete\n\t\t$item = &$option->Add(\"delete\");\n\t\tif ($this->IsModal) // Handle as inline delete\n\t\t\t$item->Body = \"<a onclick=\\\"return ew_ConfirmDelete(this);\\\" class=\\\"ewAction ewDelete\\\" title=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode(ew_UrlAddQuery($this->DeleteUrl, \"a_delete=1\")) . \"\\\">\" . $Language->Phrase(\"ViewPageDeleteLink\") . \"</a>\";\n\t\telse\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewDelete\\\" title=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode($this->DeleteUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageDeleteLink\") . \"</a>\";\n\t\t$item->Visible = ($this->DeleteUrl <> \"\" && $Security->CanDelete());\n\n\t\t// Set up action default\n\t\t$option = &$options[\"action\"];\n\t\t$option->DropDownButtonPhrase = $Language->Phrase(\"ButtonActions\");\n\t\t$option->UseImageAndText = TRUE;\n\t\t$option->UseDropDownButton = FALSE;\n\t\t$option->UseButtonGroup = TRUE;\n\t\t$item = &$option->Add($option->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->Visible = FALSE;\n\t}", "public function addEvent()\n\t{\n\t \n\t\t$data = array(\n\t\t\t 'title' => $this->input->post('event_title'),\n\t\t\t 'date' => $this->input->post('event_date'),\n\t\t\t 'time' => $this->input->post('event_time'),\n\t\t\t 'desc' => $this->input->post('event_desc')\n\t\t);\t\n\n\t \tif($this->event_model->addEv($data))\n\t\t{\t\t\t \n\t\t\techo true;\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo false;\n\t\t}\n\t}", "public function add(EdgeInterface $edge, VertexInterface $sourceVertex, VertexInterface $targetVertex): bool;", "public function postEventadd();", "public function add()\n\t{\n\t\t// Add a Sub-Nav Link\n\t\tEvent::add('ushahidi_action.nav_admin_settings', array($this, '_settings_link'));\n\t\tEvent::add('ushahidi_action.nav_main_top', array($this, '_top_nav_link'));\t\t\n\t\t// Only add the events if we are on the main controller\n\t\tif (Router::$controller == 'main')\n\t\t{\n\t\t\tswitch (Router::$method)\n\t\t\t{\n\n\t\t\t\t// Hook into the main dashboard\n\t\t\t\tcase 'index':\n\t\t\t\t\tplugin::add_stylesheet('flickrwijit/media/css/style');\n\t\t\t\t\tplugin::add_stylesheet('../media/css/picbox/picbox');\n\t\t\t\t\tplugin::add_javascript('../media/js/picbox');\n\t\t\t\t\tEvent::add('ushahidi_action.main_sidebar', array($this, '_display_flickrwiji'));\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\telseif (Router::$controller == 'flickrwijit')\n\t\t{ \t\n\t\t\t// Add Flickrwijit to settings page\n\t\t\tswitch(Router::$method) \n\t\t\t{\n\t\t\t\tcase 'index':\n\t\t\t\t\t\n\t\t\t\t\t//Hook js and css files into flickrwijit page\n\t\t\t\t\tplugin::add_stylesheet('flickrwijit/media/css/style');\n\t\t\t\t\tplugin::add_stylesheet('../media/css/picbox/picbox');\n\t\t\t\t\tplugin::add_javascript('../media/js/picbox');\n\t\t\t\t\tbreak;\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public function action_add()\r\n\t{\t\tif ( ! $this->user->can('event_add'))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.add.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// Valid csrf\r\n\t\tif ($this->valid_post())\r\n\t\t{\r\n\t\t\t// Extract event data from $_POST\r\n\t\t\t$event_post = Arr::get($this->request->post(), 'event', array());\r\n\t\t\t\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\t// Create new event object\r\n\t\t\t\t$event = ORM::factory('event')->create_event($this->user, $event_post);\r\n\t\t\t\t\r\n\t\t\t\t// Notification\r\n\t\t\t\tNotices::success('event.add.success');\r\n\t\t\t\t\r\n\t\t\t\t$event->enroll($this->user, $event_post['character'], Model_Status::READY, 'Event leader');\r\n\t\t\t\tNotices::success('event.enroll.success');\r\n\t\t\t\t\r\n\t\t\t\t// Display created event\r\n\t\t\t\t$this->request->redirect(Route::url('event').'#'.$event->id);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tcatch(ORM_Validation_Exception $e)\r\n\t\t\t{\r\n\t\t\t\t\tNotices::error('event.add.fail');\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->view->errors = $e->errors('validation');\r\n\t\t\t\t\t$this->view->values = $event_post;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t//Notices::error('event.enroll.on_create_failed');\r\n\t\t\t\t\t//$this->request->redirect(Route::url('event').'#'.$event->id);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Pass user to view object for character list, etc.\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function can_do_add() {\n return false;\n }", "function automatic_feed_links($add = \\true)\n {\n }", "public function siteFormAdd(Event $event)\n {\n if ($has_team = $this->currentTeam()){\n $team_id = $has_team->getId();\n\n } else {\n $messanger = new Messenger();\n $messanger->addError(\"You can only make a site after you have been added to a team\");\n $team_id = 0;\n\n }\n $view = $event->getTarget();\n echo $view->partial('teams/partial/site-admin/add.phtml', ['team_ids'=>$team_id]);\n }", "function entry_api_ui_event_form_submit($form, &$form_state) {\n\n if ($form_state['#update_event']) {\n $form_state['redirect'] = culturefeed_search_detail_url('event', $form_state['#event_id'], $form_state['values']['title']);\n drupal_set_message('De activiteit werd aangepast. Het duurt echter een half uur eer het\n op alle kanalen (inclusief UitinVlaanderen) beschikbaar zal zijn. ');\n }\n else {\n $link_change_event = '<a href=\"/entryapi/event/' . $form_state['#event_id'] . '/edit\">Klik hier om het event aan te passen</a>';\n drupal_set_message('De activiteit werd toegevoegd. Het duurt echter een half uur eer het\n op alle kanalen (inclusief UitinVlaanderen) beschikbaar zal zijn. ' . $link_change_event);\n }\n\n}", "public function add()\n\t{\n\t\t// Only add the events if we are on that controller\n\t\tif (Router::$controller == 'main')\n\t\t{\n\t\t\tEvent::add('ushahidi_filter.view_pre_render.layout', array($this, 'add_requirements'));\n\t\t\t\n\t\t\tEvent::add('ushahidi_action.header_scripts', array($this, '_main_js'));\n\t\t\tEvent::add('ushahidi_action.map_main_filters', array($this, '_button'));\n\t\t}\n\t}", "public function addEvent($event, $status, $user, $source = null)\n {\n if (CalendarHasEvent::getByIDs($this->id, $event->id)) {\n # do not add this\n } else {\n $calendar_has_event = new CalendarHasEvent;\n\n $calendar_has_event->calendar_id = $this->id;\n $calendar_has_event->event_id = $event->id;\n $calendar_has_event->status = $status;\n $calendar_has_event->source = $source;\n $calendar_has_event->insert($user);\n }\n\n if ($event->approvedforcirculation) {\n # get the subscribed calendars and similarly add the event to them.\n # we use the insert method instead of reusing addEvent because we do not want an infinite loop\n foreach ($this->getSubscriptionsToThis() as $subscription) {\n # it's confusing, but for each subscription which has this calendar as a\n # subscribed calendar, take that subscription, find what calendar it is\n # attached to, and add a calendar_has_event record\n if (\n !(\n $subscription instanceof \\UNL\\UCBCN\\Calendar\\Subscription)\n || CalendarHasEvent::getByIDs($subscription->calendar_id, $event->id\n )\n ) {\n # do not add this\n continue;\n }\n\n $calendar_has_event = new CalendarHasEvent;\n\n $calendar_has_event->calendar_id = $subscription->calendar_id;\n $calendar_has_event->event_id = $event->id;\n $calendar_has_event->status = $subscription->getApprovalStatus();\n $calendar_has_event->source = 'subscription';\n\n $calendar_has_event->insert();\n }\n }\n }", "function get_is_upcoming_event_display($view): bool {\n $display = $view->current_display;\n\n switch ($display) {\n // Set the past events link for a topic filtered display.\n case 'page_1': // Event all display\n case 'page_3': // Event topic display\n case 'page_4': // Past topic display\n return TRUE;\n default:\n return FALSE;\n }\n}", "public function addTimelineEntry(string $linkHash, string $eventType): bool\n\t{\n\t\tif (!$this->isAvailable())\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t/** @var CrmDealLink $crmDealLink */\n\t\t$crmDealLink = self::getLinkFactory()->getLinkByHash($linkHash);\n\n\t\tif ($crmDealLink->getObjectType() !== \\Bitrix\\Calendar\\Sharing\\Link\\Helper::CRM_DEAL_SHARING_TYPE)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t$eventData = EventData::createFromCrmDealLink($crmDealLink, $eventType);\n\n\t\tif ($eventType === EventData::SHARING_ON_INVITATION_SENT && $crmDealLink->getContactId())\n\t\t{\n\t\t\t$contactCommunications = $this->getContactPhoneCommunications(\n\t\t\t\t$crmDealLink->getEntityId(),\n\t\t\t\t\\CCrmOwnerType::Deal,\n\t\t\t\t$crmDealLink->getContactId(),\n\t\t\t\t$crmDealLink->getContactType(),\n\t\t\t);\n\n\t\t\tif ($contactCommunications && isset($contactCommunications['phones'][0]))\n\t\t\t{\n\t\t\t\t$eventData->setContactCommunication($contactCommunications['phones'][0]['valueFormatted']);\n\t\t\t}\n\n\t\t\tif ($crmDealLink->getChannelId())\n\t\t\t{\n\t\t\t\t$entity = new ItemIdentifier(\\CCrmOwnerType::Deal, $crmDealLink->getEntityId());\n\t\t\t\t$repo = ChannelRepository::create($entity);\n\t\t\t\t$channel = $repo->getById(SmsManager::getSenderCode(), $crmDealLink->getChannelId());\n\n\t\t\t\tif ($channel)\n\t\t\t\t{\n\t\t\t\t\t$eventData->setChannelName($channel->getName());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tCalendarSharingTimeline::createTimelineEntry($eventData);\n\n\t\treturn true;\n\t}", "public function add()\n\t{\n\t\t// Add a Sub-Nav Link\n\t\tEvent::add('ushahidi_action.nav_admin_reports', array($this, '_report_link'));\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\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\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\n\t\t\t\tcase 'index':\n\t\t\t\t\tplugin::add_stylesheet('actionable/css/actionable');\n\t\t\t\t\tEvent::add('ushahidi_action.report_filters_ui', array($this, '_report_filters_ui'));\n\t\t\t\t\tEvent::add('ushahidi_action.report_js_filterReportsAction', array($this, '_report_js_filterReportsAction'));\n\t\t\t\t\tEvent::add('ushahidi_action.report_js_filterReportsActionRemove', array($this, '_report_js_filterReportsActionRemove'));\n\t\t\t\t\tEvent::add('ushahidi_action.report_js_keyToFilter', array($this, '_report_js_keyToFilter'));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'fetch_reports':\n\t\t\t\t\tEvent::add('ushahidi_filter.fetch_incidents_set_params', array($this, '_fetch_incidents_set_params'));\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 == 'reports')\n\t\t{\n\t\t\tEvent::add('ushahidi_action.map_main_filters', array($this, '_map_main_filters'));\n\t\t}\n\t\telseif (Router::$controller == 'main')\n\t\t{\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{\n\t\t\tEvent::add('ushahidi_filter.fetch_incidents_set_params', array($this, '_fetch_incidents_set_params'));\n\t\t\tEvent::add('ushahidi_filter.json_index_features', array($this, '_json_index_features'));\n\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 add(){\n\n $this->set('add', true);\n\n if($this->request->is('post')){\n $this->request->data['CalendarEntry']['user_id'] = $this->Auth->User('id');\n if($this->CalendarEntry->save($this->request->data)){\n $this->_setFlash('Calendar entry added', 'success');\n return $this->redirect('/calendar');\n }\n else {\n $this->_setFlash($this->CalendarEntry->validationErrorsAsString());\n }\n }\n\n $this->render('add-edit');\n }", "public function add()\n\t{\n\t\tif (!parent::add())\n\t\t{\n\t\t\t// Redirect to the return page.\n\t\t\t$this->setRedirect($this->getReturnPage());\n\t\t}\n\t}", "public function add()\n\t{\n\t\tif (!parent::add())\n\t\t{\n\t\t\t// Redirect to the return page.\n\t\t\t$this->setRedirect($this->getReturnPage());\n\t\t}\n\t}", "function events_action_create_event() {\r\n\tglobal $bp;\r\n\r\n\t/* If we're not at domain.org/events/create/ then return false */\r\n\tif ( $bp->current_component != $bp->jes_events->slug || 'create' != $bp->current_action )\r\n\t\treturn false;\r\n\r\n\tif ( !is_user_logged_in() )\r\n\t\treturn false;\r\n\r\n\t/* Make sure creation steps are in the right order */\r\n\tevents_action_sort_creation_steps();\r\n\r\n\t/* If no current step is set, reset everything so we can start a fresh event creation */\r\n\tif ( !$bp->jes_events->current_create_step = $bp->action_variables[1] ) {\r\n\r\n\t\tunset( $bp->jes_events->current_create_step );\r\n\t\tunset( $bp->jes_events->completed_create_steps );\r\n\r\n\t\tsetcookie( 'bp_new_event_id', false, time() - 1000, COOKIEPATH );\r\n\t\tsetcookie( 'bp_completed_create_steps', false, time() - 1000, COOKIEPATH );\r\n\r\n\t\t$reset_steps = true;\r\n\t\tbp_core_redirect( $bp->root_domain . '/' . $bp->jes_events->slug . '/create/step/' . array_shift( array_keys( $bp->jes_events->event_creation_steps ) ) . '/' );\r\n\t}\r\n\r\n\t/* If this is a creation step that is not recognized, just redirect them back to the first screen */\r\n\tif ( $bp->action_variables[1] && !$bp->jes_events->event_creation_steps[$bp->action_variables[1]] ) {\r\n\t\tbp_core_add_message( __('There was an error saving event details. Please try again.', 'jet-event-system'), 'error' );\r\n\t\tbp_core_redirect( $bp->root_domain . '/' . $bp->jes_events->slug . '/create/' );\r\n\t}\r\n\r\n\t/* Fetch the currently completed steps variable */\r\n\tif ( isset( $_COOKIE['bp_completed_create_steps'] ) && !$reset_steps )\r\n\t\t$bp->jes_events->completed_create_steps = unserialize( stripslashes( $_COOKIE['bp_completed_create_steps'] ) );\r\n\r\n\t/* Set the ID of the new event, if it has already been created in a previous step */\r\n\tif ( isset( $_COOKIE['bp_new_event_id'] ) ) {\r\n\t\t$bp->jes_events->new_event_id = $_COOKIE['bp_new_event_id'];\r\n\t\t$bp->jes_events->current_event = new JES_Events_Event( $bp->jes_events->new_event_id );\r\n\t}\r\n\r\n\t/* If the save, upload or skip button is hit, lets calculate what we need to save */\r\n\tif ( isset( $_POST['save'] ) ) {\r\n\r\n\t\t/* Check the nonce */\r\n\t\tcheck_admin_referer( 'events_create_save_' . $bp->jes_events->current_create_step );\r\n\r\n\t\tif ( 'event-details' == $bp->jes_events->current_create_step ) {\r\n\t\t\tif ( empty( $_POST['event-edted'] ) ) { $eventedted = $_POST['event-edtsd']; } else { $eventedted = $_POST['event-edted']; }\r\n\t\t\tif ( empty( $_POST['event-name'] ) || empty( $_POST['event-desc'] ) || !strlen( trim( $_POST['event-name'] ) ) || !strlen( trim( $_POST['event-desc'] || $_POST['event-edtsd'] ) ) ) {\r\n\t\t\t\tbp_core_add_message( __( 'Please fill in all of the required fields', 'jet-event-system' ), 'error' );\r\n\t\t\t\tbp_core_redirect( $bp->root_domain . '/' . $bp->jes_events->slug . '/create/step/' . $bp->jes_events->current_create_step . '/' );\r\n\t\t\t}\r\n// JLL_MOD - Modded all over - look care over entire file :(\r\nif ( empty ($_POST['event-edtsd'] ) || empty ($_POST['event-edtsth'] ) ) {\r\n\t\t\t\t\tbp_core_add_message( __( 'Please complete event Start date and time.', 'jet-event-system' ), 'error' );\r\n\t\t\t\tbp_core_redirect( $bp->root_domain . '/' . $bp->jes_events->slug . '/create/step/' . $bp->jes_events->current_create_step . '/' );\r\n\t\t\t\t\t\t} else if ( jes_datetounix($_POST['event-edtsd'],$_POST['event-edtsth'],$_POST['event-edtstm']) > jes_datetounix($eventedted,$_POST['event-edteth'],$_POST['event-edtetm'])) {\r\n\t\t\t\t\tbp_core_add_message( __( 'There was an error updating event details. Date and time of completion of the event can not exceed the date of its beginning, please try again.', 'jet-event-system' ), 'error' );\r\n\t\t\t\tbp_core_redirect( $bp->root_domain . '/' . $bp->jes_events->slug . '/create/step/' . $bp->jes_events->current_create_step . '/' );\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\r\n\t\t\tif ( !$bp->jes_events->new_event_id = events_create_event( array( 'event_id' => $bp->jes_events->new_event_id, 'name' => $_POST['event-name'], 'etype' => $_POST['event-etype'], 'eventapproved' => $_POST['event-eventapproved'], 'description' => $_POST['event-desc'], 'eventterms' => $_POST['event-eventterms'], 'placedcountry' => $_POST['event-placedcountry'], 'placedstate' => $_POST['event-placedstate'],'placedcity' => $_POST['event-placedcity'], 'placedaddress' => $_POST['event-placedaddress'], 'placednote' => $_POST['event-placednote'], 'placedgooglemap' => $_POST['event-placedgooglemap'], 'flyer' => $_POST['event-flyer'],'newspublic' => $_POST['event-newspublic'], 'newsprivate' => $_POST['event-newsprivate'], 'edtsd' => $_POST['event-edtsd'], 'edted' => $eventedted, 'edtsth' => $_POST['event-edtsth'], 'edteth' => $_POST['event-edteth'], 'edtstm' => $_POST['event-edtstm'], 'edtetm' => $_POST['event-edtetm'],'grouplink' => $_POST['grouplink'], 'forumlink' => $_POST['forumlink'], 'enablesocial' => $_POST['enablesocial'],'slug' => events_jes_check_slug( sanitize_title( esc_attr( $_POST['event-name'] ) ) ), 'date_created' => gmdate( \"Y-m-d H:i:s\" ), 'status' => 'public', 'notify_timed_enable' => $_POST['notifytimedenable']) ) ) {\r\n\t\t\t\tbp_core_add_message( __( 'There was an error saving event details, please try again [001]', 'jet-event-system' ), 'error' );\r\n\t\t\t\tbp_core_redirect( $bp->root_domain . '/' . $bp->jes_events->slug . '/create/step/' . $bp->jes_events->current_create_step . '/' );\r\n\t\t\t}\r\n}\r\n\t\t\tevents_update_eventmeta( $bp->jes_events->new_event_id, 'total_member_count', 1 );\r\n\t\t\tevents_update_eventmeta( $bp->jes_events->new_event_id, 'last_activity', gmdate( \"Y-m-d H:i:s\" ) );\r\n\t\t}\r\n\r\n\t\tif ( 'event-settings' == $bp->jes_events->current_create_step ) {\r\n\t\t\t$event_status = 'public';\r\n\t\t\t$event_enable_forum = 1;\r\n\r\n\t\t\tif ( !isset($_POST['event-show-forum']) ) {\r\n\t\t\t\t$event_enable_forum = 0;\r\n\t\t\t} else {\r\n\t\t\t}\r\n\r\n\t\t\tif ( 'private' == $_POST['event-status'] )\r\n\t\t\t\t$event_status = 'private';\r\n\t\t\telse if ( 'hidden' == $_POST['event-status'] )\r\n\t\t\t\t$event_status = 'hidden';\r\n\r\n\t\t\tif ( !$bp->jes_events->new_event_id = events_create_event( array( 'event_id' => $bp->jes_events->new_event_id, 'status' => $event_status, 'grouplink' => $_POST['event-grouplink'], 'forumlink' => $_POST['event-forumlink'], 'enablesocial' => $_POST['enablesocial'],'enable_forum' => $event_enable_forum ) ) ) {\r\n\t\t\t\tbp_core_add_message( __( 'There was an error saving event details, please try again. [002]', 'jet-event-system' ), 'error' );\r\n\t\t\t\tbp_core_redirect( $bp->root_domain . '/' . $bp->jes_events->slug . '/create/step/' . $bp->jes_events->current_create_step . '/' );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( 'event-invites' == $bp->jes_events->current_create_step ) {\r\n\t\t\tevents_send_invite_jes( $bp->loggedin_user->id, $bp->jes_events->new_event_id );\r\n\t\t}\r\n\r\n\t\tdo_action( 'events_create_event_step_save_' . $bp->jes_events->current_create_step );\r\n\t\tdo_action( 'events_create_event_step_complete' ); // Mostly for clearing cache on a generic action name\r\n\r\n\t\t/**\r\n\t\t * Once we have successfully saved the details for this step of the creation process\r\n\t\t * we need to add the current step to the array of completed steps, then update the cookies\r\n\t\t * holding the information\r\n\t\t */\r\n\t\tif ( !in_array( $bp->jes_events->current_create_step, (array)$bp->jes_events->completed_create_steps ) )\r\n\t\t\t$bp->jes_events->completed_create_steps[] = $bp->jes_events->current_create_step;\r\n\r\n\t\t/* Reset cookie info */\r\n\t\tsetcookie( 'bp_new_event_id', $bp->jes_events->new_event_id, time()+60*60*24, COOKIEPATH );\r\n\t\tsetcookie( 'bp_completed_create_steps', serialize( $bp->jes_events->completed_create_steps ), time()+60*60*24, COOKIEPATH );\r\n\r\n\t\t/* If we have completed all steps and hit done on the final step we can redirect to the completed event */\r\n\t\tif ( count( $bp->jes_events->completed_create_steps ) == count( $bp->jes_events->event_creation_steps ) && $bp->jes_events->current_create_step == array_pop( array_keys( $bp->jes_events->event_creation_steps ) ) ) {\r\n\t\t\tunset( $bp->jes_events->current_create_step );\r\n\t\t\tunset( $bp->jes_events->completed_create_steps );\r\n\r\n\t\t\t/* Once we compelete all steps, record the event creation in the activity stream. */\r\n\t\t\tevents_record_activity( array(\r\n\t\t\t\t'action' => apply_filters( 'events_activity_created_event_action', sprintf( __( '%s created the event %s', 'jet-event-system'), bp_core_get_userlink( $bp->loggedin_user->id ), '<a href=\"' . jes_bp_get_event_permalink( $bp->jes_events->current_event ) . '\">' . attribute_escape( $bp->jes_events->current_event->name ) . '</a>' ) ),\r\n\t\t\t\t'type' => 'created_event',\r\n\t\t\t\t'item_id' => $bp->jes_events->new_event_id\r\n\t\t\t) );\r\n\r\n\t\t\tdo_action( 'events_event_create_complete', $bp->jes_events->new_event_id );\r\n\r\n\t\t\tbp_core_redirect( jes_bp_get_event_permalink( $bp->jes_events->current_event ) );\r\n\t\t} else {\r\n\t\t\t/**\r\n\t\t\t * Since we don't know what the next step is going to be (any plugin can insert steps)\r\n\t\t\t * we need to loop the step array and fetch the next step that way.\r\n\t\t\t */\r\n\t\t\tforeach ( (array)$bp->jes_events->event_creation_steps as $key => $value ) {\r\n\t\t\t\tif ( $key == $bp->jes_events->current_create_step ) {\r\n\t\t\t\t\t$next = 1;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( $next ) {\r\n\t\t\t\t\t$next_step = $key;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tbp_core_redirect( $bp->root_domain . '/' . $bp->jes_events->slug . '/create/step/' . $next_step . '/' );\r\n\t\t}\r\n\t}\r\n\r\n\t/* Event avatar is handled separately */\r\n\tif ( 'event-avatar' == $bp->jes_events->current_create_step && isset( $_POST['upload'] ) ) {\r\n\t\tif ( !empty( $_FILES ) && isset( $_POST['upload'] ) ) {\r\n\t\t\t/* Normally we would check a nonce here, but the event save nonce is used instead */\r\n\r\n\t\t\t/* Pass the file to the avatar upload handler */\r\n\t\t\tif ( bp_core_avatar_handle_upload( $_FILES, 'events_avatar_upload_dir' ) ) {\r\n\t\t\t\t$bp->avatar_admin->step = 'crop-image';\r\n\r\n\t\t\t\t/* Make sure we include the jQuery jCrop file for image cropping */\r\n\t\t\t\tadd_action( 'wp', 'bp_core_add_jquery_cropper' );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/* If the image cropping is done, crop the image and save a full/thumb version */\r\n\t\tif ( isset( $_POST['avatar-crop-submit'] ) && isset( $_POST['upload'] ) ) {\r\n\t\t\t/* Normally we would check a nonce here, but the event save nonce is used instead */\r\n\r\n\t\t\tif ( !bp_core_avatar_handle_crop( array( 'object' => 'event', 'avatar_dir' => 'event-avatars', 'item_id' => $bp->jes_events->current_event->id, 'original_file' => $_POST['image_src'], 'crop_x' => $_POST['x'], 'crop_y' => $_POST['y'], 'crop_w' => $_POST['w'], 'crop_h' => $_POST['h'] ) ) )\r\n\t\t\t\tbp_core_add_message( __( 'There was an error saving the event avatar, please try uploading again.', 'jet-event-system' ), 'error' );\r\n\t\t\telse\r\n\t\t\t\tbp_core_add_message( __( 'The event avatar was uploaded successfully!', 'jet-event-system' ) );\r\n\t\t}\r\n\t}\r\n\r\n \tbp_core_load_template( apply_filters( 'events_template_create_event', 'events/create' ) );\r\n}", "function custom_rules_is_destination_set(){\n\treturn isset( $_GET['destination'] );\n}", "function SetupOtherOptions() {\n\t\tglobal $Language, $Security;\n\t\t$options = &$this->OtherOptions;\n\t\t$option = $options[\"addedit\"];\n\n\t\t// Add\n\t\t$item = &$option->Add(\"add\");\n\t\t$addcaption = ew_HtmlTitle($Language->Phrase(\"AddLink\"));\n\t\t$item->Body = \"<a class=\\\"ewAddEdit ewAdd\\\" title=\\\"\" . $addcaption . \"\\\" data-caption=\\\"\" . $addcaption . \"\\\" href=\\\"\" . ew_HtmlEncode($this->AddUrl) . \"\\\">\" . $Language->Phrase(\"AddLink\") . \"</a>\";\n\t\t$item->Visible = ($this->AddUrl <> \"\" && $Security->CanAdd());\n\t\t$option = $options[\"action\"];\n\n\t\t// Set up options default\n\t\tforeach ($options as &$option) {\n\t\t\t$option->UseImageAndText = TRUE;\n\t\t\t$option->UseDropDownButton = FALSE;\n\t\t\t$option->UseButtonGroup = TRUE;\n\t\t\t$option->ButtonClass = \"btn-sm\"; // Class for button group\n\t\t\t$item = &$option->Add($option->GroupOptionName);\n\t\t\t$item->Body = \"\";\n\t\t\t$item->Visible = FALSE;\n\t\t}\n\t\t$options[\"addedit\"]->DropDownButtonPhrase = $Language->Phrase(\"ButtonAddEdit\");\n\t\t$options[\"detail\"]->DropDownButtonPhrase = $Language->Phrase(\"ButtonDetails\");\n\t\t$options[\"action\"]->DropDownButtonPhrase = $Language->Phrase(\"ButtonActions\");\n\n\t\t// Filter button\n\t\t$item = &$this->FilterOptions->Add(\"savecurrentfilter\");\n\t\t$item->Body = \"<a class=\\\"ewSaveFilter\\\" data-form=\\\"fneonatallistsrch\\\" href=\\\"#\\\">\" . $Language->Phrase(\"SaveCurrentFilter\") . \"</a>\";\n\t\t$item->Visible = TRUE;\n\t\t$item = &$this->FilterOptions->Add(\"deletefilter\");\n\t\t$item->Body = \"<a class=\\\"ewDeleteFilter\\\" data-form=\\\"fneonatallistsrch\\\" href=\\\"#\\\">\" . $Language->Phrase(\"DeleteFilter\") . \"</a>\";\n\t\t$item->Visible = TRUE;\n\t\t$this->FilterOptions->UseDropDownButton = TRUE;\n\t\t$this->FilterOptions->UseButtonGroup = !$this->FilterOptions->UseDropDownButton;\n\t\t$this->FilterOptions->DropDownButtonPhrase = $Language->Phrase(\"Filters\");\n\n\t\t// Add group option item\n\t\t$item = &$this->FilterOptions->Add($this->FilterOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->Visible = FALSE;\n\t}", "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 getCreateEventUrl()\n\t{\n\t\t$calendarModuleModel = Vtiger_Module_Model::getInstance('Calendar');\n\t\treturn $calendarModuleModel->getCreateEventRecordUrl() . '&link=' . $this->getId();\n\t}", "function setDestinationUrl ($newDestinationUrl) {\n // this by deleting and then re-creating the ad\n // update the google servers\n $soapClients = &APIlityClients::getClients();\n $someSoapClient = $soapClients->getAdClient();\n // then recreate it with the new destination url set\n $soapParameters = \"<addAds>\n <ads>\n <adGroupId>\".$this->getBelongsToAdGroupId().\"</adGroupId>\n <headline>\".utf8_decode($this->getHeadline()).\"</headline>\n <description1>\".utf8_decode($this->getDescription1()).\"</description1>\n <description2>\".utf8_decode($this->getDescription2()).\"</description2>\n <displayUrl>\".$this->getDisplayUrl().\"</displayUrl>\n <destinationUrl>\".$newDestinationUrl.\"</destinationUrl>\n <status>\".$this->getStatus().\"</status>\n <adType>TextAd</adType>\n </ads>\n </addAds>\";\n // add the ad to the google servers\n $someAd = $someSoapClient->call(\"addAds\", $soapParameters);\n $soapClients->updateSoapRelatedData(extractSoapHeaderInfo($someSoapClient->getHeaders()));\n if ($someSoapClient->fault) {\n pushFault($someSoapClient, $_SERVER['PHP_SELF'].\":setDestinationUrl()\", $soapParameters);\n return false;\n }\n // first delete the current ad\n $soapParameters = \"<updateAds>\n <ads>\n <adGroupId>\".$this->getBelongsToAdGroupId().\"</adGroupId>\n <id>\".$this->getId().\"</id>\n <status>Disabled</status>\n <adType>TextAd</adType>\n </ads>\n </updateAds>\";\n // delete the ad on the google servers\n $someSoapClient->call(\"updateAds\", $soapParameters);\n $soapClients->updateSoapRelatedData(extractSoapHeaderInfo($someSoapClient->getHeaders()));\n if ($someSoapClient->fault) {\n pushFault($someSoapClient, $_SERVER['PHP_SELF'].\":setDestinationUrl()\", $soapParameters);\n return false;\n }\n // update local object\n $this->destinationUrl = $someAd['addAdsReturn']['destinationUrl'];\n // changing the destination url of a ad will change its id so update local object\n $this->id = $someAd['addAdsReturn']['id'];\n return true;\n }", "public function set_list_address($add)\n\t{\n\t\t$this->list_address = $add;\n\t\treturn TRUE;\n\t}", "public function addAccess($destination, AccessInterface $access);", "function bat_event_type_form_submit_delete(&$form, &$form_state) {\n $destination = array();\n if (isset($_GET['destination'])) {\n $destination = drupal_get_destination();\n unset($_GET['destination']);\n }\n\n $form_state['redirect'] = array('admin/bat/events/event_types/manage/' . $form_state['bat_event_type']->type . '/delete', array('query' => $destination));\n}", "public function setAddForm($addForm=true);", "function enableDayLinks($link=false,$javaScript=false){\n\tif ($link) $this->url=$link;\n\telse $this->url=$_SERVER['PHP_SELF'];\n\tif ($javaScript) $this->javaScriptDay=$javaScript;\n$this->dayLinks=true;\n}", "private function add_filteredEvents_to_wp_options()\n {\n //clears out the data from the options table in order to add fresh data\n delete_option('upcoming_events');\n $filteredEvents = update_data_filter_and_sort();\n\n //Here we handle the options settings\n $option = \"upcoming_events\";\n $value = $filteredEvents;\n $deprecated = \"\";\n $autoload = \"yes\";\n\n //just for the first instance - if the row in the options table doesn't exist, create it.\n if (!get_option($option, $default = false)) {\n add_option($option, $value, $deprecated, $autoload);\n $optionValue = get_option('upcoming_events');\n //if once we've added the option and it still does not exist\n //something went wrong and we were unable to create the row.\n if (!get_option($option, $default = false)) {\n return false;\n }\n }\n }", "public function setDestination($destination) {}", "public function setDestination($destination) {}", "public function addAction() {\r\n \t$this->checkRight();\r\n \t$gid = $this->getInput('gid');\r\n \t$title = \"添加收货人地址\";\r\n \t$this->assign('title', $title);\r\n \t$this->assign('gid', $gid);\r\n }", "private static function addSources(? array $addSources = null)\n {\n self::verifyIsNull(\"Sources list\", $addSources);\n $validSources = [];\n\n foreach ($addSources as $key => $value) {\n if (is_numeric($key) || empty($value) || !filter_var($value, FILTER_VALIDATE_URL)) {\n continue;\n }\n\n $validSources[$key] = $value;\n }\n\n self::$endpoints = array_merge(self::$endpoints, $validSources);\n }", "public function add()\n {\n if($this->Auth->user('level') != \"Officer\" && $this->Auth->user('level') != \"Admin\")\n $this->redirect(\n array('controller' => 'Users', 'action' => 'profilehub/' . $this->Auth->user('id')));\n \n if($this->request->is('post'))\n {\n $this->Event->create();\n \n if($this->Event->save($this->request->data))\n {\n $this->redirect('announcements');\n }\n }\n \n $this->loadModel('User');\n $users = $this->User->find('all');\n\n $this->set('user', $users);\n \n $this->layout = 'hero-ish';\n $this->Session->write('Page', 'Hub');\n }", "public function addEvent($event_title,$event_detail,$event_date){\n\n // check the name of the event on db\n // $check_sql=\"SELECT*FROM `events` WHERE event_title='$event_title'\";\n // $result_check=$this->conn->query($check_sql);\n\n // if($result_check->num_rows>0){\n // echo \"<div class='alert alert-danger text-center'>The event is already in the table.</div>\";\n\n // }else{\n // insert into db\n $sql=\"INSERT INTO `events`(`event_title`,`event_detail`,`event_date`) VALUES('$event_title','$event_detail','$event_date')\";\n $result=$this->conn->query($sql);\n\n if($result==TRUE){\n header(\"location:events.php?success=1&message=The event was successfully created\");\n }else{\n header(\"location:events.php?success=0&message=Error occurd.Try it again.\");\n // } \n }\n }", "function add($destinationname, $something) {\n trigger_error('Admin class does not implement method <strong>add()</strong>', E_USER_WARNING);\n return;\n }", "public function to($addr, $add = false) {\r\n\t\t$this->addr($addr, 'to', $add);\r\n\t}", "function add()\n {\n return true;\n }", "public function _report_link()\n\t{\n\t\t$this_sub_page = Event::$data;\n\t\techo ($this_sub_page == \"actionable\") ? Kohana::lang('actionable.actionable') : \"<a href=\\\"\".url::site().\"admin/actionable\\\">\".Kohana::lang('actionable.actionable').\"</a>\";\n\t}", "public function _report_link()\n\t{\n\t\t$this_sub_page = Event::$data;\n\t\techo ($this_sub_page == \"actionable\") ? Kohana::lang('actionable.actionable') : \"<a href=\\\"\".url::site().\"admin/actionable\\\">\".Kohana::lang('actionable.actionable').\"</a>\";\n\t}", "function eventclass_offeraride()\n\t{\n\t\t$this->events[\"BeforeMoveNextList\"]=true;\n\n\n//\tonscreen events\n\n\t}", "function event__add_edit_event($type, $event, $id = null)\n {\n $_next_day = date('n/j/Y', strtotime($event['start_date'] . ' +1 day'));\n if (empty($event['end_date']))\n {\n if (empty($event['end_time']))\n {\n $event['end_date'] = (empty($event['start_time']) ? $_next_day : $event['start_date']);\n }\n else\n {\n $event['end_date'] = $event['start_date'];\n }\n }\n if (empty($event['start_time'])) $event['start_time'] = '12 am';\n if (empty($event['end_time'])) $event['end_time'] = $event['start_time'];\n\n // Manipulate dates based on checkbox states\n if (!empty($event['no_end_date']))\n {\n $event['end_date'] = (!empty($event['all_day_event']) ? $_next_day : $event['start_date']);\n $event['end_time'] = $event['start_time'];\n }\n elseif (!empty($event['all_day_event']))\n {\n $event['end_date'] = (!empty($event['end_date']) ? $event['end_date'] : $_next_day);\n $event['end_time'] = '12 am';\n }\n $event['date_start'] = date('Y-m-d H:i:s', strtotime($event['start_date'] . ' ' . $event['start_time']));\n $event['date_end'] = date('Y-m-d H:i:s', strtotime($event['end_date'] . ' ' . $event['end_time']));\n unset($event['start_date']);\n unset($event['start_time']);\n unset($event['end_date']);\n unset($event['end_time']);\n\n // Correct for blank latitude/longitude\n if (empty($event['latitude'])) $event['latitude'] = null;\n if (empty($event['longitude'])) $event['longitude'] = null;\n\n // Change '-' to null\n if ($event['status'] == '-') $event['status'] = null;\n\n // Add recordkeeping fields\n $event['date_last_updated'] = date('Y-m-d H:i:s');\n $event['last_updated_by'] = $this->session->userdata('member_id');\n\n // Initialize return variable (null for calls as void function)\n $return = null;\n\n // Determine database calls and some event values based on type\n switch ($type)\n {\n case 'edit':\n // Boolean fields\n if (empty($event['all_day_event'])) $event['all_day_event'] = 0;\n if (empty($event['multiday_event'])) $event['multiday_event'] = 0;\n if (empty($event['rsvp_only'])) $event['rsvp_only'] = 0;\n if (empty($event['hide_address'])) $event['hide_address'] = 0;\n\n // Update event in database\n $this->db->where('id', $id);\n $this->db->update('events', $event);\n\n break;\n case 'add':\n default:\n // Creation recordkeeping\n $event['date_added'] = date('Y-m-d H:i:s');\n $event['added_by'] = $this->session->userdata('member_id');\n\n // Add slug\n $event['slug'] = url_title($event['name'], '-', true);\n\n // Add event to database\n $this->db->insert('events', $event);\n\n // Set return variable to insert ID\n $return = $this->db->insert_id();\n\n break;\n }\n\n // Return insert ID\n return $return;\n }", "public function addEvent()\n {\n if ($this->input->post('start') === null || $this->input->post('eventName') === null) {\n $response = array(\"status\" => false, \"message\" => 'Please provide necessary data.');\n\n $this->send(400, $response);\n }\n\n $reqData = array(\n 'start' => $this->input->post('start'),\n 'event_name' => $this->input->post('eventName'),\n 'created_by' => $this->session->get('username'),\n 'course_desc' => $this->input->post('courseDesc'),\n 'certified_by' => $this->input->post('certifiedBy'),\n 'all_day_event' => $this->input->post('allday'),\n 'end' => $this->input->post('end')\n );\n\n $added = $this->model->addEvent($reqData);\n\n if ($added === true) {\n $response = array(\"status\" => true, \"message\" => 'Event added.');\n $this->send(200, $response);\n } else {\n $response = array(\"status\" => false, \"message\" => 'Event not added.');\n $this->send(500, $response);\n }\n }", "public function showExitLink()\n\t{\n\t\treturn true;\n\t}", "function addEvent($event) {\n Event::addEvent($event);\n }", "function turnitintooltwo_add_to_log($courseid, $eventname, $link, $desc, $cmid, $userid = 0) {\n global $USER;\n\n $eventname = str_replace(' ', '_', $eventname);\n $eventpath = '\\mod_turnitintooltwo\\event\\\\'.$eventname;\n\n $data = array(\n 'objectid' => $cmid,\n 'context' => ( $cmid == 0 ) ? context_course::instance($courseid) : context_module::instance($cmid),\n 'other' => array('desc' => $desc)\n );\n if (!empty($userid) && ($userid != $USER->id)) {\n $data['relateduserid'] = $userid;\n }\n $event = $eventpath::create($data);\n $event->trigger();\n}", "abstract public function should_link_to_wp_admin();", "public function onAddCustomer($event)\n\t{\n\t\t$this->init();\n\n\t\t$objCustomer = $event->objCustomer;\n\n\t\tif($objCustomer->newsletter_subscribe)\n\t\t{\n\t\t\t$intListId = $this->getListId($this->objModule->getConfig('list'));\n\n\t\t\tif (!is_null($intListId))\n\t\t\t{\n\t\t\t\t$merge_vars = array(\n\t\t\t\t\t'FNAME'=>$objCustomer->first_name,\n\t\t\t\t\t'LNAME'=>$objCustomer->last_name,\n\t\t\t\t\t'OPTIN_IP'=>_xls_get_ip(),\n\t\t\t\t\t'OPTIN_TIME'=>date(\"Y-m-d H:i:s\"),\n\t\t\t\t\t'GROUPINGS'=>array(),\n\t\t\t\t\t'double_optin'=>false, //since we already have the opt-in checkbox on our form\n\t\t\t\t\t'update_existing'=>true,\n\t\t\t\t\t'send_welcome'=>true,\n\n\t\t\t\t);\n\n\t\t\t\t$this->api->listSubscribe($intListId, $objCustomer->email,$merge_vars);\n\n\t\t\t\tif ($this->api->errorCode)\n\t\t\t\t{\n\t\t\t\t\tYii::log(\"Unable to load listSubscribe() Code=\".$this->api->errorCode.\" Msg=\".$this->api->errorMessage, 'error', 'application.'.__CLASS__.\".\".__FUNCTION__);\n\t\t\t\t\treturn false;\n\t\t\t\t} else\n\t\t\t\t\treturn true;\n\n\t\t\t} else {\n\t\t\t\tYii::log(\"Mailchimp - can't find list \".$this->objModule->getConfig('list'), 'error', 'application.'.__CLASS__.\".\".__FUNCTION__);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else return true; //if the person doesn't want to subscribe, return true because it's not an error result, just do nothing\n\n\t}", "public function save_event_history($flag)\n {\n $this->_store_history = (bool) $flag;\n }", "function addEvent($event) {\n\n $fields = array(\n 'event_id', 'calendar_id',\n 'title', 'location', 'description',\n 'start_stamp', 'end_stamp', 'end_year', 'end_month', 'recurrence',\n 'recur_yearly_interval',\n 'recur_monthly_interval', 'recur_monthly_count', 'recur_monthly_byweekday',\n 'recur_weekly_interval',\n 'recur_daily_interval',\n 'recur_end'\n );\n\n $toDB = array();\n foreach ($fields as $field) {\n if (!isset($event[$field])) {\n continue;\n }\n $toDB[$field] = $event[$field];\n }\n\n // save event\n $event_id = $this->databaseInsertRecord($this->tableEvents, 'event_id', $toDB);\n\n if (!$event_id) {\n // database error\n return FALSE;\n }\n\n // save selected months / weekdays\n switch($event['recurrence']) {\n case 'weekly':\n return $this->_saveWeekdays($event_id, $event) !== FALSE;\n break;\n case 'yearly':\n return $this->_saveMonths($event_id, $event) !== FALSE;\n break;\n }\n\n return $event_id;\n }", "public function add()\n\t{\n\t\t// Redirect to create Joomla user.\n\t\t$this->setRedirect(JRoute::_('index.php?option=com_hwdmediashare&view=channels&layout=add&tmpl=component', false));\n\t}", "function InlineAddMode() {\n\t\tglobal $Security, $Language;\n\t\tif (!$Security->CanAdd())\n\t\t\t$this->Page_Terminate(\"login.php\"); // Return to login page\n\t\t$this->CurrentAction = \"add\";\n\t\t$_SESSION[EW_SESSION_INLINE_MODE] = \"add\"; // Enable inline add\n\t}", "public function action_add()\n\t{\n\t\t$this->template = View::forge('template-admin');\n\n\t\t//return Response::forge(View::forge('event/add'));\n\t\t$data[\"category\"] = Model_Category::find_all();\n\t\t$this->template->title = \"イベント追加\";\n\t\t$this->template->content = View::forge('event/add',$data);\n\t}", "function section_linkadmin (){\n section_links_links (true);\n}", "public function can_showdirectlink() {\n return true;\n }", "function createNewEvent() \n {\n // SPEICHERUNG\n if (isset($_POST['eventname'])) {\n if ($this->userHasRight(79, 0) == true) {\n $neweventname = $this->checkString($_POST['eventname']);\n if (strlen($neweventname) > 5) {\n if ($this->objectExists(\"SELECT id,eventname FROM eventlist WHERE eventname='$neweventname'\") == false) {\n $sql = \"INSERT INTO eventlist (eventname) VALUES ('$neweventname')\";\n if ($this->sqlInsertUpdateDelete($sql) == true) {\n $this->erfolgMessage(\"Event $neweventname erstellt\");\n } else {\n $this->errorMessage(\"Fehler beim speichern ($neweventname)\");\n }\n } else {\n $this->infoMessage(\"Eine Veranstaltung mit dem Namen $neweventname existiert bereits.\");\n }\n \n } else {\n $this->infoMessage(\"Name muss mehr als 5 Zeichen haben.\");\n }\n } else {\n $this->infoMessage(\"Du benötigst Super Administration Rechte für diese Aktion.\");\n }\n \n }\n\n // AUSGABE\n if ($this->userHasRight(79, 0) == true) {\n echo \"<div class=''>\";\n echo \"<form method=post action='administration.php#allevents' />\";\n echo \"<input type=text name=eventname placeholder=Event-Name required />\";\n echo \"<button type=submit>OK</button>\";\n echo \"</form>\";\n echo \"</div>\";\n }\n }", "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 }", "function addEventToDB() {\r\n\r\n\tglobal $MySelf;\r\n\tglobal $DB;\r\n\r\n\t// is the events module active?\r\n\tif (!getConfig(\"events\")) {\r\n\t\tmakeNotice(\"The admin has deactivated the events module.\", \"warning\", \"Module not active\");\r\n\t}\r\n\t\r\n\t// Are we allowed to add Events?\r\n\tif (!$MySelf->canEditEvents()) {\r\n\t\tmakeNotice(\"You are not allowed to add events!\", \"error\", \"Forbidden!\");\r\n\t}\r\n\r\n\t// Do we have a short description?\r\n\tif (empty ($_POST[sdescr])) {\r\n\t\tmakeNotice(\"You need to supply a short description!\", \"error\", \"Important field missing!\");\r\n\t}\r\n\r\n\t// Do we have an officer?\r\n\tif (empty ($_POST[officer])) {\r\n\t\tmakeNotice(\"You need to supply who is in command!\", \"error\", \"Important field missing!\");\r\n\t}\r\n\t\r\n\t// Choose which supplied officer we use.\r\n\tif (!empty($_POST[officer2])) {\r\n\t\tsanitize($officer = sanitize($_POST[officer2]));\r\n\t} else {\r\n\t\tsanitize($officer = sanitize($_POST[officer]));\r\n\t}\r\n\t\r\n\t// Choose which system we use.\r\n\tif (!empty($_POST[system2])) {\r\n\t\t$system = strtolower($_POST[system2]);\r\n\t} else {\r\n\t\t$system = strtolower($_POST[system]);\r\n\t}\r\n\t\r\n\t// Check that we still have a valid systemname.\r\n\tif (empty($system)) {\r\n\t\tmakeNotice(\"No valid Systemname found! Please go back, and try again.\", \"warning\", \"No system name\",\r\n\t\t \"index.php?action=addevent\", \"[cancel]\");\r\n\t}\r\n\r\n\t// Do we have an ETD?\r\n\tif (empty ($_POST[dur])) {\r\n\t\tmakeNotice(\"You need to tell me the guessed runtime!\", \"error\", \"Important field missing!\");\r\n\t}\r\n\r\n\t// Collateral?\r\n\tif (!is_numeric($_POST[collateral]) && $_POST[collateral] < 0) {\r\n\t\tmakeNotice(\"You need to supply a valid collateral!\", \"error\", \"Important field missing!\");\r\n\t}\r\n\r\n\t// Do we have an ETD?\r\n\tif ($_POST[payment] < 0) {\r\n\t\tmakeNotice(\"You need to give the folks some money!\", \"error\", \"Important field missing!\");\r\n\t}\r\n\r\n\t// Startting time goodness.\r\n\t$myTime = array (\r\n\t\t\"day\" => \"$_POST[ST_day]\",\r\n\t\t\"month\" => \"$_POST[ST_month]\",\r\n\t\t\"year\" => \"$_POST[ST_year]\",\r\n\t\t\"hour\" => \"$_POST[ST_hour]\",\r\n\t\t\"minute\" => \"$_POST[ST_minute]\",\r\n\t\t\r\n\t);\r\n\t$starttime = humanTime(\"toUnix\", $myTime);\r\n\r\n\t// is the time valid?\r\n\tif (!$starttime) {\r\n\t\tmakeNotice(\"Invalid time supplied!\", \"error\", \"Invalid Time!\");\r\n\t}\r\n\r\n\t// Lets see what ships are required.\r\n\t$SHIPTYPES = array (\r\n\t\t\"shuttles\",\r\n\t\t\"frigates\",\r\n\t\t\"destroyers\",\r\n\t\t\"cruisers\",\r\n\t\t\"bcruiser\",\r\n\t\t\"scruiser\",\r\n\t\t\"bship\",\r\n\t\t\"dread\",\r\n\t\t\"carrier\",\r\n\t\t\"titan\",\r\n\t\t\"barges\",\r\n\t\t\"indies\",\r\n\t\t\"freighter\",\r\n\t\t\"jfreighter\",\r\n\t\t\"exhumer\"\r\n\t);\r\n\tforeach ($SHIPTYPES as $ship) {\r\n\t\tif ($_POST[$ship] == \"on\") {\r\n\t\t\t$wantedships[] = $ship;\r\n\t\t}\r\n\t}\r\n\t$ships = serialize($wantedships);\r\n\r\n\t$p = $DB->query(\"INSERT INTO events (sdesc, officer, system, security, type, starttime, \" .\r\n\t\"duration, difficulty, payment, collateral, notes, ships)\r\n\t values (?,?,?,?,?,?,?,?,?,?,?,?)\", array (\r\n\t\tsanitize($_POST[sdescr]),\r\n\t\t$officer,\r\n\t\t$system,\r\n\t\tsanitize($_POST[security]),\r\n\t\tsanitize($_POST[type]),\r\n\t\tsanitize($starttime),\r\n\t\tsanitize($_POST[dur]),\r\n\t\tsanitize($_POST[difficulty]),\r\n\t\tsanitize($_POST[payment]),\r\n\t\tsanitize($_POST[collateral]),\r\n\t\tsanitize($_POST[notes]),\r\n\t\t\"$ships\"\r\n\t));\r\n\r\n\tif ($DB->affectedRows() == 1) {\r\n\r\n\t\t// Prepare the announcement email.\r\n\t\tglobal $SITENAME;\r\n\t\tglobal $VERSION;\r\n\t\tglobal $URL;\r\n\r\n\t\t// Bloody hack to get latest ID. No one will ever know. ;)\r\n\t\t$lastID = $DB->getCol(\"SELECT max(ID) from events;\");\r\n\t\t$risks = array (\r\n\t\t\t\"No risk involved.\",\r\n\t\t\t\"Only inferior forces suspected.\",\r\n\t\t\t\"Somewhat risky.\",\r\n\t\t\t\"Moderate risk.\",\r\n\t\t\t\"Extreme risks are involved.\",\r\n\t\t\t\"No survivors expected.\"\r\n\t\t);\r\n\t\t$risk_index = $_POST[difficulty];\r\n\r\n\t\t// Fix the template up.\r\n\t\t$email = str_replace(\"{{ID}}\", str_pad(\"$lastID[0]\", \"5\", \"0\", STR_PAD_LEFT), getTemplate(\"newevent\", \"email\"));\r\n\t\t$email = str_replace(\"{{SDESCR}}\", $_POST[sdescr], $email);\r\n\t\t$email = str_replace(\"{{TYPE}}\", $_POST[type], $email);\r\n\t\t// In case of a numeric value we have to translate that into plain english.\r\n\t\tif (is_numeric($_POST[officer])) {\r\n\t\t\t$officer = idToUsername($_POST[officer]);\r\n\t\t} else {\r\n\t\t\t$officer = sanitze($_POST[officer]);\r\n\t\t}\r\n\t\t$email = str_replace(\"{{FLAGOFFICER}}\", ucfirst($officer), $email);\r\n\t\t$email = str_replace(\"{{SYSTEM}}\", $_POST[system], $email);\r\n\t\t$email = str_replace(\"{{SECURITY}}\", $_POST[security], $email);\r\n\t\t$email = str_replace(\"{{STARTTIME}}\", date(\"d.m.y H:i:s\", $starttime), $email);\r\n\t\t$email = str_replace(\"{{DURATION}}\", $_POST[dur], $email);\r\n\t\t$email = str_replace(\"{{RISK}}\", $risks[$risk_index], $email);\r\n\t\t$email = str_replace(\"{{PAYMENT}}\", $_POST[payment], $email);\r\n\t\t$email = str_replace(\"{{COLLATERAL}}\", number_format($_POST[collateral], 2), $email);\r\n\t\t$email = str_replace(\"{{NOTES}}\", $_POST[notes], $email);\r\n\t\t$email = str_replace(\"{{SITENAME}}\", $SITENAME, $email);\r\n\t\t$email = str_replace(\"{{URL}}\", $URL, $email);\r\n\t\t$email = str_replace(\"{{VERSION}}\", $VERSION, $email);\r\n\r\n\t\t// mail the user.\r\n\t\tmailUser($email, \"New event added!\");\r\n\r\n\t\t// Tell the admin what we did.\r\n\t\tmakeNotice(\"Event added to the database and users who are opt-in got an email.\", \"notice\", \"New Event added.\", \"index.php?action=showevents\", \"[OK]\");\r\n\t} else {\r\n\t\tmakeNotice(\"Something went horribly wrong! AIEE!!\", \"error\", \"Mummy!\");\r\n\t}\r\n\r\n}", "public function __construct() {\r\n if (Eabi_Ipenelo_Calendar::get('show_link')) {\r\n add_action('wp_footer', array(&$this, 'link'));\r\n }\r\n }", "public function resourceTemplateTeamsAdd(Event $event)\n {\n $view = $event->getTarget();\n\n if ($has_team = $this->currentTeam()){\n $team_id = $has_team->getId();\n\n } else {\n $messanger = new Messenger();\n $messanger->addError(\"You can only make a resource template after you have been added to a team\");\n $team_id = 0;\n echo '<script>$(\\'button:contains(\"Add\")\\').prop(\"disabled\",true);</script>';\n\n }\n echo $view->partial('teams/partial/resource-template/add', ['team_id' => $team_id]);\n\n }", "function SetupOtherOptions() {\n\t\tglobal $Language, $Security;\n\t\t$options = &$this->OtherOptions;\n\t\t$option = $options[\"addedit\"];\n\n\t\t// Add\n\t\t$item = &$option->Add(\"add\");\n\t\t$item->Body = \"<a class=\\\"ewAddEdit ewAdd\\\" title=\\\"\" . ew_HtmlTitle($Language->Phrase(\"AddLink\")) . \"\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"AddLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode($this->AddUrl) . \"\\\">\" . $Language->Phrase(\"AddLink\") . \"</a>\";\n\t\t$item->Visible = ($this->AddUrl <> \"\" && $Security->CanAdd());\n\t\t$option = $options[\"action\"];\n\n\t\t// Set up options default\n\t\tforeach ($options as &$option) {\n\t\t\t$option->UseImageAndText = TRUE;\n\t\t\t$option->UseDropDownButton = FALSE;\n\t\t\t$option->UseButtonGroup = TRUE;\n\t\t\t$option->ButtonClass = \"btn-sm\"; // Class for button group\n\t\t\t$item = &$option->Add($option->GroupOptionName);\n\t\t\t$item->Body = \"\";\n\t\t\t$item->Visible = FALSE;\n\t\t}\n\t\t$options[\"addedit\"]->DropDownButtonPhrase = $Language->Phrase(\"ButtonAddEdit\");\n\t\t$options[\"detail\"]->DropDownButtonPhrase = $Language->Phrase(\"ButtonDetails\");\n\t\t$options[\"action\"]->DropDownButtonPhrase = $Language->Phrase(\"ButtonActions\");\n\n\t\t// Filter button\n\t\t$item = &$this->FilterOptions->Add(\"savecurrentfilter\");\n\t\t$item->Body = \"<a class=\\\"ewSaveFilter\\\" data-form=\\\"fuserslistsrch\\\" href=\\\"#\\\">\" . $Language->Phrase(\"SaveCurrentFilter\") . \"</a>\";\n\t\t$item->Visible = TRUE;\n\t\t$item = &$this->FilterOptions->Add(\"deletefilter\");\n\t\t$item->Body = \"<a class=\\\"ewDeleteFilter\\\" data-form=\\\"fuserslistsrch\\\" href=\\\"#\\\">\" . $Language->Phrase(\"DeleteFilter\") . \"</a>\";\n\t\t$item->Visible = TRUE;\n\t\t$this->FilterOptions->UseDropDownButton = TRUE;\n\t\t$this->FilterOptions->UseButtonGroup = !$this->FilterOptions->UseDropDownButton;\n\t\t$this->FilterOptions->DropDownButtonPhrase = $Language->Phrase(\"Filters\");\n\n\t\t// Add group option item\n\t\t$item = &$this->FilterOptions->Add($this->FilterOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->Visible = FALSE;\n\t}", "public function add_menu_link() {\n\t\tadd_submenu_page(null, __('Operations', 'wpas_attendeeinfo') , __('Operations', 'wpas_attendeeinfo') , 'manage_operations_emd_contacts', 'operations_emd_contact', array(\n\t\t\t$this,\n\t\t\t'get_operations'\n\t\t));\n\t}", "public function updateAdmin()\r\n\t{\r\n\t\t// Donnees\r\n\t\t$eventId = Bn::getValue('event_id');\r\n\t\t$oEvent = new Oevent($eventId);\r\n\t\t// Controle de l'autorisation\r\n\t\tif ( $oEvent->getVal('ownerid') != Bn::getValue('user_id') && !Oaccount::isLoginAdmin() ) return false;\r\n\r\n\t\t// Donnees du tournoi\r\n\t\t$oEvent->setVal('name', Bn::getValue('nameevent'));\r\n\t\t$oEvent->setVal('date', Bn::getValue('dateevent'));\r\n\t\t$oEvent->setVal('organizer', Bn::getValue('organizer'));\r\n\t\t$oEvent->setVal('place', Bn::getValue('place'));\r\n\t\t$oEvent->setVal('numauto', Bn::getValue('numauto'));\r\n\t\t$oEvent->setVal('firstday', Bn::getValue('firstday'));\r\n\t\t$oEvent->setVal('lastday', Bn::getValue('lastday'));\r\n\t\t$season = Oseason::getSeason(Bn::getValue('firstday'));\r\n\t\t$oEvent->setVal('season', $season);\r\n\t\t$oEvent->save();\t\t\r\n\r\n\t\t$oExtras = new Oeventextra($eventId);\r\n\t\t$oExtras->setVal('regionid', Bn::getValue('regionid'));\r\n\t\t$oExtras->setVal('deptid', Bn::getValue('deptid'));\r\n\t\t$oExtras->save();\r\n\r\n\t\t// Message de fin\r\n\t\t// Preparer les champs de saisie\r\n\t\t$body = new Body();\r\n\t\t$body->addWarning(LOC_LABEL_PREF_REGISTERED);\r\n\t\t$d = $body->addDiv('', 'bn-div-btn');\r\n\t\t$d->addButtonCancel('btnCancel', LOC_BTN_CLOSE);\r\n\r\n\t\t// Envoi au navigateur\r\n\t\t$res = array('content' => $body->toHtml(),\r\n\t\t\t\t\t'title' => LOC_ITEM_GENERAL);\r\n\t\techo Bn::toJson($res);\r\n\t\treturn false;\r\n\t}", "public static function addEventToQueue($event,$action)\n {\n //need to check if the evnet should be added (ie. is it created on a calendar that has google cal support)?\n if (!isset($GLOBALS['com_pbbooking_data']['calendars'][$event->cal_id]->enable_google_cal) || $GLOBALS['com_pbbooking_data']['calendars'][$event->cal_id]->enable_google_cal == 0)\n return true; //doesn't need to be added to the queue\n\n $db = \\JFactory::getDbo();\n $db->insertObject('#__pbbooking_sync',new \\JObject(array(\n 'date_added'=>date_create(\"now\",new \\DateTimeZone(PBBOOKING_TIMEZONE))->format(DATE_ATOM),\n 'action'=>$action,\n 'data'=>json_encode($event)\n )));\n return true;\n }", "function options_form(&$form, &$form_state) {\n $form['link_to_record'] = array(\n '#title' => t('Link this field to the record edit form'),\n '#description' => t(\"Enable to override this field's links.\"),\n '#type' => 'checkbox',\n '#default_value' => !empty($this->options['link_to_record']),\n );\n\n parent::options_form($form, $form_state);\n \n \n }", "static public function addRouteForAdminMenu(sfEvent $event)\n {\n $r = $event->getSubject();\n\n $r->prependRoute('cre8_menu_content', new sfPropel15RouteCollection(array(\n 'name' => 'cre8_menu_content',\n 'model' => 'Cre8MenuContent',\n 'module' => 'cre8MenuAdmin',\n 'prefix_path'\t\t\t => 'menu-content-admin',\n 'with_wildcard_routes' => true,\n 'requirements' => array(),\n )));\n\n }", "public function isSetEventAddress()\n {\n return !is_null($this->_fields['EventAddress']['FieldValue']);\n\n }", "public function admin_add(){\n \n $this->set(\"title_for_layout\",\"Create a Satellite Group\");\n \n // Load all existing satellites\n $this->set('satellites', $this->Satellite->find('all'));\n }", "protected function hideFieldsForAddEdit()\n\t{\n\t\tif ($this->isAdd() || $this->isCopy() || $this->isGridAdd())\n\t\t\t$this->document_sequence->Visible = FALSE;\n\t}", "function eventclass_staff_info()\n\t{\n\t\t$this->events[\"AfterAdd\"]=true;\n\n\n//\tonscreen events\n\n\n\t}", "function SetupOtherOptions() {\n\t\tglobal $Language, $Security;\n\t\t$options = &$this->OtherOptions;\n\t\t$option = &$options[\"action\"];\n\n\t\t// Add\n\t\t$item = &$option->Add(\"add\");\n\t\t$item->Body = \"<a class=\\\"ewAction ewAdd\\\" title=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageAddLink\")) . \"\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageAddLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode($this->AddUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageAddLink\") . \"</a>\";\n\t\t$item->Visible = ($this->AddUrl <> \"\" && $Security->CanAdd());\n\n\t\t// Edit\n\t\t$item = &$option->Add(\"edit\");\n\t\t$item->Body = \"<a class=\\\"ewAction ewEdit\\\" title=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageEditLink\")) . \"\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageEditLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode($this->EditUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageEditLink\") . \"</a>\";\n\t\t$item->Visible = ($this->EditUrl <> \"\" && $Security->CanEdit());\n\n\t\t// Set up action default\n\t\t$option = &$options[\"action\"];\n\t\t$option->DropDownButtonPhrase = $Language->Phrase(\"ButtonActions\");\n\t\t$option->UseImageAndText = TRUE;\n\t\t$option->UseDropDownButton = FALSE;\n\t\t$option->UseButtonGroup = TRUE;\n\t\t$item = &$option->Add($option->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->Visible = FALSE;\n\t}", "public function getAddUrl()\n {\n return $this->getUrl('*/action/add', ['integration_id' => $this->getDataId()]);\n }", "public function getIsMenuLinkEnabled(): bool;", "public function siteSettingsRemoveAutoAssign(Event $event)\n {\n// $event->getTarget()->get('general')->get('o:assign_new_items')->setAttribute('disabled', 'disabled');\n $event->getTarget()->get('general')\n ->get('o:assign_new_items')\n ->setOption('info', 'The Teams Module manages how items become associated with sites, so this has been disabled.');\n\n }", "public function add()\n\t{\n\t\t// Add Sidebar Box\n\t\tEvent::add('ushahidi_action.main_sidebar', array($this, 'county_sidebar'));\n\n\t\t// Only add the events if we are on that controller\n\t\tif (Router::$controller == 'main')\n\t\t{\n\t\t\t// Add County/Constituency/Polling Station Layers\n\t\t\tEvent::add('ushahidi_action.header_scripts', array($this, 'main_js'));\n\t\t}\n\n\t\tif (Router::$controller == 'reports' AND Router::$method == 'edit')\n\t\t{\n\t\t\tEvent::add('ushahidi_action.header_scripts', array($this, 'const_js'));\t\n\t\t}\n\t\t\n\t\tif (stripos(Router::$current_uri, \"admin/reports/download\") !== false)\n\t\t{\n\t\t\tEvent::add('ushahidi_filter.report_download_csv_header', array($this, 'csv_header'));\n\t\t\tEvent::add('ushahidi_filter.report_download_csv_incident', array($this, 'csv_incident'));\n\t\t\tEvent::add('ushahidi_action.reports_download_form_data', array($this, 'reports_download_form_data'));\n\t\t}\n\n\t\tplugin::add_stylesheet('iebc/views/css/iebc');\n\n\t\tEvent::add('ushahidi_action.report_form_admin_location', array($this, 'const_select'));\n\n\t\t// Add Constituency Select Parameters\n\t\tEvent::add('ushahidi_filter.fetch_incidents_set_params', array($this, 'filter'));\t\n\n\t\t// Add Sidebar Box\n\t\tEvent::add('ushahidi_action.main_sidebar', array($this, 'county_sidebar'));\n\t}", "public function setIntended($url);", "public function addAction(string $name, string $url, bool $fetch = false)\n {\n // some logic\n }", "public function addEvent(Event $l)\n\t{\n\t\tif ($this->collEvents === null) {\n\t\t\t$this->initEvents();\n\t\t}\n\t\tif (!$this->collEvents->contains($l)) { // only add it if the **same** object is not already associated\n\t\t\t$this->collEvents[]= $l;\n\t\t\t$l->setVenue($this);\n\t\t}\n\t}", "public function add()\n {\n if (!current_user_can('manage_options')) {\n wp_die($this->translator->get('You do not have sufficient permissions to access this page.', true));\n }\n }", "public function edde_add_admin_page() {\n\t\tif ( function_exists( 'is_plugin_active' ) ) {\n\t\t\tif ( ! is_plugin_active( 'easy-digital-downloads/easy-digital-downloads.php' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tadd_submenu_page( 'edit.php?post_type=download', 'Easy Digital Download Extension', 'ED Download Extension', 'manage_options', 'edde_options', array(\n\t\t\t\t$this,\n\t\t\t\t'edde_admin_page_callback'\n\t\t\t) );\n\t\t}\n\t}", "public function isAddToRelationship();", "public function addAction() {\n $configid = $this->getInput('id');\n $customAnimationEffect = Common::getConfig('deliveryConfig','customAnimationEffect');\n if($configid){\n \t$configInfo = Advertiser_Service_AdAppkeyConfigModel::getConfig($configid);\n \t$this->assign('config', $configInfo);\n }\n \t$this->assign('customAnimationEffect', $customAnimationEffect);\n }" ]
[ "0.53746575", "0.52828264", "0.5167206", "0.51476413", "0.5139269", "0.5098985", "0.5089261", "0.50663704", "0.5061138", "0.5007276", "0.4970189", "0.49401695", "0.4909008", "0.47982687", "0.4776325", "0.47710362", "0.47618818", "0.47618818", "0.4755684", "0.47433564", "0.4735384", "0.47242102", "0.47180343", "0.47165376", "0.4669089", "0.4663377", "0.46579656", "0.4644291", "0.46350637", "0.46195236", "0.46131063", "0.46104535", "0.45969778", "0.45841956", "0.45841956", "0.4580283", "0.45796728", "0.45644215", "0.4558332", "0.45574552", "0.4550871", "0.4545373", "0.45389888", "0.45294508", "0.45263836", "0.4513232", "0.44897747", "0.44845623", "0.44845623", "0.44831076", "0.44712734", "0.44680572", "0.44509715", "0.444497", "0.4444772", "0.4430644", "0.44274467", "0.44274467", "0.441852", "0.44170126", "0.4409921", "0.4394846", "0.43760774", "0.4367283", "0.43629816", "0.43628547", "0.43570012", "0.43559572", "0.43555045", "0.435345", "0.4351167", "0.43493724", "0.43396953", "0.4334131", "0.43311003", "0.4327944", "0.43258876", "0.43235105", "0.43234235", "0.43214667", "0.429999", "0.4296903", "0.42941904", "0.42908016", "0.42897227", "0.42884904", "0.42728975", "0.4257371", "0.42530197", "0.42523775", "0.42503667", "0.42445", "0.42274207", "0.4227213", "0.4226436", "0.42245302", "0.4222914", "0.42222542", "0.42202756", "0.4218091" ]
0.4942969
11
Toggle showing weekday numbers Set whether or not to add the weekday number in addition to the month number for each calendar day cell.
public function setShowWeekDayNum($sw=false) { $this->addWeekDay = $sw; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function build_month_days($month, $number_of_days) {\r\n $days_of_month_html = '<tr class=\"week-day\">';\r\n \r\n $days_in_week = 1;\r\n for ($days = 1; $days <= $number_of_days; $days++) {\r\n\r\n // Split the weeks in rows\r\n if ($days_in_week == 8) {\r\n $days_of_month_html = $days_of_month_html . '</tr>';\r\n $days_of_month_html = $days_of_month_html . '<tr class=\"week-day\">'; \r\n $days_in_week = 1;\r\n }\r\n\r\n // Render days of week in the correct position\r\n if ($days == 1) {\r\n $initial_position = get_first_day($month);\r\n for($i = 1; $i < $initial_position; $i++) {\r\n $days_of_month_html = $days_of_month_html . '<td class=\"day\"></td>';\r\n $days_in_week++;\r\n }\r\n if ($initial_position == 1) {\r\n $days_of_month_html = $days_of_month_html . '<td class=\"day sunday\">'.$days.'</td>';\r\n } else {\r\n $days_of_month_html = $days_of_month_html . '<td class=\"day\">'.$days.'</td>';\r\n }\r\n } else if ($days_in_week == 1) {\r\n $days_of_month_html = $days_of_month_html . '<td class=\"day sunday\">'.$days.'</td>';\r\n } else {\r\n $days_of_month_html = $days_of_month_html . '<td class=\"day\">'.$days.'</td>'; \r\n }\r\n\r\n $days_in_week++;\r\n }\r\n $days_of_month_html = $days_of_month_html . '</tr>';\r\n \r\n return $days_of_month_html;\r\n }", "public function enableNonMonthDays() {\n\t\t$this->displayNonMonthDays = true;\n\t}", "private function _showDay($cellNumber){\n \n if($this->thisDay==0){\n \n $firstDayOfTheWeek = date('N',strtotime($this->thisYear.'-'.$this->thisMonth.'-01'));\n \n if(intval($cellNumber) == intval($firstDayOfTheWeek)){\n \n $this->thisDay=1;\n \n }\n }\n \n if( ($this->thisDay!=0)&&($this->thisDay<=$this->daysInMonth) ){\n \n $this->thisDate = date('Y-m-d',strtotime($this->thisYear.'-'.$this->thisMonth.'-'.($this->thisDay)));\n \n $cellContent = $this->thisDay;\n \n $this->thisDay++; \n \n }else{\n \n $this->thisDate =null;\n \n $cellContent=null;\n }\n \n \n return '<li id=\"li-'.$this->thisDate.'\" class=\"'.($cellNumber%7==1?' start ':($cellNumber%7==0?' end ':' ')).\n ($cellContent==null?'mask':'').'\">'.$cellContent.'</li>';\n }", "function showPostWeekColumn() {\n\t\tif (func_num_args()) {\n\t\t\tswitch ((bool) func_get_arg(0)) {\n\t\t\t\tcase true:\n\t\t\t\t\t$this->_showPostWeekColumn = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$this->_showPostWeekColumn = false;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\telse return (($this->_showPostWeekColumn) ? 1 : 0);\n\t}", "function showPreWeekColumn() {\n\t\tif (func_num_args()) {\n\t\t\tswitch ((bool) func_get_arg(0)) {\n\t\t\t\tcase true:\n\t\t\t\t\t$this->_showPreWeekColumn = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$this->_showPreWeekColumn = false;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\telse return (($this->_showPreWeekColumn) ? 1 : 0);\n\t}", "private function _showDay ($cellNumber)\n {\n if ($this->currentDay == 0)\n {\n $firstDayOfTheWeek = date('N', strtotime( $this->currentYear.'-'.$this->currentMonth.'-01'));\n\n if (intval($cellNumber) == intval($firstDayOfTheWeek)) $this->currentDay = 1;\n }\n\n if (($this->currentDay != 0) && ($this->currentDay <= $this->daysInMonth))\n {\n $this->currentDate = date('Y-m-d', strtotime( $this->currentYear.'-'.$this->currentMonth.'-'.($this->currentDay)));\n $cellContent = $this->currentDay;\n $this->currentDay ++;\n }\n else\n {\n $this->currentDate = null;\n $cellContent = null;\n }\n return $cellContent;\n }", "function mkWeekDays(){\n\tif ($this->startOnSun){\n\t\t$out=\"<tr>\";\n\t\tif ($this->weekNum) $out.=\"<td class=\\\"\".$this->cssWeekNumTitle.\"\\\">\".$this->weekNumTitle.\"</td>\";\n\t\tfor ($x=0;$x<=6;$x++) $out.=\"<td class=\\\"\".$this->cssWeekDay.\"\\\">\".$this->getDayName($x).\"</td>\";\n\t\t$out.=\"</tr>\\n\";\n\t}\n\telse{\n\t\t$out=\"<tr>\";\n\t\tif ($this->weekNum) $out.=\"<td class=\\\"\".$this->cssWeekNumTitle.\"\\\">\".$this->weekNumTitle.\"</td>\";\n\t\tfor ($x=1;$x<=6;$x++) $out.=\"<td class=\\\"\".$this->cssWeekDay.\"\\\">\".$this->getDayName($x).\"</td>\";\n\t\t$out.=\"<td class=\\\"\".$this->cssWeekDay.\"\\\">\".$this->getDayName(0).\"</td>\";\n\t\t$out.=\"</tr>\\n\";\n\t\t$this->firstday=$this->firstday-1;\n\t\tif ($this->firstday<0) $this->firstday=6;\n\t}\nreturn $out;\n}", "private function getWeekDays()\n {\n $time = date('Y-m-d', strtotime($this->year . '-' . $this->month . '-' . $this->day));\n if ($this->view == 'week') {\n $sunday = strtotime('last sunday', strtotime($time . ' +1day'));\n $day = date('j', $sunday);\n $startingDay = date('N', $sunday);\n $cnt = 6;\n }\n if ($this->view == 'day') {\n $day = $this->day;\n $cnt = 0;\n }\n\n $this->week_days = array();\n $mlen = $this->daysMonth[intval($this->month) - 1];\n if ($this->month == 2 && ((($this->year % 4) == 0) && ((($this->year % 100) != 0) || (($this->year % 400) == 0)))) {\n $mlen = $mlen + 1;\n }\n $h = \"<tr class='\" . $this->labelsClass . \"'>\";\n $h .= \"<td>&nbsp;</td>\";\n for ($j = 0; $j <= $cnt; $j++) {\n $cs = $cnt == 0 ? 3 : 1;\n $h .= \"<td colspan='$cs'>\";\n if ($this->view == 'day') {\n $getDayNumber = date('w', strtotime($time));\n } else {\n $getDayNumber = $j;\n }\n if ($day <= $mlen) {\n } else {\n $day = 1;\n }\n $h .= $this->dayLabels[$getDayNumber] . ' ';\n $h .= intval($day);\n $this->week_days[] = $day;\n $day++;\n $h .= \"</td>\";\n }\n\n $h .= \"</tr>\";\n return $h;\n }", "function setFirstWeekDay($daynum){\n\tif ($daynum==0) $this->startOnSun=true;\n\telse $this->startOnSun=false;\n}", "function MakeCalendarGrid(){\n //get our days\n $intMonthDays = cal_days_in_month(CAL_GREGORIAN, $this->intMonth, $this->intYear);\n $intDayCounter = 0;\n $arrMonthAttributes = array('colspan'=>'7');\n //make our parent calendar table\n $objCalendarParent = $this->objCalendar->AddChildNode($this->objCalendar->objHTML,'', 'table');\n //let's make our header\n $objHeaderRow = $this->objCalendar->AddChildNode($objCalendarParent,'', 'tr');\n //establish our base attributes\n for($intWeekDay=0;$intWeekDay<7;$intWeekDay++){\n $strDay = date('l', strtotime(\"Sunday +{$intWeekDay} days\"));\n $this->objCalendar->AddChildNode($objHeaderRow,$strDay, 'th',array('class'=>'weekday'));\n }\n //get the starting date\n $intMonthStart = date('N', strtotime($this->intYear.'-'.$this->intMonth.'-1'));\n $intMonthStart++;\n //avoid empty rows\n if($intMonthStart == 8)\n $intMonthStart = 1;\n //make our days now\n for($intDay=1;$intDay<($intMonthDays + $intMonthStart);$intDay++){\n $arrDateAttributes = array('onclick'=>'SelectDay(this);');\n if($intDayCounter === 0){\n //make our new week\n $objWeekRow = $this->objCalendar->AddChildNode($objCalendarParent,'', 'tr');\n $arrDateAttributes['class'] = 'calendarday weekend';\n }\n else if($intDayCounter === 6)\n $arrDateAttributes['class'] = 'calendarday weekend';\n else if($intDay == date('j'))\n $arrDateAttributes['class'] = 'calendarday today';\n else\n $arrDateAttributes['class'] = 'calendarday weekday';\n $intDayCounter++;\n //reset our week now\n if($intDayCounter == 7)\n $intDayCounter = 0;\n if($intDay < $intMonthStart){\n unset($arrDateAttributes['onclick']);\n $this->objCalendar->AddChildNode($objWeekRow,'&nbsp;', 'td',$arrDateAttributes);\n continue 1;\n }\n $arrDateAttributes['id'] = ($intDay - ($intMonthStart - 1)).'-'.$this->arrCalendarProperties['calendarid'];\n //make our day now\n $this->objCalendar->AddChildNode($objWeekRow,($intDay - ($intMonthStart - 1)), 'td',$arrDateAttributes);\n }\n return TRUE;\n }", "private function makeHTMLIterator()\n\t{\n\t\t$this->weekDayNum = $this->firstDayOfTheMonth+1;\n\t\tfor($this->dayOfMonth; $this->dayOfMonth <= $this->daysInMonth; $this->dayOfMonth++) {\n\t\t\t// Set the default style\n\t\t\t$style = 'class=\"normalDay\"';\n\t\t\t\n\t\t\t// Set the style to a weekend day style\n\t\t\tif(($this->weekDayNum == 8)||($this->weekDayNum == 7)) {\n\t\t\t\t$style = 'class=\"weekendDay\"';\n\t\t\t}\n\t\t\t\n\t\t\t// Set the style to a current day style\n\t\t\tif($this->curDay == $this->dayOfMonth) {\n\t\t\t\t$style = 'class=\"currentDay\"';\n\t\t\t}\n\t\t\t\n\t\t\t// If the current day is Sunday, add a new row\n\t\t\tif($this->weekDayNum == 8) {\n\t\t\t\t$this->calWeekDays .= \"\\t</tr>\\n\\t<tr>\\n\";\n\t\t\t\t$this->weekDayNum = 1;\n\t\t\t}\n\n\t\t\t// Draw days\n\t\t\t$this->calWeekDays .= \"\\t\\t<td valign=\\\"top\\\" \".$style.'>'.$this->dayOfMonth;\n\t\t\t\n\t\t\tif($this->addWeekDay) {\n\t\t\t\t$this->calWeekDays .= \"|\".$this->weekDayNum;\n\t\t\t}\n\t\t\t\n\t\t\tif(strlen($this->addEvtDest) > 0) {\n\t\t\t\t$addevtimg = (strlen($this->addEvtImg) > 0 ? '<img src=\"'.$this->addEvtImg.'\" class=\"addevtimg\" />' : '+');\n\t\t\t\t$this->calWeekDays .= '[<a href=\"'.$this->addEvtDest.'?date='.$this->curYear.'-'.$this->curMonth.'-'.$this->dayOfMonth.'\" title=\"Add Event\" class=\"addevt\">'.$addevtimg.'</a>]';\n\t\t\t}\n\t\t\t\n\t\t\t$this->calWeekDays .= \" \".$this->makeDayEventListHTML().\"</td>\\n\";\n\t\t\t\n\t\t\t$this->weekDayNum++;\n\t\t}\n\t}", "private function setDayNames()\n\t{\n\t $range = range(1,7);\n\t $return = array();\n\t foreach($range AS $key => $dayNum)\n\t {\n\t \t$fmt = datefmt_create ($this->locale, null, null, null, IntlDateFormatter::GREGORIAN, 'eee');\n\t \t$key = strtolower(datefmt_format( $fmt , mktime(12,0,0,4,$dayNum+5,2014))); //we force the date so things start on Sunday\n\t \t\n\t \t$fmt = datefmt_create ($this->locale, null, null, null, IntlDateFormatter::GREGORIAN, 'EEEE');\n\t \t$return[$key] = datefmt_format( $fmt , mktime(12,0,0,4,$dayNum+5,2014));\n\t }\n\n\t return $return;\n\t}", "public function weekdayControl(){\n\t\t$weekday = date('w', time());\n\t\t//remakes $weekday to the weekdays name\n\t\tswitch($weekday){\n\t\t\tcase 0:\t$weekday = \"Söndag\"; break;\n\t\t\tcase 1:\t$weekday = \"Måndag\"; break;\n\t\t\tcase 2:\t$weekday = \"Tisdag\"; break;\t\n\t\t\tcase 3:\t$weekday = \"Onsdag\"; break;\n\t\t\tcase 4:\t$weekday = \"Torsdag\";break;\n\t\t\tcase 5:\t$weekday = \"Fredag\"; break;\n\t\t\tcase 6:\t$weekday = \"Lördag\"; break;\n\t\t}\t\t\t\n\t\t\n\t\treturn $weekday; \n\t}", "public function disableNonMonthDays() {\n\t\t$this->displayNonMonthDays = false;\n\t}", "function mkDays ($numDays, $month, $year) {\n for ($i = 1; $i <= $numDays; $i++) {\n $eachDay[$i] = $i; \n }\n foreach($eachDay as $day => &$wkday) {\n $wkday = date(\"w\", mktime(0,0,0,$month,$day,$year));\n }\n foreach($eachDay as $day=>&$wkday) {\n echo \"<table class='box' id=$day month=$month year=$year>\";\n echo \"<td>\";\n echo $day;\n echo \"</td>\";\n echo \"</table>\";\n }\n }", "public static function week_calendar($day, $month, $year) {\r\n global $langNoEvents, $langDay, $langWeek, $langMonth, $langViewShow;\r\n\r\n $calendar_content = \"\";\r\n if (is_null($day)) {\r\n $day = 1;\r\n }\r\n $nextweekdate = new DateTime(\"$year-$month-$day\");\r\n $nextweekdate->add(new DateInterval('P1W'));\r\n $previousweekdate = new DateTime(\"$year-$month-$day\");\r\n $previousweekdate->sub(new DateInterval('P1W'));\r\n\r\n $thisweekday = new DateTime(\"$year-$month-$day\");\r\n $difffromMonday = ($thisweekday->format('w') == 0)? 6:$thisweekday->format('w')-1;\r\n $monday = $thisweekday->sub(new DateInterval('P'.$difffromMonday.'D')); //Sunday->1, ..., Saturday->7\r\n $weekdescription = ucfirst(format_locale_date($monday->getTimestamp()));\r\n $sunday = $thisweekday->add(new DateInterval('P6D'));\r\n $weekdescription .= ' - '.ucfirst(format_locale_date($sunday->getTimestamp()));\r\n $cursorday = $thisweekday->sub(new DateInterval('P6D'));\r\n\r\n $backward = array('day'=>$previousweekdate->format('d'), 'month'=>$previousweekdate->format('m'), 'year' => $previousweekdate->format('Y'));\r\n $foreward = array('day'=>$nextweekdate->format('d'), 'month'=>$nextweekdate->format('m'), 'year' => $nextweekdate->format('Y'));\r\n\r\n $calendar_content .= '<div class=\"right\" style=\"width:100%\">'.$langViewShow.':&nbsp;'.\r\n '<a href=\"#\" onclick=\"show_day(selectedday, selectedmonth, selectedyear);return false;\">'.$langDay.'</a>&nbsp;|&nbsp;'.\r\n '<a href=\"#\" onclick=\"show_week(selectedday, selectedmonth, selectedyear);return false;\">'.$langWeek.'</a>&nbsp;|&nbsp;'.\r\n '<a href=\"#\" onclick=\"show_month(selectedday, selectedmonth, selectedyear);return false;\">'.$langMonth.'</a></div>';\r\n\r\n $calendar_content .= \"<table class='table-default'>\";\r\n $calendar_content .= \"<tr>\";\r\n $calendar_content .= '<td width=\"25\"><a href=\"#\" onclick=\"show_week('.$backward['day'].','.$backward['month'].','.$backward['year'].'); return false;\">&laquo;</a></td>';\r\n $calendar_content .= \"<td class='center'><b>$weekdescription</b></td>\";\r\n $calendar_content .= '<td width=\"25\" class=\"right\"><a href=\"#\" onclick=\"show_week('.$foreward['day'].','.$foreward['month'].','.$foreward['year'].'); return false;\">&raquo;</a></td>';\r\n $calendar_content .= \"</tr>\";\r\n $calendar_content .= \"</table>\";\r\n $eventlist = Calendar_Events::get_calendar_events(\"week\", \"$year-$month-$day\");\r\n\r\n $calendar_content .= \"<table class='table-default'>\";\r\n\r\n $curday = 0;\r\n $now = getdate();\r\n $today = new DateTime($now['year'].'-'.$now['mon'].'-'.$now['mday']);\r\n $curstartddate = \"\";\r\n foreach ($eventlist as $thisevent) {\r\n if ($curstartddate != $thisevent->startdate) { //event date changed\r\n $thiseventdatetime = new DateTime($thisevent->startdate);\r\n while($cursorday < $thiseventdatetime) {\r\n if ($cursorday == $today)\r\n $class = 'today';\r\n else\r\n $class = 'monthLabel';\r\n $calendar_content .= \"<tr><td colspan='3' class='$class'>\" . \"&nbsp;<b>\" . ucfirst(format_locale_date($cursorday->getTimestamp())) . \"</b></td></tr>\";\r\n $calendar_content .= \"<tr><td colspan='3'>$langNoEvents</td></tr>\";\r\n $cursorday->add(new DateInterval('P1D'));\r\n $curday++;\r\n }\r\n if ($thiseventdatetime == $today)\r\n $class = 'today';\r\n else\r\n $class = 'monthLabel';\r\n $calendar_content .= \"<tr><td colspan='3' class='$class'>\" . \"&nbsp;<b>\" . ucfirst(format_locale_date(strtotime($thisevent->startdate))) . \"</b></td></tr>\";\r\n if ($cursorday <= $thiseventdatetime) {\r\n $cursorday->add(new DateInterval('P1D'));\r\n $curday++;\r\n }\r\n }\r\n $calendar_content .= Calendar_Events::week_calendar_item($thisevent, 'even');\r\n $curstartddate = $thisevent->startdate;\r\n }\r\n /* Fill with empty days*/\r\n for($i=$curday;$i<7;$i++) {\r\n if ($cursorday == $today)\r\n $class = 'today';\r\n else\r\n $class = 'monthLabel';\r\n $calendar_content .= \"<tr><td colspan='3' class='$class'>\" . \"&nbsp;<b>\" . ucfirst(format_locale_date($cursorday->getTimestamp())) . \"</b></td></tr>\";\r\n $calendar_content .= \"<tr><td colspan='3'>$langNoEvents</td></tr>\";\r\n $cursorday->add(new DateInterval('P1D'));\r\n }\r\n $calendar_content .= \"</table>\";\r\n /* Legend */\r\n $calendar_content .= Calendar_Events::calendar_legend();\r\n\r\n return $calendar_content;\r\n }", "private function startMonthSpacers()\n\t{\n\t\tif($this->firstDayOfTheMonth != '0') {\n\t\t\t$this->calWeekDays .= \"\\t\\t<td colspan=\\\"\".$this->firstDayOfTheMonth.\"\\\" class=\\\"spacerDays\\\">&nbsp;</td>\\n\";\n\t\t\t$this->outArray['firstday'] = $this->firstDayOfTheMonth;\n\t\t}\n\t}", "public function bindWeekdays(): void\n {\n if ($this->getFrequencyType() === FrequencyTypeEnum::WEEK) {\n $this->setRepeatIn(\n array_map(\n fn ($weekday) => $weekday instanceof WeekdayEnum\n ? $weekday\n : WeekdayEnum::from($weekday),\n $this->getRepeatIn()\n )\n );\n }\n }", "Public static function displayCalender($array)\n {\n echo \"Sun Mon Tue Wed Thu Fri Sat\\n\";\n for ($i = 0; $i < 6; $i++) \n {\n for ($j = 0; $j < 7; $j++) \n {\n if ($array[$i][$j] == '-' || $array[$i][$j] > 31) \n {\n //replacing with spaces\n echo \" \";\n } \n else \n {\n if ($array[$i][$j] < 10) \n {\n //giving 5 space after single digit\n echo $array[$i][$j] . \" \";\n } \n else \n {\n //giving 4 space after two digit number\n echo $array[$i][$j] . \" \";\n }\n }\n }\n echo \"\\n\";\n }\n }", "private function formatDay($num)\n {\n if ($num == 0) {\n return \"Mon\";\n } else if ($num == 1) {\n return \"Tue\";\n } else if ($num == 2) {\n return \"Wed\";\n } else if ($num == 3) {\n return \"Thu\";\n } else if ($num == 4) {\n return \"Fri\";\n } else if ($num == 5) {\n return \"Sat\";\n } else if ($num == 6) {\n return \"Sun\";\n }\n return $num;\n }", "function calendar_week_mod($num)\n {\n }", "function the_weekday()\n {\n }", "public function get_weekday($weekday_number)\n {\n }", "public function showWeekNumber(): self\n {\n $this->attributes(['showWeekNumber' => true]);\n return $this;\n }", "protected function compileWeeks()\n\t{\n\t\t$intDaysInMonth = date('t', $this->Date->monthBegin);\n\t\t$intFirstDayOffset = date('w', $this->Date->monthBegin) - $this->cal_startDay;\n\n\t\tif ($intFirstDayOffset < 0)\n\t\t{\n\t\t\t$intFirstDayOffset += 7;\n\t\t}\n\n\t\t$intColumnCount = -1;\n\t\t$intNumberOfRows = ceil(($intDaysInMonth + $intFirstDayOffset) / 7);\n\t\t$arrAllEvents = $this->getAllEvents($this->iso_arrEventIDs, $this->cal_calendar, $this->Date->monthBegin, $this->Date->monthEnd);\n\t\t\n\t\t$arrDays = array();\n\n\t\t// Compile days\n\t\tfor ($i=1; $i<=($intNumberOfRows * 7); $i++)\n\t\t{\n\t\t\t$intWeek = floor(++$intColumnCount / 7);\n\t\t\t$intDay = $i - $intFirstDayOffset;\n\t\t\t$intCurrentDay = ($i + $this->cal_startDay) % 7;\n\n\t\t\t$strWeekClass = 'week_' . $intWeek;\n\t\t\t$strWeekClass .= ($intWeek == 0) ? ' first' : '';\n\t\t\t$strWeekClass .= ($intWeek == ($intNumberOfRows - 1)) ? ' last' : '';\n\n\t\t\t$strClass = ($intCurrentDay < 2) ? ' weekend' : '';\n\t\t\t$strClass .= ($i == 1 || $i == 8 || $i == 15 || $i == 22 || $i == 29 || $i == 36) ? ' col_first' : '';\n\t\t\t$strClass .= ($i == 7 || $i == 14 || $i == 21 || $i == 28 || $i == 35 || $i == 42) ? ' col_last' : '';\n\n\t\t\t// Empty cell\n\t\t\tif ($intDay < 1 || $intDay > $intDaysInMonth)\n\t\t\t{\n\t\t\t\t$arrDays[$strWeekClass][$i]['label'] = '&nbsp;';\n\t\t\t\t$arrDays[$strWeekClass][$i]['class'] = 'days empty' . $strClass ;\n\t\t\t\t$arrDays[$strWeekClass][$i]['events'] = array();\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$intKey = date('Ym', $this->Date->tstamp) . ((strlen($intDay) < 2) ? '0' . $intDay : $intDay);\n\t\t\t$strClass .= ($intKey == date('Ymd')) ? ' today' : '';\n\n\t\t\t// Mark the selected day (see #1784)\n\t\t\tif ($intKey == $this->Input->get('day'))\n\t\t\t{\n\t\t\t\t$strClass .= ' selected';\n\t\t\t}\n\n\t\t\t// Inactive days\n\t\t\tif (empty($intKey) || !isset($arrAllEvents[$intKey]))\n\t\t\t{\n\t\t\t\t$arrDays[$strWeekClass][$i]['label'] = $intDay;\n\t\t\t\t$arrDays[$strWeekClass][$i]['class'] = 'days' . $strClass;\n\t\t\t\t$arrDays[$strWeekClass][$i]['events'] = array();\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$arrEvents = array();\n\n\t\t\t// Get all events of a day\n\t\t\tforeach ($arrAllEvents[$intKey] as $v)\n\t\t\t{\n\t\t\t\tforeach ($v as $vv)\n\t\t\t\t{\n\t\t\t\t\t$arrEvents[] = $vv;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$arrDays[$strWeekClass][$i]['label'] = $intDay;\n\t\t\t$arrDays[$strWeekClass][$i]['class'] = 'days active' . $strClass;\n\t\t\t\n\t\t\t$arrDays[$strWeekClass][$i]['href'] = $this->strUrl . ($GLOBALS['TL_CONFIG']['disableAlias'] ? '?id=' . $this->Input->get('id') . '&amp;' : '?') . 'day=' . $intKey;\n\t\t\t\n\t\t\t$arrDays[$strWeekClass][$i]['title'] = sprintf(specialchars($GLOBALS['TL_LANG']['MSC']['cal_events']), count($arrEvents));\n\t\t\t$arrDays[$strWeekClass][$i]['events'] = $arrEvents;\n\t\t}\n\n\t\treturn $arrDays;\n\t}", "function enableWeekNum($title=\"\",$link=false,$javaScript=false){\n// checking before enabling, as week number calulation works only if php version > 4.1.0 [php function: date (\"W\")]\n\tif (is_integer($this->getWeekNum($this->actday))){\n\t\t$this->weekNum=true;\n\t\t$this->weekNumTitle=$title;\n\t\t$this->monthSpan++;\n\t\tif ($link) $this->weekUrl=$link;\n\t\telseif ($javaScript) $this->javaScriptWeek=$javaScript;\n\t}\n}", "function print_calendar($mon,$year)\n\t{\n\t\tglobal $dates, $first_day, $start_day;\n\t\t\t$cellWidth =\"150\";\n\t\t$first_day = mktime(0,0,0,$mon,1,$year);\n\t\t$start_day = date(\"w\",$first_day);\n\t\t$res = getdate($first_day);\n\t\t$month_name = $res[\"month\"];\n\t\t$no_days_in_month = date(\"t\",$first_day);\n\t\t\n\t\t//If month's first day does not start with first Sunday, fill table cell with a space\n\t\tfor ($i = 1; $i <= $start_day;$i++)\n\t\t\t$dates[1][$i] = \" \";\n\n\t\t$row = 1;\n\t\t$col = $start_day+1;\n\t\t$num = 1;\n\t\twhile($num<=31)\n\t\t\t{\n\t\t\t\tif ($num > $no_days_in_month)\n\t\t\t\t\t break;\n\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$dates[$row][$col] = $num;\n\t\t\t\t\t\tif (($col + 1) > 7)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$row++;\n\t\t\t\t\t\t\t\t$col = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$col++;\n\t\t\t\t\t\t$num++;\n\t\t\t\t\t}//if-else\n\t\t\t}//while\n\t\t$mon_num = date(\"n\",$first_day);\n\t\t$temp_yr = $next_yr = $prev_yr = $year;\n\n\t\t$prev = $mon_num - 1;\n\t\t$next = $mon_num + 1;\n\n\t\t//If January is currently displayed, month previous is December of previous year\n\t\tif ($mon_num == 1)\n\t\t\t{\n\t\t\t\t$prev_yr = $year - 1;\n\t\t\t\t$prev = 12;\n\t\t\t}\n \n\t\t//If December is currently displayed, month next is January of next year\n\t\tif ($mon_num == 12)\n\t\t\t{\n\t\t\t\t$next_yr = $year + 1;\n\t\t\t\t$next = 1;\n\t\t\t}\n\n\t\techo \"<DIV ALIGN='center'><TABLE BORDER=1 WIDTH=1600px CELLSPACING=0 BORDERCOLOR='silver'>\";\n\n\t\techo \t\"\\n<TR ALIGN='center'><TD BGCOLOR='white'> \".\n\t\t\t \"<A HREF='index.php?month=$prev&year=$prev_yr' STYLE=\\\"text-decoration: none\\\"><B><<</B></A> </TD>\".\n\t\t\t \"<TD COLSPAN=5 BGCOLOR='#99CCFF'><B>\".date(\"F\",$first_day).\" \".$temp_yr.\"</B></TD>\".\n\t\t\t \"<TD BGCOLOR='white'> \".\n\t\t\t \"<A HREF='index.php?month=$next&year=$next_yr' STYLE=\\\"text-decoration: none\\\"><B>>></B></A> </TD></TR>\";\n\n\t\techo \"\\n<TR ALIGN='center'><TD width='$cellWidth'><B>Domenica</B></TD><TD width='$cellWidth'><B>Lunedi</B></TD><TD width='$cellWidth'><B>Martedi</B></TD>\";\n\t\techo \"<TD width='$cellWidth'><B>Mercoledi</B></TD><TD width='$cellWidth'><B>Giovedi</B></TD><TD width='$cellWidth'><B>Venerdi</B></TD><TD width='$cellWidth'><B>Sabato</B></TD></TR>\";\n\t\techo \"<TR><TD COLSPAN=7> </TR><TR height='100px;' ALIGN='center'>\";\n\t\t\t\t\n\t\t$end = ($start_day > 4)? 6:5;\n\t\tfor ($row=1;$row<=$end;$row++)\n\t\t\t{\n\t\t\t\tfor ($col=1;$col<=7;$col++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($dates[$row][$col] == \"\")\n\t\t\t\t\t\t$dates[$row][$col] = \" \";\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!strcmp($dates[$row][$col],\" \"))\n\t\t\t\t\t\t\t$count++;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$t = $dates[$row][$col];\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t//If date is today, highlight it\n\t\t\t\t\t\tif (($t == date(\"j\")) && ($mon == date(\"n\")) && ($year == date(\"Y\"))){\n\t\t\t\t\t\t\techo \"\\n<TD valign='top' BGCOLOR='aqua'><a onclick=\\\"NewWindow(this.href,'pg_center','780','670','no');return false;\\\" href='calendar_add_event.php?azione=add&gg=$t&mm=$mon&yyyy=$year'>\".$t.\"</a>\";\n echo '<div align=\"left\">';\n echo stampa_appuntamenti($t,$mon,$year,$_SESSION['id_utente']);\n echo '</div>';\n echo \"</TD>\";\n }\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t//If the date is absent ie after 31, print space\n\t\t\t\t\t\t\techo \"\\n<TD valign='top'>\".(($t == \" \" )? \"&nbsp;\" : \"<a onclick=\\\"NewWindow(this.href,'pg_center','780','670','no');return false;\\\" href='calendar_add_event.php?azione=add&gg=$t&mm=$mon&yyyy=$year'>\".$t.\"</a>\");\n echo '<div align=\"left\">';\n echo stampa_appuntamenti($t,$mon,$year,$_SESSION['id_utente']);\n echo '</div>';\n echo \"</TD>\";\n\t\t\t\t\t }\n }// for -col\n\t\t\t\t\n\t\t\t\tif (($row + 1) != ($end+1))\n\t\t\t\t\techo \"</TR>\\n<TR ALIGN='center' height='100px;'>\";\n\t\t\t\telse\n\t\t\t\t\techo \"</TR>\";\n\t\t\t}// for - row\n\t\techo \"\\n</TABLE><BR><BR><A HREF=\\\"index.php\\\">Visualizza mese corrente</A> </DIV>\";\n\t}", "public function weekdays()\n {\n return $this->spliceIntoPosition(5, '1-5');\n }", "function mkMonthBody($showNoMonthDays=0){\n\tif ($this->actmonth==1){\n\t\t$pMonth=12;\n\t\t$pYear=$this->actyear-1;\n\t}\n\telse{\n\t\t$pMonth=$this->actmonth-1;\n\t\t$pYear=$this->actyear;\n\t}\n$out=\"<tr>\";\n$cor=0;\n\tif ($this->startOnSun) $cor=1;\n\tif ($this->weekNum) $out.=\"<td class=\\\"\".$this->cssWeekNum.\"\\\">\".$this->mkWeekNum(1+$cor).\"</td>\";\n$monthday=0;\n$nmonthday=1;\n\tfor ($x=0; $x<=6; $x++){\n\t\tif ($x>=$this->firstday){\n\t\t$monthday++;\n\t\t$out.=$this->mkDay($monthday);\n\t\t}\n\t\telse{\n\t\t\tif ($showNoMonthDays==0) $out.=\"<td class=\\\"\".$this->cssNoMonthDay.\"\\\"></td>\";\n\t\t\telse $out.=\"<td class=\\\"\".$this->cssNoMonthDay.\"\\\">\".($this->getMonthDays($pMonth,$pYear)-($this->firstday-1)+$x).\"</td>\";\n\t\t}\n\t}\n$out.=\"</tr>\\n\";\n$goon=$monthday+1;\n$stop=0;\n\tfor ($x=0; $x<=6; $x++){\n\t\tif ($goon>$this->maxdays) break;\n\t\tif ($stop==1) break;\n\t\t$out.=\"<tr>\";\n\t\tif ($this->weekNum) $out.=\"<td class=\\\"\".$this->cssWeekNum.\"\\\">\".$this->mkWeekNum($goon+$cor).\"</td>\";\n\t\t\tfor ($i=$goon; $i<=$goon+6; $i++){\n\t\t\t\tif ($i>$this->maxdays){\n\t\t\t\t\tif ($showNoMonthDays==0) $out.=\"<td class=\\\"\".$this->cssNoMonthDay.\"\\\"></td>\";\n\t\t\t\t\telse $out.=\"<td class=\\\"\".$this->cssNoMonthDay.\"\\\">\".$nmonthday++.\"</td>\";\n\t\t\t\t\t$stop=1;\n\t\t\t\t}\n\t\t\t\telse $out.=$this->mkDay($i);\n\t\t\t}\n\t\t$goon=$goon+7;\n\t\t$out.=\"</tr>\\n\";\n\t}\n$this->selectedday=\"-2\";\nreturn $out;\n}", "function showMonth($showNoMonthDays=false){\n$this->showNoMonthDays=$showNoMonthDays;\n$out=$this->mkMonthHead(); // this should remain first: opens table tag\n$out.=$this->mkMonthTitle(); // tr tag: month title and navigation\n$out.=$this->mkDatePicker(); // tr tag: month date picker (month and year selection)\n$out.=$this->mkWeekDays(); // tr tag: the weekday names\n\tif ($this->showNoMonthDays==false) $out.=$this->mkMonthBody(); // tr tags: the days of the month\n\telse $out.=$this->mkMonthBody(1); // tr tags: the days of the month\n$out.=$this->mkMonthFoot(); // this should remain last: closes table tag\nreturn $out;\n}", "function emptyDays ($empty, $numDays, $month, $year) {\n for ($i = 1; $i <= $numDays; $i++) {\n $eachDay[$i] = $i; \n }\n foreach($eachDay as $day => &$wkday) {\n $wkday = date(\"w\", mktime(0,0,0,$month,$day,$year));\n }\n if ($eachDay[1] == 1) {\n echo $empty;\n } elseif ($eachDay[1] == 2) {\n echo $empty;\n echo $empty;\n } elseif ($eachDay[1] == 3) {\n echo $empty;\n echo $empty;\n echo $empty;\n } elseif ($eachDay[1] == 4) {\n echo $empty;\n echo $empty;\n echo $empty;\n echo $empty;\n } elseif ($eachDay[1] == 5) {\n echo $empty;\n echo $empty;\n echo $empty;\n echo $empty;\n echo $empty;\n } elseif ($eachDay[1] == 6) {\n echo $empty;\n echo $empty;\n echo $empty;\n echo $empty;\n echo $empty;\n echo $empty;\n } else { \n }\n }", "public function showWeek($showWeek, $firstDay = 0) {\n \n if($showWeek) {\n $this->_config_mapper(Array('showWeek' => 'true')); \n } else {\n $this->_config_mapper(Array('showWeek' => 'false')); \n }\n \n $this->_config_mapper(Array('firstDay' => $firstDay));\n }", "private static function printWeeks($startDate, $endDate, $formNum, $id)\r\n {\r\n $newDate = self::splitDates($startDate,$endDate);//retrive array of monday dates\r\n $divs =\"\";\r\n $numDates = count($newDate);\r\n if($numDates===0){//no future mondays meaning end date and start date only range of values\r\n $futuredate= new DateTime($startDate);\r\n $startDate= $futuredate->format(\"Y-m-d\");\r\n $displayStart = $futuredate->format(\"M d,Y\");//format date for route get hive\r\n $futuredate= new DateTime($endDate);\r\n $displayEnd= $futuredate->format(\"M d,Y\");\r\n $divs = \"<li class='list-group-item'><a href='viewform?form=\".$formNum. \"&weekStart=\".$startDate.\"&weekEnd=\".\r\n $futuredate->format(\"Y-m-d\").\"&id=\".$id.\"'>\". $displayStart.\r\n \" - \". $displayEnd.\"</a></li>\" . $divs;\r\n } else{//multiple weeks\r\n\r\n //display start day to saturday\r\n $futuredate= new DateTime($startDate);\r\n $startDate = new DateTime($startDate);\r\n $startDate= $startDate->format(\"Y-m-d\");\r\n if($futuredate->format('N')!=1)// if start date does not fall on a monday create first div\r\n {\r\n $displayStart = $futuredate->format(\"M d,Y\");//format date for route get hive\r\n $futuredate= $futuredate->modify('next sunday');\r\n $displayEnd= $futuredate->format(\"M d,Y\");\r\n $divs = \"<li class='list-group-item'><a href='viewform?form=\".$formNum. \"&weekStart=\".$startDate.\"&weekEnd=\".\r\n $futuredate->format(\"Y-m-d\").\"&id=\".$id.\"'>\". $displayStart.\r\n \" - \". $displayEnd.\"</a></li>\" . $divs;\r\n }\r\n //display all but last week\r\n for($i=0; $i<count($newDate)-1; $i++)\r\n {\r\n $futuredate = new DateTime($newDate[$i]);//convert date time object to be converted to next saturday\r\n $displayStart = $futuredate->format(\"M d,Y\");//format date for route get hive\r\n $futuredate->modify('next sunday');//grab saturday of the weeks monday date provided\r\n $futuredate->format(\"Y-m-d\");//format for route get hive\r\n\r\n $displayEnd =$futuredate->format(\"M d,Y\");//format for html example (October 31, 2018)\r\n //put together href utilizing all the information provided\r\n $divs = \"<li class='list-group-item'><a href='viewform?form=\".$formNum. \"&weekStart=\".$newDate[$i].\"&weekEnd=\".\r\n $futuredate->format(\"Y-m-d\").\"&id=\".$id.\"'>\". $displayStart.\r\n \" - \". $displayEnd.\"</a></li>\" . $divs;\r\n }\r\n\r\n //print last week making end date forms end date\r\n $futuredate = new DateTime($newDate[count($newDate)-1]);//convert date time object to be converted to next saturday\r\n $displayStart = $futuredate->format(\"M d,Y\");//format date for route get hive\r\n $futuredate= new DateTime($endDate);//grab saturday of the weeks monday date provided\r\n\r\n $futuredate->format(\"Y-m-d\");//format for route get hive\r\n\r\n $displayEnd =$futuredate->format(\"M d,Y\");//format for html example (October 31, 2018)\r\n //put together href utilizing all the information provided\r\n $divs = \"<li class='list-group-item'><a href='viewform?form=\".$formNum. \"&weekStart=\".$newDate[count($newDate)-1].\"&weekEnd=\".\r\n $futuredate->format(\"Y-m-d\").\"&id=\".$id.\"'>\". $displayStart.\r\n \" - \". $displayEnd.\"</a></li>\" . $divs;\r\n\r\n }\r\n return $divs;\r\n }", "public function daysOfWeek() {\n return array(\n 0 => 'sunday',\n 1 => 'monday',\n 2 => 'tuesday',\n 3 => 'wednesday',\n 4 => 'thursday',\n 5 => 'friday',\n 6 => 'saturday');\n }", "function spanien_office_hours_formatter_default($vars) {\n $output = '';\n $counter = 0;\n $items = array();\n $first = variable_get('date_first_day', 0); \n $field = field_info_field($vars['field']['field_name']);\n $element = $vars['element'];\n $weekdays = array(0 => t('Sunday'), 1 => t('Monday'), 2 => t('Tuesday'), 3 => t('Wednesday'), 4 => t('Thursday'), 5 => t('Friday'), 6 => t('Saturday') );\n\n foreach (element_children($element) as $key => $arraykey) {\n $item = $element[$arraykey];\n $day = (int)($item['day'] / 2); // Keys are 0+1 for sunday, 2+3 for monday, etc. Each day may have normal hours + extra hours.\n if (isset($day)) {\n $strhrs = _office_hours_mil_to_tf(check_plain($item['starthours'])); \n $endhrs = _office_hours_mil_to_tf(check_plain($item['endhours']));\n if ($field['settings']['hoursformat']) {\n $strhrs = _office_hours_convert_to_ampm($strhrs);\n $endhrs = _office_hours_convert_to_ampm($endhrs);\n }\n $items[$day][] = array('strhrs' => $strhrs, 'endhrs' => $endhrs) ; //we're aggregating hours for days together.\n } \n }\n\n // add the closed days again, to 1) sort by first_day_of_week and 2) toggle show on/off\n foreach ($weekdays as $key => $day) {\n if (!array_key_exists($key, $items)) {\n $items[$key][]= array('closed' => 'closed'); //silly, but we need this as an array because we can't use a string offset later\n }\n }\n ksort($items);\n $items = date_week_days_ordered($items);\n $weekdays = date_week_days_ordered($weekdays);\n\n foreach ($items as $day => $hours) {\n $counter++;\n $dayname = $weekdays[$day];\n $closed = '';\n $regular = '';\n $additional = '';\n if ( isset($hours[0]['closed']) ) {\n if ( !empty($field['settings']['showclosed']) ) { // don't output unnecessary fields\n $closed = '<span class=\"oh-display-hours\">' . t('Closed') . '</span>'; \n }\n }\n else {\n $strhrs1 = $hours[0]['strhrs'];\n $endhrs1 = $hours[0]['endhrs'];\n $regular = '<span class=\"oh-display-hours\">' . $strhrs1 . ' - ' . $endhrs1 . '</span>';\n if (isset($hours[1])) {\n $strhrs2 = $hours[1]['strhrs'];\n $endhrs2 = $hours[1]['endhrs'];\n $additional = '<span class=\"oh-display-sep\">' . t('and') . '</span><span class=\"oh-display-hours\">' . $strhrs2 . ' - ' . $endhrs2 . '</span>';\n } \n }\n\n $output_line = $closed . $regular . $additional ;\n $odd_even = 'odd';\n if ($counter % 2 == 0) {\n $odd_even = 'even';\n }\n if (!empty($output_line)) {\n $output .= '<div class=\"oh-display ' . $odd_even . '\"><span class=\"oh-display-day\">' . $dayname . ':</span> ' . $output_line . '</div>'; \n }\n }\n \n return $output;\n}", "public function buildCalendar(){\n\n\t\t$first_day = $this->getFirstDay();\t\t\t\t\t\t//Determine what day of the week the month starts on\n\t\t$current_number_of_days = $this->getNumberOfDays();\t\t//Determine the number of days in the month\n\n\t\t$number_of_previous_days = $first_day;\t\t\t\t\t\t\t\t\t\t//Determine the number of days needed to complete the first week\n\t\t$prev_month_number_of_days = $this->getNumberOfDays($this->getMonth()-1); \t//Determine the number of days in the previous month\n\t\t\n\t\t$_SESSION['month'] = $this->getMonth();\n\t\t$_SESSION['year'] = $this->getYear();\n\t\t$_SESSION['view'] = 'calendar';\n\n\t\tob_start();?>\n <table border=\"0\" id=\"events_calendar\">\n <?php echo $this->buildCalendarHead() ?>\n <tr id=\"events_calendar_weekdays\">\n <th>\n\t\t\t\t\t<div class=\"full_week_name\">Sunday</div>\n\t\t\t\t\t<div class=\"short_week_name\">Sun</div>\n\t\t\t\t\t<div class=\"abrev_week_name\">S</div>\n </th>\n <th>\n\t\t\t\t\t<div class=\"full_week_name\">Monday</div>\n\t\t\t\t\t<div class=\"short_week_name\">Mon</div>\n\t\t\t\t\t<div class=\"abrev_week_name\">M</div>\n </th>\n <th>\n\t\t\t\t\t<div class=\"full_week_name\">Tuesday</div>\n\t\t\t\t\t<div class=\"short_week_name\">Tue</div>\n\t\t\t\t\t<div class=\"abrev_week_name\">T</div>\n </th>\n <th>\n\t\t\t\t\t<div class=\"full_week_name\">Wednesday</div>\n\t\t\t\t\t<div class=\"short_week_name\">Wed</div>\n\t\t\t\t\t<div class=\"abrev_week_name\">W</div>\n </th>\n <th>\n\t\t\t\t\t<div class=\"full_week_name\">Thursday</div>\n\t\t\t\t\t<div class=\"short_week_name\">Thu</div>\n\t\t\t\t\t<div class=\"abrev_week_name\">T</div>\n </th>\n <th>\n\t\t\t\t\t<div class=\"full_week_name\">Friday</div>\n\t\t\t\t\t<div class=\"short_week_name\">Fri</div>\n\t\t\t\t\t<div class=\"abrev_week_name\">F</div>\n </th>\n <th>\n\t\t\t\t\t<div class=\"full_week_name\">Saturday</div>\n\t\t\t\t\t<div class=\"short_week_name\">Sat</div>\n\t\t\t\t\t<div class=\"abrev_week_name\">S</div>\n </th>\n </tr>\n <?php\n $dayCounter = 0;\t\t\t\t\t\t\t\t\t\t\t//Keeps count of the days in a week\n\n /*** PREVIOUS MONTH CELLS ***/\n for($day = $number_of_previous_days; $day >= 1; $day--){\t//For each day in the previous month needed for a full week\n $dayNumber = $prev_month_number_of_days - ($day-1);\t\t\n \n //Get full date (YYYY-MM-DD)\n $year = ($this->getPrevMonth() == 12)? ($this->getYear()-1): $this->getYear();\n $full_date = $year . '-' . $this->getPrevMonth() . '-' . $dayNumber;\n \n $dayCounter ++;\n if($dayCounter == 1){\t\t\t\t\t//Start new row\n echo '<tr>';\n }\n \n echo $this->buildCalendarCell($full_date, $dayNumber, 'prev_month');\t//Create Calendar Cell\n\n if($dayCounter == 7){\t\t\t\t\t//End new row\n echo '</tr>';\n $dayCounter = 0;\n }\n }\n\n /*** CURRENT MONTH CELLS ***/\n for($day = 1; $day <= $current_number_of_days; $day++){\t\t//For each day in the current month\n $full_date = $this->getYear() . '-' . $this->getMonth() . '-' . $day;\n $dayCounter ++;\n if($dayCounter == 1){\t\t\t\t\t//Start new row\n echo '<tr>';\n }\n\n echo $this->buildCalendarCell($full_date, $day, 'current_month');\t//Create Calendar Cell\n\n if($dayCounter == 7){\t\t\t\t\t//End new row\n echo '</tr>';\n $dayCounter = 0;\n }\n }\n\n /*** NEXT MONTH CELLS ***/\n for($day = 1; $day <= $dayCounter; $day++){\t//For each day in the current month\n //Get full date (YYYY-MM-DD)\n $year = ($this->getNextMonth() == 1)? ($this->getYear()+1): $this->getYear();\n $full_date = $year . '-' . $this->getNextMonth() . '-' . $day;\n \n $dayCounter ++;\n if($dayCounter == 1){\t\t\t\t\t//Start new row\n echo '<tr>';\n }\n\n echo $this->buildCalendarCell($full_date, $day, 'next_month');\t//Create Calendar Cell\n\n if($dayCounter == 7){\t\t\t\t\t//End new row\n echo '</tr>';\n $dayCounter = 0;\n }\n }\n ?>\n </table>\n <style>\n\t\t\t<?php \n\t\t\tforeach($this->getCategories() as $c){?>\n\t\t\t#events_calendar .event.category_<?php echo $c->getId(); ?>:before{color: <?php echo $c->getColor(); ?> !important;}\n\t\t\t<?php } ?>\n\t\t</style>\n <?php\n\t\treturn ob_get_clean();\n\t}", "function weekviewHeader()\n {\n }", "function getDayOfWeek()\r\n {\r\n return Data_Calc::diaDaSemana($this->dia, $this->mes, $this->ano);\r\n }", "function init() {\n\t\t// The Weekdays\n\t\t$this->weekday[0] = /* //translators: weekday */ yourls__( 'Sunday' );\n\t\t$this->weekday[1] = /* //translators: weekday */ yourls__( 'Monday' );\n\t\t$this->weekday[2] = /* //translators: weekday */ yourls__( 'Tuesday' );\n\t\t$this->weekday[3] = /* //translators: weekday */ yourls__( 'Wednesday' );\n\t\t$this->weekday[4] = /* //translators: weekday */ yourls__( 'Thursday' );\n\t\t$this->weekday[5] = /* //translators: weekday */ yourls__( 'Friday' );\n\t\t$this->weekday[6] = /* //translators: weekday */ yourls__( 'Saturday' );\n\n\t\t// The first letter of each day. The _%day%_initial suffix is a hack to make\n\t\t// sure the day initials are unique.\n\t\t$this->weekday_initial[yourls__( 'Sunday' )] = /* //translators: one-letter abbreviation of the weekday */ yourls__( 'S_Sunday_initial' );\n\t\t$this->weekday_initial[yourls__( 'Monday' )] = /* //translators: one-letter abbreviation of the weekday */ yourls__( 'M_Monday_initial' );\n\t\t$this->weekday_initial[yourls__( 'Tuesday' )] = /* //translators: one-letter abbreviation of the weekday */ yourls__( 'T_Tuesday_initial' );\n\t\t$this->weekday_initial[yourls__( 'Wednesday' )] = /* //translators: one-letter abbreviation of the weekday */ yourls__( 'W_Wednesday_initial' );\n\t\t$this->weekday_initial[yourls__( 'Thursday' )] = /* //translators: one-letter abbreviation of the weekday */ yourls__( 'T_Thursday_initial' );\n\t\t$this->weekday_initial[yourls__( 'Friday' )] = /* //translators: one-letter abbreviation of the weekday */ yourls__( 'F_Friday_initial' );\n\t\t$this->weekday_initial[yourls__( 'Saturday' )] = /* //translators: one-letter abbreviation of the weekday */ yourls__( 'S_Saturday_initial' );\n\n\t\tforeach ($this->weekday_initial as $weekday_ => $weekday_initial_) {\n\t\t\t$this->weekday_initial[$weekday_] = preg_replace('/_.+_initial$/', '', $weekday_initial_);\n\t\t}\n\n\t\t// Abbreviations for each day.\n\t\t$this->weekday_abbrev[ yourls__( 'Sunday' ) ] = /* //translators: three-letter abbreviation of the weekday */ yourls__( 'Sun' );\n\t\t$this->weekday_abbrev[ yourls__( 'Monday' ) ] = /* //translators: three-letter abbreviation of the weekday */ yourls__( 'Mon' );\n\t\t$this->weekday_abbrev[ yourls__( 'Tuesday' ) ] = /* //translators: three-letter abbreviation of the weekday */ yourls__( 'Tue' );\n\t\t$this->weekday_abbrev[ yourls__( 'Wednesday' ) ] = /* //translators: three-letter abbreviation of the weekday */ yourls__( 'Wed' );\n\t\t$this->weekday_abbrev[ yourls__( 'Thursday' ) ] = /* //translators: three-letter abbreviation of the weekday */ yourls__( 'Thu' );\n\t\t$this->weekday_abbrev[ yourls__( 'Friday' ) ] = /* //translators: three-letter abbreviation of the weekday */ yourls__( 'Fri' );\n\t\t$this->weekday_abbrev[ yourls__( 'Saturday' ) ] = /* //translators: three-letter abbreviation of the weekday */ yourls__( 'Sat' );\n\n\t\t// The Months\n\t\t$this->month['01'] = /* //translators: month name */ yourls__( 'January' );\n\t\t$this->month['02'] = /* //translators: month name */ yourls__( 'February' );\n\t\t$this->month['03'] = /* //translators: month name */ yourls__( 'March' );\n\t\t$this->month['04'] = /* //translators: month name */ yourls__( 'April' );\n\t\t$this->month['05'] = /* //translators: month name */ yourls__( 'May' );\n\t\t$this->month['06'] = /* //translators: month name */ yourls__( 'June' );\n\t\t$this->month['07'] = /* //translators: month name */ yourls__( 'July' );\n\t\t$this->month['08'] = /* //translators: month name */ yourls__( 'August' );\n\t\t$this->month['09'] = /* //translators: month name */ yourls__( 'September' );\n\t\t$this->month['10'] = /* //translators: month name */ yourls__( 'October' );\n\t\t$this->month['11'] = /* //translators: month name */ yourls__( 'November' );\n\t\t$this->month['12'] = /* //translators: month name */ yourls__( 'December' );\n\n\t\t// Abbreviations for each month. Uses the same hack as above to get around the\n\t\t// 'May' duplication.\n\t\t$this->month_abbrev[ yourls__( 'January' ) ] = /* //translators: three-letter abbreviation of the month */ yourls__( 'Jan_January_abbreviation' );\n\t\t$this->month_abbrev[ yourls__( 'February' ) ] = /* //translators: three-letter abbreviation of the month */ yourls__( 'Feb_February_abbreviation' );\n\t\t$this->month_abbrev[ yourls__( 'March' ) ] = /* //translators: three-letter abbreviation of the month */ yourls__( 'Mar_March_abbreviation' );\n\t\t$this->month_abbrev[ yourls__( 'April' ) ] = /* //translators: three-letter abbreviation of the month */ yourls__( 'Apr_April_abbreviation' );\n\t\t$this->month_abbrev[ yourls__( 'May' ) ] = /* //translators: three-letter abbreviation of the month */ yourls__( 'May_May_abbreviation' );\n\t\t$this->month_abbrev[ yourls__( 'June' ) ] = /* //translators: three-letter abbreviation of the month */ yourls__( 'Jun_June_abbreviation' );\n\t\t$this->month_abbrev[ yourls__( 'July' ) ] = /* //translators: three-letter abbreviation of the month */ yourls__( 'Jul_July_abbreviation' );\n\t\t$this->month_abbrev[ yourls__( 'August' ) ] = /* //translators: three-letter abbreviation of the month */ yourls__( 'Aug_August_abbreviation' );\n\t\t$this->month_abbrev[ yourls__( 'September' ) ] = /* //translators: three-letter abbreviation of the month */ yourls__( 'Sep_September_abbreviation' );\n\t\t$this->month_abbrev[ yourls__( 'October' ) ] = /* //translators: three-letter abbreviation of the month */ yourls__( 'Oct_October_abbreviation' );\n\t\t$this->month_abbrev[ yourls__( 'November' ) ] = /* //translators: three-letter abbreviation of the month */ yourls__( 'Nov_November_abbreviation' );\n\t\t$this->month_abbrev[ yourls__( 'December' ) ] = /* //translators: three-letter abbreviation of the month */ yourls__( 'Dec_December_abbreviation' );\n\n\t\tforeach ($this->month_abbrev as $month_ => $month_abbrev_) {\n\t\t\t$this->month_abbrev[$month_] = preg_replace('/_.+_abbreviation$/', '', $month_abbrev_);\n\t\t}\n\n\t\t// The Meridiems\n\t\t$this->meridiem['am'] = yourls__( 'am' );\n\t\t$this->meridiem['pm'] = yourls__( 'pm' );\n\t\t$this->meridiem['AM'] = yourls__( 'AM' );\n\t\t$this->meridiem['PM'] = yourls__( 'PM' );\n\n\t\t// Numbers formatting\n\t\t// See http://php.net/number_format\n\n\t\t/* //translators: $thousands_sep argument for http://php.net/number_format, default is , */\n\t\t$trans = yourls__( 'number_format_thousands_sep' );\n\t\t$this->number_format['thousands_sep'] = ('number_format_thousands_sep' == $trans) ? ',' : $trans;\n\n\t\t/* //translators: $dec_point argument for http://php.net/number_format, default is . */\n\t\t$trans = yourls__( 'number_format_decimal_point' );\n\t\t$this->number_format['decimal_point'] = ('number_format_decimal_point' == $trans) ? '.' : $trans;\n\n\t\t// Set text direction.\n\t\tif ( isset( $GLOBALS['text_direction'] ) )\n\t\t\t$this->text_direction = $GLOBALS['text_direction'];\n\t\t/* //translators: 'rtl' or 'ltr'. This sets the text direction for YOURLS. */\n\t\telseif ( 'rtl' == yourls_x( 'ltr', 'text direction' ) )\n\t\t\t$this->text_direction = 'rtl';\n\t}", "public function getDaysOfWeeks()\n {\n return $this->daysOfWeeks;\n }", "function _getDayName( $daynb, $colored = false ){\n\n\t\t$i = $daynb % 7; // modulo 7\n\t\tif( $i == '0' && $colored === true){\n\t\t\t$dayname = '<span class=\"sunday\">' . $this->getDayName($i) . '</span>';\n\t\t}\n\t\telse if( $i == '6' && $colored === true){\n\t\t\t$dayname = '<span class=\"saturday\">' . $this->getDayName($i) . '</span>';\n\t\t}\n\t\telse {\n\t\t\t$dayname = $this->getDayName($i);\n\t\t}\n\t\treturn $dayname;\n\t}", "public static function month_calendar($day, $month, $year) {\r\n global $langDay_of_weekNames, $langMonthNames, $langToday, $langDay, $langWeek, $langMonth, $langViewShow;\r\n\r\n $calendar_content = \"\";\r\n //Handle leap year\r\n $numberofdays = array(0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);\r\n if (($year % 400 == 0) or ($year % 4 == 0 and $year % 100 <> 0)) {\r\n $numberofdays[2] = 29;\r\n }\r\n\r\n $eventlist = Calendar_Events::get_calendar_events(\"month\", \"$year-$month-$day\");\r\n\r\n $events = array();\r\n if ($eventlist) {\r\n foreach ($eventlist as $event) {\r\n $eventday = new DateTime($event->startdate);\r\n $eventday = $eventday->format('j');\r\n if (!array_key_exists($eventday,$events)) {\r\n $events[$eventday] = array();\r\n }\r\n array_push($events[$eventday], $event);\r\n }\r\n }\r\n\r\n //Get the first day of the month\r\n $dayone = getdate(mktime(0, 0, 0, $month, 1, $year));\r\n //Start the week on monday\r\n $startdayofweek = $dayone['wday'] <> 0 ? ($dayone['wday'] - 1) : 6;\r\n\r\n $backward = array('month'=>$month == 1 ? 12 : $month - 1, 'year' => $month == 1 ? $year - 1 : $year);\r\n $foreward = array('month'=>$month == 12 ? 1 : $month + 1, 'year' => $month == 12 ? $year + 1 : $year);\r\n\r\n $calendar_content .= '<div class=\"right\" style=\"width:100%\">'.$langViewShow.':&nbsp;'.\r\n '<a href=\"#\" onclick=\"show_day(selectedday, selectedmonth, selectedyear);return false;\">'.$langDay.'</a>&nbsp;|&nbsp;'.\r\n '<a href=\"#\" onclick=\"show_week(selectedday, selectedmonth, selectedyear);return false;\">'.$langWeek.'</a>&nbsp;|&nbsp;'.\r\n '<a href=\"#\" onclick=\"show_month(selectedday, selectedmonth, selectedyear);return false;\">'.$langMonth.'</a></div>';\r\n\r\n $calendar_content .= '<table width=100% class=\"title1\">';\r\n $calendar_content .= \"<tr>\";\r\n $calendar_content .= '<td width=\"250\"><a href=\"#\" onclick=\"show_month(1,'.$backward['month'].','.$backward['year'].'); return false;\">&laquo;</a></td>';\r\n $calendar_content .= \"<td class='center'><b>{$langMonthNames['long'][$month-1]} $year</b></td>\";\r\n $calendar_content .= '<td width=\"250\" class=\"right\"><a href=\"#\" onclick=\"show_month(1,'.$foreward['month'].','.$foreward['year'].'); return false;\">&raquo;</a></td>';\r\n $calendar_content .= \"</tr>\";\r\n $calendar_content .= \"</table><br />\";\r\n $calendar_content .= \"<table class='table-default'><tr class='list-header'>\";\r\n for ($ii = 1; $ii < 8; $ii++) {\r\n $calendar_content .= \"<th class='text-center'>\" . $langDay_of_weekNames['long'][$ii % 7] . \"</th>\";\r\n }\r\n $calendar_content .= \"</tr>\";\r\n $curday = -1;\r\n $today = getdate();\r\n\r\n while ($curday <= $numberofdays[$month]) {\r\n $calendar_content .= \"<tr>\";\r\n\r\n for ($ii = 0; $ii < 7; $ii++) {\r\n if (($curday == -1) && ($ii == $startdayofweek)) {\r\n $curday = 1;\r\n }\r\n if (($curday > 0) && ($curday <= $numberofdays[$month])) {\r\n $bgcolor = $ii < 5 ? \"class='alert alert-danger'\" : \"class='odd'\";\r\n $dayheader = \"$curday\";\r\n $class_style = \"class=odd\";\r\n if (($curday == $today['mday']) && ($year == $today['year']) && ($month == $today['mon'])) {\r\n $dayheader = \"<b>$curday</b> <small>($langToday)</small>\";\r\n $class_style = \"class='today'\";\r\n }\r\n $calendar_content .= \"<td height=50 width=14% valign=top $class_style><b>$dayheader</b>\";\r\n $thisDayItems = \"\";\r\n if (array_key_exists($curday, $events)) {\r\n foreach ($events[$curday] as $ev) {\r\n $thisDayItems .= Calendar_Events::month_calendar_item($ev, Calendar_Events::$calsettings->{$ev->event_group.\"_color\"});\r\n }\r\n $calendar_content .= \"$thisDayItems</td>\";\r\n }\r\n $curday++;\r\n } else {\r\n $calendar_content .= \"<td width=14%>&nbsp;</td>\";\r\n }\r\n }\r\n $calendar_content .= \"</tr>\";\r\n }\r\n $calendar_content .= \"</table>\";\r\n\r\n /* Legend */\r\n $calendar_content .= Calendar_Events::calendar_legend();\r\n\r\n\r\n /*************************************** Bootstrap calendar ******************************************************/\r\n\r\n $calendar_content .= '<div id=\"bootstrapcalendar\"></div>';\r\n\r\n return $calendar_content;\r\n }", "function beeldgeluid_date_all_day_label() {\n return '';\n}", "public static function day_calendar($day, $month, $year) {\r\n global $langNoEvents, $langDay, $langWeek, $langMonth, $langViewShow;\r\n\r\n $calendar_content = \"\";\r\n if (is_null($day)) {\r\n $day = 1;\r\n }\r\n $nextdaydate = new DateTime(\"$year-$month-$day\");\r\n $nextdaydate->add(new DateInterval('P1D'));\r\n $previousdaydate = new DateTime(\"$year-$month-$day\");\r\n $previousdaydate->sub(new DateInterval('P1D'));\r\n\r\n $thisday = new DateTime(\"$year-$month-$day\");\r\n $daydescription = ucfirst(format_locale_date($thisday->getTimestamp()));\r\n\r\n $backward = array('day'=>$previousdaydate->format('d'), 'month'=>$previousdaydate->format('m'), 'year' => $previousdaydate->format('Y'));\r\n $foreward = array('day'=>$nextdaydate->format('d'), 'month'=>$nextdaydate->format('m'), 'year' => $nextdaydate->format('Y'));\r\n\r\n $calendar_content .= '<div class=\"right\" style=\"width:100%\">'.$langViewShow.':&nbsp;'.\r\n '<a href=\"#\" onclick=\"show_day(selectedday, selectedmonth, selectedyear);return false;\">'.$langDay.'</a>&nbsp;|&nbsp;'.\r\n '<a href=\"#\" onclick=\"show_week(selectedday, selectedmonth, selectedyear);return false;\">'.$langWeek.'</a>&nbsp;|&nbsp;'.\r\n '<a href=\"#\" onclick=\"show_month(selectedday, selectedmonth, selectedyear);return false;\">'.$langMonth.'</a></div>';\r\n\r\n $calendar_content .= \"<table class='table-default'>\";\r\n $calendar_content .= \"<tr>\";\r\n $calendar_content .= '<td width=\"25\"><a href=\"#\" onclick=\"show_day('.$backward['day'].','.$backward['month'].','.$backward['year'].'); return false;\">&laquo;</a></td>';\r\n $calendar_content .= \"<td class='center'><b>$daydescription</b></td>\";\r\n $calendar_content .= '<td width=\"25\" class=\"right\"><a href=\"#\" onclick=\"show_day('.$foreward['day'].','.$foreward['month'].','.$foreward['year'].'); return false;\">&raquo;</a></td>';\r\n $calendar_content .= \"</tr>\";\r\n $calendar_content .= \"</table>\";\r\n\r\n $eventlist = Calendar_Events::get_calendar_events(\"day\", \"$year-$month-$day\");\r\n $calendar_content .= \"<table class='table-default'>\";\r\n\r\n $curhour = 0;\r\n $now = getdate();\r\n $today = new DateTime($now['year'].'-'.$now['mon'].'-'.$now['mday'].' '.$now['hours'].':'.$now['minutes']);\r\n if ($now['year'].'-'.$now['mon'].'-'.$now['mday'] == \"$year-$month-$day\") {\r\n $thisdayistoday = true;\r\n }\r\n else{\r\n $thisdayistoday = false;\r\n }\r\n $thishour = new DateTime($today->format('Y-m-d H:00'));\r\n $cursorhour = new DateTime(\"$year-$month-$day 00:00\");\r\n $curstarthour = \"\";\r\n\r\n foreach ($eventlist as $thisevent) {\r\n $thiseventstart = new DateTime($thisevent->start);\r\n $thiseventhour = new DateTime($thiseventstart->format('Y-m-d H:00'));\r\n if ($curstarthour != $thiseventhour) { //event date changed\r\n while($cursorhour < $thiseventhour) {\r\n if ($thisdayistoday && $thishour>=$cursorhour && intval($cursorhour->diff($thishour,true)->format('%h'))<6)\r\n $class = 'today';\r\n else\r\n $class = 'monthLabel';\r\n $calendar_content .= \"<tr><td colspan='3' class='$class'>\" . \"&nbsp;<b>\" . ucfirst($cursorhour->format('H:i')) . \"</b></td></tr>\";\r\n if (intval($cursorhour->diff($thiseventhour,true)->format('%h'))>6) {\r\n $calendar_content .= \"<tr><td colspan='3'>$langNoEvents</td></tr>\";\r\n }\r\n $cursorhour->add(new DateInterval('PT6H'));\r\n $curhour += 6;\r\n }\r\n\r\n if ($thisdayistoday && $thishour>=$cursorhour && intval($cursorhour->diff($thishour,true)->format('%h'))<6)\r\n $class = 'today';\r\n else\r\n $class = 'monthLabel';\r\n //No hour tr for the event\r\n //$calendar_content .= \"<tr><td colspan='3' class='$class'>\" . \"&nbsp;<b>\" . ucfirst($thiseventhour->format('H:i')) . \"</b></td></tr>\";\r\n if ($cursorhour <= $thiseventhour) {\r\n $cursorhour->add(new DateInterval('PT6H'));\r\n $curhour += 6;\r\n }\r\n }\r\n $calendar_content .= Calendar_Events::day_calendar_item($thisevent, 'even');\r\n $curstarthour = $thiseventhour;\r\n }\r\n /* Fill with empty days*/\r\n for($i=$curhour;$i<24;$i+=6) {\r\n if ($thisdayistoday && $thishour>=$cursorhour && intval($cursorhour->diff($thishour,true)->format('%h'))<6)\r\n $class = 'today';\r\n else\r\n $class = 'monthLabel';\r\n $calendar_content .= \"<tr><td colspan='3' class='$class'>\" . \"&nbsp;<b>\" . ucfirst($cursorhour->format('H:i')) . \"</b></td></tr>\";\r\n $calendar_content .= \"<tr><td colspan='3'>$langNoEvents</td></tr>\";\r\n $cursorhour->add(new DateInterval('PT6H'));\r\n }\r\n $calendar_content .= \"</table>\";\r\n /* Legend */\r\n $calendar_content .= Calendar_Events::calendar_legend();\r\n\r\n return $calendar_content;\r\n }", "function showdays(){\r\n\tglobal $conn;\r\n\t$i=0;\r\n\r\n\t$query = \"SELECT * FROM days\";\r\n\t$res = mysql_query($query,$conn);\r\n\twhile($row = mysql_fetch_array($res)){\r\n\r\n\t\r\n\r\n\t\tif($row['onoff']==1){\r\n\t\t\techo \"<ul data-role='listview' class='ui-listview'><li data-role=list-divider role=heading class=ui-li ui-li-divider ui-bar-b>\".$row['title'].\"</li> \";\r\n\t\t\tShowschedulesoftheday($i); \r\n\t\t\techo \"</ul>\";\r\n\r\n\t\t}\r\n\t$i++;\r\n\t}\r\n}", "private function endMonthSpacers()\n\t{\n\t\tif((8 - $this->weekDayNum) >= '1') {\n\t\t\t$this->calWeekDays .= \"\\t\\t<td colspan=\\\"\".(8 - $this->weekDayNum).\"\\\" class=\\\"spacerDays\\\">&nbsp;</td>\\n\";\n\t\t\t$this->outArray['lastday'] = (8 - $this->weekDayNum);\t\t\t\n\t\t}\n\t}", "public function getDayOfTheWeek();", "public function getMonthAsTable()\n {\n // Get all days to put in calendar\n $days = $this->getDaysAsArray();\n\n // Start table\n $html = \"<table class='table'><thead><tr>\";\n\n // Add weekday names to table head\n foreach (array_keys($this->weekdayIndexes) as $key) {\n $html .= \"<th>{$key}</th>\";\n }\n $html .= \"</tr></thead><tbody>\";\n\n // Add day numbers to table body\n for ($i = 0; $i < count($days); $i++) {\n // New row at start of week\n $html .= $i % 7 === 0 ? \"<tr>\" : \"\";\n\n if (($days[$i] > $i + 7) || ($days[$i] < $i - 7)) {\n // Add class 'outside' if number is part of previous or next month\n $html .= \"<td class='outside'>\";\n } elseif ($i % 7 === 6) {\n // Add class 'red' to Sundays\n $html .= \"<td class='red'>\";\n } else {\n $html .= \"<td>\";\n }\n $html .= \"{$days[$i]}</td>\";\n // Close row at end of week\n $html .= $i % 7 === 6 ? \"</tr>\" : \"\";\n }\n $html .= \"</tbody></table>\";\n return $html;\n }", "function ShowDayOfMonth($get_month){\n\t$arr_d1 = explode(\"-\",$get_month);\n\t$xdd = \"01\";\n\t$xmm = \"$arr_d1[1]\";\n\t$xyy = \"$arr_d1[0]\";\n\t$get_date = \"$xyy-$xmm-$xdd\"; // วันเริ่มต้น\n\t//echo $get_date.\"<br>\";\n\t$xFTime1 = getdate(date(mktime(0, 0, 0, intval($xmm+1), intval($xdd-1), intval($xyy))));\n\t$numcount = $xFTime1['mday']; // ฝันที่สุดท้ายของเดือน\n\tif($numcount > 0){\n\t\t$j=1;\n\t\t\tfor($i = 0 ; $i < $numcount ; $i++){\n\t\t\t\t$xbasedate = strtotime(\"$get_date\");\n\t\t\t\t $xdate = strtotime(\"$i day\",$xbasedate);\n\t\t\t\t $xsdate = date(\"Y-m-d\",$xdate);// วันถัดไป\t\t\n\t\t\t\t $arr_d2 = explode(\"-\",$xsdate);\n\t\t\t\t $xFTime = getdate(date(mktime(0, 0, 0, intval($arr_d2[1]), intval($arr_d2[2]), intval($arr_d2[0]))));\t\n\t\t\t\t if($xFTime['wday'] == 0){\n\t\t\t\t\t $j++;\n\t\t\t\t\t\t \n\t\t\t\t\t}\n\t\t\t\t\tif($xFTime['wday'] != \"0\"){\n\t\t\t\t\t\t$arr_date[$j][$xFTime['wday']] = $xsdate;\t\n\t\t\t\t\t}\n\t\t\t\t \n\t\t\t}\n\t\t\t\n\t}//end if($numcount > 0){\n\treturn $arr_date;\t\n}", "function display_day()\n{\n global $phpcid, $phpc_cal, $phpc_script, $phpcdb, $day, $month, $year;\n\n\t$monthname = month_name($month);\n\n $results = $phpcdb->get_occurrences_by_date($phpcid, $year, $month, $day);\n\n\t$have_events = false;\n\n\t$html_table = tag('table', attributes('class=\"phpc-main\"'),\n\t\t\ttag('caption', \"$day $monthname $year\"),\n\t\t\ttag('thead',\n\t\t\t\ttag('tr',\n\t\t\t\t\ttag('th', __('Title')),\n\t\t\t\t\ttag('th', __('Time')),\n\t\t\t\t\ttag('th', __('Description'))\n\t\t\t\t )));\n\tif($phpc_cal->can_modify()) {\n\t\t$html_table->add(tag('tfoot',\n\t\t\t\t\ttag('tr',\n\t\t\t\t\t\ttag('td',\n\t\t\t\t\t\t\tattributes('colspan=\"4\"'),\n\t\t\t\t\t\t\tcreate_hidden('action', 'event_delete'),\n\t\t\t\t\t\t\tcreate_hidden('day', $day),\n\t\t\t\t\t\t\tcreate_hidden('month', $month),\n\t\t\t\t\t\t\tcreate_hidden('year', $year),\n\t\t\t\t\t\t\tcreate_submit(__('Delete Selected'))))));\n\t}\n\n\t$html_body = tag('tbody');\n\n\twhile($row = $results->fetch_assoc()) {\n\t\n\t\t$event = new PhpcOccurrence($row);\n\n\t\tif(!$event->can_read())\n\t\t\tcontinue;\n\n\t\t$have_events = true;\n\n\t\t$eid = $event->get_eid();\n\t\t$oid = $event->get_oid();\n\n\t\t$html_subject = tag('td');\n\n\t\tif($event->can_modify()) {\n\t\t\t$html_subject->add(create_checkbox('eid[]',\n\t\t\t\t\t\t$eid));\n\t\t}\n\n\t\t$html_subject->add(create_occurrence_link(tag('strong',\n\t\t\t\t\t\t$event->get_subject()),\n\t\t\t\t\t'display_event', $oid));\n\n\t\tif($event->can_modify()) {\n\t\t\t$html_subject->add(\" (\");\n\t\t\t$html_subject->add(create_event_link(\n\t\t\t\t\t\t__('Modify'), 'event_form',\n\t\t\t\t\t\t$eid));\n\t\t\t$html_subject->add(')');\n\t\t}\n\n\t\t$html_body->add(tag('tr',\n\t\t\t\t\t$html_subject,\n\t\t\t\t\ttag('td', $event->get_time_span_string()),\n\t\t\t\t\ttag('td', attributes('class=\"phpc-desc\"'), $event->get_desc())));\n\t}\n\n\t$html_table->add($html_body);\n\n\tif($phpc_cal->can_modify()) {\n\t\t$output = tag('form',\n\t\t\t\tattributes(\"action=\\\"$phpc_script\\\"\"),\n\t\t\t\t$html_table);\n\t} else {\n\t\t$output = $html_table;\n\t}\n\n\tif(!$have_events)\n\t\t$output = tag('h2', __('No events on this day.'));\n\n\treturn tag('', create_day_menu(), $output);\n}", "private function makeDayHeadings()\n\t{\n\t\t$this->outArray['dayheadings'] = array();\n\t\t$this->dayHeadings .= \"\\t<tr>\\n\";\n\t\tforeach($this->daysArray as $day) {\n\t\t\t$this->dayHeadings .= \"\\t\\t<th class=\\\"dayHeading\\\">$day</th>\\n\";\n\t\t\tarray_push($this->outArray['dayheadings'], $day);\n\t\t}\n\t\t$this->dayHeadings .= \"\\t</tr>\\n\";\n\t\t\n\t\t$this->calWeekDays .= $this->dayHeadings;\n\t}", "public function setCalendarNumber($numberOfMonths, $showButtonPanel){\n \n $this->_config_mapper(Array('numberOfMonths' => (int)$numberOfMonths));\n \n if($showButtonPanel) {\n $this->_config_mapper(Array('showButtonPanel' => 'true')); \n } else {\n $this->_config_mapper(Array('showButtonPanel' => 'false')); \n } \n }", "public function showday($day,$month){\n$date = \"2021-$day-$month\";\n//Get the day of the week using PHP's date function.\n$dayOfWeek = date(\"l\", strtotime($date));\n//Print out the day that our date fell on.\necho $date . ' เป็นวัน ' . $dayOfWeek;\nreturn $dayOfWeek;\n }", "public function setDayNumberAttribute($value) {\n $this->attributes['day_number'] = ($value === null ? null : (int)$value);\n }", "function getAttendanceDaysOfWeek(){\n\t\t$listarray = array(); $text = '';\n\t\t$allvalues = getDaysOfWeek();\n\t\t$thevalues = $this->getDaysOfWeekArray();\n\t\tif(isEmptyString($this->getWorkingDays())){\n\t\t\treturn $text;\n\t\t}\n\t\tif(count($thevalues) > 0){\n\t\t\tforeach ($thevalues as $value) {\n\t\t\t\tif(!isArrayKeyAnEmptyString($value, $allvalues)){\n\t\t\t\t\t$listarray[] = $allvalues[$value];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(count($listarray) > 0){\n\t\t\t$text = createHTMLCommaListFromArray($listarray, ', ');\n\t\t}\n\t\treturn $text;\n\t}", "function draw_calendar_activ($month,$year){\n\n\t/* draw table */\n\t$calendar = '<table cellpadding=\"0\" cellspacing=\"0\" class=\"calendar\">';\n\n\t/* table headings */\n\t$headings = array('Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi');\n\t$calendar.= '<tr class=\"calendar-row-day\"><td class=\"calendar-day-head\">'.implode('</td><td class=\"calendar-day-head\">',$headings).'</td></tr>';\n\n\t/* days and weeks vars now ... */\n\t$running_day = date('w',mktime(0,0,0,$month,1,$year));\n\t$days_in_month = date('t',mktime(0,0,0,$month,1,$year));\n\t$days_in_this_week = 1;\n\t$day_counter = 0;\n\t$dates_array = array();\n\n\t/* row for week one */\n\t$calendar.= '<tr class=\"calendar-row\">';\n\n\t/* print \"blank\" days until the first of the current week */\n\tfor($x = 0; $x < $running_day; $x++):\n\t\t$calendar.= '<td class=\"calendar-day-np\"> </td>';\n\t\t$days_in_this_week++;\n\tendfor;\n\n\t/* keep going with days.... */\n\tfor($list_day = 1; $list_day <= $days_in_month; $list_day++){\n\t\t$calendar.= '<td class=\"calendar-day\">';\n\t\t\t/* add in the day number */\n $ddate = $year.\"-\".$month.\"-\".sprintf(\"%02d\", $list_day);\n $newdatabal = sprintf(\"%02d\", $list_day);\n $qq = mysql_query(\"SELECT * FROM reserver WHERE date_deb LIKE('$ddate%')\")or die(mysql_error());\n\n if(mysql_num_rows($qq) >0){\n $newblabla = $ddate.\"<br>\n <a href='afres.php?y=\".$year.\"&m=\".$month.\"&d=\".$newdatabal.\"' target='_blank' style='color: #302C87; text-decoration: none'> Il y'a : \".mysql_num_rows($qq).' reservation(s)</a>';\n }else{\n $newblabla = $ddate.\"<br>no reservations\";\n }\n\t\t\t$calendar.= '<div class=\"day-number\">\n\n '.$newblabla;\n\n\t\t\t/** QUERY THE DATABASE FOR AN ENTRY FOR THIS DAY !! IF MATCHES FOUND, PRINT THEM !! **/\n\t\t\t$calendar.= str_repeat('<p> </p>',2);\n\n\t\t$calendar.= '</td>';\n\t\tif($running_day == 6):\n\t\t\t$calendar.= '</tr>';\n\t\t\tif(($day_counter+1) != $days_in_month):\n\t\t\t\t$calendar.= '<tr class=\"calendar-row\">';\n\t\t\tendif;\n\t\t\t$running_day = -1;\n\t\t\t$days_in_this_week = 0;\n\t\tendif;\n\t\t$days_in_this_week++; $running_day++; $day_counter++;\n\n\n\t}\n\n\t/* finish the rest of the days in the week */\n\tif($days_in_this_week < 8):\n\t\tfor($x = 1; $x <= (8 - $days_in_this_week); $x++):\n\t\t\t$calendar.= '<td class=\"calendar-day-np\"> </td>';\n\t\tendfor;\n\tendif;\n\n\t/* final row */\n\t$calendar.= '</tr>';\n\n\t/* end the table */\n\t$calendar.= '</table>';\n\n\t/* all done, return result */\n\treturn $calendar;\n\n\n}", "public function isWeekday()\n {\n return ! $this->isWeekend();\n }", "public function init() {\n\t\t// The weekdays.\n\t\t$this->weekday[0] = /* translators: Weekday. */ __( 'Sunday' );\n\t\t$this->weekday[1] = /* translators: Weekday. */ __( 'Monday' );\n\t\t$this->weekday[2] = /* translators: Weekday. */ __( 'Tuesday' );\n\t\t$this->weekday[3] = /* translators: Weekday. */ __( 'Wednesday' );\n\t\t$this->weekday[4] = /* translators: Weekday. */ __( 'Thursday' );\n\t\t$this->weekday[5] = /* translators: Weekday. */ __( 'Friday' );\n\t\t$this->weekday[6] = /* translators: Weekday. */ __( 'Saturday' );\n\n\t\t// The first letter of each day.\n\t\t$this->weekday_initial[ __( 'Sunday' ) ] = /* translators: One-letter abbreviation of the weekday. */ _x( 'S', 'Sunday initial' );\n\t\t$this->weekday_initial[ __( 'Monday' ) ] = /* translators: One-letter abbreviation of the weekday. */ _x( 'M', 'Monday initial' );\n\t\t$this->weekday_initial[ __( 'Tuesday' ) ] = /* translators: One-letter abbreviation of the weekday. */ _x( 'T', 'Tuesday initial' );\n\t\t$this->weekday_initial[ __( 'Wednesday' ) ] = /* translators: One-letter abbreviation of the weekday. */ _x( 'W', 'Wednesday initial' );\n\t\t$this->weekday_initial[ __( 'Thursday' ) ] = /* translators: One-letter abbreviation of the weekday. */ _x( 'T', 'Thursday initial' );\n\t\t$this->weekday_initial[ __( 'Friday' ) ] = /* translators: One-letter abbreviation of the weekday. */ _x( 'F', 'Friday initial' );\n\t\t$this->weekday_initial[ __( 'Saturday' ) ] = /* translators: One-letter abbreviation of the weekday. */ _x( 'S', 'Saturday initial' );\n\n\t\t// Abbreviations for each day.\n\t\t$this->weekday_abbrev[ __( 'Sunday' ) ] = /* translators: Three-letter abbreviation of the weekday. */ __( 'Sun' );\n\t\t$this->weekday_abbrev[ __( 'Monday' ) ] = /* translators: Ttree-letter abbreviation of the weekday. */ __( 'Mon' );\n\t\t$this->weekday_abbrev[ __( 'Tuesday' ) ] = /* translators: Three-letter abbreviation of the weekday. */ __( 'Tue' );\n\t\t$this->weekday_abbrev[ __( 'Wednesday' ) ] = /* translators: Three-letter abbreviation of the weekday. */ __( 'Wed' );\n\t\t$this->weekday_abbrev[ __( 'Thursday' ) ] = /* translators: Three-letter abbreviation of the weekday. */ __( 'Thu' );\n\t\t$this->weekday_abbrev[ __( 'Friday' ) ] = /* translators: Three-letter abbreviation of the weekday. */ __( 'Fri' );\n\t\t$this->weekday_abbrev[ __( 'Saturday' ) ] = /* translators: Three-letter abbreviation of the weekday. */ __( 'Sat' );\n\n\t\t// The months.\n\t\t$this->month['01'] = /* translators: Month name. */ __( 'January' );\n\t\t$this->month['02'] = /* translators: Month name. */ __( 'February' );\n\t\t$this->month['03'] = /* translators: Month name. */ __( 'March' );\n\t\t$this->month['04'] = /* translators: Month name. */ __( 'April' );\n\t\t$this->month['05'] = /* translators: Month name. */ __( 'May' );\n\t\t$this->month['06'] = /* translators: Month name. */ __( 'June' );\n\t\t$this->month['07'] = /* translators: Month name. */ __( 'July' );\n\t\t$this->month['08'] = /* translators: Month name. */ __( 'August' );\n\t\t$this->month['09'] = /* translators: Month name. */ __( 'September' );\n\t\t$this->month['10'] = /* translators: Month name. */ __( 'October' );\n\t\t$this->month['11'] = /* translators: Month name. */ __( 'November' );\n\t\t$this->month['12'] = /* translators: Month name. */ __( 'December' );\n\n\t\t// The months, genitive.\n\t\t$this->month_genitive['01'] = /* translators: Month name, genitive. */ _x( 'January', 'genitive' );\n\t\t$this->month_genitive['02'] = /* translators: Month name, genitive. */ _x( 'February', 'genitive' );\n\t\t$this->month_genitive['03'] = /* translators: Month name, genitive. */ _x( 'March', 'genitive' );\n\t\t$this->month_genitive['04'] = /* translators: Month name, genitive. */ _x( 'April', 'genitive' );\n\t\t$this->month_genitive['05'] = /* translators: Month name, genitive. */ _x( 'May', 'genitive' );\n\t\t$this->month_genitive['06'] = /* translators: Month name, genitive. */ _x( 'June', 'genitive' );\n\t\t$this->month_genitive['07'] = /* translators: Month name, genitive. */ _x( 'July', 'genitive' );\n\t\t$this->month_genitive['08'] = /* translators: Month name, genitive. */ _x( 'August', 'genitive' );\n\t\t$this->month_genitive['09'] = /* translators: Month name, genitive. */ _x( 'September', 'genitive' );\n\t\t$this->month_genitive['10'] = /* translators: Month name, genitive. */ _x( 'October', 'genitive' );\n\t\t$this->month_genitive['11'] = /* translators: Month name, genitive. */ _x( 'November', 'genitive' );\n\t\t$this->month_genitive['12'] = /* translators: Month name, genitive. */ _x( 'December', 'genitive' );\n\n\t\t// Abbreviations for each month.\n\t\t$this->month_abbrev[ __( 'January' ) ] = /* translators: Three-letter abbreviation of the month. */ _x( 'Jan', 'January abbreviation' );\n\t\t$this->month_abbrev[ __( 'February' ) ] = /* translators: Three-letter abbreviation of the month. */ _x( 'Feb', 'February abbreviation' );\n\t\t$this->month_abbrev[ __( 'March' ) ] = /* translators: Three-letter abbreviation of the month. */ _x( 'Mar', 'March abbreviation' );\n\t\t$this->month_abbrev[ __( 'April' ) ] = /* translators: Three-letter abbreviation of the month. */ _x( 'Apr', 'April abbreviation' );\n\t\t$this->month_abbrev[ __( 'May' ) ] = /* translators: Three-letter abbreviation of the month. */ _x( 'May', 'May abbreviation' );\n\t\t$this->month_abbrev[ __( 'June' ) ] = /* translators: Three-letter abbreviation of the month. */ _x( 'Jun', 'June abbreviation' );\n\t\t$this->month_abbrev[ __( 'July' ) ] = /* translators: Three-letter abbreviation of the month. */ _x( 'Jul', 'July abbreviation' );\n\t\t$this->month_abbrev[ __( 'August' ) ] = /* translators: Three-letter abbreviation of the month. */ _x( 'Aug', 'August abbreviation' );\n\t\t$this->month_abbrev[ __( 'September' ) ] = /* translators: Three-letter abbreviation of the month. */ _x( 'Sep', 'September abbreviation' );\n\t\t$this->month_abbrev[ __( 'October' ) ] = /* translators: Three-letter abbreviation of the month. */ _x( 'Oct', 'October abbreviation' );\n\t\t$this->month_abbrev[ __( 'November' ) ] = /* translators: Three-letter abbreviation of the month. */ _x( 'Nov', 'November abbreviation' );\n\t\t$this->month_abbrev[ __( 'December' ) ] = /* translators: Three-letter abbreviation of the month. */ _x( 'Dec', 'December abbreviation' );\n\n\t\t// The meridiems.\n\t\t$this->meridiem['am'] = __( 'am' );\n\t\t$this->meridiem['pm'] = __( 'pm' );\n\t\t$this->meridiem['AM'] = __( 'AM' );\n\t\t$this->meridiem['PM'] = __( 'PM' );\n\n\t\t// Numbers formatting.\n\t\t// See https://www.php.net/number_format\n\n\t\t/* translators: $thousands_sep argument for https://www.php.net/number_format, default is ',' */\n\t\t$thousands_sep = __( 'number_format_thousands_sep' );\n\n\t\t// Replace space with a non-breaking space to avoid wrapping.\n\t\t$thousands_sep = str_replace( ' ', '&nbsp;', $thousands_sep );\n\n\t\t$this->number_format['thousands_sep'] = ( 'number_format_thousands_sep' === $thousands_sep ) ? ',' : $thousands_sep;\n\n\t\t/* translators: $dec_point argument for https://www.php.net/number_format, default is '.' */\n\t\t$decimal_point = __( 'number_format_decimal_point' );\n\n\t\t$this->number_format['decimal_point'] = ( 'number_format_decimal_point' === $decimal_point ) ? '.' : $decimal_point;\n\n\t\t// Set text direction.\n\t\tif ( isset( $GLOBALS['text_direction'] ) ) {\n\t\t\t$this->text_direction = $GLOBALS['text_direction'];\n\n\t\t\t/* translators: 'rtl' or 'ltr'. This sets the text direction for WordPress. */\n\t\t} elseif ( 'rtl' === _x( 'ltr', 'text direction' ) ) {\n\t\t\t$this->text_direction = 'rtl';\n\t\t}\n\t}", "public function skipWeekend()\r\n {\r\n if ($this->getDayOfWeek() == 7)\r\n {\r\n $this->addDay(1);\r\n }\r\n else if ($this->getDayOfWeek() == 6)\r\n {\r\n $this->addDay(2);\r\n }\r\n }", "public function print_blanc_calendar(string $month, int $year){\r\n \r\n $month_days = static::no_of_days_in_month($month, $year); \r\n $empty_days = $this->empty_days($month, $year);\r\n for ($i=1; $i<=$empty_days; $i++){\r\n echo \"<div class='cal_date empty_date'> </div>\";\r\n }\r\n \r\n \r\n for ($i=1; $i<=$month_days; $i++){\r\n echo \"<div class='cal_date cal_blanc_date'>\";\r\n echo $i;\r\n echo \"</div>\";\r\n }\r\n }", "private function makeArrayIterator()\n\t{\n\t\t$this->weekDayNum = $this->firstDayOfTheMonth+1;\t\t\n\t\tfor($this->dayOfMonth; $this->dayOfMonth <= $this->daysInMonth; $this->dayOfMonth++) {\n\t\t\t// Set the default style\n\t\t\t$this->outArray['days'][$this->dayOfMonth]['style'] = 'normalDay';\n\t\t\t\n\t\t\t// Set the style to a weekend day style\n\t\t\tif(($this->weekDayNum == 8)||($this->weekDayNum == 7)) {\n\t\t\t\t$this->outArray['days'][$this->dayOfMonth]['style'] = 'weekendDay';\n\t\t\t}\n\t\t\t\n\t\t\t// Set the style to a current day style\n\t\t\tif($this->curDay == $this->dayOfMonth) {\n\t\t\t\t$this->outArray['days'][$this->dayOfMonth]['style'] = 'currentDay';\n\t\t\t}\n\t\t\t\n\t\t\t// If the current day is Sunday, add a new row\n\t\t\tif($this->weekDayNum == 8) {\n\t\t\t\t$this->weekDayNum = 1;\n\t\t\t} \n\t\t\t\n\t\t\t$this->outArray['days'][$this->dayOfMonth]['dayname'] = $this->daysArray[$this->weekDayNum - 1];\n\t\t\t$this->outArray['days'][$this->dayOfMonth]['weekdaynumber'] = $this->weekDayNum;\n\t\t\t\t\t\t\t\t\t\n\t\t\t// Draw days\n\t\t\tif($this->makeDayEventListArray()) {\n\t\t\t\t$this->outArray['days'][$this->dayOfMonth]['events'] = $this->makeDayEventListArray();\n\t\t\t}\n\t\t\t\n\t\t\t$this->outArray['days'][$this->dayOfMonth]['datestamp'] = $this->curYear.'-'.$this->curMonth.'-'.$this->dayOfMonth;\n\t\t\t\n\t\t\t$this->weekDayNum++;\n\t\t}\n\t}", "function build_calendar($month,$year,$dateArray) {\r\n $daysOfWeek = array('S','M','T','W','T','F','S');\r\n\r\n // What is the first day of the month in question?\r\n $firstDayOfMonth = mktime(0,0,0,$month,1,$year);\r\n\r\n // How many days does this month contain?\r\n $numberDays = date('t',$firstDayOfMonth);\r\n\r\n // Retrieve some information about the first day of the\r\n // month in question.\r\n $dateComponents = getdate($firstDayOfMonth);\r\n\r\n // What is the name of the month in question?\r\n $monthName = $dateComponents['month'];\r\n\r\n // What is the index value (0-6) of the first day of the\r\n // month in question.\r\n $dayOfWeek = $dateComponents['wday'];\r\n\r\n // Create the table tag opener and day headers\r\n\r\n $calendar = \"<table class='table table-bordered'>\";\r\n $calendar .= \"<caption>$monthName $year</caption>\";\r\n $calendar .= \"<tr>\";\r\n\r\n // Create the calendar headers\r\n\r\n foreach($daysOfWeek as $day) {\r\n $calendar .= \"<th class='header'>$day</th>\";\r\n } \r\n\r\n // Create the rest of the calendar\r\n\r\n // Initiate the day counter, starting with the 1st.\r\n\r\n $currentDay = 1;\r\n\r\n $calendar .= \"</tr><tr>\";\r\n\r\n // The variable $dayOfWeek is used to\r\n // ensure that the calendar\r\n // display consists of exactly 7 columns.\r\n\r\n if ($dayOfWeek > 0) { \r\n $calendar .= \"<td colspan='$dayOfWeek'>&nbsp;</td>\"; \r\n }\r\n \r\n $month = str_pad($month, 2, \"0\", STR_PAD_LEFT);\r\n \r\n while ($currentDay <= $numberDays) {\r\n\r\n // Seventh column (Saturday) reached. Start a new row.\r\n\r\n if ($dayOfWeek == 7) {\r\n\r\n $dayOfWeek = 0;\r\n $calendar .= \"</tr><tr>\";\r\n\r\n }\r\n \r\n $currentDayRel = str_pad($currentDay, 2, \"0\", STR_PAD_LEFT);\r\n \r\n $date = \"$year-$month-$currentDayRel\";\r\n\t\tif($date == date('Y-m-d')){\r\n\t\t\t$calendar .= \"<td class='col-md-1 col-xs-1' rel='$date' bgcolor='#ADD8E6'>$currentDay<br/>\";\r\n\t\t}else{\r\n\t\t\t$calendar .= \"<td class='col-md-1 col-xs-1' rel='$date'>$currentDay<br/>\";\r\n\t\t}\r\n \r\n\t\t $sql = mysql_query(\"SELECT * FROM leavesys.leave_details WHERE date = '\".$date.\"'\");\r\n\t\t while($result = mysql_fetch_array($sql)){\r\n\t\t\t $sql2 = mysql_query(\"SELECT * FROM user WHERE id = '\".$result['applicant_id'].\"'\");\r\n\t\t\t $result2 = mysql_fetch_assoc($sql2);\r\n\t\t\t\tif($result['half'] == 1){\r\n\t\t\t\t\t$c_content = \" (am)\";\r\n\t\t\t\t}else if($result['half'] == 2){\r\n\t\t\t\t\t$c_content = \" (pm)\";\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$c_content = \"\";\r\n\t\t\t\t}\r\n\t\t\t\t$calendar .= $result2['country_code'].\" - \".$result2['name'].$c_content.\"<br/>\";\r\n\t\t }\r\n\t\t $sql1 = mysql_query(\"SELECT * FROM leavesys.holiday WHERE date = '\".$date.\"'\");\r\n\t\t while($result1 = mysql_fetch_array($sql1)){\r\n\t\t\t if($result1['country'] == \"al\"){\r\n\t\t\t\t $calendar .= \"<font color='blue;'>\".$result1['name'].\"</font><br/>\";\r\n\t\t\t }else{\r\n\t\t\t\t$calendar .= \"<font color='blue;'>\".$result1['name'].\" (\".$result1['country'].\")</font><br/>\";\r\n\t\t\t }\r\n\t\t }\r\n\t\t $calendar .= \"</td>\";\r\n\r\n // Increment counters\r\n \r\n $currentDay++;\r\n $dayOfWeek++;\r\n\r\n }\r\n \r\n \r\n\r\n // Complete the row of the last week in month, if necessary\r\n\r\n if ($dayOfWeek != 7) { \r\n \r\n $remainingDays = 7 - $dayOfWeek;\r\n $calendar .= \"<td colspan='$remainingDays'>&nbsp;</td>\"; \r\n\r\n }\r\n \r\n $calendar .= \"</tr>\";\r\n\r\n $calendar .= \"</table>\";\r\n\r\n return $calendar;\r\n\r\n}", "function week1_changes() \n{\n\n\n\tglobal $connection;\n\n\t//This piece of code is to allow schedule changes on Fri after cron\n\t$Halfday=43200;\n\t$query = \"SELECT * FROM date_change_ts\";\n\t$result = mysqli_query($connection, $query) or die(mysql_error());\n\t$row = mysqli_fetch_array($result);\n\t$Ts = $row['date_change_ts'];\n\tif (($Ts +$Halfday)> (strtotime(\"now\")))\n\t{\n\t\t$hd_flag = \"yes\";\n\t}\n\telse {\n\t\t$hd_flag = \"no\";\n\t}\n\n\t$today = date(\"D\");\n\n\t//This code makes sure that only 1 day ahead play days can be selected\n\tif (($today==\"Fri\") && ($hd_flag==\"yes\"))\n\t{\t\t\n\t\t//Friday after the cron run\n\t\techo \"<div id=\\\"checkboxes\\\">\n\t\t\t\t\t<label class=\\\"tag\\\"><input type=\\\"checkbox\\\" name=\\\"MON_PRI\\\" value=\\\"YES\\\" class=\\\"regular-checkbox\\\"/>MON_PRI</label> \n\t\t\t\t\t<label class=\\\"tag\\\"><input type=\\\"checkbox\\\" name=\\\"MON_ALT\\\" value=\\\"YES\\\" class=\\\"regular-checkbox\\\"/>MON_ALT</label> \n\t\t\t\t\t<label class=\\\"tag\\\"><input type=\\\"checkbox\\\" name=\\\"WED\\\" value=\\\"YES\\\" class=\\\"regular-checkbox\\\" />WED</label> \n\t\t\t\t\t<label class=\\\"tag\\\"><input type=\\\"checkbox\\\" name=\\\"FRI\\\" value=\\\"YES\\\" class=\\\"regular-checkbox\\\" />FRI</label>\n\t\t\t\t</div>\";\n\t}\n\telseif ($today==\"Sat\")\n\t{\n\t\techo \"<div id=\\\"checkboxes\\\">\n\t\t\t\t\t<label class=\\\"tag\\\"><input type=\\\"checkbox\\\" name=\\\"MON_PRI\\\" value=\\\"YES\\\" class=\\\"regular-checkbox\\\"/>MON_PRI</label> \n\t\t\t\t\t<label class=\\\"tag\\\"><input type=\\\"checkbox\\\" name=\\\"MON_ALT\\\" value=\\\"YES\\\" class=\\\"regular-checkbox\\\"/>MON_ALT</label> \n\t\t\t\t\t<label class=\\\"tag\\\"><input type=\\\"checkbox\\\" name=\\\"WED\\\" value=\\\"YES\\\" class=\\\"regular-checkbox\\\" />WED</label> \n\t\t\t\t\t<label class=\\\"tag\\\"><input type=\\\"checkbox\\\" name=\\\"FRI\\\" value=\\\"YES\\\" class=\\\"regular-checkbox\\\" />FRI</label>\n\t\t\t\t</div>\";\n\t}\n\telseif (($today==\"Mon\") || ($today==\"Sun\")) \n\t{\n\t\techo \"<div id=\\\"checkboxes\\\">\n\t\t\t\t\t<label class=\\\"tag\\\"><input type=\\\"checkbox\\\" name=\\\"WED\\\" value=\\\"YES\\\" class=\\\"regular-checkbox\\\" />WED</label> \n\t\t\t\t\t<label class=\\\"tag\\\"><input type=\\\"checkbox\\\" name=\\\"FRI\\\" value=\\\"YES\\\" class=\\\"regular-checkbox\\\" />FRI</label>\n\t\t\t\t</div>\";\n\t}\n\telseif (($today==\"Tue\") || ($today==\"Wed\")) \n\t{\n\techo \"<div id=\\\"checkboxes\\\"> \n\t\t\t\t\t<label class=\\\"tag\\\"><input type=\\\"checkbox\\\" name=\\\"FRI\\\" value=\\\"YES\\\" class=\\\"regular-checkbox\\\" />FRI</label>\n\t\t\t\t</div>\";\n\t} \n\n\tif(isset($_POST['playdaz'])) \n\t{\n\n\t\t$LastName=$_SESSION['LAST_NAME'];\t\n\n\t\t$monpri = (isset($_POST['MON_PRI'])) ? \"YES\" :\"NO\";\n\t\t$monalt = (isset($_POST['MON_ALT'])) ? \"YES\" :\"NO\";\n\t\t$wed = (isset($_POST['WED'])) ? \"YES\" :\"NO\";\n\t\t$fri = (isset($_POST['FRI'])) ? \"YES\" :\"NO\";\n\n\t\t//Cannot select 2 courses on the same day\n\t\tif (($monpri ==\"NO\") || ($monalt==\"NO\"))\n\t\t{\t\t\n\t\t\t$LastName=$_SESSION['LAST_NAME'];\t\t\n\n\t\t\tif (($today==\"Fri\") && ($hd_flag==\"yes\"))\n\t\t\t{\t\n\t\t\t\t//Friday after the cron runs\n\t\t\t\t$query = \"UPDATE players SET MON_PRI='$monpri',MON_ALT='$monalt',WED='$wed',FRI='$fri' WHERE LAST_NAME='$LastName'\";\n\t\t\t\tmysqli_query($connection, $query);\n\t\t\t}\n\t\t\telseif ($today==\"Sat\")\n\t\t\t{\n\t\t\t\t$query = \"UPDATE players SET MON_PRI='$monpri',MON_ALT='$monalt',WED='$wed',FRI='$fri' WHERE LAST_NAME='$LastName'\";\n\t\t\t\tmysqli_query($connection, $query);\n\t\t\t}\n\t\t\telseif (($today==\"Mon\")||($today==\"Sun\"))\n\t\t\t{\n\t\t\t\t$query = \"UPDATE players SET WED='$wed',FRI='$fri' WHERE LAST_NAME='$LastName'\";\n\t\t\t\tmysqli_query($connection, $query);\n\t\t\t}\n\t\t\telseif (($today==\"Tue\")||($today==\"Wed\"))\n\t\t\t{\n\t\t\t\t$query = \"UPDATE players SET FRI='$fri' WHERE LAST_NAME='$LastName'\";\n\t\t\t\tmysqli_query($connection, $query);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (isset($_POST['goback']))\n\t{\n\t\techo \"<meta http-equiv='refresh' content='1;url=/play1.php'>\\n\";\n\t\texit(96);\n\t}\n}", "function selectDay($day, $hebDay){\n\t\techo \" \n\t\t\t\t\t<option>בחר יום אחר</option>\n\t\t\t\t\";\n\t\tfor($i = 0; $i < 7; $i++){\n\t\t\t\n\t\t\t\t$weekDay = date('D', strtotime($day));\n\t\t\t\tweekDay($weekDay, $tDS, $tDF, $hebDay);\n\t\t\tif($hebDay != \"יום שבת\"){\n\t\t\t\techo \" \n\t\t\t\t\t<option value ='\" . $day . \"'>\" . $day . ' - ' . $hebDay . \"</option>\n\t\t\t\t\";\n\t\t\t}\t\n\t\t\t$day = strtotime($day);\n\t\t\t$day = $day + 60*60*24;\n\t\t\t$day = date('Y-m-d', $day);\n\t\t\t \n\t\t}\n\t}", "function dayOfWeek()\n {\n echo \"Enter the day: \\n\";\n $d = AlgorithmsUtility::get_Integer();\n echo \"Enter the month: \\n\";\n $m = AlgorithmsUtility::get_Integer();\n echo \"Enter the year. \\n\";\n $y = AlgorithmsUtility::get_Integer();\n\n $y0 = floor($y - (14 - $m) / 12) + 1;\n $x = floor($y0 + $y0 / 4 - $y0 / 100 + $y0 / 400);\n $m0 = ($m + 12 * floor(((14 - $m) / 12)) - 2);\n $d0 = floor(($d + $x + floor((31 * $m0) / 12)) % 7);\n $d1 = \"Sunday Monday Tuesday Wednesday Thursday Friday Saturday\";\n $day = explode(\" \", $d1);\n echo \"day on given date is \" . $day[$d0] . \"\\n\";\n }", "public function updateDays()\n {\n $paddedWeekNo = sprintf('%02d', $this->weekNo);\n $day = Sunny::parse($this->year . '-W' . $paddedWeekNo . '-1', $this->timezone);\n\n $this->days = new Collection;\n $this->days->put(Sunny::MONDAY, $day);\n $this->days->put(Sunny::TUESDAY, $day->copy()->next(Sunny::TUESDAY));\n $this->days->put(Sunny::WEDNESDAY, $day->copy()->next(Sunny::WEDNESDAY));\n $this->days->put(Sunny::THURSDAY, $day->copy()->next(Sunny::THURSDAY));\n $this->days->put(Sunny::FRIDAY, $day->copy()->next(Sunny::FRIDAY));\n $this->days->put(Sunny::SATURDAY, $day->copy()->next(Sunny::SATURDAY));\n $this->days->put(Sunny::SUNDAY, $day->copy()->next(Sunny::SUNDAY));\n\n $this->setLocation($this->latitude, $this->longitude);\n\n return $this;\n }", "public function getDayOfWeek()\n {\n return $this->dayOfWeek;\n }", "public function setNearday(){\n\t\n\t$this_month_day=$this->getMonth_day();\n\t\n\tif($this->day!=1 && $this->day!=$this_month_day){\n\t\t\n\t\t$this->predate=$this->makeDate($this->month,$this->day-1);\n\t\t\n\t\t$this->nextdate=$this->makeDate($this->month,$this->day+1);\n\t\t\n\t\t\n\t\t\n\t}elseif($this->day==1){\n\t\t\n\t\t$pre_month=$this->month==1?12:($this->month-1);\n\t\t\n\t\t$pre_month_day=$this->getMonth_day($pre_month);\n\t\t\n\t\t$this->predate=$this->makeDate($pre_month,$pre_month_day);\n\t\t\n\t\t$this->nextdate=$this->makeDate($this->month,2);\n\t\t\n\t}else{\n\t\t\n\t\t$this->predate=$this->makeDate($this->month,$this->day-1);\n\t\t\n\t\t$next_month=$this->month==12?1:($this->month+1);\n\t\t\n\t\t$this->nextdate=$this->makeDate($next_month,1);\n\n\t\t}\n\t\t\n\treturn;\n\n\t}", "function draw_calendar($month,$year){\r\n\t/*Naredi koledar*/\r\n\t$calendar = '<table cellpadding=\"0\" cellspacing=\"0\" class=\"calendar\">';\r\n\t\r\n\t$headings = array('Nedelja','Ponedeljek','Torek','Sreda','Cetrtek','Petek','Sobota');\r\n\t$calendar.= '<tr class=\"calendar-row\"><td class=\"calendar-day-head\">'.implode('</td><td class=\"calendar-day-head\">',$headings).'</td></tr>';\r\n\r\n\t$running_day = date('w',mktime(0,0,0,$month,1,$year));\r\n\t$days_in_month = date('t',mktime(0,0,0,$month,1,$year));\r\n\t$days_in_this_week = 1;\r\n\t$day_counter = 0;\r\n\t$dates_array = array();\r\n\r\n\t$calendar.= '<tr class=\"calendar-row\">';\r\n\r\n\tfor($x = 0; $x < $running_day; $x++):\r\n\t\t$calendar.= '<td class=\"calendar-day-np\">&nbsp;</td>';\r\n\t\t$days_in_this_week++;\r\n\tendfor;\r\n\r\n\tfor($list_day = 1; $list_day <= $days_in_month; $list_day++):\r\n\t\tif($list_day < 10) {\r\n $list_day = str_pad($list_day, 2, '0', STR_PAD_LEFT);\r\n }\r\n\t\t$month = str_pad($month, 2, '0', STR_PAD_LEFT);\r\n\t\t$event_day = $year.'-'.$month.'-'.$list_day;\r\n\r\n\t\t$calendar.= '<td class=\"calendar-day\"><div name=\"test\" style=\"height:100px; width:120px; overflow: auto; white-space:nowrap\" id=' .$event_day. ' onclick=\"modal(this.id);\">';\r\n\t\t$calendar.= '<div>'.$list_day.'</div>';\t\r\n\t\t$query = \"SELECT CONCAT_WS(' ',s.firstname,s.lastname) as Zaposleni, a.name, aa.aktivnost_id\r\n\t\t\tFROM ost_staff s, ost_agent_aktivnost aa, ost_aktivnosti a\r\n\t\t\tWHERE s.staff_id = aa.staff_id and a.id=aa.aktivnost_id and '$event_day' BETWEEN aa.aktivnost_od AND aa.aktivnost_do AND aa.aktivnost_id > 1 AND aa.aktivnost_id != 9 AND aa.aktivnost_id != 10\";\r\n\t\t\t$result = db_query($query) or die('Ne morem pridobiti rezultata!');\r\n\t\t\twhile($row = db_fetch_array($result)) {\r\n\t\t\t\t$words = explode(' ',$row['Zaposleni']);\r\n\t\t\t\t$calendar .= '<div>'.$words[0][0].'. '.$words[1][0].'. : '.$row['name'].'</div>';\r\n\t\t\t}\r\n\t\t$calendar.= '</div></td>';\r\n\t\tif($running_day == 6):\r\n\t\t\t$calendar.= '</tr>';\r\n\t\t\tif(($day_counter+1) != $days_in_month):\r\n\t\t\t\t$calendar.= '<tr class=\"calendar-row\">';\r\n\t\t\tendif;\r\n\t\t\t$running_day = -1;\r\n\t\t\t$days_in_this_week = 0;\r\n\t\tendif;\r\n\t\t$days_in_this_week++; $running_day++; $day_counter++;\r\n\tendfor;\r\n\r\n\tif($days_in_this_week < 8):\r\n\t\tfor($x = 1; $x <= (8 - $days_in_this_week); $x++):\r\n\t\t\t$calendar.= '<td class=\"calendar-day-np\">&nbsp;</td>';\r\n\t\tendfor;\r\n\tendif;\r\n\r\n\t$calendar.= '</tr>';\r\n\r\n\t$calendar.= '</table>';\r\n\r\n\t$calendar = str_replace('</td>','</td>'.\"\\n\",$calendar);\r\n\t$calendar = str_replace('</tr>','</tr>'.\"\\n\",$calendar);\r\n\r\n\treturn $calendar;\r\n}", "private function dd_weekdays_select_field()\n {\n $week_days_timeslots_fields = array( \n 'sections'\t=> array(\n array(\n 'id'\t\t\t\t=> 'dd_dash_current_dates_section', \n 'title'\t\t\t=> '', \n 'desc'\t\t\t=> '',\n ),\n ),\n 'fields'\t\t=> array(\n array(\n 'id'\t\t\t\t\t=> 'dd_dash_monday_field', \n 'title'\t\t\t\t=> 'Monday', \n 'section_id'\t=> 'dd_dash_current_dates_section',\n ),\n array(\n 'id'\t\t\t\t\t=> 'dd_dash_tuesday_field', \n 'title'\t\t\t\t=> 'Tuesday', \n 'section_id'\t=> 'dd_dash_current_dates_section',\n ),\n array(\n 'id'\t\t\t\t\t=> 'dd_dash_wednesday_field', \n 'title'\t\t\t\t=> 'Wednesday', \n 'section_id'\t=> 'dd_dash_current_dates_section',\n ),\n array(\n 'id'\t\t\t\t\t=> 'dd_dash_thursday_field', \n 'title'\t\t\t\t=> 'Thursday', \n 'section_id'\t=> 'dd_dash_current_dates_section',\n ),\n array(\n 'id'\t\t\t\t\t=> 'dd_dash_friday_field', \n 'title'\t\t\t\t=> 'Friday', \n 'section_id'\t=> 'dd_dash_current_dates_section',\n ),\n array(\n 'id'\t\t\t\t\t=> 'dd_dash_saturday_field', \n 'title'\t\t\t\t=> 'Saturday', \n 'section_id'\t=> 'dd_dash_current_dates_section',\n ),\n array(\n 'id'\t\t\t\t\t=> 'dd_dash_sunday_field', \n 'title'\t\t\t\t=> 'Sunday', \n 'section_id'\t=> 'dd_dash_current_dates_section',\n )\n )\n );\n \n $GLOBALS['dd_weekdays_timeslots'] = $week_days_timeslots_fields ;\n }", "public function IsFlagDay() {\n // static days\n switch($this->GetMonth() . \"-\" . $this->GetDay()) {\n case \"01-01\":\n return \"Nyårsdagen\";\n case \"01-28\":\n return \"Konung Carl XVI Gustafs namnsdag\";\n case \"02-23\":\n return \"Kronprinsessan Estelles födelsedag\";\n case \"03-12\":\n return \"Kronprinsessan Victorias namnsdag\";\n case \"04-30\":\n return \"Konung Carl XVI Gustafs födelsedag\";\n case \"05-01\":\n return \"Första maj\";\n case \"06-06\":\n return \"Sveriges nationaldag\";\n case \"07-14\":\n return \"Kronprinsessan Victorias födelsedag\";\n case \"08-08\":\n return \"Drottning Silvias namnsdag\";\n case \"08-15\":\n return \"Kronprinsessan Estelles namnsdag\";\n case \"10-24\":\n return \"FN-dagen\";\n case \"11-06\":\n return \"Gustav Adolfsdagen\";\n case \"12-10\":\n return \"Nobeldagen\";\n case \"12-23\":\n return \"Silvias födelsedag\";\n case \"12-25\":\n return \"Juldagen\";\n }\n \n // dynamic days\n switch($this->GetYear() . \"-\" . $this->GetMonth() . \"-\" . $this->GetDay()) { \n case \"2014-04-20\":\n case \"2015-04-05\":\n case \"2016-03-27\":\n return \"Påskdagen\";\n case \"2014-06-08\":\n case \"2015-05-24\":\n case \"2016-05-15\":\n return \"Pingstdagen\";\n case \"2014-06-08\":\n case \"2015-06-20\":\n case \"2016-06-25\":\n return \"Midsommardagen\";\n case \"2014-09-14\":\n return \"Riksdagsvalet\";\n }\n \n return false;\n }", "function table($month){\n //Feb-28, 4 weeks\n //Nov-30, 5 weeks\n //Dec and Jan: 31 5 weeks\n $ctn = 1;\n echo \"<table>\";\n if($month == \"February\"){\n for($i = 0; $i < 4; $i++){\n echo \"<tr>\";\n for($k = 0; $k < 7; $k++){\n echo \"<td>\". $ctn . \"</td>\";\n $ctn++;\n }\n echo \"</tr>\";\n }\n }\n if($month == \"December\" || $month == \"January\" || $month == \"November\"){\n for($i = 0; $i < 5; $i++){\n echo \"<tr>\";\n for($k = 0; $k < 7; $k++){\n if($month == \"December\" || $month == \"January\"){\n if($ctn < 32){\n echo \"<td>\". $ctn . \"</td>\";\n $ctn++; \n } \n }\n if($month == \"November\"){\n if($ctn < 31){\n echo \"<td>\". $ctn . \"</td>\";\n $ctn++; \n } \n }\n }\n echo \"</tr>\";\n }\n }\n\n}", "public function getDayOfWeek()\r\n {\r\n return date('N', $this->getTimestampUnix());\r\n }", "public function setDaysOfWeek(?array $value): void {\n $this->getBackingStore()->set('daysOfWeek', $value);\n }", "function getCalender($year = '', $month = '') {\n $dateYear = ($year != '') ? $year : date(\"Y\");\n $dateMonth = ($month != '') ? $month : date(\"m\");\n $date = $dateYear . '-' . $dateMonth . '-01';\n $currentMonthFirstDay = date(\"N\", strtotime($date));\n $totalDaysOfMonth = cal_days_in_month(CAL_GREGORIAN, $dateMonth, $dateYear);\n $totalDaysOfMonthDisplay = ($currentMonthFirstDay == 7) ? ($totalDaysOfMonth) : ($totalDaysOfMonth + $currentMonthFirstDay);\n $boxDisplay = ($totalDaysOfMonthDisplay <= 35) ? 35 : 42;\n ?>\n <div id='calendar_section'>\n <div id=\"calender_section\" class=\"month\">\n <table>\n <ul>\n <h2 name=\"month_dropdown\" disabled=\"\" class=\"month_dropdown dropdown\" value='<?php echo getAllMonths($dateMonth); ?>'>\n <?php\n if ($dateMonth === \"01\") {\n echo \"January\";\n } elseif ($dateMonth === \"02\") {\n echo \"February\";\n } elseif ($dateMonth === \"03\") {\n echo \"March\";\n } elseif ($dateMonth === \"04\") {\n echo \"April\";\n } elseif ($dateMonth === \"05\") {\n echo \"May\";\n } elseif ($dateMonth === \"06\") {\n echo \"June\";\n } elseif ($dateMonth == \"07\") {\n echo \"July\";\n } elseif ($dateMonth === \"08\") {\n echo \"August\";\n } elseif ($dateMonth === \"09\") {\n echo \"September\";\n } elseif ($dateMonth === \"10\") {\n echo \"October\";\n } elseif ($dateMonth === \"11\") {\n echo \"November\";\n } elseif ($dateMonth === \"12\") {\n echo \"December\";\n }\n ?> <?php echo ' ' .($dateYear); ?></h2>\n \n </ul>\n </table>\n\n <div id=\"calender_section_top\">\n <ul>\n <li>Sun</li>\n <li>Mon</li>\n <li>Tue</li>\n <li>Wed</li>\n <li>Thu</li>\n <li>Fri</li>\n <li>Sat</li>\n </ul>\n </div>\n <div id=\"calender_section_bot\">\n <ul>\n <?php\n $dayCount = 1;\n\n\n $time_slot = ($_GET['time_slot']);\n $med = ($_GET['med']);\n $res = ($_GET['res']);\n $emp = ($_GET['emp']);\n for ($cb = 1; $cb <= $boxDisplay; $cb++) {\n if (($cb >= $currentMonthFirstDay + 1 || $currentMonthFirstDay == 7) && $cb <= ($totalDaysOfMonthDisplay)) {\n //Current date\n if ($dayCount <= 9) {\n $currentDate = $dateYear . '-' . $dateMonth . '-' . '0' . $dayCount;\n ;\n } else {\n $currentDate = $dateYear . '-' . $dateMonth . '-' . $dayCount;\n }\n\n $eventNum = 0;\n //Include con configuration file\n include 'config.php';\n //Get number of events based on the current date\n $result = $con->query(\"SELECT * FROM med_records WHERE entry_date = '\" . $currentDate . \"' AND time_slot = '\" . $time_slot . \"' AND med_name = '$med'\");\n $eventNum = $result->num_rows;\n $eventrow = mysqli_fetch_array($result);\n //Define date cell color\n if (strtotime($currentDate) == strtotime(date(\"Y-m-d\"))) {\n echo '<li date=\"' . $currentDate . '\" class=\"grey date_cell\" >';\n } elseif ($eventNum > 0) {\n echo '<li date=\"' . $currentDate . '\" class=\"light_sky date_cell\" >';\n } else {\n echo '<li date=\"' . $currentDate . '\" class=\"date_cell\" >';\n }\n //Date cell\n echo '<span>';\n if ($eventNum > 0) {\n echo '<input class=\"calendar_button\" type=\"button\" id=' . $currentDate . ' name=\"date[]\" value=' . $dayCount . ' \">';\n echo '<strong class=\"existRecord\" >';\n echo $eventrow['status'];\n echo '</strong>';\n } else {\n echo '<input class=\"calendar_button\" type=\"button\" id=' . $currentDate . ' name=\"date[]\" value=' . $dayCount . ' onclick=\"MedRecordEntryModalOpen(this.id)\">';\n }\n echo '</span>';\n\n\n echo '</li>';\n $dayCount++;\n ?>\n <?php } else { ?>\n <li><span></span></li>\n <?php\n }\n }\n ?>\n </ul></div>\n </div>\n </div>\n <?php\n}", "function SundayColumnHeader() {\n\t\tif (func_num_args()) {\n\t\t\t$this->_SundayColumnHeader = trim(func_get_arg(0));\n\t\t}\n\t\telse return $this->_SundayColumnHeader;\n\t}", "function build_calendar($month,$year,$dateArray) {\n $daysOfWeek = array('S','M','T','W','T','F','S');\n\n // What is the first day of the month in question?\n $firstDayOfMonth = mktime(0,0,0,$month,1,$year);\n\n // How many days does this month contain?\n $numberDays = date('t',$firstDayOfMonth);\n\n // Retrieve some information about the first day of the\n // month in question.\n $dateComponents = getdate($firstDayOfMonth);\n\n // What is the name of the month in question?\n $monthName = $dateComponents['month'];\n\n // What is the index value (0-6) of the first day of the\n // month in question.\n $dayOfWeek = $dateComponents['wday'];\n\n // Create the table tag opener and day headers\n\n $calendar = \"<table class='calendar'>\";\n $calendar .= \"<caption>$monthName $year</caption>\";\n $calendar .= \"<tr>\";\n\n // Create the calendar headers\n\n foreach($daysOfWeek as $day) {\n $calendar .= \"<th class='header'>$day</th>\";\n }\n\n // Create the rest of the calendar\n\n // Initiate the day counter, starting with the 1st.\n\n $currentDay = 1;\n\n $calendar .= \"</tr><tr>\";\n\n // The variable $dayOfWeek is used to\n // ensure that the calendar\n // display consists of exactly 7 columns.\n\n if ($dayOfWeek > 0) {\n $calendar .= \"<td colspan='$dayOfWeek'>&nbsp;</td>\";\n }\n\n $month = str_pad($month, 2, \"0\", STR_PAD_LEFT);\n\n while ($currentDay <= $numberDays) {\n\n // Seventh column (Saturday) reached. Start a new row.\n\n if ($dayOfWeek == 7) {\n\n $dayOfWeek = 0;\n $calendar .= \"</tr><tr>\";\n\n }\n\n $currentDayRel = str_pad($currentDay, 2, \"0\", STR_PAD_LEFT);\n\n $date = \"$year-$month-$currentDayRel\";\n\n $calendar .= \"<td class='day' rel='$date'>$currentDay</td>\";\n\n // Increment counters\n\n $currentDay++;\n $dayOfWeek++;\n\n }\n\n\n\n // Complete the row of the last week in month, if necessary\n\n if ($dayOfWeek != 7) {\n\n $remainingDays = 7 - $dayOfWeek;\n $calendar .= \"<td colspan='$remainingDays'>&nbsp;</td>\";\n\n }\n\n $calendar .= \"</tr>\";\n\n $calendar .= \"</table>\";\n\n return $calendar;\n\n}", "function calendar($date) {\r\n\t //If no parameter is passed use the current date.\r\n\t if($date == null)\r\n\t $date = getDate();\r\n\r\n\t $day \t\t\t= $date[\"mday\"];\r\n\t $month \t\t= $date[\"mon\"];\r\n\t $month_name \t= $date[\"month\"];\r\n\t $year \t\t\t= $date[\"year\"];\r\n\r\n\t $this_month \t= getDate(mktime(0, 0, 0, $month, 1, $year));\r\n\t $next_month \t= getDate(mktime(0, 0, 0, $month + 1, 1, $year));\r\n\r\n\t //Find out when this month starts and ends.\r\n\t $first_week_day = $this_month[\"wday\"];\r\n\t $days_in_this_month = round(($next_month[0] - $this_month[0]) / (60 * 60 * 24));\r\n\r\n\t $calendar_html = \"<table width='100%'>\";\r\n\t $calendar_html = $calendar_html.\"<tr>\t<td class='perp_report_header' colspan='7' /> Month: \".$month_name.\" / Year: \".$year.\"</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\";\r\n\t $calendar_html = $calendar_html.\"<tr>\t<td class='perp_report_subheader'>Sunday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='perp_report_subheader'>Monday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='perp_report_subheader'>Tuesday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='perp_report_subheader'>Wednesday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='perp_report_subheader'>Thursday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='perp_report_subheader'>Friday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='perp_report_subheader'>Saterday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t\t<tr>\";\r\n\r\n\t// Fill the first week of the month with the appropriate number of blanks.\r\n\t\t\t$gapcounter = 0;\r\n\t\t\tfor($week_day = 0; $week_day < $first_week_day; $week_day++) {\r\n\t\t\t\t\t$gapcounter = $gapcounter + 1;\r\n\t\t\t\t}\r\n\t\t\t$calendar_html = $calendar_html.\"<td class='perp_report_cell' colspan='\".$gapcounter.\"'></td>\";\t\r\n\t\r\n\t// Draw Calendar Elements\r\n\t\t\t// I forget!\t\t\t\t\r\n\t $week_day = $first_week_day;\r\n\t for($day_counter = 1; $day_counter <= $days_in_this_month; $day_counter++) {\r\n\t\t\t\t\t// Determine Day of the week\r\n\t\t\t\t\t$week_day %= 7;\r\n\t\t\t\t\r\n\t\t\t\t\t// If this variable equals 0, we will need to start a new row.\r\n\t\t\t\t\tif($week_day == 0) {\r\n\t\t\t\t\t\t\t$calendar_html = $calendar_html.\"</tr><tr>\";\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$datetopull = $year.\"/\".$month.\"/\".$day_counter;\r\n\t\t\t\t\t$innercell = \"<TABLE width='100%' style='margin-bottom:0;margin-top:0;'><tr><td class='perp_report_fieldname'>Date:</td><td class='perp_report_fieldcontent'>\".$datetopull.\"</td></tr>\";\r\n\t\t\t\t\t//Now Get inspection List for this day.....\r\n\t\t\t\t\t$objconn = mysqli_connect($GLOBALS['hostdomain'], $GLOBALS['hostusername'], $GLOBALS['passwordofdatabase'], $GLOBALS['nameofdatabase']);\t\t\t\t\t\r\n\t\t\t\t\tif (mysqli_connect_errno()) {\r\n\t\t\t\t\t\t\t// there was an error trying to connect to the mysql database\r\n\t\t\t\t\t\t\t//printf(\"connect failed: %s\\n\", mysqli_connect_error());\r\n\t\t\t\t\t\t\texit();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t$sql = \"SELECT * FROM tbl_139_337_main WHERE 139337_date = '\".$datetopull.\"' ORDER BY 139337_time\";\r\n\t\t\t\t\t\t\t//echo \"The SQL Statement is :\".$sql.\"<br>\";\r\n\t\t\t\t\t\t\t$objrs = mysqli_query($objconn, $sql);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\tif ($objrs) {\r\n\t\t\t\t\t\t\t\t\t$number_of_rows = mysqli_num_rows($objrs);\r\n\t\t\t\t\t\t\t\t\twhile ($objarray = mysqli_fetch_array($objrs, MYSQLI_ASSOC)) {\r\n\t\t\t\t\t\t\t\t\t\t$counter = $counter + 1;\r\n\t\t\t\t\t\t\t\t\t\t\t$counter = $counter + 1;\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// So the Archieved or Duplicate Narrowing...\r\n\t\t\t\t\t\t\t\t\t\t\t$displayrow\t\t\t\t\t= 0;\r\n\t\t\t\t\t\t\t\t\t\t\t$displayrow_a\t\t\t\t= 0;\r\n\t\t\t\t\t\t\t\t\t\t\t$displayrow_b\t\t\t\t= 0;\r\n\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t$tmpdiscrepancyid\t\t\t= $objarray['Discrepancy_id'];\r\n\t\t\t\t\t\t\t\t\t\t\t$tmpdiscrepancycondition\t= $objarray['discrepancy_checklist_id'];\t\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$displayrow_a\t\t\t\t= preflights_tbl_139_337_main_a_yn($tmpdiscrepancyid,0); // 0 will not return a row even if it is archieved.\r\n\t\t\t\t\t\t\t\t\t\t\t//$displayrow_d\t\t\t\t= preflights_tbl_139_327_main_sub_d_d_yn($tmpdiscrepancyid,0); // 0 will not return a row even if it is duplicate.\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tif($displayrow_a == 1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$displayrow = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif($displayrow_d == 1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$displayrow = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\tif($displayrow_d == 1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$displayrow = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif($displayrow_a == 1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$displayrow = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\tif ($displayrow == 1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$innercell = $innercell.\"<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<form style='margin-bottom:0;' action='part139337_report_display.php' method='POST' name='reportform' id='reportform' target='WLHMWindow' onsubmit='window.open('', 'WLHMWindow', 'width=800,height=600,status=no,resizable=no,scrollbars=yes')'>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td colspan='2' class='formoptionsubmit'>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type='hidden' name='recordid'\tID='recordid' \t\t\tvalue=\".$tmpdiscrepancyid.\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type='submit' value='D:\".$tmpdiscrepancyid.\"' name='b1' ID='b1' class='makebuttonlooklikelargetext' style='width:100%;'>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</form>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t$innercell = $innercell.\"</table>\";\t\r\n\t\t\t\t\tif ($counter == 0) {\r\n\t\t\t\t\t\t\t$innercell = $innercell.\"Nothing Reported\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t$calendar_html = $calendar_html.\"<td align=\\\"center\\\" valign='top' class='perp_report_activecell'>&nbsp;\".$innercell.\"</td>\";\r\n\t\t\t\t\t$week_day++;\r\n\t\t\t\t\t$counter = 0;\r\n\t\t\t\t}\r\n\r\n\t $calendar_html .= \"</tr>\";\r\n\t $calendar_html .= \"</table>\";\r\n\r\n\t return($calendar_html);\r\n\t }", "private function checkSevenDayInCol():bool\n {\n $stmt = $this->pdo->query(\"SHOW COLUMNS FROM `distribution_municipalities` LIKE '%_sevendayin'\");\n return !is_bool($stmt->fetch());\n }", "function displayCurrentMonthCalenderAsTable()\n{\nglobal $year; // this year\nglobal $month; // this month\nglobal $id;\n$day=1; // start from first of month\nglobal $crypted;\nglobal $month_caption; // caption to table\n$lastmonth = $month - 1;\n$nextmonth = $month +1;\n$lastyear = $year - 1;\n$nextyear = $year + 1;\necho \"<table summary=\\\"Monthly calendar\\\" onMouseover= changeto('#CCCCCC') onMouseout= changeback('white') width = 757 cellspacing= 2 cellpadding= 2 id= ignore class=\\\"sk_bok_green\\\">\n<caption ><a href=comm.php?crypted=$_GET[crypted]&calender&lastyear=$lastyear ><font color=green>Last Year</font></a>&nbsp;&nbsp;&nbsp;<a href=comm.php?crypted=$_GET[crypted]&calender&last=$lastmonth&year=$year><font color=green>Last Month</a>&nbsp;&nbsp;&nbsp; <b>[$month_caption ]</b> &nbsp;&nbsp;&nbsp;<a href=comm.php?crypted=$_GET[crypted]&calender&next=$nextmonth&year=$year><font color= green>Next Month</font></a> &nbsp;<a href=comm.php?crypted=$_GET[crypted]&calender&lastyear=$nextyear><font color= green>Next Year<font></a></caption>\n<tr align=center id=ignore>\n<th width =308 id=ignore bgcolor=#FFC56C ><font color =Red>Sun</font></th>\n<th width =308 id=ignore bgcolor=#FFC56C><font color =Green>Mon</font></th>\n<th width =308 id=ignore bgcolor=#FFC56C><font color =Green>Tue</font></th>\n<th width =308 id=ignore bgcolor=#FFC56C><font color =Green>Wed</font></th>\n<th width =308 id=ignore bgcolor=#FFC56C><font color =Green>Thu</font></th>\n<th width =308 id=ignore bgcolor=#FFC56C><font color =Green>Fri</font></th> \n<th width =308 id=ignore bgcolor=#FFC56C><font color =blue>Sat</font></th> \n</tr>\\n\"; \n\n$ts = mktime(0,0,0,$month,$day,$year); // unix timestamp of the first day of current month\n$weekday_first_day = date(\"w\",$ts); // which is the weekday of the first day of week 0-Sunday 6-Saturday\n//$my_format = date(\"d-m-Y\");\n$slot=0;\n\nprint \"<tr align=center >\\n\"; // First row starts\nfor($i=0;$i<$weekday_first_day;$i++) // Pad the first few rows(slots)\n{\nprint \" <td id=ignore width =308></td>\"; // Empty slots \n$slot++;\n}\n\tif($day == '')\n\t{\n\t\t$ig = 'ignore';\n\t\techo \">>\";\n\t}\n\nwhile(checkdate($month,$day,$year) && $date<32) // till there are valid days in current month\n{\nif($slot == 7) // if we moved past saturday\n{\n$slot = 0; // reset and move back to sunday\nprint \"</tr>\\n\"; // end of this row\nprint \"<tr align=center width =50>\\n\"; // move on to next row\n\n}\n\t//$system_date = '$day-$month-$year';\n\t//$db_date = date('d-m-Y',$day $month $year);\n\t$system_date = mktime(0, 0, 0, $month, $day, $year);\n\t$db_date = date('d-m-Y',$system_date);\n\t$db_date_search = explode('-',$db_date);\n\t//print_r($db_date_search);\n\t$search_date = mktime(0, 0, 0, $month, $day);\n\t$search_date = sprintf(date('d-m-',$search_date));\n\t$month_no = $db_date_search[1];\n\t $query =\"select * from calender_event where active = '1' and day = '$db_date_search[0]' and `month_no` = '$month_no' and year = '$db_date_search[2]' \";\n\t\n\t$result = mysql_query($query) or die(mysql_error());\n\t$count = mysql_num_rows($result);\n\t/* echo $query;\n\techo $count; */\n\t$tr = 0;\n\t\n\tif($count != '0')\n\t{\t$msg .= \"<table id=ignore width=100%>\";\n\t\twhile($row=mysql_fetch_array($result))\n\t\t{\n\t\t\n\t\tif($row[popup] =='1')\n\t\t{\n\t\t\t$popup_link = \" onmouseout=\\\"hideTooltip()\\\" onmouseover=\\\"showTooltip(event,'$row[pop_msg]'\";\n\t\t\n\t\t}else\n\t\t{\n\t\t\t$popup_link =\"\";\n\t\t}\n\t\t\n\t\t$msg .= \"<tr ><td id=ignore bgcolor=green>$row[heading]</td></tr><tr><td id=ignore bgcolor=white><a href=\\\"comm.php?crypted=$_GET[crypted]&last=$month_no&year=$db_date_search[2]&calender&edit_event=$row[sno]\\\" $popup_link);return false\\\">$row[details]</a></td></tr>\";\n\t\t}\n\t\t$msg .= \"</table>\";\n\t}else\n\t{\n\t\t$msg ='';\n\t\n\t}\n\t//chking all db\n\t$color = \"bgcolor = white\";\n\techo \"<td $color id=$idd width =308 hight=308><DIV align=center id= tips><a href = #><font color=black><a href=comm.php?crypted=$_GET[crypted]&last=$month_no&year=$db_date_search[2]&calender&add_event=$db_date_search[0]-$db_date_search[1]-$db_date_search[2]>$day</a> </font>\n\t\t\n\t\t \";\n\t\n\t\n\t\techo \"</div ></a>$msg</div ></td>\";\n$msg ='';\n\t\n\n$day++;\n$slot++;\n}\n\nif($slot>0) // have we started off a new last row \n{\nwhile($slot<7) // padding at the end to complete the last row table\n{\nprint \" <td id=ignore></td>\"; // empty slots\n$slot++;\n}\nprint \"\\n</tr>\\n\"; // close out last row\n}\nprint '</table>'; //end of table\n}", "function mondayFirst()\r\n {\r\n if ( $this->MondayFirst == \"yes\" )\r\n {\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n }", "function day_cell_html($text, $link, $date)\n{\n $html = '';\n $html .= tdcell(\"row_labels\", 1, array('name' => 'date', 'value' => $date));\n $html .= \"<div class=\\\"celldiv slots1\\\">\\n\";\n $html .= \"<a href=\\\"$link\\\" title=\\\"\" . get_vocab(\"viewday\") . \"\\\">$text</a>\\n\";\n $html .= \"</div></td>\\n\";\n return $html;\n}", "function Showschedulesoftheday($day){\r\n\tglobal $conn;\r\n\t$k=0;\r\n\r\n\t$query = \"SELECT * FROM schedules WHERE day ='\".$day.\"'\";\r\n\t$res = mysql_query($query,$conn);\r\n\twhile ($rows = mysql_fetch_array($res)){\r\n\t\tif($rows['onoff'] == 1){\r\n\t\t\t$k++;\r\n\t\t\techo \"<li data-corners='false' data-shadow='false' data-iconshadow='true' data-wrapperels='div' data-icon='arrow-r' data-iconpos='right' data-theme='c' class='ui-btn ui-btn-icon-right ui-li-has-arrow ui-li ui-btn-up-c'><div class='ui-btn-inner ui-li'><div class='ui-btn-text'><a href='schedules.php?id=\".$rows['id'].\"' class='ui-link-inherit'>\".$rows['title'].\"</a></div><span class='ui-icon ui-icon-arrow-r ui-icon-shadow'>&nbsp;</span></div></li>\";\r\n\t\t}\r\n\t}\r\n\r\n\tif($k==0){\r\n\t\techo \"<li data-corners='false' data-shadow='false' data-iconshadow='true' data-wrapperels='div' data-theme='c' class='ui-li ui-li-static ui-btn-up-c'><div class='ui-btn-inner ui-li'><div class='ui-btn-text'>No schedules.</div></div></li>\";\r\n\t}\r\n\r\n}", "protected function getMonthHTML(\n $month,\n $mth_num,\n $opt,\n $year_num,\n $table_cols,\n $first_weekday,\n $today\n ) {\n $cal = '<tr>';\n // insert month name into first column of row\n $cal .= $this->getMonthNameHTML($mth_num);\n $cur_day = 0;\n for ($col = 0; $col < $table_cols; $col++) {\n $weekday_num = ($col + $first_weekday) % 7; // current day of week as a number\n\n // current day is only valid if within the month's days, and at the correct starting day\n if (($cur_day > 0 && $cur_day < $month['len']) || ($col < 7 && $weekday_num == $month['start'])) {\n $cur_day++;\n $cal .= $this->getDayHTML($cur_day, $mth_num, $today, $year_num, $weekday_num, $opt);\n } else {\n $cur_day = 0;\n $cal .= $this->getEmptyCellHTML();\n }\n }\n $cal .= '</tr>';\n\n return $cal;\n }", "public function getDayOfWeek()\n {\n return $this->day_of_week;\n }", "public function is_day()\n {\n }", "function drawCalendar($month, $year) {\n $first = mktime(0,0,0,$month,1,$year); // timestamp for first of the month\n $offset = date('w', $first); // what day of the week we start counting on\n $daysInMonth = date('t', $first);\n $monthName = date('F', $first);\n $weekDays = array('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat');\n $eventDays = getEventDays($month, $year);\n \n // Start drawing calendar\n $out = \"<table id=\\\"myCalendar\\\">\\n\";\n $out .= \"<tr><th colspan=\\\"3\\\">$monthName $year</th></tr>\\n\";\n $out .= \"<tr>\";\n foreach ($weekDays as $wd) $out .= \"<td class=\\\"weekDays\\\">$wd</td>\\n\";\n\n\n // Previous month link\n $prevTS = strtotime(\"$year-$month-01 -1 month\"); // timestamp of the first of last month\n $pMax = date('t', $prevTS);\n $pDay = ($day > $pMax) ? $pMax : $day;\n list($y, $m) = explode('-', date('Y-m', $prevTS)); \n $pMax = date('t', $prevTS);\n $pDay = ($day > $pMax) ? $pMax : $day;\n list($y, $m) = explode('-', date('Y-m', $prevTS));\n echo \"<p>\";\n echo \"<a href=\\\"?year=$year&month=$m&day=$pDay\\\"><< Prev</a>\\n\";\n\n // Next month link\n $nextTS = strtotime(\"$year-$month-01 +1 month\");\n $nMax = date('t', $nextTS);\n $nDay = ($day > $nMax) ? $nMax : $day;\n list($y, $m) = explode('-', date('Y-m', $nextTS));\n echo \"<a href=\\\"?year=$y&month=$m&day=$nDay\\\">Next >></a>\\n\";\n echo \"</p>\";\n\n\n // Build Previous and Next Links from untitled-6\n //$previous_link = \"<a href=\\\"\".$_SERVER['PHP_SELF'].\"?date=\";\n //if($month == 1){\n // $previous_link .= mktime(0,0,0,12,$day,($year -1));\n //} else {\n // $previous_link .= mktime(0,0,0,($month -1),$day,$year);\n //}\n\n //$previous_link .= \"\\\"><< </a>\";\n\n //$next_link = \"<a href=\\\"\".$_SERVER['PHP_SELF'].\"?date=\";\n //if($month == 12){\n // $next_link .= mktime(0,0,0,1,$day,($year + 1));\n //} else {\n // $next_link .= mktime(0,0,0,($month +1),$day,$year);\n //}\n //$next_link .= \"\\\"> >></a>\";\n\n $i = 0;\n for ($d = (1 - $offset); $d <= $daysInMonth; $d++) {\n if ($i % 7 == 0) $out .= \"<tr>\\n\"; // Start new row\n if ($d < 1) $out .= \"<td class=\\\"nonMonthDay\\\"> </td>\\n\";\n else {\n if (in_array($d, $eventDays)) {\n $out .= \"<td class=\\\"monthDay\\\">\\n\";\n $out .= \"<a href=\\\"?year=$year&month=$month&day=$d\\\">$d</a>\\n\";\n $out .= \"</td>\\n\";\n } else $out .= \"<td class=\\\"monthDay\\\">$d</td>\\n\";\n }\n ++$i; // Increment position counter\n if ($i % 7 == 0) $out .= \"</tr>\\n\"; // End row on the 7th day\n }\n \n // Round out last row if we don't have a full week\n if ($i % 7 != 0) {\n for ($j = 0; $j < (7 - ($i % 7)); $j++) {\n $out .= \"<td class=\\\"nonMonthDay\\\"> </td>\\n\";\n }\n $out .= \"</tr>\\n\";\n }\n \n $out .= \"</table>\\n\";\n \n return $out;\n }", "public function calendar()\n\t{\n\t\t// --------------------------------------\n\t\t// Initiate the date to work with\n\t\t// --------------------------------------\n\n\t\t$this->_init_date();\n\n\t\t// Keep track of given date\n\t\t$given_date = $this->date->date();\n\t\t$given_month = $this->date->month_url();\n\t\t$given_week = ($this->date->given() == 'week') ? $this->date->week_url() : FALSE;\n\n\t\t// --------------------------------------\n\t\t// If a week is given, make sure the thursday\n\t\t// is in the same month, or else advance one month\n\t\t// --------------------------------------\n\n\t\tif ($given_week)\n\t\t{\n\t\t\t// Get the thursday\n\t\t\t$this->date->modify('+ 3 days');\n\n\t\t\tif ($given_month == $this->date->month_url())\n\t\t\t{\n\t\t\t\t// No probs, same month given, reset back to original given date\n\t\t\t\t$this->date->reset();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Thursday is in next month, so set the date to that\n\t\t\t\t$given_date = $this->date->date();\n\t\t\t\t$given_month = $this->date->month_url();\n\t\t\t}\n\t\t}\n\n\t\t// Set date to first of the month\n\t\t$this->date->first_of_month();\n\n\t\t// Get next and previous month\n\t\t$next = new Low_date($this->date->date());\n\t\t$prev = new Low_date($this->date->date());\n\t\t$next->add('month');\n\t\t$prev->sub('month');\n\n\t\t// Days in month\n\t\t$dim = $this->date->days_in_month();\n\n\t\t// Day of the Week\n\t\t$dotw = $this->date->first_day_of_month();\n\n\t\t// Week of the month\n\t\t$wotm = 0;\n\n\t\t// --------------------------------------\n\t\t// Day to start the week\n\t\t// --------------------------------------\n\n\t\t$start_day = strtolower($this->EE->TMPL->fetch_param('start_day'));\n\n\t\t// Force monday on non-existent weekday or if a week is given\n\t\tif ( ! in_array($start_day, $this->weekdays) || $given_week !== FALSE)\n\t\t{\n\t\t\t$start_day = 'monday';\n\t\t}\n\n\t\t$start_day = array_search($start_day, $this->weekdays);\n\n\t\t// --------------------------------------\n\t\t// Calculate number of leading days (prev month)\n\t\t// --------------------------------------\n\n\t\tif ($leading_days = (($dotw - $start_day) + 7) % 7)\n\t\t{\n\t\t\t$this->date->modify(\"- {$leading_days} days\");\n\t\t}\n\n\t\t// Keep track of start date\n\t\t$start_date = $this->date->date();\n\n\t\t// Initiate weeks and weekdays arrays\n\t\t$weeks = $weekdays = $days = array();\n\n\t\t// Initiate day count\n\t\t$day_count = 0;\n\n\t\t// Add leading 0s to day number?\n\t\t$leading = ($this->EE->TMPL->fetch_param('leading_zeroes', 'no') == 'yes');\n\n\t\t// --------------------------------------\n\t\t// Populate weeks array\n\t\t// --------------------------------------\n\n\t\twhile (TRUE)\n\t\t{\n\t\t\t// Initiate week\n\t\t\tif ( ! isset($weeks[$wotm]))\n\t\t\t{\n\t\t\t\t$weeks[$wotm] = array(\n\t\t\t\t\t'days' => array(),\n\t\t\t\t\t'week_url' => $this->date->week_url(),\n\t\t\t\t\t'is_given_week' => ($given_week == $this->date->week_url()) ? 'y' : ''\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Add the day row to the week\n\t\t\t$weeks[$wotm]['days'][] = array(\n\t\t\t\t'day_number' => $leading ? $this->date->day() : intval($this->date->day()),\n\t\t\t\t'day_url' => $this->date->day_url(),\n\t\t\t\t'day' => $this->date->day_url(),\n\t\t\t\t'is_prev' => ($this->date->month_url() == $prev->month_url()) ? 'y' : '',\n\t\t\t\t'is_next' => ($this->date->month_url() == $next->month_url()) ? 'y' : '',\n\t\t\t\t'is_current' => ($this->date->month_url() == $given_month) ? 'y' : '',\n\t\t\t\t'is_given' => ($this->date->given() == 'day' && $this->date->date() == $given_date) ? 'y' : '',\n\t\t\t\t'is_today' => ($this->date->date() == $this->today) ? 'y' : '',\n\t\t\t\t'events_on_day' => 0\n\t\t\t);\n\n\t\t\t// Populate weekdays\n\t\t\tif ( ! $wotm)\n\t\t\t{\n\t\t\t\t$weekdays[] = array(\n\t\t\t\t\t'weekday' => $this->date->ee_format('%l'),\n\t\t\t\t\t'weekday_short' => $this->date->ee_format('%D'),\n\t\t\t\t\t'weekday_1' => substr($this->date->ee_format('%D'), 0, 1)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Advance by one day\n\t\t\t$this->date->add('day');\n\n\t\t\t// if days is divisible by 7, a week is done\n\t\t\tif ($done = ! (++$day_count % 7))\n\t\t\t{\n\t\t\t\t// If we're caught up with the next month too, exit the loop\n\t\t\t\tif ($this->date->month_url() == $next->month_url()) break;\n\n\t\t\t\t// Or else just increase the week of the month\n\t\t\t\t$wotm++;\n\t\t\t}\n\t\t}\n\n\t\t// End date\n\t\t$end_date = $this->date->date();\n\t\t$this->date->reset();\n\n\t\t$this->_log(\"Initiated calendar from {$start_date} to {$end_date}\");\n\n\t\t// --------------------------------------\n\t\t// Get events for this calendar range\n\t\t// --------------------------------------\n\n\t\t// Initiate events\n\t\t$events = $entries = array();\n\n\t\t$this->model->where_range($start_date, $end_date, TRUE, 'e');\n\n\t\t// Query the rest of the entry details if there are events present\n\t\tif ($entries = $this->_get_event_entries())\n\t\t{\n\t\t\tforeach ($entries AS $row)\n\t\t\t{\n\t\t\t\t// Skip the ones not found in $entries\n\t\t\t\tif ($row['start_date'] == $row['end_date'])\n\t\t\t\t{\n\t\t\t\t\t$events[$row['start_date']][] = $row;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Assign each day between start and end to events array\n\t\t\t\t\t$date = new Low_date($row['start_date']);\n\n\t\t\t\t\twhile (($start = $date->date()) <= $row['end_date'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$events[$start][] = $row;\n\t\t\t\t\t\t$date->add('day');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// No events in this range\n\t\t}\n\n\t\t// Keep track of total events found\n\t\t$total_entries = count($entries);\n\t\t$total_days = count($events);\n\n\t\t$this->_log(\"In this range: {$total_entries} entries, spanning {$total_days} days\");\n\n\t\t// --------------------------------------\n\t\t// Assign entry count to days\n\t\t// --------------------------------------\n\n\t\tif ($events)\n\t\t{\n\t\t\tforeach ($weeks AS &$week)\n\t\t\t{\n\t\t\t\tforeach ($week['days'] AS &$day)\n\t\t\t\t{\n\t\t\t\t\tif (array_key_exists($day['day'], $events))\n\t\t\t\t\t{\n\t\t\t\t\t\t$day['events_on_day'] = count($events[$day['day']]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// --------------------------------------\n\t\t// Parse prev/this/next month links ourselves\n\t\t// --------------------------------------\n\n\t\t$this->return_data = $this->EE->TMPL->tagdata;\n\n\t\tforeach ($this->EE->TMPL->var_single AS $key => $format)\n\t\t{\n\t\t\tif (preg_match('/^(prev|this|next)_month(\\s|$)/', $key, $match))\n\t\t\t{\n\t\t\t\t$format = (strpos($format, '%') !== FALSE) ? $format : '%Y-%m';\n\n\t\t\t\tif (($match[1]) == 'this')\n\t\t\t\t{\n\t\t\t\t\t$month = $this->date->ee_format($format);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$month = $$match[1]->ee_format($format);\n\t\t\t\t}\n\n\t\t\t\t$this->return_data = str_replace(LD.$key.RD, $month, $this->return_data);\n\t\t\t}\n\t\t}\n\n\t\t// --------------------------------------\n\t\t// Create data array for parsing vars\n\t\t// --------------------------------------\n\n\t\t$data = array(\n\t\t\t'next_month_url' => $next->month_url(),\n\t\t\t'prev_month_url' => $prev->month_url(),\n\t\t\t'this_month_url' => $this->date->month_url(),\n\t\t\t'weekdays' => $weekdays,\n\t\t\t'weeks' => $weeks\n\t\t);\n\n\t\t$this->_log('Parsing calendar tagdata');\n\n\t\treturn $this->EE->TMPL->parse_variables_row($this->return_data, $data);\n\t}", "static function add_eb_forum_day(): void {\r\n\t\tself::add_acf_inner_field(self::ebs, self::eb_forum_day, [\r\n\t\t\t'label' => 'Candidates\\' forum date',\r\n\t\t\t'type' => 'text',\r\n\t\t\t'instructions' => 'e.g. March 27 @ 5 p.m.',\r\n\t\t\t'required' => 1,\r\n\t\t\t'conditional_logic' => [\r\n\t\t\t\t[\r\n\t\t\t\t\t[\r\n\t\t\t\t\t\t'field' => self::qualify_field(self::eb_finished),\r\n\t\t\t\t\t\t'operator' => '!=',\r\n\t\t\t\t\t\t'value' => '1',\r\n\t\t\t\t\t],\r\n\t\t\t\t],\r\n\t\t\t],\r\n\t\t\t'wrapper' => [\r\n\t\t\t\t'width' => '',\r\n\t\t\t\t'class' => '',\r\n\t\t\t\t'id' => '',\r\n\t\t\t],\r\n\t\t]);\r\n\t}", "function SaturdayColumnHeader() {\n\t\tif (func_num_args()) {\n\t\t\t$this->_SaturdayColumnHeader = trim(func_get_arg(0));\n\t\t}\n\t\telse return $this->_SaturdayColumnHeader;\n\t}", "function draw_calendar($year)\n {\n $calendar.= '<!DOCTYPE html>\n <html>\n <head>\n <meta charset=\"UTF-8\">\n <title>Calendar</title>\n <link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css\">\n <style>\n #today {\n background-color: lightgreen;\n }\n .day-number {\n text-align: center;\n }\n .calendar-week {\n width: 14%;\n text-align: center;\n }\n .container {\n text-align: center;\n }\n .col-centered{\n float: none;\n margin: 0 auto;\n }\n </style>\n </head>\n <body>';\n date_default_timezone_set(\"America/New_York\");\n $months = array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');\n for ($month = 1; $month <= 12; $month++)\n {\n //create header\n $header = '<h2>'.$months[$month-1].' '.$year.'</h2>';\n $calendar.= '<div class=\"row\"><div class=\"container col-xs-6 col-centered\"> <table class=\"table table-bordered\">';\n \n \t// write calendar table headings \n \t$headings = array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');\n \t$calendar.= $header.'<tr><td class=\"calendar-week\">'.implode('</td><td class=\"calendar-week\">',$headings).'</td></tr>';\n \n \t$starting_day = date('w', mktime(0, 0, 0, $month, 1, $year)); //the starting day of the week\n \t$days_in_month = date('t', mktime(0, 0, 0, $month, 1, $year));\n \t$days_this_week = 1;\n \t$day_counter = 0;\n \t$end_of_month = 0;\n \n \t// row for week one \n \t$calendar.= '<tr>';\n \t\n \t// display blank days until starting day of the current week\n \tfor($day = 0; $day < $starting_day; $day++):\n \t\t$calendar.= '<td> </td>';\n \t\t$days_this_week++; //add blank day to days\n \tendfor;\n \n \t// write days\n \tfor ($day = 1; $day <= $days_in_month; $day++):\n \t\tif ($day != date('d') && $month != date('n'))\n \t\t{\n \t\t\t$current_day = ''; //add blank td per day (that isnt today)\n \t\t}\n \t\t$calendar.= '<td class=\"calendar-day'.$current_day.'\">';\n \t\t\n \t\t\t// Add in the day number\n if ($day == date('d') && $month == date('n') && $year == date('Y')) //this day = today\n \t\t\t{\n \t\t\t\t$showtoday = '<div id=\"today\"> <strong>'.$day.'</strong></div>'; //add today (special styling)\n \t\t\t}else {\n \t\t\t $showtoday = $day;\n \t\t\t}\n \t\t\t$calendar.= '<div class=\"day-number\">'.$showtoday.'</div>'; //commit the date number to the td\n \n \t\t// end of first week\n \t\t$calendar.= '</td>';\n \t\tif($starting_day == 6):\n \t\t\t$calendar.= '</tr>'; // if end of week, end row\n \t\t\tif (($day_counter+1) != $days_in_month) //if today is not end of month, start new row\n \t\t\t{\n \t\t\t\t$calendar.= '<tr>';\n \t\t\t} else \n \t\t\t{\n \t\t\t $end_of_month = 1; // is end of month, so no need for new row\n \t\t\t}\n \t\t\t$starting_day = -1; // if end of week, mark as sunday-1 so when incrementing below, it goes to 0 (sunday)\n \t\t\t$days_this_week = 0; //reset days this week\n \t\tendif;\n \t\t$days_this_week++;\n \t\t$starting_day++;\n \t\t$day_counter++;\n \tendfor;\n \n \t// Finish the rest of blank days in the week\n \tif(($days_this_week < 8) && ($end_of_month == 0)): //last row of calendar, if end of month already has happened (ie on the last day of the previous week), do not add new cells\n \t\tfor($x = 1; $x <= (8 - $days_this_week); $x++):\n \t\t\t$calendar.= '<td> </td>';\n \t\tendfor;\n \tendif;\n \n \t// final row\n \t$calendar.= '</tr>';\n \n \t// end table tags\n \t$calendar.= '</table> </div> </div>';\n }\n // end tags and return\n $calendar.= '</body>\n </html>';\n return $calendar;\n }", "function weekday($date_arr) {\n // using Zeller's rule to determine weekdays, reference: http://mathforum.org/dr.math/faq/faq.calendar.html\n $day_of_month = (float)$date_arr[0];\n // month -2 to make formula more simple\n $month = (float)$date_arr[1] - 2;\n if ($month < 0) {\n // Jan => 11, Feb => 12\n $month = $month + 12;\n }\n $year_last_2_digit = (float)$date_arr[2] % 100;\n if ($month >= 11) {\n // Jan and Feb are put into last year since month -2 above\n $year_last_2_digit = $year_last_2_digit - 1;\n }\n $century = (float)$date_arr[2] / 100;\n $f = $day_of_month + ((13 * $month - 1) / 5) + $year_last_2_digit + ($year_last_2_digit / 4) + ($century / 4) - 2 * $century;\n while ($f < 0) {\n $f += 7;\n }\n $day_in_week = $f % 7;\n // 0 is sunday, 6 is saturday\n return $day_in_week;\n }", "public function onDayOfWeek($day)\n {\n $this->dayOfWeek = $day;\n return $this;\n }", "public function drawHTML()\n\t{\n\t\t$this->calWeekDays .= \"<table border=\\\"1\\\">\\n\";\n\t\t$this->makeCalendarTitle();\n\t\t$this->makeCalendarHead();\n\t\t$this->makeDayHeadings();\n\t\t$this->calWeekDays .= \"\\t<tr>\\n\";\n\t\t$this->startMonthSpacers();\n\t\t$this->makeHTMLIterator();\n\t\t$this->endMonthSpacers();\n\t\t$this->calWeekDays .= \"\\t</tr>\\n\";\n\t\t$this->calWeekDays .= \"</table>\\n\";\n\t\t\n\t\techo $this->calWeekDays;\n\t}", "function draw_calendar($month,$year,$events = array()){\n\t\t$dayofweek = array('<td class=\"calendar-header\">Sunday</td>',\n\t\t'<td class=\"calendar-header\">Monday</td>',\n\t\t'<td class=\"calendar-header\">Tuesday</td>',\n\t\t'<td class=\"calendar-header\">Wednesday</td>',\n\t\t'<td class=\"calendar-header\">Thursday</td>',\n\t\t'<td class=\"calendar-header\">Friday</td>',\n\t\t'<td class=\"calendar-header\">Saturday</td>');\n\t\t\n\t\t/* draw table\n\t\t\t- fill top row with array using implode */\n\t\t$calendar = '<table class=\"calendar\"><tr class=\"calendar-row\">'.implode($dayofweek).'</tr>';\n\t\t\n\t\t// mktime(hour,minute,second,month,day,year);\n\t\t// figures out the which day of the week 1st is based on provided $month and $year\n\t\t$startDay = date('w',mktime(0,0,0,$month,1,$year)); // return days of the week\n\t\t$days = cal_days_in_month(CAL_GREGORIAN,$month,$year);\n\t\t$daysFilled;\n\t\t$counter = 0;\n\t\n\t\t/* row 2 */\n\t\t$calendar.= '<tr class=\"calendar-row\">';\n\t\n\t\t/* print \"blank\" days until the first of the month */\n\t\tfor($i = 0; $i < $startDay; $i++){\n\t\t\t$calendar.= '<td class=\"calendar-empty\"> </td>';\n\t\t\t$daysFilled++;\n\t\t}\n\t\n\t\t/* for loop to add days */\n\t\tfor($i = 1; $i <= $days; $i++):\n\t\t\t$calendar.= '<td class=\"calendar-day\"><div style=\"position:relative;height:100px;\"><div class=\"date\">'.$i.'</div>';\n\t\t\t\n\t\t\tif ($i < 10){\n\t\t\t\t$i = \"0\".$i;\n\t\t\t}\n\t\t\t\n\t\t\t// input event into calendar\n\t\t\t$eventDay = $year.'-'.$month.'-'.$i;\n\t\t\t\tif(isset($events[$eventDay])) { // if there are events on $eventDay\n\t\t\t\t\tforeach($events[$eventDay] as $eventid) { // for each event, add to calendar\n\t\t\t\t\t\t$mysql = new mysql();\n\t\t\t\t\t\t$tripdetail = $mysql->get_specifictrip($eventid);\n\t\t\t\t\t\t$calendar.= '<div class=\"event\"';\n\t\t\t\t\t\tif($tripdetail[approval]==0){\n\t\t\t\t\t\t\t$calendar.=' style=\"color:#FF6666;\"';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif($tripdetail[approval]==-1){\n\t\t\t\t\t\t\t$calendar.=' style=\"color:#6666E0; text-decoration:line-through;\"';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$calendar.='><a style=\"text-decoration:none; color:inherit;\" href=\"?page=detail2&trip='.$tripdetail[eventid].'\"';\n\t\t\t\t\t\t$calendar.='>'.$tripdetail[destination].'</div>';\n\t\t\t\t\t}\n\t\t\t\t\t$calendar.='</td>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse {\n\t\t\t\t\t$calendar.= '<p> </p><p> </p></div></td>';\n\t\t\t\t}\n\n\t\t\tif($startDay == 6){ // if the month starts on Saturday, end current row\n\t\t\t\t$calendar.= '</tr>';\n\t\t\t\tif(($counter+1) != $days){ // if there are still days left to fill, new row\n\t\t\t\t\t$calendar.= '<tr class=\"calendar-row\">';\n\t\t\t\t}\n\t\t\t\t$startDay = -1;\n\t\t\t\t$daysFilled = 0;\n\t\t\t}\n\t\t\t$daysFilled++;\n\t\t\t$startDay++;\n\t\t\t$counter++;\n\t\tendfor;\n\t\n\t\t// finish filling in the rest of the days with blanks\n\t\tif($daysFilled < 8 && $daysFilled !=1):\n\t\t\tfor($x = 1; $x <= (8 - $daysFilled); $x++):\n\t\t\t\t$calendar.= '<td class=\"calendar-empty\"> </td>';\n\t\t\tendfor;\n\t\tendif;\n\t\n\t\t// end row, table\n\t\t$calendar.= '</tr></table>';\n\t\t\n\t\t\n\t\t// return HTML code for calendar\n\t\treturn $calendar;\n\t}", "public function mondays()\n {\n return $this->days(1);\n }", "public function &GetWeekdays()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n return $this->_weekdays;\n }", "public static function listWeekDayExt($sunday = 0)\r\n {\r\n if (!$sunday)\r\n {\r\n $sunday = 0;\r\n }\r\n\r\n $dias[1] = \"Segunda-Feira\";\r\n $dias[2] = \"Terça-Feira\";\r\n $dias[3] = \"Quarta-Feira\";\r\n $dias[4] = \"Quinta-Feira\";\r\n $dias[5] = \"Sexta-Feira\";\r\n $dias[6] = \"Sábado\";\r\n $dias[$sunday] = \"Domingo\";\r\n\r\n return $dias;\r\n }", "function print_day_option_list( $p_day = 0 ) {\n\tfor( $i = 1;$i <= 31;$i++ ) {\n\t\tif( $i == $p_day ) {\n\t\t\techo '<option value=\"' . $i . '\" selected=\"selected\">' . $i . '</option>';\n\t\t} else {\n\t\t\techo '<option value=\"' . $i . '\">' . $i . '</option>';\n\t\t}\n\t}\n}", "function get_weekday( $weekday_number ) {\n\t\treturn $this->weekday[ $weekday_number ];\n\t}" ]
[ "0.6188181", "0.6141272", "0.61172116", "0.59556955", "0.5809905", "0.58070767", "0.5771572", "0.5708788", "0.5641808", "0.5629857", "0.5550392", "0.5475904", "0.54352045", "0.53517", "0.5329178", "0.53151584", "0.53131", "0.53094345", "0.529378", "0.52783984", "0.52555025", "0.5235777", "0.5234004", "0.5185547", "0.5157969", "0.51486385", "0.5141414", "0.5132667", "0.51214105", "0.5117174", "0.5116646", "0.50860006", "0.50814867", "0.50798225", "0.5057736", "0.5040592", "0.5036435", "0.49681383", "0.49662903", "0.49445295", "0.49347913", "0.49346137", "0.49268585", "0.49253687", "0.49227092", "0.4919134", "0.49020636", "0.48926187", "0.48853528", "0.48816416", "0.4858898", "0.48587805", "0.48447442", "0.48342714", "0.48335445", "0.48215732", "0.48178393", "0.4813669", "0.4813296", "0.48051926", "0.4799633", "0.47876602", "0.4761998", "0.4761107", "0.4728546", "0.47232264", "0.4719994", "0.47106788", "0.47101918", "0.47090328", "0.4707517", "0.47042632", "0.4703071", "0.46925643", "0.4692257", "0.4689331", "0.46878424", "0.46873474", "0.46842957", "0.46831146", "0.46731755", "0.46719077", "0.46646982", "0.46453384", "0.46451125", "0.464149", "0.46310335", "0.46065757", "0.46050274", "0.45969814", "0.45825627", "0.45718056", "0.45703107", "0.4559096", "0.45552394", "0.455388", "0.45525068", "0.45465112", "0.4542356", "0.45420748" ]
0.62755215
0
Add events to the calendar Handler method to add events to an array of events to be fed to the calendar.
public function setEvents($id,$date,$text,$desc,$cat=null,$catcolor=null,$stdurl=false,$url=null) { $events = array( 'id' => $id, 'date' => $date, 'text' => $text, 'desc' => $desc, 'cat' => $cat, 'catcolor' => $catcolor, 'stdurl' => $stdurl, 'url' => $url ); array_push($this->eventItems, $events); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 addEvent($event){\n $this->events[]=$event;\n }", "private function import_events() {\n\t\t$reviewed_events = json_decode(stripslashes($_POST['reviewed_events']), true);\n\t\tif(empty($reviewed_events)) {\n\t\t\treturn new WP_Error('no_events', __('No events found','event-list'));\n\t\t}\n\t\t// prepare additional categories\n\t\tif($this->events_post_type->event_cat_taxonomy === $this->events_post_type->taxonomy) {\n\t\t\t$additional_cat_ids = isset($_POST['tax_input'][$this->events_post_type->taxonomy]) ? $_POST['tax_input'][$this->events_post_type->taxonomy] : array();\n\t\t}\n\t\telse {\n\t\t\t$additional_cat_ids = isset($_POST['post_'.$this->events_post_type->taxonomy]) ? $_POST['post_'.$this->events_post_type->taxonomy] : array();\n\t\t}\n\t\t$additional_cat_ids = is_array($additional_cat_ids) ? array_map('intval', $additional_cat_ids) : array();\n\t\t$additional_cat_slugs = array();\n\t\tforeach($additional_cat_ids as $cat_id) {\n\t\t\t$cat = $this->events->get_cat_by_id($cat_id);\n\t\t\tif(!empty($cat)) {\n\t\t\t\t$additional_cat_slugs[] = $cat->slug;\n\t\t\t}\n\t\t}\n\t\t// prepare events and events categories\n\t\tforeach($reviewed_events as &$event_ref) {\n\t\t\t// check event data\n\t\t\t// remove not available categories of import file\n\t\t\tforeach($event_ref['categories'] as $ckey => $cat_slug) {\n\t\t\t\tif(!$this->events->cat_exists($cat_slug)) {\n\t\t\t\t\tunset($event_ref['categories'][$ckey]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// add the additionally specified categories to the event\n\t\t\tif(!empty($additional_cat_slugs)) {\n\t\t\t\t$event_ref['categories'] = array_unique(array_merge($event_ref['categories'], $additional_cat_slugs));\n\t\t\t}\n\t\t}\n\t\t// save events\n\t\t$ret = array('success' => 0, 'errors' => array());\n\t\trequire_once(EL_PATH.'includes/event.php');\n\t\tforeach($reviewed_events as $eventdata) {\n\t\t\t$ed = $this->prepare_event($eventdata);\n\t\t\tif(is_wp_error($ed)) {\n\t\t\t\t$ret['errors'][] = $ed;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t//TODO: return WP_Error instead of false in EL_Event when safing fails\n\t\t\t$event = EL_Event::save($eventdata);\n\t\t\tif(!$event) {\n\t\t\t\t$ret['errors'][] = new WP_Error('failed_saving', __('Saving of event failed!','event-list'), $event['csv_line']);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$ret['success'] += 1;\n\t\t}\n\t\treturn $ret;\n\t}", "function hookAjaxGetEvents() {\n\n\t \t$start = intval($_POST['start']);\n\t \t$end = intval($_POST['end']);\n\n\t \t$args['datefrom'] = $start;\n\t \t$args['dateto'] = $end;\n\t \t$args['datemode'] = FSE_DATE_MODE_ALL;\n\t \t$args['number'] = 0; // Do not limit!\n\n\t \tif (isset($_POST['state']))\n\t \t$args['state'] = $_POST['state'];\n\t \tif (isset($_POST['author']))\n\t \t$args['author'] = $_POST['author'];\n\t \tif (isset($_POST['categories']))\n\t \t$args['categories'] = $_POST['categories'];\n\t \tif (isset($_POST['include']))\n\t \t$args['include'] = $_POST['include'];\n\t \tif (isset($_POST['exclude']))\n\t \t$args['exclude'] = $_POST['exclude'];\n\t \t$events = $this->getEventsExternal($args);\n\n\t \t// Process array of events\n\t \t$events_out = array();\n\t \tforeach($events as $evt) {\n\t \t\tunset($e);\n\t \t\t$e['id'] = $evt->eventid;\n\t \t\t$e['post_id'] = $evt->postid;\n\t \t\t$e['post_url'] = (empty($evt->postid) ? '' : get_permalink($evt->postid));\n\t \t\t$e['title'] = $evt->subject;\n\t \t\t$e['allDay'] = ($evt->allday == true ? true : false);\n\t \t\t$e['start'] = mysql2date('c', $evt->from);\n\t \t\t$e['end'] = mysql2date('c', $evt->to);\n\t \t\t$e['editable'] = false;\n\n\t \t\t$classes = array();\n\t \t\tforeach($evt->categories as $c) {\n\t \t\t\t$classes[] = 'category-'.$c;\n\t \t\t}\n\t \t\tif (count($classes) > 0) {\n\t \t\t\t$e['className'] = $classes;\n\t \t\t}\n\t \t\t\n\t \t\t$events_out[] = $e;\n\t \t}\n\n\t \t$response = json_encode($events_out);\n\n\t \theader(\"Content-Type: application/json\");\n\t \techo $response;\n\n\t \texit;\n\t }", "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}", "public static function initialize_calendar(){\n \n $event_array[] = array();\n $schedules = \\App\\Event::get();\n if(!empty($schedules)){\n foreach($schedules as $schedule){\n $event_array[] = array(\n 'id' => uniqid(),\n 'title' => $schedule->description,\n 'start' => date('Y-m-d', strtotime($schedule->event_date)),\n 'end' => date('Y-m-d', strtotime($schedule->event_date)),\n 'color' => \"lightblue\",\n \"textEscape\"=> 'false' ,\n 'textColor' => 'black',\n );\n }\n return $get_schedule = json_encode($event_array);\n }\n }", "function import_the_events_calendar() {\n\t\tglobal $wgobd_view_helper,\n\t\t\t\t\t $wgobd_events_helper;\n\n\t\t$args = array(\n\t\t\t'post_type' \t=> 'post',\n\t\t\t'numberposts'\t=> -1,\n\t\t\t'meta_key'\t\t=> '_isEvent',\n\t\t\t'meta_value'\t=> 'yes'\n\t\t);\n\t\t$posts = get_posts( $args );\n\n\t\t$imported_events = 0;\n\t\tforeach( $posts as $post )\n\t\t{\n\t\t\t$event = new wgobd_Event( null );\n\t\t\t$postmeta = get_post_custom( $post->ID );\n\n\t\t\t// Need this to offset dates coming from The Events Calendar\n\t\t\t$gm_diff = mktime( 0 ) - gmmktime( 0 );\n\n\t\t\t$event->allday \t\t\t\t= $postmeta['_EventAllDay'][0] == 'yes' || $postmeta['_EventAllDay'][0] == 1;\n\t\t\t$event->start \t\t\t\t= strtotime( $postmeta['_EventStartDate'][0] ) - $gm_diff;\n\t\t\t$event->end \t\t\t\t\t= strtotime( $postmeta['_EventEndDate'][0] ) - $gm_diff;\n\t\t\t// If all-day event, align start/end to start/end of day\n\t\t\tif( $event->allday ) {\n\t\t\t\t$event->start = $wgobd_events_helper->gmgetdate( $event->start );\n\t\t\t\t$event->start = gmmktime( 0, 0, 0, $event->start['mon'], $event->start['mday'], $event->start['year'] );\n\t\t\t\t$event->end = $wgobd_events_helper->gmgetdate( $event->end );\n\t\t\t\t$event->end = gmmktime( 0, 0, 0, $event->end['mon'], $event->end['mday'], $event->end['year'] );\n\t\t\t}\n\t\t\t// Finally, convert to GMT storage format\n\t\t\t$event->start = $wgobd_events_helper->local_to_gmt( $event->start );\n\t\t\t$event->end = $wgobd_events_helper->local_to_gmt( $event->end );\n\t\t\t// Bug in The Events Calendar where some all-day events start and end at the same time\n\t\t\tif( $event->allday && $event->end - $event->start < ( 24 * 60 * 60 ) )\n\t\t\t\t$event->end = $event->start + 24 * 60 * 60;\n\t\t\t$event->venue \t\t\t\t= $postmeta['_EventVenue'][0];\n\t\t\t$event->country \t\t\t= $postmeta['_EventCountry'][0];\n\t\t\t$event->city \t\t\t\t\t= $postmeta['_EventCity'][0];\n\t\t\t$event->province \t\t\t= $postmeta['_EventState'][0];\n\t\t\t$event->postal_code \t= $postmeta['_EventZip'][0];\n\t\t\t$event->address = array();\n\t\t\tif( $postmeta['$_EventAddress'] ) $event->address[] = $postmeta['$_EventAddress'];\n\t\t\tif( $event->city ) $event->address[] = $event->city;\n\t\t\tif( $event->province ) $event->address[] = $event->province;\n\t\t\tif( $event->postal_code ) $event->address[] = $event->postal_code;\n\t\t\tif( $event->country ) $event->address[] = $event->country;\n\t\t\t$event->address = join( ', ', $event->address );\n\t\t\t$event->show_map \t\t\t= $postmeta['_EventShowMapLink'][0] == 'true' || $postmeta['_EventShowMap'][0] == 'true';\n\t\t\t$event->cost \t\t\t\t\t= $postmeta['_EventCost'][0];\n\t\t\t$event->contact_phone = $postmeta['_EventPhone'][0];\n\t\t\t$event->post \t\t\t\t\t= get_object_vars( $post );\n\t\t\t$event->post[\"post_type\"] = wgobd_POST_TYPE;\n\t\t\tunset( $event->post[\"ID\"] );\n\n\t\t\t// Transfer post categories => event categories, post tags => event tags\n\t\t\t$terms = wp_get_post_terms( $post->ID, array( 'category', 'post_tag' ) );\n\t\t\t$event->categories = array();\n\t\t\t$event->tags = array();\n\t\t\tforeach( $terms as $term )\n\t\t\t{\n\t\t\t\tswitch( $term->taxonomy )\n\t\t\t\t{\n\t\t\t\t\tcase 'category':\n\t\t\t\t\t\t// Ignore special \"Events\" category by The Events Calendar\n\t\t\t\t\t\tif( $term->name == 'Events' )\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t// Need to find out the category ID, if it exists.\n\t\t\t\t\t\t$event_term = get_term_by( 'name', $term->name, 'events_categories' );\n\t\t\t\t\t\t// If no category exists, create it.\n\t\t\t\t\t\tif( $event_term === false )\n\t\t\t\t\t\t\t$event_term = (object) wp_insert_term(\n\t\t\t\t\t\t\t\t$term->name,\n\t\t\t\t\t\t\t\t'events_categories',\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'description' => $term->description,\n\t\t\t\t\t\t\t\t\t'slug' => $term->slug\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t$event->categories[] = $event_term->term_id;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'post_tag':\n\t\t\t\t\t\t// For some reason tag-like taxonomies are treated differently; term\n\t\t\t\t\t\t// IDs cannot be used; instead the actual term name must be appended\n\t\t\t\t\t\t$event->tags[] = $term->name;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$post_id = $event->save();\n\t\t\t$wgobd_events_helper->cache_event( $event, $post_id );\n\n\t\t\t$imported_events++;\n\t\t}\n\n\t\t$wgobd_view_helper->display( \"import.php\", array( 'imported_events' => $imported_events ) );\n\t}", "function insert_events( $events ){\n\t// Informationen zu den Events holen\n\t$results = eventoni_fetch('',false,$events);\n\n\t// Falls keine Informationen zu Events gefunden, aus Methode rausspringen\n\tif( $results['total'] <= 0 )\n\t{\n\t\treturn;\n\t}\n\n\t// HTML Code erstellen\n\t$result = '';\n\t$result.= '<div class=\"events-container\">';\n\t$result.= '<img src=\"'.get_bloginfo('wpurl').'/wp-content/plugins/eventoni-events/img/logo.png\" />';\n\n\t// Jedes Event durchlaufen\n\tforeach($results['xml'] as $event)\n\t{\n\t\t// Berechnung der Zeitangabe und Tageszeit als Wort\n\t\t$datetime = strtotime($event->start_date.' '.$event->start_time);\n\t\t$hours = getdate($datetime);\n\t\t$hour = $hours['hours'];\n\t\t$tageszeit = '';\n\t\tif( $hour < 6 ){\n\t\t\t$tageszeit = 'nachts';\n\t\t} else if( $hour < 12 ){\n\t\t\t$tageszeit = 'morgens';\n\t\t} else if( $hour < 14 ){\n\t\t\t$tageszeit = 'mittags';\n\t\t} else if( $hour < 18 ){\n\t\t\t$tageszeit = 'nachmittags';\n\t\t} else if( $hour < 22 ){\n\t\t\t$tageszeit = 'abends';\n\t\t} else {\n\t\t\t$tageszeit = 'nachts';\n\t\t}\n\t\t$result.= ' <div class=\"event-item\">';\n\t\t$result.= '<a class=\"event-item-link\" href=\"'.$event->permalink.'\">';\n\n\t\t// Falls kein Vorschaubild vorhanden, nehme Standardbild\n\t\tif(isset($event->media_list->media->thumbnail_url)) {\n\t\t\t$result.= '<img width=\"60px\" height\"60px\" align=\"left\" src=\"'.$event->media_list->media->thumbnail_url.'\"/>';\n\t\t} else {\n\t\t\t$result.= '<img width=\"60px\" height\"60px\" align=\"left\" src=\"http://static.eventoni.com/images/image-blank.png\"/>';\n\t\t}\n\t\t$result.= '</a>';\n\t\t$result.= '\t <div class=\"event-item-content\">';\n\t\t$result.= '\t\t<div class=\"event-item-content-date\">'.date( \"d.m.Y\", $datetime ).', '.date( \"H:i \\U\\h\\\\r\", $datetime ).'</div>';\n\t\t$result.= '\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$result.= '\t </div>';\n\t\t$result.= '\t <div class=\"event-item-content-name\"><b><a class=\"event-item-link\" href=\"'.$event->permalink.'\">'.$event->title.'</a></b></div>';\n\t\t$result.= '<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$result.= '<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$result.= ' </div>';\n\n\t}\n\t$result.= '</div>';\n\n\t// HTML code zurückgeben\n\treturn $result;\n}", "protected static function events()\n {\n foreach (self::fetch('app/events', false) as $file) {\n Bus::need($file);\n }\n //\n Event::register();\n }", "public function getEvents()\n {\n $main_actions = [\n 'event' => \\adminer\\lang('Create event'),\n ];\n\n $headers = [\n \\adminer\\lang('Name'),\n \\adminer\\lang('Schedule'),\n \\adminer\\lang('Start'),\n // \\adminer\\lang('End'),\n ];\n\n // From db.inc.php\n $events = \\adminer\\support(\"event\") ? \\adminer\\get_rows(\"SHOW EVENTS\") : [];\n $details = [];\n foreach($events as $event)\n {\n $detail = [\n 'name' => \\adminer\\h($event[\"Name\"]),\n ];\n if(($event[\"Execute at\"]))\n {\n $detail['schedule'] = \\adminer\\lang('At given time');\n $detail['start'] = $event[\"Execute at\"];\n // $detail['end'] = '';\n }\n else\n {\n $detail['schedule'] = \\adminer\\lang('Every') . \" \" .\n $event[\"Interval value\"] . \" \" . $event[\"Interval field\"];\n $detail['start'] = $event[\"Starts\"];\n // $detail['end'] = '';\n }\n $details[] = $detail;\n }\n\n return \\compact('main_actions', 'headers', 'details');\n }", "private function createinstallevent()\n {\n $cat = CategoryUtil::getCategoryByPath('/__SYSTEM__/Modules/PostCalendar/Events');\n\n $eventArray = array(\n 'title' => $this->__('PostCalendar Installed'),\n 'hometext' => ':text:' . $this->__('On this date, the PostCalendar module was installed. Thank you for trying PostCalendar! This event can be safely deleted if you wish.'),\n 'alldayevent' => true,\n 'eventstatus' => PostCalendar_Entity_CalendarEvent::APPROVED,\n 'sharing' => PostCalendar_Entity_CalendarEvent::SHARING_GLOBAL,\n 'website' => 'https://github.com/craigh/PostCalendar/wiki',\n 'categories' => array(\n 'Main' => $cat['id']));\n\n try {\n $event = new PostCalendar_Entity_CalendarEvent();\n $event->setFromArray($eventArray);\n $this->entityManager->persist($event);\n $this->entityManager->flush();\n } catch (Exception $e) {\n return LogUtil::registerError($e->getMessage());\n }\n\n return true;\n }", "Public function getEvents()\n\t{\n\t\t$result=$this->M_calendar->getEvents();\n\t\techo json_encode($result);\n\t}", "private function makeDayEventListArray()\n\t{\n\t\t$outevents = array();\n\t\t$n = 0;\n\t\tforeach($this->eventItems as $item) {\n\t\t\tif($item['date'] == $this->curYear.'-'.$this->curMonth.'-'.$this->dayOfMonth) {\t\t\n\t\t\t\t$outevents[$n]['category'] = $item['cat'];\n\t\t\t\t\n\t\t\t\tif($item['stdurl']) {\n\t\t\t\t\t$outevents[$n]['url'] = $item['url'].'?id='.$item['id'];\n\t\t\t\t} else {\n\t\t\t\t\t$outevents[$n]['url'] = $item['url'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$outevents[$n]['summary'] = $item['text'];\n\t\t\t\t$outevents[$n]['description'] = $item['desc'];\n\t\t\t\t$outevents[$n]['categorycolor'] = (strlen($item['catcolor']) > 0 ? str_replace('#','',$item['catcolor']) : '#eeeeee');\n\t\t\t}\n\t\t\t$n++;\n\t\t}\n\t\t\n\t\tif(count($outevents)) {\n\t\t\treturn $outevents;\n\t\t}\n\t\treturn false;\n\t}", "private function initEvents() : void {\n\n $arenas = MineceitCore::getArenas()->getEventArenas();\n\n foreach($arenas as $arena) {\n $this->createEvent($arena);\n }\n }", "public function events()\n {\n if (!Sentry::check()) {\n // User is not logged in, or is not activated\n return Redirect::route('landing');\n } else {\n // Gets all appointments from the school\n $user = Sentry::getUser();\n\n // Check if user is superAdmin\n if ($user->hasAccess('school')) {\n $appointments = Appointment::get()->load('group.school')->toArray();\n // Returns JSON response of the user\n return Response::json($appointments)->setCallback(\n Input::get('callback')\n ); //return View::make('calendar.events');\n\n } else {\n // If user is not superAdmin, show groups based on the school of the logged in user\n $user->load('school.groups.appointments.group.school');\n $appointments = [];\n\n // Loop through groups to get all appointments\n foreach ($user->school->groups as $group) {\n foreach ($group->appointments as $appointment) {\n array_push($appointments, $appointment);\n }\n }\n // Returns JSON response of the user\n return Response::json($appointments)->setCallback(Input::get('callback'));\n }\n }\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 addInstructorsToEvents(array $events);", "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}", "public function groupCalendar($id){\n $groupId = Crypt::decrypt($id);\n $group = Group::findOrFail($groupId);\n // create event array\n $eventCollection = [];\n\n //create variable for user id\n $userid = \\Auth::user()->id;\n\n //fetch user events\n $events = DB::table('events')\n ->where('is_shared', '=', 1)\n ->get();\n\n $holidays = DB::table('holidays')->get();\n\n $repeatEvent = DB::table('repeat_event')\n ->where('is_shared', '=', 1)\n ->get();\n $group_events = GroupEvents::getGroupEvents($groupId)->get();\n\n //iterate all events where user id = logged in user then add them to the array\n foreach ($events as $event) {\n $eventCollection[] = Calendar::event(\n $event->event_title, //event title\n false,\n $event->time_start,\n $event->time_end,\n $event->id,\n [\n 'url' => 'event/'. Crypt::encrypt($event->id) ,\n 'color' => $event->color,\n ]\n );\n }\n foreach ($repeatEvent as $repeat) {\n $eventCollection[] = Calendar::event(\n $repeat->event_title,\n false,\n $repeat->time_start,\n $repeat->time_end,\n $repeat->id,\n [\n 'url' => 'groupRepeatEvent/'. Crypt::encrypt($repeat->id) ,\n 'color' => $repeat->color,\n ]\n );\n }\n foreach ($holidays as $holiday) {\n $eventCollection[] = Calendar::event(\n $holiday->event_title,\n true,\n $holiday->time_start,\n $holiday->time_end,\n $holiday->id,\n [\n 'color' => $holiday->color,\n ]\n );\n }\n foreach ($group_events as $grpEvent) {\n $eventCollection[] = Calendar::event(\n $grpEvent->event_title,\n false,\n $grpEvent->time_start,\n $grpEvent->time_end,\n $grpEvent->id,\n [\n 'url' => 'groupEvent/'. Crypt::encrypt($grpEvent->id) ,\n 'color' => $grpEvent->color,\n ]\n );\n }\n $calendar = Calendar::addEvents($eventCollection);\n return view('group.group-calendar', compact('calendar', 'group'));\n }", "private function createMyEvents()\n {\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatchSecure_Frontend_Checkout',\n 'onPostDispatchCheckoutSecure'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_Frontend_Checkout_PreRedirect',\n 'onPreRedirectToPayPal'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PreDispatch_Frontend_PaymentPaypal',\n 'onPreDispatchPaymentPaypal'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_Frontend_PaymentPaypal_Webhook',\n 'onPaymentPaypalWebhook'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_Frontend_PaymentPaypal_PlusRedirect',\n 'onPaymentPaypalPlusRedirect'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatch_Frontend_Account',\n 'onPostDispatchAccount'\n );\n $this->subscribeEvent(\n 'Theme_Compiler_Collect_Plugin_Javascript',\n 'onCollectJavascript'\n );\n $this->subscribeEvent(\n 'Shopware_Components_Document::assignValues::after',\n 'onBeforeRenderDocument'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatchSecure_Backend_Config',\n 'onPostDispatchConfig'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatch_Backend_Order',\n 'onPostDispatchOrder'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatch_Backend_PaymentPaypal',\n 'onPostDispatchPaymentPaypal'\n );\n $this->subscribeEvent(\n 'Theme_Compiler_Collect_Plugin_Less',\n 'addLessFiles'\n );\n $this->subscribeEvent(\n 'Enlight_Bootstrap_InitResource_paypal_plus.rest_client',\n 'onInitRestClient'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Dispatcher_ControllerPath_Api_PaypalPaymentInstruction',\n 'onGetPaymentInstructionsApiController'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Front_StartDispatch',\n 'onEnlightControllerFrontStartDispatch'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PreDispatch',\n 'onPreDispatchSecure'\n );\n }", "public function postEventadd();", "public function insertEvents(Request $request)\n {\n if($request->ajax())\n {\n\n $message = [\n 'user_id.in' => 'Diesen Mitarbeiter koennen Sie nicht bearbeiten',\n ];\n\n $val_user_id= 'in:'.((Auth::user()->can('changeevents')) ? \\App\\Department::find(Auth::user()->department->id)->users()->get()->implode('id', ',') : Auth::user()->id);\n\n $this->validate($request, [\n 'user_id' => $val_user_id,\n ], $message);\n\n $user_id = $request->input('user_id');\n $date_from = new Carbon($request->input('date_from'));\n $date_to = new Carbon($request->input('date_to'));\n\n //check event_id exists. If not create a new array according to the submitted dates\n if ($request->has('event_id'))\n {\n $event_id = $request->input('event_id');\n }\n else\n {\n $event_id = array();\n for ($d=clone $date_from; $d <= $date_to ; $d->addDay())\n {\n if($e = \\App\\Event::where('date', '=', $d->toDateString())->where('user_id', '=', $user_id)->first())\n {\n $event_id[] = $e->id;\n }\n else\n {\n $event_id[] = 0;\n }\n }\n }\n\n switch ($request->input('entry_id')) {\n case 0:\n\n \\App\\Event::leftJoin('entries', 'entry_id', '=', 'entries.id')\n ->select(DB::raw(' where right = 0 or right ='.Auth::user()->can('confirmentry').' and right = 1'))\n ->whereIn('events.id', $event_id)->delete();\n break;\n\n case -1:\n\n DB::table('events')\n ->leftJoin('entries', 'entry_id', '=', 'entries.id')\n ->select(DB::raw(' where right = 0 or right ='.Auth::user()->can('confirmentry').' and right = 1'))\n ->whereIn('events.id', $event_id)\n ->update(['comment' => $request->input('comment')]);\n\n case -2;\n DB::table('events')\n ->leftJoin('entries', 'entry_id', '=', 'entries.id')\n ->select(DB::raw(' where right = 0 or right ='.Auth::user()->can('confirmentry').' and right = 1'))\n ->whereIn('events.id', $event_id)\n ->update(['approved' => $request->input('approved')]);\n\n /*DB::update('update events set votes = 100 where name = ?', array('John'));\n\n \\App\\Event::leftJoin('entries', 'entry_id', '=', 'entries.id')\n ->select(DB::raw(' where right = 0 or or right ='.Auth::user()->can('confirmentry').' and right = 1'))\n ->whereIn('events.id', $event_id)\n ->update( array('comment' => DB::raw( ) ) );*/\n break;\n\n default:\n\n $entry = \\App\\Entry::find($request->input('entry_id'));\n $onweekend = $entry->onweekend;\n $right = $entry->right;\n $d1 = clone $date_from;\n $d2 = clone $date_to;\n $custom_dates = Lists::customdatesinperiod($d1, $d2, $user_id)->toArray();\n\n for ($day = clone $date_from; $day <= $date_to ; $day->addDay()) {\n // only process if is to be inserted\n if( ($day->isWeekday() && !in_array($day->toDateString(), $custom_dates)) || $onweekend || ($day->isWeekday() && in_array($day->toDateString(), $custom_dates) && $onweekend) )\n {\n $event = \\App\\Event::firstorNew(['user_id' => $user_id, 'date' => $day->toDateString()]);\n\n if (!$event->exists)\n {\n $old_entry_right = 0;\n }\n else\n {\n $old_entry_right = $event->entry->right;\n }\n\n /* Either user has the right to confirm events\n * or the preexisting event (which will be overwritten) does not need right = permission to confirm ('can confirm')\n * or old event needs right but is not approved (just a wish)\n */\n if (Auth::user()->can('confirmentry') || !$old_entry_right || ($old_entry_right && !$event->approved))\n {\n $event->user_id = $user_id;\n $event->date = $day->toDateString();\n $event->entry_id = $request->input('entry_id');\n $event->comment = $request->input('comment');\n $event->approved = (!$right) ? 1 : ((Auth::user()->can('confirmentry')) ? $request->input('approved') : 0) ;\n $event->save();\n }\n\n }\n }\n\n break;\n }\n }\n\n if ($request->input('sender') == 'month')\n {\n $events = Lists::eventsinmonth($date_from->startofmonth(), $date_to->endofmonth(), $request->input('user_id'));\n\n $html = '';\n foreach($events as $e)\n {\n $badge = ($e['comment']<>'') ? '<br><span class=\"badge\">K</span>' : '';\n $html .= \"<td class='\".$e['class'].\"' title='Datum: \".strftime('%A', strtotime($e['date'])).\"&#10;Eintrag: \".$e['event_name'].\"&#10;Bemerkung: \".$e['comment'].\"' data-date='\".$e['date'].\"' data-event_id=\".$e['event_id'].\" data-approved=\".$e['notapproved'].\">\".$e['event_shortname'].$badge.\"</td>\";\n }\n }\n\n if ($request->input('sender') == 'day')\n {\n\n $event = \\App\\User::where('users.id', '=', $user_id)\n ->leftJoin('sections', 'sections.id', '=', 'users.section_id')\n ->leftJoin('positions', 'positions.id', '=', 'users.position_id')\n ->leftjoin(db::raw('(select * from events where date = ?) e'), 'users.id', '=', 'e.user_id')\n ->addBinding($date_from->toDateString(), 'select')\n ->leftjoin('entries', 'e.entry_id', '=', 'entries.id')\n ->selectRaw('CONCAT(lastname, \", \", firstname) as fullname, positions.name as posname, positions.priority as posp, sections.fullname as secname, CONCAT(\"item\", entries.id) as class, if(approved=1 or e.id is null, \"approved\", \"notapproved\") as class2, users.id as uid, e.id as eventid, e.comment as eventscomment, entries.name as entryname, if (entries.present = 1 , 1, if(entries.present = 0, 2, 0)) as entrypresent')\n ->first();\n $present_na = ($event->entrypresent && $event->class2 == 'notapproved') ? \"present_na\" : \"w\";\n $html = \"<td class='col1 \".$event->class.\" \".$event->class2.\" \".$present_na.\"'>\".$event->fullname.\"</td>\n <td class='col2 \".$event->class.\" \".$event->class2.\" \".$present_na.\"'>\".$event->secname.\"</td>\n <td class='col3 \".$event->class.\" \".$event->class2.\" \".$present_na.\" entry'>\".$event->entryname.\"</td>\n <td class='col4 \".$event->class.\" \".$event->class2.\" \".$present_na.\" entry'>\".$event->eventscomment.\"</td>\"; // $html = $event;\n\n }\n\n return($html);\n }", "public function calendars()\n\t{\n\t\t// -------------------------------------\n\t\t// Load 'em up\n\t\t// -------------------------------------\n\n\t\t$this->load_calendar_datetime();\n\t\t$this->load_calendar_parameters();\n\n\t\t// -------------------------------------\n\t\t// Prep the parameters\n\t\t// -------------------------------------\n\n\t\t$params = array(\n\t\t\tarray(\n\t\t\t\t'name' => 'category',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'site_id',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer',\n\t\t\t\t'min_value' => 1,\n\t\t\t\t'multi' => TRUE,\n\t\t\t\t'default' => $this->data->get_site_id()\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'calendar_id',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer',\n\t\t\t\t'min_value' => 1,\n\t\t\t\t'multi' => TRUE,\n\t\t\t\t'not' => TRUE\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'calendar_name',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE,\n\t\t\t\t'not' => TRUE\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'status',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE,\n\t\t\t\t'default' => 'open'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'date_range_start',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'date'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'date_range_end',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'date'\n\t\t\t)\n\t\t);\n\n\t\t//ee()->TMPL->log_item('Calendar: Processing parameters');\n\n\t\t$this->add_parameters($params);\n\n\t\t// -------------------------------------\n\t\t// Convert calendar_name to calendar_id\n\t\t// -------------------------------------\n\n\t\tif ($this->P->value('calendar_id') == '' AND\n\t\t\t$this->P->value('calendar_name') != '')\n\t\t{\n\t\t\t$ids = $this->data->get_calendar_id_from_name(\n\t\t\t\t$this->P->value('calendar_name'),\n\t\t\t\tNULL,\n\t\t\t\t$this->P->params['calendar_name']['details']['not']\n\t\t\t);\n\n\t\t\tif ( empty( $ids ) )\n\t\t\t{\n\t\t\t\t//ee()->TMPL->log_item('Calendar: No results for\n\t\t\t\t//calendar name provided, bailing');\n\t\t\t\treturn $this->no_results();\n\t\t\t}\n\n\t\t\t$this->P->set('calendar_id', implode('|', $ids));\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Determine which calendars this user has permission to view\n\t\t// and modify the parameters accordingly.\n\t\t// -------------------------------------\n\n\t\t// TODO\n\n\t\t// -------------------------------------\n\t\t// Fetch the basics\n\t\t// -------------------------------------\n\n\t\t$data = $this->data->fetch_calendars_basics(\n\t\t\t$this->P->value('site_id'),\n\t\t\t$this->P->value('calendar_id'),\n\t\t\t$this->P->params['calendar_id']['details']['not']\n\t\t);\n\n\t\t// -------------------------------------\n\t\t// If no data, then give 'em no_results\n\t\t// -------------------------------------\n\n\t\tif (($total_results = count($data)) == 0)\n\t\t{\n\t\t\t//ee()->TMPL->log_item('Calendar: No results, bailing');\n\t\t\treturn $this->no_results();\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Ensure date_range_start <= date_range_end\n\t\t// -------------------------------------\n\n\t\tif ($this->P->value('date_range_start') !== FALSE AND\n\t\t\t$this->P->value('date_range_end') !== FALSE)\n\t\t{\n\t\t\tif ($this->P->value('date_range_start', 'ymd') > $this->P->value('date_range_end', 'ymd'))\n\t\t\t{\n\t\t\t\t$temp = $this->P->params['date_range_start']['value'];\n\t\t\t\t$this->P->set('date_range_start', $this->P->params['date_range_end']['value']);\n\t\t\t\t$this->P->set('date_range_end', $temp);\n\t\t\t\tunset($temp);\n\t\t\t}\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// This will come in handy later\n\t\t// -------------------------------------\n\n\t\t$calendar_array = array();\n\t\tforeach ($data as $k => $arr)\n\t\t{\n\t\t\t$calendar_array[] = $arr['calendar_id'];\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Date range params? Then we need to do a lot more work.\n\t\t// -------------------------------------\n\n\t\tif ($this->P->value('date_range_start') !== FALSE OR\n\t\t\t$this->P->value('date_range_end') !== FALSE)\n\t\t{\n\t\t\t//ee()->TMPL->log_item('Calendar: Calculating date ranges');\n\t\t\t$min = ($this->P->value('date_range_start') !== FALSE) ?\n\t\t\t\t\t\t$this->P->value('date_range_start', 'ymd') :\n\t\t\t\t\t\t0;\n\n\t\t\t$max = ($this->P->value('date_range_end') !== FALSE) ?\n\t\t\t\t$this->P->value('date_range_end', 'ymd') :\n\t\t\t\t0;\n\n\t\t\t$calendar_array = $this->data->fetch_calendars_with_events_in_date_range(\n\t\t\t\t$min,\n\t\t\t\t$max,\n\t\t\t\t$calendar_array,\n\t\t\t\t$this->P->value('status')\n\t\t\t);\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// No calendars? No results.\n\t\t// -------------------------------------\n\n\t\tif (empty($calendar_array))\n\t\t{\n//ee()->TMPL->log_item('Calendar: No calendars, bailing');\n\t\t\treturn $this->no_results();\n\t\t}\n\n\t\t//\t----------------------------------------\n\t\t//\tInvoke Channel class\n\t\t//\t----------------------------------------\n\n\t\tif ( ! class_exists('Channel') )\n\t\t{\n\t\t\trequire PATH_MOD.'/channel/mod.channel.php';\n\t\t}\n\n\t\t$channel = new Channel();\n\n\t\t//need to remove limit here so huge amounts of events work\n\t\t$channel->limit = 1000000;\n\n\t\t// --------------------------------------------\n\t\t// Invoke Pagination for EE 2.4 and Above\n\t\t// --------------------------------------------\n\n\t\t$channel = $this->add_pag_to_channel($channel);\n\n\t\t// -------------------------------------\n\t\t// Prepare parameters\n\t\t// -------------------------------------\n\n\t\tee()->TMPL->tagparams['entry_id'] = implode('|', $calendar_array);\n\t\tee()->TMPL->tagparams['channel'] = CALENDAR_CALENDARS_CHANNEL_NAME;\n\n\t\t// -------------------------------------\n\t\t// Pre-process related data\n\t\t// -------------------------------------\n\n\t\tif (version_compare($this->ee_version, '2.6.0', '<'))\n\t\t{\n\n\t\t\tee()->TMPL->tagdata = ee()->TMPL->assign_relationship_data(\n\t\t\t\tee()->TMPL->tagdata\n\t\t\t);\n\t\t\tee()->TMPL->var_single = array_merge(\n\t\t\t\tee()->TMPL->var_single,\n\t\t\t\tee()->TMPL->related_markers\n\t\t\t);\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Execute needed methods\n\t\t// -------------------------------------\n\n\t\t$channel->fetch_custom_channel_fields();\n\n\t\t$channel->fetch_custom_member_fields();\n\n\t\t// --------------------------------------------\n\t\t// Pagination Tags Parsed Out\n\t\t// --------------------------------------------\n\n\t\t$this->fetch_pagination_data($channel);\n\n\t\t// -------------------------------------\n\t\t// Querification\n\t\t// -------------------------------------\n\n\t\t$channel->build_sql_query();\n\n\t\tif ($channel->sql == '')\n\t\t{\n\t\t\treturn $this->no_results();\n\t\t}\n\n\t\t$channel->query = ee()->db->query($channel->sql);\n\n\t\tif ($channel->query->num_rows() == 0)\n\t\t{\n//ee()->TMPL->log_item('Calendar: Channel module says no results, bailing');\n\t\t\treturn $this->no_results();\n\t\t}\n\n\t\t$channel->query->result\t= $channel->query->result_array();\n\n\t\t// -------------------------------------------\n\t\t// 'calendar_calendars_channel_query' hook.\n\t\t// - Do something with the channel query\n\n\t\tif (ee()->extensions->active_hook('calendar_calendars_channel_query') === TRUE)\n\t\t{\n\t\t\t$channel->query = ee()->extensions->call('calendar_calendars_channel_query', $channel->query, $calendar_array);\n\t\t\tif (ee()->extensions->end_script === TRUE) return;\n\t\t}\n\t\t//\n\t\t// -------------------------------------------\n\n\t\t// -------------------------------------\n\t\t// Inject Calendar-specific variables\n\t\t// -------------------------------------\n\n\t\t//ee()->TMPL->log_item('Calendar: Adding Calendar variables');\n\n\t\t$aliases = array(\n\t\t\t'title'\t\t\t=> 'calendar_title',\n\t\t\t'url_title'\t\t=> 'calendar_url_title',\n\t\t\t'entry_id'\t\t=> 'calendar_id',\n\t\t\t'author_id'\t\t=> 'calendar_author_id',\n\t\t\t'author'\t\t=> 'calendar_author',\n\t\t\t'status'\t\t=> 'calendar_status'\n\t\t);\n\n\t\t//custom variables with the letters 'url' are borked in\n\t\t//EE 2.6. Bug reported, but this should fix.\n\t\t//https://support.ellislab.com/bugs/detail/19337\n\t\tif (version_compare($this->ee_version, '2.6.0', '>='))\n\t\t{\n\t\t\t$aliases['url_title'] = 'calendar_borked_title';\n\n\t\t\tee()->TMPL->var_single['calendar_borked_title'] = 'calendar_borked_title';\n\n\t\t\tunset(ee()->TMPL->var_single['calendar_url_title']);\n\n\t\t\tee()->TMPL->tagdata = str_replace(\n\t\t\t\tarray(\n\t\t\t\t\tLD . 'calendar_url_title' . RD,\n\t\t\t\t\t'\"calendar_url_title\"',\n\t\t\t\t\t\"'calendar_url_title'\"\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\tLD . 'calendar_borked_title' . RD,\n\t\t\t\t\t'\"calendar_borked_title\"',\n\t\t\t\t\t\"'calendar_borked_title'\"\n\n\t\t\t\t),\n\t\t\t\tee()->TMPL->tagdata\n\t\t\t);\n\t\t}\n\n\t\tforeach ($channel->query->result as $k => $row)\n\t\t{\n\t\t\t$channel->query->result[$k]['author'] = ($row['screen_name'] != '') ?\n\t\t\t\t\t\t\t\t\t\t$row['screen_name'] : $row['username'];\n\n\t\t\tforeach ($aliases as $old => $new)\n\t\t\t{\n\t\t\t\t$channel->query->result[$k][$new] = $channel->query->result[$k][$old];\n\t\t\t}\n\t\t}\n\n\t\t//\t----------------------------------------\n\t\t//\tRedeclare\n\t\t//\t----------------------------------------\n\t\t//\tWe will reassign the $channel->query->result with our\n\t\t//\treordered array of values.\n\t\t//\t----------------------------------------\n\n\t\t$channel->query->result_array = $channel->query->result;\n\n\t\t// --------------------------------------------\n\t\t// Typography\n\t\t// --------------------------------------------\n\n\t\tee()->load->library('typography');\n\t\tee()->typography->initialize();\n\t\tee()->typography->convert_curly = FALSE;\n\n\t\t$channel->fetch_categories();\n\n\t\t// -------------------------------------\n\t\t// Parse\n\t\t// -------------------------------------\n\n\t\t//ee()->TMPL->log_item('Calendar: Parsing, via channel module');\n\n\n\n\t\t$channel->parse_channel_entries();\n\n\t\t// -------------------------------------\n\t\t// Paginate\n\t\t// -------------------------------------\n\n\t\t$channel = $this->add_pagination_data($channel);\n\n\t\t// -------------------------------------\n\t\t// Related entries\n\t\t// -------------------------------------\n\n\t\t//ee()->TMPL->log_item('Calendar: Parsing related entries, via Weblog module');\n\n\t\tif (version_compare($this->ee_version, '2.6.0', '<'))\n\t\t{\n\t\t\tif (count(ee()->TMPL->related_data) > 0 AND\n\t\t\t\tcount($channel->related_entries) > 0)\n\t\t\t{\n\t\t\t\t$channel->parse_related_entries();\n\t\t\t}\n\n\t\t\tif (count(ee()->TMPL->reverse_related_data) > 0 AND\n\t\t\t\tcount($channel->reverse_related_entries) > 0)\n\t\t\t{\n\t\t\t\t$channel->parse_reverse_related_entries();\n\t\t\t}\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Send 'em home\n\t\t// -------------------------------------\n\n\t\t$tagdata = $channel->return_data;\n\n\t\t//ee()->TMPL->log_item('Calendar: Done!');\n\n\t\t//on the off chance someone just wrote the word\n\t\t//'calendar_url_title', we should fix that before\n\t\t//output. (See above calendar_url_title fix)\n\t\tif (version_compare($this->ee_version, '2.6.0', '>='))\n\t\t{\n\t\t\t$tagdata = str_replace(\n\t\t\t\tarray(\n\t\t\t\t\tLD . 'calendar_borked_title' . RD,\n\t\t\t\t\t'\"calendar_borked_title\"',\n\t\t\t\t\t\"'calendar_borked_title'\"\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\tLD . 'calendar_url_title' . RD,\n\t\t\t\t\t'\"calendar_url_title\"',\n\t\t\t\t\t\"'calendar_url_title'\"\n\t\t\t\t),\n\t\t\t\t$tagdata\n\t\t\t);\n\t\t}\n\n\t\treturn $tagdata;\n\n\t}", "public function getAllEvents($arrEvents, $arrCalendars, $intStart, $intEnd)\n {\n foreach( $arrEvents as $k => $v )\n {\n foreach( $v as $kk => $vv )\n {\n foreach( $vv as $kkk => $arrEvent )\n {\n if ($arrEvent['register'])\n {\n if ($arrEvent['register_jumpTo'] > 0)\n {\n $arrJump = $this->Database->execute(\"SELECT * FROM tl_page WHERE id=\".$arrEvent['register_jumpTo'])->fetchAssoc();\n $arrEvent['register_href'] = $this->generateFrontendUrl($arrJump, '/events/'.$arrEvent['alias']);\n }\n \n $arrEvents[$k][$kk][$kkk] = $arrEvent;\n }\n }\n }\n }\n \n return $arrEvents;\n }", "public function getEventsCreatedHere()\n {\n $options = array(\n 'calendar' => $this->shortname,\n 'created_only' => true\n );\n\n # create new events class. On constructor it will get the stuff\n $events = new Events($options);\n return $events;\n }", "private function _get_calendar_array()\n\t{\n\t $this->all_events = $this->result->xpath(\".//event\");\n\t \n\t foreach($this->all_events as $an_event):\n\t $start_at = $an_event->xpath(\"./start-at\");\n \t $start_at = $start_at[0];\n \t $end_at = $an_event->xpath(\"./end-at\");\n \t $end_at = $end_at[0];\n \t \n \t $start_at = new DateTime($start_at);\n \t $start_at->setTimezone(new DateTimeZone('America/Chicago'));\n \t $start_at->setTime(0, 0, 0);\n \t $end_at = new DateTime($end_at);\n \t $end_at->setTimezone(new DateTimeZone('America/Chicago'));\n \t $end_at->setTime(0, 0, 0);\n \t \n \t $start_timestamp = strtotime($start_at->format('Y-m-d'));\n $end_timestamp = strtotime($end_at->format('Y-m-d'));\n \n $start_year = date(\"Y\", $start_timestamp);\n $end_year = date(\"Y\", $end_timestamp);\n $start_month = date(\"m\", $start_timestamp);\n $end_month = date(\"m\", $end_timestamp);\n $start_day = date(\"d\", $start_timestamp);\n $start_day = $start_day + 1;\n $end_day = date(\"d\", $end_timestamp);\n $end_day = $end_day + 1;\n \n if(($start_year == $this->year && $start_month == $this->month) || ($end_year == $this->year && $end_month == $this->month)):\n if($start_year == $end_year):\n if($start_month == $end_month):\n $this->_calendar_array_one($start_day, $end_day);\n else:\n if($end_month != $this->month):\n $this->_calendar_array_two($start_day);\n else:\n $this->_calendar_array_three($end_day);\n endif;\n endif;\n endif;\n endif;\n endforeach;\n \n\t foreach($this->callinks as $callinks):\n\t foreach($callinks as $key => $value):\n\t $this->combined_callinks[\"$key\"] = $value;\n\t endforeach;\n\t endforeach;\n\t}", "private static function get_events() {\n\t\treturn array(\n\t\t\t'formidable_send_usage' => 'weekly',\n\t\t);\n\t}", "public function run()\n {\n $events = array(\n ['id' => 1, 'name' => 'Event 1', 'created_at' => new DateTime, 'updated_at' => new DateTime],\n ['id' => 2, 'name' => 'Event 2', 'created_at' => new DateTime, 'updated_at' => new DateTime],\n );\n DB::table('events')->insert($events);\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}", "function add_event($settings)\n {\n if(!$this->isLogged)\n $this->login();\n \n if($this->isLogged)\n {\n $_entry = \"<entry xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005'>\n <category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/g/2005#event'></category>\n <title type='text'>\".$settings[\"title\"].\"</title>\n <content type='text'>\".$settings[\"content\"].\"</content>\n <author>\n <name>\".$this->email.\"</name>\n <email>\".$this->email.\"</email>\n </author>\n <gd:transparency\n value='http://schemas.google.com/g/2005#event.opaque'>\n </gd:transparency>\n <gd:eventStatus\n value='http://schemas.google.com/g/2005#event.confirmed'>\n </gd:eventStatus>\n <gd:where valueString='\".$settings[\"where\"].\"'></gd:where>\n <gd:when startTime='\".$settings[\"startDay\"].\"T\".$settings[\"startTime\"].\".000Z'\n endTime='\".$settings[\"endDay\"].\"T\".$settings[\"endTime\"].\".000Z'>\n\t<gd:reminder minutes='5' /></gd:when>\n </entry>\";\n $this->prepare_feed_path();\n \n $header = array();\n $this->setMoreHeader(\"MIME-Version: 1.0\");\n //$this->setMoreHeader(\"Accept: text/xml\");\n $this->setMoreHeader(\"Authorization: GoogleLogin auth=\".$this->fAuth);\n $this->setMoreHeader(\"Content-length: \".strlen($_entry));\n $this->setMoreHeader(\"Content-type: application/atom+xml\");\n $this->setMoreHeader(\"Cache-Control: no-cache\");\n $this->setMoreHeader(\"Connection: close \\r\\n\");\n $this->setMoreHeader($_entry);\n\n \n $this->setHost($this->feed_host,80);\n $this->useSSL(false);\n $this->setHandleRedirects(false);\n $status = $this->post($this->feed_path_prepared, null ,null);\n if (302==$status) {\n \t$h = $this->getHeaders();\n\t$new_uri = parse_url($h['location']);\n\t$status =$this->post($new_uri['path'].'?'.$new_uri['query'], null ,null) ;\n\tif(201==$status)\n\t return true;\n\t}\n }\n return false;\n }", "public function setEvents(array $events)\n\t{\n\t\t$this->events = $events;\n\t}", "public function archive()\n\t{\n\t\t// --------------------------------------\n\t\t// Prep no_results to avoid conflicts\n\t\t// --------------------------------------\n\n\t\t$this->_prep_no_results();\n\n\t\t// --------------------------------------\n\t\t// Get the events\n\t\t// --------------------------------------\n\n\t\tif ( ! ($events = $this->_get_event_entries()))\n\t\t{\n\t\t\t$this->_log('No events found, returning no results');\n\t\t\treturn $this->EE->TMPL->no_results();\n\t\t}\n\n\t\t// --------------------------------------\n\t\t// Loop through events and add them to the months array\n\t\t// --------------------------------------\n\n\t\t$months = array();\n\n\t\tforeach ($events AS $event)\n\t\t{\n\t\t\t// Create Low Date objects from each date\n\t\t\t$start = new Low_date($event['start_date']);\n\t\t\t$end = new Low_date($event['end_date']);\n\n\t\t\t// Set both dates to the first of the month\n\t\t\t// and return the month url: YYYY-MM\n\t\t\t$start_month = $start->first_of_month()->month_url();\n\t\t\t$end_month = $end->first_of_month()->month_url();\n\n\t\t\t// If event starts and ends in the same month,\n\t\t\t// simply add it to the months array\n\t\t\tif ($start_month == $end_month)\n\t\t\t{\n\t\t\t\t$months[$start_month][] = $event['entry_id'];\n\t\t\t}\n\t\t\t// Or else add each spanning month to the months array\n\t\t\telse\n\t\t\t{\n\t\t\t\t// To do this, increase the start date by a month\n\t\t\t\t// until it exceeds the end month\n\t\t\t\twhile ($start->month_url() <= $end_month)\n\t\t\t\t{\n\t\t\t\t\t$months[$start->month_url()][] = $event['entry_id'];\n\t\t\t\t\t$start->add('month');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// --------------------------------------\n\t\t// Sort the array by month\n\t\t// --------------------------------------\n\n\t\tif ($this->EE->TMPL->fetch_param('sort', 'asc') == 'asc')\n\t\t{\n\t\t\tksort($months);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tkrsort($months);\n\t\t}\n\n\t\t// --------------------------------------\n\t\t// Create data array based on month\n\t\t// --------------------------------------\n\n\t\t$data = array();\n\n\t\tforeach ($months AS $month => $rows)\n\t\t{\n\t\t\t// Initiate new row for data\n\t\t\t$row = array(\n\t\t\t\t'month_url' => $month,\n\t\t\t\t'events_in_month' => count($rows)\n\t\t\t);\n\n\t\t\t// Create new date for this month\n\t\t\t$date = new Low_Date($month);\n\n\t\t\t// Add each possible format to this row\n\t\t\tforeach ($this->formats AS $fmt => $key)\n\t\t\t{\n\t\t\t\t$row[$key] = $date->ee_format($fmt);\n\t\t\t}\n\n\t\t\t// Then add the row to the data array\n\t\t\t$data[] = $row;\n\t\t}\n\n\t\treturn $this->EE->TMPL->parse_variables($this->EE->TMPL->tagdata, $data);\n\n\t}", "function add_event($input = array()) {\r\n \r\n if ($_SERVER['REQUEST_METHOD'] === 'POST') {\r\n \r\n // check if user is logged in\r\n if (!isset($_SESSION['active']) || $_SESSION['active'] === false) {\r\n header(\"location: \" . $_SERVER['PHP_SELF'] . \"?action=login&error=err_login_to_add_event\");\r\n return;\r\n }\r\n \r\n require(HOME_DIR . 'libs/event.class.php');\r\n $event = new event;\r\n \r\n\r\n $event->creator_id = $_SESSION['user_id'];\r\n // check if title is empty\r\n if (empty($input['title'])) {\r\n $this->tpl->assign('ERROR_TITLE', 'err_title_empty');\r\n return;\r\n }\r\n $event->title = $input['title'];\r\n \r\n // check description\r\n if (empty($input['description'])) {\r\n $this->tpl->assign('ERROR_DESCRIPTION', 'err_description_empty');\r\n return;\r\n }\r\n $event->description = $input['description'];\r\n\r\n // check label\r\n $label = $input['label'];\r\n $label = json_decode($label);\r\n $event->label = $label;\r\n \r\n // check date\r\n $event->fixed_date = isset($input['fixed_date']) ? 1 : 0;\r\n $event->start_date = date('Y-m-d', mktime($input['start_date']));\r\n $event->start_time = date('h:i', mktime($input['start_time']));\r\n\r\n // check location\r\n $event->fixed_location = isset($input['fixed_location']) ? 1 : 0;;\r\n \r\n // handle number of participants\r\n $event->limited_number_of_participants = isset($input['limited_number_of_participants']) ? 1 : 0;\r\n $event->max_number_of_participants = $input['max_number_of_participants'];\r\n \r\n // handle reservations\r\n $event->advance_reservation_required = isset($input['advance_reservation_required']) ? 1 : 0; \r\n $event->confirm_reservations = isset($input['advance_reservation_required']) && isset($input['confirm_reservations']) ? 1 : 0;\r\n\r\n $event->insert_into_db();\r\n header(\"location: \" . $_SERVER['PHP_SELF'] . \"?action=dashboard&message=event_successfully_created\"); \r\n } \r\n }", "public function setEvents(array $events) {\n $this->_events = $events;\n return $this;\n }", "public function modalinsertEvents(Request $request)\n {\n\n $val_user_id= 'in:'.((Auth::user()->can('changeevents')) ? \\App\\Department::find(Auth::user()->department->id)->users()->get()->implode('id', ',') : Auth::user()->id);\n\n $this->validate($request, [\n 'user_id' => $val_user_id,\n 'date_from' => 'date_format:j.n.Y|required',\n 'date_to' => 'date_format:j.n.Y|required',\n\n ]);\n\n $user_id = $request->input('user_id');\n\n $date_from = new Carbon($request->input('date_from'));\n $date_to = new Carbon($request->input('date_to'));\n\n\n //check event_id exists. If not create a new array according to the submitted dates\n if ($request->has('event_id'))\n {\n $event_id = $request->input('event_id');\n }\n else\n {\n $event_id = array();\n for ($d=clone $date_from; $d <= $date_to ; $d->addDay())\n {\n if($e = \\App\\Event::where('date', '=', $d->toDateString())->where('user_id', '=', $user_id)->first())\n {\n $event_id[] = $e->id;\n }\n else\n {\n $event_id[] = 0;\n }\n }\n }\n\n switch ($request->input('entry_id')) {\n\n case 0:\n \\App\\Event::leftJoin('entries', 'entry_id', '=', 'entries.id')\n ->select(DB::raw(' where right = 0 or or right ='.Auth::user()->can('confirmentry').' and right = 1'))\n ->whereIn('events.id', $event_id)->delete();\n break;\n\n case -1:\n DB::table('events')\n ->leftJoin('entries', 'entry_id', '=', 'entries.id')\n ->select(DB::raw(' where right = 0 or or right ='.Auth::user()->can('confirmentry').' and right = 1'))\n ->whereIn('events.id', $event_id)\n ->update(['comment' => $request->input('comment')]);\n break;\n\n case -2:\n DB::table('events')\n ->leftJoin('entries', 'entry_id', '=', 'entries.id')\n ->select(DB::raw(' where right = 0 or right ='.Auth::user()->can('confirmentry').' and right = 1'))\n ->whereIn('events.id', $event_id)\n ->update(['approved' => $request->input('approved')]);\n\n default:\n\n $entry = \\App\\Entry::find($request->input('entry_id'));\n $onweekend = $entry->onweekend;\n $right = $entry->right;\n // Either the right does not need permission 'confirmentry' or it does and user has the permission\n if( Auth::user()->can('confirmentry') || !$right )\n {\n $d1 = clone $date_from;\n $d2 = clone $date_to;\n $custom_dates = Lists::customdatesinperiod($d1, $d2, $user_id)->toArray(); //return $custom_dates;\n $key = 0;\n for ($day = clone $date_from; $day <= $date_to ; $day->addDay()) {\n // only process if is to be inserted\n if( ($day->isWeekday() && !in_array($day->toDateString(), $custom_dates)) || $onweekend || ($day->isWeekday() && in_array($day->toDateString(), $custom_dates) && $onweekend) )\n {\n\n $event = \\App\\Event::firstorNew(['user_id' => $user_id, 'date' => $day->toDateString()]);\n\n if (!$event->exists)\n {\n $old_entry_right = 0;\n }\n else\n {\n $old_entry_right = $event->entry->right;\n }\n\n if (Auth::user()->can('confirmentry') || !$old_entry_right )\n {\n /*$event->user_id = $user_id;\n $event->date = $day->toDateString();*/\n $event->entry_id = $request->input('entry_id');\n $event->comment = $request->input('comment');\n $event->approved = (!$right) ? 1 : ((Auth::user()->can('confirmentry')) ? $request->input('approved') : 0);\n $event->save();\n }\n }\n }\n }\n else\n {\n return ('2');\n }\n break;\n }\n\n //Generate table row\n $events = Lists::eventsinmonth($date_from->startofmonth(), $date_to->endofmonth(), $request->input('user_id'));\n\n $html = '';\n foreach($events as $e)\n {\n $badge = ($e['comment']<>'') ? '<br><span class=\"badge\">K</span>' : '';\n $html .= \"<td class='\".$e['class'].\"' title='Eintrag: \".$e['event_name'].\", Bemerkung: \".$e['comment'].\"' data-date='\".$e['date'].\"' data-event_id=\".$e['event_id'].\">\".$e['event_shortname'].$badge.\"</td>\";\n }\n\n return($html);\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 events()\n {\n $templateCalendarEvent = factory(TemplateCalendarEvent::class)->create();\n $calendarEvent = factory(CalendarEvent::class)->make();\n $calendarEvent->template()->associate($templateCalendarEvent);\n $calendarEvent->save();\n\n $this->assertInstanceOf(CalendarEvent::class, $templateCalendarEvent->events()->first());\n }", "public function run()\n {\n $events = [\n [\n 'title' => 'Reuniao 01',\n 'start' => '2021-07-01',\n 'end' => '2021-07-03',\n ],\n [\n 'title' => 'Reuniao 02',\n 'start' => '2021-07-07',\n 'end' => '2021-07-010',\n ]\n ];\n }", "function ReadEvents()\n {\n $this->ApplicationObj()->Events=\n $this->Sql_Select_Hashes\n (\n $this->ApplicationObj()->HtmlEventsWhere(),\n array(),\n array(\"StartDate\",\"ID\")\n );\n \n $this->ApplicationObj()->Events=array_reverse($this->ApplicationObj()->Events);\n }", "public function getEvents()\n {\n $startDate = new \\DateTime(\"-1 months\");\n $endDate = new \\DateTime(\"+3 months\");\n\n $repo = EntityUtils::getRepository(\"EventLegacy\");\n\n //Use a different function for getting events for a student\n if ($this->user_context->isStudent()) {\n return $this->getStudentEvents($startDate, $endDate);\n }\n\n $eventResults = $repo->getStudentEventsByProgram($this->user_context->program->id, $startDate, $endDate, $this->filters);\n $quickAddResults = $repo->getStudentQuickAddShiftsByProgram($this->user_context->program->id, $startDate, $endDate, $this->filters);\n\n return ['events' => $eventResults, 'quick_add_shifts' => $quickAddResults];\n }", "private function getData()\n {\n $data = array();\n\n $data = array_merge($data,\n $this->services->CalendarData->currentUserData(),\n $this->services->Common->subPageName( $this->timber->translator->trans('Calendar') . \" | \" ),\n $this->services->Common->runtimeScripts( 'calendar' ),\n $this->services->Common->injectScripts(array(\n 'projectsEvents' => $this->services->CalendarData->projectsEvents(),\n 'tasksEvents' => $this->services->CalendarData->tasksEvents(),\n 'projectsEventsColor' => '#ecf0f1',\n 'projectsEventsTextColor' => '#2c3e50',\n 'tasksEventsColor' => '#bdc3c7',\n 'tasksEventsTextColor' => '#2980b9',\n 'calEvent_id' => $this->timber->translator->trans('ID'),\n 'calEvent_iden' => $this->timber->translator->trans('Identifier'),\n 'calEvent_type' => $this->timber->translator->trans('Type'),\n 'calEvent_mi_id' => $this->timber->translator->trans('Milestone ID'),\n 'calEvent_mi_title' => $this->timber->translator->trans('Milestone Title'),\n 'calEvent_pr_id' => $this->timber->translator->trans('Project ID'),\n 'calEvent_owner_id' => $this->timber->translator->trans('Owner ID'),\n 'calEvent_assign_to' => $this->timber->translator->trans('Assignee ID'),\n 'calEvent_assign_to_name' => $this->timber->translator->trans('Assignee Name'),\n 'calEvent_assign_to_email' => $this->timber->translator->trans('Assignee Email'),\n 'calEvent_title' => $this->timber->translator->trans('Title'),\n 'calEvent_description' => $this->timber->translator->trans('Description'),\n 'calEvent_status' => $this->timber->translator->trans('Status'),\n 'calEvent_progress' => $this->timber->translator->trans('Progress'),\n 'calEvent_priority' => $this->timber->translator->trans('Priority'),\n 'calEvent_start_at' => $this->timber->translator->trans('Start at'),\n 'calEvent_end_at' => $this->timber->translator->trans('End at'),\n 'calEvent_created_at' => $this->timber->translator->trans('Created at'),\n 'calEvent_updated_at' => $this->timber->translator->trans('Updated at'),\n 'calEvent_currency' => $this->timber->translator->trans('Currency'),\n 'calEvent_reference' => $this->timber->translator->trans('Reference'),\n 'calEvent_ref_id' => $this->timber->translator->trans('Reference ID'),\n 'calEvent_version' => $this->timber->translator->trans('Version'),\n 'calEvent_budget' => $this->timber->translator->trans('Budget'),\n 'calEvent_tax_value' => $this->timber->translator->trans('Tax Value'),\n 'calEvent_tax_type' => $this->timber->translator->trans('Tax Type'),\n 'calEvent_discount_value' => $this->timber->translator->trans('Discount Value'),\n 'calEvent_discount_type' => $this->timber->translator->trans('Discount Type'),\n 'calEvent_attach' => $this->timber->translator->trans('Attachments'),\n 'calEvent_owners' => $this->timber->translator->trans('Owners'),\n 'calEvent_staff' => $this->timber->translator->trans('Staff'),\n 'calEvent_clients' => $this->timber->translator->trans('Clients'),\n 'calEvent_staff_ids' => $this->timber->translator->trans('Staff IDs'),\n 'calEvent_clients_ids' => $this->timber->translator->trans('Clients IDs'),\n ))\n );\n\n return $data;\n }", "public function add_event($data)\n {\n $datafields = array\n ('start' => array('req' => true)\n ,'end' => array('req' => true)\n ,'gid' => array('req' => true)\n ,'title' => array('req' => false, 'def' => '')\n ,'description' => array('req' => false, 'def' => '')\n ,'location' => array('req' => false, 'def' => '')\n ,'type' => array('req' => false, 'def' => 0)\n ,'status' => array('req' => false, 'def' => 0)\n ,'opaque' => array('req' => false, 'def' => 1)\n ,'uuid' => array('req' => false, 'def' => basics::uuid())\n );\n foreach ($datafields as $k => $v) {\n if (!isset($data[$k])) {\n if ($v['req'] === true) {\n return false;\n }\n $data[$k] = $v['def'];\n } else {\n $data[$k] = $this->esc($data[$k]);\n }\n }\n if (empty($data['gid'])) {\n $data['gid'] = 0;\n }\n\n // Am I the owner?\n if (!empty($data['gid']) && $this->getGroupOwner($data['gid']) != $this->uid) {\n // If not, I should have write permissions through a share\n if (!empty($GLOBALS['DB']->features['groups'])) {\n $perms = $GLOBALS['DB']->getUserSharedFolderPermissions($this->uid, 'calendar', $data['gid']);\n }\n if (empty($perms) || empty($perms['write'])) {\n // No, I haven't\n return false;\n }\n }\n\n $query = 'INSERT '.$this->Tbl['cal_event']\n .' (`uid`,`gid`,`starts`,`ends`,`title`,`description`,`location`,`type`,`status`,`opaque`,`uuid`,`lastmod`) VALUES ('\n .$this->uid.', \"'.$data['gid'].'\" ,\"'.$data['start'].'\",\"'.$data['end'].'\",\"'.$data['title'].'\",\"'.$data['description'].'\"'\n .',\"'.$data['location'].'\",'.doubleval($data['type']).','.doubleval($data['status']).',\"'.doubleval($data['opaque']).'\", \"'.$data['uuid'].'\",NOW())';\n if (!$this->query($query)) {\n return false;\n }\n $newId = $this->insertid();\n // Make sure, the end of an event is NOT before its beginning\n $this->query('UPDATE '.$this->Tbl['cal_event'].' SET `ends`=`starts` WHERE `ends`<`starts` AND id='.$newId);\n\n if (isset($data['attendees']) && !empty($data['attendees'])) {\n $query = 'INSERT INTO '.$this->Tbl['cal_attendee'].' (`eid`,`ref`,`name`,`email`,`role`,`type`,`status`,`mailhash`) VALUES ';\n $k = 0;\n foreach ($data['attendees'] as $v) {\n if ($k) {\n $query .= ',';\n }\n $query .= '('.doubleval($newId).',\"evt\",\"'.$this->esc($v['name']).'\",\"'.$this->esc($v['email']).'\"'\n .',\"'.$this->esc($v['role']).'\",\"'.$this->esc($v['type']).'\",'.doubleval($v['status'])\n .',\"'.$this->esc(basics::uuid()).'\")';\n $k++;\n }\n $this->query($query);\n }\n\n if (isset($data['reminders']) && !empty($data['reminders'])) {\n $query = 'INSERT INTO '.$this->Tbl['cal_reminder'].' (`eid`,`ref`,`uid`,`mode`,`time`,`text`,`smsto`,`mailto`) VALUES ';\n $k = 0;\n foreach ($data['reminders'] as $v) {\n if ($k) {\n $query .= ',';\n }\n if ($v['mode'] == '-') {\n continue;\n }\n $query .= '('.doubleval($newId).',\"evt\",'.$this->uid.',\"'.$this->esc($v['mode']).'\",'.doubleval($v['time'])\n .',\"'.$this->esc($v['text']).'\"'\n .',\"'.(!empty($v['smsto']) ? $this->esc($v['smsto']) : '').'\"'\n .',\"'.(!empty($v['mailto']) ? $this->esc($v['mailto']) : '').'\")';\n $k++;\n }\n if ($k > 0) {\n $this->query($query);\n }\n }\n if (isset($data['repetitions']) && !empty($data['repetitions'])) {\n $query = 'INSERT INTO '.$this->Tbl['cal_repetition'].' (`eid`,`ref`,`type`,`repeat`,`extra`,`until`) VALUES ';\n $k = 0;\n foreach ($data['repetitions'] as $v) {\n if ($k) {\n $query .= ',';\n }\n $query .= '('.doubleval($newId).',\"evt\",\"'.$this->esc($v['type']).'\",'.doubleval($v['repeat'])\n .','.(isset($v['extra']) && !is_null($v['extra']) ? '\"'.$this->esc($v['extra']).'\"' : '\"\"')\n .','.(isset($v['until']) && !is_null($v['until']) ? '\"'.$this->esc($v['until']).'\"' : 'NULL').')';\n $k++;\n }\n if ($k > 0) {\n $this->query($query);\n }\n } else {\n $query = 'INSERT INTO '.$this->Tbl['cal_repetition'].' (`eid`,`ref`,`type`,`repeat`,`extra`,`until`) VALUES '\n .'('.doubleval($newId).',\"evt\",\"-\",0,\"\",NULL)';\n $this->query($query);\n }\n return $newId;\n }", "public function onGetEvents()\n {\n $start = input('start');\n $end = input('end');\n // dd($start, $end);\n // trace_log($start, $end);\n $systemTZ = config(\"app.timezone\");\n $isConvertToFrontEndTimeZone = config(\"yfktn.eventgubernur::convertToFrontEndTimeZone\");\n // karena di tanggal yang diberikan waktu fullcalendar melakukan permintaan\n // events, pada string yang diberikan sudah ada informasi timezone nya\n // sehingga kita tidak perlu lagi melakukan proses setting manual timezone\n $startTZ = Carbon::parse($start);\n $endTZ = Carbon::parse($end);\n $frontEndTimeZone = $startTZ->timezone;\n // trace_log($startTZ, $endTZ);\n // trace_sql();\n // dapatkan dari db\n $events = EventsModel::whereBetween('tgl_mulai', [\n $startTZ->copy()->timezone($systemTZ), \n $endTZ->copy()->timezone($systemTZ)])\n ->get();\n trace_log($events->toArray(), ($isConvertToFrontEndTimeZone? \"TRUE\":\"FALSE\"));\n // loop untuk melakukan render ke JSON nya\n $data = [];\n $i = 0;\n foreach ($events as $e) {\n $satuHari = false;\n $data[$i]['id'] = $e->id;\n $data[$i]['title'] = $e->judul;\n $data[$i]['slug'] = $e->slug;\n $theStart = Carbon::parse(\"{$e->tgl_mulai} {$e->jam_mulai}\");\n if ($e->tgl_selesai == null) {\n // satu hari\n if ($e->jam_selesai == null) {\n // satu hari?\n $theEnd = $theStart->copy();\n $satuHari = true;\n } else {\n $theEnd = $theStart->copy()->setTimeFromTimeString($e->jam_selesai);\n }\n } else {\n if ($e->jam_selesai == null) {\n $theEnd = Carbon::parse(\"{$e->tgl_selesai}\");\n } else {\n $theEnd = Carbon::parse(\"{$e->tgl_selesai} {$e->jam_selesai}\", $systemTZ);\n }\n }\n trace_log($theStart->format(\"Y-m-d H:i\"), $theEnd->format(\"Y-m-d H:i\"));\n // kalau di set satu hari, maka set pada waktu time telah dirubah timezone nya!\n if($satuHari) {\n // $theEnd->setTime(\n // 23, 59, 59\n // );\n $data[$i]['start'] = $isConvertToFrontEndTimeZone ? \n $theStart->timezone($frontEndTimeZone)->format(\"Y-m-d\") :\n $theStart->shiftTimezone($frontEndTimeZone)->format(\"Y-m-d\");\n // untuk satu hari nilai end tidak perlu ditambahkan!\n // $data[$i]['end'] = null;\n } else {\n // dapatkan, convert ke timezone si front end dan set formatnya\n $data[$i]['start'] = $isConvertToFrontEndTimeZone?\n $theStart->timezone($frontEndTimeZone)->toIso8601String():\n $theStart->shiftTimezone($frontEndTimeZone)->toIso8601String();\n if($isConvertToFrontEndTimeZone) {\n $theEnd->timezone($frontEndTimeZone);\n } else {\n $theEnd->shiftTimezone($frontEndTimeZone);\n }\n if($e->jam_selesai == null) {\n // set di sini supaya menunjukkan sampai akhir hari itu / full satu hari!\n $theEnd->endOfDay();\n }\n $data[$i]['end'] = $theEnd->toIso8601String();\n }\n trace_log($data[$i]);\n $i = $i + 1;\n }\n return $data;\n }", "function getEventsFeed($args = array()) {\n\t \t$events = $this->getEventsExternal($args);\n\n\t \t$esc_chars = \",;\\\\\";\n\n\t \t// Get Page url if any\n\t \t$page_id = intval(get_option('fse_page'));\n\t \tif (!empty($page_id)) {\n\t \t\t$page_url = get_permalink($page_id);\n\t \t\tif (!empty($page_url)) {\n\t \t\t\tif (strpos($page_url, '?') === false)\n\t \t\t\t$page_url .= '?event=';\n\t \t\t\telse\n\t \t\t\t$page_url .= '&event=';\n\t \t\t}\n\t \t}\n\n\t \t$feed = array();\n\t \t$feed[] = 'BEGIN:VCALENDAR';\n\t \t$feed[] = 'METHOD:PUBLISH';\n\t \t$feed[] = 'PRODID:http://www.faebusoft.ch/webentwicklung/wpcalendar/';\n\t \t$feed[] = 'VERSION:2.0';\n\t \t$feed[] = 'X-WR-TIMEZONE:'.get_option('timezone_string');\n\n\t \t//print_r($events);\n\n\t \tforeach($events as $e) {\n\n\t \t\t$feed[] = 'BEGIN:VEVENT';\n\n\t \t\t$feed[] = 'UID:'.get_bloginfo('url').'/feed/ical/'.$e->eventid;\n\t \t\t//$feed[] = 'UID:'.md5(uniqid());\n\n\t \t\t// Add description\n\t \t\t$feed[] = 'DESCRIPTION:'.str_replace(array(\"\\r\",\"\\n\"), array('','\\n'),addcslashes(trim(strip_tags($e->getDescription())), $esc_chars));\n\n\t \t\t// Categories\n\t \t\tforeach($e->categories_t as $k => $c) {\n\t \t\t\t$e->categories_t[$k] = addcslashes($c, $esc_chars);\n\t \t\t}\n\t \t\t$feed[] = 'CATEGORIES:'.implode(',',$e->categories_t);\n\n\t \t\t// Location\n\t \t\t$feed[] = 'LOCATION:'.addcslashes($e->location, $esc_chars);\n\n\t \t\t// Summary\n\t \t\t$feed[] = 'SUMMARY:'.addcslashes($e->subject, $esc_chars);\n\n\t \t\t// Times\n\t \t\tif ($e->allday == true) {\n\t \t\t\t$feed[] = 'DTSTART;TZID='.get_option('timezone_string').';VALUE=DATE:'.mysql2date('Ymd', $e->from);\n\n\t \t\t\t// End has to be + 1!\n\t \t\t\t$end = strtotime($e->to)+(60*60*24);\n\t \t\t\t$feed[] = 'DTEND;TZID='.get_option('timezone_string').';VALUE=DATE:'.date('Ymd', $end);\n\t \t\t} else {\n\t \t\t\t$feed[] = 'DTSTART;TZID='.get_option('timezone_string').':'.mysql2date('Ymd\\THis', $e->from);\n\t \t\t\t$feed[] = 'DTEND;TZID='.get_option('timezone_string').':'.mysql2date('Ymd\\THis', $e->to);\n\t \t\t}\n\n\t \t\t// Classification\n\t \t\t$feed[] = 'CLASS:PUBLIC';\n\n\t \t\t// Publish Date of event\n\t \t\t$feed[] = 'DTSTAMP;TZID='.get_option('timezone_string').':'.mysql2date('Ymd\\THis', $e->publishdate);\n\n\t \t\t// URL of event\n\t \t\tif (!empty($e->postid)) {\n\t \t\t\t$feed[] = 'URL:'.get_permalink($e->postid);\n\t \t\t} elseif (!empty($page_url)) {\n\t \t\t\t$feed[] = 'URL:'.$page_url.$e->eventid;\n\t \t\t}\n\n\t \t\t$feed[] = 'END:VEVENT';\n\t \t}\n\n\t \t$feed[] = 'END:VCALENDAR';\n\n\t \t// Now trim all date to maxium 75chars\n\t \t$output = '';\n\t \tforeach ($feed as $f) {\n\t \t\t$new_line = true;\n\t \t\twhile(strlen($f) > 0) {\n\t \t\t\tif (!$new_line) {\n\t \t\t\t\t$output .= \"\\r\\n \"; // Add CRLF + Space!\n\t \t\t\t}\n\t \t\t\t$output .= substr($f, 0, 72);\n\t \t\t\t// String kürzen\n\t \t\t\tif (strlen($f) > 72) {\n\t \t\t\t\t$f = substr($f, 72);\n\t \t\t\t\t$new_line = false;\n\t \t\t\t} else {\n\t \t\t\t\t$f = '';\n\t \t\t\t}\n\t \t\t}\n\t \t\t$output .= \"\\r\\n\";\n\t \t}\n\n\t \treturn $output;\n\t }", "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 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 }", "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 }", "public static function icalendar() {\r\n $ical = \"BEGIN:VCALENDAR\".PHP_EOL;\r\n $ical .= \"VERSION:2.0\".PHP_EOL;\r\n\r\n $show_personal_bak = Calendar_Events::$calsettings->show_personal;\r\n $show_course_bak = Calendar_Events::$calsettings->show_course;\r\n $show_deadline_bak = Calendar_Events::$calsettings->show_deadline;\r\n $show_admin_bak = Calendar_Events::$calsettings->show_admin;\r\n Calendar_Events::set_calendar_settings(1,1,1,1);\r\n Calendar_Events::get_calendar_settings();\r\n $eventlist = Calendar_Events::get_calendar_events();\r\n Calendar_Events::set_calendar_settings($show_personal_bak,$show_course_bak,$show_deadline_bak,$show_admin_bak);\r\n Calendar_Events::get_calendar_settings();\r\n\r\n $events = array();\r\n foreach ($eventlist as $event) {\r\n $ical .= \"BEGIN:VEVENT\".PHP_EOL;\r\n $startdatetime = new DateTime($event->start);\r\n $ical .= \"DTSTART:\".$startdatetime->format(\"Ymd\\THis\").PHP_EOL;\r\n $duration = new DateTime($event->duration);\r\n $ical .= \"DURATION:\".$duration->format(\"\\P\\TH\\Hi\\Ms\\S\").PHP_EOL;\r\n $ical .= \"SUMMARY:[\".strtoupper($event->event_group).\"] \".$event->title.PHP_EOL;\r\n $ical .= \"DESCRIPTION:\".canonicalize_whitespace(strip_tags($event->content)).PHP_EOL;\r\n if ($event->event_group == 'deadline')\r\n {\r\n $ical .= \"BEGIN:VALARM\".PHP_EOL;\r\n $ical .= \"TRIGGER:-PT24H\".PHP_EOL;\r\n $ical .= \"DURATION:PT10H\".PHP_EOL;\r\n $ical .= \"ACTION:DISPLAY\".PHP_EOL;\r\n $ical .= \"DESCRIPTION:DEADLINE REMINDER for \".canonicalize_whitespace(strip_tags($event->title)).PHP_EOL;\r\n $ical .= \"END:VALARM\".PHP_EOL;\r\n }\r\n $ical .= \"END:VEVENT\".PHP_EOL;\r\n }\r\n $ical .= \"END:VCALENDAR\".PHP_EOL;\r\n return $ical;\r\n }", "public function events($e)\n {\n $values = array(\n 'animationfinish',\n 'error',\n 'onmouseover',\n 'onmouseout',\n 'ready',\n 'select'\n );\n\n if (is_array($e)) {\n foreach ($e as $event) {\n if (is_subclass_of($event, 'Khill\\Lavacharts\\Events\\Event')) {\n $this->events[] = $event;\n } else {\n throw $this->invalidConfigValue(\n __FUNCTION__,\n 'Event'\n );\n }\n }\n } else {\n throw $this->invalidConfigValue(\n __FUNCTION__,\n 'array'\n );\n }\n\n return $this;\n }", "public static function getEvents($calendars, $companyId, $employeeId, $start, $end) {\n\n $sql = \" SELECT event.id, event.name,event.start_datetime,event.end_datetime,event.color,is_all_day \"\n . \" FROM event \"\n . \" INNER JOIN calendar\t\"\n . \" ON event.calendar_id= calendar.id \"\n . \" AND calendar.company_id={$companyId} \"\n . \" AND calendar.disabled=\" . self::STATUS_ENABLE\n . \" WHERE ( \"\n . \" event.is_public=1 \"\n . \" OR event.created_employee_id={$employeeId}\t \"\n . \" OR (EXISTS( \"\n . \" SELECT * \"\n . \" FROM invitation \"\n . \" WHERE invitation.event_id= event.id \"\n . \" AND invitation.owner_id={$employeeId} \"\n . \" AND invitation.owner_table='employee' \"\n . \" AND invitation.company_id={$companyId} \"\n . \" AND invitation.disabled=\" . self::STATUS_ENABLE\n . \" ) \"\n . \" ) \"\n . \" OR(EXISTS( \"\n . \" SELECT * \"\n . \" FROM invitation \"\n . \" INNER JOIN department \"\n . \" ON invitation.owner_id=department.id \"\n . \" AND invitation.owner_table='department' \"\n . \" AND department.company_id={$companyId} \"\n . \" AND department.disabled=\" . self::STATUS_ENABLE\n . \" INNER JOIN employee \"\n . \" ON department.id=employee.department_id \"\n . \" AND employee.company_id={$companyId} \"\n . \" AND employee.id={$employeeId} \"\n . \" AND employee.disabled=\" . self::STATUS_ENABLE\n . \" WHERE invitation.event_id=event.id \"\n . \" AND invitation.company_id={$companyId} \"\n . \" AND invitation.disabled=\" . self::STATUS_ENABLE\n . \" ) \"\n . \" ) \"\n . \" ) \"\n . \" AND event.end_datetime <= \" . strtotime($end . \" 23:59:59\")\n . \" AND event.start_datetime >= \" . strtotime($start . \" 00:00:00\")\n . \" AND event.company_id={$companyId} \"\n . \" AND event.disabled=\" . self::STATUS_ENABLE;\n\n if (!empty($calendars)) {\n $sql .= \" AND event.calendar_id IN (\" . implode(',', $calendars) . \") \";\n $command = \\Yii::$app->getDb()->createCommand($sql);\n return $command->queryAll();\n }\n \n return [];\n }", "public function getEvents();", "public function getEvents();", "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 fetchEvents()\n {\n // TODO: Implement fetchEvents() method.\n }", "protected function registerEvents()\n {\n $events = $this->app->make(Dispatcher::class);\n\n foreach ($this->events as $event => $listeners) {\n foreach ($listeners as $listener) {\n $events->listen($event, $listener);\n }\n }\n }", "function setEventContent($year,$month,$day,$content,$url=false,$id=false){\n$eventTime=$this->mkActiveTime(0,0,1,$month,$day,$year);\n$eventContent[$eventTime]=$content;\n$this->calEventContent[]=$eventContent;\n\tif (!$id) $id=$this->cssEventContent;\n$this->calEventContentId[]=$id;\n\tif ($url) $this->calEventContentUrl[]=$url;\n\telse $this->calEventContentUrl[]=$this->calInit++;\n}", "public function indexEvents(array $events, array $context = []): void;", "function getEventsArray($from,$to,$exc_entries){\n\t\t$select_fields = \t'tx_tdcalendar_events.*';\n\t\t$select_fields .=\t', tx_tdcalendar_categories.title as category';\n\t\t$select_fields .= \t', tx_tdcalendar_categories.color as catcolor';\n\t\t$select_fields .= \t', tx_tdcalendar_locations.location as location_name';\n\t\t$select_fields .= \t', tx_tdcalendar_organizer.name as organizer_name';\n\n\t\t$from_table =\t\t'((tx_tdcalendar_events'; \n\t\t$from_table .= \t\t' INNER JOIN tx_tdcalendar_categories';\n $from_table .= \t\t' ON tx_tdcalendar_events.category = tx_tdcalendar_categories.uid)';\n\t\t$from_table .= \t\t' LEFT JOIN tx_tdcalendar_locations';\n\t\t$from_table .= \t\t' ON tx_tdcalendar_events.location_id = tx_tdcalendar_locations.uid)';\n\t\t$from_table .= \t\t' LEFT JOIN tx_tdcalendar_organizer';\n\t\t$from_table .= \t\t' ON tx_tdcalendar_events.organizer_id = tx_tdcalendar_organizer.uid';\n\n\t\t$where_clause = \t\"((tx_tdcalendar_events.begin < '\".$from.\"' AND tx_tdcalendar_events.end >= '\".$from.\"')\";\n\t\t$where_clause .= \t\" OR (tx_tdcalendar_events.begin >= '\".$from.\"' AND tx_tdcalendar_events.begin < '\".$to.\"')\";\n\n\t\t$where_clause.= \t\" OR(event_type > 0 AND event_type < 5 AND ((begin < '\".$from.\"' AND rec_end_date = 0) OR (begin < '\".$from.\"' AND rec_end_date >= '\".$from.\"') )))\";\n\n\t\t$where_clause .= \t$this->enableFieldsCategories;\n\t\t$where_clause .=\t$this->enableFieldsEvents;\n\n\t\tif ($this->conf['currCat'] AND !$this->conf['hideCategorySelection'])\n\t\t\t$where_clause .= ' AND tx_tdcalendar_events.category = '.$this->conf['currCat'];\n\t\telse\n\t\t\t$where_clause .= \t$this->getCategoryQuery('tx_tdcalendar_events.category');\n\n\t\t$where_clause .=\t$this->getPagesQuery();\n\n\t\t$orderBy =\t\t\t'tx_tdcalendar_events.begin, tx_tdcalendar_events.uid';\n\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t$select_fields,\n\t\t\t$from_table,\n\t\t\t$where_clause,\n\t\t\t$groupBy='',\n\t\t\t$orderBy,\n\t\t\t$limit=''\n\t\t);\n\n\t\treturn $this->makeArray($res, $from, $to, $exc_entries);\n\t}", "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}", "function add_event_to_array($dates, $page_data, &$datePaths) {\n foreach ($page_data['dates'] as $date) {\n $start_date = (int)($date['start-date']) / 1000;\n $end_date = (int)($date['end-date']) / 1000;\n $specific_start = date(\"Y-m-d\", $start_date );\n $specific_end = date(\"Y-m-d\", $end_date );\n\n $page_data['time_string'] = $date['time-string'];\n $page_data['specific_start'] = $date['start-date'];\n $page_data['specific_end'] = $date['end-date'];\n $page_data['specific_all_day'] = $date['all-day'];\n $page_data['specific_need_time_zone'] = $date['outside-of-minnesota'];\n if($page_data['specific_need_time_zone'] == true) {\n $time_zone = $date['time-zone'];\n if ($time_zone == \"Hawaii-Aleutian Time\") {\n $page_data['specific_time_zone'] = \"HT\";\n } elseif ($time_zone == \"Alaska Time\") {\n $page_data['specific_time_zone'] = \"AT\";\n } elseif ($time_zone == \"Pacific Time\") {\n $page_data['specific_time_zone'] = \"PT\";\n } elseif ($time_zone == \"Mountain Time\") {\n $page_data['specific_time_zone'] = \"MT\";\n } elseif ($time_zone == \"Eastern Time\") {\n $page_data['specific_time_zone'] = \"ET\";\n } else {\n $page_data['specific_time_zone'] = \"CT\";\n }\n } else {\n $page_data['specific_time_zone'] = \"\";\n }\n\n if($specific_start == $specific_end){\n //Don't need a date range.\n $key = date(\"Y-m-d\", $start_date);\n add_page_to_day($dates[$key], $page_data, $datePaths[$key]);\n }\n // range of dates\n else{\n $page_data['specific_all_day'] = true;\n $start = date(\"Y-n-j\", $start_date);\n // Add 1 day to $end so that the DatePeriod includes the last day in 'end-date'\n $end = date(\"Y-n-j\", strtotime('+1 day', $end_date));\n // Create a date period for each of the dates this event-date spans.\n // This will put it on the calendar each day.\n $period = new DatePeriod(\n new DateTime($start),\n new DateInterval('P1D'),\n new DateTime($end)\n );\n // Add a listng to the array for each event / event date\n $foreach_start_time = microtime(true);\n foreach ($period as $inner_date) {\n $key = $inner_date->format('Y-m-d');\n add_page_to_day($dates[$key], $page_data, $datePaths[$key]);\n }\n\n }\n\n }\n return $dates;\n}", "public function getCalendarEvents($organizationId, $userId, $calendarId, $start, $end, $connections, $extraField);", "public function run()\n {\n DB::table('events')->insert([\n 'employee_created_id' => 1,\n 'employee_assigned_id' => 1,\n 'client_id' => null, \n 'studio_id' => 1,\n 'start' => '2017-11-19 00:00:00',\n 'end' => '2017-11-20 00:00:00',\n 'price' => null,\n 'notes' => 'weekend',\n 'category' => 'unavailable'\n ]);\n DB::table('events')->insert([\n 'employee_created_id' => 1,\n 'employee_assigned_id' => 1,\n 'client_id' => null, \n 'studio_id' => 1,\n 'start' => '2017-11-25 00:00:00',\n 'end' => '2017-11-26 00:00:00',\n 'price' => null,\n 'notes' => 'weekend',\n 'category' => 'unavailable'\n ]);\n DB::table('events')->insert([\n 'employee_created_id' => 1,\n 'employee_assigned_id' => 1,\n 'client_id' => null, \n 'studio_id' => 1,\n 'start' => '2017-11-24 00:00:00',\n 'end' => '2017-11-25 00:00:00',\n 'price' => null,\n 'notes' => null,\n 'category' => 'holiday'\n ]);\n DB::table('events')->insert([\n 'employee_created_id' => 1,\n 'employee_assigned_id' => 1,\n 'client_id' => 2, \n 'studio_id' => 1,\n 'start' => '2017-11-20 09:00:00',\n 'end' => '2017-11-20 11:00:00',\n 'price' => 34.00,\n 'notes' => null,\n 'category' => 'appointment'\n ]);\n DB::table('events')->insert([\n 'employee_created_id' => 1,\n 'employee_assigned_id' => 1,\n 'client_id' => 3, \n 'studio_id' => 1,\n 'start' => '2017-11-20 12:45:00',\n 'end' => '2017-11-20 13:45:00',\n 'price' => 35.00,\n 'notes' => null,\n 'category' => 'appointment'\n ]);\n DB::table('events')->insert([\n 'employee_created_id' => 1,\n 'employee_assigned_id' => 1,\n 'client_id' => 2, \n 'studio_id' => 1,\n 'start' => '2017-11-23 11:30:00',\n 'end' => '2017-11-23 13:00:00',\n 'price' => 356.00,\n 'notes' => null,\n 'category' => 'appointment'\n ]);\n }", "public function index()\n {\n \n $events = [];\n\n $request = Event::all();\n \n \n if($request->count()){\n \n foreach ($request as $key => $value) {\n \n if($value->assigned_to)\n $user=User::select('name')->find($value->assigned_to);\n else\n $user= ['name'=>\\App\\Event::STATUS_UNASSIGNED ];\n \n $events[] = Calendar::event(\n \n $value->title ,\n \n false ,\n \n new \\DateTime($value->start_date),\n \n new \\DateTime($value->end_date),\n\n $value->status,\n [\n\n // 'status'=> $value->status,\n 'user_name' => $user,\n ]\n\n );\n \n }\n \n }\n if(!$events)\n {\n $calendar = Calendar::addEvents($events);\n \n } else{\n foreach($events as $event)\n {\n if ($event->id == Event::STATUS_COMPLETED )\n {\n $calendar = \\Calendar::addEvent($event,\n [\n 'color' => '#2ecc71',\n ])->setOptions([ //set fullcalendar options\n 'FirstDay' => 1,\n // 'contentheight' => 650,\n 'editable' => false,\n 'allDay' => false,\n 'slotLabelFormat' => 'HH:mm:ss',\n 'timeFormat' => 'HH:mm',\n ])->setCallbacks([ //set fullcalendar callback options (will not be JSON encoded)\n \n 'eventClick' => 'function($events, jsEvent, view) {\n $(\"#modalTitle\").html($events.title);\n $(\"#status\").html($events.id);\n {$(\"#assigned_user\").html($events.user_name.name);}\n var date = $events.start._i;\n var time =date.substr(11,5);\n $(\"#Start\").html(time);\n var edate = $events.end._i;\n var etime = edate.substr(11,5);\n $(\"#End\").html(etime);\n $(\"#calendarModal\").modal();\n }',\n 'eventRender' => 'function($events, element) {\n \n $(element).tooltip({title: $events.title}); \n }',\n \n ]);\n // break;\n }else if ($event->id == Event::STATUS_CREATED)\n {\n $calendar = \\Calendar::addEvent($event,\n [\n 'color' => '#3498db',\n ])->setOptions([ //set fullcalendar options\n 'FirstDay' => 1,\n // 'contentheight' => 650,\n 'editable' => false,\n 'allDay' => false,\n 'slotLabelFormat' => 'HH:mm:ss',\n 'timeFormat' => 'HH:mm',\n ])->setCallbacks([ //set fullcalendar callback options (will not be JSON encoded)\n \n 'eventClick' => 'function($events, jsEvent, view) {\n $(\"#modalTitle\").html($events.title);\n $(\"#status\").html($events.id);\n {$(\"#assigned_user\").html($events.user_name.name);}\n var date = $events.start._i;\n var time =date.substr(11,5);\n $(\"#Start\").html(time);\n var edate = $events.end._i;\n var etime = edate.substr(11,5);\n $(\"#End\").html(etime);\n $(\"#calendarModal\").modal();\n }',\n 'eventRender' => 'function($events, element) {\n \n $(element).tooltip({title: $events.title}); \n }',\n \n ]);\n }else if ($event->id == Event::STATUS_ASSIGNED)\n {\n $calendar = \\Calendar::addEvent($event,\n [\n 'color' => '#8e44ad',\n ])->setOptions([ //set fullcalendar options\n 'FirstDay' => 1,\n // 'contentheight' => 650,\n 'editable' => false,\n 'allDay' => false,\n 'slotLabelFormat' => 'HH:mm:ss',\n 'timeFormat' => 'HH:mm',\n ])->setCallbacks([ //set fullcalendar callback options (will not be JSON encoded)\n \n 'eventClick' => 'function($events, jsEvent, view) {\n $(\"#modalTitle\").html($events.title);\n $(\"#status\").html($events.id);\n {$(\"#assigned_user\").html($events.user_name.name);}\n var date = $events.start._i;\n var time =date.substr(11,5);\n $(\"#Start\").html(time);\n var edate = $events.end._i;\n var etime = edate.substr(11,5);\n $(\"#End\").html(etime);\n $(\"#calendarModal\").modal();\n }',\n 'eventRender' => 'function($events, element) {\n \n $(element).tooltip({title: $events.title}); \n }',\n \n ]);\n }else if ($event->id == Event::STATUS_CANCELLED)\n {\n $calendar = \\Calendar::addEvent($event,\n [\n 'color' => '#e74c3c',\n ])->setOptions([ //set fullcalendar options\n 'FirstDay' => 1,\n // 'contentheight' => 650,\n 'editable' => false,\n 'allDay' => false,\n 'slotLabelFormat' => 'HH:mm:ss',\n 'timeFormat' => 'HH:mm',\n ])->setCallbacks([ //set fullcalendar callback options (will not be JSON encoded)\n \n 'eventClick' => 'function($events, jsEvent, view) {\n $(\"#modalTitle\").html($events.title);\n $(\"#status\").html($events.id);\n {$(\"#assigned_user\").html($events.user_name.name);}\n var date = $events.start._i;\n var time =date.substr(11,5);\n $(\"#Start\").html(time);\n var edate = $events.end._i;\n var etime = edate.substr(11,5);\n $(\"#End\").html(etime);\n $(\"#calendarModal\").modal();\n }',\n 'eventRender' => 'function($events, element) {\n \n $(element).tooltip({title: $events.title}); \n }',\n \n ]);\n }\n\n \n }\n }\n\n\n // ->setOptions([ //set fullcalendar options\n // \t'firstDay' => 1\n // ])->setCallbacks([ //set fullcalendar callback options (will not be JSON encoded)\n // 'eventClick' => 'function() {\n // $(\"#showEvent\").modal();\n // }'\n // ])\n\n\n // $calendar = \\Calendar::addEvents($events)\n // ->setOptions([ //set fullcalendar options\n\t// \t'firstDay' => 1\n\t// ])->setCallbacks([ //set fullcalendar callback options (will not be JSON encoded)\n // 'eventClick' => 'function($events) {\n // console.log( $events);\n // }'\n // ]);\n // $calendar = \\Calendar::addEvents($events) //add an array with addEvents\n // ->setOptions([ //set fullcalendar options\n\t// \t'firstDay' => 1\n\t// ])->setCallbacks([ //set fullcalendar callback options (will not be JSON encoded)\n // 'eventClick' => 'function(calEvent, jsEvent, view) {\n // $(\"#start_time\").val(moment(calEvent.start).format(\"YYYY-MM-DD HH:mm:ss\"));\n // $(\"#finish_time\").val(moment(calEvent.end).format(\"YYYY-MM-DD HH:mm:ss\"));\n // $(\"#editModal\").modal();\n // }'\n // ]);\n\n \n // $calendar = Calendar::addEvents($events,\n // [\n // 'color' => '#444444',\n // 'url' => '#',\n // 'description' => \"Event Description\",\n // 'textColor' => '#0A0A0A'\n // ]\n // ); \n return view('mycalender', compact('calendar')); \n }", "function getEvents() {\n return [];\n }", "public function events()\n {\n return $this->hasMany(CalendarEvent::class);\n }", "function calendar_events($events, $YEAR, $MONTH_START, $DAY_START, $WEEKENDS, $MONTH_END, $DOW, $OVERRIDE, $BOX) {\n $results = array('year'=>$YEAR, 'month_start'=>$MONTH_START, 'month_end'=>$MONTH_END, 'box'=>$BOX);\n $results_counter = array();\n $POSDOW = array(0 => 'sun', 1 => 'mon', 2 => 'tue', 3 => 'wed', 4 => 'thu', 5 => 'fri', 6 => 'sat', 7 => 'sun');\n for($month=$MONTH_START; $month <= $MONTH_END; $month++) {\n $month_len = cal_days_in_month(CAL_GREGORIAN, $month, $YEAR);\n $month_name = cal_info(0);\n $month_name = $month_name['months'][$month];\n $first = date(\"w\", mktime(0, 0, 0, $month, 1, $YEAR));\n for($day=1; $day <= $month_len; $day++) {\n $day_type = '';\n $day_num = '';\n $force_day = False;\n if ($month == $MONTH_START && $day < $DAY_START) {\n } elseif (isset($OVERRIDE[$month][$day])) {\n $day_type = $OVERRIDE[$month][$day];\n $force_day = True;\n } elseif (isset($DOW[$POSDOW[$first]])) {\n $day_type = $DOW[$POSDOW[$first]];\n }\n if ($day_type != '') {\n if (isset($events[$day_type])) {\n if (!isset($results_counter[$day_type])) {\n $results_counter[$day_type] = 1;\n } else {\n $results_counter[$day_type]++;\n }\n }\n if (isset($events[$day_type]) && isset($events[$day_type][$results_counter[$day_type]])) {\n $event = $events[$day_type][$results_counter[$day_type]];\n $day_num = $results_counter[$day_type];\n } else {\n $event = array();\n }\n if ($force_day || !empty($event)) {\n $results[$month][$day] = array('month'=>$month, 'day'=>$day, 'type'=>$day_type, 'type_num'=>$day_num, 'dow'=>$first, 'dow_eng'=>$POSDOW[$first], 'event'=>$event);\n }\n }\n $first++;\n if ($first == 7) {$first = 0;}\n }\n }\n return $results;\n }", "function get_events()\n\t{\n\t\t$usercode=$_REQUEST['usercode'];\n\t\t\n\t\t$userdt=$this->ObjM->get_user_by_usercode($usercode);\n\t\t\n\t\tif($userdt[0]['user_type_id']=='1'){\n\t\t\t\n\t\t\t$result = $this->get_school_event($userdt);\n\t\t\t\n\t\t}\n\t\t\n\t\tif(count($result)<1){\n\t\t\t$json_arr[]=array('validation'=>'false');\t\n\t\t\techo json_encode($json_arr);\n\t\t\texit;\t \n\t\t}\n\t\t\n\t\t\n\t\tfor($i=0;$i<count($result);$i++){\n\t\t\t$sr_no=$i+1;\n\t\t\t$json_arr[]=array(\n\t\t\t\t'sr_no' \t=> $sr_no,\n\t\t\t\t'event_dt' \t=> $result[$i]['event_dt'],\n\t\t\t\t'event_code' => $result[$i]['event_code'],\n\t\t\t\t'event_title' \t=> $result[$i]['event_title'],\n\t\t\t\t'cover_img' \t=> $result[$i]['cover_img'],\n\t\t\t\t'validation'=>'true'\n\t\t\t);\n\t\t}\n\t\t\n\t\techo json_encode($json_arr);\n\t}", "public function add_event($_data){\r\n\t\t$args=$this->create_args($_data);\r\n\t\treturn($this->execute('add_event',$args));\r\n\t}", "public function appendEvents(\\Prooph\\EventStoreClient\\Messages\\ClientMessages\\NewEvent $value)\n {\n return $this->append(self::EVENTS, $value);\n }", "protected function registerEvents(): void\n {\n $events = $this->app->make(Dispatcher::class);\n\n foreach ($this->events as $event => $listeners) {\n foreach ($listeners as $listener) {\n $events->listen($event, $listener);\n }\n }\n }", "public function index() {\n $events[] = \\Calendar::event(\n 'Event One', //event title\n false, //full day event?\n '2016-04-01T0800', //start time (you can also use Carbon instead of DateTime)\n '2016-04-01T1200', //end time (you can also use Carbon instead of DateTime)\n 0 //optionally, you can specify an event ID\n );\n \n //$eloquentEvent = EventModel::first(); //EventModel implements MaddHatter\\LaravelFullcalendar\\Event \n\n \n $calendar = \\Calendar::addEvents($events) //add an array with addEvents\n ->setOptions([ //set fullcalendar options\n 'firstDay' => 1\n ])->setCallbacks([ //set fullcalendar callback options (will not be JSON encoded)\n 'viewRender' => 'function() {alert(\"Callbacks!\");}'\n ]); \n \n \n return view('calendar', compact('calendar'));\n }", "public function addEvent()\n {\n if ($this->input->post('start') === null || $this->input->post('eventName') === null) {\n $response = array(\"status\" => false, \"message\" => 'Please provide necessary data.');\n\n $this->send(400, $response);\n }\n\n $reqData = array(\n 'start' => $this->input->post('start'),\n 'event_name' => $this->input->post('eventName'),\n 'created_by' => $this->session->get('username'),\n 'course_desc' => $this->input->post('courseDesc'),\n 'certified_by' => $this->input->post('certifiedBy'),\n 'all_day_event' => $this->input->post('allday'),\n 'end' => $this->input->post('end')\n );\n\n $added = $this->model->addEvent($reqData);\n\n if ($added === true) {\n $response = array(\"status\" => true, \"message\" => 'Event added.');\n $this->send(200, $response);\n } else {\n $response = array(\"status\" => false, \"message\" => 'Event not added.');\n $this->send(500, $response);\n }\n }", "Public function addEvent(){\n // Imposto l'azienda di riferimento\n\t$id_azienda=$this->session->id_azienda;\n\t// Costruisco l'array contentente i campi _POST: titolo, inizio, fine, descrizione, colore, url\n\t$dati_evento = array(\n\t\t'id_azienda' => $id_azienda,\n\t\t'id_cliente' => $_POST['id_cliente'],\n\t\t'titolo' => $_POST['titolo'],\n 'inizio' => $_POST['inizio'],\n\t\t'fine' => $_POST['fine'],\n\t\t'descrizione' => $_POST['descrizione'],\n\t\t'colore' => $_POST['colore'],\n\t\t'url' => $_POST['url']\n\t);\n\n\t$this->db->insert('eventi', $dati_evento);\n\treturn ($this->db->affected_rows()!=1)?false:true;\n\n\t/* Imposto la query\n\t$sql = \"INSERT INTO eventi (id_cliente, id_azienda, title,events.date, description, color) VALUES \";\n\t$sql.=\"(?,?,?,?)\";\n\t$this->db->query($sql, array($_POST['title'], $_POST['date'], $_POST['description'], $_POST['color']));\n\t\treturn ($this->db->affected_rows()!=1)?false:true;\n\t\t*/\n\t}", "public function AddEventHandler(&$array, $evt, $code)\n {\n if(isset($array[$evt]))\n $array[$evt] .= ';' . $code;\n else\n $array[$evt] = $code;\n }", "function addEvent($event) {\n\n $fields = array(\n 'event_id', 'calendar_id',\n 'title', 'location', 'description',\n 'start_stamp', 'end_stamp', 'end_year', 'end_month', 'recurrence',\n 'recur_yearly_interval',\n 'recur_monthly_interval', 'recur_monthly_count', 'recur_monthly_byweekday',\n 'recur_weekly_interval',\n 'recur_daily_interval',\n 'recur_end'\n );\n\n $toDB = array();\n foreach ($fields as $field) {\n if (!isset($event[$field])) {\n continue;\n }\n $toDB[$field] = $event[$field];\n }\n\n // save event\n $event_id = $this->databaseInsertRecord($this->tableEvents, 'event_id', $toDB);\n\n if (!$event_id) {\n // database error\n return FALSE;\n }\n\n // save selected months / weekdays\n switch($event['recurrence']) {\n case 'weekly':\n return $this->_saveWeekdays($event_id, $event) !== FALSE;\n break;\n case 'yearly':\n return $this->_saveMonths($event_id, $event) !== FALSE;\n break;\n }\n\n return $event_id;\n }", "public function processEventQueue()\n {\n if (!$this->googleClient)\n {\n try \n {\n $this->googleClient = $this->createGoogleConnection(); \n } \n catch (\\Exception $e) \n {\n $this->syncProblemNotification($e->getMessage());\n die($e->getMessage());\n }\n \n }\n\n $db = \\JFactory::getDbo();\n\n $query = $db->getQuery(true);\n $query->select('*')->from('#__pbbooking_sync')->where('status is null')->order('id ASC');\n $events = $db->setQuery($query)->loadObjectList();\n\n foreach ($events as $event)\n {\n $success = false;\n switch ($event->action)\n {\n case 'create':\n $success = $this->sendEvent($event);\n break;\n case 'delete':\n $success = $this->deleteEvent($event);\n break;\n }\n\n //update the error flag so that it can be reported on in the admin console.\n $event->status = ($success) ? 'success' : 'error';\n if ($success)\n echo '<br/>Event '.$event->action.' success';\n else\n echo '<br/>Event '.$event->action.' failed';\n \n $db->updateObject('#__pbbooking_sync',$event,'id');\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 register_events() {\n\n\t\t// Labels for the backend Event publisher\n\t\t$event_labels = array(\n\t\t\t'name'\t\t\t\t\t=> 'Events',\n\t\t\t'singular_name'\t\t\t=> 'Event',\n\t\t\t'add_new'\t\t\t\t=> 'New Event',\n\t\t\t'add_new_item'\t\t\t=> 'Schedule Event',\n\t\t\t'edit_item'\t\t\t\t=> 'Edit Event',\n\t\t\t'new_item'\t\t\t\t=> 'New Event',\n\t\t\t'view_item'\t\t\t\t=> 'View Event',\n\t\t\t'search_items'\t\t\t=> 'Search Events',\n\t\t\t'not_found'\t\t\t\t=> 'No events found',\n\t\t\t'not_found_in_trash'\t=> 'No events found in Trash', \n\t\t\t'parent_item_colon'\t\t=> '',\n\t\t\t'menu_name'\t\t\t\t=> 'Events',\n\t\t);\n\t\t\n\t\t$event_capabilities = array(\n\t\t\t'edit_post'\t\t\t\t=> 'edit_post',\n\t\t\t'edit_posts'\t\t\t=> 'edit_posts',\n\t\t\t'edit_others_posts'\t\t=> 'edit_others_posts',\n\t\t\t'publish_posts'\t\t\t=> 'publish_posts',\n\t\t\t'read_post'\t\t\t\t=> 'read_post',\n\t\t\t'read_private_posts'\t=> 'read_private_posts',\n\t\t\t'delete_post'\t\t\t=> 'delete_post'\n\t\t);\t\t\t\n\t\t\t\n\t\t// Construct the arguments for our custom slide post type\n\t\t$event_args = array(\n\t\t\t'labels'\t\t\t\t=> $event_labels,\n\t\t\t'description'\t\t\t=> 'Scheduled calendar events',\n\t\t\t'public'\t\t\t\t=> true,\n\t\t\t'publicly_queryable'\t=> true,\n\t\t\t'exclude_from_search'\t=> true,\n\t\t\t'show_ui'\t\t\t\t=> true,\n\t\t\t'show_in_menu'\t\t\t=> true,\n\t\t\t'show_in_nav_menus'\t\t=> false,\n\t\t\t'menu_icon'\t\t\t\t=> THEME_URI . '/images/icons/calendar-icon-20.png',\n\t\t\t'capabilities'\t\t\t=> $event_capabilities,\n\t\t\t'map_meta_cap'\t\t\t=> true,\n\t\t\t'hierarchical'\t\t\t=> false,\n\t\t\t'supports'\t\t\t\t=> array( 'title', 'editor', 'thumbnail' ),\n\t\t\t'taxonomies'\t\t\t=> array( 'calendar' , 'occurence' ),\n\t\t\t'has_archive'\t\t\t=> false,\n\t\t\t'rewrite'\t\t\t\t=> array(\n\t\t\t\t\t\t\t\t\t\t'slug' \t=> 'event',\n\t\t\t\t\t\t\t\t\t\t'feeds'\t=> false,\n\t\t\t\t\t\t\t\t\t\t'pages'\t=> false,\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t'query_var'\t\t\t\t=> true,\n\t\t\t'can_export'\t\t\t=> true,\n\t\t);\n\n\t\t\n\t\t// Register the Event post type!\n\t\tregister_post_type( 'event', $event_args );\n\t}", "function attendance_create_calendar_events($sessionsids) {\n global $DB;\n\n if (empty(get_config('attendance', 'enablecalendar'))) {\n // Calendar events are not used.\n return true;\n }\n\n $sessions = $DB->get_recordset_list('attendance_sessions', 'id', $sessionsids);\n\n foreach ($sessions as $session) {\n attendance_create_calendar_event($session);\n if ($session->caleventid) {\n $DB->update_record('attendance_sessions', $session);\n }\n }\n}", "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 $eventMap = [];\n\n // Pull any custom swagger docs\n $result = ServiceModel::whereIsActive(true)->get();\n\n //\tSpin through services and pull the events\n /** @var ServiceModel $model */\n foreach ($result as $model) {\n $apiName = $model->name;\n try {\n /** @var BaseRestService $service */\n if (empty($service = ServiceManager::getService($apiName))) {\n throw new \\Exception('No service found.');\n }\n\n if ($service instanceof FileServiceInterface) {\n // don't want the full folder list here\n $accessList = (empty($service->getPermissions()) ? [] : ['', '*']);\n } else {\n $accessList = $service->getAccessList();\n }\n\n if (!empty($accessList)) {\n if (!empty($doc = $model->getDocAttribute())) {\n if (is_array($doc) && !empty($content = array_get($doc, 'content'))) {\n if (is_string($content)) {\n $content = ServiceModel::storedContentToArray($content, array_get($doc, 'format'),\n $model);\n if (!empty($content)) {\n $eventMap[$apiName] = static::parseSwaggerEvents($content, $accessList);\n }\n }\n }\n }\n }\n } catch (\\Exception $ex) {\n \\Log::error(\" * System error building event map for service '$apiName'.\\n{$ex->getMessage()}\");\n }\n\n unset($content, $service, $serviceEvents);\n }\n\n static::$eventMap = $eventMap;\n\n \\Log::info('Event cache build process complete');\n }", "public function createEvents()\n {\n //\n\n return 'something';\n }", "function obj_do_cx_events_list( $events ) {\n\tif (is_array($events) ) {\n echo '<div class=\"event-list-grid\">';\n foreach ($events as $event ) {\n obj_do_cx_event_item_output($event);\n }\n echo '</div>';\n }\n}", "function add_event($settings)\n {\n if(!$this->isLogged)\n $this->login();\n \n if($this->isLogged)\n {\n $_entry = \"<entry xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005'>\n <category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/g/2005#event'></category>\n <title type='text'>\".$settings[\"title\"].\"</title>\n <content type='text'>\".$settings[\"content\"].\"</content>\n <author>\n <name>\".$this->email.\"</name>\n <email>\".$this->email.\"</email>\n </author>\n <gd:transparency\n value='http://schemas.google.com/g/2005#event.opaque'>\n </gd:transparency>\n <gd:eventStatus\n value='http://schemas.google.com/g/2005#event.confirmed'>\n </gd:eventStatus>\n <gd:where valueString='\".$settings[\"where\"].\"'></gd:where>\n <gd:when startTime='\".$settings[\"startDay\"].\"T\".$settings[\"startTime\"].\".000Z'\n endTime='\".$settings[\"endDay\"].\"T\".$settings[\"endTime\"].\".000Z'></gd:when>\n </entry>\";\n \n $this->prepare_feed_url();\n \n $header = array();\n $header[] = \"Host: www.google.com\";\n $header[] = \"MIME-Version: 1.0\";\n $header[] = \"Accept: text/xml\";\n $header[] = \"Authorization: GoogleLogin auth=\".$this->fAuth;\n $header[] = \"Content-length: \".strlen($_entry);\n $header[] = \"Content-type: application/atom+xml\";\n $header[] = \"Cache-Control: no-cache\";\n $header[] = \"Connection: close \\r\\n\";\n $header[] = $_entry;\n \n $this->post($this->feed_url_prepared, null, $header, $http_code);\n if(201==$http_code)\n return true;\n \n }\n else\n echo \"cannot login with '\".$this->email.\"' email and '<font color=\\\"lightgray\\\">\".$this->password.\"</font>' password<br/>\";\n return false;\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 get_timeline_events() {\r\n\t\t$contents[] = $this->get_content_posts();\r\n\t\t$contents[] = $this->get_content_tweets();\r\n\t\t$contents[] = $this->get_content_stories();\r\n\t\t\r\n\t\t$events = array();\r\n\t\t\r\n\t\t// Process each of the contents we have attempted to grab and combine them as events by year.\r\n\t\tforeach( $contents as $content ) {\r\n\t\t\tif( is_array ( $content ) ) {\r\n\t\t\t\tforeach ( $content as $date_group => $values ) {\r\n\t\t\t\t\tif( empty( $events[$date_group] ) || !isset( $events[$date_group] ) ) {\r\n\t\t\t\t\t\t$events[$date_group] = $values;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t$events[$date_group] = array_merge( $events[$date_group], $values);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tforeach( $events as $year=>&$event ) {\r\n\t\t\tusort( $event, array( &$this, 'sort_events_by_date' ) );\r\n\t\t}\r\n\t\t\r\n\t\tuksort( &$events, array( &$this, 'sort_date_groups' ) );\r\n\r\n\t\treturn $events;\r\n\t}", "protected function _subscribeToEngineEvents()\n {\n $controller = $this->getController();\n $controller->addEventListener(\n Streamwide_Engine_Events_Event::ENDOFFAX,\n array(\n 'callback' => array( $this, 'onEndOfFax' ),\n 'options' => array( 'autoRemove' => 'before' )\n )\n );\n $controller->addEventListener(\n Streamwide_Engine_Events_Event::FAXPAGE,\n array( 'callback' => array( $this, 'onFaxPage' ) )\n );\n }", "public function registerEvents(): array\n {\n return [\n AfterSheet::class => function (AfterSheet $request) {\n $request->sheet->getStyle('A1:Z1')->applyFromArray([\n 'font' => [\n 'bold' => true,\n ],\n \n ]);\n },\n ];\n }", "public function actionMonthData()\n {\n $this->requireAjaxRequest();\n $this->requirePostRequest();\n\n $dateRangeStart = craft()->request->getPost('dateRangeStart');\n $dateRangeEnd = craft()->request->getPost('dateRangeEnd');\n $calendars = craft()->request->getPost('calendars', null);\n $nonEditable = craft()->request->getPost('nonEditable');\n $locale = craft()->request->getPost('locale', null);\n\n $criteria = array(\n 'dateRangeStart' => $dateRangeStart,\n 'dateRangeEnd' => $dateRangeEnd,\n );\n\n $calendarIds = null;\n if ($calendars) {\n if ($calendars !== '*') {\n $criteria['calendarId'] = explode(',', $calendars);\n }\n } else if (null !== $calendars) {\n $criteria['calendarId'] = -1;\n }\n\n /** @var Calendar_EventsService $eventsService */\n $eventsService = craft()->calendar_events;\n\n if (craft()->isLocalized()) {\n $criteria['locale'] = $locale ?: craft()->language;\n }\n\n // Check settings if disabled events should be shown\n\n /** @var Calendar_SettingsService $settings */\n $settings = craft()->calendar_settings;\n if ($settings->showDisabledEvents()) {\n $criteria['status'] = null;\n }\n\n $eventList = $eventsService->getEventList($criteria);\n $simpleEvents = $eventList->getEventsAsSimpleObject();\n\n if ($nonEditable) {\n foreach ($simpleEvents as $event) {\n $event->editable = false;\n }\n }\n\n $this->returnJson($simpleEvents);\n }", "public function run()\n {\n $data = [\n \t ['title'=>'Demo Event-1', 'start_date'=>'2018-02-19', 'end_date'=>'2018-02-19'],\n \t ['title'=>'Demo Event-2', 'start_date'=>'2018-02-21', 'end_date'=>'2018-02-21'],\n ['title'=>'Demo Event-2-2', 'start_date'=>'2018-02-21', 'end_date'=>'2018-02-21'],\n ['title'=>'Demo Event-2-3', 'start_date'=>'2018-02-21', 'end_date'=>'2018-02-21'],\n ['title'=>'Demo Event-2-4', 'start_date'=>'2018-02-21', 'end_date'=>'2018-02-21'],\n ['title'=>'Demo Event-2-5', 'start_date'=>'2018-02-21', 'end_date'=>'2018-02-21'],\n ];\n\n\n DB::table('events')->insert($data);\n\n }", "public function getCalendarEvents($uid, $appName, $facebook_page_id = '') {\n $user = \\Drupal::currentUser();\n if ($appName) {\n $terms_obj = \\Drupal::entityTypeManager()->getStorage('taxonomy_term')->load($appName);\n $socialname = $terms_obj->getName();\n $events = array();\n $query = \\Drupal::database()->select('social_media', 'sm');\n if ($facebook_page_id) {\n $result = $query->fields('sm', array('id', 'scheduled_timestamp'))->condition('sm.uid', $uid, '=')->condition('sm.social_media_name', $socialname, '=')->condition('sm.page_id', $facebook_page_id, '=')->orderBy('created', 'DESC')->execute()->fetchAll();\n } else {\n $result = $query->fields('sm', array('id', 'scheduled_timestamp'))->condition('sm.uid', $uid, '=')->condition('sm.social_media_name', $socialname, '=')->orderBy('created', 'DESC')->execute()->fetchAll();\n }\n if (!empty($result)) {\n foreach ($result as $row_object) {\n $date = new DrupalDateTime(date('Y-m-d H:i:s', $row_object->scheduled_timestamp), new \\DateTimeZone('utc'));\n $date->setTimezone(new \\DateTimeZone($user->getTimeZone()));\n $manual_datetime = strtotime($date->format('Y-m-d H:i:s'));\n //$manual_datetime = $scheduled_data->manual_datetime;\n $published_date = date('Y-m-d H:i:s', $manual_datetime);\n $Onlytime = explode(\" \", $published_date);\n $formatedTime = date(\"g:i a\", strtotime($Onlytime[1]));\n $unformatedTime = date('Y-m-d H:00', $manual_datetime);\n $events[] = array('start' => $unformatedTime);\n }\n }\n }\n return $events;\n }", "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 }", "public function get_events()\n {\n $table_name = $this->input->get_post(\"table_name\");\n\n log_message(\"debug\", \"Posted table name {$table_name}\");\n\n $config = [\n 'base_url' => $this->config->base_url(\"welcome/get_events/\"),\n 'total_rows' => $this->Xform_model->count_all_records($table_name),\n 'uri_segment' => 4,\n 'per_page' => 100,\n ];\n\n $this->pagination->initialize($config);\n $page = ($this->uri->segment(3)) ? $this->uri->segment(3) : 0;\n\n $events = $this->Xform_model->get_geospatial_data($table_name, $this->pagination->per_page, $page);\n $links = $this->pagination->create_links();\n\n if ($this->input->is_ajax_request()) {\n $result = [\n 'status' => \"success\",\n \"events_count\" => $config['total_rows'],\n \"events\" => $events,\n \"links\" => $links\n ];\n $result = array_utf8_encode($result);\n echo json_encode($result);\n } else {\n show_error(\"Not Implement\", 501, \"Page not implemented\"); //page not implemented\n }\n }", "public function testAntBackendGetEvents()\r\n\t{\r\n\t\t$calid = GetDefaultCalendar($this->dbh, $this->user->id);\r\n\r\n\t\t// Create a new calendar event for testing\r\n\t\t$event = new CAntObject_CalendarEvent($this->dbh, null, $this->user);\r\n\t\t$event->setValue(\"name\", \"UnitTest Event\");\r\n\t\t$event->setValue(\"ts_start\", \"10/8/2011 2:30 PM\");\r\n\t\t$event->setValue(\"ts_end\", \"10/8/2011 3:30 PM\");\r\n\t\t$event->setValue(\"calendar\", $calid);\r\n\t\t$eid = $event->save();\r\n\r\n\t\t// Query events\r\n\t\t$events = $this->backend->GetMessageList(\"calendar_root\");\r\n\t\t$this->assertTrue(count($events) > 0);\r\n\r\n\t\t// Cleanup\r\n\t\t$event->removeHard();\r\n\t}", "public function buildCalendarList(){\n\t\t\n\t\t$first_day = $this->getFirstDay();\t\t\t\t\t\t//Determine what day of the week the month starts on\n\t\t$current_number_of_days = $this->getNumberOfDays();\t\t//Determine the number of days in the month\n\n\t\t$number_of_previous_days = $first_day;\t\t\t\t\t\t\t\t\t\t//Determine the number of days needed to complete the first week\n\t\t$prev_month_number_of_days = $this->getNumberOfDays($this->getMonth()-1); \t//Determine the number of days in the previous month\n\t\t\n\t\t$_SESSION['month'] = $this->getMonth();\n\t\t$_SESSION['year'] = $this->getYear();\n\t\t$_SESSION['view'] = 'list';\n\t\t\n\t\tob_start();?>\n <table border=\"0\" id=\"events_calendar\" class=\"calendar_list\">\n <?php echo $this->buildCalendarHead() ?>\n <tr>\n <td>\n <?php \n /*** CURRENT MONTH CELLS ***/\n $first_day = $this->getYear() . '-' . $this->getMonth() . '-01';\n $last_day = $this->getYear() . '-' . $this->getMonth() . '-' . $current_number_of_days;\n \n $object = $this->events_ob;\n $month_events = new $object();\n $month_events = $month_events->fetchAll(\"WHERE DATE(\" . $this->events_end_date_field . \") >= '\" . $first_day . \"' AND DATE(\" . $this->events_end_date_field . \") <= '\" . $last_day . \"'\", \"ORDER BY `\" . $this->events_end_date_field . \"` DESC\");\n \n if(count($month_events) > 0){\n for($day = 1; $day <= $current_number_of_days; $day++){\t\t//For each day in the current month\n $full_date = $this->getYear() . '-' . $this->getMonth() . '-' . $day;\n \n $events = $this->buildDayList($full_date);\t//get events for each day\n if(strlen(trim($events))){\n ?>\n <div class=\"day\">\n <?php echo $events; ?>\n </div>\n <?php\n }\n }\n }\n else{?>\n \t\t<h5><?php echo 'No events in ' . $this->getMonthName() . ' ' . $this->getYear();?></h5>\n <?php\n }\n ?> \n </td>\n </tr>\n </table>\n <?php\n return ob_get_clean();\n\t}", "function defineHandlers(&$events) {\n /*\n * example handlers see: handlers/on_admin_sections.php and handlers/on_build_menu.php\n * \n */\n\n //$events->listen('on_build_menu', 'on_build_menu');\n //$events->listen('on_admin_sections', 'on_admin_sections');\n }", "public static function getNextEvents() {\n\n $startDate = Carbon::now() -> format('Y-m-d');\n $endDate = Carbon::now() -> addWeeks(4) -> format('Y-m-d');\n\n $events = Event::all() -> where(\"date\", \">=\", $startDate)\n -> where(\"date\", \"<=\", $endDate);\n\n foreach ($events as $event) {\n $event -> date = Carbon::createFromFormat(\"Y-m-d\", $event -> date)\n -> format(\"d/m/Y\");\n }\n\n return $events;\n\n }", "public function prepCalendar($calendar_events)\n {\n // TODO: Build Calendar class for options and docs\n $calendarOptions = [\n 'header' => ['left' => 'prev,next today', 'center' => 'title',\n 'right' => Auth::guard('admin')->check() ? 'month,agendaWeek,agendaDay' : 'agendaWeek,agendaDay' ],\n 'defaultView' => 'agendaWeek',\n 'allDaySlot' => false,\n 'weekends' => false,\n 'displayEventEnd' => false,\n 'slotDuration' => '00:30:00',\n 'minTime' => '08:00:00',\n 'maxTime' => '18:00:00',\n 'weekNumbers' => true,\n 'navLinks' => true,\n 'locale' => 'en-gb',\n 'views' => ['agenda' => ['displayEventTime' => false]]\n ];\n\n $calendar = Calendar::addEvents($calendar_events)->setOptions($calendarOptions);\n return $calendar;\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 run()\n {\n $events = [\n 'speed-coding', 'sentence', 'projet'\n ];\n for($i=0; $i<sizeof($events); $i++):\n DB::table('events')->insert([\n 'name' => $events[$i],\n \n ]);\n endfor;\n }" ]
[ "0.6427636", "0.5878333", "0.5878113", "0.58082396", "0.5797988", "0.5796478", "0.5640265", "0.5636678", "0.56365746", "0.5617171", "0.5592074", "0.5591888", "0.55742013", "0.5571144", "0.55322134", "0.5505282", "0.55038095", "0.549881", "0.54806536", "0.547888", "0.5474658", "0.54505306", "0.5443602", "0.5429508", "0.5421541", "0.54153985", "0.5388639", "0.53844297", "0.5369002", "0.53666335", "0.53593254", "0.5349759", "0.53475654", "0.5342751", "0.53352875", "0.5333519", "0.53262603", "0.5307552", "0.5305812", "0.5304587", "0.52875924", "0.52824515", "0.52795887", "0.5274505", "0.5273408", "0.5268475", "0.5268475", "0.52649486", "0.5254954", "0.5253159", "0.5246789", "0.5246099", "0.5246099", "0.524301", "0.52419275", "0.5234994", "0.5234295", "0.52323186", "0.5230314", "0.5226162", "0.5210505", "0.5207528", "0.52074033", "0.52053976", "0.5202948", "0.52005416", "0.518751", "0.51751316", "0.51729167", "0.5168311", "0.5165631", "0.51651347", "0.5164511", "0.51619315", "0.51592493", "0.51544607", "0.514996", "0.5148159", "0.5140558", "0.51384014", "0.5136962", "0.5130231", "0.51258004", "0.5121679", "0.5110124", "0.5104893", "0.51029557", "0.5097408", "0.5093134", "0.50902104", "0.5083141", "0.5083126", "0.5082964", "0.5079942", "0.50731206", "0.50712126", "0.5066929", "0.5064006", "0.5041252", "0.5036618" ]
0.5235596
55
Generic method to output the calendar Outputs the calendar as an array
public function drawArray() { $this->outArray['days'] = array(); $this->makeCalendarTitle(); $this->makeCalendarHead(); $this->makeDayHeadings(); $this->startMonthSpacers(); $this->makeArrayIterator(); $this->endMonthSpacers(); return $this->outArray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CalendarData($month=null, $year=null) {\n if (is_null($year)) $year = date('Y');\n if (is_null($month)) $month = date('n');\n\n // RENDER\n exec(\"cal \".$month.\" \". $year, $cal); $this->dbgMsg( ' ### calendar '.$month.\" \". $year.\" :: \", $cal );\n $rxp[] = array_fill(0,7,' ');\n for ($k=2; $k < count($cal); $k++ ) {\n $xpl = explode(' ', trim( preg_replace('{\\s+}i', ' ', $cal[$k]) ) );\n if (count($xpl) && $xpl[0]!=='' ) { // $this->dbgMsg(' xploded row', $xpl, 1,1 );\n if ( $wsp=7-count($xpl) ) {\n if ($k==2) $rx = array_merge( array_fill(0, $wsp, ' ' ), $xpl );\n else $rx = array_merge( $xpl, array_fill(count($xpl)+1, $wsp, ' ' ) );\n }\n else $rx = $xpl;\n $rxp[] = $rx;\n }\n }\n\n for ($j=1; $j < count($rxp); $j++ ) {\n for ($d=0; $d<7; $d++) {\n if ($d===0) $rxp[$j-1][6] = $rxp[$j][0];\n else $rxp[$j][$d-1] = $rxp[$j][$d];\n }\n }\n $rxp[$j-1][$d-1]=' ';\n foreach ($rxp as $j=>$r) { // $this->dbgMsg( \"str_replace(' ','',implode('',\".$rxp[$j].\") )\", str_replace(' ','',implode('',$rxp[$j]) ) );\n if ( !str_replace(' ','',implode('',$rxp[$j]) ) ) unset($rxp[$j]); // NEED FOR TESTS\n } // $this->dbgMsg(' exploded calendar : ', $rxp, 1,1 );\n\n foreach ( $rxp as $i=>$arr ) {\n foreach ( $arr as $k=>$day) {\n $clr = array();\n if ( is_numeric($day) ) { // $this->dbgMsg( 'CalDay is_numeric( '.$day.' ) ', 'YES' );\n $Mm = $month<10?('0'.$month):$month;\n $Dd = $day<10?('0'.$day):$day;\n $key_date = $year.'-'.$Mm.'-'.$Dd; // $href_date = $year.'/'.$Mm.'/'.$Dd;\n $clauses = array();\n $clauses[] = \"'\".$key_date.\"' >= s.`date_start` and '\".$key_date.\"' <= s.`date_stop`\";\n $clauses[] = \"s.`status`<>'closed'\"; // $this->dbgMsg('', $clauses );\n $sql = $this->sql10.\" where \".implode(' and ', $clauses);\n $a = $this->db->sql2array( $sql ); // $this->dbgMsg(\" cal Day :: \".$sql, $a ); // выборка фильм+площадка+сеанс\n\n if ( $key_date == $this->guide->uri_parts[1] ) {\n $clr['tpl'] = '_Curr';\n $clr['Misc'] = ' style=\"color:#333;\"';\n // } elseif ( !empty($a) ) { // так - со ссылками в прошлое\n } elseif ( !empty($a) && date(\"Y-m-d\") <= $key_date ) {\n $clr['tpl'] = '_Href';\n $clr['DayHref']= 'film/'.$key_date.'/';\n if ( $k>4 ) $clr['Misc'] = ' style=\"color:#990000;\"';\n } else {\n $clr['tpl'] = '_Item';\n }\n }\n $clr['DayNum']=$day;\n $rxp[$i][$k] = $this->tpl->ParseOne( $clr, $this->tpf.':CalDay'.$clr['tpl'], '' );\n } // $rxp[$i]['trMisc'] = ' style=\"'.(($i%2==1)?'background:#eee;\"':'\"');\n $rxp[$i]['tdMisc'] = ' style=\"text-align:right;background-color:#ffffff;color:#ccc;\"';\n } // $this->dbgMsg('EXPANDED calendar : ', $rxp, 1,1 );\n return $rxp;\n }", "private function _get_calendar_array()\n\t{\n\t $this->all_events = $this->result->xpath(\".//event\");\n\t \n\t foreach($this->all_events as $an_event):\n\t $start_at = $an_event->xpath(\"./start-at\");\n \t $start_at = $start_at[0];\n \t $end_at = $an_event->xpath(\"./end-at\");\n \t $end_at = $end_at[0];\n \t \n \t $start_at = new DateTime($start_at);\n \t $start_at->setTimezone(new DateTimeZone('America/Chicago'));\n \t $start_at->setTime(0, 0, 0);\n \t $end_at = new DateTime($end_at);\n \t $end_at->setTimezone(new DateTimeZone('America/Chicago'));\n \t $end_at->setTime(0, 0, 0);\n \t \n \t $start_timestamp = strtotime($start_at->format('Y-m-d'));\n $end_timestamp = strtotime($end_at->format('Y-m-d'));\n \n $start_year = date(\"Y\", $start_timestamp);\n $end_year = date(\"Y\", $end_timestamp);\n $start_month = date(\"m\", $start_timestamp);\n $end_month = date(\"m\", $end_timestamp);\n $start_day = date(\"d\", $start_timestamp);\n $start_day = $start_day + 1;\n $end_day = date(\"d\", $end_timestamp);\n $end_day = $end_day + 1;\n \n if(($start_year == $this->year && $start_month == $this->month) || ($end_year == $this->year && $end_month == $this->month)):\n if($start_year == $end_year):\n if($start_month == $end_month):\n $this->_calendar_array_one($start_day, $end_day);\n else:\n if($end_month != $this->month):\n $this->_calendar_array_two($start_day);\n else:\n $this->_calendar_array_three($end_day);\n endif;\n endif;\n endif;\n endif;\n endforeach;\n \n\t foreach($this->callinks as $callinks):\n\t foreach($callinks as $key => $value):\n\t $this->combined_callinks[\"$key\"] = $value;\n\t endforeach;\n\t endforeach;\n\t}", "protected function build_calendar()\n\t{\n\t\t//ee()->TMPL->log_item('Calendar: Building calendar output');\n\n\t\t$disable\t= array(\n\t\t\t'categories',\n\t\t\t'category_fields',\n\t\t\t'custom_fields',\n\t\t\t'member_data',\n\t\t\t'pagination',\n\t\t\t'trackbacks'\n\t\t);\n\n\t\t$this->CDT->reset();\n\t\t$today_ymd\t= $this->CDT->ymd;\n\n\t\t// -------------------------------------\n\t\t// Set dynamic=\"off\", lest Channel get uppity and try\n\t\t// to think that it's in charge here.\n\t\t// -------------------------------------\n\n\t\t//default off.\n\t\tif ( $this->check_yes( ee()->TMPL->fetch_param('dynamic') ) )\n\t\t{\n\t\t\tee()->TMPL->tagparams['dynamic'] \t= 'yes';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tee()->TMPL->tagparams['dynamic'] \t= 'no';\n\t\t}\n\n\t\tif (isset(ee()->TMPL->tagparams['category']))\n\t\t{\n\t\t\t$this->convert_category_titles();\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Collect important bits of tagdata\n\t\t// -------------------------------------\n\n\t\t//ee()->TMPL->log_item('Calendar: Collecting tagdata');\n\n\t\t$output_at\t= '';\n\t\t$tagdata\t= ee()->TMPL->tagdata;\n\t\t$each_year\t= $each_month = $each_week = $each_day = $each_hour = $each_event = '';\n\t\t$hash_event\t= 'd38bf16a9a74c63fa5eb6d1ac082d539'.\"\\n\";\n\t\t$hash_hour\t= 'fe16402ccfad7e120a7ca3a31df3a019'.\"\\n\";\n\t\t$hash_day\t= '2aa2a1a0724182b1d876232c137a6d4f'.\"\\n\";\n\t\t$hash_week\t= 'b657210371b3e2a6f955ef6a404689de'.\"\\n\";\n\t\t$hash_month\t= 'd03207661c36a3bfd43b9dd239e41676'.\"\\n\";\n\t\t$hash_year\t= '97a92770ab082652cf662bdacc311dff'.\"\\n\";\n\n\t\t//--------------------------------------------\n\t\t//\tremove pagination before we start\n\t\t//--------------------------------------------\n\n\t\t//has tags?\n\t\tif (preg_match(\n\t\t\t\t\"/\" . LD . \"calendar_paginate\" . RD .\n\t\t\t\t\t\"(.+?)\" .\n\t\t\t\tLD . preg_quote(T_SLASH, '/') . \"calendar_paginate\" . RD . \"/s\",\n\t\t\t\t$tagdata,\n\t\t\t\t$match\n\t\t\t))\n\t\t{\n\t\t\t$this->paginate_tagpair_data\t= $match[0];\n\t\t\t$tagdata \t\t\t\t\t\t= str_replace( $match[0], '', $tagdata );\n\t\t}\n\t\t//prefix comes first\n\t\telse if (preg_match(\n\t\t\t\t\"/\" . LD . \"paginate\" . RD .\n\t\t\t\t\t\"(.+?)\" .\n\t\t\t\tLD . preg_quote(T_SLASH, '/') . \"paginate\" . RD . \"/s\",\n\t\t\t\t$tagdata,\n\t\t\t\t$match\n\t\t\t))\n\t\t{\n\t\t\t$this->paginate_tagpair_data\t= $match[0];\n\t\t\t$tagdata \t\t\t\t\t\t= str_replace( $match[0], '', $tagdata );\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Replace days of the week first, cuz they're easy\n\t\t// -------------------------------------\n\n\n\t\tif (isset(ee()->TMPL->var_pair['display_each_day_of_week']))\n\t\t{\n\t\t\tpreg_match(\n\t\t\t\t'/' . LD . 'display_each_day_of_week' . RD .\n\t\t\t\t\t'(.*?)' .\n\t\t\t\tLD . preg_quote(T_SLASH, '/') . 'display_each_day_of_week' . RD . '/s',\n\t\t\t\t$tagdata,\n\t\t\t\t$match\n\t\t\t);\n\n\t\t\tif (isset($match[1]))\n\t\t\t{\n\t\t\t\t$dow_output\t\t= '';\n\t\t\t\t$vars\t\t\t= array();\n\t\t\t\t$current_dow\t= $this->CDT->day_of_week;\n\n\t\t\t\t$this->CDT->change_ymd($this->P->value('date_range_start', 'ymd'));\n\n\t\t\t\tif ($this->CDT->day_of_week != $this->first_day_of_week)\n\t\t\t\t{\n\t\t\t\t\t$this->CDT->add_day(\n\t\t\t\t\t\t$this->first_day_of_week - $this->CDT->day_of_week\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tfor ($i = 0; $i < 7; $i++)\n\t\t\t\t{\n\t\t\t\t\tif ($i > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->CDT->add_day();\n\t\t\t\t\t}\n\n\t\t\t\t\t$vars['conditional'] = array(\n\t\t\t\t\t\t'day_of_week_is_weekend'\t=> (\n\t\t\t\t\t\t\t$this->CDT->day_of_week == 0 OR\n\t\t\t\t\t\t\t$this->CDT->day_of_week == 6\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'day_of_week_is_current'\t=> (\n\t\t\t\t\t\t\t$this->CDT->day_of_week == $current_dow\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\n\t\t\t\t\t$vars['single'] = array(\n\t\t\t\t\t\t'day_of_week'\t\t\t=> $this->cdt_format_date_string($this->CDT->datetime_array(), 'l'),\n\t\t\t\t\t\t'day_of_week_one'\t\t=> $this->cdt_format_date_string($this->CDT->datetime_array(), 'b'),\n\t\t\t\t\t\t'day_of_week_short'\t\t=> $this->cdt_format_date_string($this->CDT->datetime_array(), 'D'),\n\t\t\t\t\t\t'day_of_week_N'\t\t\t=> $this->cdt_format_date_string($this->CDT->datetime_array(), 'N'),\n\t\t\t\t\t\t'day_of_week_number'\t=> $this->cdt_format_date_string($this->CDT->datetime_array(), 'w')\n\t\t\t\t\t);\n\n\t\t\t\t\t$dow_output .= $this->swap_vars($vars, $match[1]);\n\t\t\t\t}\n\t\t\t\t$tagdata = str_replace($match[0], $dow_output, $tagdata);\n\t\t\t}\n\t\t}\n\n\t\t$tagdata = trim($tagdata).\"\\n\";\n\n\t\t// -------------------------------------\n\t\t// Now the rest\n\t\t// -------------------------------------\n\n\t\tif (isset(ee()->TMPL->var_pair['events']))\n\t\t{\n\t\t\tpreg_match(\n\t\t\t\t'/'.LD.'events'.RD.'(.*?)'.LD.preg_quote(T_SLASH, '/').'events'.RD.'/s',\n\t\t\t\t$tagdata,\n\t\t\t\t$match\n\t\t\t);\n\n\t\t\tif (isset($match[1]))\n\t\t\t{\n\t\t\t\t$each_event \t\t= trim($match[1]).\"\\n\";\n\t\t\t\t$tagdata \t\t\t= str_replace($match[0], $hash_event, $tagdata);\n\t\t\t\tee()->TMPL->tagdata = $each_event;\n\t\t\t\t$output_at \t\t\t= 'event';\n\t\t\t}\n\t\t}\n\n\t\tif (isset(ee()->TMPL->var_pair['display_each_hour']))\n\t\t{\n\t\t\tpreg_match(\n\t\t\t\t'/'.LD.'display_each_hour'.RD.'(.*?)'.LD.preg_quote(T_SLASH, '/').'display_each_hour'.RD.'/s',\n\t\t\t\t$tagdata,\n\t\t\t\t$match\n\t\t\t);\n\n\t\t\tif (isset($match[1]))\n\t\t\t{\n\t\t\t\t$each_hour \t\t\t= trim($match[1]).\"\\n\";\n\t\t\t\t$tagdata \t\t\t= str_replace($match[0], $hash_hour, $tagdata);\n\t\t\t\t$output_at \t\t\t= 'hour';\n\t\t\t}\n\t\t}\n\n\t\tif (isset(ee()->TMPL->var_pair['display_each_day']))\n\t\t{\n\t\t\tpreg_match(\n\t\t\t\t'/'.LD.'display_each_day'.RD.'(.*?)'.LD.preg_quote(T_SLASH, '/').'display_each_day'.RD.'/s',\n\t\t\t\t$tagdata,\n\t\t\t\t$match\n\t\t\t);\n\n\t\t\tif (isset($match[1]))\n\t\t\t{\n\t\t\t\t$each_day \t\t\t= trim($match[1]).\"\\n\";\n\t\t\t\t$tagdata \t\t\t= str_replace($match[0], $hash_day, $tagdata);\n\t\t\t\t$output_at \t\t\t= 'day';\n\t\t\t}\n\t\t}\n\n\t\tif (isset(ee()->TMPL->var_pair['display_each_week']))\n\t\t{\n\t\t\tpreg_match(\n\t\t\t\t'/'.LD.'display_each_week'.RD.'(.*?)'.LD.preg_quote(T_SLASH, '/').'display_each_week'.RD.'/s',\n\t\t\t\t$tagdata,\n\t\t\t\t$match\n\t\t\t);\n\n\t\t\tif (isset($match[1]))\n\t\t\t{\n\t\t\t\t$each_week \t\t\t= trim($match[1]).\"\\n\";\n\t\t\t\t$tagdata \t\t\t= str_replace($match[0], $hash_week, $tagdata);\n\t\t\t\t$output_at \t\t\t= 'week';\n\t\t\t}\n\t\t}\n\n\t\tif (isset(ee()->TMPL->var_pair['display_each_month']))\n\t\t{\n\t\t\tpreg_match(\n\t\t\t\t'/'.LD.'display_each_month'.RD.'(.*?)'.LD.preg_quote(T_SLASH, '/').'display_each_month'.RD.'/s',\n\t\t\t\t$tagdata,\n\t\t\t\t$match\n\t\t\t);\n\n\t\t\tif (isset($match[1]))\n\t\t\t{\n\t\t\t\t$each_month \t\t= trim($match[1]).\"\\n\";\n\t\t\t\t$tagdata \t\t\t= str_replace($match[0], $hash_month, $tagdata);\n\t\t\t\t$output_at \t\t\t= 'month';\n\t\t\t}\n\t\t}\n\n\t\tif (isset(ee()->TMPL->var_pair['display_each_year']))\n\t\t{\n\t\t\tpreg_match(\n\t\t\t\t'/'.LD.'display_each_year'.RD.'(.*?)'.LD.preg_quote(T_SLASH, '/').'display_each_year'.RD.'/s',\n\t\t\t\t$tagdata,\n\t\t\t\t$match\n\t\t\t);\n\n\t\t\tif (isset($match[1]))\n\t\t\t{\n\t\t\t\t$each_year \t\t\t= trim($match[1]).\"\\n\";\n\t\t\t\t$tagdata \t\t\t= str_replace($match[0], $hash_year, $tagdata);\n\t\t\t\t$output_at \t\t\t= 'year';\n\t\t\t}\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// If there aren't any display_each_X var pairs, default to event\n\t\t// -------------------------------------\n\n\t\tif ($output_at == '')\n\t\t{\n\t\t\t$each_event \t= $tagdata;\n\t\t\t$tagdata \t\t= $hash_event;\n\t\t\t$output_at \t\t= 'event';\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Set the default date to the start of our range\n\t\t// -------------------------------------\n\n\t\t$start_blank = (\n\t\t\t$this->P->value('date_range_start') === FALSE AND\n\t\t\t$this->P->value('date_range_end') === FALSE\n\t\t);\n\n\t\t$start\t= $this->CDT->change_datetime(\n\t\t\t$this->P->value('date_range_start', 'year'),\n\t\t\t$this->P->value('date_range_start', 'month'),\n\t\t\t$this->P->value('date_range_start', 'day'),\n\t\t\t$this->P->value('date_range_start', 'hour'),\n\t\t\t$this->P->value('date_range_start', 'minute')\n\t\t);\n\n\t\t$end\t= $this->CDT->change_datetime(\n\t\t\t$this->P->value('date_range_end', 'year'),\n\t\t\t$this->P->value('date_range_end', 'month'),\n\t\t\t$this->P->value('date_range_end', 'day'),\n\t\t\t($start_blank ? '23' : $this->P->value('date_range_end', 'hour')),\n\t\t\t($start_blank ? '59' : $this->P->value('date_range_end', 'minute'))\n\t\t);\n\n\t\t$current_period_start\t= $start;\n\t\t$current_period_end\t\t= $end;\n\n\t\t$this->CDT->set_default($start);\n\t\t$this->CDT->reset();\n\n\t\t// -------------------------------------\n\t\t// If we are \"padding\" short weeks, modify our dates\n\t\t// -------------------------------------\n\n\t\tif ($this->P->value('pad_short_weeks') === TRUE)\n\t\t{\n\t\t\t// -------------------------------------\n\t\t\t// Adjust the start date backward to the first day of the week, if necessary\n\t\t\t// -------------------------------------\n\n\t\t\t$old_end = $end;\n\n\t\t\tif ($start['day_of_week'] != $this->first_day_of_week)\n\t\t\t{\n\t\t\t\t$offset = ($start['day_of_week'] > $this->first_day_of_week) ?\n\t\t\t\t\t$start['day_of_week'] - $this->first_day_of_week :\n\t\t\t\t\t7 - ($this->first_day_of_week - $start['day_of_week']);\n\n\t\t\t\t$start \t= $this->CDT->add_day(-$offset);\n\t\t\t\t$this->CDT->reset();\n\t\t\t}\n\n\t\t\t// -------------------------------------\n\t\t\t// Adjust the end date forward to the last day of the week, if necessary\n\t\t\t// -------------------------------------\n\n\t\t\t$last_dow = ($this->first_day_of_week > 0) ? $this->first_day_of_week - 1 : 6;\n\n\t\t\tif ($end['day_of_week'] != $last_dow)\n\t\t\t{\n\t\t\t\t$this->CDT->change_ymd($end['ymd']);\n\t\t\t\t$offset = ($end['day_of_week'] > $last_dow) ?\n\t\t\t\t\t7 - ($end['day_of_week'] - $last_dow) :\n\t\t\t\t\t$last_dow - $end['day_of_week'];\n\n\t\t\t\t$end \t= $this->CDT->add_day($offset);\n\t\t\t\t$this->CDT->reset();\n\t\t\t}\n\n\t\t\t$end['time']\t= $old_end['time'];\n\t\t\t$end['hour']\t= $old_end['hour'];\n\t\t\t$end['minute']\t= $old_end['minute'];\n\n\t\t\t$this->CDT->set_default($start);\n\t\t\t$this->P->set('date_range_start', $start);\n\t\t\t$this->P->set('date_range_end', $end);\n\t\t}\n\n\t\t//ee()->TMPL->log_item('Calendar: Date range start: '. $this->P->value('date_range_start', 'ymd'));\n\n\t\t//ee()->TMPL->log_item('Calendar: Date range end: '. $this->P->value('date_range_end', 'ymd'));\n\n\t\t// -------------------------------------\n\t\t// Let's go fetch some events\n\t\t// -------------------------------------\n\n\t\t/*$category = FALSE;\n\n\t\tif (isset(ee()->TMPL) AND\n\t\t\t is_object(ee()->TMPL) AND\n\t\t\t ee()->TMPL->fetch_param('category') !== FALSE AND\n\t\t\t ee()->TMPL->fetch_param('category') != ''\n\t\t)\n\t\t{\n\t\t\t$category = ee()->TMPL->fetch_param('category');\n\n\t\t\tunset(ee()->TMPL->tagparams['category']);\n\t\t}*/\n\n\t\t$ids \t\t\t= $this->data->fetch_event_ids($this->P /*, $category*/);\n\n\t\t//ee()->TMPL->log_item('Calendar:build_calendar() Fetching events. ' . count( $ids ) . ' events were found.');\n\n\t\t$entry_data \t= array();\n\t\t$events \t\t= array();\n\n\t\t// -------------------------------------\n\t\t// No events? You really need to work on your social calendar...\n\t\t// -------------------------------------\n\n\t\tif (empty($ids))\n\t\t{\n\t\t\t// -------------------------------------\n\t\t\t// If they used a no_results tag, let 'em have it\n\t\t\t// -------------------------------------\n\n\t\t\tif (ee()->TMPL->no_results != '')\n\t\t\t{\n\t\t\t\t//ee()->TMPL->log_item('Calendar:build_calendar() No results, going home');\n\t\t\t\treturn $this->no_results();\n\t\t\t}\n\n\t\t\t//ee()->TMPL->log_item('Calendar:build_calendar() No results, but staying around for the show');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// -------------------------------------\n\t\t\t// We only care about this stuff if:\n\t\t\t// \t* there's an {event}{/event} tag pair\n\t\t\t// \t* thar be one or more xxx_has_events variables\n\t\t\t// -------------------------------------\n\n\t\t\tif ($each_event != '' OR strpos(ee()->TMPL->tagdata, '_event_total') !== FALSE)\n\t\t\t{\n\t\t\t\twhile (TRUE)\n\t\t\t\t{\n\t\t\t\t\t//ee()->TMPL->log_item('Calendar:build_calendar() Firing up the ol Channel Module to try and process ' . count( $ids ) . ' events.');\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Fetch occurrence info\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t$occurrence_ids = $this->data->fetch_occurrence_entry_ids($ids);\n\n\t\t\t\t\t//ee()->TMPL->log_item('Calendar:build_calendar() ' . count( $occurrence_ids ) . ' occurrences were found.');\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// If the entry_id of the occurrence doesn't match the entry_id\n\t\t\t\t\t// of the entry, we need to fetch the occurrence data separately\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tforeach ($occurrence_ids as $id => $data)\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ($data as $oid => $o_entry_id)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($id != $o_entry_id)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$ids[$o_entry_id] = $id; //$o_entry_id;\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// -------------------------------------\n\t\t\t\t\t// Prepare tagdata for Calendar-specific variable pairs, which\n\t\t\t\t\t// we will process later.\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tee()->TMPL->var_single['entry_id'] = 'entry_id';\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Prepare tagdata for Calendar-specific date variables, which\n\t\t\t\t\t// we will process later.\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t$var_dates = array(\n\t\t\t\t\t\t'event_start_date' \t=> FALSE,\n\t\t\t\t\t\t'event_start_time' \t=> FALSE,\n\t\t\t\t\t\t'event_end_date' \t=> FALSE,\n\t\t\t\t\t\t'event_end_time' \t=> FALSE\n\t\t\t\t\t);\n\n\t\t\t\t\tforeach (ee()->TMPL->var_single as $k => $v)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (($pos = strpos($k, ' format')) !== FALSE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$name = substr($k, 0, $pos);\n\n\t\t\t\t\t\t\tif (array_key_exists($name, $var_dates))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$var_dates[$name][$k] \t\t= $v;\n\t\t\t\t\t\t\t\tee()->TMPL->var_single[$k] \t= $k;\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//\t----------------------------------------\n\t\t\t\t\t//\tInvoke Channel class\n\t\t\t\t\t//\t----------------------------------------\n\n\t\t\t\t\tif ( ! class_exists('Channel') )\n\t\t\t\t\t{\n\t\t\t\t\t\trequire PATH_MOD.'/channel/mod.channel.php';\n\t\t\t\t\t}\n\n\t\t\t\t\t$channel = new Channel();\n\n\t\t\t\t\t//need to remove limit here so huge amounts of events work\n\t\t\t\t\t$channel->limit = 1000000;\n\n\t\t\t\t\t// --------------------------------------------\n\t\t\t\t\t// Invoke Pagination for EE 2.4 and Above\n\t\t\t\t\t// --------------------------------------------\n\n\t\t\t\t\t$channel = $this->add_pag_to_channel($channel);\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Prepare parameters\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tee()->TMPL->tagparams['entry_id'] = implode('|', array_keys($ids));\n\n\t\t\t\t\tif ($this->P->value('enable') != FALSE)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (is_array($this->P->value('enable')))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tee()->TMPL->tagparams['disable'] = implode('|', array_diff($disable, $this->P->value('enable')));\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\tee()->TMPL->tagparams['disable'] = implode('|', array_diff($disable, array($this->P->value('enable'))));\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\tee()->TMPL->tagparams['disable'] = implode('|', $disable);\n\t\t\t\t\t}\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Pre-process related data\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t//ee()->TMPL->tagdata = ee()->TMPL->assign_relationship_data( ee()->TMPL->tagdata );\n\n\t\t\t\t\tif (version_compare($this->ee_version, '2.6.0', '<'))\n\t\t\t\t\t{\n\t\t\t\t\t\tee()->TMPL->tagdata = ee()->TMPL->assign_relationship_data(\n\t\t\t\t\t\t\t$each_event\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tee()->TMPL->var_single \t= array_merge( ee()->TMPL->var_single, ee()->TMPL->related_markers );\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Execute needed methods\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t$channel->fetch_custom_channel_fields();\n\n\t\t\t\t\t$channel->fetch_custom_member_fields();\n\n\t\t\t\t\t// --------------------------------------------\n\t\t\t\t\t// Pagination Tags Parsed Out\n\t\t\t\t\t// --------------------------------------------\n\n\t\t\t\t\t$channel = $this->fetch_pagination_data($channel);\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Querification\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t//for some reason without this in EE 2.8.x\n\t\t\t\t\t//pagination has some sort of dynamic detection\n\t\t\t\t\t//that it didn't in EE 2.7 and below and hoses our\n\t\t\t\t\t//pagination setup because we are doing it\n\t\t\t\t\t//manually later as this is just data gathering\n\t\t\t\t\t//for events.\n\t\t\t\t\tif (\n\t\t\t\t\t\tversion_compare($this->ee_version, '2.8.0', '>=') &&\n\t\t\t\t\t\tisset($channel->pagination)\n\t\t\t\t\t)\n\t\t\t\t\t{\n\t\t\t\t\t\t$channel->pagination->paginate = false;\n\t\t\t\t\t}\n\n\t\t\t\t\t$channel->build_sql_query();\n\n\t\t\t\t\tif ($channel->sql == '')\n\t\t\t\t\t{\n\t\t\t\t\t\t//ee()->TMPL->log_item('Calendar: Channel query empty');\n\n\t\t\t\t\t\tif (ee()->TMPL->no_results != '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn $this->no_results();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\t$channel->query = ee()->db->query($channel->sql);\n\n\t\t\t\t\tif ($channel->query->num_rows == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t//ee()->TMPL->log_item('Calendar: Channel Module returned no results');\n\n\t\t\t\t\t\tif (ee()->TMPL->no_results != '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn $this->no_results();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\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//ee()->TMPL->log_item('Calendar:build_calendar() Channel module found ' . $channel->query->num_rows . ' results.');\n\t\t\t\t\t}\n\n\t\t\t\t\t$channel->query->result\t= $channel->query->result_array();\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Trim IDs and build events\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t$new_ids = array();\n\n\t\t\t\t\tforeach ($channel->query->result as $k => $row)\n\t\t\t\t\t{\n\t\t\t\t\t\t$new_ids[$row['entry_id']] = $ids[$row['entry_id']];\n\t\t\t\t\t}\n\n\t\t\t\t\t$event_data = $this->data->fetch_all_event_data($new_ids);\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Turn these IDs into events\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t$events = array();\n\n\t\t\t\t\t//ee()->TMPL->log_item('Calendar:build_calendar() Beginning event creation process.');\n\n\t\t\t\t\tif ( ! class_exists('Calendar_event'))\n\t\t\t\t\t{\n\t\t\t\t\t\trequire_once CALENDAR_PATH.'calendar.event.php';\n\t\t\t\t\t}\n\n\t\t\t\t\t$calendars = array();\n\n\t\t\t\t\tforeach ($event_data as $k => $edata)\n\t\t\t\t\t{\n\t\t\t\t\t\t$temp = new Calendar_event(\n\t\t\t\t\t\t\t$edata,\n\t\t\t\t\t\t\t$this->P->params['date_range_start']['value'],\n\t\t\t\t\t\t\t$this->P->params['date_range_end']['value']\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tif ( ! empty($temp->dates))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$temp->prepare_for_output();\n\t\t\t\t\t\t\t$events[$edata['entry_id']] = $temp;\n\t\t\t\t\t\t\t$calendars[$events[$edata['entry_id']]->default_data['calendar_id']] = array();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t//ee()->TMPL->log_item('Calendar:build_calendar() Event creation resulted in the creation of ' . count( $events ) . ' events.');\n\n\t\t\t\t\t//ee()->TMPL->log_item('Calendar:build_calendar() Event creation process finished.');\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Leaving so soon?\n\t\t\t\t\t// There's no point in continuing if we're just interested\n\t\t\t\t\t// in whether or not there are events on this day.\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tif ($each_event == '')\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach (array_keys($events) as $id)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$entry_data[$id] = $id;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//ee()->TMPL->log_item('Calendar:build_calendar() Skipping further channel module processing because $each_event variable was empty string. ' . count( $entry_data ) . ' events were found and logged into the $entry_data array.');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Nor should we stay around if there's nothing to process\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\telseif (empty($calendars))\n\t\t\t\t\t{\n\t\t\t\t\t\t//ee()->TMPL->log_item('Calendar:build_calendar() Skipping further channel module processing because there were no calendars connected to the events found.');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Fetch information about the calendars\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t$calendars = $this->data->fetch_calendar_data_by_id(array_keys($calendars));\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Prepare the tagdata that will be parsed by the channel module\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t$blargle = '3138ad2081984be5dea40e593fd61f87';\n\t\t\t\t\t$bleegle = '6f8de301e6e6f2cd80ad99aa3a765b31';\n\t\t\t\t\t//ee()->TMPL->tagdata = $blargle . '[' . LD . \"entry_id\" . RD . ']' . $each_event . $bleegle;\n\t\t\t\t\tee()->TMPL->tagdata = $blargle .\n\t\t\t\t\t\t'[' . LD . \"entry_id\" . RD . ']' .\n\t\t\t\t\t\tee()->TMPL->tagdata .\n\t\t\t\t\t\t$bleegle;\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Prep variable aliases\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t$variables = array(\n\t\t\t\t\t\t'title'\t\t\t=> 'event_title',\n\t\t\t\t\t\t'url_title'\t\t=> 'event_url_title',\n\t\t\t\t\t\t'entry_id'\t\t=> 'event_id',\n\t\t\t\t\t\t'author_id'\t\t=> 'event_author_id',\n\t\t\t\t\t\t'author'\t\t=> 'event_author',\n\t\t\t\t\t\t'status'\t\t=> 'event_status'\n\t\t\t\t\t);\n\n\t\t\t\t\t//custom variables with the letters 'url' are borked in\n\t\t\t\t\t//EE 2.6. Bug reported, but this should fix.\n\t\t\t\t\t//https://support.ellislab.com/bugs/detail/19337\n\t\t\t\t\tif (version_compare($this->ee_version, '2.6.0', '>='))\n\t\t\t\t\t{\n\t\t\t\t\t\t$variables['url_title'] = 'event_borked_title';\n\n\t\t\t\t\t\tee()->TMPL->var_single['event_borked_title'] = 'event_borked_title';\n\n\t\t\t\t\t\tunset(ee()->TMPL->var_single['event_url_title']);\n\n\t\t\t\t\t\tee()->TMPL->tagdata = str_replace(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\tLD . 'event_url_title' . RD,\n\t\t\t\t\t\t\t\t'\"event_url_title\"',\n\t\t\t\t\t\t\t\t\"'event_url_title'\"\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\tLD . 'event_borked_title' . RD,\n\t\t\t\t\t\t\t\t'\"event_borked_title\"',\n\t\t\t\t\t\t\t\t\"'event_borked_title'\"\n\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tee()->TMPL->tagdata\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tee()->TMPL->var_single['event_calendar_borked_title'] = 'event_calendar_borked_title';\n\n\t\t\t\t\t\tunset(ee()->TMPL->var_single['event_calendar_url_title']);\n\n\t\t\t\t\t\tee()->TMPL->tagdata = str_replace(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\tLD . 'event_calendar_url_title' . RD,\n\t\t\t\t\t\t\t\t'\"event_calendar_url_title\"',\n\t\t\t\t\t\t\t\t\"'event_calendar_url_title'\"\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\tLD . 'event_calendar_borked_title' . RD,\n\t\t\t\t\t\t\t\t'\"event_calendar_borked_title\"',\n\t\t\t\t\t\t\t\t\"'event_calendar_borked_title'\"\n\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tee()->TMPL->tagdata\n\t\t\t\t\t\t);\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// --------------------------------------------\n\t\t\t\t\t// Typography\n\t\t\t\t\t// --------------------------------------------\n\n\t\t\t\t\tee()->load->library('typography');\n\t\t\t\t\tee()->typography->initialize();\n\t\t\t\t\tee()->typography->convert_curly = FALSE;\n\n\t\t\t\t\t$channel->fetch_categories();\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Add variables to the query result\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tforeach ($channel->query->result as $k => $row)\n\t\t\t\t\t{\n\t\t\t\t\t\t$entry_id = $row['entry_id'];\n\n\t\t\t\t\t\t$channel->query->result[$k]['author'] = ($row['screen_name'] != '') ? $row['screen_name'] : $row['username'];\n\n\t\t\t\t\t\t//ee()->TMPL->log_item('Calendar:build_calendar() We\\'re in the channel query result loop. Entry id is ' . $entry_id );\n\n\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t// Skip this result if the event data doesn't exist\n\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\tif (! isset($events[$ids[$entry_id]]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tunset($channel->query->result[$k]);\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$channel->query->result[$k]['edited_occurrence'] \t= FALSE;\n\t\t\t\t\t\t$channel->query->result[$k]['event_parent_id']\t\t= ($ids[$entry_id] == $entry_id) ? 0 : $ids[$entry_id];\n\n\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t// If this entry_id is not in the $events array, this is an edited occurrence\n\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\tif (! isset($events[$entry_id]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t// Add this info to the $events array\n\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t$events[$entry_id] = clone $events[$ids[$entry_id]];\n\n\t\t\t\t\t\t\t$channel->query->result[$k]['edited_occurrence'] = TRUE;\n\n\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t// Correct the info\n\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\tforeach ($events[$entry_id]->occurrences as $ymd => $times)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tforeach ($times as $time => $data)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ($data['entry_id'] != $entry_id)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tunset($events[$entry_id]->occurrences[$ymd][$time], $events[$entry_id]->dates[$ymd][$time]);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tunset($events[$data['event_id']]->occurrences[$ymd][$time], $events[$data['event_id']]->dates[$ymd][$time]);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// NOTE: Requires PHP >= 5.1.0\n\t\t\t\t\t\t\t$events[$entry_id]->dates = array_intersect_key($events[$entry_id]->dates, $events[$entry_id]->occurrences);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t// Alias\n\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\tforeach ($variables as $old => $new)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($old == 'title')\n\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t$channel->query->result[$k][$old]\t= ee()->typography->parse_type(\n\t\t\t\t\t\t\t\t\t$channel->query->result[$k][$old],\n\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t'text_format' \t=> 'lite',\n\t\t\t\t\t\t\t\t\t\t'html_format' \t=> 'none',\n\t\t\t\t\t\t\t\t\t\t'auto_links' \t=> 'n',\n\t\t\t\t\t\t\t\t\t\t'allow_img_url' => 'no'\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t$channel->query->result[$k][$new]\t= $channel->query->result[$k][$old];\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$channel->query->result[$k][$new]\t= $channel->query->result[$k][$old];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t// Calendar variables\n\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\tforeach ($calendars[$events[$entry_id]->default_data['calendar_id']] as $key => $val)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$channel->query->result[$k][$key] = $val;\n\n\t\t\t\t\t\t\tif ($key == 'calendar_url_title' AND\n\t\t\t\t\t\t\t\tversion_compare($this->ee_version, '2.6.0', '>='))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$channel->query->result[$k]['event_calendar_borked_title'] = $val;\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$channel->query->result[$k]['event_'.$key] = $val;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\t//\t----------------------------------------\n\t\t\t\t\t//\tRedeclare\n\t\t\t\t\t//\t----------------------------------------\n\t\t\t\t\t//\tWe will reassign the $channel->query->result with our\n\t\t\t\t\t//\treordered array of values. Thank you PHP for being so fast with array loops.\n\t\t\t\t\t//\t----------------------------------------\n\n\t\t\t\t\t$super_temp_fake = $channel->query->result_array = $channel->query->result;\n\n\t\t\t\t\t$channel->fetch_categories();\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Handle {title} and {event_title} differently\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tee()->TMPL->tagdata\t= str_replace(\n\t\t\t\t\t\tLD . 'title' . RD,\n\t\t\t\t\t\t'6c21bdf1bfdab13bc8df8fcfeb2763a6' . LD . 'entry_id' . RD,\n\t\t\t\t\t\tee()->TMPL->tagdata\n\t\t\t\t\t);\n\n\t\t\t\t\tee()->TMPL->tagdata\t= str_replace(\n\t\t\t\t\t\tLD . 'event_title' . RD,\n\t\t\t\t\t\t'6c21bdf1bfdab13bc8df8fcfeb2763a6' . LD . 'entry_id' . RD,\n\t\t\t\t\t\tee()->TMPL->tagdata\n\t\t\t\t\t);\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Remove \"ignore\" prefixes\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tee()->TMPL->tagdata = str_replace(\n\t\t\t\t\t\t'calendar_ignore_',\n\t\t\t\t\t\t'',\n\t\t\t\t\t\tee()->TMPL->tagdata\n\t\t\t\t\t);\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Parse Weblog stuff\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t//ee()->TMPL->log_item('Calendar: Parsing Weblog stuff');\n\n\t\t\t\t\t$channel->parse_channel_entries();\n\n\t\t\t\t\tforeach ($super_temp_fake as $k => $data)\n\t\t\t\t\t{\n\t\t\t\t\t\t$channel->return_data = str_replace(\n\t\t\t\t\t\t\t'6c21bdf1bfdab13bc8df8fcfeb2763a6' . $data['entry_id'],\n\t\t\t\t\t\t\t$super_temp_fake[$k]['title'],\n\t\t\t\t\t\t\t$channel->return_data\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Related entries\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t//ee()->TMPL->log_item('Calendar: Parsing related entries');\n\n\t\t\t\t\tif (version_compare($this->ee_version, '2.6.0', '<'))\n\t\t\t\t\t{\n\t\t\t\t\t\tif (count(ee()->TMPL->related_data) > 0 AND\n\t\t\t\t\t\t\tcount($channel->related_entries) > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$channel->parse_related_entries();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (count(ee()->TMPL->reverse_related_data) > 0 AND\n\t\t\t\t\t\t\tcount($channel->reverse_related_entries) > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$channel->parse_reverse_related_entries();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Collect the parsed data for use later\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tpreg_match_all('/' . $blargle . '\\[(\\d+)\\](.*?)' . $bleegle . '/s', $channel->return_data, $matches);\n\t\t\t\t\tforeach ($matches[0] as $k => $match)\n\t\t\t\t\t{\n\t\t\t\t\t\t$entry_data[$matches[1][$k]] = $matches[2][$k];\n\t\t\t\t\t}\n\n\t\t\t\t\tunset($channel);\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Stop the insanity!\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//ee()->TMPL->log_item('Calendar:build_calendar() Channel module stuff done');\n\n\t\t// -------------------------------------\n\t\t// Build the calendar\n\t\t// -------------------------------------\n\n\t\t//ee()->TMPL->log_item('Calendar: Starting to build the calendar');\n\n\t\t$start_year\t\t= $start['year'];\n\t\t$start_month\t= $start['month'];\n\t\t$start_day\t\t= $start['day'];\n\t\t$end_year\t\t= $end['year'];\n\t\t$end_month\t\t= $end['month'];\n\t\t$end_day\t\t= $end['day'];\n\t\t$w\t\t\t\t= 0;\n\n\t\t$this->CDT->reset();\n\n\t\tif ($this->P->value('pad_short_weeks') === TRUE)\n\t\t{\n\t\t\t$week_counter = 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$week_counter = ($this->CDT->day_of_week >= $this->first_day_of_week) ?\n\t\t\t\t\t\t\t\t$this->CDT->day_of_week - $this->first_day_of_week :\n\t\t\t\t\t\t\t\t7 + $this->CDT->day_of_week - $this->first_day_of_week;\n\t\t}\n\n\t\t$output = '';\n\t\t$week_temp = $month_temp = $year_temp = '';\n\t\t$day_count = 0;\n\n\t\t$next_CDT = $prev_CDT = $start;\n\n\t\t$all_day = array();\n\t\t$event_array = array();\n\n\t\t// -------------------------------------\n\t\t// Prepare the events\n\t\t// -------------------------------------\n\n\t\t//ee()->TMPL->log_item('Calendar: Preparing events');\n\n\t\tforeach ($events as $id => $event)\n\t\t{\n\t\t\t//prevent missing entry data from attempting to display and causing errors\n\t\t\tif ( ! isset($entry_data[$event->default_data['entry_id']]))\n\t\t\t{\n\t\t\t\tunset($events[$id]);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (empty($event->dates))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tforeach ($event->dates as $ymd => $items)\n\t\t\t{\n\t\t\t\tforeach ($items as $time => $ddata)\n\t\t\t\t{\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// It was over before it started\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tif ($ddata['end_date']['ymd'].$ddata['end_date']['time'] <\n\t\t\t\t\t\t$this->P->value('date_range_start', 'ymd') .\n\t\t\t\t\t\t$this->P->value('date_range_start', 'time'))\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// -------------------------------------\n\t\t\t\t\t// ...or the inverse\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tif ($ddata['date']['ymd'].$ddata['date']['time'] >\n\t\t\t\t\t\t $this->P->value('date_range_end', 'ymd') .\n\t\t\t\t\t\t $this->P->value('time_range_end', 'time'))\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// -------------------------------------\n\t\t\t\t\t// If the start date of the event is less than the first\n\t\t\t\t\t// day of the calendar, we've got ourselves a hangover.\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tif ($ddata['date']['ymd'] < $this->P->value('date_range_start', 'ymd'))\n\t\t\t\t\t{\n\t\t\t\t\t\t$event_array[$this->P->value('date_range_start', 'ymd')]['all_day'][$id]\t= $id;\n\t\t\t\t\t\t$events[$id]->dates[$this->P->value('date_range_start', 'ymd')]\t\t\t\t= $events[$id]->dates[$ymd];\n\t\t\t\t\t}\n\t\t\t\t\telseif ($ddata['all_day'] === TRUE)\n\t\t\t\t\t{\n\t\t\t\t\t\t$event_array[$ymd]['all_day'][$id] = $id;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($ddata['multi_day'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$event_array[$ymd]['all_day'][$id] = $id;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$start_hour\t= str_pad($ddata['date']['hour'], 2, 0, STR_PAD_LEFT);\n\t\t\t\t\t\t\t$start_min\t= str_pad($ddata['date']['minute'], 2, 0, STR_PAD_LEFT);\n\t\t\t\t\t\t\t$end_hour\t= str_pad($ddata['end_date']['hour'], 2, 0, STR_PAD_LEFT);\n\t\t\t\t\t\t\t$end_min\t= str_pad($ddata['end_date']['minute'], 2, 0, STR_PAD_LEFT);\n\t\t\t\t\t\t\t$event_array[$ymd][$start_hour][$start_min][$end_hour][$end_min][$id] = $id;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\n\n\t\t\t// -------------------------------------\n\t\t\t// Aliases\n\t\t\t// -------------------------------------\n\n\t\t\t$events[$id]->default_data['first_date']\t= $events[$id]->default_data['start_date'];\n\t\t}\n\n\t\t$this->CDT->reset();\n\n\t\t// -------------------------------------\n\t\t// Prune the event array, if there's an event limit.\n\t\t// NOTE: apply_event_limit() also sorts the array for us.\n\t\t// -------------------------------------\n\n\t\t//--------------------------------------------\n\t\t//\tcount all events for tag and pagination\n\t\t//--------------------------------------------\n\n\t\t$this->event_timeframe_total = $this->count_event_results($event_array);\n\n\t\t//--------------------------------------------\n\t\t//\tpagination\n\t\t//--------------------------------------------\n\n\t\t$this->paginate = FALSE;\n\n\t\tif ($this->P->value('event_limit') > 0 AND\n\t\t\t$this->event_timeframe_total > $this->P->value('event_limit'))\n\t\t{\n\t\t\t//get pagination info\n\t\t\t$pagination_data = $this->universal_pagination(array(\n\t\t\t\t'total_results'\t\t\t=> $this->event_timeframe_total,\n\t\t\t\t//had to remove this jazz before so it didn't get iterated over\n\t\t\t\t'tagdata'\t\t\t\t=> $tagdata . $this->paginate_tagpair_data,\n\t\t\t\t'limit'\t\t\t\t\t=> $this->P->value('event_limit'),\n\t\t\t\t'uri_string'\t\t\t=> ee()->uri->uri_string,\n\t\t\t\t'paginate_prefix'\t\t=> 'calendar_'\n\t\t\t));\n\n\t\t\t// -------------------------------------------\n\t\t\t// 'calendar_events_create_pagination' hook.\n\t\t\t// - Let devs maniuplate the pagination display\n\n\t\t\tif (ee()->extensions->active_hook('calendar_build_calendar_create_pagination') === TRUE)\n\t\t\t{\n\t\t\t\t$pagination_data = ee()->extensions->call(\n\t\t\t\t\t'calendar_build_calendar_create_pagination',\n\t\t\t\t\t$this,\n\t\t\t\t\t$pagination_data\n\t\t\t\t);\n\t\t\t}\n\t\t\t//\n\t\t\t// -------------------------------------------\n\n\t\t\t//if we paginated, sort the data\n\t\t\tif ($pagination_data['paginate'] === TRUE)\n\t\t\t{\n\t\t\t\t$this->paginate\t\t\t= $pagination_data['paginate'];\n\t\t\t\t$this->page_next\t\t= $pagination_data['page_next'];\n\t\t\t\t$this->page_previous\t= $pagination_data['page_previous'];\n\t\t\t\t$this->p_page\t\t\t= $pagination_data['pagination_page'];\n\t\t\t\t$this->current_page \t= $pagination_data['current_page'];\n\t\t\t\t$this->pager \t\t\t= $pagination_data['pagination_links'];\n\t\t\t\t$this->basepath\t\t\t= $pagination_data['base_url'];\n\t\t\t\t$this->total_pages\t\t= $pagination_data['total_pages'];\n\t\t\t\t$this->paginate_data\t= $pagination_data['paginate_tagpair_data'];\n\t\t\t\t$this->page_count\t\t= $pagination_data['page_count'];\n\t\t\t\t//$tagdata\t\t\t\t= $pagination_data['tagdata'];\n\t\t\t}\n\t\t}\n\n\t\t//--------------------------------------------\n\t\t//\tevent limiter\n\t\t//--------------------------------------------\n\n\t\t$offset = (\n\t\t\tee()->TMPL->fetch_param('event_offset') ?\n\t\t\t\tee()->TMPL->fetch_param('event_offset') :\n\t\t\t\t0\n\t\t);\n\n\t\t$page \t= (($this->current_page -1) * $this->P->value('event_limit'));\n\n\t\tif ($page > 0)\n\t\t{\n\t\t\t$offset += $page;\n\t\t}\n\n\t\t$event_array = $this->apply_event_limit(\n\t\t\t$event_array,\n\t\t\t$this->P->value('event_limit'),\n\t\t\t$offset\n\t\t);\n\n\t\t// -------------------------------------\n\t\t// Loopage\n\t\t// -------------------------------------\n\n\t\t//ee()->TMPL->log_item('Calendar: Beginning date loops');\n\n\t\t$week_event_count\t= 0;\n\t\t$event_count\t\t= 0;\n\t\t$year_tick\t\t\t= 0;\n\t\t$month_tick\t\t\t= 0;\n\n\t\tfor ($y = $start_year; $y <= $end_year; $y++)\n\t\t{\n\t\t\t$year_event_count = 0;\n\n\t\t\t//blank out\n\t\t\t$this->counted['year'] = array();\n\n\t\t\t$mx = ($y == $start_year) ? $start_month : 1;\n\t\t\t$my = ($y == $end_year) ? $end_month : 12;\n\n\t\t\t$year_ymd_cache = $this->CDT->ymd;\n\n\n\t\t\tfor ($m = $mx; $m <= $my; $m++)\n\t\t\t{\n\t\t\t\t$month_ymd_cache \t= $this->CDT->ymd;\n\n\n\t\t\t\t$month_event_count = 0;\n\n\t\t\t\t//blank out\n\t\t\t\t$this->counted['month'] = array();\n\n\t\t\t\t$dx = ($y == $start_year AND $m == $start_month) ?\n\t\t\t\t\t\t$start_day :\n\t\t\t\t\t\t1;\n\n\t\t\t\t$dy = ($y == $end_year AND $m == $end_month) ?\n\t\t\t\t\t\t$end_day :\n\t\t\t\t\t\t$this->CDT->days_in_month($m, $y);\n\n\t\t\t\tfor ($d = $dx; $d <= $dy; $d++)\n\t\t\t\t{\n\t\t\t\t\t$day_ymd_cache \t= $this->CDT->ymd;\n\t\t\t\t\t$day_tick\t\t= 0;\n\n\t\t\t\t\t$this->CDT->change_date($y, $m, $d);\n\t\t\t\t\t$this->CDT->set_default($this->CDT->date_array());\n\n\t\t\t\t\t$ymd = $this->CDT->ymd;\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Prepare counts and totals, also\n\t\t\t\t\t// altered later in the loop in some cases\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t$day_event_count = 0;\n\t\t\t\t\t$day_event_total = 0;\n\n\t\t\t\t\t//blank out\n\t\t\t\t\t$this->counted['day'] = array();\n\n\t\t\t\t\tif (! isset($event_array[$ymd])) $event_array[$ymd] = array();\n\n\t\t\t\t\t$day_event_total\t= $this->count_events(\n\t\t\t\t\t\t$ymd,\n\t\t\t\t\t\t$event_array,\n\t\t\t\t\t\t$all_day,\n\t\t\t\t\t\t'day',\n\t\t\t\t\t\t$events\n\t\t\t\t\t);\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Start events for the day\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t//ee()->TMPL->log_item('Calendar: Beginning ' . $ymd . count( $event_array[$ymd] ) . ' events for this day.');\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// This looks a little goofy, but it\n\t\t\t\t\t// prevents extra years/months\n\t\t\t\t\t// showing up thanks to padded weeks\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t$day_count++;\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Week stuff\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tif ($week_counter % 7 == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t//blank out\n\t\t\t\t\t\t$this->counted['week'] = array();\n\n\t\t\t\t\t\t$w = str_pad($this->CDT->week_number, 2, 0, STR_PAD_LEFT);\n\t\t\t\t\t}\n\n\t\t\t\t\t$week_counter++;\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// \"next\" stuff\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t$next_y = ($m == 12 AND $d == 31) ? $y+1 : $y;\n\t\t\t\t\t$next_m = ($d == $this->CDT->days_in_month()) ? $m + 1 : $m;\n\t\t\t\t\t$next_w = ($week_counter % 7 == 0) ? $w + 1 : $w;\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Yodelers of Mass Destruction\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t$find\t\t\t= '';\n\t\t\t\t\t$replace\t\t= '';\n\t\t\t\t\t$hour_events\t= array();\n\t\t\t\t\t$last_day\t\t= (\n\t\t\t\t\t\t$y == $end_year AND\n\t\t\t\t\t\t$m == $end_month AND\n\t\t\t\t\t\t$d == $end_day\n\t\t\t\t\t) ? TRUE : FALSE;\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Remove \"all day\" stragglers\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tforeach ($all_day as $i => $stuff)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($ymd > $stuff['end_ymd'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tunset($all_day[$i]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Each event\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// \t$each_event contains the formatting\n\t\t\t\t\t// \tto use for displaying the contents\n\t\t\t\t\t// \tof an event on a given day in the calendar.\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tif ($each_event != '')\n\t\t\t\t\t{\n\t\t\t\t\t\t$event_output = '';\n\n\t\t\t\t\t\tif ( ! empty($event_array[$ymd]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach ($event_array[$ymd] as $start_hour => $sh_data)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$hour_event_count\t= 0;\n\t\t\t\t\t\t\t\t$hour_event_total\t= count($sh_data);\n\n\t\t\t\t\t\t\t\tif ($start_hour == 'all_day')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$prev_index = 0;\n\t\t\t\t\t\t\t\t\t$index = 0;\n\n\t\t\t\t\t\t\t\t\tforeach ($sh_data as $i => $id)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t\t\t\t// Multi-day events get one time key, regular\n\t\t\t\t\t\t\t\t\t\t// all day events get another\n\t\t\t\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t\t\t\t$time_key = '00002400';\n\n\t\t\t\t\t\t\t\t\t\tif ( ! isset( $events[$id]->dates[$ymd][$time_key]))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t//so in some rare situations this\n\t\t\t\t\t\t\t\t\t\t\t//can come to us without being reset?\n\t\t\t\t\t\t\t\t\t\t\t//I hate moving pointers :p\n\t\t\t\t\t\t\t\t\t\t\treset($events[$id]->dates[$ymd]);\n\n\t\t\t\t\t\t\t\t\t\t\t$time_key = key($events[$id]->dates[$ymd]);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t$event_count++;\n\t\t\t\t\t\t\t\t\t\t$year_event_count++;\n\t\t\t\t\t\t\t\t\t\t$month_event_count++;\n\t\t\t\t\t\t\t\t\t\t$week_event_count++;\n\t\t\t\t\t\t\t\t\t\t$day_event_count++;\n\t\t\t\t\t\t\t\t\t\t$hour_event_count++;\n\n\t\t\t\t\t\t\t\t\t\t$vars = $this->get_occurrence_vars($id, $events[$id], $ymd, $time_key);\n\n\t\t\t\t\t\t\t\t\t\t$vars['conditional']['event_all_day']\t= TRUE;\n\n\t\t\t\t\t\t\t\t\t\t$vars['single']\t+= array(\n\t\t\t\t\t\t\t\t\t\t\t'event_count'\t\t\t\t=> $this->create_count_hash('event_count'),\n\t\t\t\t\t\t\t\t\t\t\t'year_event_count'\t\t\t=> $this->create_count_hash('year_event_count'),\n\t\t\t\t\t\t\t\t\t\t\t'month_event_count'\t\t\t=> $this->create_count_hash('month_event_count'),\n\t\t\t\t\t\t\t\t\t\t\t'week_event_count'\t\t\t=> $this->create_count_hash('week_event_count'),\n\t\t\t\t\t\t\t\t\t\t\t'day_event_count'\t\t\t=> $this->create_count_hash('day_event_count'),\n\t\t\t\t\t\t\t\t\t\t\t'hour_event_count'\t\t\t=> $this->create_count_hash('hour_event_count'),\n\t\t\t\t\t\t\t\t\t\t\t'all_day_event_index_difference' => $index - $prev_index,\n\t\t\t\t\t\t\t\t\t\t\t'all_day_event_index'\t\t=> $index++,\n\n\t\t\t\t\t\t\t\t\t\t\t'event_duration_minutes'\t=> (isset($events[$id]->dates[$ymd][$time_key])) ?\n\t\t\t\t\t\t\t\t\t\t\t\t\t$events[$id]->dates[$ymd][$time_key]['duration']['minutes'] :\n\t\t\t\t\t\t\t\t\t\t\t\t\t$events[$id]->default_data['duration']['minutes'],\n\n\t\t\t\t\t\t\t\t\t\t\t'event_duration_hours'\t\t=> (isset($events[$id]->dates[$ymd][$time_key])) ?\n\t\t\t\t\t\t\t\t\t\t\t\t\t$events[$id]->dates[$ymd][$time_key]['duration']['hours'] :\n\t\t\t\t\t\t\t\t\t\t\t\t\t$events[$id]->default_data['duration']['hours'],\n\n\t\t\t\t\t\t\t\t\t\t\t'event_duration_days'\t\t=> (isset($events[$id]->dates[$ymd][$time_key])) ?\n\t\t\t\t\t\t\t\t\t\t\t\t\t$events[$id]->dates[$ymd][$time_key]['duration']['days'] :\n\t\t\t\t\t\t\t\t\t\t\t\t\t$events[$id]->default_data['duration']['days']\n\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t//we have to remove conditionals for these items as well\n\t\t\t\t\t\t\t\t\t\t//because the dummy hashes screw with them\n\t\t\t\t\t\t\t\t\t\t$output_data = $this->remove_post_parse_conditionals(array(\n\t\t\t\t\t\t\t\t\t\t\t'event_count'\t=> $vars['single']['event_count'],\n\t\t\t\t\t\t\t\t\t\t\t'year_event_count'\t\t=> $vars['single']['year_event_count'],\n\t\t\t\t\t\t\t\t\t\t\t'month_event_count' \t=> $vars['single']['month_event_count'],\n\t\t\t\t\t\t\t\t\t\t\t'week_event_count'\t\t=> $vars['single']['week_event_count'],\n\t\t\t\t\t\t\t\t\t\t\t'day_event_count'\t\t=> $vars['single']['day_event_count'],\n\t\t\t\t\t\t\t\t\t\t\t'hour_event_count'\t\t=> $vars['single']['hour_event_count']\n\t\t\t\t\t\t\t\t\t\t), $entry_data[$id]);\n\n\t\t\t\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t\t\t\t// If we're outputting at the event level, then we have\n\t\t\t\t\t\t\t\t\t\t// to spit out the all day stuff here.\n\t\t\t\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t\t\t\tif ($output_at == 'event')\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$event_output .= $this->swap_vars($vars, $output_data);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t//shortcut\n\t\t\t\t\t\t\t\t\t\t$evtk =& $events[$id]->dates[$ymd][$time_key];\n\n\t\t\t\t\t\t\t\t\t\t$array = array(\n\t\t\t\t\t\t\t\t\t\t\t'output'\t\t\t\t\t=> $output_data,\n\t\t\t\t\t\t\t\t\t\t\t'vars'\t\t\t\t\t\t=> $vars,\n\t\t\t\t\t\t\t\t\t\t\t'first_day'\t\t\t\t\t=> $evtk['date']['ymd'],\n\t\t\t\t\t\t\t\t\t\t\t'last_day'\t\t\t\t\t=> $evtk['end_date']['ymd'],\n\t\t\t\t\t\t\t\t\t\t\t'start_ymd'\t\t\t\t\t=> $evtk['date']['ymd'],\n\t\t\t\t\t\t\t\t\t\t\t'end_ymd'\t\t\t\t\t=> $evtk['end_date']['ymd'],\n\t\t\t\t\t\t\t\t\t\t\t'time'\t\t\t\t\t\t=> $time_key,\n\t\t\t\t\t\t\t\t\t\t\t'id'\t\t\t\t\t\t=> $id,\n\t\t\t\t\t\t\t\t\t\t\t'event_duration_minutes'\t=> $evtk['duration']['minutes'],\n\t\t\t\t\t\t\t\t\t\t\t'event_duration_hours'\t\t=> $evtk['duration']['hours'],\n\t\t\t\t\t\t\t\t\t\t\t'event_duration_days'\t\t=> $evtk['duration']['days']\n\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t//unset($event_array[$ymd]['all_day'][$id]);\n\n\t\t\t\t\t\t\t\t\t\t$count\t\t= (empty($all_day)) ? 0 : max(array_keys($all_day));\n\t\t\t\t\t\t\t\t\t\t$inserted\t= FALSE;\n\t\t\t\t\t\t\t\t\t\t$prev_index\t= $index + 1;\n\n\t\t\t\t\t\t\t\t\t\tif (! in_array($array, $all_day))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tfor ($i = 0; $i <= $count; $i++)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t\t\t\t\t\t// Find a spot for this event\n\t\t\t\t\t\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t\t\t\t\t\tif (! isset($all_day[$i]))\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t$all_day[$i] = $array;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$inserted = TRUE;\n\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\tif ($inserted === FALSE)\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$all_day[$i] = $array;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tksort($all_day);\n\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif ($each_hour != '')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$hour_events[$start_hour] = $sh_data;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tforeach ($sh_data as $start_minute => $sm_data)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tforeach ($sm_data as $end_hour => $eh_data)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tforeach ($eh_data as $end_minute => $event_ids)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tforeach ($event_ids as $id)\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (isset($entry_data[$id]))\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$start_hour\t= str_pad($start_hour, 2, 0, STR_PAD_LEFT);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$start_min\t= str_pad($start_min, 2, 0, STR_PAD_LEFT);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$end_hour\t= str_pad($end_hour, 2, 0, STR_PAD_LEFT);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$end_min\t= str_pad($end_min, 2, 0, STR_PAD_LEFT);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$time_key = $start_hour.$start_minute.$end_hour.$end_minute;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ( ! isset($events[$id]->dates[$ymd][$time_key]))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$event_count++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$year_event_count++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$month_event_count++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$week_event_count++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$day_event_count++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$hour_event_count++;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$vars = $this->get_occurrence_vars(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$events[$id],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$ymd,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$start_hour . $start_minute . $end_hour . $end_minute\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['event_duration_minutes']\t= $events[$id]->dates[$ymd][$time_key]['duration']['minutes'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['event_duration_hours']\t\t= $events[$id]->dates[$ymd][$time_key]['duration']['hours'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['event_duration_days']\t\t= $events[$id]->dates[$ymd][$time_key]['duration']['days'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['event_count']\t\t\t\t= $this->create_count_hash('event_count');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['year_event_count']\t\t\t= $this->create_count_hash('year_event_count');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['month_event_count']\t\t= $this->create_count_hash('month_event_count');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['week_event_count']\t\t\t= $this->create_count_hash('week_event_count');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['day_event_count']\t\t\t= $this->create_count_hash('day_event_count');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['hour_event_count']\t\t\t= $this->create_count_hash('hour_event_count');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['day_event_total']\t\t\t= $day_event_total;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['hour_event_total']\t\t\t= $hour_event_total;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['all_day_event_index']\t\t= 0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['all_day_event_index_difference'] = 0;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//we have to remove conditionals for these items as well\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//because the dummy hashes screw with them\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$output_data = $this->remove_post_parse_conditionals(array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'event_count'\t\t\t=> $vars['single']['event_count'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'year_event_count'\t\t=> $vars['single']['year_event_count'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'month_event_count'\t\t=> $vars['single']['month_event_count'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'week_event_count'\t\t=> $vars['single']['week_event_count'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'day_event_count'\t\t=> $vars['single']['day_event_count'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'hour_event_count'\t\t=> $vars['single']['hour_event_count']\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t), $entry_data[$id]);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$event_output .= $this->swap_vars($vars, $output_data);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t//parse day event counts\n\t\t\t\t\t\t\t$event_output = $this->parse_count_hashes('hour_event_count', $event_output);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$find = $hash_event;\n\t\t\t\t\t\t$replace = $event_output;\n\n\t\t\t\t\t\tif ($output_at == 'event')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$output .= $replace;\n\t\t\t\t\t\t\t$replace = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// If $each_event is empty, $all_day never gets filled. Let's fix that.\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tif ($each_event == '' AND isset($event_array[$ymd]['all_day']))\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ($event_array[$ymd]['all_day'] as $id)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$time_key\t\t\t= (! isset( $events[$id]->dates[$ymd]['00002400'])) ?\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey($events[$id]->dates[$ymd]) :\n\t\t\t\t\t\t\t\t\t\t\t\t\t'00002400';\n\n\t\t\t\t\t\t\t$data['end_ymd']\t= $events[$id]->dates[$ymd][$time_key]['end_date']['ymd'];\n\n\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t// This stuff can be gibberish since it'll never show, but we\n\t\t\t\t\t\t\t// provide it because other parts of the code expect it to exist\n\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t$data['time']\t\t= '';\n\t\t\t\t\t\t\t$data['vars']\t\t= array();\n\t\t\t\t\t\t\t$data['first_day']\t= FALSE;\n\t\t\t\t\t\t\t$data['last_day']\t= FALSE;\n\t\t\t\t\t\t\t$data['output']\t\t= '';\n\n\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t// Add the all day event\n\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t$all_day[]\t\t\t= $data;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$all_day_event_total\t= count($all_day);\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// \"All day\" output\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t$all_day_output = '';\n\n\t\t\t\t\tif ( ! empty($all_day))\n\t\t\t\t\t{\n\t\t\t\t\t\t$prev_index = 0;\n\t\t\t\t\t\t$hour_event_count = 0;\n\n\t\t\t\t\t\tforeach ($all_day as $all_day_data)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$time_key\t= $all_day_data['time'];\n\t\t\t\t\t\t\t$vars\t\t= $all_day_data['vars'];\n\t\t\t\t\t\t\t$vars['single']['event_first_day']\t= ($ymd == $all_day_data['first_day']) ? TRUE : FALSE;\n\t\t\t\t\t\t\t$vars['single']['event_last_day']\t= ($ymd == $all_day_data['last_day']) ? TRUE : FALSE;\n\n\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t// Process all day variables\n\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t$all_day_output\t.= $this->swap_vars($vars, $all_day_data['output']);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this->CDT->reset();\n\t\t\t\t\t}\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Each hour\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tif ($each_hour != '')\n\t\t\t\t\t{\n\t\t\t\t\t\t$hour_output = '';\n\t\t\t\t\t\t$hour_temp = '';\n\n\t\t\t\t\t\tif ($all_day_output != '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$hour_output = $all_day_output;\n\t\t\t\t\t\t\t$all_day_output = '';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfor ($i = 0; $i < 24; $i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$hour_temp\t\t\t= '';\n\t\t\t\t\t\t\t$hour_count\t\t\t= 0;\n\t\t\t\t\t\t\t$hour_event_count\t= 0;\n\t\t\t\t\t\t\t$h\t\t\t\t\t= str_pad($i, 2, '0', STR_PAD_LEFT);\n\t\t\t\t\t\t\t//$this->cdt_format_date_string($this->CDT->datetime_array(), 'H');\n\t\t\t\t\t\t\t$minute\t\t\t\t= '00';\n\t\t\t\t\t\t\t//$this->cdt_format_date_string($this->CDT->datetime_array(), 'i');\n\n\t\t\t\t\t\t\tif (isset($hour_events[$h]))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tforeach ($hour_events[$h] as $start_minute => $sm_data)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tforeach ($sm_data as $end_hour => $eh_data)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tforeach ($eh_data as $end_minute => $event_ids)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$hour_count += count($event_ids);\n\n\t\t\t\t\t\t\t\t\t\t\tforeach ($event_ids as $id)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif (isset($entry_data[$id]))\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t$event_count++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$year_event_count++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$month_event_count++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$week_event_count++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$day_event_count++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$hour_event_count++;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t$vars = $this->get_occurrence_vars(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$events[$id],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$ymd,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$h . $start_minute . $end_hour . $end_minute\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['event_count']\t\t\t= $this->create_count_hash('event_count');\n\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['hour_event_count']\t\t= $this->create_count_hash('hour_event_count');\n\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['year_event_count']\t\t= $this->create_count_hash('year_event_count');\n\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['month_event_count']\t= $this->create_count_hash('month_event_count');\n\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['week_event_count']\t\t= $this->create_count_hash('week_event_count');\n\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['day_event_count']\t\t= $this->create_count_hash('day_event_count');\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t//we have to remove conditionals for these items as well\n\t\t\t\t\t\t\t\t\t\t\t\t\t//because the dummy hashes screw with them\n\t\t\t\t\t\t\t\t\t\t\t\t\t$output_data = $this->remove_post_parse_conditionals(array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'event_count'\t\t\t=> $vars['single']['event_count'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'year_event_count'\t\t=> $vars['single']['year_event_count'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'month_event_count'\t\t=> $vars['single']['month_event_count'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'week_event_count'\t\t=> $vars['single']['week_event_count'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'day_event_count'\t\t=> $vars['single']['day_event_count'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'hour_event_count'\t\t=> $vars['single']['hour_event_count']\n\t\t\t\t\t\t\t\t\t\t\t\t\t), $entry_data[$id]);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t$hour_temp .= $this->swap_vars($vars, $output_data);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$hour_temp = str_replace($find, $hour_temp, $each_hour);\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$hour_temp = str_replace($find, $replace, $each_hour);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$vars = array();\n\t\t\t\t\t\t\t$total_events = $hour_count;\n\t\t\t\t\t\t\t$this->CDT->change_time($i, 0);\n\n\t\t\t\t\t\t\t$vars['date'] = array(\n\t\t\t\t\t\t\t\t'time'\t\t=> $this->CDT->datetime_array(),\n\t\t\t\t\t\t\t\t'date'\t\t=> $this->CDT->datetime_array()\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t$vars['single'] = array(\n\t\t\t\t\t\t\t\t'hour'\t\t\t\t=> $h,\n\t\t\t\t\t\t\t\t'minute'\t\t\t=> $minute,\n\t\t\t\t\t\t\t\t'time'\t\t\t\t=> $h.':'.$minute,\n\t\t\t\t\t\t\t\t'hour_event_total' \t=> $total_events\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t$hour_output .= $this->swap_vars($vars, $hour_temp);\n\n\t\t\t\t\t\t\t//parse day event counts\n\t\t\t\t\t\t\t$hour_output = $this->parse_count_hashes('hour_event_count', $hour_output);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$find = $hash_hour;\n\t\t\t\t\t\t$replace = $hour_output;\n\n\t\t\t\t\t\tif ($output_at == 'hour')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$output .= $replace;\n\t\t\t\t\t\t\t$replace = '';\n\n\t\t\t\t\t\t\t//ee()->TMPL->log_item('Calendar: Outputting hour data for '.$ymd);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Each day\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t//var_dump($this->CDT->ymd . ' OUTSIDE DAY');\n\n\t\t\t\t\tif ($each_day != '')\n\t\t\t\t\t{\n\t\t\t\t\t\t$prefix = $suffix = '';\n\n\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t// Prep day variables\n\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\tif ($all_day_output != '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$replace = $all_day_output . $replace;\n\t\t\t\t\t\t\t$all_day_output = '';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//var_dump($this->CDT->ymd . ' DAY');\n\n\t\t\t\t\t\t$day_output = str_replace($find, $replace, $each_day);\n\n\t\t\t\t\t\t$next_CDT = $this->CDT->add_day(1);\n\t\t\t\t\t\t$prev_CDT = $this->CDT->add_day(-2);\n\t\t\t\t\t\t$this->CDT->reset();\n\n\t\t\t\t\t\t//var_dump($this->CDT->ymd . ' DAY 2');\n\n\t\t\t\t\t\t$vars = array();\n\n\t\t\t\t\t\t$vars['conditional'] = array(\n\t\t\t\t\t\t\t'day_is_today'\t\t\t=> ($today_ymd == $ymd) ? TRUE : FALSE,\n\t\t\t\t\t\t\t'day_is_weekend'\t\t=> ($this->CDT->day_of_week == 0 OR\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->CDT->day_of_week == 6) ? TRUE : FALSE,\n\t\t\t\t\t\t\t'day_is_weekday'\t\t=> ($this->CDT->day_of_week == 0 OR\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->CDT->day_of_week == 6) ? FALSE : TRUE,\n\t\t\t\t\t\t\t'day_in_current_month'\t=> ($this->CDT->month == $current_period_start['month']) ? TRUE : FALSE,\n\t\t\t\t\t\t\t'day_in_previous_month'\t=> ($this->CDT->month < $current_period_start['month'] OR\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->CDT->year < $current_period_start['year']) ? TRUE : FALSE,\n\t\t\t\t\t\t\t'day_in_next_month'\t\t=> ($this->CDT->month > $current_period_start['month'] OR\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->CDT->year > $current_period_start['year']) ? TRUE : FALSE\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t$vars['single'] = array(\n\t\t\t\t\t\t\t'day'\t\t\t\t\t=> $d,\n\t\t\t\t\t\t\t'prev_day'\t\t\t\t=> $prev_CDT['day'],\n\t\t\t\t\t\t\t'next_day'\t\t\t\t=> $next_CDT['day'],\n\t\t\t\t\t\t\t'day_event_total'\t\t=> $day_event_total,\n\t\t\t\t\t\t\t'all_day_event_total'\t=> $all_day_event_total\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t$vars['date'] = array(\n\t\t\t\t\t\t\t'day' \t\t=> $this->CDT->datetime_array(),\n\t\t\t\t\t\t\t'date'\t\t=> $this->CDT->datetime_array(),\n\t\t\t\t\t\t\t'prev_day' \t=> $prev_CDT,\n\t\t\t\t\t\t\t'next_day'\t=> $next_CDT\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t$day_output = $this->parse_count_hashes('day_event_count', $this->swap_vars($vars, $day_output));\n\n\n\t\t\t\t\t\t$find = $hash_day;\n\t\t\t\t\t\t$replace = $prefix.$day_output.$suffix;\n\n\t\t\t\t\t\tif ($output_at == 'day')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$output .= $replace;\n\t\t\t\t\t\t\t$replace = '';\n//ee()->TMPL->log_item('Calendar: Outputting day data for '.$ymd);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$this->CDT->reset();\n\n\t\t\t\t\t\t//var_dump($this->CDT->ymd . ' DAY 3');\n\t\t\t\t\t}\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Each week\n\t\t\t\t\t// -------------------------------------\n\n//var_dump($this->CDT->ymd . ' OUTSIDE WEEK');\n\n\t\t\t\t\tif ($each_week != '')\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($all_day_output != '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$replace = $all_day_output . $replace;\n\t\t\t\t\t\t\t$all_day_output = '';\n\t\t\t\t\t\t\tif ($each_day == '')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$all_day = array();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ($w != $next_w OR\n\t\t\t\t\t\t\t($each_month != '' AND\n\t\t\t\t\t\t\t\t(($m != $next_m OR $last_day === TRUE) AND\n\t\t\t\t\t\t\t\t\t($ymd >= $current_period_start['ymd'] AND\n\t\t\t\t\t\t\t\t\t\t(\t($last_day === TRUE AND $ymd == $current_period_end['ymd']) OR\n\t\t\t\t\t\t\t\t\t\t($ymd != $current_period_end['ymd']))))) OR\n\t\t\t\t\t\t\t$last_day === TRUE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//var_dump($this->CDT->ymd . ' WEEK');\n\n\t\t\t\t\t\t\t$week_temp .= $replace;\n\t\t\t\t\t\t\t$week_output = str_replace($find, $week_temp, $each_week);\n\n\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t// Prep week variables\n\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t$offset = ($this->CDT->day_of_week > $this->first_day_of_week) ?\n\t\t\t\t\t\t\t\t\t\t$this->CDT->day_of_week - $this->first_day_of_week :\n\t\t\t\t\t\t\t\t\t\t7 - ($this->first_day_of_week - $this->CDT->day_of_week);\n\n\t\t\t\t\t\t\t$this->CDT->add_day(-$offset);\n\t\t\t\t\t\t\t$this->CDT->set_default($this->CDT->datetime_array());\n\t\t\t\t\t\t\t$next_CDT = $this->CDT->add_day(7);\n\t\t\t\t\t\t\t$prev_CDT = $this->CDT->add_day(-14);\n\t\t\t\t\t\t\t$this->CDT->reset();\n\n\t\t\t\t\t\t\t//var_dump($this->CDT->ymd . ' WEEK 2');\n\n\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t// Calculate the number of events this week\n\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t$week_event_total \t= 0;\n\n\t\t\t\t\t\t\t//$week_count_id\t\t= 'week_event_total_' . uniqid();\n\n\t\t\t\t\t\t\tif (strpos($each_week, 'week_event_total') !== FALSE)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$low\t= $this->CDT->year .\n\t\t\t\t\t\t\t\t\t\t\tstr_pad($this->CDT->month, 2, '0', STR_PAD_LEFT) .\n\t\t\t\t\t\t\t\t\t\t\tstr_pad($this->CDT->day, 2, '0', STR_PAD_LEFT);\n\n\t\t\t\t\t\t\t\t$this->CDT->add_day(6);\n\n\t\t\t\t\t\t\t\t$high\t= $this->CDT->year .\n\t\t\t\t\t\t\t\t\t\t\tstr_pad($this->CDT->month, 2, '0', STR_PAD_LEFT) .\n\t\t\t\t\t\t\t\t\t\t\tstr_pad($this->CDT->day, 2, '0', STR_PAD_LEFT);\n\n\t\t\t\t\t\t\t\t$this->CDT->reset();\n\n\t\t\t\t\t\t\t\tforeach ($event_array as $k => $v)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ($k < $low OR $k > $high)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t$week_event_total += $this->count_events($k, $event_array, $all_day, 'week', $events);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$vars = array();\n\n\t\t\t\t\t\t\t$vars['single'] = array(\n\t\t\t\t\t\t\t\t'week'\t\t\t\t=> $w,\n\t\t\t\t\t\t\t\t'prev_week'\t\t\t=> $prev_CDT['week_number'],\n\t\t\t\t\t\t\t\t'next_week'\t\t\t=> $next_CDT['week_number'],\n\t\t\t\t\t\t\t\t'week_event_total' \t=> $week_event_total\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t$vars['date'] = array(\n\t\t\t\t\t\t\t\t'week' \t\t \t\t=> $this->CDT->datetime_array(),\n\t\t\t\t\t\t\t\t'date' \t\t \t\t=> $this->CDT->datetime_array(),\n\t\t\t\t\t\t\t\t'prev_week' \t\t=> $prev_CDT,\n\t\t\t\t\t\t\t\t'next_week'\t \t\t=> $next_CDT\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t$week_output = $this->parse_count_hashes('week_event_count', $this->swap_vars($vars, $week_output));\n\n\t\t\t\t\t\t\t$find = $hash_week;\n\t\t\t\t\t\t\t$replace = $week_output;\n\t\t\t\t\t\t\t$week_temp = '';\n\n\t\t\t\t\t\t\tif ($output_at == 'week')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$output .= $replace;\n\t\t\t\t\t\t\t\t$replace = '';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$this->CDT->reset();\n\t\t\t\t\t\t\t$week_event_count = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif ($end['day'] == $d AND\n\t\t\t\t\t\t\t\t$end['month'] == $m AND\n\t\t\t\t\t\t\t\t$d == $this->CDT->days_in_month($m, $y) AND\n\t\t\t\t\t\t\t\t$this->P->value('pad_short_weeks') === TRUE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$week_temp .= $replace;\n\t\t\t\t\t\t\t$week_output = str_replace($find, $week_temp, $each_week);\n\n\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t// Prep week variables\n\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t$this->CDT->add_day(-6);\n\t\t\t\t\t\t\t$next_CDT = $this->CDT->add_day(7);\n\t\t\t\t\t\t\t$prev_CDT = $this->CDT->add_day(-14);\n\t\t\t\t\t\t\t$this->CDT->reset();\n\n\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t// Calculate the number of events this week\n\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t$week_event_total = 0;\n\n\t\t\t\t\t\t\tif (strpos($each_week, 'week_event_total') !== FALSE)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$low\t= $this->CDT->year .\n\t\t\t\t\t\t\t\t\t\t\tstr_pad($this->CDT->month, 2, '0', STR_PAD_LEFT) .\n\t\t\t\t\t\t\t\t\t\t\tstr_pad($this->CDT->day, 2, '0', STR_PAD_LEFT);\n\n\t\t\t\t\t\t\t\t$this->CDT->add_day(6);\n\n\t\t\t\t\t\t\t\t$high\t= $this->CDT->year .\n\t\t\t\t\t\t\t\t\t\t\tstr_pad($this->CDT->month, 2, '0', STR_PAD_LEFT) .\n\t\t\t\t\t\t\t\t\t\t\tstr_pad($this->CDT->day, 2, '0', STR_PAD_LEFT);\n\n\t\t\t\t\t\t\t\t$this->CDT->reset();\n\n\t\t\t\t\t\t\t\tforeach ($event_array as $k => $v)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ($k < $low OR $k > $high)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t$week_event_total += $this->count_events($k, $event_array, $all_day, 'week', $events);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$vars = array();\n\n\t\t\t\t\t\t\t$vars['single'] = array(\n\t\t\t\t\t\t\t\t'week'\t\t\t\t=> $w,\n\t\t\t\t\t\t\t\t'prev_week'\t\t\t=> $prev_CDT['week_number'],\n\t\t\t\t\t\t\t\t'next_week'\t\t\t=> $next_CDT['week_number'],\n\t\t\t\t\t\t\t\t'week_event_total' \t=> $week_event_total\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t$vars['date'] = array(\n\t\t\t\t\t\t\t\t'week' \t\t\t\t=> $this->CDT->datetime_array(),\n\t\t\t\t\t\t\t\t'date'\t\t\t\t=> $this->CDT->datetime_array(),\n\t\t\t\t\t\t\t\t'prev_week' \t\t=> $prev_CDT,\n\t\t\t\t\t\t\t\t'next_week'\t\t\t=> $next_CDT\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t$week_output = $this->parse_count_hashes('week_event_count', $this->swap_vars($vars, $week_output));\n\n\t\t\t\t\t\t\t$find \t\t= $hash_week;\n\t\t\t\t\t\t\t$replace \t= $week_output;\n\t\t\t\t\t\t\t$week_temp \t= '';\n\n\t\t\t\t\t\t\tif ($output_at == 'week')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$output .= $replace;\n\t\t\t\t\t\t\t\t$replace = '';\n//ee()->TMPL->log_item('Calendar: Outputting week data for '.$ymd);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$this->CDT->reset();\n\t\t\t\t\t\t\t$week_event_count = 0;\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$week_temp .= $replace;\n\t\t\t\t\t\t\t$replace = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Each month\n\t\t\t\t\t// -------------------------------------\n\n//var_dump($this->CDT->ymd . ' OUTSIDE MONTH');\n\n\t\t\t\t\tif ($each_month != '')\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($all_day_output != '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$replace = $all_day_output . $replace;\n\t\t\t\t\t\t\t$all_day_output = '';\n\t\t\t\t\t\t\tif ($each_day == '')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$all_day = array();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (($m != $next_m OR $last_day === TRUE) AND\n\t\t\t\t\t\t\t(\t$ymd >= $current_period_start['ymd'] AND\n\t\t\t\t\t\t\t\t(\t($last_day === TRUE AND $ymd == $current_period_end['ymd']) OR\n\t\t\t\t\t\t\t\t\t($ymd != $current_period_end['ymd'])\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t$month_temp .= $replace;\n\t\t\t\t\t\t\t$month_output = str_replace($find, $month_temp, $each_month);\n\n\t\t\t\t\t\t\t//--------------------------------------------\n\t\t\t\t\t\t\t//\treset and add month because\n\t\t\t\t\t\t\t//\tthis gets 'off' some places\n\t\t\t\t\t\t\t//--------------------------------------------\n\t\t\t\t\t\t\t$this->CDT->set_default($current_period_start);\n\t\t\t\t\t\t\t$this->CDT->reset();\n\n\t\t\t\t\t\t\t//first month is correct\n\t\t\t\t\t\t\tif ($month_tick > 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->CDT->add_month($month_tick);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$month_tick++;\n\n\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t// Prep month variables\n\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t//add a month\n\t\t\t\t\t\t\t$next_CDT = $this->CDT->add_month();\n\n\t\t\t\t\t\t\t//subtract 2\n\t\t\t\t\t\t\t$prev_CDT = $this->CDT->add_month(-2);\n\n\t\t\t\t\t\t\t//add 1, now we are back where we started!\n\t\t\t\t\t\t\t$this->CDT->add_month();\n\t\t\t\t\t\t\t$this->CDT->change_date($this->CDT->year, $this->CDT->month, 1);\n\n\t\t\t\t\t\t\t$vars = array();\n\n\t\t\t\t\t\t\t//var_dump($this->CDT->ymd . ' MONTH 2');\n\n\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t// Calculate the number of events this month\n\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t$month_event_total = 0;\n\n\t\t\t\t\t\t\tif (strpos($each_month, 'month_event_total') !== FALSE)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$low\t= $this->CDT->year.str_pad($this->CDT->month, 2, '0', STR_PAD_LEFT).'01';\n\t\t\t\t\t\t\t\t$high\t= $this->CDT->year.str_pad($this->CDT->month, 2, '0', STR_PAD_LEFT).$this->CDT->days_in_month();\n\n\t\t\t\t\t\t\t\tforeach ($event_array as $k => $v)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ($k < $low OR $k > $high)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t$month_event_total += $this->count_events($k, $event_array, $all_day, 'month', $events);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t//$vars['conditional'] = array( 'day_in_current_month' => TRUE );\n\t\t\t\t\t\t\t$vars['single'] = array(\n\t\t\t\t\t\t\t\t'month'\t\t\t\t=> $m,\n\t\t\t\t\t\t\t\t'prev_month'\t\t=> $prev_CDT['month'],\n\t\t\t\t\t\t\t\t'next_month'\t\t=> $next_CDT['month'],\n\t\t\t\t\t\t\t\t'month_event_total' => $month_event_total\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t$vars['date'] = array(\n\t\t\t\t\t\t\t\t'month' \t\t\t=> $this->CDT->datetime_array(),\n\t\t\t\t\t\t\t\t'date'\t\t\t\t=> $this->CDT->datetime_array(),\n\t\t\t\t\t\t\t\t'prev_month' \t\t=> $prev_CDT,\n\t\t\t\t\t\t\t\t'next_month'\t\t=> $next_CDT\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t$month_output \t= $this->parse_count_hashes(\n\t\t\t\t\t\t\t\t'month_event_count',\n\t\t\t\t\t\t\t\t$this->swap_vars($vars, $month_output)\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t$replace \t\t= $month_output;\n\n\t\t\t\t\t\t\t$find = $hash_month;\n\t\t\t\t\t\t\t$month_temp = '';\n\n\t\t\t\t\t\t\tif ($output_at == 'month')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$output .= $replace;\n\t\t\t\t\t\t\t\t$replace = '';\n//ee()->TMPL->log_item('Calendar: Outputting month data for '.$ymd);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$this->CDT->reset();\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$month_temp .= $replace;\n\t\t\t\t\t\t\t$replace = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Each year\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tif ($each_year != '')\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($all_day_output != '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$replace = $all_day_output . $replace;\n\t\t\t\t\t\t\t$all_day_output = '';\n\t\t\t\t\t\t\tif ($each_day == '')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$all_day = array();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ($y != $next_y OR $last_day === TRUE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//if ($last_day !== TRUE)\n\t\t\t\t\t\t\tif ($last_day == TRUE)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$year_temp .= $replace;\n\n\t\t\t\t\t\t\t\t$year_output = str_replace($find, $year_temp, $each_year);\n\n\t\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t\t// Calculate the number of events this year\n\t\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t\t$year_event_total = 0;\n\n\t\t\t\t\t\t\t\tif (strpos(ee()->TMPL->tagdata, 'year_event_total') !== FALSE)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$low\t= $this->CDT->year.'0101';\n\t\t\t\t\t\t\t\t\t$high\t= $this->CDT->year.'1231';\n\t\t\t\t\t\t\t\t\tforeach ($event_array as $k => $v)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif ($k < $low OR $k > $high)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t$year_event_total += $this->count_events($k, $event_array, array(), 'year', $events);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t\t// Prep year variables\n\t\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t\t$this->CDT->set_default($current_period_start);\n\t\t\t\t\t\t\t\t$this->CDT->reset();\n\t\t\t\t\t\t\t\tif ($year_tick > 1)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$this->CDT->add_year($year_tick);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$year_tick++;\n\n\t\t\t\t\t\t\t\t$next_CDT = $this->CDT->add_year(1);\n\t\t\t\t\t\t\t\t$prev_CDT = $this->CDT->add_year(-2);\n\t\t\t\t\t\t\t\t$this->CDT->reset();\n\n\t\t\t\t\t\t\t\t$vars = array();\n\n\t\t\t\t\t\t\t\t$vars['conditional']\t\t= array(\n\t\t\t\t\t\t\t\t\t'year_is_leap_year'\t=> $this->CDT->is_leap_year()\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t$vars['single']\t\t\t\t= array(\n\t\t\t\t\t\t\t\t\t'year'\t\t\t\t=> $y,\n\t\t\t\t\t\t\t\t\t'prev_year'\t\t\t=> $prev_CDT['year'],\n\t\t\t\t\t\t\t\t\t'next_year'\t\t\t=> $next_CDT['year'],\n\t\t\t\t\t\t\t\t\t'year_event_total'\t=> $year_event_total\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t$vars['date']\t\t\t\t= array(\n\t\t\t\t\t\t\t\t\t'year' \t\t\t\t=> $this->CDT->datetime_array(),\n\t\t\t\t\t\t\t\t\t'date'\t\t\t\t=> $this->CDT->datetime_array(),\n\t\t\t\t\t\t\t\t\t'prev_year' \t\t=> $prev_CDT,\n\t\t\t\t\t\t\t\t\t'next_year' \t\t=> $next_CDT\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t$year_output = $this->parse_count_hashes(\n\t\t\t\t\t\t\t\t\t'year_event_count',\n\t\t\t\t\t\t\t\t\t$this->swap_vars($vars, $year_output)\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t$replace = $year_output;\n\n\t\t\t\t\t\t\t\t$this->CDT->reset();\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//$replace = '';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$find = $hash_year;\n\t\t\t\t\t\t\t$year_temp = '';\n\n\t\t\t\t\t\t\tif ($output_at == 'year')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$output .= $replace;\n\t\t\t\t\t\t\t\t$replace = '';\n//ee()->TMPL->log_item('Calendar: Outputting year data for '.$ymd);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$year_temp .= $replace;\n\t\t\t\t\t\t\t$replace = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t//parse day event counts\n\t\t\t\t\t//$output = $this->parse_count_hashes('day_event_count', $output);\n\n\t\t\t\t\t//parse week event counts\n\t\t\t\t\t//$output = $this->parse_count_hashes('week_event_count', $output);\n\t\t\t\t}\n\n\t\t\t\t//parse month event counts\n\t\t\t\t//$output = $this->parse_count_hashes('month_event_count', $output);\n\t\t\t}\n\n\t\t\t//parse year event count\n\t\t\t//$output = $this->parse_count_hashes('year_event_count', $output);\n\t\t}\n\n\t\t// -------------------------------------\n\t\t//\trunning all of these again in case\n\t\t//\tthe didn't fire. This means we\n\t\t//\tare in a straight event loop in\n\t\t//\tcal and it's probably errorsome :/\n\t\t// -------------------------------------\n\n\t\t//parse hour event counts\n\t\t$output = $this->parse_count_hashes('hour_event_count', $output);\n\n\t\t//parse day event counts\n\t\t$output = $this->parse_count_hashes('day_event_count', $output);\n\n\t\t//parse week event counts\n\t\t$output = $this->parse_count_hashes('week_event_count', $output);\n\n\t\t//parse month event counts\n\t\t$output = $this->parse_count_hashes('month_event_count', $output);\n\n\t\t//parse year event count\n\t\t$output = $this->parse_count_hashes('year_event_count', $output);\n\n\t\t//parse year event count\n\t\t$output = $this->parse_count_hashes('event_count', $output);\n\n\t\t$output = $this->swap_vars(array('single'=>array('event_total' => $event_count)), $output);\n\n\t\t$hash = 'hash_'.$output_at;\n\n\t\t$tagdata = isset($$hash) ? str_replace($$hash, $output, $tagdata) : $output;\n\n\t\t$tagdata = $this->parse_pagination($tagdata);\n\n\t\t//ee()->TMPL->log_item('Calendar: All done!');\n\n\t\t// -------------------------------------\n\t\t//\tsetting everything back thats not parsed\n\t\t//\tin case people were writing it in plain text\n\t\t// -------------------------------------\n\n\t\t//custom variables with the letters 'url' are borked in\n\t\t//EE 2.6. Bug reported, but this should fix.\n\t\t//https://support.ellislab.com/bugs/detail/19337\n\t\tif (version_compare($this->ee_version, '2.6.0', '>='))\n\t\t{\n\t\t\t$tagdata = str_replace(\n\t\t\t\tarray(\n\t\t\t\t\tLD . 'event_borked_title' . RD,\n\t\t\t\t\t'\"event_borked_title\"',\n\t\t\t\t\t\"'event_borked_title'\"\n\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\tLD . 'event_url_title' . RD,\n\t\t\t\t\t'\"event_url_title\"',\n\t\t\t\t\t\"'event_url_title'\"\n\t\t\t\t),\n\t\t\t\t$tagdata\n\t\t\t);\n\n\n\t\t\t$tagdata = str_replace(\n\t\t\t\tarray(\n\t\t\t\t\tLD . 'event_calendar_borked_title' . RD,\n\t\t\t\t\t'\"event_calendar_borked_title\"',\n\t\t\t\t\t\"'event_calendar_borked_title'\"\n\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\tLD . 'event_calendar_url_title' . RD,\n\t\t\t\t\t'\"event_calendar_url_title\"',\n\t\t\t\t\t\"'event_calendar_url_title'\"\n\t\t\t\t),\n\t\t\t\t$tagdata\n\t\t\t);\n\t\t}\n\n\t\t//--------------------------------------------\n\t\t//\tthis shouldn't ever be needed, but here we are\n\t\t//--------------------------------------------\n\n\t\tif (trim($tagdata) === '')\n\t\t{\n\t\t\treturn $this->no_results();\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Send 'em home\n\t\t// -------------------------------------\n\n\t\treturn $tagdata;\n\t}", "public function getCalendar() {\n\t\t$this->setDate();\n\t\t$this->getLinks();\n\t\t $this->di->logger->stamp(__CLASS__, __METHOD__, '');\n\n\n\t\t// Get new date array\n\t\t$newDate = getdate(mktime(0,0,0,$this->newMonth, 1, $this->newYear));\n\t\t// Calculate rest days in previous and next month\n\t\t$firstDay = $newDate['wday'];\n\t\t$firstDay = ($firstDay == 0) ? 7: $firstDay;\n\t\t$daysInMonth = cal_days_in_month ( CAL_GREGORIAN , $this->newMonth , $this->newYear );\n\t\tif($this->newMonth != 1){\n\t\t\t$daysInPrevMonth = cal_days_in_month ( CAL_GREGORIAN , $this->newMonth-1 , $this->newYear );\n\t\t}\n\t\telse if($this->newMonth == 1) {\n\t\t\t$daysInPrevMonth = cal_days_in_month ( CAL_GREGORIAN , 12 , $this->newYear-1 );\n\t\t}\n\n\t\t$lastDates = $daysInPrevMonth - $firstDay +1;\n\n\t\t// Start building table\n\t\t$table =\"<section class='calendar'><header>\" . $this->prevLink . \"<h3>\" . $newDate['month'] . \" - \" . $newDate['year'] . \"</h3>\" . $this->nextLink;\n\t\t$table .= \"</header><table><thead>\\n\";\n\t\t$table .= \"<th>Mon</th><th>Tue</th><th>Wed</th><th>Thu</th><th>Fri</th><th>Sat</th><th>Sun</th>\\n\";\n\t\t$table .= \"</thead>\\n\";\n\t\t$table .= \"<tr>\";\n\t\t\n\t\tfor ($a=1; $a < $firstDay ; $a++) { \n\t\t\t$lastDates++;\n\t\t\t$table .= \"<td class='lighter'>\" . $lastDates . \"</td>\";\n\t\t}\n\n\t\t$d = 0;\n\t\tfor ($b=0; $b < $daysInMonth ; $b++) { \n\t\t\t\n\t\t\t$d++;\n\t\t\t$DATE = date('N',mktime(0,0,0, $this->newMonth, $d, $this->newYear));\n\t\t\t\n\t\t\tif ($DATE == 1) {\n\t\t\t\t$table .= \"</tr>\\n<tr>\";\n\t\t\t}\n\n\t\t\tif (($this->newMonth == $this->currentMonth && $d == $this->currentDate && $this->newYear == $this->currentYear)) {\n\t\t\t\t$table .= \"<td><strong>\" . $d . \"</strong></td>\";\n\t\t\t}\n\t\t\telse if ($DATE == 7) {\n\t\t\t\t$table .= \"<td class='red'>\" . $d . \"</td>\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$table .= \"<td>\" . $d . \"</td>\";\n\t\t\t}\n\t\t}\n\t\t\tif ($DATE != 7) {\n\t\t\t\t$nextMonthDays = 7 - $DATE;\n\t\t\t\tfor ($c=1; $c <= $nextMonthDays ; $c++) { \n\t\t\t\t\t$table .= \"<td class='lighter'>\" . $c . \"</td>\";\n\t\t\t}\n\t}\n\t\t$table .= \"</tr></table></section>\";\n\n\t\treturn $table;\n\t}", "public static function icalendar() {\r\n $ical = \"BEGIN:VCALENDAR\".PHP_EOL;\r\n $ical .= \"VERSION:2.0\".PHP_EOL;\r\n\r\n $show_personal_bak = Calendar_Events::$calsettings->show_personal;\r\n $show_course_bak = Calendar_Events::$calsettings->show_course;\r\n $show_deadline_bak = Calendar_Events::$calsettings->show_deadline;\r\n $show_admin_bak = Calendar_Events::$calsettings->show_admin;\r\n Calendar_Events::set_calendar_settings(1,1,1,1);\r\n Calendar_Events::get_calendar_settings();\r\n $eventlist = Calendar_Events::get_calendar_events();\r\n Calendar_Events::set_calendar_settings($show_personal_bak,$show_course_bak,$show_deadline_bak,$show_admin_bak);\r\n Calendar_Events::get_calendar_settings();\r\n\r\n $events = array();\r\n foreach ($eventlist as $event) {\r\n $ical .= \"BEGIN:VEVENT\".PHP_EOL;\r\n $startdatetime = new DateTime($event->start);\r\n $ical .= \"DTSTART:\".$startdatetime->format(\"Ymd\\THis\").PHP_EOL;\r\n $duration = new DateTime($event->duration);\r\n $ical .= \"DURATION:\".$duration->format(\"\\P\\TH\\Hi\\Ms\\S\").PHP_EOL;\r\n $ical .= \"SUMMARY:[\".strtoupper($event->event_group).\"] \".$event->title.PHP_EOL;\r\n $ical .= \"DESCRIPTION:\".canonicalize_whitespace(strip_tags($event->content)).PHP_EOL;\r\n if ($event->event_group == 'deadline')\r\n {\r\n $ical .= \"BEGIN:VALARM\".PHP_EOL;\r\n $ical .= \"TRIGGER:-PT24H\".PHP_EOL;\r\n $ical .= \"DURATION:PT10H\".PHP_EOL;\r\n $ical .= \"ACTION:DISPLAY\".PHP_EOL;\r\n $ical .= \"DESCRIPTION:DEADLINE REMINDER for \".canonicalize_whitespace(strip_tags($event->title)).PHP_EOL;\r\n $ical .= \"END:VALARM\".PHP_EOL;\r\n }\r\n $ical .= \"END:VEVENT\".PHP_EOL;\r\n }\r\n $ical .= \"END:VCALENDAR\".PHP_EOL;\r\n return $ical;\r\n }", "private function makeArrayIterator()\n\t{\n\t\t$this->weekDayNum = $this->firstDayOfTheMonth+1;\t\t\n\t\tfor($this->dayOfMonth; $this->dayOfMonth <= $this->daysInMonth; $this->dayOfMonth++) {\n\t\t\t// Set the default style\n\t\t\t$this->outArray['days'][$this->dayOfMonth]['style'] = 'normalDay';\n\t\t\t\n\t\t\t// Set the style to a weekend day style\n\t\t\tif(($this->weekDayNum == 8)||($this->weekDayNum == 7)) {\n\t\t\t\t$this->outArray['days'][$this->dayOfMonth]['style'] = 'weekendDay';\n\t\t\t}\n\t\t\t\n\t\t\t// Set the style to a current day style\n\t\t\tif($this->curDay == $this->dayOfMonth) {\n\t\t\t\t$this->outArray['days'][$this->dayOfMonth]['style'] = 'currentDay';\n\t\t\t}\n\t\t\t\n\t\t\t// If the current day is Sunday, add a new row\n\t\t\tif($this->weekDayNum == 8) {\n\t\t\t\t$this->weekDayNum = 1;\n\t\t\t} \n\t\t\t\n\t\t\t$this->outArray['days'][$this->dayOfMonth]['dayname'] = $this->daysArray[$this->weekDayNum - 1];\n\t\t\t$this->outArray['days'][$this->dayOfMonth]['weekdaynumber'] = $this->weekDayNum;\n\t\t\t\t\t\t\t\t\t\n\t\t\t// Draw days\n\t\t\tif($this->makeDayEventListArray()) {\n\t\t\t\t$this->outArray['days'][$this->dayOfMonth]['events'] = $this->makeDayEventListArray();\n\t\t\t}\n\t\t\t\n\t\t\t$this->outArray['days'][$this->dayOfMonth]['datestamp'] = $this->curYear.'-'.$this->curMonth.'-'.$this->dayOfMonth;\n\t\t\t\n\t\t\t$this->weekDayNum++;\n\t\t}\n\t}", "function output_calendar() // Generating calendar HTML content\r\n\t{\r\n\t\t# Apparently, it's not possible to dereference $this->callback()\r\n\t\t$cb = $this->callback;\r\n\r\n\t\t# Preliminary calculations\r\n\t\t$t = getdate(strtotime($this->date));\r\n\t\t$today = $t[\"mday\"];\r\n\t\t$year = $t[\"year\"];\r\n\t\t$month = $t[\"mon\"];\r\n\t\t# Get first day of the month (monday = 0)\r\n\t\t$first_wday = ((int) date(\"w\", mktime(0, 0, 0, $month, 1, $year))+6)%7;\r\n\t\t# Last day of the month\r\n\t\t$last_mday = (int) date(\"d\", mktime(0, 0, 0, $month+1, 0, $year));\r\n\r\n\t\t# Anchor\r\n\t\t//$this->content[].=\"<a name=\\\"calendar\\\">\";\r\n\r\n\t\t# Table\r\n\t\t$this->content[].=\"<table width=\\\"100%\\\" align=\\\"center\\\" cellpadding=\\\"0\\\" cellspacing=\\\"2\\\" class=\\\"calendar\\\">\\n\";\r\n\r\n\t\t# Table head\r\n\t\t$this->content[].=\"<tr><td colspan=\\\"7\\\" class=\\\"calendar_header\\\">{$this->month_name[$month - 1]}&nbsp;&nbsp;&nbsp;{$t['year']}</td></tr>\\n<tr>\\n\";\r\n\t\tfor ($j = 0;$j <= 6;$j++) {\r\n\t\t\t$this->content[].=\"<th class=\\\"calendar_title\\\">\";\r\n\t\t\t$this->content[].=\"{$this->day_name[$j]}\";\r\n\t\t\t$this->content[].=\"</th>\\n\";\r\n\t\t}\r\n\t\t$this->content[].=\"</tr>\\n\";\r\n\r\n\t\t// Day row\r\n\t\t// A month is displayed on 6 rows\r\n\t\t// except for a 28 days month starting on Monday\r\n\t\tif (($last_mday == 28) and ($first_wday == 0))\r\n\t\t$jmax = 27;\r\n\t\telse\r\n\t\t$jmax = 41;\r\n\r\n\t\tfor ($j = 0;$j <= $jmax;$j++) {\r\n\t\t\t# Start new row on Monday\r\n\t\t\tif ($j % 7 == 0)\r\n\t\t\t$this->content[].=\"<tr>\\n\";\r\n\r\n\t\t\t// Title colour for current day and checking week end days\r\n\r\n\t\t\tif (($j == $today+$first_wday-1) and ($j % 7 == 6)) // if today and weekend day\r\n\t\t\t$this->content[].=\"<td class=\\\"calendar_title_we\\\">\";\r\n\r\n\t\t\tif (($j % 7 == 6) and ($j != $today+$first_wday-1)) // if weekend day and not today\r\n\t\t\t$this->content[].=\"<td class=\\\"calendar_day_we\\\">\";\r\n\r\n\r\n\t\t\tif (($j == $today+$first_wday-1) and ($j % 7 != 6)) // if today and not weekend day\r\n\t\t\t$this->content[].=\"<td class=\\\"calendar_title\\\">\";\r\n\r\n\t\t\tif (($j % 7 != 6) and ($j != $today+$first_wday-1)) // if not today and not weekend day\r\n\t\t\t$this->content[].=\"<td class=\\\"calendar_day\\\">\";\r\n\r\n\t\t\tif (($j<$first_wday) or ($j>=$last_mday + $first_wday)) {\r\n\r\n\t\t\t\t# Empty boxes\r\n\t\t\t\t$this->content[].=\"&nbsp;\";\r\n\t\t\t} else {\r\n\t\t\t\tif (isset($cb))\r\n\t\t\t\techo $cb(mktime(0, 0, 0, $month, $j - $first_wday + 1, $year));\r\n\t\t\t\t$this->content[].=date($this->date_format, mktime(0, 0, 0, $month, $j - $first_wday + 1, $year));\r\n\t\t\t\tif (isset($cb))\r\n\t\t\t\t$this->content[].=\"</a>\\n\";\r\n\t\t\t}\r\n\t\t\t$this->content[].=\"</td>\\n\";\r\n\r\n\t\t\t# End of row on Sunday\r\n\t\t\tif ($j % 7 == 6)\r\n\t\t\t$this->content[].=\"</tr>\\n\";\r\n\t\t}\r\n\t\t$this->content[].=\"</table>\\n\";\r\n\t}", "function draw_calendar($month,$year,$activityStartDateArray = array()){\r\n\r\n\t/* draw table */\r\n\t$calendar = '<table cellpadding=\"0\" cellspacing=\"0\" class=\"calendar\">';\r\n\r\n\t/* table headings */\r\n\t$headings = array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');\r\n\t$calendar.= '<tr class=\"calendar-row\"><td class=\"calendar-day-head\">'.implode('</td><td class=\"calendar-day-head\">',$headings).'</td></tr>';\r\n\r\n\t/* days and weeks vars now ... */\r\n\t$running_day = date('w',mktime(0,0,0,$month,1,$year));\r\n\t$days_in_month = date('t',mktime(0,0,0,$month,1,$year));\r\n\t$days_in_this_week = 1;\r\n\t$day_counter = 0;\r\n\t$dates_array = array();\r\n\r\n\t/* row for week one */\r\n\t$calendar.= '<tr class=\"calendar-row\">';\r\n\r\n\t/* print \"blank\" days until the first of the current week */\r\n\tfor($x = 0; $x < $running_day; $x++):\r\n\t\t$calendar.= '<td class=\"calendar-day-np\">&nbsp;</td>';\r\n\t\t$days_in_this_week++;\r\n\tendfor;\r\n\r\n\t/* keep going with days.... */\r\n\tfor($list_day = 1; $list_day <= $days_in_month; $list_day++):\r\n\t\t$calendar.= '<td class=\"calendar-day\"><div style=\"position:relative;height:100px;\">';\r\n\t\t\t/* add in the day number */\r\n\t\t\t$calendar.= '<div class=\"day-number\">'.$list_day.'</div>';\r\n\t\t\t\r\n\t\t\t//eventdate=startdate and enddate, depends which we talks about \r\n\r\n\t\t\t$startDate = $year.'-'.$month.'-'.$list_day;\r\n\t\t\t//$endDate = $year.'-'.$month.'-'.$list_day;\r\n\t\t\techo \"<br>the start date is\".$startDate;\r\n\t\t\t//something is wrong wit hteh startDate, the origin code has a while loop in the beginning, think why \r\n\t\t\t\r\n\t\t\tif(isset($activityStartDateArray[$startDate])) {\r\n\t\t\t\tforeach($activityStartDateArray[$startDate] as $activity) {\r\n\t\t\t\t\t$calendar.= '<div class=\"activity\">'.$activity['activityName'].'</div>';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\r\n\t\t\telse {\r\n\t\t\t\t$calendar.= str_repeat('<p>&nbsp;</p>',2);\r\n\t\t\t}\r\n\t\t$calendar.= '</div></td>';\r\n\t\tif($running_day == 6):\r\n\t\t\t$calendar.= '</tr>';\r\n\t\t\tif(($day_counter+1) != $days_in_month):\r\n\t\t\t\t$calendar.= '<tr class=\"calendar-row\">';\r\n\t\t\tendif;\r\n\t\t\t$running_day = -1;\r\n\t\t\t$days_in_this_week = 0;\r\n\t\tendif;\r\n\t\t$days_in_this_week++; $running_day++; $day_counter++;\r\n\tendfor;\r\n\t\r\n\t\r\n\t/* finish the rest of the days in the week */\r\n\tif($days_in_this_week < 8):\r\n\t\tfor($x = 1; $x <= (8 - $days_in_this_week); $x++):\r\n\t\t\t$calendar.= '<td class=\"calendar-day-np\">&nbsp;</td>';\r\n\t\tendfor;\r\n\tendif;\r\n\r\n\t/* final row */\r\n\t$calendar.= '</tr>';\r\n\t\r\n\r\n\t/* end the table */\r\n\t$calendar.= '</table>';\r\n\r\n\t/** DEBUG **/\r\n\t$calendar = str_replace('</td>','</td>'.\"\\n\",$calendar);\r\n\t$calendar = str_replace('</tr>','</tr>'.\"\\n\",$calendar);\r\n\t\r\n\t/* all done, return result */\r\n\treturn $calendar;\r\n}", "function DisplayCalendarOfEvents()\r\n\t{\r\n\t\tglobal $_SETTINGS;\r\n\t\techo \"<div id='calendar'></div>\";\t\r\n\t}", "function draw_calendar($month,$year,$events = array()){\n\t\t$dayofweek = array('<td class=\"calendar-header\">Sunday</td>',\n\t\t'<td class=\"calendar-header\">Monday</td>',\n\t\t'<td class=\"calendar-header\">Tuesday</td>',\n\t\t'<td class=\"calendar-header\">Wednesday</td>',\n\t\t'<td class=\"calendar-header\">Thursday</td>',\n\t\t'<td class=\"calendar-header\">Friday</td>',\n\t\t'<td class=\"calendar-header\">Saturday</td>');\n\t\t\n\t\t/* draw table\n\t\t\t- fill top row with array using implode */\n\t\t$calendar = '<table class=\"calendar\"><tr class=\"calendar-row\">'.implode($dayofweek).'</tr>';\n\t\t\n\t\t// mktime(hour,minute,second,month,day,year);\n\t\t// figures out the which day of the week 1st is based on provided $month and $year\n\t\t$startDay = date('w',mktime(0,0,0,$month,1,$year)); // return days of the week\n\t\t$days = cal_days_in_month(CAL_GREGORIAN,$month,$year);\n\t\t$daysFilled;\n\t\t$counter = 0;\n\t\n\t\t/* row 2 */\n\t\t$calendar.= '<tr class=\"calendar-row\">';\n\t\n\t\t/* print \"blank\" days until the first of the month */\n\t\tfor($i = 0; $i < $startDay; $i++){\n\t\t\t$calendar.= '<td class=\"calendar-empty\"> </td>';\n\t\t\t$daysFilled++;\n\t\t}\n\t\n\t\t/* for loop to add days */\n\t\tfor($i = 1; $i <= $days; $i++):\n\t\t\t$calendar.= '<td class=\"calendar-day\"><div style=\"position:relative;height:100px;\"><div class=\"date\">'.$i.'</div>';\n\t\t\t\n\t\t\tif ($i < 10){\n\t\t\t\t$i = \"0\".$i;\n\t\t\t}\n\t\t\t\n\t\t\t// input event into calendar\n\t\t\t$eventDay = $year.'-'.$month.'-'.$i;\n\t\t\t\tif(isset($events[$eventDay])) { // if there are events on $eventDay\n\t\t\t\t\tforeach($events[$eventDay] as $eventid) { // for each event, add to calendar\n\t\t\t\t\t\t$mysql = new mysql();\n\t\t\t\t\t\t$tripdetail = $mysql->get_specifictrip($eventid);\n\t\t\t\t\t\t$calendar.= '<div class=\"event\"';\n\t\t\t\t\t\tif($tripdetail[approval]==0){\n\t\t\t\t\t\t\t$calendar.=' style=\"color:#FF6666;\"';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif($tripdetail[approval]==-1){\n\t\t\t\t\t\t\t$calendar.=' style=\"color:#6666E0; text-decoration:line-through;\"';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$calendar.='><a style=\"text-decoration:none; color:inherit;\" href=\"?page=detail2&trip='.$tripdetail[eventid].'\"';\n\t\t\t\t\t\t$calendar.='>'.$tripdetail[destination].'</div>';\n\t\t\t\t\t}\n\t\t\t\t\t$calendar.='</td>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse {\n\t\t\t\t\t$calendar.= '<p> </p><p> </p></div></td>';\n\t\t\t\t}\n\n\t\t\tif($startDay == 6){ // if the month starts on Saturday, end current row\n\t\t\t\t$calendar.= '</tr>';\n\t\t\t\tif(($counter+1) != $days){ // if there are still days left to fill, new row\n\t\t\t\t\t$calendar.= '<tr class=\"calendar-row\">';\n\t\t\t\t}\n\t\t\t\t$startDay = -1;\n\t\t\t\t$daysFilled = 0;\n\t\t\t}\n\t\t\t$daysFilled++;\n\t\t\t$startDay++;\n\t\t\t$counter++;\n\t\tendfor;\n\t\n\t\t// finish filling in the rest of the days with blanks\n\t\tif($daysFilled < 8 && $daysFilled !=1):\n\t\t\tfor($x = 1; $x <= (8 - $daysFilled); $x++):\n\t\t\t\t$calendar.= '<td class=\"calendar-empty\"> </td>';\n\t\t\tendfor;\n\t\tendif;\n\t\n\t\t// end row, table\n\t\t$calendar.= '</tr></table>';\n\t\t\n\t\t\n\t\t// return HTML code for calendar\n\t\treturn $calendar;\n\t}", "Public static function displayCalender($array)\n {\n echo \"Sun Mon Tue Wed Thu Fri Sat\\n\";\n for ($i = 0; $i < 6; $i++) \n {\n for ($j = 0; $j < 7; $j++) \n {\n if ($array[$i][$j] == '-' || $array[$i][$j] > 31) \n {\n //replacing with spaces\n echo \" \";\n } \n else \n {\n if ($array[$i][$j] < 10) \n {\n //giving 5 space after single digit\n echo $array[$i][$j] . \" \";\n } \n else \n {\n //giving 4 space after two digit number\n echo $array[$i][$j] . \" \";\n }\n }\n }\n echo \"\\n\";\n }\n }", "public function buildCalendarList(){\n\t\t\n\t\t$first_day = $this->getFirstDay();\t\t\t\t\t\t//Determine what day of the week the month starts on\n\t\t$current_number_of_days = $this->getNumberOfDays();\t\t//Determine the number of days in the month\n\n\t\t$number_of_previous_days = $first_day;\t\t\t\t\t\t\t\t\t\t//Determine the number of days needed to complete the first week\n\t\t$prev_month_number_of_days = $this->getNumberOfDays($this->getMonth()-1); \t//Determine the number of days in the previous month\n\t\t\n\t\t$_SESSION['month'] = $this->getMonth();\n\t\t$_SESSION['year'] = $this->getYear();\n\t\t$_SESSION['view'] = 'list';\n\t\t\n\t\tob_start();?>\n <table border=\"0\" id=\"events_calendar\" class=\"calendar_list\">\n <?php echo $this->buildCalendarHead() ?>\n <tr>\n <td>\n <?php \n /*** CURRENT MONTH CELLS ***/\n $first_day = $this->getYear() . '-' . $this->getMonth() . '-01';\n $last_day = $this->getYear() . '-' . $this->getMonth() . '-' . $current_number_of_days;\n \n $object = $this->events_ob;\n $month_events = new $object();\n $month_events = $month_events->fetchAll(\"WHERE DATE(\" . $this->events_end_date_field . \") >= '\" . $first_day . \"' AND DATE(\" . $this->events_end_date_field . \") <= '\" . $last_day . \"'\", \"ORDER BY `\" . $this->events_end_date_field . \"` DESC\");\n \n if(count($month_events) > 0){\n for($day = 1; $day <= $current_number_of_days; $day++){\t\t//For each day in the current month\n $full_date = $this->getYear() . '-' . $this->getMonth() . '-' . $day;\n \n $events = $this->buildDayList($full_date);\t//get events for each day\n if(strlen(trim($events))){\n ?>\n <div class=\"day\">\n <?php echo $events; ?>\n </div>\n <?php\n }\n }\n }\n else{?>\n \t\t<h5><?php echo 'No events in ' . $this->getMonthName() . ' ' . $this->getYear();?></h5>\n <?php\n }\n ?> \n </td>\n </tr>\n </table>\n <?php\n return ob_get_clean();\n\t}", "function calendar()\n{\n /*\n $groups = getAllEvents();\n $fieldsToConvert = [\"name\", \"description\", \"context\", \"status\"];\n $groups = specialCharsConvertFromAnArray($groups, $fieldsToConvert);\n displaydebug($groups);\n */\n require_once \"view/calendar.php\";\n}", "private function makeDayEventListArray()\n\t{\n\t\t$outevents = array();\n\t\t$n = 0;\n\t\tforeach($this->eventItems as $item) {\n\t\t\tif($item['date'] == $this->curYear.'-'.$this->curMonth.'-'.$this->dayOfMonth) {\t\t\n\t\t\t\t$outevents[$n]['category'] = $item['cat'];\n\t\t\t\t\n\t\t\t\tif($item['stdurl']) {\n\t\t\t\t\t$outevents[$n]['url'] = $item['url'].'?id='.$item['id'];\n\t\t\t\t} else {\n\t\t\t\t\t$outevents[$n]['url'] = $item['url'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$outevents[$n]['summary'] = $item['text'];\n\t\t\t\t$outevents[$n]['description'] = $item['desc'];\n\t\t\t\t$outevents[$n]['categorycolor'] = (strlen($item['catcolor']) > 0 ? str_replace('#','',$item['catcolor']) : '#eeeeee');\n\t\t\t}\n\t\t\t$n++;\n\t\t}\n\t\t\n\t\tif(count($outevents)) {\n\t\t\treturn $outevents;\n\t\t}\n\t\treturn false;\n\t}", "Public function getEvents()\n\t{\n\t\t$result=$this->M_calendar->getEvents();\n\t\techo json_encode($result);\n\t}", "public function calendar($year_month = null) {\n\n if(!isset($year_month)) {\n /* Setting the data and creating the first and last day of a month */\n $start_date = date('Y-m-01');\n $end_date = date('Y-m-t');\n }\n else {\n /* Getting the data and creating the first and last day of a month */\n $start_date = date('Y-m-d', strtotime($year_month.'-01'));\n $end_date = date('Y-m-t', strtotime($year_month.'-01'));\n }\n\n /* Querying the database to get the events for all days of certain month of the year */\n $calendar = [];\n $activities = [];\n while($start_date <= $end_date) {\n\n //Temporalmente, pedido por Amparo, ¿Qué te dije?, igual y mañana se queja de que se ven los eventos sin aprobar :P\n /*\n $events = EventDCI::whereRaw('end_day >= ? and start_day <= ? and (dci_status = ? or dci_status = ?) and user_status = ?',\n array($start_date, $start_date, 'En Proceso', 'Aprobado', 'Activo'))\n ->orderBy('time')->get();\n */\n $events = EventDCI::whereRaw('end_day >= ? and start_day <= ?',\n array($start_date, $start_date))\n ->orderBy('time')->get();\n\n $activities['activities'] = $events->toArray();\n\n //ola k ase\n $activities['date'] = $start_date;\n\n array_push($calendar, $activities);\n $activities = [];\n\n $next_date = new DateTime($start_date);\n $next_date->add(new DateInterval('P1D'));\n $s_next_date = $next_date->format('Y-m-d');\n $start_date = explode(' ', $s_next_date)[0];\n }\n\n return json_encode($calendar);\n\n }", "public function mostrarCalendarioCumpleaños(){\n\t\t$item1 = \"fch_nacimiento\";\n\t\tif($_POST[\"start\"] > $_POST[\"end\"] && $_POST[\"start\"] == 12){\n\t\t\t$inicio = 1;\n\t\t\t$fin = $_POST[\"end\"];\n\t\t}else if($_POST[\"start\"] > $_POST[\"end\"] && $_POST[\"end\"] == 1){\n\t\t\t$inicio = $_POST[\"start\"];\n\t\t\t$fin = 12;\n\t\t}else{\n\t\t\t$inicio = $_POST[\"start\"];\n\t\t\t$fin = $_POST[\"end\"];\n\t\t}\n $valor1 = $inicio.'|'.$fin;\n $item2 = $valor2 = $item3 = $valor3 = null;\n $entrada = \"calendarioCumpleaños\";\n $cumpleaños = ControladorTrabajador::ctrMostrarTrabajador($item1,$valor1,$item2,$valor2,$item3,$valor3,$entrada);\n if(count($cumpleaños) > 0){\n\t $datosJson = '[';\n\t\t\t\t \tfor ($i=0; $i < count($cumpleaños) ; $i++) {\n\t\t\t\t \t\t$fechaNacimiento = dateFormatCumpleanios($cumpleaños[$i][\"fch_nacimiento\"]);\n\t\t\t\t \t\t$datosJson .= '{\n\t\t\t\t\t\t\t\"nombre\" : \"'.$cumpleaños[$i][\"dsc_nombres\"].\" \".$cumpleaños[$i][\"dsc_apellido_paterno\"].\" \".$cumpleaños[$i][\"dsc_apellido_materno\"].'\",\n\t\t\t\t\t\t\t\"fecha\" : \"'.$fechaNacimiento.'\",\n\t\t\t\t\t\t\t\"imagen\" : \"'.$cumpleaños[$i][\"imagen\"].'\",\n\t\t\t\t\t\t\t\"cargo\" : \"'.$cumpleaños[$i][\"dsc_cargo\"].'\"\n\t\t\t\t\t\t},';\n\t\t\t\t\t}\t\t\t \t\n\t\t\t\t\t$datosJson = substr($datosJson, 0, -1);\n\t\t\t\t$datosJson .= ']';\t\n\t\t}else{\n\t\t\t$datosJson = '[\n\t\t\t\t{}\n\t\t\t]';\n\t\t}\n\t\techo $datosJson;\t\n\t}", "public function getCalendarPage();", "function draw_calendar($month,$year,$cal,$available_list,$price_list){\n\n /* draw table */\n $calendar = '<table cellpadding=\"0\" cellspacing=\"0\" class=\"calendar\">';\n\n /* table headings */\n $headings = array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');\n $calendar.= '<tr class=\"calendar-row\"><td class=\"calendar-day-head\">'.implode('</td><td class=\"calendar-day-head\">',$headings).'</td></tr>';\n\n /* days and weeks vars now ... */\n $running_day = date('w',mktime(0,0,0,$month,1,$year));\n $days_in_month = date('t',mktime(0,0,0,$month,1,$year));\n $days_in_this_week = 1;\n $day_counter = 0;\n $dates_array = array();\n\n /* row for week one */\n $calendar.= '<tr class=\"calendar-row\">';\n\n /* print \"blank\" days until the first of the current week */\n for($x = 0; $x < $running_day; $x++):\n $calendar.= '<td class=\"calendar-day-np\"> </td>';\n $days_in_this_week++;\n endfor;\n\n /* keep going with days.... */\n for($list_day = 1; $list_day <= $days_in_month; $list_day++):\n // echo \" cal: \".($available_list[$list_day - 1] == 't').\"\\n\";\n if ($available_list[$list_day - 1] == 't')\n {\n $calendar.= '<td class=\"calendar-day\" bgcolor=\"#00FF00\">';\n } else {\n $calendar.= '<td class=\"calendar-day\" bgcolor=\"#FF0000\">';\n\n }\n \n\n /* add in the day number */\n $calendar.= '<div class=\"day-number\" ><font size=\"+3\">'.$list_day.\"</font> \".$price_list[$list_day-1].'</div>';\n\n /** QUERY THE DATABASE FOR AN ENTRY FOR THIS DAY !! IF MATCHES FOUND, PRINT THEM !! **/\n $calendar.= str_repeat('<p> </p>',2);\n \n $calendar.= '</td>';\n if($running_day == 6):\n $calendar.= '</tr>';\n if(($day_counter+1) != $days_in_month):\n $calendar.= '<tr class=\"calendar-row\">';\n endif;\n $running_day = -1;\n $days_in_this_week = 0;\n endif;\n $days_in_this_week++; $running_day++; $day_counter++;\n endfor;\n\n /* finish the rest of the days in the week */\n if($days_in_this_week < 8):\n for($x = 1; $x <= (8 - $days_in_this_week); $x++):\n $calendar.= '<td class=\"calendar-day-np\"> </td>';\n endfor;\n endif;\n\n /* final row */\n $calendar.= '</tr>';\n\n /* end the table */\n $calendar.= '</table>';\n \n /* all done, return result */\n return $calendar;\n }", "public function getOutput()\n\t{\n\t\tif( ! IPSLib::appIsInstalled( 'calendar' ) )\n\t\t{\n\t\t\treturn '';\n\t\t}\n\t\t\n\t\t/* Load language */\n\t\t$this->registry->class_localization->loadLanguageFile( array( 'public_calendar' ), 'calendar' );\n\n\t\t/* Load calendar library */\n\t\t$classToLoad = IPSLib::loadActionOverloader( IPSLib::getAppDir( 'calendar' ) .'/modules_public/calendar/view.php', 'public_calendar_calendar_view' );\n\t\t$cal = new $classToLoad();\n\t\t$cal->makeRegistryShortcuts( $this->registry );\n\t\t\n\t\tif( !$cal->initCalendar( true ) )\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\t/* Return calendar */\n\t\treturn \"<div id='hook_calendar' class='calendar_wrap'>\". $cal->getMiniCalendar( date('n'), date('Y') ) . '</div><br />';\n\t}", "function build_calendar($month,$year,$dateArray) {\r\n $daysOfWeek = array('S','M','T','W','T','F','S');\r\n\r\n // What is the first day of the month in question?\r\n $firstDayOfMonth = mktime(0,0,0,$month,1,$year);\r\n\r\n // How many days does this month contain?\r\n $numberDays = date('t',$firstDayOfMonth);\r\n\r\n // Retrieve some information about the first day of the\r\n // month in question.\r\n $dateComponents = getdate($firstDayOfMonth);\r\n\r\n // What is the name of the month in question?\r\n $monthName = $dateComponents['month'];\r\n\r\n // What is the index value (0-6) of the first day of the\r\n // month in question.\r\n $dayOfWeek = $dateComponents['wday'];\r\n\r\n // Create the table tag opener and day headers\r\n\r\n $calendar = \"<table class='table table-bordered'>\";\r\n $calendar .= \"<caption>$monthName $year</caption>\";\r\n $calendar .= \"<tr>\";\r\n\r\n // Create the calendar headers\r\n\r\n foreach($daysOfWeek as $day) {\r\n $calendar .= \"<th class='header'>$day</th>\";\r\n } \r\n\r\n // Create the rest of the calendar\r\n\r\n // Initiate the day counter, starting with the 1st.\r\n\r\n $currentDay = 1;\r\n\r\n $calendar .= \"</tr><tr>\";\r\n\r\n // The variable $dayOfWeek is used to\r\n // ensure that the calendar\r\n // display consists of exactly 7 columns.\r\n\r\n if ($dayOfWeek > 0) { \r\n $calendar .= \"<td colspan='$dayOfWeek'>&nbsp;</td>\"; \r\n }\r\n \r\n $month = str_pad($month, 2, \"0\", STR_PAD_LEFT);\r\n \r\n while ($currentDay <= $numberDays) {\r\n\r\n // Seventh column (Saturday) reached. Start a new row.\r\n\r\n if ($dayOfWeek == 7) {\r\n\r\n $dayOfWeek = 0;\r\n $calendar .= \"</tr><tr>\";\r\n\r\n }\r\n \r\n $currentDayRel = str_pad($currentDay, 2, \"0\", STR_PAD_LEFT);\r\n \r\n $date = \"$year-$month-$currentDayRel\";\r\n\t\tif($date == date('Y-m-d')){\r\n\t\t\t$calendar .= \"<td class='col-md-1 col-xs-1' rel='$date' bgcolor='#ADD8E6'>$currentDay<br/>\";\r\n\t\t}else{\r\n\t\t\t$calendar .= \"<td class='col-md-1 col-xs-1' rel='$date'>$currentDay<br/>\";\r\n\t\t}\r\n \r\n\t\t $sql = mysql_query(\"SELECT * FROM leavesys.leave_details WHERE date = '\".$date.\"'\");\r\n\t\t while($result = mysql_fetch_array($sql)){\r\n\t\t\t $sql2 = mysql_query(\"SELECT * FROM user WHERE id = '\".$result['applicant_id'].\"'\");\r\n\t\t\t $result2 = mysql_fetch_assoc($sql2);\r\n\t\t\t\tif($result['half'] == 1){\r\n\t\t\t\t\t$c_content = \" (am)\";\r\n\t\t\t\t}else if($result['half'] == 2){\r\n\t\t\t\t\t$c_content = \" (pm)\";\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$c_content = \"\";\r\n\t\t\t\t}\r\n\t\t\t\t$calendar .= $result2['country_code'].\" - \".$result2['name'].$c_content.\"<br/>\";\r\n\t\t }\r\n\t\t $sql1 = mysql_query(\"SELECT * FROM leavesys.holiday WHERE date = '\".$date.\"'\");\r\n\t\t while($result1 = mysql_fetch_array($sql1)){\r\n\t\t\t if($result1['country'] == \"al\"){\r\n\t\t\t\t $calendar .= \"<font color='blue;'>\".$result1['name'].\"</font><br/>\";\r\n\t\t\t }else{\r\n\t\t\t\t$calendar .= \"<font color='blue;'>\".$result1['name'].\" (\".$result1['country'].\")</font><br/>\";\r\n\t\t\t }\r\n\t\t }\r\n\t\t $calendar .= \"</td>\";\r\n\r\n // Increment counters\r\n \r\n $currentDay++;\r\n $dayOfWeek++;\r\n\r\n }\r\n \r\n \r\n\r\n // Complete the row of the last week in month, if necessary\r\n\r\n if ($dayOfWeek != 7) { \r\n \r\n $remainingDays = 7 - $dayOfWeek;\r\n $calendar .= \"<td colspan='$remainingDays'>&nbsp;</td>\"; \r\n\r\n }\r\n \r\n $calendar .= \"</tr>\";\r\n\r\n $calendar .= \"</table>\";\r\n\r\n return $calendar;\r\n\r\n}", "public static function initialize_calendar(){\n \n $event_array[] = array();\n $schedules = \\App\\Event::get();\n if(!empty($schedules)){\n foreach($schedules as $schedule){\n $event_array[] = array(\n 'id' => uniqid(),\n 'title' => $schedule->description,\n 'start' => date('Y-m-d', strtotime($schedule->event_date)),\n 'end' => date('Y-m-d', strtotime($schedule->event_date)),\n 'color' => \"lightblue\",\n \"textEscape\"=> 'false' ,\n 'textColor' => 'black',\n );\n }\n return $get_schedule = json_encode($event_array);\n }\n }", "public function dayList()\n\t{\n\t\techo json_encode($this->sched_day->fetchData());\n\t}", "function build_calendar($month,$year,$dateArray) {\n $daysOfWeek = array('S','M','T','W','T','F','S');\n\n // What is the first day of the month in question?\n $firstDayOfMonth = mktime(0,0,0,$month,1,$year);\n\n // How many days does this month contain?\n $numberDays = date('t',$firstDayOfMonth);\n\n // Retrieve some information about the first day of the\n // month in question.\n $dateComponents = getdate($firstDayOfMonth);\n\n // What is the name of the month in question?\n $monthName = $dateComponents['month'];\n\n // What is the index value (0-6) of the first day of the\n // month in question.\n $dayOfWeek = $dateComponents['wday'];\n\n // Create the table tag opener and day headers\n\n $calendar = \"<table class='calendar'>\";\n $calendar .= \"<caption>$monthName $year</caption>\";\n $calendar .= \"<tr>\";\n\n // Create the calendar headers\n\n foreach($daysOfWeek as $day) {\n $calendar .= \"<th class='header'>$day</th>\";\n }\n\n // Create the rest of the calendar\n\n // Initiate the day counter, starting with the 1st.\n\n $currentDay = 1;\n\n $calendar .= \"</tr><tr>\";\n\n // The variable $dayOfWeek is used to\n // ensure that the calendar\n // display consists of exactly 7 columns.\n\n if ($dayOfWeek > 0) {\n $calendar .= \"<td colspan='$dayOfWeek'>&nbsp;</td>\";\n }\n\n $month = str_pad($month, 2, \"0\", STR_PAD_LEFT);\n\n while ($currentDay <= $numberDays) {\n\n // Seventh column (Saturday) reached. Start a new row.\n\n if ($dayOfWeek == 7) {\n\n $dayOfWeek = 0;\n $calendar .= \"</tr><tr>\";\n\n }\n\n $currentDayRel = str_pad($currentDay, 2, \"0\", STR_PAD_LEFT);\n\n $date = \"$year-$month-$currentDayRel\";\n\n $calendar .= \"<td class='day' rel='$date'>$currentDay</td>\";\n\n // Increment counters\n\n $currentDay++;\n $dayOfWeek++;\n\n }\n\n\n\n // Complete the row of the last week in month, if necessary\n\n if ($dayOfWeek != 7) {\n\n $remainingDays = 7 - $dayOfWeek;\n $calendar .= \"<td colspan='$remainingDays'>&nbsp;</td>\";\n\n }\n\n $calendar .= \"</tr>\";\n\n $calendar .= \"</table>\";\n\n return $calendar;\n\n}", "private function getData()\n {\n $data = array();\n\n $data = array_merge($data,\n $this->services->CalendarData->currentUserData(),\n $this->services->Common->subPageName( $this->timber->translator->trans('Calendar') . \" | \" ),\n $this->services->Common->runtimeScripts( 'calendar' ),\n $this->services->Common->injectScripts(array(\n 'projectsEvents' => $this->services->CalendarData->projectsEvents(),\n 'tasksEvents' => $this->services->CalendarData->tasksEvents(),\n 'projectsEventsColor' => '#ecf0f1',\n 'projectsEventsTextColor' => '#2c3e50',\n 'tasksEventsColor' => '#bdc3c7',\n 'tasksEventsTextColor' => '#2980b9',\n 'calEvent_id' => $this->timber->translator->trans('ID'),\n 'calEvent_iden' => $this->timber->translator->trans('Identifier'),\n 'calEvent_type' => $this->timber->translator->trans('Type'),\n 'calEvent_mi_id' => $this->timber->translator->trans('Milestone ID'),\n 'calEvent_mi_title' => $this->timber->translator->trans('Milestone Title'),\n 'calEvent_pr_id' => $this->timber->translator->trans('Project ID'),\n 'calEvent_owner_id' => $this->timber->translator->trans('Owner ID'),\n 'calEvent_assign_to' => $this->timber->translator->trans('Assignee ID'),\n 'calEvent_assign_to_name' => $this->timber->translator->trans('Assignee Name'),\n 'calEvent_assign_to_email' => $this->timber->translator->trans('Assignee Email'),\n 'calEvent_title' => $this->timber->translator->trans('Title'),\n 'calEvent_description' => $this->timber->translator->trans('Description'),\n 'calEvent_status' => $this->timber->translator->trans('Status'),\n 'calEvent_progress' => $this->timber->translator->trans('Progress'),\n 'calEvent_priority' => $this->timber->translator->trans('Priority'),\n 'calEvent_start_at' => $this->timber->translator->trans('Start at'),\n 'calEvent_end_at' => $this->timber->translator->trans('End at'),\n 'calEvent_created_at' => $this->timber->translator->trans('Created at'),\n 'calEvent_updated_at' => $this->timber->translator->trans('Updated at'),\n 'calEvent_currency' => $this->timber->translator->trans('Currency'),\n 'calEvent_reference' => $this->timber->translator->trans('Reference'),\n 'calEvent_ref_id' => $this->timber->translator->trans('Reference ID'),\n 'calEvent_version' => $this->timber->translator->trans('Version'),\n 'calEvent_budget' => $this->timber->translator->trans('Budget'),\n 'calEvent_tax_value' => $this->timber->translator->trans('Tax Value'),\n 'calEvent_tax_type' => $this->timber->translator->trans('Tax Type'),\n 'calEvent_discount_value' => $this->timber->translator->trans('Discount Value'),\n 'calEvent_discount_type' => $this->timber->translator->trans('Discount Type'),\n 'calEvent_attach' => $this->timber->translator->trans('Attachments'),\n 'calEvent_owners' => $this->timber->translator->trans('Owners'),\n 'calEvent_staff' => $this->timber->translator->trans('Staff'),\n 'calEvent_clients' => $this->timber->translator->trans('Clients'),\n 'calEvent_staff_ids' => $this->timber->translator->trans('Staff IDs'),\n 'calEvent_clients_ids' => $this->timber->translator->trans('Clients IDs'),\n ))\n );\n\n return $data;\n }", "public function calendar(){\n\n /**\n * Hago una consulta a la tabla eventos para que me traiga los eventos\n * que esten activos y le pido que me lo convierta a array\n */\n $events = Event::query()->where('state','Activo')->get()->toArray();\n\n /**\n * Creo un array vacio\n */\n $eventos = array();\n\n /**\n * Recorro cada uno de los elementos de la consulta que hice antes con un foreach\n * y los guardo en un array, en la posicion title guardo el titulo y la descripcion\n * y la fecha la guardo en la posicion start, ya que asi me la pide el fullcalendar\n */\n foreach($events as $event){\n $evento = [\n 'title' => $event['title'].\" | \".$event['description'],\n 'start' => $event['date'],\n ];\n /**\n * Guardo el array anterior en el array vacio que cree antes\n */\n array_push($eventos,$evento);\n }\n return view('calendar' , compact('eventos'));\n }", "function dateContent() {\n\t\t//printvar(func_get_arg());\n\t\tif (func_num_args() >= 2) {\n\t\t\t$day = intval(func_get_arg(0));\n\t\t\t$content = trim(func_get_arg(1));\n\t\t\t\n\t\t\tif ($day >= 1 && $day <= 31) {\n\t\t\t\t$this->_dateArray[$day] = $content;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telseif (func_num_args() == 1) {\n\t\t\t$day = intval(func_get_arg(0));\n\t\t\t\n\t\t\tif (array_key_exists($day,$this->_dateArray)) {\n\t\t\t\treturn $this->_fillContent($this->_dateArray[$day]);\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t} \n\t\telse {\n\t\t\treturn $this->_dateArray;\n\t\t\t//user_error(\"You must pass at least one argument to the dateContent function of the Calendar class\", E_NOTICE);\n\t\t}\n\t}", "public function generate() {\n\t\tif(!isset($this->year)) {\n\t\t\t$this->year = date(\"Y\");\n\t\t}\n\t\tif(!isset($this->month)) {\n\t\t\t$this->month = date(\"m\");\n\t\t}\n\t\treturn $this->generate_calendar($this->year, $this->month);\n\t}", "public function get_all_data()\n\t{\n\treturn $this->cal;\n\t}", "public function calendarIndex()\n {\n return view('calendar');\n }", "public function buildCalendar(){\n\n\t\t$first_day = $this->getFirstDay();\t\t\t\t\t\t//Determine what day of the week the month starts on\n\t\t$current_number_of_days = $this->getNumberOfDays();\t\t//Determine the number of days in the month\n\n\t\t$number_of_previous_days = $first_day;\t\t\t\t\t\t\t\t\t\t//Determine the number of days needed to complete the first week\n\t\t$prev_month_number_of_days = $this->getNumberOfDays($this->getMonth()-1); \t//Determine the number of days in the previous month\n\t\t\n\t\t$_SESSION['month'] = $this->getMonth();\n\t\t$_SESSION['year'] = $this->getYear();\n\t\t$_SESSION['view'] = 'calendar';\n\n\t\tob_start();?>\n <table border=\"0\" id=\"events_calendar\">\n <?php echo $this->buildCalendarHead() ?>\n <tr id=\"events_calendar_weekdays\">\n <th>\n\t\t\t\t\t<div class=\"full_week_name\">Sunday</div>\n\t\t\t\t\t<div class=\"short_week_name\">Sun</div>\n\t\t\t\t\t<div class=\"abrev_week_name\">S</div>\n </th>\n <th>\n\t\t\t\t\t<div class=\"full_week_name\">Monday</div>\n\t\t\t\t\t<div class=\"short_week_name\">Mon</div>\n\t\t\t\t\t<div class=\"abrev_week_name\">M</div>\n </th>\n <th>\n\t\t\t\t\t<div class=\"full_week_name\">Tuesday</div>\n\t\t\t\t\t<div class=\"short_week_name\">Tue</div>\n\t\t\t\t\t<div class=\"abrev_week_name\">T</div>\n </th>\n <th>\n\t\t\t\t\t<div class=\"full_week_name\">Wednesday</div>\n\t\t\t\t\t<div class=\"short_week_name\">Wed</div>\n\t\t\t\t\t<div class=\"abrev_week_name\">W</div>\n </th>\n <th>\n\t\t\t\t\t<div class=\"full_week_name\">Thursday</div>\n\t\t\t\t\t<div class=\"short_week_name\">Thu</div>\n\t\t\t\t\t<div class=\"abrev_week_name\">T</div>\n </th>\n <th>\n\t\t\t\t\t<div class=\"full_week_name\">Friday</div>\n\t\t\t\t\t<div class=\"short_week_name\">Fri</div>\n\t\t\t\t\t<div class=\"abrev_week_name\">F</div>\n </th>\n <th>\n\t\t\t\t\t<div class=\"full_week_name\">Saturday</div>\n\t\t\t\t\t<div class=\"short_week_name\">Sat</div>\n\t\t\t\t\t<div class=\"abrev_week_name\">S</div>\n </th>\n </tr>\n <?php\n $dayCounter = 0;\t\t\t\t\t\t\t\t\t\t\t//Keeps count of the days in a week\n\n /*** PREVIOUS MONTH CELLS ***/\n for($day = $number_of_previous_days; $day >= 1; $day--){\t//For each day in the previous month needed for a full week\n $dayNumber = $prev_month_number_of_days - ($day-1);\t\t\n \n //Get full date (YYYY-MM-DD)\n $year = ($this->getPrevMonth() == 12)? ($this->getYear()-1): $this->getYear();\n $full_date = $year . '-' . $this->getPrevMonth() . '-' . $dayNumber;\n \n $dayCounter ++;\n if($dayCounter == 1){\t\t\t\t\t//Start new row\n echo '<tr>';\n }\n \n echo $this->buildCalendarCell($full_date, $dayNumber, 'prev_month');\t//Create Calendar Cell\n\n if($dayCounter == 7){\t\t\t\t\t//End new row\n echo '</tr>';\n $dayCounter = 0;\n }\n }\n\n /*** CURRENT MONTH CELLS ***/\n for($day = 1; $day <= $current_number_of_days; $day++){\t\t//For each day in the current month\n $full_date = $this->getYear() . '-' . $this->getMonth() . '-' . $day;\n $dayCounter ++;\n if($dayCounter == 1){\t\t\t\t\t//Start new row\n echo '<tr>';\n }\n\n echo $this->buildCalendarCell($full_date, $day, 'current_month');\t//Create Calendar Cell\n\n if($dayCounter == 7){\t\t\t\t\t//End new row\n echo '</tr>';\n $dayCounter = 0;\n }\n }\n\n /*** NEXT MONTH CELLS ***/\n for($day = 1; $day <= $dayCounter; $day++){\t//For each day in the current month\n //Get full date (YYYY-MM-DD)\n $year = ($this->getNextMonth() == 1)? ($this->getYear()+1): $this->getYear();\n $full_date = $year . '-' . $this->getNextMonth() . '-' . $day;\n \n $dayCounter ++;\n if($dayCounter == 1){\t\t\t\t\t//Start new row\n echo '<tr>';\n }\n\n echo $this->buildCalendarCell($full_date, $day, 'next_month');\t//Create Calendar Cell\n\n if($dayCounter == 7){\t\t\t\t\t//End new row\n echo '</tr>';\n $dayCounter = 0;\n }\n }\n ?>\n </table>\n <style>\n\t\t\t<?php \n\t\t\tforeach($this->getCategories() as $c){?>\n\t\t\t#events_calendar .event.category_<?php echo $c->getId(); ?>:before{color: <?php echo $c->getColor(); ?> !important;}\n\t\t\t<?php } ?>\n\t\t</style>\n <?php\n\t\treturn ob_get_clean();\n\t}", "public function calendars()\n\t{\n\t\t// -------------------------------------\n\t\t// Load 'em up\n\t\t// -------------------------------------\n\n\t\t$this->load_calendar_datetime();\n\t\t$this->load_calendar_parameters();\n\n\t\t// -------------------------------------\n\t\t// Prep the parameters\n\t\t// -------------------------------------\n\n\t\t$params = array(\n\t\t\tarray(\n\t\t\t\t'name' => 'category',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'site_id',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer',\n\t\t\t\t'min_value' => 1,\n\t\t\t\t'multi' => TRUE,\n\t\t\t\t'default' => $this->data->get_site_id()\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'calendar_id',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer',\n\t\t\t\t'min_value' => 1,\n\t\t\t\t'multi' => TRUE,\n\t\t\t\t'not' => TRUE\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'calendar_name',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE,\n\t\t\t\t'not' => TRUE\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'status',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE,\n\t\t\t\t'default' => 'open'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'date_range_start',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'date'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'date_range_end',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'date'\n\t\t\t)\n\t\t);\n\n\t\t//ee()->TMPL->log_item('Calendar: Processing parameters');\n\n\t\t$this->add_parameters($params);\n\n\t\t// -------------------------------------\n\t\t// Convert calendar_name to calendar_id\n\t\t// -------------------------------------\n\n\t\tif ($this->P->value('calendar_id') == '' AND\n\t\t\t$this->P->value('calendar_name') != '')\n\t\t{\n\t\t\t$ids = $this->data->get_calendar_id_from_name(\n\t\t\t\t$this->P->value('calendar_name'),\n\t\t\t\tNULL,\n\t\t\t\t$this->P->params['calendar_name']['details']['not']\n\t\t\t);\n\n\t\t\tif ( empty( $ids ) )\n\t\t\t{\n\t\t\t\t//ee()->TMPL->log_item('Calendar: No results for\n\t\t\t\t//calendar name provided, bailing');\n\t\t\t\treturn $this->no_results();\n\t\t\t}\n\n\t\t\t$this->P->set('calendar_id', implode('|', $ids));\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Determine which calendars this user has permission to view\n\t\t// and modify the parameters accordingly.\n\t\t// -------------------------------------\n\n\t\t// TODO\n\n\t\t// -------------------------------------\n\t\t// Fetch the basics\n\t\t// -------------------------------------\n\n\t\t$data = $this->data->fetch_calendars_basics(\n\t\t\t$this->P->value('site_id'),\n\t\t\t$this->P->value('calendar_id'),\n\t\t\t$this->P->params['calendar_id']['details']['not']\n\t\t);\n\n\t\t// -------------------------------------\n\t\t// If no data, then give 'em no_results\n\t\t// -------------------------------------\n\n\t\tif (($total_results = count($data)) == 0)\n\t\t{\n\t\t\t//ee()->TMPL->log_item('Calendar: No results, bailing');\n\t\t\treturn $this->no_results();\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Ensure date_range_start <= date_range_end\n\t\t// -------------------------------------\n\n\t\tif ($this->P->value('date_range_start') !== FALSE AND\n\t\t\t$this->P->value('date_range_end') !== FALSE)\n\t\t{\n\t\t\tif ($this->P->value('date_range_start', 'ymd') > $this->P->value('date_range_end', 'ymd'))\n\t\t\t{\n\t\t\t\t$temp = $this->P->params['date_range_start']['value'];\n\t\t\t\t$this->P->set('date_range_start', $this->P->params['date_range_end']['value']);\n\t\t\t\t$this->P->set('date_range_end', $temp);\n\t\t\t\tunset($temp);\n\t\t\t}\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// This will come in handy later\n\t\t// -------------------------------------\n\n\t\t$calendar_array = array();\n\t\tforeach ($data as $k => $arr)\n\t\t{\n\t\t\t$calendar_array[] = $arr['calendar_id'];\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Date range params? Then we need to do a lot more work.\n\t\t// -------------------------------------\n\n\t\tif ($this->P->value('date_range_start') !== FALSE OR\n\t\t\t$this->P->value('date_range_end') !== FALSE)\n\t\t{\n\t\t\t//ee()->TMPL->log_item('Calendar: Calculating date ranges');\n\t\t\t$min = ($this->P->value('date_range_start') !== FALSE) ?\n\t\t\t\t\t\t$this->P->value('date_range_start', 'ymd') :\n\t\t\t\t\t\t0;\n\n\t\t\t$max = ($this->P->value('date_range_end') !== FALSE) ?\n\t\t\t\t$this->P->value('date_range_end', 'ymd') :\n\t\t\t\t0;\n\n\t\t\t$calendar_array = $this->data->fetch_calendars_with_events_in_date_range(\n\t\t\t\t$min,\n\t\t\t\t$max,\n\t\t\t\t$calendar_array,\n\t\t\t\t$this->P->value('status')\n\t\t\t);\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// No calendars? No results.\n\t\t// -------------------------------------\n\n\t\tif (empty($calendar_array))\n\t\t{\n//ee()->TMPL->log_item('Calendar: No calendars, bailing');\n\t\t\treturn $this->no_results();\n\t\t}\n\n\t\t//\t----------------------------------------\n\t\t//\tInvoke Channel class\n\t\t//\t----------------------------------------\n\n\t\tif ( ! class_exists('Channel') )\n\t\t{\n\t\t\trequire PATH_MOD.'/channel/mod.channel.php';\n\t\t}\n\n\t\t$channel = new Channel();\n\n\t\t//need to remove limit here so huge amounts of events work\n\t\t$channel->limit = 1000000;\n\n\t\t// --------------------------------------------\n\t\t// Invoke Pagination for EE 2.4 and Above\n\t\t// --------------------------------------------\n\n\t\t$channel = $this->add_pag_to_channel($channel);\n\n\t\t// -------------------------------------\n\t\t// Prepare parameters\n\t\t// -------------------------------------\n\n\t\tee()->TMPL->tagparams['entry_id'] = implode('|', $calendar_array);\n\t\tee()->TMPL->tagparams['channel'] = CALENDAR_CALENDARS_CHANNEL_NAME;\n\n\t\t// -------------------------------------\n\t\t// Pre-process related data\n\t\t// -------------------------------------\n\n\t\tif (version_compare($this->ee_version, '2.6.0', '<'))\n\t\t{\n\n\t\t\tee()->TMPL->tagdata = ee()->TMPL->assign_relationship_data(\n\t\t\t\tee()->TMPL->tagdata\n\t\t\t);\n\t\t\tee()->TMPL->var_single = array_merge(\n\t\t\t\tee()->TMPL->var_single,\n\t\t\t\tee()->TMPL->related_markers\n\t\t\t);\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Execute needed methods\n\t\t// -------------------------------------\n\n\t\t$channel->fetch_custom_channel_fields();\n\n\t\t$channel->fetch_custom_member_fields();\n\n\t\t// --------------------------------------------\n\t\t// Pagination Tags Parsed Out\n\t\t// --------------------------------------------\n\n\t\t$this->fetch_pagination_data($channel);\n\n\t\t// -------------------------------------\n\t\t// Querification\n\t\t// -------------------------------------\n\n\t\t$channel->build_sql_query();\n\n\t\tif ($channel->sql == '')\n\t\t{\n\t\t\treturn $this->no_results();\n\t\t}\n\n\t\t$channel->query = ee()->db->query($channel->sql);\n\n\t\tif ($channel->query->num_rows() == 0)\n\t\t{\n//ee()->TMPL->log_item('Calendar: Channel module says no results, bailing');\n\t\t\treturn $this->no_results();\n\t\t}\n\n\t\t$channel->query->result\t= $channel->query->result_array();\n\n\t\t// -------------------------------------------\n\t\t// 'calendar_calendars_channel_query' hook.\n\t\t// - Do something with the channel query\n\n\t\tif (ee()->extensions->active_hook('calendar_calendars_channel_query') === TRUE)\n\t\t{\n\t\t\t$channel->query = ee()->extensions->call('calendar_calendars_channel_query', $channel->query, $calendar_array);\n\t\t\tif (ee()->extensions->end_script === TRUE) return;\n\t\t}\n\t\t//\n\t\t// -------------------------------------------\n\n\t\t// -------------------------------------\n\t\t// Inject Calendar-specific variables\n\t\t// -------------------------------------\n\n\t\t//ee()->TMPL->log_item('Calendar: Adding Calendar variables');\n\n\t\t$aliases = array(\n\t\t\t'title'\t\t\t=> 'calendar_title',\n\t\t\t'url_title'\t\t=> 'calendar_url_title',\n\t\t\t'entry_id'\t\t=> 'calendar_id',\n\t\t\t'author_id'\t\t=> 'calendar_author_id',\n\t\t\t'author'\t\t=> 'calendar_author',\n\t\t\t'status'\t\t=> 'calendar_status'\n\t\t);\n\n\t\t//custom variables with the letters 'url' are borked in\n\t\t//EE 2.6. Bug reported, but this should fix.\n\t\t//https://support.ellislab.com/bugs/detail/19337\n\t\tif (version_compare($this->ee_version, '2.6.0', '>='))\n\t\t{\n\t\t\t$aliases['url_title'] = 'calendar_borked_title';\n\n\t\t\tee()->TMPL->var_single['calendar_borked_title'] = 'calendar_borked_title';\n\n\t\t\tunset(ee()->TMPL->var_single['calendar_url_title']);\n\n\t\t\tee()->TMPL->tagdata = str_replace(\n\t\t\t\tarray(\n\t\t\t\t\tLD . 'calendar_url_title' . RD,\n\t\t\t\t\t'\"calendar_url_title\"',\n\t\t\t\t\t\"'calendar_url_title'\"\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\tLD . 'calendar_borked_title' . RD,\n\t\t\t\t\t'\"calendar_borked_title\"',\n\t\t\t\t\t\"'calendar_borked_title'\"\n\n\t\t\t\t),\n\t\t\t\tee()->TMPL->tagdata\n\t\t\t);\n\t\t}\n\n\t\tforeach ($channel->query->result as $k => $row)\n\t\t{\n\t\t\t$channel->query->result[$k]['author'] = ($row['screen_name'] != '') ?\n\t\t\t\t\t\t\t\t\t\t$row['screen_name'] : $row['username'];\n\n\t\t\tforeach ($aliases as $old => $new)\n\t\t\t{\n\t\t\t\t$channel->query->result[$k][$new] = $channel->query->result[$k][$old];\n\t\t\t}\n\t\t}\n\n\t\t//\t----------------------------------------\n\t\t//\tRedeclare\n\t\t//\t----------------------------------------\n\t\t//\tWe will reassign the $channel->query->result with our\n\t\t//\treordered array of values.\n\t\t//\t----------------------------------------\n\n\t\t$channel->query->result_array = $channel->query->result;\n\n\t\t// --------------------------------------------\n\t\t// Typography\n\t\t// --------------------------------------------\n\n\t\tee()->load->library('typography');\n\t\tee()->typography->initialize();\n\t\tee()->typography->convert_curly = FALSE;\n\n\t\t$channel->fetch_categories();\n\n\t\t// -------------------------------------\n\t\t// Parse\n\t\t// -------------------------------------\n\n\t\t//ee()->TMPL->log_item('Calendar: Parsing, via channel module');\n\n\n\n\t\t$channel->parse_channel_entries();\n\n\t\t// -------------------------------------\n\t\t// Paginate\n\t\t// -------------------------------------\n\n\t\t$channel = $this->add_pagination_data($channel);\n\n\t\t// -------------------------------------\n\t\t// Related entries\n\t\t// -------------------------------------\n\n\t\t//ee()->TMPL->log_item('Calendar: Parsing related entries, via Weblog module');\n\n\t\tif (version_compare($this->ee_version, '2.6.0', '<'))\n\t\t{\n\t\t\tif (count(ee()->TMPL->related_data) > 0 AND\n\t\t\t\tcount($channel->related_entries) > 0)\n\t\t\t{\n\t\t\t\t$channel->parse_related_entries();\n\t\t\t}\n\n\t\t\tif (count(ee()->TMPL->reverse_related_data) > 0 AND\n\t\t\t\tcount($channel->reverse_related_entries) > 0)\n\t\t\t{\n\t\t\t\t$channel->parse_reverse_related_entries();\n\t\t\t}\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Send 'em home\n\t\t// -------------------------------------\n\n\t\t$tagdata = $channel->return_data;\n\n\t\t//ee()->TMPL->log_item('Calendar: Done!');\n\n\t\t//on the off chance someone just wrote the word\n\t\t//'calendar_url_title', we should fix that before\n\t\t//output. (See above calendar_url_title fix)\n\t\tif (version_compare($this->ee_version, '2.6.0', '>='))\n\t\t{\n\t\t\t$tagdata = str_replace(\n\t\t\t\tarray(\n\t\t\t\t\tLD . 'calendar_borked_title' . RD,\n\t\t\t\t\t'\"calendar_borked_title\"',\n\t\t\t\t\t\"'calendar_borked_title'\"\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\tLD . 'calendar_url_title' . RD,\n\t\t\t\t\t'\"calendar_url_title\"',\n\t\t\t\t\t\"'calendar_url_title'\"\n\t\t\t\t),\n\t\t\t\t$tagdata\n\t\t\t);\n\t\t}\n\n\t\treturn $tagdata;\n\n\t}", "function draw_calendar($month,$year){\r\n\t/*Naredi koledar*/\r\n\t$calendar = '<table cellpadding=\"0\" cellspacing=\"0\" class=\"calendar\">';\r\n\t\r\n\t$headings = array('Nedelja','Ponedeljek','Torek','Sreda','Cetrtek','Petek','Sobota');\r\n\t$calendar.= '<tr class=\"calendar-row\"><td class=\"calendar-day-head\">'.implode('</td><td class=\"calendar-day-head\">',$headings).'</td></tr>';\r\n\r\n\t$running_day = date('w',mktime(0,0,0,$month,1,$year));\r\n\t$days_in_month = date('t',mktime(0,0,0,$month,1,$year));\r\n\t$days_in_this_week = 1;\r\n\t$day_counter = 0;\r\n\t$dates_array = array();\r\n\r\n\t$calendar.= '<tr class=\"calendar-row\">';\r\n\r\n\tfor($x = 0; $x < $running_day; $x++):\r\n\t\t$calendar.= '<td class=\"calendar-day-np\">&nbsp;</td>';\r\n\t\t$days_in_this_week++;\r\n\tendfor;\r\n\r\n\tfor($list_day = 1; $list_day <= $days_in_month; $list_day++):\r\n\t\tif($list_day < 10) {\r\n $list_day = str_pad($list_day, 2, '0', STR_PAD_LEFT);\r\n }\r\n\t\t$month = str_pad($month, 2, '0', STR_PAD_LEFT);\r\n\t\t$event_day = $year.'-'.$month.'-'.$list_day;\r\n\r\n\t\t$calendar.= '<td class=\"calendar-day\"><div name=\"test\" style=\"height:100px; width:120px; overflow: auto; white-space:nowrap\" id=' .$event_day. ' onclick=\"modal(this.id);\">';\r\n\t\t$calendar.= '<div>'.$list_day.'</div>';\t\r\n\t\t$query = \"SELECT CONCAT_WS(' ',s.firstname,s.lastname) as Zaposleni, a.name, aa.aktivnost_id\r\n\t\t\tFROM ost_staff s, ost_agent_aktivnost aa, ost_aktivnosti a\r\n\t\t\tWHERE s.staff_id = aa.staff_id and a.id=aa.aktivnost_id and '$event_day' BETWEEN aa.aktivnost_od AND aa.aktivnost_do AND aa.aktivnost_id > 1 AND aa.aktivnost_id != 9 AND aa.aktivnost_id != 10\";\r\n\t\t\t$result = db_query($query) or die('Ne morem pridobiti rezultata!');\r\n\t\t\twhile($row = db_fetch_array($result)) {\r\n\t\t\t\t$words = explode(' ',$row['Zaposleni']);\r\n\t\t\t\t$calendar .= '<div>'.$words[0][0].'. '.$words[1][0].'. : '.$row['name'].'</div>';\r\n\t\t\t}\r\n\t\t$calendar.= '</div></td>';\r\n\t\tif($running_day == 6):\r\n\t\t\t$calendar.= '</tr>';\r\n\t\t\tif(($day_counter+1) != $days_in_month):\r\n\t\t\t\t$calendar.= '<tr class=\"calendar-row\">';\r\n\t\t\tendif;\r\n\t\t\t$running_day = -1;\r\n\t\t\t$days_in_this_week = 0;\r\n\t\tendif;\r\n\t\t$days_in_this_week++; $running_day++; $day_counter++;\r\n\tendfor;\r\n\r\n\tif($days_in_this_week < 8):\r\n\t\tfor($x = 1; $x <= (8 - $days_in_this_week); $x++):\r\n\t\t\t$calendar.= '<td class=\"calendar-day-np\">&nbsp;</td>';\r\n\t\tendfor;\r\n\tendif;\r\n\r\n\t$calendar.= '</tr>';\r\n\r\n\t$calendar.= '</table>';\r\n\r\n\t$calendar = str_replace('</td>','</td>'.\"\\n\",$calendar);\r\n\t$calendar = str_replace('</tr>','</tr>'.\"\\n\",$calendar);\r\n\r\n\treturn $calendar;\r\n}", "public function index()\n {\n return Calendar::all();\n }", "function print_calendar($mon,$year)\n\t{\n\t\tglobal $dates, $first_day, $start_day;\n\t\t\t$cellWidth =\"150\";\n\t\t$first_day = mktime(0,0,0,$mon,1,$year);\n\t\t$start_day = date(\"w\",$first_day);\n\t\t$res = getdate($first_day);\n\t\t$month_name = $res[\"month\"];\n\t\t$no_days_in_month = date(\"t\",$first_day);\n\t\t\n\t\t//If month's first day does not start with first Sunday, fill table cell with a space\n\t\tfor ($i = 1; $i <= $start_day;$i++)\n\t\t\t$dates[1][$i] = \" \";\n\n\t\t$row = 1;\n\t\t$col = $start_day+1;\n\t\t$num = 1;\n\t\twhile($num<=31)\n\t\t\t{\n\t\t\t\tif ($num > $no_days_in_month)\n\t\t\t\t\t break;\n\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$dates[$row][$col] = $num;\n\t\t\t\t\t\tif (($col + 1) > 7)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$row++;\n\t\t\t\t\t\t\t\t$col = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$col++;\n\t\t\t\t\t\t$num++;\n\t\t\t\t\t}//if-else\n\t\t\t}//while\n\t\t$mon_num = date(\"n\",$first_day);\n\t\t$temp_yr = $next_yr = $prev_yr = $year;\n\n\t\t$prev = $mon_num - 1;\n\t\t$next = $mon_num + 1;\n\n\t\t//If January is currently displayed, month previous is December of previous year\n\t\tif ($mon_num == 1)\n\t\t\t{\n\t\t\t\t$prev_yr = $year - 1;\n\t\t\t\t$prev = 12;\n\t\t\t}\n \n\t\t//If December is currently displayed, month next is January of next year\n\t\tif ($mon_num == 12)\n\t\t\t{\n\t\t\t\t$next_yr = $year + 1;\n\t\t\t\t$next = 1;\n\t\t\t}\n\n\t\techo \"<DIV ALIGN='center'><TABLE BORDER=1 WIDTH=1600px CELLSPACING=0 BORDERCOLOR='silver'>\";\n\n\t\techo \t\"\\n<TR ALIGN='center'><TD BGCOLOR='white'> \".\n\t\t\t \"<A HREF='index.php?month=$prev&year=$prev_yr' STYLE=\\\"text-decoration: none\\\"><B><<</B></A> </TD>\".\n\t\t\t \"<TD COLSPAN=5 BGCOLOR='#99CCFF'><B>\".date(\"F\",$first_day).\" \".$temp_yr.\"</B></TD>\".\n\t\t\t \"<TD BGCOLOR='white'> \".\n\t\t\t \"<A HREF='index.php?month=$next&year=$next_yr' STYLE=\\\"text-decoration: none\\\"><B>>></B></A> </TD></TR>\";\n\n\t\techo \"\\n<TR ALIGN='center'><TD width='$cellWidth'><B>Domenica</B></TD><TD width='$cellWidth'><B>Lunedi</B></TD><TD width='$cellWidth'><B>Martedi</B></TD>\";\n\t\techo \"<TD width='$cellWidth'><B>Mercoledi</B></TD><TD width='$cellWidth'><B>Giovedi</B></TD><TD width='$cellWidth'><B>Venerdi</B></TD><TD width='$cellWidth'><B>Sabato</B></TD></TR>\";\n\t\techo \"<TR><TD COLSPAN=7> </TR><TR height='100px;' ALIGN='center'>\";\n\t\t\t\t\n\t\t$end = ($start_day > 4)? 6:5;\n\t\tfor ($row=1;$row<=$end;$row++)\n\t\t\t{\n\t\t\t\tfor ($col=1;$col<=7;$col++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($dates[$row][$col] == \"\")\n\t\t\t\t\t\t$dates[$row][$col] = \" \";\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!strcmp($dates[$row][$col],\" \"))\n\t\t\t\t\t\t\t$count++;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$t = $dates[$row][$col];\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t//If date is today, highlight it\n\t\t\t\t\t\tif (($t == date(\"j\")) && ($mon == date(\"n\")) && ($year == date(\"Y\"))){\n\t\t\t\t\t\t\techo \"\\n<TD valign='top' BGCOLOR='aqua'><a onclick=\\\"NewWindow(this.href,'pg_center','780','670','no');return false;\\\" href='calendar_add_event.php?azione=add&gg=$t&mm=$mon&yyyy=$year'>\".$t.\"</a>\";\n echo '<div align=\"left\">';\n echo stampa_appuntamenti($t,$mon,$year,$_SESSION['id_utente']);\n echo '</div>';\n echo \"</TD>\";\n }\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t//If the date is absent ie after 31, print space\n\t\t\t\t\t\t\techo \"\\n<TD valign='top'>\".(($t == \" \" )? \"&nbsp;\" : \"<a onclick=\\\"NewWindow(this.href,'pg_center','780','670','no');return false;\\\" href='calendar_add_event.php?azione=add&gg=$t&mm=$mon&yyyy=$year'>\".$t.\"</a>\");\n echo '<div align=\"left\">';\n echo stampa_appuntamenti($t,$mon,$year,$_SESSION['id_utente']);\n echo '</div>';\n echo \"</TD>\";\n\t\t\t\t\t }\n }// for -col\n\t\t\t\t\n\t\t\t\tif (($row + 1) != ($end+1))\n\t\t\t\t\techo \"</TR>\\n<TR ALIGN='center' height='100px;'>\";\n\t\t\t\telse\n\t\t\t\t\techo \"</TR>\";\n\t\t\t}// for - row\n\t\techo \"\\n</TABLE><BR><BR><A HREF=\\\"index.php\\\">Visualizza mese corrente</A> </DIV>\";\n\t}", "function toICS() {\r\n require_once BPSP_PLUGIN_DIR . '/schedules/iCalcreator.class.php';\r\n global $bp;\r\n define( 'ICAL_LANG', get_bloginfo( 'language' ) );\r\n \r\n $cal = new vcalendar();\r\n $cal->setConfig( 'unique_id', str_replace( 'http://', '', get_bloginfo( 'siteurl' ) ) );\r\n $cal->setConfig( 'filename', $bp->groups->current_group->slug );\r\n $cal->setProperty( 'X-WR-CALNAME', __( 'Calendar for: ', 'bpsp' ) . $bp->groups->current_group->name );\r\n $cal->setProperty( 'X-WR-CALDESC', $bp->groups->current_group->description );\r\n $cal->setProperty( 'X-WR-TIMEZONE', get_option('timezone_string') );\r\n \r\n $schedules = $this->has_schedules();\r\n $assignments = BPSP_Assignments::has_assignments();\r\n $entries = array_merge( $assignments, $schedules );\r\n foreach ( $entries as $entry ) {\r\n setup_postdata( $entry );\r\n \r\n $e = new vevent();\r\n \r\n if( $entry->post_type == \"schedule\" )\r\n $date = getdate( strtotime( $entry->start_date ) );\r\n elseif( $entry->post_type == \"assignment\" )\r\n $date = getdate( strtotime( $entry->post_date ) );\r\n $dtstart['year'] = $date['year'];\r\n $dtstart['month'] = $date['mon'];\r\n $dtstart['day'] = $date['mday'];\r\n $dtstart['hour'] = $date['hours'];\r\n $dtstart['min'] = $date['minutes'];\r\n $dtstart['sec'] = $date['seconds'];\r\n $e->setProperty( 'dtstart', $dtstart );\r\n \r\n $e->setProperty( 'description', get_the_content() . \"\\n\\n\" . $entry->permalink );\r\n \r\n if( !empty( $entry->location ) )\r\n $e->setProperty( 'location', $entry->location );\r\n \r\n if( $entry->post_type == \"assignment\" )\r\n $entry->end_date = $entry->due_date; // make assignments compatible with schedule parser\r\n \r\n if( !empty( $entry->end_date ) ) {\r\n $date = getdate( strtotime( $entry->end_date ) );\r\n $dtend['year'] = $date['year'];\r\n $dtend['month'] = $date['mon'];\r\n $dtend['day'] = $date['mday'];\r\n $dtend['hour'] = $date['hours'];\r\n $dtend['min'] = $date['minutes'];\r\n $dtend['sec'] = $date['seconds'];\r\n $e->setProperty( 'dtend', $dtend );\r\n } else\r\n $e->setProperty( 'duration', 0, 1, 0 ); // Assume it's an one day event\r\n \r\n $e->setProperty( 'summary', get_the_title( $entry->ID ) );\r\n $e->setProperty( 'status', 'CONFIRMED' );\r\n \r\n $cal->setComponent( $e );\r\n }\r\n \r\n header(\"HTTP/1.1 200 OK\");\r\n die( $cal->returnCalendar() );\r\n }", "function getCalendarsForAdmin() {\n //\n // http://dev4.krubner.com/admin.php?page=admin_calendar\n //\n // this brings back 2 months worth of days to show in a calendar\n\n global $controller; \n\n $today = new DateTime(date('Y-m-d'));\n\n //Get Calendar for this week\n if(!isset($_GET['ym'])){\n $top_month = date('Y-m');\n } else {\n $top_month = $_GET['ym'];\n }\n\n $firstDayOfMonthDateTime = new DateTime($top_month.\"-01\");\n $lastDayOfMonthDateTime = clone $firstDayOfMonthDateTime;\n $lastDayOfMonthDateTime->modify(\"+1 month\");\n $lastDayOfMonthDateTime->modify(\"-1 day\");\n\n $arrayOfDaysForThisMonth = array();\n $arrayOfDaysForThisMonth = $controller->command(\"loadAllNights\", $firstDayOfMonthDateTime, $lastDayOfMonthDateTime); \n\n $calendars = array();\n $calendars[$top_month] = $arrayOfDaysForThisMonth;\n\n $firstDayOfMonthDateTime2 = clone $firstDayOfMonthDateTime;\n $firstDayOfMonthDateTime2->modify(\"+1 month\");\n $lastDayOfMonthDateTime2 = clone $firstDayOfMonthDateTime2;\n $lastDayOfMonthDateTime2->modify(\"+1 month\");\n $lastDayOfMonthDateTime2->modify(\"-1 day\");\n\n $arrayOfDaysForThisMonth = array();\n $arrayOfDaysForThisMonth = $controller->command(\"loadAllNights\", $firstDayOfMonthDateTime2, $lastDayOfMonthDateTime2); \n\n $calendars[$lastDayOfMonthDateTime2->format('Y-m')] = $arrayOfDaysForThisMonth;\n\n return $calendars; \n}", "function get_dates($all=null){\r\n\t /* get status of the user \r\n\t * might not be necessary but could be useful later for the personalized calendar \r\n\t */\r\n /* $sql = \"SELECT status\r\n FROM `\".TABLE_PREFIX.\"members`\r\n WHERE `login`='\".$_SESSION['login'].\"'\";\r\n\t\t\t\t\t\r\n $result = mysql_query($sql,$db) or die(mysql_error());\r\n $row_count = mysql_num_rows($result);\r\n if($row_count > 0){\r\n $row = mysql_fetch_assoc($result);\r\n }\r\n\t */\r\n\tglobal $moduleFactory;\r\n\t$dates=array();\r\n $coursesmod = $moduleFactory->getModule(\"_core/courses\");\r\n $courses=$coursesmod->extend_date(); \r\n\t$assignmentsmod = $moduleFactory->getModule(\"_standard/assignments\");\r\n $assignments=$assignmentsmod->extend_date();\r\n\t$testsmod = $moduleFactory->getModule(\"_standard/tests\");\r\n $tests=$testsmod->extend_date();\r\n\t$dates['course']= $courses;\r\n\t$dates['assignments']=$assignments;\r\n\t$dates['tests']=\t$tests;\r\n\t//$dates[$_SESSION['course_id']]['assignments']=\t$assignments;\r\n echo(json_encode($dates));\r\n\t\t\t \r\n }", "public static function month_calendar($day, $month, $year) {\r\n global $langDay_of_weekNames, $langMonthNames, $langToday, $langDay, $langWeek, $langMonth, $langViewShow;\r\n\r\n $calendar_content = \"\";\r\n //Handle leap year\r\n $numberofdays = array(0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);\r\n if (($year % 400 == 0) or ($year % 4 == 0 and $year % 100 <> 0)) {\r\n $numberofdays[2] = 29;\r\n }\r\n\r\n $eventlist = Calendar_Events::get_calendar_events(\"month\", \"$year-$month-$day\");\r\n\r\n $events = array();\r\n if ($eventlist) {\r\n foreach ($eventlist as $event) {\r\n $eventday = new DateTime($event->startdate);\r\n $eventday = $eventday->format('j');\r\n if (!array_key_exists($eventday,$events)) {\r\n $events[$eventday] = array();\r\n }\r\n array_push($events[$eventday], $event);\r\n }\r\n }\r\n\r\n //Get the first day of the month\r\n $dayone = getdate(mktime(0, 0, 0, $month, 1, $year));\r\n //Start the week on monday\r\n $startdayofweek = $dayone['wday'] <> 0 ? ($dayone['wday'] - 1) : 6;\r\n\r\n $backward = array('month'=>$month == 1 ? 12 : $month - 1, 'year' => $month == 1 ? $year - 1 : $year);\r\n $foreward = array('month'=>$month == 12 ? 1 : $month + 1, 'year' => $month == 12 ? $year + 1 : $year);\r\n\r\n $calendar_content .= '<div class=\"right\" style=\"width:100%\">'.$langViewShow.':&nbsp;'.\r\n '<a href=\"#\" onclick=\"show_day(selectedday, selectedmonth, selectedyear);return false;\">'.$langDay.'</a>&nbsp;|&nbsp;'.\r\n '<a href=\"#\" onclick=\"show_week(selectedday, selectedmonth, selectedyear);return false;\">'.$langWeek.'</a>&nbsp;|&nbsp;'.\r\n '<a href=\"#\" onclick=\"show_month(selectedday, selectedmonth, selectedyear);return false;\">'.$langMonth.'</a></div>';\r\n\r\n $calendar_content .= '<table width=100% class=\"title1\">';\r\n $calendar_content .= \"<tr>\";\r\n $calendar_content .= '<td width=\"250\"><a href=\"#\" onclick=\"show_month(1,'.$backward['month'].','.$backward['year'].'); return false;\">&laquo;</a></td>';\r\n $calendar_content .= \"<td class='center'><b>{$langMonthNames['long'][$month-1]} $year</b></td>\";\r\n $calendar_content .= '<td width=\"250\" class=\"right\"><a href=\"#\" onclick=\"show_month(1,'.$foreward['month'].','.$foreward['year'].'); return false;\">&raquo;</a></td>';\r\n $calendar_content .= \"</tr>\";\r\n $calendar_content .= \"</table><br />\";\r\n $calendar_content .= \"<table class='table-default'><tr class='list-header'>\";\r\n for ($ii = 1; $ii < 8; $ii++) {\r\n $calendar_content .= \"<th class='text-center'>\" . $langDay_of_weekNames['long'][$ii % 7] . \"</th>\";\r\n }\r\n $calendar_content .= \"</tr>\";\r\n $curday = -1;\r\n $today = getdate();\r\n\r\n while ($curday <= $numberofdays[$month]) {\r\n $calendar_content .= \"<tr>\";\r\n\r\n for ($ii = 0; $ii < 7; $ii++) {\r\n if (($curday == -1) && ($ii == $startdayofweek)) {\r\n $curday = 1;\r\n }\r\n if (($curday > 0) && ($curday <= $numberofdays[$month])) {\r\n $bgcolor = $ii < 5 ? \"class='alert alert-danger'\" : \"class='odd'\";\r\n $dayheader = \"$curday\";\r\n $class_style = \"class=odd\";\r\n if (($curday == $today['mday']) && ($year == $today['year']) && ($month == $today['mon'])) {\r\n $dayheader = \"<b>$curday</b> <small>($langToday)</small>\";\r\n $class_style = \"class='today'\";\r\n }\r\n $calendar_content .= \"<td height=50 width=14% valign=top $class_style><b>$dayheader</b>\";\r\n $thisDayItems = \"\";\r\n if (array_key_exists($curday, $events)) {\r\n foreach ($events[$curday] as $ev) {\r\n $thisDayItems .= Calendar_Events::month_calendar_item($ev, Calendar_Events::$calsettings->{$ev->event_group.\"_color\"});\r\n }\r\n $calendar_content .= \"$thisDayItems</td>\";\r\n }\r\n $curday++;\r\n } else {\r\n $calendar_content .= \"<td width=14%>&nbsp;</td>\";\r\n }\r\n }\r\n $calendar_content .= \"</tr>\";\r\n }\r\n $calendar_content .= \"</table>\";\r\n\r\n /* Legend */\r\n $calendar_content .= Calendar_Events::calendar_legend();\r\n\r\n\r\n /*************************************** Bootstrap calendar ******************************************************/\r\n\r\n $calendar_content .= '<div id=\"bootstrapcalendar\"></div>';\r\n\r\n return $calendar_content;\r\n }", "public function __toString()\n {\n // Can this set of dates be rendered?\n if (!$this->bOneFullMonth) {\n throw new \\Exception(\n __METHOD__ . ' - Only one full month can be rendered (end date must be \"true\").'\n );\n }\n\n $i = 0;\n $strHtml = '<h3 class=\"sked-cal-title\">' . date('F', strtotime($this->strStart))\n . '</h3><table class=\"sked-cal\"><thead>';\n\n // Day headers\n foreach (SkeVent::WEEKDAYS as $strDay)\n $strHtml .= '<th><center>' . $strDay . '</center></th>';\n\n $strHtml .= '</thead><tr>';\n for ($j = 0; $j < $this->monthPadDates(); $j++) {\n $i++;\n $strHtml .= '<td></td>';\n }\n\n foreach ($this as $skeDate) {\n $i++;\n $strHtml .= '<td class=\"sked-cal-date' . (date('Y-m-d') !== $skeDate->format('Y-m-d') ? '' : ' sked-cal-date-current') . '\">';\n $strHtml .= '<span class=\"sked-cal-date-num\">' . $skeDate->format('j') . '</span>';\n $strHtml .= '<ul class=\"sked-cal-date-list\">';\n foreach ($skeDate->events() as $skeVent) {\n $strHtml .= '<li class=\"sked-cal-date-event\">'\n . '<a href=\"#\" class=\"sked-cal-event-link\" id=\"skevent-'\n . $skeVent->id . '\" data-owner-id=\"' . $skeVent->owner()\n . '\">'\n . $skeVent->label\n . '</a><span>' . $skeVent->time('g:ia', $this->strTimezone) . '</span>'\n . '</li>';\n }\n $strHtml .= '</ul>';\n $strHtml .= '</td>';\n if (7 === $i) {\n $i = 0;\n $strHtml .= '</tr><tr>';\n }\n }\n\n if ($i) {\n for ($j = $i; $j < 7; $j++) {\n $strHtml .= '<td></td>';\n }\n }\n\n return $strHtml . '</tr></table>';\n }", "public function getCalendarInfo()\n\t{\n\t\t\n\t\t//get URL to calendar page\n\t\t$url = $this->calendarLink;\n\t\t//Get the sourcecode\t\t\t\n\t\t$data = $this->curl->curlGetReq($url);\n\t\t//find all links to each person\n\t\t$query = \"//a\";\n\t\t$aTagNodes = $this->curl-> getDOMData($data,$query);\n\t\t\n\t\t$calendarDates = new CalendarDateRepository();\n\t\t//loop through each link, representing a person\n\t\tforeach ($aTagNodes as $at)\n\t\t{\n\t\t\t//get the href to that persons calendar\n\t\t\t$calURL =$at->getAttribute(\"href\");\n\t\t\t//get the sourcecode of that page\n\t\t\t$data = $this->curl->curlGetReq($url.$calURL);\n\t\t\t//get the table header containing name of the days\n\t\t\t$query = \"//th\";\n\t\t\t$days = $this->curl->getDOMData($data,$query);\n\t\t\t//get the table data containing availability\n\t\t\t$query = \"//td\";\n\t\t\t$availibility = $this->curl->getDOMData($data,$query);\t\t\t\n\n\t\t\t$dates = array();\n\t\t\t/*\n\t\t\t* loop table data, if the availability of that day is ok\n\t\t\t* save that data.\n\t\t\t*/\n\t\t\tfor ($i=0; $i < $days->length ; $i++)\n\t\t\t{ \n\t\t\t\t$availibilityStr =$availibility[$i]->nodeValue;\n\t\n\t\t\t\tif(strtolower($availibilityStr) === \"ok\")\n\t\t\t\t{\t\n\t\t\t\t\t//$calendarDates->add($days[$i]->nodeValue);\n\t\t\t\t\t$dates[] = new Day($days[$i]->nodeValue);\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\t$calendarDates->add($dates);\n\t\t\t\n\t\t }\n\t\t\n\t\treturn $calendarDates; \n\t}", "function draw_calendar(){\r\n \r\n $year = date(\"Y\");\r\n $monthCurrent = date(\"m\");\r\n $monthNext1 = date(\"m\", strtotime('+1 month'));\r\n $monthNext2 = date(\"m\", strtotime('+2 month'));\r\n $monthNext3 = date(\"m\", strtotime('+3 month'));\r\n $monthNext4 = date(\"m\", strtotime('+4 month'));\r\n $monthNext5 = date(\"m\", strtotime('+5 month'));\r\n\r\n $monthCurrentStr = date(\"M\");\r\n $monthNext1Str = date(\"M\", strtotime('+1 month'));\r\n $monthNext2Str = date(\"M\", strtotime('+2 month'));\r\n $monthNext3Str = date(\"M\", strtotime('+3 month'));\r\n $monthNext4Str = date(\"M\", strtotime('+4 month'));\r\n $monthNext5Str = date(\"M\", strtotime('+5 month'));\r\n\r\n\r\n $numberofday1 = cal_days_in_month(CAL_GREGORIAN,$monthCurrent , $year);\r\n $numberofday2 = cal_days_in_month(CAL_GREGORIAN,$monthNext1 , $year);\r\n $numberofday3 = cal_days_in_month(CAL_GREGORIAN,$monthNext2 , $year);\r\n $numberofday4 = cal_days_in_month(CAL_GREGORIAN,$monthNext3 , $year);\r\n $numberofday5 = cal_days_in_month(CAL_GREGORIAN,$monthNext4 , $year);\r\n $numberofday6 = cal_days_in_month(CAL_GREGORIAN,$monthNext5 , $year);\r\n\r\n \r\n\t/* draw table */\r\n $calendar = '<table cellpadding=\"0\" cellspacing=\"2\" style=\"width:100%;\" class=\"calendar\"><thead>';\r\n $calendar.= '<tr>';\r\n $calendar.= '<th colspan=\"3\"> <center>'.$monthCurrentStr.'</center> </th>';\r\n $calendar.= '<th colspan=\"3\"> <center>'.$monthNext1Str.'</center> </th>';\r\n $calendar.= '<th colspan=\"3\"> <center>'.$monthNext2Str.'</center> </th>';\r\n $calendar.= '<th colspan=\"3\"> <center>'.$monthNext3Str.'</center> </th>';\r\n $calendar.= '<th colspan=\"3\"> <center>'.$monthNext4Str.'</center> </th>';\r\n $calendar.= '<th colspan=\"3\"> <center>'.$monthNext5Str.'</center> </th>';\r\n \r\n \r\n\r\n\t\r\n\t/* final row */\r\n $calendar.= '</tr></head>'; \r\n $calendar.= '<tbody><tr>';\r\n // for($i = 1 ,$j = 1 ,$k = 1 ; $i <= $numberofday1, $j = $numberofday2, $k <= $numberofday3 ; $i++, $j++, $k++)\r\n $i = 0 ;\r\n $j = 0;\r\n $k = 0;\r\n $i1 = 0 ;\r\n $j1 = 0;\r\n $k1 = 0;\r\n $u = 0;\r\n\r\n \r\n while( $i <= $numberofday1 || $j <= $numberofday2 || $k <= $numberofday3 || $i1 <= $numberofday4 || $j1 <= $numberofday5 || $k1 <= $numberofday6 )\r\n { $i++;\r\n $j++;\r\n $k++;\r\n $i1++;\r\n $j1++;\r\n $k1++;\r\n $myDay = 0;\r\n $u=0;\r\n if($i <= $numberofday1 ){\r\n\r\n //Verification des jours feries\r\n\r\n $todayCheckHoliday1 = mktime(0, 0, 0, $monthCurrent, $i, $year); \r\n $today1 = unixtojd(mktime(0, 0, 0, $monthCurrent, $i, $year));\r\n $today = cal_from_jd($today1, CAL_GREGORIAN);\r\n //$todayCheckHoliday = new DateTime($year.'-'.$monthCurrent.'-'.$i.' 00:00:00');\r\n // echo $holidays[1];\r\n // echo $todayCheckHoliday;\r\n \r\n \r\n //////////////////////////////////////////////////\r\n if(($today[\"abbrevdayname\"] == \"Sun\") || ($today[\"abbrevdayname\"] == \"Sat\")){ $color = \"gray\";}\r\n else {$color = \"\";}\r\n\r\n $calendar.= '<td class=\"small\" > '.$i.' </td>';\r\n $calendar.= '<td class=\"small\" > '.$today[\"abbrevdayname\"].' </td>'; \r\n $calendar.= '<td class=\"caseBloque\" id=\"'.$year.'-'.$monthCurrent.'-'.$i.'\" style=\"background-color:'.$color.'\" onclick=\"myEvent(this)\">';\r\n $calendar.= '<div class=\"row\"><div class=\"col-sm-2\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthCurrent.'-'.$i.':1\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-2\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthCurrent.'-'.$i.':2\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-2\"></div></div></td>';\r\n \r\n }\r\n\r\n else{\r\n\r\n $calendar.= '<td class=\"small\" style=\"background-color:'.$color.'\" ></td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> </td>';\r\n $calendar.= '<td style=\"\"> </td>';\r\n }\r\n\r\n if($j <= $numberofday2 ){\r\n\r\n $todayCheckHoliday1 = mktime(0, 0, 0, $monthNext1, $j, $year);\r\n $todayCheckHoliday = new DateTime($year.'-'.$monthNext1.'-'.$j.' 00:00:00');\r\n\r\n $today1 = unixtojd(mktime(0, 0, 0, $monthNext1,$j, $year));\r\n $today = cal_from_jd($today1, CAL_GREGORIAN);\r\n\r\n if(($today[\"abbrevdayname\"] == \"Sun\") || ($today[\"abbrevdayname\"] == \"Sat\")){ $color = \"gray\";}\r\n else {$color = \"\";}\r\n\r\n\r\n $calendar.= '<td class=\"small\" style=\"\" > '.$j.' </td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> '.$today[\"abbrevdayname\"].' </td>';\r\n $calendar.= '<td class=\"caseBloque\" id=\"'.$year.'-'.$monthNext1.'-'.$j.'\" style=\"background-color:'.$color.'\" onclick=\"myEvent(this)\">';\r\n $calendar.= '<div class=\"row\"><div class=\"col-sm-2\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext1.'-'.$j.':1\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-1\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext1.'-'.$j.':2\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-2\"></div></div></td>';\r\n \r\n }\r\n else{\r\n\r\n $calendar.= '<td class=\"small\" style=\"background-color:\" ></td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> </td>';\r\n $calendar.= '<td style=\"\"> </td>';\r\n }\r\n if($k <= $numberofday3 ){\r\n\r\n $today1 = unixtojd(mktime(0, 0, 0,$monthNext2, $k, $year));\r\n $today = cal_from_jd($today1, CAL_GREGORIAN);\r\n\r\n if(($today[\"abbrevdayname\"] == \"Sun\") || ($today[\"abbrevdayname\"] == \"Sat\")) { $color = \"gray\";}\r\n else {$color = \"\";}\r\n\r\n $calendar.= '<td class=\"small\" style=\"\" > '.$k.' </td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> '.$today[\"abbrevdayname\"].' </td>';\r\n $calendar.= '<td class=\"caseBloque\" id=\"'.$year.'-'.$monthNext2.'-'.$k.'\" style=\"background-color:'.$color.'\" onclick=\"myEvent(this)\">';\r\n $calendar.= '<div class=\"row\"><div class=\"col-sm-2\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext2.'-'.$k.':1\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-1\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext2.'-'.$k.':2\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-2\"></div></div></td>';\r\n \r\n }\r\n else{\r\n $calendar.= '<td class=\"small\" style=\"background-color:#d1d2d3\" ></td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> </td>';\r\n $calendar.= '<td style=\"\"></td>';\r\n }\r\n if($i1 <= $numberofday4 ){\r\n\r\n $today1 = unixtojd(mktime(0, 0, 0,$monthNext3, $i1, $year));\r\n $today = cal_from_jd($today1, CAL_GREGORIAN);\r\n\r\n if(($today[\"abbrevdayname\"] == \"Sun\") || ($today[\"abbrevdayname\"] == \"Sat\")){ $color = \"gray\";}\r\n else {$color = \"\";}\r\n\r\n $calendar.= '<td class=\"small\" style=\"\" > '.$i1.' </td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> '.$today[\"abbrevdayname\"].' </td>'; \r\n $calendar.= '<td class=\"caseBloque\" id=\"'.$year.'-'.$monthNext3.'-'.$i1.'\" style=\"background-color:'.$color.'\" onclick=\"myEvent(this)\">';\r\n $calendar.= '<div class=\"row\"><div class=\"col-sm-2\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext3.'-'.$i1.':1\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-1\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext3.'-'.$i1.':2\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-2\"></div></div></td>';\r\n \r\n }\r\n else{\r\n $calendar.= '<td class=\"small\" style=\"\" > </td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> </td>';\r\n $calendar.= '<td style=\"\"> </td>';\r\n }\r\n if($j1 <= $numberofday5 ){\r\n\r\n $today1 = unixtojd(mktime(0, 0, 0,$monthNext4, $j1, $year));\r\n $today = cal_from_jd($today1, CAL_GREGORIAN);\r\n\r\n if(($today[\"abbrevdayname\"] == \"Sun\") || ($today[\"abbrevdayname\"] == \"Sat\")){ $color = \"gray\";}\r\n else {$color = \"\";}\r\n\r\n $calendar.= '<td class=\"small\" style=\"\" > '.$j1.' </td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> '.$today[\"abbrevdayname\"].' </td>';\r\n $calendar.= '<td class=\"caseBloque\" id=\"'.$year.'-'.$monthNext4.'-'.$j1.'\" style=\"background-color:'.$color.'\" onclick=\"myEvent(this)\">';\r\n $calendar.= '<div class=\"row\"><div class=\"col-sm-2\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext4.'-'.$j1.':1\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-1\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext4.'-'.$j1.':2\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-2\"></div></div></td>';\r\n \r\n }\r\n else{\r\n\r\n $calendar.= '<td class=\"small\" style=\"\" > </td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> </td>';\r\n $calendar.= '<td style=\"\"> </td>';\r\n }\r\n if($k1 <= $numberofday6 ){\r\n\r\n $today1 = unixtojd(mktime(0, 0, 0,$monthNext5, $k1, $year));\r\n $today = cal_from_jd($today1, CAL_GREGORIAN);\r\n\r\n if(($today[\"abbrevdayname\"] == \"Sun\") || ($today[\"abbrevdayname\"] == \"Sat\")){ $color = \"gray\";}\r\n else {$color = \"\";}\r\n\r\n $calendar.= '<td class=\"small\" style=\"\" > '.$k1.' </td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> '.$today[\"abbrevdayname\"].' </td>';\r\n $calendar.= '<td class=\"caseBloque\" id=\"'.$year.'-'.$monthNext5.'-'.$k1.'\" style=\"background-color:'.$color.'\" onclick=\"myEvent(this)\">';\r\n $calendar.= '<div class=\"row\"><div class=\"col-sm-2\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext5.'-'.$k1.':1\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-1\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext5.'-'.$k1.':2\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-2\"></div></div></td>';\r\n \r\n }\r\n else{\r\n \r\n $calendar.= '<td class=\"small\" style=\"background-color:'.$color.'\" > </td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> </td>';\r\n $calendar.= '<td style=\"\"> </td>';\r\n }\r\n\r\n \r\n\r\n \r\n $calendar.= '</tr>';\r\n }\r\n \r\n\r\n \r\n\t\r\n\t/* final row */\r\n $calendar.= '</tr>';\r\n \r\n\r\n\r\n\t/* end the table */\r\n\t$calendar.= '</tbody></table>';\r\n\t\r\n\t/* all done, return result */\r\n\treturn $calendar;\r\n}", "public function render()\r\n\t{\r\n\t\t$days = 1;\r\n\t\t$this->redirect = isset($this->redirect) ? $this->redirect: $this->getURL() ;\r\n\t\t$this->set_date();\r\n\t\t$total_days = cal_days_in_month(CAL_GREGORIAN, $this->month, $this->year);\r\n\t\t$first_spaces = date(\"w\", mktime(0, 0, 0, $this->month, 1, $this->year));\r\n\t\t$currentday = $this->UID('day');\r\n\r\n\t\tif (isset($this->inForm))\r\n\t\t{\r\n\t\t\t$CObjID = $this->UID('calendar');\r\n\t\t\t$DateString = ($this->Value()) ? '\",\"'.$this->Value() : '';\r\n\t\t\t$this->output = '<script language=\"javascript\">'.\"\\n\".'var '.$CObjID.' = new Calendar(\"'.$this->ID.$DateString.'\");'.\"\\n\"\r\n\t\t\t.$CObjID.'.currentDateStyle = \"'.$this->currentDateStyle.'\";'.\"\\n\"\r\n\t\t\t.$CObjID.'.selectedDateStyle = \"'.$this->selectedDateStyle.'\";'.\"\\n\"\r\n\t\t\t.$CObjID.'.normalDateStyle = \"'.$this->normalDateStyle.'\";'.\"\\n\"\r\n\t\t\t.$CObjID.'.setStyles();'.\"\\n\"\r\n\t\t\t.'</script>'.\"\\n\"\r\n\t\t\t.'<input type=\"hidden\" id=\"'.$CObjID.'\" name=\"'.$CObjID.'\" value=\"'.$this->Value().'\"/>'.\"\\n\";\r\n\t\t}\r\n\t\telse $this->output = '';\r\n\r\n\t\t$NavUrls = $this->url_params($this->UID('year'),$this->UID('month'),$this->UID('day'),array_keys($this->add_params_sel));\r\n\r\n\t\t$this->output.= '<table class=\"calendar\"><tr><td class=\"'.$this->navigateStyle.'\"><a id=\"'.$this->UID('navigateback').'\" class=\"'.$this->navigateStyle.'\" href=\"'.$this->getURL().\r\n\t\t\t'?'.$this->add_params_sel().'&'.$this->UID('month').'='.($this->month-1).'&'.$this->UID('year').'='.$this->year.$NavUrls.'\"><</a>\r\n\t\t </td><td id=\"'.$this->UID('Month').'\" colspan=\"5\" class=\"'.$this->monthStyle.'\">'.$this->RUS_MONTHS[date(\"n\", mktime(0, 0, 0, $this->month, 1, $this->year))-1].'&nbsp;'.$this->year.'\r\n\t\t </td><td class=\"'.$this->navigateStyle.'\"><a id=\"'.$this->UID('navigatenext').'\" class=\"'.$this->navigateStyle.'\" href=\"'.$this->getURL().'?'.$this->add_params_sel().'&'.$this->UID('month').'='.($this->month+1).'&'.$this->UID('year').'='.$this->year.$NavUrls.'\">></a>\r\n\t\t </td></tr><tr class=\"'.$this->daysOfTheWeekStyle.'\"><td>Ïí</td><td>Âò</td><td>Ñð</td><td>×ò</td><td>Ïò</td><td>Ñá</td><td>Âñ</td></tr>';\r\n\r\n \tfor ($Week=0;$Week<6;$Week++)\r\n \t{\r\n \t$this->output.= '<tr>';\r\n\r\n\t\t\t\tfor ($Day=0;$Day<7;$Day++)\r\n \t{\r\n\r\n\t\t\t\t\t$days++;\r\n\t\t\t\t\t$dDay = $days - $first_spaces;\r\n\t\t\t\t\t$norm_style = ($this->isDayAvailable($dDay))?$this->availDateStyle:$this->normalDateStyle;\r\n\t\t\t\t\t\r\n//\t\t\t\t\techo('dDay='.$dDay.'<br/>avail dates:');\r\n//\t\t\t\t\tforeach($this->availDates as $date)\r\n//\t\t\t\t\t\techo(date('d/m/Y',$date).'<br/>');\r\n\r\n\t\t\t\t\t$CellID = $this->UID('item['.$days.']');\r\n\r\n\t\t\t\t\tif ($days > $first_spaces && ($dDay) < $total_days + 1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$LinkID = $this->UID('hlink['.$days.']');\r\n\t\t\t\t\t\t$currentSelectedDay = '<td id=\"'.$CellID.'\" class=\"'.$this->selectedDateStyle.'\"><a id=\"'.$LinkID.'\" class=\"'.$this->selectedDateStyle.'\"';\r\n\t\t\t\t\t\t$CurrentDate = isset($_REQUEST[$currentday]) ? $_REQUEST[$currentday]: '';\r\n\r\n\t\t\t\t\t\tif ($CurrentDate == $dDay)\t$this->output.= $currentSelectedDay;\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$this->output.='<td id=\"'.$CellID.'\" class=';\r\n\t\t\t\t\t\t\t$this->output.= ($dDay==date(\"j\") && $this->year==date(\"Y\") && $this->month==date(\"n\")) ?\r\n\t\t\t\t\t\t\t\t'\"'.$this->currentDateStyle.'\"><a id=\"'.$LinkID.'\" class=\"'.$this->currentDateStyle.'\"' :\r\n\t\t\t\t\t\t\t\t'\"'.$norm_style.'\"><a id=\"'.$LinkID.'\" class=\"'.$this->normalDateStyle.'\"';\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif($this->isDayAvailable($dDay))\r\n\t\t\t\t\t\t\t$this->output.= 'href=\"'.$this->redirect.'?'.$this->add_params_day().'&'.$currentday.'='.$dDay.$this->url_params($currentday,array_keys($this->add_params_day)).'\">'.$dDay.'</a></td>';\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t$this->output.= '>'.$dDay.'</a></td>';\r\n\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$this->output.='<td id=\"'.$CellID.'\" class=\"'.$this->normalDateStyle.'\"></td>'.\"\\n\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$this->output.=\"</tr>\";\r\n \t}\r\n\r\n\t\t$this->output.= '</table>';\r\n\r\n\t\treturn $this->output;\r\n\t}", "private function makeHTMLIterator()\n\t{\n\t\t$this->weekDayNum = $this->firstDayOfTheMonth+1;\n\t\tfor($this->dayOfMonth; $this->dayOfMonth <= $this->daysInMonth; $this->dayOfMonth++) {\n\t\t\t// Set the default style\n\t\t\t$style = 'class=\"normalDay\"';\n\t\t\t\n\t\t\t// Set the style to a weekend day style\n\t\t\tif(($this->weekDayNum == 8)||($this->weekDayNum == 7)) {\n\t\t\t\t$style = 'class=\"weekendDay\"';\n\t\t\t}\n\t\t\t\n\t\t\t// Set the style to a current day style\n\t\t\tif($this->curDay == $this->dayOfMonth) {\n\t\t\t\t$style = 'class=\"currentDay\"';\n\t\t\t}\n\t\t\t\n\t\t\t// If the current day is Sunday, add a new row\n\t\t\tif($this->weekDayNum == 8) {\n\t\t\t\t$this->calWeekDays .= \"\\t</tr>\\n\\t<tr>\\n\";\n\t\t\t\t$this->weekDayNum = 1;\n\t\t\t}\n\n\t\t\t// Draw days\n\t\t\t$this->calWeekDays .= \"\\t\\t<td valign=\\\"top\\\" \".$style.'>'.$this->dayOfMonth;\n\t\t\t\n\t\t\tif($this->addWeekDay) {\n\t\t\t\t$this->calWeekDays .= \"|\".$this->weekDayNum;\n\t\t\t}\n\t\t\t\n\t\t\tif(strlen($this->addEvtDest) > 0) {\n\t\t\t\t$addevtimg = (strlen($this->addEvtImg) > 0 ? '<img src=\"'.$this->addEvtImg.'\" class=\"addevtimg\" />' : '+');\n\t\t\t\t$this->calWeekDays .= '[<a href=\"'.$this->addEvtDest.'?date='.$this->curYear.'-'.$this->curMonth.'-'.$this->dayOfMonth.'\" title=\"Add Event\" class=\"addevt\">'.$addevtimg.'</a>]';\n\t\t\t}\n\t\t\t\n\t\t\t$this->calWeekDays .= \" \".$this->makeDayEventListHTML().\"</td>\\n\";\n\t\t\t\n\t\t\t$this->weekDayNum++;\n\t\t}\n\t}", "public function ownerCombinedCal()\n {\n // Restricted access\n if ( ! $this->ownerLoggedIn() )\n {\n $this->restricted();\n return;\n }\n\n require_once('views/OwnerCombinedCalView.class.php');\n $site = new SiteContainer($this->db);\n $page = new OwnerCombinedCalView();\n \n $site->printHeader();\n $site->printNav(\"owner\");\n $site->printCombinedCalFooter();\n $page->printHtml();\n $page->printCalendar(); \n\n }", "public function index() {\n\t\t$employees = Employee::all();\n\t\t$descriptionSigns = DescriptionSign::all();\n\t\t$month = date('m');\n\t\t$year = date('Y');\n\t\tforeach ($employees as $key => $value) {\n\t\t\t$calendar = Calendar::where('employee_id', '=', $value->id)->where('month',$month)->where('year',$year)->first();\n\t\t\tif($calendar == null)\n\t\t\t{\n\t\t\t\t$calendar = $this->bornCalendarEmpty($value->id,$month,$year);\n\t\t\t}\n\t\t\t$this->generatePresenteWhenInitNewDate($calendar, $month, $year);\n\t\t\t$employees[$key]->calendar = $calendar;\n\t\t}\n\n\t\t$func = function($emp) {\n\t\t return $emp->year;\n\t\t};\n\t\t// Year is stored in database calendar.\n\t\t$years = collect(Calendar::all())->map($func);\n\t\t$years = array_unique($years->toArray());\n\n\t\treturn view('calendar.calendar', compact('employees','month','year','years','descriptionSigns'));\n\t}", "function drawCalendar($month, $year) {\n $first = mktime(0,0,0,$month,1,$year); // timestamp for first of the month\n $offset = date('w', $first); // what day of the week we start counting on\n $daysInMonth = date('t', $first);\n $monthName = date('F', $first);\n $weekDays = array('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat');\n $eventDays = getEventDays($month, $year);\n \n // Start drawing calendar\n $out = \"<table id=\\\"myCalendar\\\">\\n\";\n $out .= \"<tr><th colspan=\\\"3\\\">$monthName $year</th></tr>\\n\";\n $out .= \"<tr>\";\n foreach ($weekDays as $wd) $out .= \"<td class=\\\"weekDays\\\">$wd</td>\\n\";\n\n\n // Previous month link\n $prevTS = strtotime(\"$year-$month-01 -1 month\"); // timestamp of the first of last month\n $pMax = date('t', $prevTS);\n $pDay = ($day > $pMax) ? $pMax : $day;\n list($y, $m) = explode('-', date('Y-m', $prevTS)); \n $pMax = date('t', $prevTS);\n $pDay = ($day > $pMax) ? $pMax : $day;\n list($y, $m) = explode('-', date('Y-m', $prevTS));\n echo \"<p>\";\n echo \"<a href=\\\"?year=$year&month=$m&day=$pDay\\\"><< Prev</a>\\n\";\n\n // Next month link\n $nextTS = strtotime(\"$year-$month-01 +1 month\");\n $nMax = date('t', $nextTS);\n $nDay = ($day > $nMax) ? $nMax : $day;\n list($y, $m) = explode('-', date('Y-m', $nextTS));\n echo \"<a href=\\\"?year=$y&month=$m&day=$nDay\\\">Next >></a>\\n\";\n echo \"</p>\";\n\n\n // Build Previous and Next Links from untitled-6\n //$previous_link = \"<a href=\\\"\".$_SERVER['PHP_SELF'].\"?date=\";\n //if($month == 1){\n // $previous_link .= mktime(0,0,0,12,$day,($year -1));\n //} else {\n // $previous_link .= mktime(0,0,0,($month -1),$day,$year);\n //}\n\n //$previous_link .= \"\\\"><< </a>\";\n\n //$next_link = \"<a href=\\\"\".$_SERVER['PHP_SELF'].\"?date=\";\n //if($month == 12){\n // $next_link .= mktime(0,0,0,1,$day,($year + 1));\n //} else {\n // $next_link .= mktime(0,0,0,($month +1),$day,$year);\n //}\n //$next_link .= \"\\\"> >></a>\";\n\n $i = 0;\n for ($d = (1 - $offset); $d <= $daysInMonth; $d++) {\n if ($i % 7 == 0) $out .= \"<tr>\\n\"; // Start new row\n if ($d < 1) $out .= \"<td class=\\\"nonMonthDay\\\"> </td>\\n\";\n else {\n if (in_array($d, $eventDays)) {\n $out .= \"<td class=\\\"monthDay\\\">\\n\";\n $out .= \"<a href=\\\"?year=$year&month=$month&day=$d\\\">$d</a>\\n\";\n $out .= \"</td>\\n\";\n } else $out .= \"<td class=\\\"monthDay\\\">$d</td>\\n\";\n }\n ++$i; // Increment position counter\n if ($i % 7 == 0) $out .= \"</tr>\\n\"; // End row on the 7th day\n }\n \n // Round out last row if we don't have a full week\n if ($i % 7 != 0) {\n for ($j = 0; $j < (7 - ($i % 7)); $j++) {\n $out .= \"<td class=\\\"nonMonthDay\\\"> </td>\\n\";\n }\n $out .= \"</tr>\\n\";\n }\n \n $out .= \"</table>\\n\";\n \n return $out;\n }", "public function show() {\n $year = null;\n \n $month = null;\n \n if(null==$year&&isset($_GET['year'])){\n \n $year = $_GET['year'];\n \n }else if(null==$year){\n \n $year = date(\"Y\",time()); \n \n } \n \n if(null==$month&&isset($_GET['month'])){\n \n $month = $_GET['month'];\n \n }else if(null==$month){\n \n $month = date(\"m\",time());\n \n } \n \n $this->thisYear=$year;\n \n $this->thisMonth=$month;\n \n $this->daysInMonth=$this->_daysInMonth($month,$year); \n \n $content='<div id=\"calendar\">'.\n\t\t\t\t\t\"<img src = 'img/manadensbabe/$month.jpg'>\".\n\t\t\t\t\t\n '<div class=\"box\">'.\n $this->_createNavi().\n '</div>'.\n '<div class=\"box-content\">'.\n '<ul class=\"label\">'.$this->_createCalender().'</ul>'; \n $content.='<div class=\"clear\"></div>'; \n $content.='<ul class=\"dates\">'; \n \n $weeksInMonth = $this->_weeksInMonth($month,$year);\n \n for( $i=0; $i<$weeksInMonth; $i++ ){\n \n for($j=1;$j<=7;$j++){\n $content.=$this->_showDay($i*7+$j);\n }\n }\n \n $content.='</ul>';\n \n $content.='<div class=\"clear\"></div>'; \n \n $content.='</div>';\n \n $content.='</div>';\n return $content; \n }", "public function index()\n {\n $this->view('calendar');\n }", "function draw_calendar($month,$year){\n\n\t\t/* draw table */\n\t\t$calendar = '<table cellpadding=\"0\" cellspacing=\"0\" class=\"calendar\">';\n\n\t\t/* table headings */\n\t\t$headings = array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');\n\t\t$calendar.= '<tr class=\"calendar-row\"><td class=\"calendar-day-head\">'.implode('</td><td class=\"calendar-day-head\">',$headings).'</td></tr>';\n\n\t\t/* days and weeks vars now ... */\n\t\t$running_day = date('w',mktime(0,0,0,$month,1,$year));\n\t\t$days_in_month = date('t',mktime(0,0,0,$month,1,$year));\n\t\t$days_in_this_week = 1;\n\t\t$day_counter = 0;\n\t\t$dates_array = array();\n\n\t\t/* row for week one */\n\t\t$calendar.= '<tr class=\"calendar-row\">';\n\n\t\t/* print \"blank\" days until the first of the current week */\n\t\tfor($x = 0; $x < $running_day; $x++):\n\t\t\t$calendar.= '<td class=\"calendar-day-np\"> </td>';\n\t\t\t$days_in_this_week++;\n\t\tendfor;\n\n\t\t/* keep going with days.... */\n\t\tfor($list_day = 1; $list_day <= $days_in_month; $list_day++):\n\t\t\t$calendar.= '<td class=\"calendar-day\"><a href=\"appointments.php?day=' . $list_day . '&month=' . $GLOBALS['curMonth'] . '&year=' . $GLOBALS['curYear'] . '\">';\n\t\t\t\t/* add in the day number */\n\t\t\t\t$calendar.= '<div class=\"day-number\">'.$list_day.'</div>';\n\n\t\t\t\t/** QUERY THE DATABASE FOR AN ENTRY FOR THIS DAY !! IF MATCHES FOUND, PRINT THEM !! **/\n\t\t\t\t$calendar.= str_repeat('<p> </p>',2);\n\t\t\t\t\n\t\t\t$calendar.= '</a></td>';\n\t\t\tif($running_day == 6):\n\t\t\t\t$calendar.= '</tr>';\n\t\t\t\tif(($day_counter+1) != $days_in_month):\n\t\t\t\t\t$calendar.= '<tr class=\"calendar-row\">';\n\t\t\t\tendif;\n\t\t\t\t$running_day = -1;\n\t\t\t\t$days_in_this_week = 0;\n\t\t\tendif;\n\t\t\t$days_in_this_week++; $running_day++; $day_counter++;\n\t\tendfor;\n\n\t\t/* finish the rest of the days in the week */\n\t\tif($days_in_this_week < 8):\n\t\t\tfor($x = 1; $x <= (8 - $days_in_this_week); $x++):\n\t\t\t\t$calendar.= '<td class=\"calendar-day-np\"> </td>';\n\t\t\tendfor;\n\t\tendif;\n\n\t\t/* final row */\n\t\t$calendar.= '</tr>';\n\n\t\t/* end the table */\n\t\t$calendar.= '</table>';\n\t\t\n\t\t/* all done, return result */\n\t\treturn $calendar;\n\t}", "public function CreateSelectArray()\n {\n\t\t//Make the array relative to today.... ill do later.\n\t\t$this->TodayDate = \"\";\n\t\t$this->TodaysDate = $this->GetTodaysDate();\t \t\n\t\t$days = 0;\t\t\n \n\t\t$LISTofDATES = [];\n\t\t\n\t\tfor($ya = 2020; $ya < 2040; $ya++) {\n\t\t\t$year = \"\".$ya.\"\";\n\t\t\t$LISTofDATES[$year] = [ \"January\" => 0, \"February\" => 0, \"March\" => 0, \"April\" => 0, \"May\" => 0, \"June\" => 0, \"July\" => 0, \"August\" => 0, \"September\" => 0, \"October\" => 0, \"November\" => 0, \"December\" => 0 ];\t \n\t\t}\n\n\t\tforeach ( $LISTofDATES as $Year => $Months )\n\t\t{\t\t\t\n\t\t\tfor( $Month = 1; $Month <= 12; $Month++ )\n\t\t\t{\n\t\t\t\tif ( $Month == 1 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['January'] = $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 2 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['February'] = $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 3 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['March'] = $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 4 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['April'] = $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 5 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['May'] = $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 6 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['June'] = $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 7 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['July'] = $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 8 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['August'] = $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 9 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['September'] = $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 10 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['October'] = $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 11 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['November']= $days;\n\t\t\t\t}\n\t\t\t\tif ( $Month == 12 )\n\t\t\t\t{\n\t\t\t\t\t$days = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);\n\t\t\t\t\t$LISTofDATES[$Year]['December'] = $days;\n\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t}\t \n\t\t}//For each Year done\t\t\n\t\t/*Should have a fully populated array of days for each month in 2 years*/\t\t\n\t\treturn json_encode($LISTofDATES);\t\t\t\t\n }", "public function toArray()\n {\n $event = array();\n\n if ($this->id !== null) {\n $event['id'] = $this->id;\n }\n\n $event['title'] = $this->title;\n $event['mainTitle'] = $this->title;\n $event['note'] = $this->note;\n $event['start'] = $this->startDatetime->format(\"Y-m-d\\TH:i:sP\");\n\n if ($this->url !== null) {\n $event['url'] = $this->url;\n }\n\n if ($this->project !== null) {\n $event['project']['id'] = $this->project->getId();\n $event['project']['title'] = $this->project->getTitle();\n $event['project']['acronym'] = $this->project->getAcronym();\n $event['mainTitle'] = '['.$this->project->getAcronym().'] '.$this->title;\n }\n\n if ($this->category !== null) {\n $event['categoryId'] = $this->category->getId();\n $event['category']['id'] = $this->category->getId();\n $event['category']['title'] = $this->category->getTitle();\n }\n\n if ($this->bgColor !== null) {\n $event['backgroundColor'] = $this->bgColor;\n $event['borderColor'] = $this->bgColor;\n }\n\n if ($this->fgColor !== null) {\n $event['textColor'] = $this->fgColor;\n }\n\n if ($this->cssClass !== null) {\n $event['className'] = $this->cssClass;\n }\n\n if ($this->endDatetime !== null) {\n $event['end'] = $this->endDatetime->format(\"Y-m-d\\TH:i:sP\");\n }\n\n $event['allDay'] = $this->allDay;\n\n foreach ($this->otherFields as $field => $value) {\n $event[$field] = $value;\n }\n\n return $event;\n }", "public function displayCalendar($params)\n {\n $res = array(\n 'status' => 'ng',\n 'msg' => '',\n 'data' => array()\n );\n\n // data from the database\n $data = $this->getData($params);\n if ($data === false) {\n return $res;\n }\n\n // this will get the calendar date\n $date = $this->getDate($params);\n\n // combined data\n $calendarData = $this->getCalendarData($data, $date);\n\n // sorted data\n $sortedData = $this->sortedCalendar($calendarData);\n\n $res['status'] = 'ok';\n $res['data'] = array(\n 'site_url' => $params['site_url'],\n 'home_url' => home_url(),\n 'plugin_dir' => $params['plugin_dir'],\n 'calendarnm' => (int)$params['place'] > 1 ? '川下グラウンド':'拓北野球場',\n 'date' => substr($params['date'], 0, 4).'年'.substr($params['date'], -5, 2).'月',\n 'calendar' => $sortedData,\n 'next' => date(\"Y年m月\", mktime(0, 0, 0, substr($params['date'], -5, 2)+1, 1, substr($params['date'], 0, 4))),\n 'before' => date(\"Y年m月\", mktime(0, 0, 0, substr($params['date'], -5, 2)-1, 1, substr($params['date'], 0, 4))),\n 'type' => $params['place'],\n 'datenormal' => substr($params['date'], 0, 4).'-'.substr($params['date'], -5, 2),\n 'edit_date' => isset($params['edit_date'])?$params['edit_date']:''\n );\n\n return $res;\n }", "public function actionCalendar()\n {\n // Get current ID of logined user\n $userId = Yii::$app->user->getId() ?: '1000';\n $profile = (new UsersProfile())->getProfile();\n\n // Fill array keyes with [1, .., date(\"t\")].\n // date(\"t\") - count of days in current month\n $calendar = array_fill_keys(range(1, date(\"t\")), []);\n $model = new TaskQuery(Task::class);\n\n foreach ($model->getByCurrentMonth($userId)->all() as $task) {\n // Get current $task->date and create new DateTime object\n // $date->format(\"j\") -- Day of the month: 1, 2, .., 31\n // Fill array $calender with $task objects\n $date = \\DateTime::createFromFormat(\"Y-m-d H:i:s\", $task->deadline);\n $calendar[$date->format(\"j\")][] = $task;\n }\n\n return $this->render('calendar', \\compact('calendar', 'profile'));\n }", "public function index()\n {\n (new Calendar())->getOutDays();\n $user = Auth::user();\n $year = $_GET['year'] ?? Carbon::now()->year;\n $data = array(\n \"hours\" => array(1, 2, 3, 4, 5, 6),\n \"date\" => Carbon::now('Europe/Paris'),\n \"categories\" => Category::all(),\n \"calendar\" => (new Calendar())->show(),\n \"navi\" => (new Calendar())->navigation(),\n \"counts\" => array(\n 'f' => Helpers::getCounter('f', $year, $user),\n 'cp' => Helpers::getCounter('cp', $year, $user),\n 'r' => Helpers::getCounter('r', $year, $user),\n 'am' => Helpers::getCounter('am', $year, $user),\n 'cs' => Helpers::getCounter('cs', $year, $user),\n 'a' => Helpers::getCounter('a', $year, $user),\n ),\n \"days\" => Helpers::getNumberRange(1, 31),\n \"months\" => Helpers::getNumberRange(1, 12),\n \"years\" => Helpers::getNumberRange(2015, 2030),\n );\n\n return view('pages.wcalendar.index', compact('data'));\n }", "public function get_calender_data()\n\t{\n\treturn $this->cal['VCALENDAR'];\n\t}", "function draw_calendar($year)\n {\n $calendar.= '<!DOCTYPE html>\n <html>\n <head>\n <meta charset=\"UTF-8\">\n <title>Calendar</title>\n <link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css\">\n <style>\n #today {\n background-color: lightgreen;\n }\n .day-number {\n text-align: center;\n }\n .calendar-week {\n width: 14%;\n text-align: center;\n }\n .container {\n text-align: center;\n }\n .col-centered{\n float: none;\n margin: 0 auto;\n }\n </style>\n </head>\n <body>';\n date_default_timezone_set(\"America/New_York\");\n $months = array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');\n for ($month = 1; $month <= 12; $month++)\n {\n //create header\n $header = '<h2>'.$months[$month-1].' '.$year.'</h2>';\n $calendar.= '<div class=\"row\"><div class=\"container col-xs-6 col-centered\"> <table class=\"table table-bordered\">';\n \n \t// write calendar table headings \n \t$headings = array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');\n \t$calendar.= $header.'<tr><td class=\"calendar-week\">'.implode('</td><td class=\"calendar-week\">',$headings).'</td></tr>';\n \n \t$starting_day = date('w', mktime(0, 0, 0, $month, 1, $year)); //the starting day of the week\n \t$days_in_month = date('t', mktime(0, 0, 0, $month, 1, $year));\n \t$days_this_week = 1;\n \t$day_counter = 0;\n \t$end_of_month = 0;\n \n \t// row for week one \n \t$calendar.= '<tr>';\n \t\n \t// display blank days until starting day of the current week\n \tfor($day = 0; $day < $starting_day; $day++):\n \t\t$calendar.= '<td> </td>';\n \t\t$days_this_week++; //add blank day to days\n \tendfor;\n \n \t// write days\n \tfor ($day = 1; $day <= $days_in_month; $day++):\n \t\tif ($day != date('d') && $month != date('n'))\n \t\t{\n \t\t\t$current_day = ''; //add blank td per day (that isnt today)\n \t\t}\n \t\t$calendar.= '<td class=\"calendar-day'.$current_day.'\">';\n \t\t\n \t\t\t// Add in the day number\n if ($day == date('d') && $month == date('n') && $year == date('Y')) //this day = today\n \t\t\t{\n \t\t\t\t$showtoday = '<div id=\"today\"> <strong>'.$day.'</strong></div>'; //add today (special styling)\n \t\t\t}else {\n \t\t\t $showtoday = $day;\n \t\t\t}\n \t\t\t$calendar.= '<div class=\"day-number\">'.$showtoday.'</div>'; //commit the date number to the td\n \n \t\t// end of first week\n \t\t$calendar.= '</td>';\n \t\tif($starting_day == 6):\n \t\t\t$calendar.= '</tr>'; // if end of week, end row\n \t\t\tif (($day_counter+1) != $days_in_month) //if today is not end of month, start new row\n \t\t\t{\n \t\t\t\t$calendar.= '<tr>';\n \t\t\t} else \n \t\t\t{\n \t\t\t $end_of_month = 1; // is end of month, so no need for new row\n \t\t\t}\n \t\t\t$starting_day = -1; // if end of week, mark as sunday-1 so when incrementing below, it goes to 0 (sunday)\n \t\t\t$days_this_week = 0; //reset days this week\n \t\tendif;\n \t\t$days_this_week++;\n \t\t$starting_day++;\n \t\t$day_counter++;\n \tendfor;\n \n \t// Finish the rest of blank days in the week\n \tif(($days_this_week < 8) && ($end_of_month == 0)): //last row of calendar, if end of month already has happened (ie on the last day of the previous week), do not add new cells\n \t\tfor($x = 1; $x <= (8 - $days_this_week); $x++):\n \t\t\t$calendar.= '<td> </td>';\n \t\tendfor;\n \tendif;\n \n \t// final row\n \t$calendar.= '</tr>';\n \n \t// end table tags\n \t$calendar.= '</table> </div> </div>';\n }\n // end tags and return\n $calendar.= '</body>\n </html>';\n return $calendar;\n }", "public static function day_calendar($day, $month, $year) {\r\n global $langNoEvents, $langDay, $langWeek, $langMonth, $langViewShow;\r\n\r\n $calendar_content = \"\";\r\n if (is_null($day)) {\r\n $day = 1;\r\n }\r\n $nextdaydate = new DateTime(\"$year-$month-$day\");\r\n $nextdaydate->add(new DateInterval('P1D'));\r\n $previousdaydate = new DateTime(\"$year-$month-$day\");\r\n $previousdaydate->sub(new DateInterval('P1D'));\r\n\r\n $thisday = new DateTime(\"$year-$month-$day\");\r\n $daydescription = ucfirst(format_locale_date($thisday->getTimestamp()));\r\n\r\n $backward = array('day'=>$previousdaydate->format('d'), 'month'=>$previousdaydate->format('m'), 'year' => $previousdaydate->format('Y'));\r\n $foreward = array('day'=>$nextdaydate->format('d'), 'month'=>$nextdaydate->format('m'), 'year' => $nextdaydate->format('Y'));\r\n\r\n $calendar_content .= '<div class=\"right\" style=\"width:100%\">'.$langViewShow.':&nbsp;'.\r\n '<a href=\"#\" onclick=\"show_day(selectedday, selectedmonth, selectedyear);return false;\">'.$langDay.'</a>&nbsp;|&nbsp;'.\r\n '<a href=\"#\" onclick=\"show_week(selectedday, selectedmonth, selectedyear);return false;\">'.$langWeek.'</a>&nbsp;|&nbsp;'.\r\n '<a href=\"#\" onclick=\"show_month(selectedday, selectedmonth, selectedyear);return false;\">'.$langMonth.'</a></div>';\r\n\r\n $calendar_content .= \"<table class='table-default'>\";\r\n $calendar_content .= \"<tr>\";\r\n $calendar_content .= '<td width=\"25\"><a href=\"#\" onclick=\"show_day('.$backward['day'].','.$backward['month'].','.$backward['year'].'); return false;\">&laquo;</a></td>';\r\n $calendar_content .= \"<td class='center'><b>$daydescription</b></td>\";\r\n $calendar_content .= '<td width=\"25\" class=\"right\"><a href=\"#\" onclick=\"show_day('.$foreward['day'].','.$foreward['month'].','.$foreward['year'].'); return false;\">&raquo;</a></td>';\r\n $calendar_content .= \"</tr>\";\r\n $calendar_content .= \"</table>\";\r\n\r\n $eventlist = Calendar_Events::get_calendar_events(\"day\", \"$year-$month-$day\");\r\n $calendar_content .= \"<table class='table-default'>\";\r\n\r\n $curhour = 0;\r\n $now = getdate();\r\n $today = new DateTime($now['year'].'-'.$now['mon'].'-'.$now['mday'].' '.$now['hours'].':'.$now['minutes']);\r\n if ($now['year'].'-'.$now['mon'].'-'.$now['mday'] == \"$year-$month-$day\") {\r\n $thisdayistoday = true;\r\n }\r\n else{\r\n $thisdayistoday = false;\r\n }\r\n $thishour = new DateTime($today->format('Y-m-d H:00'));\r\n $cursorhour = new DateTime(\"$year-$month-$day 00:00\");\r\n $curstarthour = \"\";\r\n\r\n foreach ($eventlist as $thisevent) {\r\n $thiseventstart = new DateTime($thisevent->start);\r\n $thiseventhour = new DateTime($thiseventstart->format('Y-m-d H:00'));\r\n if ($curstarthour != $thiseventhour) { //event date changed\r\n while($cursorhour < $thiseventhour) {\r\n if ($thisdayistoday && $thishour>=$cursorhour && intval($cursorhour->diff($thishour,true)->format('%h'))<6)\r\n $class = 'today';\r\n else\r\n $class = 'monthLabel';\r\n $calendar_content .= \"<tr><td colspan='3' class='$class'>\" . \"&nbsp;<b>\" . ucfirst($cursorhour->format('H:i')) . \"</b></td></tr>\";\r\n if (intval($cursorhour->diff($thiseventhour,true)->format('%h'))>6) {\r\n $calendar_content .= \"<tr><td colspan='3'>$langNoEvents</td></tr>\";\r\n }\r\n $cursorhour->add(new DateInterval('PT6H'));\r\n $curhour += 6;\r\n }\r\n\r\n if ($thisdayistoday && $thishour>=$cursorhour && intval($cursorhour->diff($thishour,true)->format('%h'))<6)\r\n $class = 'today';\r\n else\r\n $class = 'monthLabel';\r\n //No hour tr for the event\r\n //$calendar_content .= \"<tr><td colspan='3' class='$class'>\" . \"&nbsp;<b>\" . ucfirst($thiseventhour->format('H:i')) . \"</b></td></tr>\";\r\n if ($cursorhour <= $thiseventhour) {\r\n $cursorhour->add(new DateInterval('PT6H'));\r\n $curhour += 6;\r\n }\r\n }\r\n $calendar_content .= Calendar_Events::day_calendar_item($thisevent, 'even');\r\n $curstarthour = $thiseventhour;\r\n }\r\n /* Fill with empty days*/\r\n for($i=$curhour;$i<24;$i+=6) {\r\n if ($thisdayistoday && $thishour>=$cursorhour && intval($cursorhour->diff($thishour,true)->format('%h'))<6)\r\n $class = 'today';\r\n else\r\n $class = 'monthLabel';\r\n $calendar_content .= \"<tr><td colspan='3' class='$class'>\" . \"&nbsp;<b>\" . ucfirst($cursorhour->format('H:i')) . \"</b></td></tr>\";\r\n $calendar_content .= \"<tr><td colspan='3'>$langNoEvents</td></tr>\";\r\n $cursorhour->add(new DateInterval('PT6H'));\r\n }\r\n $calendar_content .= \"</table>\";\r\n /* Legend */\r\n $calendar_content .= Calendar_Events::calendar_legend();\r\n\r\n return $calendar_content;\r\n }", "public function calendar()\n {\n return view('pages.calendar');\n }", "function _getCalendarData( $year, $month, $day){\t\t\t\t\n\t\t$rows = $this->_listIcalEventsByMonth( $year, $month);\n \t\t\n\t\t$rowcount = count( $rows );\t\t\n\t\t$data = array();\n\t\t$data['year'] = $year;\n\t\t$data['month'] = $month;\n\t\t$month = intval($month);\n\t\tif( $month <= '9' ) {\n\t\t\t$month = '0' . $month;\n\t\t}\n\t\t$data['startday'] = $startday = (int) EventBookingHelper::getConfigValue('calendar_start_date');\t\t\n\t\t// get days in week\n\t\t$data[\"daynames\"] = array();\n\t\tfor( $i = 0; $i < 7; $i++ ) {\n\t\t\t$data[\"daynames\"][$i] = $this->_getDayName(($i+$startday)%7, true );\n\t\t}\t\t\n\t\t$data[\"dates\"]=array();\t\t\n\t\t//Start days\n\t\t$start = (( date( 'w', mktime( 0, 0, 0, $month, 1, $year )) - $startday + 7 ) % 7 );\t\t\n\t\t// previous month\n\t\t$priorMonth = $month-1;\n\t\t$priorYear = $year;\t\t\n\t\tif ($priorMonth <= 0) {\n\t\t\t$priorMonth += 12;\n\t\t\t$priorYear -= 1;\n\t\t}\t\t\t\n\t\t$dayCount=0;\n\t\tfor( $a = $start; $a > 0; $a-- ){\n\t\t\t$data[\"dates\"][$dayCount] = array();\n\t\t\t$data[\"dates\"][$dayCount][\"monthType\"] = \"prior\";\n\t\t\t$data[\"dates\"][$dayCount][\"month\"] = $priorMonth;\n\t\t\t$data[\"dates\"][$dayCount][\"year\"] = $priorYear;\n\t\t\t$data[\"dates\"][$dayCount]['countDisplay'] = 0;\n\t\t\t$dayCount++;\n\t\t}\n\t\tsort($data[\"dates\"]);\n\t\t//Current month\n\t\t$end = date( 't', mktime( 0, 0, 0,( $month + 1 ), 0, $year ));\n\t\tfor( $d = 1; $d <= $end; $d++ ){\n\t\t\t$data[\"dates\"][$dayCount]=array();\n\t\t\t// utility field used to keep track of events displayed in a day!\n\t\t\t$data[\"dates\"][$dayCount]['countDisplay']=0;\n\t\t\t$data[\"dates\"][$dayCount][\"monthType\"]=\"current\";\n\t\t\t$data[\"dates\"][$dayCount][\"month\"]=$month;\n\t\t\t$data[\"dates\"][$dayCount][\"year\"]=$year;\t\t\n\t\t\t\t\t\t\n\t\t\t$t_datenow = $this->_getNow();\n\t\t\t$now_adjusted = $t_datenow->toUnix(true);\n\t\t\tif( $month == strftime( '%m', $now_adjusted)\n\t\t\t&& $year == strftime( '%Y', $now_adjusted)\n\t\t\t&& $d == strftime( '%d', $now_adjusted)) {\n\t\t\t\t$data[\"dates\"][$dayCount][\"today\"]=true;\n\t\t\t}else{\n\t\t\t\t$data[\"dates\"][$dayCount][\"today\"]=false;\n\t\t\t}\n\t\t\t$data[\"dates\"][$dayCount]['d']=$d;\t\t\t\t\t\t\n\t\t\t$data[\"dates\"][$dayCount]['events'] = array();\n\t\t\tif( $rowcount > 0 ){\n\t\t\t\tforeach ($rows as $row) {\n\t\t\t\t\t\t$date_of_event = explode('-',$row->event_date);\n\t\t\t\t\t\t$date_of_event = (int)$date_of_event[2];\t\t\t\t\t\t\n\t\t\t\t\t\tif ($d == $date_of_event ){\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$i=count($data[\"dates\"][$dayCount]['events']);\n\t\t\t\t\t\t\t$data[\"dates\"][$dayCount]['events'][$i] = $row;\n\t\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t$dayCount++;\n\t\t}\t\n \t\n\t\t// followmonth\n\t\t$days \t= ( 7 - date( 'w', mktime( 0, 0, 0, $month + 1, 1, $year )) + $startday ) %7;\n\t\t$d\t\t= 1;\n\t\t$followMonth = $month+1;\n\t\t$followYear = $year;\n\t\tif ($followMonth>12) {\n\t\t\t$followMonth-=12;\n\t\t\t$followYear+=1;\n\t\t}\n\t\t$data[\"followingMonth\"]=array();\n\t\tfor( $d = 1; $d <= $days; $d++ ) {\n\t\t\t$data[\"dates\"][$dayCount]=array();\n\t\t\t$data[\"dates\"][$dayCount][\"monthType\"]=\"following\";\n\t\t\t$data[\"dates\"][$dayCount][\"month\"]=$followMonth;\n\t\t\t$data[\"dates\"][$dayCount][\"year\"]=$followYear;\n\t\t\t$data[\"dates\"][$dayCount]['countDisplay']=0;\n\t\t\t$dayCount++;\n\t\t}\n\t\treturn $data;\t\t\n\t}", "function draw_calendar_activ($month,$year){\n\n\t/* draw table */\n\t$calendar = '<table cellpadding=\"0\" cellspacing=\"0\" class=\"calendar\">';\n\n\t/* table headings */\n\t$headings = array('Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi');\n\t$calendar.= '<tr class=\"calendar-row-day\"><td class=\"calendar-day-head\">'.implode('</td><td class=\"calendar-day-head\">',$headings).'</td></tr>';\n\n\t/* days and weeks vars now ... */\n\t$running_day = date('w',mktime(0,0,0,$month,1,$year));\n\t$days_in_month = date('t',mktime(0,0,0,$month,1,$year));\n\t$days_in_this_week = 1;\n\t$day_counter = 0;\n\t$dates_array = array();\n\n\t/* row for week one */\n\t$calendar.= '<tr class=\"calendar-row\">';\n\n\t/* print \"blank\" days until the first of the current week */\n\tfor($x = 0; $x < $running_day; $x++):\n\t\t$calendar.= '<td class=\"calendar-day-np\"> </td>';\n\t\t$days_in_this_week++;\n\tendfor;\n\n\t/* keep going with days.... */\n\tfor($list_day = 1; $list_day <= $days_in_month; $list_day++){\n\t\t$calendar.= '<td class=\"calendar-day\">';\n\t\t\t/* add in the day number */\n $ddate = $year.\"-\".$month.\"-\".sprintf(\"%02d\", $list_day);\n $newdatabal = sprintf(\"%02d\", $list_day);\n $qq = mysql_query(\"SELECT * FROM reserver WHERE date_deb LIKE('$ddate%')\")or die(mysql_error());\n\n if(mysql_num_rows($qq) >0){\n $newblabla = $ddate.\"<br>\n <a href='afres.php?y=\".$year.\"&m=\".$month.\"&d=\".$newdatabal.\"' target='_blank' style='color: #302C87; text-decoration: none'> Il y'a : \".mysql_num_rows($qq).' reservation(s)</a>';\n }else{\n $newblabla = $ddate.\"<br>no reservations\";\n }\n\t\t\t$calendar.= '<div class=\"day-number\">\n\n '.$newblabla;\n\n\t\t\t/** QUERY THE DATABASE FOR AN ENTRY FOR THIS DAY !! IF MATCHES FOUND, PRINT THEM !! **/\n\t\t\t$calendar.= str_repeat('<p> </p>',2);\n\n\t\t$calendar.= '</td>';\n\t\tif($running_day == 6):\n\t\t\t$calendar.= '</tr>';\n\t\t\tif(($day_counter+1) != $days_in_month):\n\t\t\t\t$calendar.= '<tr class=\"calendar-row\">';\n\t\t\tendif;\n\t\t\t$running_day = -1;\n\t\t\t$days_in_this_week = 0;\n\t\tendif;\n\t\t$days_in_this_week++; $running_day++; $day_counter++;\n\n\n\t}\n\n\t/* finish the rest of the days in the week */\n\tif($days_in_this_week < 8):\n\t\tfor($x = 1; $x <= (8 - $days_in_this_week); $x++):\n\t\t\t$calendar.= '<td class=\"calendar-day-np\"> </td>';\n\t\tendfor;\n\tendif;\n\n\t/* final row */\n\t$calendar.= '</tr>';\n\n\t/* end the table */\n\t$calendar.= '</table>';\n\n\t/* all done, return result */\n\treturn $calendar;\n\n\n}", "public function render()\n {\n $result = array();\n\n if ($this->hasSources())\n {\n $visibleSources = 0;\n\n $result[] = '<div class=\"panel panel-default table-calendar-legend\">';\n $result[] = '<div class=\"panel-heading\">';\n $result[] = '<h4 class=\"panel-title\">' . Translation::get('Legend') . '</h4>';\n $result[] = '</div>';\n $result[] = '<ul class=\"list-group\">';\n\n $sources = $this->getSources();\n\n sort($sources);\n\n foreach ($sources as $source)\n {\n $sourceClasses = $this->getSourceClasses($source);\n\n if ($this->getDataProvider()->supportsVisibility())\n {\n $isSourceVisible = $this->getDataProvider()->isSourceVisible($source);\n $eventClasses = ! $isSourceVisible ? ' event-container-source-faded' : '';\n }\n else\n {\n\n $eventClasses = '';\n }\n\n $result[] = '<li class=\"list-group-item\">';\n $result[] = '<div class=\"event-source' . $eventClasses . '\" data-source-key=\"' .\n $this->addSource($source) . '\" data-source=\"' . $source . '\">';\n $result[] = '<span class=\"event-container ' . $sourceClasses . '\"></span>';\n $result[] = $source;\n $result[] = '</div>';\n $result[] = '</li>';\n\n if ($this->getDataProvider()->supportsVisibility())\n {\n if ($isSourceVisible)\n {\n $visibleSources ++;\n }\n }\n }\n\n $result[] = '</ul>';\n $result[] = '</div>';\n\n if ($this->getDataProvider()->supportsVisibility())\n {\n $result[] = '<script type=\"text/javascript\">';\n $result[] = 'var calendarVisibilityContext = ' .\n json_encode($this->getDataProvider()->getVisibilityContext()) . ';';\n $result[] = '</script>';\n\n $result[] = ResourceManager::getInstance()->get_resource_html(\n Path::getInstance()->getJavascriptPath(__NAMESPACE__, true) . 'Highlight.js');\n\n if ($visibleSources == 0)\n {\n $notificationMessageManager = new NotificationMessageManager();\n $notificationMessageManager->addMessage(\n new NotificationMessage(\n Translation::get('AllEventSourcesHidden'),\n NotificationMessage::TYPE_WARNING));\n }\n }\n }\n\n return implode(PHP_EOL, $result);\n }", "public function toArray()\n {\n $event = array();\n\n if ($this->id !== null) {\n $event['id'] = \"$this->id\";\n }\n\n $event['title'] = $this->activite->getDesignation();\n $event['start'] = $this->heureDebut->format(\"H:i:s\");\n if ($this->heureFin !== null) {\n $event['end'] = $this->heureFin->format(\"H:i:s\");\n }\n $event['resourceId'] = $this->enfant->getId() . \"-\" . $this->jour->getId();\n\n return $event;\n }", "function get_calendar($initial = \\true, $display = \\true)\n {\n }", "public static function twoDArrayforCalender()\n {\n $array = [];\n for ($i = 0; $i < 6; $i++) \n {\n $array1 = array();\n for ($j = 0; $j < 7; $j++) \n {\n //initializing array values to '-'\n $array1[$j] = '-';\n }\n //pushing array to each row of 2d array\n array_push($array, $array1);\n }\n return $array;\n }", "function submitted_events_calendar($submission) {\n\tif (submitted_events_starts_with ( $submission->brunelgroup, 'Joint' )) {\n\t\treturn array (\n\t\t\t\t23,\n\t\t\t\t24 \n\t\t);\n\t} elseif (submitted_events_starts_with ( $submission->brunelgroup, '20' )) {\n\t\treturn array (\n\t\t\t\t23 \n\t\t);\n\t} elseif (submitted_events_starts_with ( $submission->brunelgroup, '40' )) {\n\t\treturn array (\n\t\t\t\t24 \n\t\t);\n\t} else {\n\t\treturn array ();\n\t}\n}", "private function makeDayEventListHTML()\n\t{\n\t\t$showtext = \"\";\n\t\tforeach($this->eventItems as $item) {\n\t\t\tif($item['date'] == $this->curYear.'-'.$this->curMonth.'-'.$this->dayOfMonth) {\n\t\t\t\t$category = (strlen($item['cat']) > 0 ? 'Category: '.$item['cat'].' - ' : '');\n\t\t\t\t$outevents[$n]['category'] = $item['cat'];\n\t\t\t\t\n\t\t\t\tif($item['stdurl']) {\n\t\t\t\t\t$href = '<a href=\"'.$item['url'].'?id='.$item['id'].'\" title=\"'.$category.$item['desc'].'\">'.$item['text'].'</a>';\n\t\t\t\t\t$outevents[$n]['url'] = $item['url'].'?id='.$item['id'];\n\t\t\t\t} else {\n\t\t\t\t\t$href = (strlen($item['url']) > 0 ? '<a href=\"'.$item['url'].'\" title=\"'.$category.$item['desc'].'\">'.$item['text'].'</a>' : $item['text']);\n\t\t\t\t\t$outevents[$n]['url'] = $item['url'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$style = (strlen($item['catcolor']) > 0 ? ' style=\"background-color:#'.str_replace('#','',$item['catcolor']).';\" ' : ' style=\"background-color:#eeeeee;\" ');\n\t\t\t\t\n\t\t\t\t$showtext .= \"\\n\\t\\t\\t<div class=\\\"dayContent\\\"\".$style.\">\".$href.\"</div>\\n\\t\\t\";\n\t\t\t\t\n\t\t\t\t$outevents[$n]['summary'] = $item['text'];\n\t\t\t\t$outevents[$n]['description'] = $item['desc'];\n\t\t\t\t$outevents[$n]['categorycolor'] = (strlen($item['catcolor']) > 0 ? str_replace('#','',$item['catcolor']) : '#eeeeee');\n\t\t\t}\n\t\t\t$n++;\n\t\t}\n\t\treturn $showtext;\n\t}", "public function index()\n {\n return view('Shift::calendar.index');\n }", "function show_calendar_events()\n\t{\n\t\t$stats_html = \"\";\n\t\t\n\t\tif ($this->ipsclass->vars['show_birthdays'] or $this->ipsclass->vars['show_calendar'] )\n\t\t{\n\t\t\t$a = explode( ',', gmdate( 'Y,n,j,G,i,s', time() + $this->ipsclass->get_time_offset() ) );\n\t\t\n\t\t\t$day = $a[2];\n\t\t\t$month = $a[1];\n\t\t\t$year = $a[0];\n\t\t\t\n\t\t\t$birthstring = \"\";\n\t\t\t$count = 0;\n\t\t\t$users = array();\n\t\t\t\n\t\t\tif ( $this->ipsclass->vars['show_birthdays'] )\n\t\t\t{\n\t\t\t\tif ( is_array($this->ipsclass->cache['birthdays']) AND count( $this->ipsclass->cache['birthdays'] ) )\n\t\t\t\t{\n\t\t\t\t\tforeach( $this->ipsclass->cache['birthdays'] as $u )\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( $u['bday_day'] == $day and $u['bday_month'] == $month )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$users[] = $u;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if( $day == 28 && $month == 2 && !date(\"L\") )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ( $u['bday_day'] == \"29\" and $u['bday_month'] == $month )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$users[] = $u;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Spin and print...\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\tforeach ( $users as $user )\n\t\t\t\t{\n\t\t\t\t\t$birthstring .= \"<a href='{$this->ipsclass->base_url}showuser={$user['id']}'>{$user['members_display_name']}</a>\";\n\t\t\t\t\t\n\t\t\t\t\tif ($user['bday_year'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$pyear = $year - $user['bday_year'];\n\t\t\t\t\t\t$birthstring .= \"(<b>$pyear</b>)\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$birthstring .= $this->sep_char.\"\\n\";\n\t\t\t\t\t\n\t\t\t\t\t$count++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Fix up string...\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$birthstring = preg_replace( \"/\".$this->sep_char.\"$/\", \"\", trim($birthstring) );\n\t\t\t\t\n\t\t\t\t$lang = $this->ipsclass->lang['no_birth_users'];\n\t\t\t\t\n\t\t\t\tif ($count > 0)\n\t\t\t\t{\n\t\t\t\t\t$lang = ($count > 1) ? $this->ipsclass->lang['birth_users'] : $this->ipsclass->lang['birth_user'];\n\t\t\t\t\t$stats_html .= $this->ipsclass->compiled_templates['skin_boards']->birthdays( $birthstring, $count, $lang );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$count = \"\";\n\t\t\t\t\t\n\t\t\t\t\tif ( ! $this->ipsclass->vars['autohide_bday'] )\n\t\t\t\t\t{\n\t\t\t\t\t\t$stats_html .= $this->ipsclass->compiled_templates['skin_boards']->birthdays( $birthstring, $count, $lang );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Are we viewing the calendar?\n\t\t//-----------------------------------------\n\t\t\n\t\tif ($this->ipsclass->vars['show_calendar'])\n\t\t{\n\t\t\t$this->ipsclass->vars['calendar_limit'] = intval($this->ipsclass->vars['calendar_limit']) < 2 ? 1 : intval($this->ipsclass->vars['calendar_limit']);\n\t\t\t\n\t\t\t$our_unix = gmmktime( 0, 0, 0, $month, $day, $year);\n\t\t\t$max_date = $our_unix + ($this->ipsclass->vars['calendar_limit'] * 86400);\n\t\t\t$events = array();\n\t\t\t$show_events = array();\n\t\t\t\n\t\t\tif( $this->ipsclass->member['org_perm_id'] )\n\t\t\t{\n\t\t\t\t$member_permission_groups = explode( \",\", $this->ipsclass->clean_perm_string( $this->ipsclass->member['org_perm_id'] ) );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$member_permission_groups = explode( \",\", $this->ipsclass->clean_perm_string( $this->ipsclass->member['g_perm_id'] ) );\n\t\t\t\t\n\t\t\t\tif( isset($this->ipsclass->member['mgroup_others']) AND $this->ipsclass->member['mgroup_others'] )\n\t\t\t\t{\n\t\t\t\t\t$this->ipsclass->member['mgroup_others'] = $this->ipsclass->clean_perm_string($this->ipsclass->member['mgroup_others']);\n\t\t\t\t\t\n\t\t\t\t\t$mgroup_others = explode( \",\", $this->ipsclass->member['mgroup_others'] );\n\t\t\t\t\t\n\t\t\t\t\tif( count($mgroup_others) )\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach( $mgroup_others as $mgroup )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif( $mgroup )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$member_permission_groups = array_merge( $member_permission_groups, explode( \",\", $this->ipsclass->clean_perm_string( $this->ipsclass->cache['group_cache'][$mgroup]['g_perm_id'] ) ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ( is_array($this->ipsclass->cache['calendar']) AND count( $this->ipsclass->cache['calendar'] ) )\n\t\t\t{\n\t\t\t\tforeach( $this->ipsclass->cache['calendar'] as $u )\n\t\t\t\t{\n\t\t\t\t\t$set_offset = 0;\n\n\t\t\t\t\tif( $u['event_timeset'] && !($u['event_recurring'] == 0 AND $u['event_unix_to']) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$set_offset = isset($this->ipsclass->member['time_offset']) ? $this->ipsclass->member['time_offset'] * 3600 : 0;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$u['_unix_from'] = $u['event_unix_from'] - $set_offset;\n\t\t\t\t\t$u['_unix_to'] = $u['event_unix_to'] - $set_offset;\n\t\t\t\t\t\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// Private?\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t\n\t\t\t\t\tif ( $u['event_private'] == 1 and $this->ipsclass->member['id'] != $u['event_member_id'] )\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// Got perms?\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t\n\t\t\t\t\tif ( $u['event_perms'] != \"*\" )\n\t\t\t\t\t{\n\t\t\t\t\t\t$event_perms = explode( \",\", $this->ipsclass->clean_perm_string( $u['event_perms'] ) );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$check = 0;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( count($event_perms) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach( $event_perms as $mgroup_perm )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif( in_array( $mgroup_perm, $member_permission_groups ) )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$check = 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( !$check )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// Got calendar perms?\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t\n\t\t\t\t\tif ( $u['_perm_read'] != \"*\" )\n\t\t\t\t\t{\n\t\t\t\t\t\t$read_perms = explode( \",\", $this->ipsclass->clean_perm_string( $u['_perm_read'] ) );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$check = 0;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( count($read_perms) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach( $read_perms as $mgroup_perm )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif( in_array( $mgroup_perm, $member_permission_groups ) )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$check = 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( !$check )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontinue;\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\t// In range?\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t\tif ( $u['event_recurring'] == 0 AND ( ( $u['event_unix_to'] >= $our_unix AND $u['event_unix_from'] <= $max_date )\n\t\t\t\t\t\tOR ( $u['event_unix_to'] == 0 AND $u['event_unix_from'] >= $our_unix AND $u['event_unix_from'] <= $max_date ) ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$u['event_activetime'] = $u['_unix_from'];\n\t\t\t\t\t\t$events[ str_pad( $u['event_unix_from'].$u['event_id'], 15, \"0\" ) ] = $u;\n\t\t\t\t\t}\n\t\t\t\t\telseif( $u['event_recurring'] > 0 )\n\t\t\t\t\t{\n\t\t\t\t\t\t$cust_range_s = $u['event_unix_from'];\n\n\t\t\t\t\t\twhile( $cust_range_s < $u['event_unix_to'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif( $cust_range_s >= $our_unix AND $cust_range_s <= $max_date )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$u['event_activetime'] = $cust_range_s;\n\t\t\t\t\t\t\t\t$events[ str_pad( $cust_range_s.$u['event_id'], 15, \"0\" ) ] = $u;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif( $u['event_recurring'] == \"1\" )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$cust_range_s += 604800;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telseif ( $u['event_recurring'] == \"2\" )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$cust_range_s += 18144000;\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$cust_range_s += 31536000;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Print...\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\tksort($events);\n\t\t\t\n\t\t\tforeach( $events as $event )\n\t\t\t{\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Recurring?\n\t\t\t\t//-----------------------------------------\n\n\t\t\t\t$c_time = '';\n\t\t\t\t$c_time = gmdate( 'j-F-y', $event['event_activetime'] );\n\t\t\t\t\n\t\t\t\t$show_events[] = \"<a href='{$this->ipsclass->base_url}act=calendar&amp;code=showevent&amp;calendar_id={$event['event_calendar_id']}&amp;event_id={$event['event_id']}' title='$c_time'>\".$event['event_title'].\"</a>\";\n\t\t\t}\n\t\t\t\n\t\t\t$this->ipsclass->lang['calender_f_title'] = sprintf( $this->ipsclass->lang['calender_f_title'], $this->ipsclass->vars['calendar_limit'] );\n\t\t\t\n\t\t\tif ( count($show_events) > 0 )\n\t\t\t{\n\t\t\t\t$event_string = implode( $this->sep_char.' ', $show_events );\n\t\t\t\t$stats_html .= $this->ipsclass->compiled_templates['skin_boards']->calendar_events( $event_string );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ( ! $this->ipsclass->vars['autohide_calendar'] )\n\t\t\t\t{\n\t\t\t\t\t$event_string = $this->ipsclass->lang['no_calendar_events'];\n\t\t\t\t\t$stats_html .= $this->ipsclass->compiled_templates['skin_boards']->calendar_events( $event_string );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\treturn $stats_html;\n\t\n\t}", "function calendarioJson() {\n \t$fp = fopen(\"ics/basic5.ics\", \"r\"); \n\t$temp = fread($fp, filesize(\"ics/basic5.ics\"));\n\t//Ver si se necesita nl2br\n\t$salida = icsAJson(json_encode(nl2br($temp)));\n\t//Este es el Json Final\n\treturn ('[' . $salida . ']');\n}", "function makeTXT()\n {\n $calendar_text = \"No calendar information available.\";\n if (isset($this->calendar->events)) {\n $calendar_text = \"\";\n foreach ($this->calendar->events as $event) {\n $description_seperator = \" - \";\n $description = \"description\";\n if ($this->description_flag != \"on\") {\n $description_seperator = \"\";\n $description = \"\";\n }\n\n $t =\n $this->textCalendar($event, [\n \"timestamp Y-m-d H:i\",\n \" \",\n // 'timezone',\n // ' ',\n \"summary\",\n \" [\",\n \"runtime\",\n \"]\",\n $description_seperator,\n $description,\n ]) . \"\\n\";\n\n $calendar_text .= $t;\n }\n }\n\n $txt =\n \"CALENDAR \" .\n $this->time_zone .\n \"\\n\\n\" .\n $calendar_text .\n \"\\n\\n\" .\n $this->response;\n\n $this->txt = $txt;\n $this->thing_report[\"txt\"] = $txt;\n }", "public function calendar()\n {\n return view('calendar');\n }", "public function actionIndex()\n {\n if(\\Yii::$app->user->can('verMarcacaoConsulta')) {\n $tempVariable = Medicos::dataByUser(Yii::$app->user->id);\n $times = MarcacaoConsulta::dataByUserBack($tempVariable['id']);\n\n $events = [];\n foreach ($times as $time) {\n\n $temp = Especialidade::dataByEspecialidade($time['id_especialidade']);\n\n\n $Event = new Event();\n $Event->id = $time['id'];\n $Event->backgroundColor = $this->chooseColor($time['status']);\n $Event->title = $temp['tipo'];\n $Event->start = date(($time['date']));\n $Event->url = 'index.php?r=marcacao-consulta/view&id=' . $time['id'];\n $events[] = $Event;\n\n }\n\n return $this->render('index', [\n 'events' => $events,\n ]);\n }\n }", "public function render() {\n echo \"BEGIN:VCALENDAR\\r\\n\";\n echo \"VERSION:2.0\\r\\n\";\n echo \"PRODID:-//X2Engine//NONSGML X2 Calendar//EN\\r\\n\";\n \n if (is_array($this->_actions)) {\n $actionsPrinted = array();\n $users = array();\n foreach($this->_actions as $action) {\n // skip events showing up more than once (i.e. combined cal)\n if(!($action instanceof Actions) || !empty($actionsPrinted[$action->id])) \n continue;\n // Render a VEVENT for each action\n echo \"BEGIN:VEVENT\\r\\n\";\n // Treat the first assignee as the one to use for generating the \"organizer\" \n // and all of the assignees for the unique ID field\n $assignees = $action->getAssignees();\n if(!empty($assignees)) {\n $first = reset($assignees);\n echo \"UID:\".$action->assignedTo.\"-\".$action->id.\"@\".$_SERVER['SERVER_NAME'].\"\\r\\n\";\n \n if (!empty($first) && !array_key_exists($first, $users)) {\n // cache user emails\n $user = User::model()->findByAttributes(array('username'=>$first));\n $users[$first] = array(\n 'name'=>$user->name, \n 'email'=>$user->emailAddress,\n 'timeZone'=>$user->profile->timeZone\n );\n }\n $tz = $users[$first]['timeZone'];\n echo \"ORGANIZER;CN=\\\"\".$users[$first]['name'].\"\\\":mailto:\".$users[$first]['email'].\"\\r\\n\";\n } else {\n // Default app timezone (which is actually stored as the column default value)\n $tz = Profile::model()->tableSchema->columns['timeZone']->defaultValue;\n echo \"UID:Anyone-{$action->id}@{$_SERVER['SERVER_NAME']}\\r\\n\";\n }\n $start = new DateTime();\n $end = new DateTime();\n $tzOb = new DateTimeZone($tz);\n $start->setTimestamp($action->dueDate);\n $end->setTimestamp($action->completeDate);\n $start->setTimezone($tzOb);\n $end->setTimezone($tzOb);\n echo \"DTSTART;TZID=$tz:\".$start->format('Ymd\\THis').\"\\r\\n\";\n echo \"DTEND;TZID=$tz:\".$end->format('Ymd\\THis').\"\\r\\n\";\n echo \"SUMMARY:\".self::escapeText($action->actionText->text).\"\\r\\n\";\n echo \"END:VEVENT\\r\\n\";\n $actionsPrinted[$action->id] = true;\n }\n }\n\n echo \"END:VCALENDAR\\r\\n\";\n }", "function calendar_events($events, $YEAR, $MONTH_START, $DAY_START, $WEEKENDS, $MONTH_END, $DOW, $OVERRIDE, $BOX) {\n $results = array('year'=>$YEAR, 'month_start'=>$MONTH_START, 'month_end'=>$MONTH_END, 'box'=>$BOX);\n $results_counter = array();\n $POSDOW = array(0 => 'sun', 1 => 'mon', 2 => 'tue', 3 => 'wed', 4 => 'thu', 5 => 'fri', 6 => 'sat', 7 => 'sun');\n for($month=$MONTH_START; $month <= $MONTH_END; $month++) {\n $month_len = cal_days_in_month(CAL_GREGORIAN, $month, $YEAR);\n $month_name = cal_info(0);\n $month_name = $month_name['months'][$month];\n $first = date(\"w\", mktime(0, 0, 0, $month, 1, $YEAR));\n for($day=1; $day <= $month_len; $day++) {\n $day_type = '';\n $day_num = '';\n $force_day = False;\n if ($month == $MONTH_START && $day < $DAY_START) {\n } elseif (isset($OVERRIDE[$month][$day])) {\n $day_type = $OVERRIDE[$month][$day];\n $force_day = True;\n } elseif (isset($DOW[$POSDOW[$first]])) {\n $day_type = $DOW[$POSDOW[$first]];\n }\n if ($day_type != '') {\n if (isset($events[$day_type])) {\n if (!isset($results_counter[$day_type])) {\n $results_counter[$day_type] = 1;\n } else {\n $results_counter[$day_type]++;\n }\n }\n if (isset($events[$day_type]) && isset($events[$day_type][$results_counter[$day_type]])) {\n $event = $events[$day_type][$results_counter[$day_type]];\n $day_num = $results_counter[$day_type];\n } else {\n $event = array();\n }\n if ($force_day || !empty($event)) {\n $results[$month][$day] = array('month'=>$month, 'day'=>$day, 'type'=>$day_type, 'type_num'=>$day_num, 'dow'=>$first, 'dow_eng'=>$POSDOW[$first], 'event'=>$event);\n }\n }\n $first++;\n if ($first == 7) {$first = 0;}\n }\n }\n return $results;\n }", "public function get_calendar() {\n $start = date('Y-m-d H:i:s', strtotime($this->input->post('start_date')));\n $end = date('Y-m-d H:i:s', strtotime($this->input->post('end_date')));\n $filter = $this->input->post('filter');\n if ($start && $end) {\n if (isset($filter) && !empty($filter) && !in_array($filter, config_item('event_types'))) {\n return $this->send_error('INVALID_FILTER');\n }\n $this->load->model('events_model');\n $where = array('start_date >=' => $start, 'end_date <=' => $end);\n if (isset($filter) && !empty($filter)) {\n $where['type'] = $filter;\n }\n if ($events = $this->events_model->get_all($where)) {\n setlocale(LC_TIME, 'nl_NL.UTF-8');\n foreach ($events as &$event) {\n $event['readable_start_date'] = strftime('%A %d %B %G', strtotime($event['start_date']));\n $event['readable_end_date'] = strftime('%A %d %B %G', strtotime($event['end_date']));\n }\n $this->event_log();\n return $this->send_response($events);\n }\n return $this->send_error('NO_RESULTS');\n } else {\n return $this->send_error('ERROR');\n }\n }", "function displayCalendar(){\r\n $conn= databaseConnection();\r\n\r\n $dia = date (\"d\"); $mes = date (\"n\"); $ano = date (\"Y\");\r\n if($dia[0]=='0') $dia=substr($dia, -1);\r\n\r\n if (isset($_POST[\"userid\"])){\r\n $userid= ($_POST[\"userid\"]);\r\n } \r\n\r\n //(YYYY-MM-DD)\r\n if (isset($_POST[\"date\"])){\r\n //$dia = substr(($_GET[\"date\"]),8,2);\r\n $dia = \"01\";\r\n $mes = substr(($_POST[\"date\"]),5,2);\r\n $ano = substr(($_POST[\"date\"]),0,4);\r\n } \r\n\r\n //include the WeeklyCalClass and create the object !!\r\n include (\"StaffCalendar.php\");\r\n $calendar = new StaffCalendarClass ($userid, $dia, $mes, $ano);\r\n echo $calendar->showCalendar ();\r\n\r\n mysqli_close($conn);\r\n }", "function draw_calendar($month,$year, $userID, $type, $dbhandle){\n\n\t/* draw table */\n\t$calendar = '<table cellpadding=\"0\" cellspacing=\"0\" class=\"calendar\">';\n\n\t/* table headings */\n\t$headings = array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');\n\t$calendar.= '<tr class=\"calendar-row\"><td class=\"calendar-day-head\">'.implode('</td><td class=\"calendar-day-head\">',$headings).'</td></tr>';\n\n\t/* days and weeks vars now ... */\n\t$running_day = date('w',mktime(0,0,0,$month,1,$year));\n\t$days_in_month = date('t',mktime(0,0,0,$month,1,$year));\n\t$days_in_this_week = 1;\n\t$day_counter = 0;\n\t$dates_array = array();\n\n\t/* row for week one */\n\t$calendar.= '<tr class=\"calendar-row\">';\n\n\t/* print \"blank\" days until the first of the current week */\n\tfor($x = 0; $x < $running_day; $x++):\n\t\t$calendar.= '<td class=\"calendar-day-np\"> </td>';\n\t\t$days_in_this_week++;\n\tendfor;\n\n\t/* keep going with days.... */\n\tfor($list_day = 1; $list_day <= $days_in_month; $list_day++):\n\t\t$calendar.= '<td class=\"calendar-day\">';\n\t\t\n\t\t\t//Alert count for this day\n\t\t\t$dateString = '20'.$year.'-'.$month.'-';\n\t\t\tif( $list_day < 10 )\n\t\t\t\t$dateString .= \"0\".$list_day;\n\t\t\telse\n\t\t\t\t$dateString .= $list_day;\n\t\t\t\t\n\t\t\t\n\t\t\t$alertSql = \"select `Date`, Description from Alerts where SubjectID=$userID and Seen=0 and CAST(`Date` AS DATE)='\".$dateString.\"';\";\n\t\t\t$alertResult = $dbhandle->query($alertSql);\n\t\t\t$alertCount = $alertResult->num_rows;\n\t\t\tif( $alertCount > 0 )\n\t\t\t{\n\t\t\t\t$calendar.= '<div><b><a href=\"../Main/Alerts.php?user='.$userID.'&date='.$dateString.'\" style=\"color:red\">'.$alertCount.'</a></b></div>';\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t/* add in the day number */\n\t\t\t$calendar.= '<div class=\"day-number\">'.$list_day.' </div>';\n\t\t\t\n\t\t\t$dayStr = \"\";\n\t\t\tif($type == \"Session\")\n\t\t\t{\n\t\t\t\t$dayAfter = $list_day+1;\n\t\t\t\t$startTime = \"$year-$month-$list_day\";//date(\"Y-m-d\n\t\t\t\t$endtTime = \"\";\n\t\t\t\t//Deal with days/months carrying over\n\t\t\t\tif( $dayAfter > $days_in_month )\t//Check that the day after wont be more than there is in the month\n\t\t\t\t{\n\t\t\t\t\tif( $month == 12 )\n\t\t\t\t\t\t$endtTime = ($year+1) .\"-01-01\";\n\t\t\t\t\telse\n\t\t\t\t\t\t$endtTime = \"$year-\". ($month+1) .\"-01\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$endtTime = \"$year-$month-$dayAfter\";\n\t\t\t\t}\n\t\t\t\t//$calendar.= '<div>'.$endtTime.'</div>';\n\t\t\t\t\t\n\t\t\t\t$sql = \"SELECT SessionID, WingmanPlayed, CyclingPlayed, TargetsPlayed, DATE_FORMAT(StartTime,'%H:%i') as Start, DATE_FORMAT(EndTime,'%H:%i') as End FROM Session WHERE UserID = $userID AND (StartTime > '$startTime' AND EndTime < '$endtTime' AND EndTime <> 0 )\";\n\t\t\t\t$result = $dbhandle->query($sql);\n\t\t\t\tif ($result->num_rows > 0) {\n\t\t\t\t\t// output data of each row\n\t\t\t\t\twhile($row = $result->fetch_assoc()) {\n\t\t\t\t\t\t$sess = $row[\"SessionID\"];\n\t\t\t\t\t\t$start = $row[\"Start\"];\n\t\t\t\t\t\t$end = $row[\"End\"];\n\t\t\t\t\t\tif($dayStr != \"\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$dayStr .= \"<br />\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($row['WingmanPlayed'] > 0 && $row['TargetsPlayed'] > 0 )\n {\n $dayStr .= \"<a style='font-size:16px;padding-bottom:2px;color:red'href='Session.php?SessionID=$sess' 'data-toggle='tooltip' title='S#$sess: Wingman (Elbow Raise) & Targets (Arm Extension)'>$start-$end</a>\";\n }\n \n else if ($row['TargetsPlayed'] > 0)\n {\n $dayStr .= \"<a style='font-size:16px;padding-bottom:2px;color:green'href='Session.php?SessionID=$sess' 'data-toggle='tooltip' title='S#$sess: Targets (Arm Extension)'>$start-$end</a>\";\n }\n else if ($row['WingmanPlayed'] > 0)\n {\n $dayStr .= \"<a style='font-size:16px;padding-bottom:2px;color:blue'href='Session.php?SessionID=$sess' 'data-toggle='tooltip' title='S#$sess: Wingman (Elbow Raise)'>$start-$end</a>\";\n } \n\t\t\t\t\t\t\t\t\t\t\t\t\t else if ($row['CyclingPlayed'] > 0)\n {\n $dayStr .= \"<a style='font-size:16px;padding-bottom:2px;color:purple'href='Session.php?SessionID=$sess' 'data-toggle='tooltip' title='S#$sess: Cycling (Elbow Raise)'>$start-$end</a>\";\n } \n\t\t\t\t\t\telse\n {\n \n }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/** QUERY THE DATABASE FOR AN ENTRY FOR THIS DAY !! IF MATCHES FOUND, PRINT THEM !! **/\n\t\t\t$calendar.= \"<p>$dayStr</p>\";\n\t\t\t\n\t\t$calendar.= '</td>';\n\t\tif($running_day == 6):\n\t\t\t$calendar.= '</tr>';\n\t\t\tif(($day_counter+1) != $days_in_month):\n\t\t\t\t$calendar.= '<tr class=\"calendar-row\">';\n\t\t\tendif;\n\t\t\t$running_day = -1;\n\t\t\t$days_in_this_week = 0;\n\t\tendif;\n\t\t$days_in_this_week++; $running_day++; $day_counter++;\n\tendfor;\n\n\t/* finish the rest of the days in the week */\n\tif($days_in_this_week < 8):\n\t\tfor($x = 1; $x <= (8 - $days_in_this_week); $x++):\n\t\t\t$calendar.= '<td class=\"calendar-day-np\"> </td>';\n\t\tendfor;\n\tendif;\n\n\t/* final row */\n\t$calendar.= '</tr>';\n\n\t/* end the table */\n\t$calendar.= '</table>';\n\t\n\t/* all done, return result */\n\treturn $calendar;\n}", "protected function getMesesArray(){\n\n $dt = new \\DateTime();\n $dt->modify('-13 months');\n for ($i = 0 ; $i < 12 ; $i ++){\n \t\t$dt->modify('+1 month');\n $meses[$i] = strftime(\"%b %Y\" , $dt->getTimeStamp());\n }\n return json_encode($meses);\n }", "public function getCalendars($params){\n /**\n * @var integer $month 0 last month, 1 current month, 2 next month\n */\n $month = isset($params['month']) ? $params['month'] : 1;\n switch ($month){\n case 0:$date = date(\"Y-m-1\",strtotime(\"-1 month\"));break;\n case 1:$date = date(\"Y-m-1\",time());break;\n case 2:$date = date(\"Y-m-1\",strtotime(\"+1 month\"));break;\n default:$date = date(\"Y-m-1\",time());break;\n }\n $month = intval(date(\"m\",strtotime($date)));\n $week = date(\"w\",strtotime($date));\n $start = strtotime($date) - $week * 24 * 3600;\n $end = $start + 41 * 24 * 3600;\n\n $cser = $this->searchByTime($start,$end); /// 排班表内容\n $data = [];\n for ($i = 0; $i < 42; $i++){\n $i_time = $start + $i * 24 * 3600;\n $i_month = intval(date(\"m\",$i_time));\n $data[$i]['day'] = intval(date(\"d\",$i_time));\n $data[$i]['date'] = date(\"Y-m-d\",$i_time);\n $data[$i]['off'] = $i_month != $month ? true : false;\n $data[$i]['on'] = date(\"Y-m-d\",time()) == $data[$i]['date'] ? true : false;\n $flag = false;\n foreach ($cser as $k => $cs){\n if($cs['time'] == $i_time){\n $data[$i]['name'] = $cs['scheduler']['name'];\n $data[$i]['id'] = $cs['s_id'];\n $flag = true;\n unset($cser[$k]);\n break;\n }\n if($cs['time'] < $i_time){\n break;\n }\n }\n if(!$flag){\n $data[$i]['name'] = '无';\n $data[$i]['id'] = null;\n }\n }\n return $data;\n }", "function cekCalendarOut($type, $tgl, $bulan, $tahun, $userid = NULL) {\n\t\t$data = array();\n \t$query = \"SELECT * FROM absensiout a JOIN absensiharian b ON a.absensiharian_id = b.absensiharian_id JOIN calendar c ON c.calendar_id = b.calendar_id\n \t\t\t\tWHERE c.date =? AND c.month =? AND c.year =? AND c.status =1\";\n \tif(!empty($userid)){\n \t $query = $query.\" AND b.user_id=?\";\n \t}\n \tif($type==0){\n \t $query = $query.\" AND (a.out_timeend IS NULL OR a.out_timeend ='00:00:00')\";\n \t}else{\n \t $query = $query.\" AND (a.out_timeend IS NOT NULL OR a.out_timeend <> '00:00:00')\";\n\t\t}\n \t$stmt = $this->registry->db->Prepare($query);\n \t$arrBinding[0] = $tgl;\n \t$arrBinding[1] = $bulan;\n \t$arrBinding[2] = $tahun;\n\n \tif(!empty($userid)){\n \t\t$arrBinding[3] = $userid;\n \t}\n \t$rs = $this->registry->db->Execute($stmt,$arrBinding);\n \tif($rs){\n if($rs->RecordCount() > 0){\n while($row = $rs->FetchNextObject()){\n $data[] = $row;\n }\n }\n }else throw new Exception(\"Gagal memeriksa cekCalendarOut\");\n\t\t\n return $data;\n\t}", "function display_day()\n{\n global $phpcid, $phpc_cal, $phpc_script, $phpcdb, $day, $month, $year;\n\n\t$monthname = month_name($month);\n\n $results = $phpcdb->get_occurrences_by_date($phpcid, $year, $month, $day);\n\n\t$have_events = false;\n\n\t$html_table = tag('table', attributes('class=\"phpc-main\"'),\n\t\t\ttag('caption', \"$day $monthname $year\"),\n\t\t\ttag('thead',\n\t\t\t\ttag('tr',\n\t\t\t\t\ttag('th', __('Title')),\n\t\t\t\t\ttag('th', __('Time')),\n\t\t\t\t\ttag('th', __('Description'))\n\t\t\t\t )));\n\tif($phpc_cal->can_modify()) {\n\t\t$html_table->add(tag('tfoot',\n\t\t\t\t\ttag('tr',\n\t\t\t\t\t\ttag('td',\n\t\t\t\t\t\t\tattributes('colspan=\"4\"'),\n\t\t\t\t\t\t\tcreate_hidden('action', 'event_delete'),\n\t\t\t\t\t\t\tcreate_hidden('day', $day),\n\t\t\t\t\t\t\tcreate_hidden('month', $month),\n\t\t\t\t\t\t\tcreate_hidden('year', $year),\n\t\t\t\t\t\t\tcreate_submit(__('Delete Selected'))))));\n\t}\n\n\t$html_body = tag('tbody');\n\n\twhile($row = $results->fetch_assoc()) {\n\t\n\t\t$event = new PhpcOccurrence($row);\n\n\t\tif(!$event->can_read())\n\t\t\tcontinue;\n\n\t\t$have_events = true;\n\n\t\t$eid = $event->get_eid();\n\t\t$oid = $event->get_oid();\n\n\t\t$html_subject = tag('td');\n\n\t\tif($event->can_modify()) {\n\t\t\t$html_subject->add(create_checkbox('eid[]',\n\t\t\t\t\t\t$eid));\n\t\t}\n\n\t\t$html_subject->add(create_occurrence_link(tag('strong',\n\t\t\t\t\t\t$event->get_subject()),\n\t\t\t\t\t'display_event', $oid));\n\n\t\tif($event->can_modify()) {\n\t\t\t$html_subject->add(\" (\");\n\t\t\t$html_subject->add(create_event_link(\n\t\t\t\t\t\t__('Modify'), 'event_form',\n\t\t\t\t\t\t$eid));\n\t\t\t$html_subject->add(')');\n\t\t}\n\n\t\t$html_body->add(tag('tr',\n\t\t\t\t\t$html_subject,\n\t\t\t\t\ttag('td', $event->get_time_span_string()),\n\t\t\t\t\ttag('td', attributes('class=\"phpc-desc\"'), $event->get_desc())));\n\t}\n\n\t$html_table->add($html_body);\n\n\tif($phpc_cal->can_modify()) {\n\t\t$output = tag('form',\n\t\t\t\tattributes(\"action=\\\"$phpc_script\\\"\"),\n\t\t\t\t$html_table);\n\t} else {\n\t\t$output = $html_table;\n\t}\n\n\tif(!$have_events)\n\t\t$output = tag('h2', __('No events on this day.'));\n\n\treturn tag('', create_day_menu(), $output);\n}", "public function api_getTable($month,$year)\n\t{\n\t\t$employees = Employee::all();\n\n\t\tforeach ($employees as $key => $value) {\n\t\t\t$calendar = Calendar::where('employee_id', '=', $value->id)->where('month',$month)->where('year',$year)->first();\n\t\t\tif($calendar == null)\n\t\t\t{\n\t\t\t\t$calendar = $this->bornCalendarEmpty($value->id, $month, $year);\n\t\t\t}\n\t\t\t$this->generatePresenteWhenInitNewDate($calendar, $month, $year);\n\t\t\t$employees[$key]->calendar = $calendar;\n\t\t}\n\n?>\n <div id=\"datafullname\" style=\"display:none\"></div>\n <div class=\"sidebar-calendar\">\n <table>\n <thead>\n <tr><th><div class=\"nameitem\">Fullname</div></th></tr>\n </thead>\n <tbody>\n <tr class=\"itemblank\">\n <td><div class=\"nameitem\"></div></td>\n </tr>\n <?php foreach($employees as $key => $value) : ?>\n <tr>\n <!-- <td><div class=\"nameitem\">{{ $value->id }}</div></td> -->\n <td><div class=\"nameitem\" idem=\"<?php echo $value->id; ?>\"><?php echo $value->lastname.\" \".$value->firstname; ?></div></td>\n </tr>\n <?php endforeach;?>\n </tbody>\n </table>\n </div>\n <div class=\"content-calendar\">\n <div id=\"datacalendar\" style=\"display:none\"></div>\n <table>\n <thead>\n <tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ($i=1;$i<=31;$i++)\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$dt = null;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (checkDateValid($i, $month, $year)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$dt = Carbon::create($year, $month, $i);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo \"<th><div class='day'>\".$i.\"<br/>\".toEnglishDate($dt->dayOfWeek).\"</div></th>\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t?>\n </tr>\n </thead>\n <tbody>\n <tr class=\"itemblank\">\n <td><div class=\"innerblank\"></div></td>\n </tr>\n <?php\n foreach($employees as $key => $value)\n {\n $calendar = $value->calendar;\n ?>\n <tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ($i=1;$i<=31;$i++)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$dt = Carbon::create($year, $month, $i);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (checkDateValid($i, $month, $year)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ($dt->dayOfWeek == 6 || $dt->dayOfWeek == 0)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td style=\"background-color:#ffbff7\"><div class=\"item\" idem=\"{{ $value->id }}\" idday=\"<?php echo $i;?>\" ><?php echo $calendar->{'n'.$i};?></div></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td><div class=\"item\" idem=\"{{ $value->id }}\" idday=\"<?php echo $i;?>\" ><?php echo $calendar->{'n'.$i};?></div></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t?>\n </tr>\n <?php\n }\n ?>\n\n </tbody>\n </table>\n </div>\n\n\t\t<?php\n\t}", "function generate_category_content()\n {\n global $conf, $page;\n\n $view_type = $page['chronology_view'];\n if ($view_type==CAL_VIEW_CALENDAR)\n {\n global $template;\n $tpl_var = array();\n if ( count($page['chronology_date'])==0 )\n {//case A: no year given - display all years+months\n if ($this->build_global_calendar($tpl_var))\n {\n $template->assign('chronology_calendar', $tpl_var);\n return true;\n }\n }\n\n if ( count($page['chronology_date'])==1 )\n {//case B: year given - display all days in given year\n if ($this->build_year_calendar($tpl_var))\n {\n $template->assign('chronology_calendar', $tpl_var);\n $this->build_nav_bar(CYEAR); // years\n return true;\n }\n }\n\n if ( count($page['chronology_date'])==2 )\n {//case C: year+month given - display a nice month calendar\n if ( $this->build_month_calendar($tpl_var) )\n {\n $template->assign('chronology_calendar', $tpl_var);\n }\n $this->build_next_prev();\n return true;\n }\n }\n\n if ($view_type==CAL_VIEW_LIST or count($page['chronology_date'])==3)\n {\n if ( count($page['chronology_date'])==0 )\n {\n $this->build_nav_bar(CYEAR); // years\n }\n if ( count($page['chronology_date'])==1)\n {\n $this->build_nav_bar(CMONTH); // month\n }\n if ( count($page['chronology_date'])==2 )\n {\n $day_labels = range( 1, $this->get_all_days_in_month(\n $page['chronology_date'][CYEAR] ,$page['chronology_date'][CMONTH] ) );\n array_unshift($day_labels, 0);\n unset( $day_labels[0] );\n $this->build_nav_bar( CDAY, $day_labels ); // days\n }\n $this->build_next_prev();\n }\n return false;\n }", "function calendar($date) {\r\n\t //If no parameter is passed use the current date.\r\n\t if($date == null)\r\n\t $date = getDate();\r\n\r\n\t $day \t\t\t= $date[\"mday\"];\r\n\t $month \t\t= $date[\"mon\"];\r\n\t $month_name \t= $date[\"month\"];\r\n\t $year \t\t\t= $date[\"year\"];\r\n\r\n\t $this_month \t= getDate(mktime(0, 0, 0, $month, 1, $year));\r\n\t $next_month \t= getDate(mktime(0, 0, 0, $month + 1, 1, $year));\r\n\r\n\t //Find out when this month starts and ends.\r\n\t $first_week_day = $this_month[\"wday\"];\r\n\t $days_in_this_month = round(($next_month[0] - $this_month[0]) / (60 * 60 * 24));\r\n\r\n\t $calendar_html = \"<table width='100%'>\";\r\n\t $calendar_html = $calendar_html.\"<tr>\t<td class='perp_report_header' colspan='7' /> Month: \".$month_name.\" / Year: \".$year.\"</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\";\r\n\t $calendar_html = $calendar_html.\"<tr>\t<td class='perp_report_subheader'>Sunday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='perp_report_subheader'>Monday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='perp_report_subheader'>Tuesday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='perp_report_subheader'>Wednesday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='perp_report_subheader'>Thursday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='perp_report_subheader'>Friday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='perp_report_subheader'>Saterday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t\t<tr>\";\r\n\r\n\t// Fill the first week of the month with the appropriate number of blanks.\r\n\t\t\t$gapcounter = 0;\r\n\t\t\tfor($week_day = 0; $week_day < $first_week_day; $week_day++) {\r\n\t\t\t\t\t$gapcounter = $gapcounter + 1;\r\n\t\t\t\t}\r\n\t\t\t$calendar_html = $calendar_html.\"<td class='perp_report_cell' colspan='\".$gapcounter.\"'></td>\";\t\r\n\t\r\n\t// Draw Calendar Elements\r\n\t\t\t// I forget!\t\t\t\t\r\n\t $week_day = $first_week_day;\r\n\t for($day_counter = 1; $day_counter <= $days_in_this_month; $day_counter++) {\r\n\t\t\t\t\t// Determine Day of the week\r\n\t\t\t\t\t$week_day %= 7;\r\n\t\t\t\t\r\n\t\t\t\t\t// If this variable equals 0, we will need to start a new row.\r\n\t\t\t\t\tif($week_day == 0) {\r\n\t\t\t\t\t\t\t$calendar_html = $calendar_html.\"</tr><tr>\";\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$datetopull = $year.\"/\".$month.\"/\".$day_counter;\r\n\t\t\t\t\t$innercell = \"<TABLE width='100%' style='margin-bottom:0;margin-top:0;'><tr><td class='perp_report_fieldname'>Date:</td><td class='perp_report_fieldcontent'>\".$datetopull.\"</td></tr>\";\r\n\t\t\t\t\t//Now Get inspection List for this day.....\r\n\t\t\t\t\t$objconn = mysqli_connect($GLOBALS['hostdomain'], $GLOBALS['hostusername'], $GLOBALS['passwordofdatabase'], $GLOBALS['nameofdatabase']);\t\t\t\t\t\r\n\t\t\t\t\tif (mysqli_connect_errno()) {\r\n\t\t\t\t\t\t\t// there was an error trying to connect to the mysql database\r\n\t\t\t\t\t\t\t//printf(\"connect failed: %s\\n\", mysqli_connect_error());\r\n\t\t\t\t\t\t\texit();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t$sql = \"SELECT * FROM tbl_139_337_main WHERE 139337_date = '\".$datetopull.\"' ORDER BY 139337_time\";\r\n\t\t\t\t\t\t\t//echo \"The SQL Statement is :\".$sql.\"<br>\";\r\n\t\t\t\t\t\t\t$objrs = mysqli_query($objconn, $sql);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\tif ($objrs) {\r\n\t\t\t\t\t\t\t\t\t$number_of_rows = mysqli_num_rows($objrs);\r\n\t\t\t\t\t\t\t\t\twhile ($objarray = mysqli_fetch_array($objrs, MYSQLI_ASSOC)) {\r\n\t\t\t\t\t\t\t\t\t\t$counter = $counter + 1;\r\n\t\t\t\t\t\t\t\t\t\t\t$counter = $counter + 1;\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// So the Archieved or Duplicate Narrowing...\r\n\t\t\t\t\t\t\t\t\t\t\t$displayrow\t\t\t\t\t= 0;\r\n\t\t\t\t\t\t\t\t\t\t\t$displayrow_a\t\t\t\t= 0;\r\n\t\t\t\t\t\t\t\t\t\t\t$displayrow_b\t\t\t\t= 0;\r\n\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t$tmpdiscrepancyid\t\t\t= $objarray['Discrepancy_id'];\r\n\t\t\t\t\t\t\t\t\t\t\t$tmpdiscrepancycondition\t= $objarray['discrepancy_checklist_id'];\t\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$displayrow_a\t\t\t\t= preflights_tbl_139_337_main_a_yn($tmpdiscrepancyid,0); // 0 will not return a row even if it is archieved.\r\n\t\t\t\t\t\t\t\t\t\t\t//$displayrow_d\t\t\t\t= preflights_tbl_139_327_main_sub_d_d_yn($tmpdiscrepancyid,0); // 0 will not return a row even if it is duplicate.\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tif($displayrow_a == 1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$displayrow = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif($displayrow_d == 1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$displayrow = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\tif($displayrow_d == 1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$displayrow = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif($displayrow_a == 1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$displayrow = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\tif ($displayrow == 1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$innercell = $innercell.\"<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<form style='margin-bottom:0;' action='part139337_report_display.php' method='POST' name='reportform' id='reportform' target='WLHMWindow' onsubmit='window.open('', 'WLHMWindow', 'width=800,height=600,status=no,resizable=no,scrollbars=yes')'>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td colspan='2' class='formoptionsubmit'>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type='hidden' name='recordid'\tID='recordid' \t\t\tvalue=\".$tmpdiscrepancyid.\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type='submit' value='D:\".$tmpdiscrepancyid.\"' name='b1' ID='b1' class='makebuttonlooklikelargetext' style='width:100%;'>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</form>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t$innercell = $innercell.\"</table>\";\t\r\n\t\t\t\t\tif ($counter == 0) {\r\n\t\t\t\t\t\t\t$innercell = $innercell.\"Nothing Reported\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t$calendar_html = $calendar_html.\"<td align=\\\"center\\\" valign='top' class='perp_report_activecell'>&nbsp;\".$innercell.\"</td>\";\r\n\t\t\t\t\t$week_day++;\r\n\t\t\t\t\t$counter = 0;\r\n\t\t\t\t}\r\n\r\n\t $calendar_html .= \"</tr>\";\r\n\t $calendar_html .= \"</table>\";\r\n\r\n\t return($calendar_html);\r\n\t }", "public static function create_calendar($month,$year,$calendar){\n\t\t// usamos mktime para crear la fecha exacta que queremos para crear valor $time \n\t\t$running_day = date('w',mktime(0,0,0,$month,1,$year)); // w devuelve el numero del dia de la semana\n\t\t$days_in_month = date('t',mktime(0,0,0,$month,1,$year)); //t devuelve el numero de dias del mes\n\t\t$days_in_week = 0;\n\t\t$day = 1;\n\t\t$week = 0;\n\t\t\n\t\t// Mandamos datos de los dias de la semana al arreglo\n\t\t// Imprimimos dias en blanco hasta alcanzar el primero en la semana\n\t\tfor ($days_in_week = 0; $days_in_week < $running_day; $days_in_week++){\n\t\t\t$calendar [$week][$days_in_week] = 0;\n\t\t}\n\t\t\n\t\t// Procedemos con los dias\n\t\twhile ($day <= $days_in_month) {\n\t\t// Mientras no se llegue al numero de dias del mes llenamos el arreglo\n\t\t\twhile($days_in_week < 7) { \n\t\t\t// Asignamos los dias restantes mientras no lleguemos al tope de dias de semana 7.\n\t\t\t// Al terminar los dias del mes seguimos llenando el arreglo de vacio\n\t\t\t\tif ($day <= $days_in_month){\n\t\t\t\t\t$calendar [$week][$days_in_week] = $day;\n\t\t\t\t} else {\n\t\t\t\t\t$calendar [$week][$days_in_week] = 0;\n\t\t\t\t}\n\n\t\t\t\t$days_in_week++;\n\t\t\t\t$day++;\n\t\t\t}\n\t\t\t$days_in_week = 0;\n\t\t\t$week++;\n\n\t\t}\n\t\treturn $calendar;\n\t}", "public function run()\n {\n $stop_date = date('07/01/2019');\n $daaa = array();\n for($y = 1; $y <= 1828; $y++){\n \n $d = date('d-m-Y', strtotime($stop_date . ' +'.$y.' days'));\n $date1 = date('Y-m-d', strtotime($stop_date . ' +'.$y.' days'));\n\n $day = date('D',strtotime($stop_date . ' +'.$y.' days'));\n $month = date('m',strtotime($stop_date . ' +'.$y.' days'));\n $year = date('Y',strtotime($stop_date . ' +'.$y.' days'));\n $mon = date('F',strtotime($stop_date . ' +'.$y.' days'));\n\n $daaa[$y]['date'] = $d;\n $daaa[$y]['day'] = $day;\n $daaa[$y]['month'] = $month;\n $daaa[$y]['year'] = $year;\n $daaa[$y]['mon'] = $mon;\n $daaa[$y]['dates'] = $date1;\n \n }\n \n foreach ($daaa as $dk => $dv) {\n\t Calender::create([\n\t 'date' => $dv['date'],\n\t 'day' => $dv['day'],\n\t 'month' => $dv['month'],\n\t 'year' => $dv['year'],\n\t 'month_name' => $dv['mon'],\n\t ]);\n\t }\n }", "public function render()\n {\n $this->prepareVars();\n return $this->makePartial('calendar');\n }", "public function index()\n {\n return $this->eventsToArray(Event::all());\n }", "public function archive()\n\t{\n\t\t// --------------------------------------\n\t\t// Prep no_results to avoid conflicts\n\t\t// --------------------------------------\n\n\t\t$this->_prep_no_results();\n\n\t\t// --------------------------------------\n\t\t// Get the events\n\t\t// --------------------------------------\n\n\t\tif ( ! ($events = $this->_get_event_entries()))\n\t\t{\n\t\t\t$this->_log('No events found, returning no results');\n\t\t\treturn $this->EE->TMPL->no_results();\n\t\t}\n\n\t\t// --------------------------------------\n\t\t// Loop through events and add them to the months array\n\t\t// --------------------------------------\n\n\t\t$months = array();\n\n\t\tforeach ($events AS $event)\n\t\t{\n\t\t\t// Create Low Date objects from each date\n\t\t\t$start = new Low_date($event['start_date']);\n\t\t\t$end = new Low_date($event['end_date']);\n\n\t\t\t// Set both dates to the first of the month\n\t\t\t// and return the month url: YYYY-MM\n\t\t\t$start_month = $start->first_of_month()->month_url();\n\t\t\t$end_month = $end->first_of_month()->month_url();\n\n\t\t\t// If event starts and ends in the same month,\n\t\t\t// simply add it to the months array\n\t\t\tif ($start_month == $end_month)\n\t\t\t{\n\t\t\t\t$months[$start_month][] = $event['entry_id'];\n\t\t\t}\n\t\t\t// Or else add each spanning month to the months array\n\t\t\telse\n\t\t\t{\n\t\t\t\t// To do this, increase the start date by a month\n\t\t\t\t// until it exceeds the end month\n\t\t\t\twhile ($start->month_url() <= $end_month)\n\t\t\t\t{\n\t\t\t\t\t$months[$start->month_url()][] = $event['entry_id'];\n\t\t\t\t\t$start->add('month');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// --------------------------------------\n\t\t// Sort the array by month\n\t\t// --------------------------------------\n\n\t\tif ($this->EE->TMPL->fetch_param('sort', 'asc') == 'asc')\n\t\t{\n\t\t\tksort($months);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tkrsort($months);\n\t\t}\n\n\t\t// --------------------------------------\n\t\t// Create data array based on month\n\t\t// --------------------------------------\n\n\t\t$data = array();\n\n\t\tforeach ($months AS $month => $rows)\n\t\t{\n\t\t\t// Initiate new row for data\n\t\t\t$row = array(\n\t\t\t\t'month_url' => $month,\n\t\t\t\t'events_in_month' => count($rows)\n\t\t\t);\n\n\t\t\t// Create new date for this month\n\t\t\t$date = new Low_Date($month);\n\n\t\t\t// Add each possible format to this row\n\t\t\tforeach ($this->formats AS $fmt => $key)\n\t\t\t{\n\t\t\t\t$row[$key] = $date->ee_format($fmt);\n\t\t\t}\n\n\t\t\t// Then add the row to the data array\n\t\t\t$data[] = $row;\n\t\t}\n\n\t\treturn $this->EE->TMPL->parse_variables($this->EE->TMPL->tagdata, $data);\n\n\t}", "public function drawHTML()\n\t{\n\t\t$this->calWeekDays .= \"<table border=\\\"1\\\">\\n\";\n\t\t$this->makeCalendarTitle();\n\t\t$this->makeCalendarHead();\n\t\t$this->makeDayHeadings();\n\t\t$this->calWeekDays .= \"\\t<tr>\\n\";\n\t\t$this->startMonthSpacers();\n\t\t$this->makeHTMLIterator();\n\t\t$this->endMonthSpacers();\n\t\t$this->calWeekDays .= \"\\t</tr>\\n\";\n\t\t$this->calWeekDays .= \"</table>\\n\";\n\t\t\n\t\techo $this->calWeekDays;\n\t}", "public function index()\n {\n\n return view('webapp-layouts.calendar.agenda');\n }", "public function month_list()\n\t{\n\t\t// -------------------------------------\n\t\t// Load 'em up\n\t\t// -------------------------------------\n\n\t\t$this->load_calendar_datetime();\n\t\t$this->load_calendar_parameters();\n\n\t\t// -------------------------------------\n\t\t// Prep the parameters\n\t\t// -------------------------------------\n\n\t\t$params = array(\n\t\t\tarray(\n\t\t\t\t'name'\t\t=> 'date_range_start',\n\t\t\t\t'required'\t=> FALSE,\n\t\t\t\t'type'\t\t=> 'date',\n\t\t\t\t'default'\t=> 'year-01-01'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name'\t\t=> 'date_range_end',\n\t\t\t\t'required'\t=> FALSE,\n\t\t\t\t'type'\t\t=> 'date'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name'\t\t=> 'limit',\n\t\t\t\t'required'\t=> FALSE,\n\t\t\t\t'type'\t\t=> 'integer',\n\t\t\t\t'default'\t=> 12\n\t\t\t)\n\t\t);\n\n//ee()->TMPL->log_item('Calendar: Processing parameters');\n\n\t\t$this->add_parameters($params);\n\n\t\t$today = $this->CDT->date_array();\n\n\t\t$this->CDT->change_ymd($this->P->value('date_range_start', 'ymd'));\n\t\t$this->CDT->set_default($this->CDT->datetime_array());\n\n\t\tif ($this->P->value('date_range_end') === FALSE)\n\t\t{\n\t\t\t$this->P->set(\n\t\t\t\t'date_range_end',\n\t\t\t\t$this->CDT->add_month($this->P->value('limit'))\n\t\t\t);\n\n\t\t\t$this->CDT->reset();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->P->set('limit', 9999);\n\t\t}\n\n\t\t$dir = (\n\t\t\t$this->P->value('date_range_end', 'ymd') >\n\t\t\t\t$this->P->value('date_range_start', 'ymd')\n\t\t) ? 1 : -1;\n\n\t\t$output = '';\n\t\t$count = 0;\n\n//ee()->TMPL->log_item('Calendar: Looping');\n\n\t\tdo\n\t\t{\n\t\t\t$vars['conditional']\t= array(\n\t\t\t\t'is_current_month'\t\t=>\t(\n\t\t\t\t\t$this->CDT->year == $today['year'] AND\n\t\t\t\t\t$this->CDT->month == $today['month']\n\t\t\t\t),\n\t\t\t\t'is_not_current_month'\t=>\t(\n\t\t\t\t\t$this->CDT->year == $today['year'] AND\n\t\t\t\t\t$this->CDT->month == $today['month']\n\t\t\t\t) ? FALSE : TRUE,\n\t\t\t\t'is_current_year'\t\t=>\t(\n\t\t\t\t\t$this->CDT->year == $today['year']\n\t\t\t\t) ? TRUE : FALSE,\n\t\t\t\t'is_not_current_year'\t=>\t(\n\t\t\t\t\t$this->CDT->year == $today['year']\n\t\t\t\t) ? FALSE : TRUE\n\t\t\t);\n\n\t\t\t$vars['single']\t= array(\n\t\t\t\t'year'\t=> $this->CDT->year,\n\t\t\t\t'month'\t=> $this->CDT->month\n\t\t\t);\n\n\t\t\t$vars['date']\t= array(\n\t\t\t\t'month'\t\t\t=> $this->CDT->datetime_array(),\n\t\t\t\t'date'\t\t\t=> $this->CDT->datetime_array(),\n\t\t\t);\n\n\t\t\t$output .= $this->swap_vars($vars, ee()->TMPL->tagdata);\n\t\t\t$this->CDT->add_month($dir);\n\t\t\t$count++;\n\t\t}\n\t\twhile (\n\t\t\t$count < $this->P->value('limit') AND\n\t\t\t$this->CDT->ymd < $this->P->value('date_range_end', 'ymd')\n\t\t);\n\n\t\treturn $output;\n\t}", "function calendar($url,$class='') {\n\n\tglobal $width;\n\tglobal $cell_width;\n\tglobal $legend_height;\n\tglobal $entry_color;\n\tglobal $entry_background_color;\n\tglobal $today_color;\n\tglobal $today_background_color;\n\tglobal $l_calendar;\n\tglobal $blog_script;\n\tglobal $lang;\n\tglobal $mysql_table;\n\t\n\tif ($_GET['date'] != '') {\n\t\t$MyDate = intval($_GET['date']);\n\t\t$year = substr($MyDate,0,4);\n\t\t$month = substr($MyDate,4,-2);\n\t} else {\n\t\t$month = date(\"n\");\n\t\t$year = date(\"Y\");\n\t}\n\t\n\t$prev = $month - 1;\n\t$next = $month + 1;\n\t$yearP = $year;\n\t$yearN = $year;\n\tif ($prev == \"0\") { $yearP--; $prev = \"12\"; }\n\tif ($prev < 10) $prev = '0'.$prev;\n\tif ($next == \"13\") { $yearN++; $next = \"1\"; }\n\tif ($next < 10) $next = '0'.$next;\n\n\t$transform_month = array(\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\");\n\t$into_month = array('Janvier','F&eacute;vrier','Mars','Avril','Mai','Juin','Juillet','Août','Septembre','Octobre','Novembre','D&eacute;cembre');\n\t\n\tfor ($l = 0; $l < 12; $l++) {\n\t\tif ($month == $transform_month[$l]) {\n\t\t\t$month_word = $into_month[$l];\n\t\t}\n\t}\n\n\t$output .= '<table style=\"width: '.$width.'; height: '.$legend_height.'\" class=\"'.$class.'\">\n\t<tr>\n\t\t<!--<td style=\"width: 10%; text-align: left;\"><a href=\"'.$url.'&date='.$yearP.$prev.'00\">&laquo;</a></td>-->\n\t\t<td colspan=\"7\"><b>'.strtoupper($month_word).' '.$year.'</b></td>\n\t\t<!--<td style=\"width: 10%; text-align: right;\"><a href=\"'.$url.'&date='.$yearN.$next.'00\">&raquo;</a></td>-->\n\t</tr>\n\t<tr align=\"center\">\n\t\t<td><b>L</b></td>\n\t\t<td><b>M</b></td>\n\t\t<td><b>M</b></td>\n\t\t<td><b>J</b></td>\n\t\t<td><b>V</b></td>\n\t\t<td><b>S</b></td>\n\t\t<td><b>D</b></td>\n\t</tr>\n\t<tr align=\"center\">';\n\t\n\t$no_days = date(\"t\", mktime(0, 0, 0, $month, 1, $year));\n\t$first_day = date(\"w\", mktime(0, 0, 0, $month, 1, $year));\n\t$today_day = date(\"j\");\n\t$today_month = date(\"n\");\n\t$today_year = date(\"Y\");\n\t\n\tif ($first_day == \"0\") $first_day = \"7\";\n\t\n\tfor ($i = 0; $i < $first_day-1; $i++) $output .= '<td style=\"width:'.$cell_width.';\">&nbsp;</td>';\n\n\tfor ($i = 1; $i <= $no_days; $i++) {\n\t\t//$result = mysql_query(\"SELECT id FROM blog WHERE DAYOFMONTH(timestamp)='$i' AND MONTH(timestamp) = '$month' AND YEAR(timestamp) = '$year' ORDER BY id DESC;\");\n\t\t$selectDate = $year.$month.($i<10?'0'.$i:$i);\n\t\t$result = mysql_query(\"SELECT id FROM blog WHERE datepubli='$selectDate' LIMIT 1 \");\n\t\t$num = mysql_num_rows($result);\n\t\t//$res = mysql_fetch_array($result);\n\t\n\t\tif ($first_day == \"8\") { $first_day = \"1\"; $output .= '<tr style=\"width: '.$width.';\" align=\"center\">'; }\n\t\tif ($i < 10) $space = ' '; else $space = '';\n\t\n\t\tif ($i == $today_day && $month == $today_month && $year == $today_year) \n\t\t\t$style = 'background-color: '.$today_background_color.'; color: '.$today_color.'; font-weight: bold;';\n\t\telse $style = '';\n\t\tif (intval($_GET['date']) == $selectDate) $style .= 'border:1px solid #000000;';\n\t\t\n\t\tif ($num < 1) $output .= '<td style=\"'.$style.' width: '.$cell_width.';\">'.$i.'</td>';\n\t\telse $output .= '<td style=\"background-color:'.$entry_background_color.';'.$style.'width: '.$cell_width.';color: '.$entry_color.';\"><a href=\"'.$url.'&date='.$selectDate.'\" style=\"color: '.$today_color.'\" title=\"Voir le sujet posté à cette date\">'.$i.'</a></td>';\n\t\t\n\t\tif ($first_day == \"7\") $output .= '</tr>';\n\t\t$first_day++;\n\t}\n\t\n\t$output .= '</table>';\n\t\n\treturn $output;\n\n}", "function create_calendar_array($used_dates){\n\n\t//create array of dates for October with false attributes\n\t$october = array();\n\tfor($day=1;$day<=31;$day++){\n\t\t$october[$day]=FALSE;\n\t}\n\t\n\t//compare used dates to whole month\n\tforeach\t($used_dates as $post_id=>$date){\n\t\t$october[intval($date['day'])][]=$post_id;\n\t}\n\t\t\n\t\n\treturn $october;\n}", "function getHomeCalendar()\n {\n $intYear = (isset($_GET['yearID'])) ? intval($_GET['yearID']) : date('Y', time());\n $intMonth = (isset($_GET['monthID'])) ? intval($_GET['monthID']) : date('m', time());\n $intDay = (isset($_GET['dayID'])) ? intval($_GET['dayID']) : 0;\n return $this->getCalendar($intYear,$intMonth,$intDay);\n }", "public function index()\n {\n return view('calendar.calendar');\n }", "public function dataProvider_for_createCalendarEvent()\n {\n return [\n 'not_recurring' => [\n [\n 'title' => str_random(16),\n 'start_datetime' => Carbon::parse('2017-08-25 10:00:00'),\n 'end_datetime' => Carbon::parse('2017-08-25 12:00:00'),\n 'description' => str_random(32),\n 'is_recurring' => false,\n 'is_public' => true,\n ],\n ],\n 'recurring' => [\n [\n 'title' => str_random(16),\n 'start_datetime' => Carbon::parse('2017-08-25 10:00:00'),\n 'end_datetime' => Carbon::parse('2017-08-25 12:00:00'),\n 'description' => str_random(32),\n 'is_recurring' => true,\n 'frequence_number_of_recurring' => 1,\n 'frequence_type_of_recurring' => RecurringFrequenceType::WEEK,\n 'is_public' => true,\n ],\n ],\n ];\n }", "public function toVObject(){\n\n\t\t//$stmt = $this->events(\\GO\\Base\\Db\\FindParams::newInstance()->select(\"t.*\"));\n\t\t$findParams = \\GO\\Base\\Db\\FindParams::newInstance()->select(\"t.*\");\n\t\t$findParams->getCriteria()->addCondition(\"calendar_id\", $this->id);\n\t\n\t\t$stmt = Event::model()->findForPeriod($findParams, \\GO\\Base\\Util\\Date::date_add(time(), 0, -1));\n\t\t\n\t\t$string = \"BEGIN:VCALENDAR\\r\\nVERSION:2.0\\r\\nPRODID:-//Intermesh//NONSGML \".\\GO::config()->product_name.\" \".\\GO::config()->version.\"//EN\\r\\n\";\n\n\t\t\t$t = new \\GO\\Base\\VObject\\VTimezone();\n\t\t\t$string .= $t->serialize();\n\n\t\t\twhile($event = $stmt->fetch()){\n\t\t\t\t$v = $event->toVObject();\n\t\t\t\t$string .= $v->serialize();\n\t\t\t}\n\n\t\t\t$string .= \"END:VCALENDAR\\r\\n\";\n\t\t\t\n\t\t\treturn $string;\n\t}", "public function index()\n\t{\n\t\t// Fetch calendars\n\t\t$calendars = $this->calendars->getAllCalendars();\n\n\t\t// Output\n\t\t$this->display($this->load->view('calendar/list', ['calendars' => $calendars], TRUE));\n\t}" ]
[ "0.6879275", "0.6866407", "0.6681683", "0.66030675", "0.6585608", "0.65136975", "0.6499322", "0.6464244", "0.6386328", "0.636859", "0.6288093", "0.6283444", "0.6279114", "0.62678814", "0.6267044", "0.62599", "0.6204513", "0.61667717", "0.6158972", "0.6122414", "0.6097351", "0.60933614", "0.6081944", "0.6081", "0.6080307", "0.60789603", "0.6073175", "0.60688347", "0.60653496", "0.6039304", "0.6037067", "0.60289985", "0.60175765", "0.6013367", "0.6007561", "0.60073704", "0.5999127", "0.5987903", "0.597288", "0.59727186", "0.5962206", "0.59355444", "0.5921507", "0.59066683", "0.58936524", "0.58888537", "0.5887802", "0.5884661", "0.58829194", "0.5882514", "0.5876733", "0.5872371", "0.58653545", "0.5860633", "0.58588296", "0.58543205", "0.5852669", "0.5852485", "0.5847048", "0.5843457", "0.58292294", "0.58245075", "0.5815484", "0.58098596", "0.5801388", "0.57970953", "0.5793553", "0.5776587", "0.5774229", "0.5752616", "0.57521677", "0.57516354", "0.5749", "0.57457006", "0.57450247", "0.5730462", "0.57297945", "0.57291913", "0.571862", "0.5710861", "0.57081795", "0.5696265", "0.5674837", "0.567379", "0.5668805", "0.56665266", "0.56655955", "0.56609666", "0.56575465", "0.5655285", "0.56544006", "0.5650942", "0.56452465", "0.56411064", "0.56321967", "0.5630447", "0.5626891", "0.56245494", "0.56235033", "0.56189126" ]
0.74939036
0
Generic method to draw the calendar Outputs the HTML for drawing the calendar table.
public function drawHTML() { $this->calWeekDays .= "<table border=\"1\">\n"; $this->makeCalendarTitle(); $this->makeCalendarHead(); $this->makeDayHeadings(); $this->calWeekDays .= "\t<tr>\n"; $this->startMonthSpacers(); $this->makeHTMLIterator(); $this->endMonthSpacers(); $this->calWeekDays .= "\t</tr>\n"; $this->calWeekDays .= "</table>\n"; echo $this->calWeekDays; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function output_calendar() // Generating calendar HTML content\r\n\t{\r\n\t\t# Apparently, it's not possible to dereference $this->callback()\r\n\t\t$cb = $this->callback;\r\n\r\n\t\t# Preliminary calculations\r\n\t\t$t = getdate(strtotime($this->date));\r\n\t\t$today = $t[\"mday\"];\r\n\t\t$year = $t[\"year\"];\r\n\t\t$month = $t[\"mon\"];\r\n\t\t# Get first day of the month (monday = 0)\r\n\t\t$first_wday = ((int) date(\"w\", mktime(0, 0, 0, $month, 1, $year))+6)%7;\r\n\t\t# Last day of the month\r\n\t\t$last_mday = (int) date(\"d\", mktime(0, 0, 0, $month+1, 0, $year));\r\n\r\n\t\t# Anchor\r\n\t\t//$this->content[].=\"<a name=\\\"calendar\\\">\";\r\n\r\n\t\t# Table\r\n\t\t$this->content[].=\"<table width=\\\"100%\\\" align=\\\"center\\\" cellpadding=\\\"0\\\" cellspacing=\\\"2\\\" class=\\\"calendar\\\">\\n\";\r\n\r\n\t\t# Table head\r\n\t\t$this->content[].=\"<tr><td colspan=\\\"7\\\" class=\\\"calendar_header\\\">{$this->month_name[$month - 1]}&nbsp;&nbsp;&nbsp;{$t['year']}</td></tr>\\n<tr>\\n\";\r\n\t\tfor ($j = 0;$j <= 6;$j++) {\r\n\t\t\t$this->content[].=\"<th class=\\\"calendar_title\\\">\";\r\n\t\t\t$this->content[].=\"{$this->day_name[$j]}\";\r\n\t\t\t$this->content[].=\"</th>\\n\";\r\n\t\t}\r\n\t\t$this->content[].=\"</tr>\\n\";\r\n\r\n\t\t// Day row\r\n\t\t// A month is displayed on 6 rows\r\n\t\t// except for a 28 days month starting on Monday\r\n\t\tif (($last_mday == 28) and ($first_wday == 0))\r\n\t\t$jmax = 27;\r\n\t\telse\r\n\t\t$jmax = 41;\r\n\r\n\t\tfor ($j = 0;$j <= $jmax;$j++) {\r\n\t\t\t# Start new row on Monday\r\n\t\t\tif ($j % 7 == 0)\r\n\t\t\t$this->content[].=\"<tr>\\n\";\r\n\r\n\t\t\t// Title colour for current day and checking week end days\r\n\r\n\t\t\tif (($j == $today+$first_wday-1) and ($j % 7 == 6)) // if today and weekend day\r\n\t\t\t$this->content[].=\"<td class=\\\"calendar_title_we\\\">\";\r\n\r\n\t\t\tif (($j % 7 == 6) and ($j != $today+$first_wday-1)) // if weekend day and not today\r\n\t\t\t$this->content[].=\"<td class=\\\"calendar_day_we\\\">\";\r\n\r\n\r\n\t\t\tif (($j == $today+$first_wday-1) and ($j % 7 != 6)) // if today and not weekend day\r\n\t\t\t$this->content[].=\"<td class=\\\"calendar_title\\\">\";\r\n\r\n\t\t\tif (($j % 7 != 6) and ($j != $today+$first_wday-1)) // if not today and not weekend day\r\n\t\t\t$this->content[].=\"<td class=\\\"calendar_day\\\">\";\r\n\r\n\t\t\tif (($j<$first_wday) or ($j>=$last_mday + $first_wday)) {\r\n\r\n\t\t\t\t# Empty boxes\r\n\t\t\t\t$this->content[].=\"&nbsp;\";\r\n\t\t\t} else {\r\n\t\t\t\tif (isset($cb))\r\n\t\t\t\techo $cb(mktime(0, 0, 0, $month, $j - $first_wday + 1, $year));\r\n\t\t\t\t$this->content[].=date($this->date_format, mktime(0, 0, 0, $month, $j - $first_wday + 1, $year));\r\n\t\t\t\tif (isset($cb))\r\n\t\t\t\t$this->content[].=\"</a>\\n\";\r\n\t\t\t}\r\n\t\t\t$this->content[].=\"</td>\\n\";\r\n\r\n\t\t\t# End of row on Sunday\r\n\t\t\tif ($j % 7 == 6)\r\n\t\t\t$this->content[].=\"</tr>\\n\";\r\n\t\t}\r\n\t\t$this->content[].=\"</table>\\n\";\r\n\t}", "function draw_calendar($month,$year,$events = array()){\n\t\t$dayofweek = array('<td class=\"calendar-header\">Sunday</td>',\n\t\t'<td class=\"calendar-header\">Monday</td>',\n\t\t'<td class=\"calendar-header\">Tuesday</td>',\n\t\t'<td class=\"calendar-header\">Wednesday</td>',\n\t\t'<td class=\"calendar-header\">Thursday</td>',\n\t\t'<td class=\"calendar-header\">Friday</td>',\n\t\t'<td class=\"calendar-header\">Saturday</td>');\n\t\t\n\t\t/* draw table\n\t\t\t- fill top row with array using implode */\n\t\t$calendar = '<table class=\"calendar\"><tr class=\"calendar-row\">'.implode($dayofweek).'</tr>';\n\t\t\n\t\t// mktime(hour,minute,second,month,day,year);\n\t\t// figures out the which day of the week 1st is based on provided $month and $year\n\t\t$startDay = date('w',mktime(0,0,0,$month,1,$year)); // return days of the week\n\t\t$days = cal_days_in_month(CAL_GREGORIAN,$month,$year);\n\t\t$daysFilled;\n\t\t$counter = 0;\n\t\n\t\t/* row 2 */\n\t\t$calendar.= '<tr class=\"calendar-row\">';\n\t\n\t\t/* print \"blank\" days until the first of the month */\n\t\tfor($i = 0; $i < $startDay; $i++){\n\t\t\t$calendar.= '<td class=\"calendar-empty\"> </td>';\n\t\t\t$daysFilled++;\n\t\t}\n\t\n\t\t/* for loop to add days */\n\t\tfor($i = 1; $i <= $days; $i++):\n\t\t\t$calendar.= '<td class=\"calendar-day\"><div style=\"position:relative;height:100px;\"><div class=\"date\">'.$i.'</div>';\n\t\t\t\n\t\t\tif ($i < 10){\n\t\t\t\t$i = \"0\".$i;\n\t\t\t}\n\t\t\t\n\t\t\t// input event into calendar\n\t\t\t$eventDay = $year.'-'.$month.'-'.$i;\n\t\t\t\tif(isset($events[$eventDay])) { // if there are events on $eventDay\n\t\t\t\t\tforeach($events[$eventDay] as $eventid) { // for each event, add to calendar\n\t\t\t\t\t\t$mysql = new mysql();\n\t\t\t\t\t\t$tripdetail = $mysql->get_specifictrip($eventid);\n\t\t\t\t\t\t$calendar.= '<div class=\"event\"';\n\t\t\t\t\t\tif($tripdetail[approval]==0){\n\t\t\t\t\t\t\t$calendar.=' style=\"color:#FF6666;\"';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif($tripdetail[approval]==-1){\n\t\t\t\t\t\t\t$calendar.=' style=\"color:#6666E0; text-decoration:line-through;\"';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$calendar.='><a style=\"text-decoration:none; color:inherit;\" href=\"?page=detail2&trip='.$tripdetail[eventid].'\"';\n\t\t\t\t\t\t$calendar.='>'.$tripdetail[destination].'</div>';\n\t\t\t\t\t}\n\t\t\t\t\t$calendar.='</td>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse {\n\t\t\t\t\t$calendar.= '<p> </p><p> </p></div></td>';\n\t\t\t\t}\n\n\t\t\tif($startDay == 6){ // if the month starts on Saturday, end current row\n\t\t\t\t$calendar.= '</tr>';\n\t\t\t\tif(($counter+1) != $days){ // if there are still days left to fill, new row\n\t\t\t\t\t$calendar.= '<tr class=\"calendar-row\">';\n\t\t\t\t}\n\t\t\t\t$startDay = -1;\n\t\t\t\t$daysFilled = 0;\n\t\t\t}\n\t\t\t$daysFilled++;\n\t\t\t$startDay++;\n\t\t\t$counter++;\n\t\tendfor;\n\t\n\t\t// finish filling in the rest of the days with blanks\n\t\tif($daysFilled < 8 && $daysFilled !=1):\n\t\t\tfor($x = 1; $x <= (8 - $daysFilled); $x++):\n\t\t\t\t$calendar.= '<td class=\"calendar-empty\"> </td>';\n\t\t\tendfor;\n\t\tendif;\n\t\n\t\t// end row, table\n\t\t$calendar.= '</tr></table>';\n\t\t\n\t\t\n\t\t// return HTML code for calendar\n\t\treturn $calendar;\n\t}", "function draw_calendar($month,$year,$cal,$available_list,$price_list){\n\n /* draw table */\n $calendar = '<table cellpadding=\"0\" cellspacing=\"0\" class=\"calendar\">';\n\n /* table headings */\n $headings = array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');\n $calendar.= '<tr class=\"calendar-row\"><td class=\"calendar-day-head\">'.implode('</td><td class=\"calendar-day-head\">',$headings).'</td></tr>';\n\n /* days and weeks vars now ... */\n $running_day = date('w',mktime(0,0,0,$month,1,$year));\n $days_in_month = date('t',mktime(0,0,0,$month,1,$year));\n $days_in_this_week = 1;\n $day_counter = 0;\n $dates_array = array();\n\n /* row for week one */\n $calendar.= '<tr class=\"calendar-row\">';\n\n /* print \"blank\" days until the first of the current week */\n for($x = 0; $x < $running_day; $x++):\n $calendar.= '<td class=\"calendar-day-np\"> </td>';\n $days_in_this_week++;\n endfor;\n\n /* keep going with days.... */\n for($list_day = 1; $list_day <= $days_in_month; $list_day++):\n // echo \" cal: \".($available_list[$list_day - 1] == 't').\"\\n\";\n if ($available_list[$list_day - 1] == 't')\n {\n $calendar.= '<td class=\"calendar-day\" bgcolor=\"#00FF00\">';\n } else {\n $calendar.= '<td class=\"calendar-day\" bgcolor=\"#FF0000\">';\n\n }\n \n\n /* add in the day number */\n $calendar.= '<div class=\"day-number\" ><font size=\"+3\">'.$list_day.\"</font> \".$price_list[$list_day-1].'</div>';\n\n /** QUERY THE DATABASE FOR AN ENTRY FOR THIS DAY !! IF MATCHES FOUND, PRINT THEM !! **/\n $calendar.= str_repeat('<p> </p>',2);\n \n $calendar.= '</td>';\n if($running_day == 6):\n $calendar.= '</tr>';\n if(($day_counter+1) != $days_in_month):\n $calendar.= '<tr class=\"calendar-row\">';\n endif;\n $running_day = -1;\n $days_in_this_week = 0;\n endif;\n $days_in_this_week++; $running_day++; $day_counter++;\n endfor;\n\n /* finish the rest of the days in the week */\n if($days_in_this_week < 8):\n for($x = 1; $x <= (8 - $days_in_this_week); $x++):\n $calendar.= '<td class=\"calendar-day-np\"> </td>';\n endfor;\n endif;\n\n /* final row */\n $calendar.= '</tr>';\n\n /* end the table */\n $calendar.= '</table>';\n \n /* all done, return result */\n return $calendar;\n }", "function draw_calendar($month,$year){\r\n\t/*Naredi koledar*/\r\n\t$calendar = '<table cellpadding=\"0\" cellspacing=\"0\" class=\"calendar\">';\r\n\t\r\n\t$headings = array('Nedelja','Ponedeljek','Torek','Sreda','Cetrtek','Petek','Sobota');\r\n\t$calendar.= '<tr class=\"calendar-row\"><td class=\"calendar-day-head\">'.implode('</td><td class=\"calendar-day-head\">',$headings).'</td></tr>';\r\n\r\n\t$running_day = date('w',mktime(0,0,0,$month,1,$year));\r\n\t$days_in_month = date('t',mktime(0,0,0,$month,1,$year));\r\n\t$days_in_this_week = 1;\r\n\t$day_counter = 0;\r\n\t$dates_array = array();\r\n\r\n\t$calendar.= '<tr class=\"calendar-row\">';\r\n\r\n\tfor($x = 0; $x < $running_day; $x++):\r\n\t\t$calendar.= '<td class=\"calendar-day-np\">&nbsp;</td>';\r\n\t\t$days_in_this_week++;\r\n\tendfor;\r\n\r\n\tfor($list_day = 1; $list_day <= $days_in_month; $list_day++):\r\n\t\tif($list_day < 10) {\r\n $list_day = str_pad($list_day, 2, '0', STR_PAD_LEFT);\r\n }\r\n\t\t$month = str_pad($month, 2, '0', STR_PAD_LEFT);\r\n\t\t$event_day = $year.'-'.$month.'-'.$list_day;\r\n\r\n\t\t$calendar.= '<td class=\"calendar-day\"><div name=\"test\" style=\"height:100px; width:120px; overflow: auto; white-space:nowrap\" id=' .$event_day. ' onclick=\"modal(this.id);\">';\r\n\t\t$calendar.= '<div>'.$list_day.'</div>';\t\r\n\t\t$query = \"SELECT CONCAT_WS(' ',s.firstname,s.lastname) as Zaposleni, a.name, aa.aktivnost_id\r\n\t\t\tFROM ost_staff s, ost_agent_aktivnost aa, ost_aktivnosti a\r\n\t\t\tWHERE s.staff_id = aa.staff_id and a.id=aa.aktivnost_id and '$event_day' BETWEEN aa.aktivnost_od AND aa.aktivnost_do AND aa.aktivnost_id > 1 AND aa.aktivnost_id != 9 AND aa.aktivnost_id != 10\";\r\n\t\t\t$result = db_query($query) or die('Ne morem pridobiti rezultata!');\r\n\t\t\twhile($row = db_fetch_array($result)) {\r\n\t\t\t\t$words = explode(' ',$row['Zaposleni']);\r\n\t\t\t\t$calendar .= '<div>'.$words[0][0].'. '.$words[1][0].'. : '.$row['name'].'</div>';\r\n\t\t\t}\r\n\t\t$calendar.= '</div></td>';\r\n\t\tif($running_day == 6):\r\n\t\t\t$calendar.= '</tr>';\r\n\t\t\tif(($day_counter+1) != $days_in_month):\r\n\t\t\t\t$calendar.= '<tr class=\"calendar-row\">';\r\n\t\t\tendif;\r\n\t\t\t$running_day = -1;\r\n\t\t\t$days_in_this_week = 0;\r\n\t\tendif;\r\n\t\t$days_in_this_week++; $running_day++; $day_counter++;\r\n\tendfor;\r\n\r\n\tif($days_in_this_week < 8):\r\n\t\tfor($x = 1; $x <= (8 - $days_in_this_week); $x++):\r\n\t\t\t$calendar.= '<td class=\"calendar-day-np\">&nbsp;</td>';\r\n\t\tendfor;\r\n\tendif;\r\n\r\n\t$calendar.= '</tr>';\r\n\r\n\t$calendar.= '</table>';\r\n\r\n\t$calendar = str_replace('</td>','</td>'.\"\\n\",$calendar);\r\n\t$calendar = str_replace('</tr>','</tr>'.\"\\n\",$calendar);\r\n\r\n\treturn $calendar;\r\n}", "public function render()\r\n\t{\r\n\t\t$days = 1;\r\n\t\t$this->redirect = isset($this->redirect) ? $this->redirect: $this->getURL() ;\r\n\t\t$this->set_date();\r\n\t\t$total_days = cal_days_in_month(CAL_GREGORIAN, $this->month, $this->year);\r\n\t\t$first_spaces = date(\"w\", mktime(0, 0, 0, $this->month, 1, $this->year));\r\n\t\t$currentday = $this->UID('day');\r\n\r\n\t\tif (isset($this->inForm))\r\n\t\t{\r\n\t\t\t$CObjID = $this->UID('calendar');\r\n\t\t\t$DateString = ($this->Value()) ? '\",\"'.$this->Value() : '';\r\n\t\t\t$this->output = '<script language=\"javascript\">'.\"\\n\".'var '.$CObjID.' = new Calendar(\"'.$this->ID.$DateString.'\");'.\"\\n\"\r\n\t\t\t.$CObjID.'.currentDateStyle = \"'.$this->currentDateStyle.'\";'.\"\\n\"\r\n\t\t\t.$CObjID.'.selectedDateStyle = \"'.$this->selectedDateStyle.'\";'.\"\\n\"\r\n\t\t\t.$CObjID.'.normalDateStyle = \"'.$this->normalDateStyle.'\";'.\"\\n\"\r\n\t\t\t.$CObjID.'.setStyles();'.\"\\n\"\r\n\t\t\t.'</script>'.\"\\n\"\r\n\t\t\t.'<input type=\"hidden\" id=\"'.$CObjID.'\" name=\"'.$CObjID.'\" value=\"'.$this->Value().'\"/>'.\"\\n\";\r\n\t\t}\r\n\t\telse $this->output = '';\r\n\r\n\t\t$NavUrls = $this->url_params($this->UID('year'),$this->UID('month'),$this->UID('day'),array_keys($this->add_params_sel));\r\n\r\n\t\t$this->output.= '<table class=\"calendar\"><tr><td class=\"'.$this->navigateStyle.'\"><a id=\"'.$this->UID('navigateback').'\" class=\"'.$this->navigateStyle.'\" href=\"'.$this->getURL().\r\n\t\t\t'?'.$this->add_params_sel().'&'.$this->UID('month').'='.($this->month-1).'&'.$this->UID('year').'='.$this->year.$NavUrls.'\"><</a>\r\n\t\t </td><td id=\"'.$this->UID('Month').'\" colspan=\"5\" class=\"'.$this->monthStyle.'\">'.$this->RUS_MONTHS[date(\"n\", mktime(0, 0, 0, $this->month, 1, $this->year))-1].'&nbsp;'.$this->year.'\r\n\t\t </td><td class=\"'.$this->navigateStyle.'\"><a id=\"'.$this->UID('navigatenext').'\" class=\"'.$this->navigateStyle.'\" href=\"'.$this->getURL().'?'.$this->add_params_sel().'&'.$this->UID('month').'='.($this->month+1).'&'.$this->UID('year').'='.$this->year.$NavUrls.'\">></a>\r\n\t\t </td></tr><tr class=\"'.$this->daysOfTheWeekStyle.'\"><td>Ïí</td><td>Âò</td><td>Ñð</td><td>×ò</td><td>Ïò</td><td>Ñá</td><td>Âñ</td></tr>';\r\n\r\n \tfor ($Week=0;$Week<6;$Week++)\r\n \t{\r\n \t$this->output.= '<tr>';\r\n\r\n\t\t\t\tfor ($Day=0;$Day<7;$Day++)\r\n \t{\r\n\r\n\t\t\t\t\t$days++;\r\n\t\t\t\t\t$dDay = $days - $first_spaces;\r\n\t\t\t\t\t$norm_style = ($this->isDayAvailable($dDay))?$this->availDateStyle:$this->normalDateStyle;\r\n\t\t\t\t\t\r\n//\t\t\t\t\techo('dDay='.$dDay.'<br/>avail dates:');\r\n//\t\t\t\t\tforeach($this->availDates as $date)\r\n//\t\t\t\t\t\techo(date('d/m/Y',$date).'<br/>');\r\n\r\n\t\t\t\t\t$CellID = $this->UID('item['.$days.']');\r\n\r\n\t\t\t\t\tif ($days > $first_spaces && ($dDay) < $total_days + 1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$LinkID = $this->UID('hlink['.$days.']');\r\n\t\t\t\t\t\t$currentSelectedDay = '<td id=\"'.$CellID.'\" class=\"'.$this->selectedDateStyle.'\"><a id=\"'.$LinkID.'\" class=\"'.$this->selectedDateStyle.'\"';\r\n\t\t\t\t\t\t$CurrentDate = isset($_REQUEST[$currentday]) ? $_REQUEST[$currentday]: '';\r\n\r\n\t\t\t\t\t\tif ($CurrentDate == $dDay)\t$this->output.= $currentSelectedDay;\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$this->output.='<td id=\"'.$CellID.'\" class=';\r\n\t\t\t\t\t\t\t$this->output.= ($dDay==date(\"j\") && $this->year==date(\"Y\") && $this->month==date(\"n\")) ?\r\n\t\t\t\t\t\t\t\t'\"'.$this->currentDateStyle.'\"><a id=\"'.$LinkID.'\" class=\"'.$this->currentDateStyle.'\"' :\r\n\t\t\t\t\t\t\t\t'\"'.$norm_style.'\"><a id=\"'.$LinkID.'\" class=\"'.$this->normalDateStyle.'\"';\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif($this->isDayAvailable($dDay))\r\n\t\t\t\t\t\t\t$this->output.= 'href=\"'.$this->redirect.'?'.$this->add_params_day().'&'.$currentday.'='.$dDay.$this->url_params($currentday,array_keys($this->add_params_day)).'\">'.$dDay.'</a></td>';\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t$this->output.= '>'.$dDay.'</a></td>';\r\n\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$this->output.='<td id=\"'.$CellID.'\" class=\"'.$this->normalDateStyle.'\"></td>'.\"\\n\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$this->output.=\"</tr>\";\r\n \t}\r\n\r\n\t\t$this->output.= '</table>';\r\n\r\n\t\treturn $this->output;\r\n\t}", "public function buildCalendar(){\n\n\t\t$first_day = $this->getFirstDay();\t\t\t\t\t\t//Determine what day of the week the month starts on\n\t\t$current_number_of_days = $this->getNumberOfDays();\t\t//Determine the number of days in the month\n\n\t\t$number_of_previous_days = $first_day;\t\t\t\t\t\t\t\t\t\t//Determine the number of days needed to complete the first week\n\t\t$prev_month_number_of_days = $this->getNumberOfDays($this->getMonth()-1); \t//Determine the number of days in the previous month\n\t\t\n\t\t$_SESSION['month'] = $this->getMonth();\n\t\t$_SESSION['year'] = $this->getYear();\n\t\t$_SESSION['view'] = 'calendar';\n\n\t\tob_start();?>\n <table border=\"0\" id=\"events_calendar\">\n <?php echo $this->buildCalendarHead() ?>\n <tr id=\"events_calendar_weekdays\">\n <th>\n\t\t\t\t\t<div class=\"full_week_name\">Sunday</div>\n\t\t\t\t\t<div class=\"short_week_name\">Sun</div>\n\t\t\t\t\t<div class=\"abrev_week_name\">S</div>\n </th>\n <th>\n\t\t\t\t\t<div class=\"full_week_name\">Monday</div>\n\t\t\t\t\t<div class=\"short_week_name\">Mon</div>\n\t\t\t\t\t<div class=\"abrev_week_name\">M</div>\n </th>\n <th>\n\t\t\t\t\t<div class=\"full_week_name\">Tuesday</div>\n\t\t\t\t\t<div class=\"short_week_name\">Tue</div>\n\t\t\t\t\t<div class=\"abrev_week_name\">T</div>\n </th>\n <th>\n\t\t\t\t\t<div class=\"full_week_name\">Wednesday</div>\n\t\t\t\t\t<div class=\"short_week_name\">Wed</div>\n\t\t\t\t\t<div class=\"abrev_week_name\">W</div>\n </th>\n <th>\n\t\t\t\t\t<div class=\"full_week_name\">Thursday</div>\n\t\t\t\t\t<div class=\"short_week_name\">Thu</div>\n\t\t\t\t\t<div class=\"abrev_week_name\">T</div>\n </th>\n <th>\n\t\t\t\t\t<div class=\"full_week_name\">Friday</div>\n\t\t\t\t\t<div class=\"short_week_name\">Fri</div>\n\t\t\t\t\t<div class=\"abrev_week_name\">F</div>\n </th>\n <th>\n\t\t\t\t\t<div class=\"full_week_name\">Saturday</div>\n\t\t\t\t\t<div class=\"short_week_name\">Sat</div>\n\t\t\t\t\t<div class=\"abrev_week_name\">S</div>\n </th>\n </tr>\n <?php\n $dayCounter = 0;\t\t\t\t\t\t\t\t\t\t\t//Keeps count of the days in a week\n\n /*** PREVIOUS MONTH CELLS ***/\n for($day = $number_of_previous_days; $day >= 1; $day--){\t//For each day in the previous month needed for a full week\n $dayNumber = $prev_month_number_of_days - ($day-1);\t\t\n \n //Get full date (YYYY-MM-DD)\n $year = ($this->getPrevMonth() == 12)? ($this->getYear()-1): $this->getYear();\n $full_date = $year . '-' . $this->getPrevMonth() . '-' . $dayNumber;\n \n $dayCounter ++;\n if($dayCounter == 1){\t\t\t\t\t//Start new row\n echo '<tr>';\n }\n \n echo $this->buildCalendarCell($full_date, $dayNumber, 'prev_month');\t//Create Calendar Cell\n\n if($dayCounter == 7){\t\t\t\t\t//End new row\n echo '</tr>';\n $dayCounter = 0;\n }\n }\n\n /*** CURRENT MONTH CELLS ***/\n for($day = 1; $day <= $current_number_of_days; $day++){\t\t//For each day in the current month\n $full_date = $this->getYear() . '-' . $this->getMonth() . '-' . $day;\n $dayCounter ++;\n if($dayCounter == 1){\t\t\t\t\t//Start new row\n echo '<tr>';\n }\n\n echo $this->buildCalendarCell($full_date, $day, 'current_month');\t//Create Calendar Cell\n\n if($dayCounter == 7){\t\t\t\t\t//End new row\n echo '</tr>';\n $dayCounter = 0;\n }\n }\n\n /*** NEXT MONTH CELLS ***/\n for($day = 1; $day <= $dayCounter; $day++){\t//For each day in the current month\n //Get full date (YYYY-MM-DD)\n $year = ($this->getNextMonth() == 1)? ($this->getYear()+1): $this->getYear();\n $full_date = $year . '-' . $this->getNextMonth() . '-' . $day;\n \n $dayCounter ++;\n if($dayCounter == 1){\t\t\t\t\t//Start new row\n echo '<tr>';\n }\n\n echo $this->buildCalendarCell($full_date, $day, 'next_month');\t//Create Calendar Cell\n\n if($dayCounter == 7){\t\t\t\t\t//End new row\n echo '</tr>';\n $dayCounter = 0;\n }\n }\n ?>\n </table>\n <style>\n\t\t\t<?php \n\t\t\tforeach($this->getCategories() as $c){?>\n\t\t\t#events_calendar .event.category_<?php echo $c->getId(); ?>:before{color: <?php echo $c->getColor(); ?> !important;}\n\t\t\t<?php } ?>\n\t\t</style>\n <?php\n\t\treturn ob_get_clean();\n\t}", "function draw_calendar($month,$year,$activityStartDateArray = array()){\r\n\r\n\t/* draw table */\r\n\t$calendar = '<table cellpadding=\"0\" cellspacing=\"0\" class=\"calendar\">';\r\n\r\n\t/* table headings */\r\n\t$headings = array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');\r\n\t$calendar.= '<tr class=\"calendar-row\"><td class=\"calendar-day-head\">'.implode('</td><td class=\"calendar-day-head\">',$headings).'</td></tr>';\r\n\r\n\t/* days and weeks vars now ... */\r\n\t$running_day = date('w',mktime(0,0,0,$month,1,$year));\r\n\t$days_in_month = date('t',mktime(0,0,0,$month,1,$year));\r\n\t$days_in_this_week = 1;\r\n\t$day_counter = 0;\r\n\t$dates_array = array();\r\n\r\n\t/* row for week one */\r\n\t$calendar.= '<tr class=\"calendar-row\">';\r\n\r\n\t/* print \"blank\" days until the first of the current week */\r\n\tfor($x = 0; $x < $running_day; $x++):\r\n\t\t$calendar.= '<td class=\"calendar-day-np\">&nbsp;</td>';\r\n\t\t$days_in_this_week++;\r\n\tendfor;\r\n\r\n\t/* keep going with days.... */\r\n\tfor($list_day = 1; $list_day <= $days_in_month; $list_day++):\r\n\t\t$calendar.= '<td class=\"calendar-day\"><div style=\"position:relative;height:100px;\">';\r\n\t\t\t/* add in the day number */\r\n\t\t\t$calendar.= '<div class=\"day-number\">'.$list_day.'</div>';\r\n\t\t\t\r\n\t\t\t//eventdate=startdate and enddate, depends which we talks about \r\n\r\n\t\t\t$startDate = $year.'-'.$month.'-'.$list_day;\r\n\t\t\t//$endDate = $year.'-'.$month.'-'.$list_day;\r\n\t\t\techo \"<br>the start date is\".$startDate;\r\n\t\t\t//something is wrong wit hteh startDate, the origin code has a while loop in the beginning, think why \r\n\t\t\t\r\n\t\t\tif(isset($activityStartDateArray[$startDate])) {\r\n\t\t\t\tforeach($activityStartDateArray[$startDate] as $activity) {\r\n\t\t\t\t\t$calendar.= '<div class=\"activity\">'.$activity['activityName'].'</div>';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\r\n\t\t\telse {\r\n\t\t\t\t$calendar.= str_repeat('<p>&nbsp;</p>',2);\r\n\t\t\t}\r\n\t\t$calendar.= '</div></td>';\r\n\t\tif($running_day == 6):\r\n\t\t\t$calendar.= '</tr>';\r\n\t\t\tif(($day_counter+1) != $days_in_month):\r\n\t\t\t\t$calendar.= '<tr class=\"calendar-row\">';\r\n\t\t\tendif;\r\n\t\t\t$running_day = -1;\r\n\t\t\t$days_in_this_week = 0;\r\n\t\tendif;\r\n\t\t$days_in_this_week++; $running_day++; $day_counter++;\r\n\tendfor;\r\n\t\r\n\t\r\n\t/* finish the rest of the days in the week */\r\n\tif($days_in_this_week < 8):\r\n\t\tfor($x = 1; $x <= (8 - $days_in_this_week); $x++):\r\n\t\t\t$calendar.= '<td class=\"calendar-day-np\">&nbsp;</td>';\r\n\t\tendfor;\r\n\tendif;\r\n\r\n\t/* final row */\r\n\t$calendar.= '</tr>';\r\n\t\r\n\r\n\t/* end the table */\r\n\t$calendar.= '</table>';\r\n\r\n\t/** DEBUG **/\r\n\t$calendar = str_replace('</td>','</td>'.\"\\n\",$calendar);\r\n\t$calendar = str_replace('</tr>','</tr>'.\"\\n\",$calendar);\r\n\t\r\n\t/* all done, return result */\r\n\treturn $calendar;\r\n}", "function draw_calendar(){\r\n \r\n $year = date(\"Y\");\r\n $monthCurrent = date(\"m\");\r\n $monthNext1 = date(\"m\", strtotime('+1 month'));\r\n $monthNext2 = date(\"m\", strtotime('+2 month'));\r\n $monthNext3 = date(\"m\", strtotime('+3 month'));\r\n $monthNext4 = date(\"m\", strtotime('+4 month'));\r\n $monthNext5 = date(\"m\", strtotime('+5 month'));\r\n\r\n $monthCurrentStr = date(\"M\");\r\n $monthNext1Str = date(\"M\", strtotime('+1 month'));\r\n $monthNext2Str = date(\"M\", strtotime('+2 month'));\r\n $monthNext3Str = date(\"M\", strtotime('+3 month'));\r\n $monthNext4Str = date(\"M\", strtotime('+4 month'));\r\n $monthNext5Str = date(\"M\", strtotime('+5 month'));\r\n\r\n\r\n $numberofday1 = cal_days_in_month(CAL_GREGORIAN,$monthCurrent , $year);\r\n $numberofday2 = cal_days_in_month(CAL_GREGORIAN,$monthNext1 , $year);\r\n $numberofday3 = cal_days_in_month(CAL_GREGORIAN,$monthNext2 , $year);\r\n $numberofday4 = cal_days_in_month(CAL_GREGORIAN,$monthNext3 , $year);\r\n $numberofday5 = cal_days_in_month(CAL_GREGORIAN,$monthNext4 , $year);\r\n $numberofday6 = cal_days_in_month(CAL_GREGORIAN,$monthNext5 , $year);\r\n\r\n \r\n\t/* draw table */\r\n $calendar = '<table cellpadding=\"0\" cellspacing=\"2\" style=\"width:100%;\" class=\"calendar\"><thead>';\r\n $calendar.= '<tr>';\r\n $calendar.= '<th colspan=\"3\"> <center>'.$monthCurrentStr.'</center> </th>';\r\n $calendar.= '<th colspan=\"3\"> <center>'.$monthNext1Str.'</center> </th>';\r\n $calendar.= '<th colspan=\"3\"> <center>'.$monthNext2Str.'</center> </th>';\r\n $calendar.= '<th colspan=\"3\"> <center>'.$monthNext3Str.'</center> </th>';\r\n $calendar.= '<th colspan=\"3\"> <center>'.$monthNext4Str.'</center> </th>';\r\n $calendar.= '<th colspan=\"3\"> <center>'.$monthNext5Str.'</center> </th>';\r\n \r\n \r\n\r\n\t\r\n\t/* final row */\r\n $calendar.= '</tr></head>'; \r\n $calendar.= '<tbody><tr>';\r\n // for($i = 1 ,$j = 1 ,$k = 1 ; $i <= $numberofday1, $j = $numberofday2, $k <= $numberofday3 ; $i++, $j++, $k++)\r\n $i = 0 ;\r\n $j = 0;\r\n $k = 0;\r\n $i1 = 0 ;\r\n $j1 = 0;\r\n $k1 = 0;\r\n $u = 0;\r\n\r\n \r\n while( $i <= $numberofday1 || $j <= $numberofday2 || $k <= $numberofday3 || $i1 <= $numberofday4 || $j1 <= $numberofday5 || $k1 <= $numberofday6 )\r\n { $i++;\r\n $j++;\r\n $k++;\r\n $i1++;\r\n $j1++;\r\n $k1++;\r\n $myDay = 0;\r\n $u=0;\r\n if($i <= $numberofday1 ){\r\n\r\n //Verification des jours feries\r\n\r\n $todayCheckHoliday1 = mktime(0, 0, 0, $monthCurrent, $i, $year); \r\n $today1 = unixtojd(mktime(0, 0, 0, $monthCurrent, $i, $year));\r\n $today = cal_from_jd($today1, CAL_GREGORIAN);\r\n //$todayCheckHoliday = new DateTime($year.'-'.$monthCurrent.'-'.$i.' 00:00:00');\r\n // echo $holidays[1];\r\n // echo $todayCheckHoliday;\r\n \r\n \r\n //////////////////////////////////////////////////\r\n if(($today[\"abbrevdayname\"] == \"Sun\") || ($today[\"abbrevdayname\"] == \"Sat\")){ $color = \"gray\";}\r\n else {$color = \"\";}\r\n\r\n $calendar.= '<td class=\"small\" > '.$i.' </td>';\r\n $calendar.= '<td class=\"small\" > '.$today[\"abbrevdayname\"].' </td>'; \r\n $calendar.= '<td class=\"caseBloque\" id=\"'.$year.'-'.$monthCurrent.'-'.$i.'\" style=\"background-color:'.$color.'\" onclick=\"myEvent(this)\">';\r\n $calendar.= '<div class=\"row\"><div class=\"col-sm-2\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthCurrent.'-'.$i.':1\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-2\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthCurrent.'-'.$i.':2\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-2\"></div></div></td>';\r\n \r\n }\r\n\r\n else{\r\n\r\n $calendar.= '<td class=\"small\" style=\"background-color:'.$color.'\" ></td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> </td>';\r\n $calendar.= '<td style=\"\"> </td>';\r\n }\r\n\r\n if($j <= $numberofday2 ){\r\n\r\n $todayCheckHoliday1 = mktime(0, 0, 0, $monthNext1, $j, $year);\r\n $todayCheckHoliday = new DateTime($year.'-'.$monthNext1.'-'.$j.' 00:00:00');\r\n\r\n $today1 = unixtojd(mktime(0, 0, 0, $monthNext1,$j, $year));\r\n $today = cal_from_jd($today1, CAL_GREGORIAN);\r\n\r\n if(($today[\"abbrevdayname\"] == \"Sun\") || ($today[\"abbrevdayname\"] == \"Sat\")){ $color = \"gray\";}\r\n else {$color = \"\";}\r\n\r\n\r\n $calendar.= '<td class=\"small\" style=\"\" > '.$j.' </td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> '.$today[\"abbrevdayname\"].' </td>';\r\n $calendar.= '<td class=\"caseBloque\" id=\"'.$year.'-'.$monthNext1.'-'.$j.'\" style=\"background-color:'.$color.'\" onclick=\"myEvent(this)\">';\r\n $calendar.= '<div class=\"row\"><div class=\"col-sm-2\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext1.'-'.$j.':1\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-1\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext1.'-'.$j.':2\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-2\"></div></div></td>';\r\n \r\n }\r\n else{\r\n\r\n $calendar.= '<td class=\"small\" style=\"background-color:\" ></td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> </td>';\r\n $calendar.= '<td style=\"\"> </td>';\r\n }\r\n if($k <= $numberofday3 ){\r\n\r\n $today1 = unixtojd(mktime(0, 0, 0,$monthNext2, $k, $year));\r\n $today = cal_from_jd($today1, CAL_GREGORIAN);\r\n\r\n if(($today[\"abbrevdayname\"] == \"Sun\") || ($today[\"abbrevdayname\"] == \"Sat\")) { $color = \"gray\";}\r\n else {$color = \"\";}\r\n\r\n $calendar.= '<td class=\"small\" style=\"\" > '.$k.' </td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> '.$today[\"abbrevdayname\"].' </td>';\r\n $calendar.= '<td class=\"caseBloque\" id=\"'.$year.'-'.$monthNext2.'-'.$k.'\" style=\"background-color:'.$color.'\" onclick=\"myEvent(this)\">';\r\n $calendar.= '<div class=\"row\"><div class=\"col-sm-2\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext2.'-'.$k.':1\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-1\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext2.'-'.$k.':2\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-2\"></div></div></td>';\r\n \r\n }\r\n else{\r\n $calendar.= '<td class=\"small\" style=\"background-color:#d1d2d3\" ></td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> </td>';\r\n $calendar.= '<td style=\"\"></td>';\r\n }\r\n if($i1 <= $numberofday4 ){\r\n\r\n $today1 = unixtojd(mktime(0, 0, 0,$monthNext3, $i1, $year));\r\n $today = cal_from_jd($today1, CAL_GREGORIAN);\r\n\r\n if(($today[\"abbrevdayname\"] == \"Sun\") || ($today[\"abbrevdayname\"] == \"Sat\")){ $color = \"gray\";}\r\n else {$color = \"\";}\r\n\r\n $calendar.= '<td class=\"small\" style=\"\" > '.$i1.' </td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> '.$today[\"abbrevdayname\"].' </td>'; \r\n $calendar.= '<td class=\"caseBloque\" id=\"'.$year.'-'.$monthNext3.'-'.$i1.'\" style=\"background-color:'.$color.'\" onclick=\"myEvent(this)\">';\r\n $calendar.= '<div class=\"row\"><div class=\"col-sm-2\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext3.'-'.$i1.':1\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-1\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext3.'-'.$i1.':2\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-2\"></div></div></td>';\r\n \r\n }\r\n else{\r\n $calendar.= '<td class=\"small\" style=\"\" > </td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> </td>';\r\n $calendar.= '<td style=\"\"> </td>';\r\n }\r\n if($j1 <= $numberofday5 ){\r\n\r\n $today1 = unixtojd(mktime(0, 0, 0,$monthNext4, $j1, $year));\r\n $today = cal_from_jd($today1, CAL_GREGORIAN);\r\n\r\n if(($today[\"abbrevdayname\"] == \"Sun\") || ($today[\"abbrevdayname\"] == \"Sat\")){ $color = \"gray\";}\r\n else {$color = \"\";}\r\n\r\n $calendar.= '<td class=\"small\" style=\"\" > '.$j1.' </td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> '.$today[\"abbrevdayname\"].' </td>';\r\n $calendar.= '<td class=\"caseBloque\" id=\"'.$year.'-'.$monthNext4.'-'.$j1.'\" style=\"background-color:'.$color.'\" onclick=\"myEvent(this)\">';\r\n $calendar.= '<div class=\"row\"><div class=\"col-sm-2\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext4.'-'.$j1.':1\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-1\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext4.'-'.$j1.':2\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-2\"></div></div></td>';\r\n \r\n }\r\n else{\r\n\r\n $calendar.= '<td class=\"small\" style=\"\" > </td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> </td>';\r\n $calendar.= '<td style=\"\"> </td>';\r\n }\r\n if($k1 <= $numberofday6 ){\r\n\r\n $today1 = unixtojd(mktime(0, 0, 0,$monthNext5, $k1, $year));\r\n $today = cal_from_jd($today1, CAL_GREGORIAN);\r\n\r\n if(($today[\"abbrevdayname\"] == \"Sun\") || ($today[\"abbrevdayname\"] == \"Sat\")){ $color = \"gray\";}\r\n else {$color = \"\";}\r\n\r\n $calendar.= '<td class=\"small\" style=\"\" > '.$k1.' </td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> '.$today[\"abbrevdayname\"].' </td>';\r\n $calendar.= '<td class=\"caseBloque\" id=\"'.$year.'-'.$monthNext5.'-'.$k1.'\" style=\"background-color:'.$color.'\" onclick=\"myEvent(this)\">';\r\n $calendar.= '<div class=\"row\"><div class=\"col-sm-2\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext5.'-'.$k1.':1\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-1\"></div>';\r\n $calendar.= '<div id=\"'.$year.'-'.$monthNext5.'-'.$k1.':2\" class=\"col-sm-3\" onclick=\"getVacation(this)\"></div>';\r\n $calendar.= '<div class=\"col-sm-2\"></div></div></td>';\r\n \r\n }\r\n else{\r\n \r\n $calendar.= '<td class=\"small\" style=\"background-color:'.$color.'\" > </td>';\r\n $calendar.= '<td class=\"small\" style=\"\"> </td>';\r\n $calendar.= '<td style=\"\"> </td>';\r\n }\r\n\r\n \r\n\r\n \r\n $calendar.= '</tr>';\r\n }\r\n \r\n\r\n \r\n\t\r\n\t/* final row */\r\n $calendar.= '</tr>';\r\n \r\n\r\n\r\n\t/* end the table */\r\n\t$calendar.= '</tbody></table>';\r\n\t\r\n\t/* all done, return result */\r\n\treturn $calendar;\r\n}", "function draw_calendar($month,$year){\n\n\t\t/* draw table */\n\t\t$calendar = '<table cellpadding=\"0\" cellspacing=\"0\" class=\"calendar\">';\n\n\t\t/* table headings */\n\t\t$headings = array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');\n\t\t$calendar.= '<tr class=\"calendar-row\"><td class=\"calendar-day-head\">'.implode('</td><td class=\"calendar-day-head\">',$headings).'</td></tr>';\n\n\t\t/* days and weeks vars now ... */\n\t\t$running_day = date('w',mktime(0,0,0,$month,1,$year));\n\t\t$days_in_month = date('t',mktime(0,0,0,$month,1,$year));\n\t\t$days_in_this_week = 1;\n\t\t$day_counter = 0;\n\t\t$dates_array = array();\n\n\t\t/* row for week one */\n\t\t$calendar.= '<tr class=\"calendar-row\">';\n\n\t\t/* print \"blank\" days until the first of the current week */\n\t\tfor($x = 0; $x < $running_day; $x++):\n\t\t\t$calendar.= '<td class=\"calendar-day-np\"> </td>';\n\t\t\t$days_in_this_week++;\n\t\tendfor;\n\n\t\t/* keep going with days.... */\n\t\tfor($list_day = 1; $list_day <= $days_in_month; $list_day++):\n\t\t\t$calendar.= '<td class=\"calendar-day\"><a href=\"appointments.php?day=' . $list_day . '&month=' . $GLOBALS['curMonth'] . '&year=' . $GLOBALS['curYear'] . '\">';\n\t\t\t\t/* add in the day number */\n\t\t\t\t$calendar.= '<div class=\"day-number\">'.$list_day.'</div>';\n\n\t\t\t\t/** QUERY THE DATABASE FOR AN ENTRY FOR THIS DAY !! IF MATCHES FOUND, PRINT THEM !! **/\n\t\t\t\t$calendar.= str_repeat('<p> </p>',2);\n\t\t\t\t\n\t\t\t$calendar.= '</a></td>';\n\t\t\tif($running_day == 6):\n\t\t\t\t$calendar.= '</tr>';\n\t\t\t\tif(($day_counter+1) != $days_in_month):\n\t\t\t\t\t$calendar.= '<tr class=\"calendar-row\">';\n\t\t\t\tendif;\n\t\t\t\t$running_day = -1;\n\t\t\t\t$days_in_this_week = 0;\n\t\t\tendif;\n\t\t\t$days_in_this_week++; $running_day++; $day_counter++;\n\t\tendfor;\n\n\t\t/* finish the rest of the days in the week */\n\t\tif($days_in_this_week < 8):\n\t\t\tfor($x = 1; $x <= (8 - $days_in_this_week); $x++):\n\t\t\t\t$calendar.= '<td class=\"calendar-day-np\"> </td>';\n\t\t\tendfor;\n\t\tendif;\n\n\t\t/* final row */\n\t\t$calendar.= '</tr>';\n\n\t\t/* end the table */\n\t\t$calendar.= '</table>';\n\t\t\n\t\t/* all done, return result */\n\t\treturn $calendar;\n\t}", "function draw_calendar($month,$year, $userID, $type, $dbhandle){\n\n\t/* draw table */\n\t$calendar = '<table cellpadding=\"0\" cellspacing=\"0\" class=\"calendar\">';\n\n\t/* table headings */\n\t$headings = array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');\n\t$calendar.= '<tr class=\"calendar-row\"><td class=\"calendar-day-head\">'.implode('</td><td class=\"calendar-day-head\">',$headings).'</td></tr>';\n\n\t/* days and weeks vars now ... */\n\t$running_day = date('w',mktime(0,0,0,$month,1,$year));\n\t$days_in_month = date('t',mktime(0,0,0,$month,1,$year));\n\t$days_in_this_week = 1;\n\t$day_counter = 0;\n\t$dates_array = array();\n\n\t/* row for week one */\n\t$calendar.= '<tr class=\"calendar-row\">';\n\n\t/* print \"blank\" days until the first of the current week */\n\tfor($x = 0; $x < $running_day; $x++):\n\t\t$calendar.= '<td class=\"calendar-day-np\"> </td>';\n\t\t$days_in_this_week++;\n\tendfor;\n\n\t/* keep going with days.... */\n\tfor($list_day = 1; $list_day <= $days_in_month; $list_day++):\n\t\t$calendar.= '<td class=\"calendar-day\">';\n\t\t\n\t\t\t//Alert count for this day\n\t\t\t$dateString = '20'.$year.'-'.$month.'-';\n\t\t\tif( $list_day < 10 )\n\t\t\t\t$dateString .= \"0\".$list_day;\n\t\t\telse\n\t\t\t\t$dateString .= $list_day;\n\t\t\t\t\n\t\t\t\n\t\t\t$alertSql = \"select `Date`, Description from Alerts where SubjectID=$userID and Seen=0 and CAST(`Date` AS DATE)='\".$dateString.\"';\";\n\t\t\t$alertResult = $dbhandle->query($alertSql);\n\t\t\t$alertCount = $alertResult->num_rows;\n\t\t\tif( $alertCount > 0 )\n\t\t\t{\n\t\t\t\t$calendar.= '<div><b><a href=\"../Main/Alerts.php?user='.$userID.'&date='.$dateString.'\" style=\"color:red\">'.$alertCount.'</a></b></div>';\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t/* add in the day number */\n\t\t\t$calendar.= '<div class=\"day-number\">'.$list_day.' </div>';\n\t\t\t\n\t\t\t$dayStr = \"\";\n\t\t\tif($type == \"Session\")\n\t\t\t{\n\t\t\t\t$dayAfter = $list_day+1;\n\t\t\t\t$startTime = \"$year-$month-$list_day\";//date(\"Y-m-d\n\t\t\t\t$endtTime = \"\";\n\t\t\t\t//Deal with days/months carrying over\n\t\t\t\tif( $dayAfter > $days_in_month )\t//Check that the day after wont be more than there is in the month\n\t\t\t\t{\n\t\t\t\t\tif( $month == 12 )\n\t\t\t\t\t\t$endtTime = ($year+1) .\"-01-01\";\n\t\t\t\t\telse\n\t\t\t\t\t\t$endtTime = \"$year-\". ($month+1) .\"-01\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$endtTime = \"$year-$month-$dayAfter\";\n\t\t\t\t}\n\t\t\t\t//$calendar.= '<div>'.$endtTime.'</div>';\n\t\t\t\t\t\n\t\t\t\t$sql = \"SELECT SessionID, WingmanPlayed, CyclingPlayed, TargetsPlayed, DATE_FORMAT(StartTime,'%H:%i') as Start, DATE_FORMAT(EndTime,'%H:%i') as End FROM Session WHERE UserID = $userID AND (StartTime > '$startTime' AND EndTime < '$endtTime' AND EndTime <> 0 )\";\n\t\t\t\t$result = $dbhandle->query($sql);\n\t\t\t\tif ($result->num_rows > 0) {\n\t\t\t\t\t// output data of each row\n\t\t\t\t\twhile($row = $result->fetch_assoc()) {\n\t\t\t\t\t\t$sess = $row[\"SessionID\"];\n\t\t\t\t\t\t$start = $row[\"Start\"];\n\t\t\t\t\t\t$end = $row[\"End\"];\n\t\t\t\t\t\tif($dayStr != \"\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$dayStr .= \"<br />\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($row['WingmanPlayed'] > 0 && $row['TargetsPlayed'] > 0 )\n {\n $dayStr .= \"<a style='font-size:16px;padding-bottom:2px;color:red'href='Session.php?SessionID=$sess' 'data-toggle='tooltip' title='S#$sess: Wingman (Elbow Raise) & Targets (Arm Extension)'>$start-$end</a>\";\n }\n \n else if ($row['TargetsPlayed'] > 0)\n {\n $dayStr .= \"<a style='font-size:16px;padding-bottom:2px;color:green'href='Session.php?SessionID=$sess' 'data-toggle='tooltip' title='S#$sess: Targets (Arm Extension)'>$start-$end</a>\";\n }\n else if ($row['WingmanPlayed'] > 0)\n {\n $dayStr .= \"<a style='font-size:16px;padding-bottom:2px;color:blue'href='Session.php?SessionID=$sess' 'data-toggle='tooltip' title='S#$sess: Wingman (Elbow Raise)'>$start-$end</a>\";\n } \n\t\t\t\t\t\t\t\t\t\t\t\t\t else if ($row['CyclingPlayed'] > 0)\n {\n $dayStr .= \"<a style='font-size:16px;padding-bottom:2px;color:purple'href='Session.php?SessionID=$sess' 'data-toggle='tooltip' title='S#$sess: Cycling (Elbow Raise)'>$start-$end</a>\";\n } \n\t\t\t\t\t\telse\n {\n \n }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/** QUERY THE DATABASE FOR AN ENTRY FOR THIS DAY !! IF MATCHES FOUND, PRINT THEM !! **/\n\t\t\t$calendar.= \"<p>$dayStr</p>\";\n\t\t\t\n\t\t$calendar.= '</td>';\n\t\tif($running_day == 6):\n\t\t\t$calendar.= '</tr>';\n\t\t\tif(($day_counter+1) != $days_in_month):\n\t\t\t\t$calendar.= '<tr class=\"calendar-row\">';\n\t\t\tendif;\n\t\t\t$running_day = -1;\n\t\t\t$days_in_this_week = 0;\n\t\tendif;\n\t\t$days_in_this_week++; $running_day++; $day_counter++;\n\tendfor;\n\n\t/* finish the rest of the days in the week */\n\tif($days_in_this_week < 8):\n\t\tfor($x = 1; $x <= (8 - $days_in_this_week); $x++):\n\t\t\t$calendar.= '<td class=\"calendar-day-np\"> </td>';\n\t\tendfor;\n\tendif;\n\n\t/* final row */\n\t$calendar.= '</tr>';\n\n\t/* end the table */\n\t$calendar.= '</table>';\n\t\n\t/* all done, return result */\n\treturn $calendar;\n}", "public function getCalendar() {\n\t\t$this->setDate();\n\t\t$this->getLinks();\n\t\t $this->di->logger->stamp(__CLASS__, __METHOD__, '');\n\n\n\t\t// Get new date array\n\t\t$newDate = getdate(mktime(0,0,0,$this->newMonth, 1, $this->newYear));\n\t\t// Calculate rest days in previous and next month\n\t\t$firstDay = $newDate['wday'];\n\t\t$firstDay = ($firstDay == 0) ? 7: $firstDay;\n\t\t$daysInMonth = cal_days_in_month ( CAL_GREGORIAN , $this->newMonth , $this->newYear );\n\t\tif($this->newMonth != 1){\n\t\t\t$daysInPrevMonth = cal_days_in_month ( CAL_GREGORIAN , $this->newMonth-1 , $this->newYear );\n\t\t}\n\t\telse if($this->newMonth == 1) {\n\t\t\t$daysInPrevMonth = cal_days_in_month ( CAL_GREGORIAN , 12 , $this->newYear-1 );\n\t\t}\n\n\t\t$lastDates = $daysInPrevMonth - $firstDay +1;\n\n\t\t// Start building table\n\t\t$table =\"<section class='calendar'><header>\" . $this->prevLink . \"<h3>\" . $newDate['month'] . \" - \" . $newDate['year'] . \"</h3>\" . $this->nextLink;\n\t\t$table .= \"</header><table><thead>\\n\";\n\t\t$table .= \"<th>Mon</th><th>Tue</th><th>Wed</th><th>Thu</th><th>Fri</th><th>Sat</th><th>Sun</th>\\n\";\n\t\t$table .= \"</thead>\\n\";\n\t\t$table .= \"<tr>\";\n\t\t\n\t\tfor ($a=1; $a < $firstDay ; $a++) { \n\t\t\t$lastDates++;\n\t\t\t$table .= \"<td class='lighter'>\" . $lastDates . \"</td>\";\n\t\t}\n\n\t\t$d = 0;\n\t\tfor ($b=0; $b < $daysInMonth ; $b++) { \n\t\t\t\n\t\t\t$d++;\n\t\t\t$DATE = date('N',mktime(0,0,0, $this->newMonth, $d, $this->newYear));\n\t\t\t\n\t\t\tif ($DATE == 1) {\n\t\t\t\t$table .= \"</tr>\\n<tr>\";\n\t\t\t}\n\n\t\t\tif (($this->newMonth == $this->currentMonth && $d == $this->currentDate && $this->newYear == $this->currentYear)) {\n\t\t\t\t$table .= \"<td><strong>\" . $d . \"</strong></td>\";\n\t\t\t}\n\t\t\telse if ($DATE == 7) {\n\t\t\t\t$table .= \"<td class='red'>\" . $d . \"</td>\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$table .= \"<td>\" . $d . \"</td>\";\n\t\t\t}\n\t\t}\n\t\t\tif ($DATE != 7) {\n\t\t\t\t$nextMonthDays = 7 - $DATE;\n\t\t\t\tfor ($c=1; $c <= $nextMonthDays ; $c++) { \n\t\t\t\t\t$table .= \"<td class='lighter'>\" . $c . \"</td>\";\n\t\t\t}\n\t}\n\t\t$table .= \"</tr></table></section>\";\n\n\t\treturn $table;\n\t}", "function drawCalendar($month, $year) {\n $first = mktime(0,0,0,$month,1,$year); // timestamp for first of the month\n $offset = date('w', $first); // what day of the week we start counting on\n $daysInMonth = date('t', $first);\n $monthName = date('F', $first);\n $weekDays = array('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat');\n $eventDays = getEventDays($month, $year);\n \n // Start drawing calendar\n $out = \"<table id=\\\"myCalendar\\\">\\n\";\n $out .= \"<tr><th colspan=\\\"3\\\">$monthName $year</th></tr>\\n\";\n $out .= \"<tr>\";\n foreach ($weekDays as $wd) $out .= \"<td class=\\\"weekDays\\\">$wd</td>\\n\";\n\n\n // Previous month link\n $prevTS = strtotime(\"$year-$month-01 -1 month\"); // timestamp of the first of last month\n $pMax = date('t', $prevTS);\n $pDay = ($day > $pMax) ? $pMax : $day;\n list($y, $m) = explode('-', date('Y-m', $prevTS)); \n $pMax = date('t', $prevTS);\n $pDay = ($day > $pMax) ? $pMax : $day;\n list($y, $m) = explode('-', date('Y-m', $prevTS));\n echo \"<p>\";\n echo \"<a href=\\\"?year=$year&month=$m&day=$pDay\\\"><< Prev</a>\\n\";\n\n // Next month link\n $nextTS = strtotime(\"$year-$month-01 +1 month\");\n $nMax = date('t', $nextTS);\n $nDay = ($day > $nMax) ? $nMax : $day;\n list($y, $m) = explode('-', date('Y-m', $nextTS));\n echo \"<a href=\\\"?year=$y&month=$m&day=$nDay\\\">Next >></a>\\n\";\n echo \"</p>\";\n\n\n // Build Previous and Next Links from untitled-6\n //$previous_link = \"<a href=\\\"\".$_SERVER['PHP_SELF'].\"?date=\";\n //if($month == 1){\n // $previous_link .= mktime(0,0,0,12,$day,($year -1));\n //} else {\n // $previous_link .= mktime(0,0,0,($month -1),$day,$year);\n //}\n\n //$previous_link .= \"\\\"><< </a>\";\n\n //$next_link = \"<a href=\\\"\".$_SERVER['PHP_SELF'].\"?date=\";\n //if($month == 12){\n // $next_link .= mktime(0,0,0,1,$day,($year + 1));\n //} else {\n // $next_link .= mktime(0,0,0,($month +1),$day,$year);\n //}\n //$next_link .= \"\\\"> >></a>\";\n\n $i = 0;\n for ($d = (1 - $offset); $d <= $daysInMonth; $d++) {\n if ($i % 7 == 0) $out .= \"<tr>\\n\"; // Start new row\n if ($d < 1) $out .= \"<td class=\\\"nonMonthDay\\\"> </td>\\n\";\n else {\n if (in_array($d, $eventDays)) {\n $out .= \"<td class=\\\"monthDay\\\">\\n\";\n $out .= \"<a href=\\\"?year=$year&month=$month&day=$d\\\">$d</a>\\n\";\n $out .= \"</td>\\n\";\n } else $out .= \"<td class=\\\"monthDay\\\">$d</td>\\n\";\n }\n ++$i; // Increment position counter\n if ($i % 7 == 0) $out .= \"</tr>\\n\"; // End row on the 7th day\n }\n \n // Round out last row if we don't have a full week\n if ($i % 7 != 0) {\n for ($j = 0; $j < (7 - ($i % 7)); $j++) {\n $out .= \"<td class=\\\"nonMonthDay\\\"> </td>\\n\";\n }\n $out .= \"</tr>\\n\";\n }\n \n $out .= \"</table>\\n\";\n \n return $out;\n }", "function draw_calendar_activ($month,$year){\n\n\t/* draw table */\n\t$calendar = '<table cellpadding=\"0\" cellspacing=\"0\" class=\"calendar\">';\n\n\t/* table headings */\n\t$headings = array('Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi');\n\t$calendar.= '<tr class=\"calendar-row-day\"><td class=\"calendar-day-head\">'.implode('</td><td class=\"calendar-day-head\">',$headings).'</td></tr>';\n\n\t/* days and weeks vars now ... */\n\t$running_day = date('w',mktime(0,0,0,$month,1,$year));\n\t$days_in_month = date('t',mktime(0,0,0,$month,1,$year));\n\t$days_in_this_week = 1;\n\t$day_counter = 0;\n\t$dates_array = array();\n\n\t/* row for week one */\n\t$calendar.= '<tr class=\"calendar-row\">';\n\n\t/* print \"blank\" days until the first of the current week */\n\tfor($x = 0; $x < $running_day; $x++):\n\t\t$calendar.= '<td class=\"calendar-day-np\"> </td>';\n\t\t$days_in_this_week++;\n\tendfor;\n\n\t/* keep going with days.... */\n\tfor($list_day = 1; $list_day <= $days_in_month; $list_day++){\n\t\t$calendar.= '<td class=\"calendar-day\">';\n\t\t\t/* add in the day number */\n $ddate = $year.\"-\".$month.\"-\".sprintf(\"%02d\", $list_day);\n $newdatabal = sprintf(\"%02d\", $list_day);\n $qq = mysql_query(\"SELECT * FROM reserver WHERE date_deb LIKE('$ddate%')\")or die(mysql_error());\n\n if(mysql_num_rows($qq) >0){\n $newblabla = $ddate.\"<br>\n <a href='afres.php?y=\".$year.\"&m=\".$month.\"&d=\".$newdatabal.\"' target='_blank' style='color: #302C87; text-decoration: none'> Il y'a : \".mysql_num_rows($qq).' reservation(s)</a>';\n }else{\n $newblabla = $ddate.\"<br>no reservations\";\n }\n\t\t\t$calendar.= '<div class=\"day-number\">\n\n '.$newblabla;\n\n\t\t\t/** QUERY THE DATABASE FOR AN ENTRY FOR THIS DAY !! IF MATCHES FOUND, PRINT THEM !! **/\n\t\t\t$calendar.= str_repeat('<p> </p>',2);\n\n\t\t$calendar.= '</td>';\n\t\tif($running_day == 6):\n\t\t\t$calendar.= '</tr>';\n\t\t\tif(($day_counter+1) != $days_in_month):\n\t\t\t\t$calendar.= '<tr class=\"calendar-row\">';\n\t\t\tendif;\n\t\t\t$running_day = -1;\n\t\t\t$days_in_this_week = 0;\n\t\tendif;\n\t\t$days_in_this_week++; $running_day++; $day_counter++;\n\n\n\t}\n\n\t/* finish the rest of the days in the week */\n\tif($days_in_this_week < 8):\n\t\tfor($x = 1; $x <= (8 - $days_in_this_week); $x++):\n\t\t\t$calendar.= '<td class=\"calendar-day-np\"> </td>';\n\t\tendfor;\n\tendif;\n\n\t/* final row */\n\t$calendar.= '</tr>';\n\n\t/* end the table */\n\t$calendar.= '</table>';\n\n\t/* all done, return result */\n\treturn $calendar;\n\n\n}", "function draw_calendar($year)\n {\n $calendar.= '<!DOCTYPE html>\n <html>\n <head>\n <meta charset=\"UTF-8\">\n <title>Calendar</title>\n <link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css\">\n <style>\n #today {\n background-color: lightgreen;\n }\n .day-number {\n text-align: center;\n }\n .calendar-week {\n width: 14%;\n text-align: center;\n }\n .container {\n text-align: center;\n }\n .col-centered{\n float: none;\n margin: 0 auto;\n }\n </style>\n </head>\n <body>';\n date_default_timezone_set(\"America/New_York\");\n $months = array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');\n for ($month = 1; $month <= 12; $month++)\n {\n //create header\n $header = '<h2>'.$months[$month-1].' '.$year.'</h2>';\n $calendar.= '<div class=\"row\"><div class=\"container col-xs-6 col-centered\"> <table class=\"table table-bordered\">';\n \n \t// write calendar table headings \n \t$headings = array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');\n \t$calendar.= $header.'<tr><td class=\"calendar-week\">'.implode('</td><td class=\"calendar-week\">',$headings).'</td></tr>';\n \n \t$starting_day = date('w', mktime(0, 0, 0, $month, 1, $year)); //the starting day of the week\n \t$days_in_month = date('t', mktime(0, 0, 0, $month, 1, $year));\n \t$days_this_week = 1;\n \t$day_counter = 0;\n \t$end_of_month = 0;\n \n \t// row for week one \n \t$calendar.= '<tr>';\n \t\n \t// display blank days until starting day of the current week\n \tfor($day = 0; $day < $starting_day; $day++):\n \t\t$calendar.= '<td> </td>';\n \t\t$days_this_week++; //add blank day to days\n \tendfor;\n \n \t// write days\n \tfor ($day = 1; $day <= $days_in_month; $day++):\n \t\tif ($day != date('d') && $month != date('n'))\n \t\t{\n \t\t\t$current_day = ''; //add blank td per day (that isnt today)\n \t\t}\n \t\t$calendar.= '<td class=\"calendar-day'.$current_day.'\">';\n \t\t\n \t\t\t// Add in the day number\n if ($day == date('d') && $month == date('n') && $year == date('Y')) //this day = today\n \t\t\t{\n \t\t\t\t$showtoday = '<div id=\"today\"> <strong>'.$day.'</strong></div>'; //add today (special styling)\n \t\t\t}else {\n \t\t\t $showtoday = $day;\n \t\t\t}\n \t\t\t$calendar.= '<div class=\"day-number\">'.$showtoday.'</div>'; //commit the date number to the td\n \n \t\t// end of first week\n \t\t$calendar.= '</td>';\n \t\tif($starting_day == 6):\n \t\t\t$calendar.= '</tr>'; // if end of week, end row\n \t\t\tif (($day_counter+1) != $days_in_month) //if today is not end of month, start new row\n \t\t\t{\n \t\t\t\t$calendar.= '<tr>';\n \t\t\t} else \n \t\t\t{\n \t\t\t $end_of_month = 1; // is end of month, so no need for new row\n \t\t\t}\n \t\t\t$starting_day = -1; // if end of week, mark as sunday-1 so when incrementing below, it goes to 0 (sunday)\n \t\t\t$days_this_week = 0; //reset days this week\n \t\tendif;\n \t\t$days_this_week++;\n \t\t$starting_day++;\n \t\t$day_counter++;\n \tendfor;\n \n \t// Finish the rest of blank days in the week\n \tif(($days_this_week < 8) && ($end_of_month == 0)): //last row of calendar, if end of month already has happened (ie on the last day of the previous week), do not add new cells\n \t\tfor($x = 1; $x <= (8 - $days_this_week); $x++):\n \t\t\t$calendar.= '<td> </td>';\n \t\tendfor;\n \tendif;\n \n \t// final row\n \t$calendar.= '</tr>';\n \n \t// end table tags\n \t$calendar.= '</table> </div> </div>';\n }\n // end tags and return\n $calendar.= '</body>\n </html>';\n return $calendar;\n }", "public function buildCalendarList(){\n\t\t\n\t\t$first_day = $this->getFirstDay();\t\t\t\t\t\t//Determine what day of the week the month starts on\n\t\t$current_number_of_days = $this->getNumberOfDays();\t\t//Determine the number of days in the month\n\n\t\t$number_of_previous_days = $first_day;\t\t\t\t\t\t\t\t\t\t//Determine the number of days needed to complete the first week\n\t\t$prev_month_number_of_days = $this->getNumberOfDays($this->getMonth()-1); \t//Determine the number of days in the previous month\n\t\t\n\t\t$_SESSION['month'] = $this->getMonth();\n\t\t$_SESSION['year'] = $this->getYear();\n\t\t$_SESSION['view'] = 'list';\n\t\t\n\t\tob_start();?>\n <table border=\"0\" id=\"events_calendar\" class=\"calendar_list\">\n <?php echo $this->buildCalendarHead() ?>\n <tr>\n <td>\n <?php \n /*** CURRENT MONTH CELLS ***/\n $first_day = $this->getYear() . '-' . $this->getMonth() . '-01';\n $last_day = $this->getYear() . '-' . $this->getMonth() . '-' . $current_number_of_days;\n \n $object = $this->events_ob;\n $month_events = new $object();\n $month_events = $month_events->fetchAll(\"WHERE DATE(\" . $this->events_end_date_field . \") >= '\" . $first_day . \"' AND DATE(\" . $this->events_end_date_field . \") <= '\" . $last_day . \"'\", \"ORDER BY `\" . $this->events_end_date_field . \"` DESC\");\n \n if(count($month_events) > 0){\n for($day = 1; $day <= $current_number_of_days; $day++){\t\t//For each day in the current month\n $full_date = $this->getYear() . '-' . $this->getMonth() . '-' . $day;\n \n $events = $this->buildDayList($full_date);\t//get events for each day\n if(strlen(trim($events))){\n ?>\n <div class=\"day\">\n <?php echo $events; ?>\n </div>\n <?php\n }\n }\n }\n else{?>\n \t\t<h5><?php echo 'No events in ' . $this->getMonthName() . ' ' . $this->getYear();?></h5>\n <?php\n }\n ?> \n </td>\n </tr>\n </table>\n <?php\n return ob_get_clean();\n\t}", "public function render() {\n Openbizx::$app->getClientProxy()->includeCalendarScripts();\n\n $format = $this->dateFormat ? $this->dateFormat : \"%Y-%m-%d\";\n\n $sHTML = parent::render();\n\n $showTime = 'false';\n //$image = \"<img src=\\\"\".Openbizx::$app->getImageUrl().\"/calendar.gif\\\" border=0 title=\\\"Select date...\\\" align='top' hspace='2'>\";\n $sHTML .= \"<a class=\\\"date_picker\\\" href=\\\"javascript: void(0);\\\" onclick=\\\"return showCalendar('$this->objectName','$format',$showTime,true);\\\"></a>\";\n return $sHTML;\n }", "function draw_calendar($month,$year, $day=1){\n /* draw table */\n $draw_calendar_time_start = microtime(true);\n $get_xml_start_time = microtime(true);\n \n $calendar = '';\n $xml = autoCache(\"get_event_xml\", array());\n\n $after_xml_time_start = microtime(true);\n $classes = array(\n 1 => 'sun',\n 2 => 'mon',\n 3 => 'tue',\n 4 => 'wed',\n 5 => 'thu',\n 6 => 'fri',\n 7 => 'sat',\n );\n /* days and weeks vars now ... */\n $running_day = date('w',mktime(0,0,0,$month,1,$year));\n $days_in_month = date('t',mktime(0,0,0,$month,1,$year));\n $days_in_this_week = 1;\n $day_counter = 0;\n /* row for week one */\n $calendar.= '<ul class=\"calendar-row\">';\n /* print previous month days until the first of the current month */\n for($x = 0; $x < $running_day; $x++) {\n //Go in the past $x many days in the past\n $back = ($running_day - $x);\n $back = '-' . ($back) . ' days';\n $last_month_date = date('j', strtotime($back, strtotime($year . '-' . $month . '-01')));\n $calendar .= '<li class=\"' . $classes[$days_in_this_week] . ' event not-current\"><span>' . $last_month_date . '</span></li>';\n $days_in_this_week++;\n }\n\n $twig = makeTwigEnviron('/code/events/twig');\n $twig->getExtension('Twig_Extension_Core')->setTimezone('America/Chicago');\n $calendar .= $twig->render('calendar_rest.html',array(\n 'running_day' => $running_day,\n 'days_in_month' => $days_in_month,\n 'days_in_this_week' => $days_in_this_week,\n 'day_counter' => $day_counter,\n 'classes' => $classes,\n 'xml' => $xml,\n 'year' => $year,\n 'month' => $month));\n\n /* all done, return result */\n $draw_calendar_time_end = microtime(true);\n\n $draw_calendar_time = $draw_calendar_time_end - $draw_calendar_time_start;\n $after_xml_time = $draw_calendar_time_end - $after_xml_time_start;\n error_log(\"After XML draw_calendar in $after_xml_time seconds\\n\", 3, '/tmp/calendar.log');\n error_log(\"Full draw_calendar in $draw_calendar_time seconds\\n\", 3, '/tmp/calendar.log');\n return $calendar;\n}", "private function makeHTMLIterator()\n\t{\n\t\t$this->weekDayNum = $this->firstDayOfTheMonth+1;\n\t\tfor($this->dayOfMonth; $this->dayOfMonth <= $this->daysInMonth; $this->dayOfMonth++) {\n\t\t\t// Set the default style\n\t\t\t$style = 'class=\"normalDay\"';\n\t\t\t\n\t\t\t// Set the style to a weekend day style\n\t\t\tif(($this->weekDayNum == 8)||($this->weekDayNum == 7)) {\n\t\t\t\t$style = 'class=\"weekendDay\"';\n\t\t\t}\n\t\t\t\n\t\t\t// Set the style to a current day style\n\t\t\tif($this->curDay == $this->dayOfMonth) {\n\t\t\t\t$style = 'class=\"currentDay\"';\n\t\t\t}\n\t\t\t\n\t\t\t// If the current day is Sunday, add a new row\n\t\t\tif($this->weekDayNum == 8) {\n\t\t\t\t$this->calWeekDays .= \"\\t</tr>\\n\\t<tr>\\n\";\n\t\t\t\t$this->weekDayNum = 1;\n\t\t\t}\n\n\t\t\t// Draw days\n\t\t\t$this->calWeekDays .= \"\\t\\t<td valign=\\\"top\\\" \".$style.'>'.$this->dayOfMonth;\n\t\t\t\n\t\t\tif($this->addWeekDay) {\n\t\t\t\t$this->calWeekDays .= \"|\".$this->weekDayNum;\n\t\t\t}\n\t\t\t\n\t\t\tif(strlen($this->addEvtDest) > 0) {\n\t\t\t\t$addevtimg = (strlen($this->addEvtImg) > 0 ? '<img src=\"'.$this->addEvtImg.'\" class=\"addevtimg\" />' : '+');\n\t\t\t\t$this->calWeekDays .= '[<a href=\"'.$this->addEvtDest.'?date='.$this->curYear.'-'.$this->curMonth.'-'.$this->dayOfMonth.'\" title=\"Add Event\" class=\"addevt\">'.$addevtimg.'</a>]';\n\t\t\t}\n\t\t\t\n\t\t\t$this->calWeekDays .= \" \".$this->makeDayEventListHTML().\"</td>\\n\";\n\t\t\t\n\t\t\t$this->weekDayNum++;\n\t\t}\n\t}", "public function buildCalendarHead(){\n\t\tob_start();?>\n \t<tr id=\"view_as\">\n <td colspan=\"7\">\n <?php \n\t\t\t\tif($_SESSION['view'] == 'list'){\n\t\t\t\t\techo '<a class=\"view_as_calendar\"><i class=\"fa fa-calendar\"></i>View as Calendar</a>';\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\techo '<a class=\"view_as_list\"><i class=\"fa fa-list\"></i>View as List</a>';\t\n\t\t\t\t}\n ?>\n </td>\n </tr>\n <tr id=\"calendar_title\">\n <th colspan=\"7\">\n <table width=\"100%\">\n <tr>\n <th class=\"left\">\n <a class=\"prev_month_link large_button btn btn-primary\"><i class=\"fa fa-chevron-left\"></i><?php echo $this->getPrevMonthName(); ?></a>\n <a class=\"prev_month_link small_button btn btn-primary\"><i class=\"fa fa-chevron-left\"></i><br /><?php echo $this->getPrevMonthName(); ?></a>\n </th>\n <th><h2><?php echo $this->getMonthName() . ' ' . $this->getYear();?></h2></th>\n <th class=\"right\">\n <a class=\"next_month_link large_button btn btn-primary\"><?php echo $this->getNextMonthName(); ?><i class=\"fa fa-chevron-right\"></i></a>\n <a class=\"next_month_link small_button btn btn-primary\"><i class=\"fa fa-chevron-right\"></i><br/><?php echo $this->getNextMonthName(); ?></a>\n </th>\n </tr>\n </table>\n </th>\n </tr>\n <tr id=\"calendar_legend\">\n <td colspan=\"7\">\n \t<?php \n\t\t\t\t\t\t$categories = $this->getCategories();\t\t\t\t\t\t\n\t\t\t\t\t\tforeach($categories as $c){ ?>\n\t\t\t\t\t\t\t<span class=\"category-indicator\">\n\t\t\t\t\t\t\t\t<i class=\"fa fa-circle\" style=\"color: <?php echo $c->getColor(); ?>;\"></i>\n\t\t\t\t\t\t\t\t<span class=\"category-name\"><?php echo $c->getName(); ?></span>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t}\n\t\t\t\t\t?>\n </td>\n </tr>\n <?php\n\t\treturn ob_get_clean();\n\t}", "function MakeCalendarGrid(){\n //get our days\n $intMonthDays = cal_days_in_month(CAL_GREGORIAN, $this->intMonth, $this->intYear);\n $intDayCounter = 0;\n $arrMonthAttributes = array('colspan'=>'7');\n //make our parent calendar table\n $objCalendarParent = $this->objCalendar->AddChildNode($this->objCalendar->objHTML,'', 'table');\n //let's make our header\n $objHeaderRow = $this->objCalendar->AddChildNode($objCalendarParent,'', 'tr');\n //establish our base attributes\n for($intWeekDay=0;$intWeekDay<7;$intWeekDay++){\n $strDay = date('l', strtotime(\"Sunday +{$intWeekDay} days\"));\n $this->objCalendar->AddChildNode($objHeaderRow,$strDay, 'th',array('class'=>'weekday'));\n }\n //get the starting date\n $intMonthStart = date('N', strtotime($this->intYear.'-'.$this->intMonth.'-1'));\n $intMonthStart++;\n //avoid empty rows\n if($intMonthStart == 8)\n $intMonthStart = 1;\n //make our days now\n for($intDay=1;$intDay<($intMonthDays + $intMonthStart);$intDay++){\n $arrDateAttributes = array('onclick'=>'SelectDay(this);');\n if($intDayCounter === 0){\n //make our new week\n $objWeekRow = $this->objCalendar->AddChildNode($objCalendarParent,'', 'tr');\n $arrDateAttributes['class'] = 'calendarday weekend';\n }\n else if($intDayCounter === 6)\n $arrDateAttributes['class'] = 'calendarday weekend';\n else if($intDay == date('j'))\n $arrDateAttributes['class'] = 'calendarday today';\n else\n $arrDateAttributes['class'] = 'calendarday weekday';\n $intDayCounter++;\n //reset our week now\n if($intDayCounter == 7)\n $intDayCounter = 0;\n if($intDay < $intMonthStart){\n unset($arrDateAttributes['onclick']);\n $this->objCalendar->AddChildNode($objWeekRow,'&nbsp;', 'td',$arrDateAttributes);\n continue 1;\n }\n $arrDateAttributes['id'] = ($intDay - ($intMonthStart - 1)).'-'.$this->arrCalendarProperties['calendarid'];\n //make our day now\n $this->objCalendar->AddChildNode($objWeekRow,($intDay - ($intMonthStart - 1)), 'td',$arrDateAttributes);\n }\n return TRUE;\n }", "public function drawSpecificItem($item){\r\n \tif (! $this->id) {\r\n \t\t//return;\r\n \t}\r\n $today=date('Y-m-d');\r\n \tglobal $bankHolidays,$bankWorkdays;\r\n //$result=\"<br/>\";\r\n $result=\"\";\r\n if ($item=='calendarView') { \t\r\n if ($this->year) {\r\n $y=$this->year;\r\n } else {\r\n \t$y=date('Y');\r\n }\r\n //echo $y.'#'.$this->idCalendarDefinition;\r\n //if (! isset($bankWorkdays[$y.'#'.$this->idCalendarDefinition])) {return;\t}\r\n if (! $this->idCalendarDefinition) { return;}\r\n $result .='<table >';\r\n $result .='<tr><td class=\"calendarHeader\" colspan=\"32\">' .$y . '</td></tr>';\r\n for ($m=1; $m<=12; $m++) {\r\n \t$mx=($m<10)?'0'.$m:''.$m;\r\n \t$time=mktime(0, 0, 0, $m, 1, $y);\r\n $libMonth=i18n(strftime(\"%B\", $time));\r\n \t$result .= '<tr style=\"height:30px\">';\r\n \t$result .= '<td class=\"calendar\" style=\"background:#F0F0F0; width: 150px;\">' . $libMonth . '</td>';\r\n \tfor ($d=1;$d<=date('t',strtotime($y.'-'.$mx.'-01'));$d++) {\r\n \t\t$dx=($d<10)?'0'.$d:''.$d;\r\n \t\t$day=$y.'-'.$mx.'-'.$dx;\r\n \t\t$iDay=strtotime($day);\r\n \t\t$isOff=isOffDay($day,$this->idCalendarDefinition);\r\n \t\t$style='';\r\n \t\tif ($day==$today) {\r\n \t\t\t$style.='font-weight: bold; font-size: 9pt;';\r\n \t\t}\r\n \t\tif (in_array (date ('Ymd', $iDay), $bankWorkdays[$y.'#'.$this->idCalendarDefinition])) {\r\n \t\t\t$style.='color: #FF0000; background: #FFF0F0;';\r\n \t\t} else if (in_array (date ('Ymd', $iDay), $bankHolidays[$y.'#'.$this->idCalendarDefinition])) {\r\n $style.='color: #0000FF; background: #D0D0FF;';\r\n } else {\r\n $style.='background: ';\r\n \t$style.=($isOff)?'#DDDDDD;':'#FFFFFF;';\r\n }\r\n \t\t$result.= '<td class=\"calendar\" style=\"'.$style.'\">';\r\n \t\t$result.= '<div style=\"cursor: pointer;\" onClick=\"loadContent(\\'../tool/saveCalendar.php?idCalendarDefinition='.$this->idCalendarDefinition.'&day='. $day . '\\',\\'CalendarDefinition_Calendar\\');\">';\r\n \t\t$result.= substr(i18n(date('l',$iDay)),0,1) . $d ;\r\n \t\t$result.= '</div>';\r\n \t\t$result.= '</td>';\r\n \t}\r\n \t$result .= '</tr>';\r\n }\r\n $result .='</table>';\r\n return $result;\r\n }\r\n }", "function draw_calendar($conn, $month,$year,$alat){\n\n /* draw table */\n $calendar = '<table cellpadding=\"0\" cellspacing=\"0\" class=\"calendar\">';\n\n /* table headings */\n $headings = array('Sun','Mon','Tue','Wed','Thu','Fri','Sat');\n $calendar.= '<tr class=\"calendar-row\"><td class=\"calendar-day-head\">'.implode('</td><td class=\"calendar-day-head\">',$headings).'</td></tr>';\n\n /* days and weeks vars now ... */\n $running_day = date('w',mktime(0,0,0,$month,1,$year));\n $days_in_month = date('t',mktime(0,0,0,$month,1,$year));\n $days_in_this_week = 1;\n $day_counter = 0;\n\n $booked[] = $days_in_month;\n for($i = 0; $i<=$days_in_month; $i++){\n $booked[$i] = '';\n }\n\n $now = $month + $year *12;\n\n //PENGECEKKAN STATUS UNTUK KEPENTINGAN KALENDER\n //booking\n $result = mysqli_query($conn,\"SELECT * FROM booking NATURAL JOIN alat where nama_alat = '$alat' and ((year(tanggal_rencana_peminjaman)*12 + month(tanggal_rencana_peminjaman)) <= '$now') and ((year(tanggal_rencana_pengembalian)*12 + month(tanggal_rencana_pengembalian)) >= '$now')\");\n if(mysqli_num_rows($result)>0){\n markdate($booked,$result,$days_in_month,$month,2);\n }\n mysqli_free_result($result);\n\n //peminjaman\n $result = mysqli_query($conn,\"SELECT * FROM peminjaman NATURAL JOIN alat where nama_alat = '$alat' and tanggal_pengembalian IS NULL and ((year(tanggal_peminjaman)*12 + month(tanggal_peminjaman)) <= '$now') and ((year(tanggal_rencana_pengembalian)*12 + month(tanggal_rencana_pengembalian)) >= '$now')\");\n if(mysqli_num_rows($result)>0){\n markdate($booked,$result,$days_in_month,$month,1);\n }\n mysqli_free_result($result);\n\n //perbaikan\n $result = mysqli_query($conn,\"SELECT * FROM perbaikan NATURAL JOIN alat where nama_alat = '$alat' and tanggal_selesai_perbaikan IS NULL and ((year(tanggal_mulai_perbaikan)*12 + month(tanggal_mulai_perbaikan)) <= '$now') and ((year(estimasi_selesai_perbaikan)*12 + month(estimasi_selesai_perbaikan)) >= '$now')\");\n if(mysqli_num_rows($result)>0){\n markdate($booked,$result,$days_in_month,$month,3);\n }\n mysqli_free_result($result);\n\n //END OF PENGECEKKAN STATUS\n\n /* row for week one */\n $calendar.= '<tr class=\"calendar-row\">';\n\n /* print \"blank\" days until the first of the current week */\n for($x = 0; $x < $running_day; $x++):\n $calendar.= '<td class=\"calendar-day-np\"> </td>';\n $days_in_this_week++;\n endfor;\n\n /* keep going with days.... */\n for($list_day = 1; $list_day <= $days_in_month; $list_day++):\n\n $calendar.= '<td class=\"calendar-day\">';\n\n /* add in the day number */\n $calendar.= '<div class=\"day-number\">'.$list_day.'</div>';\n\n /** QUERY THE DATABASE FOR AN ENTRY FOR THIS DAY !! IF MATCHES FOUND, PRINT THEM !! **/\n $calendar.= $booked[$list_day-1];\n\n $calendar.= '</td>';\n if($running_day == 6):\n $calendar.= '</tr>';\n if(($day_counter+1) != $days_in_month):\n $calendar.= '<tr class=\"calendar-row\">';\n endif;\n $running_day = -1;\n $days_in_this_week = 0;\n endif;\n $days_in_this_week++; $running_day++; $day_counter++;\n\n endfor;\n\n /* finish the rest of the days in the week */\n if($days_in_this_week < 8):\n for($x = 1; $x <= (8 - $days_in_this_week); $x++):\n $calendar.= '<td class=\"calendar-day-np\"> </td>';\n endfor;\n endif;\n\n /* final row */\n $calendar.= '</tr>';\n\n /* end the table */\n $calendar.= '</table>';\n\n\n /* all done, return result */\n return $calendar;\n}", "public function generaHtml(){\n\t\t$diaSetmana = DateTime::createFromFormat('d/m/Y', $this->date)->format('l');\n\t\t$this->table = \"<table id='sessions'><thead><tr><th>\" . $diaSetmana . \" \" . $this->date . \"</th></tr></thead>\";\n\t\t\n\t\tforeach($this->sessionsArray as $session):\n\t\t\t$dataHoraInici = $session->getDataHoraInici();\n\t\t\t\n\t\t\t$session_date = date('d/m/Y', strtotime($dataHoraInici));\n\t\t\t\n\t\t\tif($session_date == $this->date) {\n\t\t\t\t$this->haveClassesToday = true;\n\t\t\t\t$hora = explode(\" \", $dataHoraInici);\n\t\t\t\t$this->table .= \"<tr><td>\".$hora[1].\"</td><td>\".$session->getAssignatura()->getNom().\"<br />\".$session->getTipus().\"<br />\".$session->getAula().\"</td></tr>\";\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$this->logger->debug('Wrong day for session');\n\t\t\t\t$this->logger->debug('session_date is: ' . $session_date . ' specified date is: ' . $this->date);\n\t\t\t}\n\t\tendforeach;\n\t\t\n\t\t$this->table .= \"</table>\";\n\t\t$this->logger->debug(\"Html generated is: \" . $this->table);\n\t}", "public function render()\n {\n $result = array();\n\n if ($this->hasSources())\n {\n $visibleSources = 0;\n\n $result[] = '<div class=\"panel panel-default table-calendar-legend\">';\n $result[] = '<div class=\"panel-heading\">';\n $result[] = '<h4 class=\"panel-title\">' . Translation::get('Legend') . '</h4>';\n $result[] = '</div>';\n $result[] = '<ul class=\"list-group\">';\n\n $sources = $this->getSources();\n\n sort($sources);\n\n foreach ($sources as $source)\n {\n $sourceClasses = $this->getSourceClasses($source);\n\n if ($this->getDataProvider()->supportsVisibility())\n {\n $isSourceVisible = $this->getDataProvider()->isSourceVisible($source);\n $eventClasses = ! $isSourceVisible ? ' event-container-source-faded' : '';\n }\n else\n {\n\n $eventClasses = '';\n }\n\n $result[] = '<li class=\"list-group-item\">';\n $result[] = '<div class=\"event-source' . $eventClasses . '\" data-source-key=\"' .\n $this->addSource($source) . '\" data-source=\"' . $source . '\">';\n $result[] = '<span class=\"event-container ' . $sourceClasses . '\"></span>';\n $result[] = $source;\n $result[] = '</div>';\n $result[] = '</li>';\n\n if ($this->getDataProvider()->supportsVisibility())\n {\n if ($isSourceVisible)\n {\n $visibleSources ++;\n }\n }\n }\n\n $result[] = '</ul>';\n $result[] = '</div>';\n\n if ($this->getDataProvider()->supportsVisibility())\n {\n $result[] = '<script type=\"text/javascript\">';\n $result[] = 'var calendarVisibilityContext = ' .\n json_encode($this->getDataProvider()->getVisibilityContext()) . ';';\n $result[] = '</script>';\n\n $result[] = ResourceManager::getInstance()->get_resource_html(\n Path::getInstance()->getJavascriptPath(__NAMESPACE__, true) . 'Highlight.js');\n\n if ($visibleSources == 0)\n {\n $notificationMessageManager = new NotificationMessageManager();\n $notificationMessageManager->addMessage(\n new NotificationMessage(\n Translation::get('AllEventSourcesHidden'),\n NotificationMessage::TYPE_WARNING));\n }\n }\n }\n\n return implode(PHP_EOL, $result);\n }", "public function render()\n {\n $this->prepareVars();\n return $this->makePartial('calendar');\n }", "public function __toString()\n {\n // Can this set of dates be rendered?\n if (!$this->bOneFullMonth) {\n throw new \\Exception(\n __METHOD__ . ' - Only one full month can be rendered (end date must be \"true\").'\n );\n }\n\n $i = 0;\n $strHtml = '<h3 class=\"sked-cal-title\">' . date('F', strtotime($this->strStart))\n . '</h3><table class=\"sked-cal\"><thead>';\n\n // Day headers\n foreach (SkeVent::WEEKDAYS as $strDay)\n $strHtml .= '<th><center>' . $strDay . '</center></th>';\n\n $strHtml .= '</thead><tr>';\n for ($j = 0; $j < $this->monthPadDates(); $j++) {\n $i++;\n $strHtml .= '<td></td>';\n }\n\n foreach ($this as $skeDate) {\n $i++;\n $strHtml .= '<td class=\"sked-cal-date' . (date('Y-m-d') !== $skeDate->format('Y-m-d') ? '' : ' sked-cal-date-current') . '\">';\n $strHtml .= '<span class=\"sked-cal-date-num\">' . $skeDate->format('j') . '</span>';\n $strHtml .= '<ul class=\"sked-cal-date-list\">';\n foreach ($skeDate->events() as $skeVent) {\n $strHtml .= '<li class=\"sked-cal-date-event\">'\n . '<a href=\"#\" class=\"sked-cal-event-link\" id=\"skevent-'\n . $skeVent->id . '\" data-owner-id=\"' . $skeVent->owner()\n . '\">'\n . $skeVent->label\n . '</a><span>' . $skeVent->time('g:ia', $this->strTimezone) . '</span>'\n . '</li>';\n }\n $strHtml .= '</ul>';\n $strHtml .= '</td>';\n if (7 === $i) {\n $i = 0;\n $strHtml .= '</tr><tr>';\n }\n }\n\n if ($i) {\n for ($j = $i; $j < 7; $j++) {\n $strHtml .= '<td></td>';\n }\n }\n\n return $strHtml . '</tr></table>';\n }", "public function renderHTML() {\r\n\t\t// Mois et année du jour\r\n\t\t$time = time ();\r\n\t\t$mois_actuel = date ( 'm', $time );\r\n\t\t$annee_actuelle = date ( 'Y', $time );\r\n\r\n\t\t$aff = $this->renderstyle ();\r\n\t\t$aff .= '<div id=\"FilAriane\"><a href=\"../../../index.php?menu=4\">Site Emploi</a>&nbsp;>&nbsp;';\r\n\t\t$aff .= '<a href=\"?\">Statistiques Site Emploi</a>&nbsp;>&nbsp;Réponses par région et domaine d\\'activité</div><br />';\r\n\r\n\t\t$aff .= '<table><tr>';\r\n\t\t$aff .= '<td><img width=\"15px\" height=\"15px\" src=\"../../../include/images/export.jpg\" /></td>';\r\n\t\t$aff .= '<td> <a target=\"blank\" href=\"../statistiques/metier/getReponseRegion.php?export=1&m=' . (isset ( $_GET ['m'] ) ? $_GET ['m'] : $mois_actuel) . '&a=' . (isset ( $_GET ['a'] ) ? $_GET ['a'] : $annee_actuelle) . '\"> Exporter les données affichées</a></td>';\r\n\t\t$aff .= '</tr>';\r\n\t\t$aff .= '<tr></table>';\r\n\r\n\t\t// *************************************** Début calendrier ******************************************\r\n\r\n\t\t$aff .= '<div align=\"center\" ><form>';\r\n\t\t// Si on a demandé une date\r\n\t\tif (isset ( $_GET ['m'] ) && isset ( $_GET ['a'] )) {\r\n\t\t\t$aff .= '<a style=\"background-image:url(\\'../../../include/images/3.png\\');\" href=\"?action=rep&m=' . $_GET ['m'] . '&a=' . ($_GET ['a'] - 1);\r\n\t\t\t$aff .= '\">\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a><a style=\"background-image:url(\\'../../../include/images/3.png\\');\" href=\"?action=rep&m=';\r\n\t\t\tif ($_GET ['m'] == '01') {\r\n\t\t\t\t$aff .= '12&a=' . ($_GET ['a'] - 1);\r\n\t\t\t} else {\r\n\t\t\t\t$aff .= ($_GET ['m'] - 1) . '&a=' . $_GET ['a'];\r\n\t\t\t}\r\n\t\t\t$aff .= '\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>';\r\n\t\t\t$aff .= '<select name=\"mois\" onChange=\"window.location=\\'/admin/modules/app-site-emploi/statistiques/index.php?action=rep&m=\\' + this.form.mois.value + \\'&a=' . $_GET ['a'] . '\\'\">';\r\n\t\t\t$i = 1;\r\n\t\t\twhile ( $i <= 12 ) {\r\n\t\t\t\t$aff .= '<option value=\"' . $i . '\" ' . ($_GET ['m'] == $i ? 'selected' : '') . '>' . FunctionDate::getMois ( $i ) . '</option>';\r\n\t\t\t\t$i ++;\r\n\t\t\t}\r\n\t\t\t$aff .= '</select> ';\r\n\t\t\t$aff .= $_GET ['a'] . ' <a style=\"background-image:url(\\'../../../include/images/1.png\\');\" href=\"?action=rep&m=';\r\n\t\t\tif ($_GET ['m'] == '12') {\r\n\t\t\t\t$aff .= '01&a=' . ($_GET ['a'] + 1);\r\n\t\t\t} else {\r\n\t\t\t\t$aff .= ($_GET ['m'] + 1) . '&a=' . $_GET ['a'];\r\n\t\t\t}\r\n\t\t\t$aff .= '\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a><a style=\"background-image:url(\\'../../../include/images/1.png\\');\" href=\"?action=rep&m=' . $_GET ['m'] . '&a=' . ($_GET ['a'] + 1);\r\n\t\t\t$aff .= '\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>';\r\n\t\t} // Sinon on prend le moi et l'année actuels\r\n\t\telse {\r\n\t\t\t$aff .= '<a style=\"background-image:url(\\'../../../include/images/3.png\\');\" href=\"?action=rep&m=' . $mois_actuel . '&a=' . ($annee_actuelle - 1);\r\n\t\t\t$aff .= '\">\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a><a style=\"background-image:url(\\'../../../include/images/3.png\\');\" href=\"?action=rep&m=';\r\n\t\t\tif ($mois_actuel == '01') {\r\n\t\t\t\t$aff .= '12&a=' . ($annee_actuelle - 1);\r\n\t\t\t} else {\r\n\t\t\t\t$aff .= ($mois_actuel - 1) . '&a=' . $annee_actuelle;\r\n\t\t\t}\r\n\t\t\t$aff .= '\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>';\r\n\t\t\t$aff .= ' <select name=\"mois\" onChange=\"window.location=\\'/admin/modules/app-site-emploi/statistiques/index.php?action=rep&m=\\' + this.form.mois.value + \\'&a=' . $annee_actuelle . '\\'\">';\r\n\t\t\t$i = 1;\r\n\t\t\twhile ( $i <= 12 ) {\r\n\t\t\t\t$aff .= '<option value=\"' . $i . '\" ' . ($mois_actuel == $i ? 'selected' : '') . '>' . FunctionDate::getMois ( $i ) . '</option>';\r\n\t\t\t\t$i ++;\r\n\t\t\t}\r\n\t\t\t$aff .= '</select> ';\r\n\t\t\t$aff .= $annee_actuelle . '<a style=\"background-image:url(\\'../../../include/images/1.png\\');\" href=\"?action=offre_rep&m=';\r\n\t\t\tif ($mois_actuel == '12') {\r\n\t\t\t\t$aff .= '01&a=' . ($annee_actuelle + 1);\r\n\t\t\t} else {\r\n\t\t\t\t$aff .= ($mois_actuel + 1) . '&a=' . $annee_actuelle;\r\n\t\t\t}\r\n\t\t\t$aff .= '\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a><a style=\"background-image:url(\\'../../../include/images/1.png\\');\" href=\"?action=rep&m=' . $mois_actuel . '&a=' . ($annee_actuelle + 1);\r\n\t\t\t$aff .= '\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>';\r\n\t\t}\r\n\t\t$aff .= '</div></form><br />';\r\n\t\t// *************************************** Fin calendrier ******************************************\r\n\t\t// Création du tableau\r\n\r\n\t\t$aff .= '<table id=\"TableList\" width=\"100%\" class=\"liste\">';\r\n\t\t$aff .= '<tr class=\"title\"><td align=\"center\" ><b>Région</b></td>';\r\n\t\tforeach ( $this->myListedomaine->getList () as $aDA ) {\r\n\t\t\t$aff .= '<td align=\"center\"><b>' . $aDA->getnomdomaine () . '</b></td>';\r\n\t\t}\r\n\t\t$aff .= '<td align=\"center\">Total</td></tr>';\r\n\t\t$row = 1;\r\n\t\tforeach ( $this->myListeregion->getList () as $aRegion ) {\r\n\t\t\tif ($aRegion->getlibelle () == 'Toute la France') {\r\n\t\t\t\t$aff .= '<tr>';\r\n\t\t\t\t$aff .= '<td class=\"' . ($row == 1 ? 'row1' : 'row2') . '\" align=\"center\"><b>' . $aRegion->getlibelle () . '</b></td>';\r\n\t\t\t\tforeach ( $this->myListedomaine->getList () as $aDA ) {\r\n\t\t\t\t\t$total_ligne = 0;\r\n\t\t\t\t\t$aStatAll = new StatReponseRegion ();\r\n\t\t\t\t\t$aff .= '<td class=\"' . ($row == 1 ? 'row1' : 'row2') . '\" align=\"center\" >' . $aStatAll->SQL_COUNT ( $aDA->getiddomaine () ) . '</td>';\r\n\t\t\t\t\tif (array_key_exists ( $aRegion->getidregion () . '-' . $aDA->getiddomaine (), $this->myaStat )) {\r\n\t\t\t\t\t\t$total_ligne += $this->myaStat [$aRegion->getidregion () . '-' . $aDA->getiddomaine ()];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$aff .= '<td class=\"' . ($row == 1 ? 'row1' : 'row2') . '\" align=\"center\">' . $total_ligne . '</td></tr>';\r\n\t\t\t} else \r\n\t\t\t{ // total par ligne\r\n\t\t\t\t$total_ligne = 0;\r\n\t\t\t\t$aff .= '<tr>';\r\n\t\t\t\t$aff .= '<td class=\"' . ($row == 1 ? 'row1' : 'row2') . '\" align=\"center\"><b>' . $aRegion->getlibelle () . '</b></td>';\r\n\t\t\t\tforeach ( $this->myListedomaine->getList () as $aDA ) {\r\n\t\t\t\t\t$aff .= '<td class=\"' . ($row == 1 ? 'row1' : 'row2') . '\" align=\"center\" >' . (array_key_exists ( $aRegion->getidregion () . '-' . $aDA->getiddomaine (), $this->myaStat ) ? $this->myaStat [$aRegion->getidregion () . '-' . $aDA->getiddomaine ()] : 0) . '</td>';\r\n\t\t\t\t\tif (array_key_exists ( $aRegion->getidregion () . '-' . $aDA->getiddomaine (), $this->myaStat )) {\r\n\t\t\t\t\t\t$total_ligne += $this->myaStat [$aRegion->getidregion () . '-' . $aDA->getiddomaine ()];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$aff .= '<td class=\"' . ($row == 1 ? 'row1' : 'row2') . '\" align=\"center\" >' . $total_ligne . '</td>';\r\n\t\t\t}\r\n\t\t\t$row = ($row == 1 ? 2 : 1);\r\n\t\t}\r\n\r\n\t\t// Total par colonne et total général\r\n\t\t$aff .= '<tr><td class=\"' . ($row == 1 ? 'row1' : 'row2') . '\" align=\"center\">Total</td>';\r\n\t\t$total = 0;\r\n\t\tforeach ( $this->myListedomaine->getList () as $aDA ) {\r\n\t\t\t$aStatAll = new StatReponseRegion ();\r\n\t\t\t$data = $aStatAll->SQL_COUNT_TOT ( $aDA->getiddomaine (), isset ( $_GET ['m'] ) ? $_GET ['m'] : date ( 'm', $time ), isset ( $_GET ['a'] ) ? $_GET ['a'] : date ( 'Y', $time ) );\r\n\t\t\t$total += $data;\r\n\t\t\t$aff .= '<td class=\"' . ($row == 1 ? 'row1' : 'row2') . '\" align=\"center\"><b>' . $data . '</b></td>';\r\n\t\t}\r\n\t\t$aff .= '<td class=\"' . ($row == 1 ? 'row1' : 'row2') . '\" align=\"center\">' . $total . '</tr></table><br />';\r\n\t\techo $aff;\r\n\t}", "function displayCurrentMonthCalenderAsTable()\n{\nglobal $year; // this year\nglobal $month; // this month\nglobal $id;\n$day=1; // start from first of month\nglobal $crypted;\nglobal $month_caption; // caption to table\n$lastmonth = $month - 1;\n$nextmonth = $month +1;\n$lastyear = $year - 1;\n$nextyear = $year + 1;\necho \"<table summary=\\\"Monthly calendar\\\" onMouseover= changeto('#CCCCCC') onMouseout= changeback('white') width = 757 cellspacing= 2 cellpadding= 2 id= ignore class=\\\"sk_bok_green\\\">\n<caption ><a href=comm.php?crypted=$_GET[crypted]&calender&lastyear=$lastyear ><font color=green>Last Year</font></a>&nbsp;&nbsp;&nbsp;<a href=comm.php?crypted=$_GET[crypted]&calender&last=$lastmonth&year=$year><font color=green>Last Month</a>&nbsp;&nbsp;&nbsp; <b>[$month_caption ]</b> &nbsp;&nbsp;&nbsp;<a href=comm.php?crypted=$_GET[crypted]&calender&next=$nextmonth&year=$year><font color= green>Next Month</font></a> &nbsp;<a href=comm.php?crypted=$_GET[crypted]&calender&lastyear=$nextyear><font color= green>Next Year<font></a></caption>\n<tr align=center id=ignore>\n<th width =308 id=ignore bgcolor=#FFC56C ><font color =Red>Sun</font></th>\n<th width =308 id=ignore bgcolor=#FFC56C><font color =Green>Mon</font></th>\n<th width =308 id=ignore bgcolor=#FFC56C><font color =Green>Tue</font></th>\n<th width =308 id=ignore bgcolor=#FFC56C><font color =Green>Wed</font></th>\n<th width =308 id=ignore bgcolor=#FFC56C><font color =Green>Thu</font></th>\n<th width =308 id=ignore bgcolor=#FFC56C><font color =Green>Fri</font></th> \n<th width =308 id=ignore bgcolor=#FFC56C><font color =blue>Sat</font></th> \n</tr>\\n\"; \n\n$ts = mktime(0,0,0,$month,$day,$year); // unix timestamp of the first day of current month\n$weekday_first_day = date(\"w\",$ts); // which is the weekday of the first day of week 0-Sunday 6-Saturday\n//$my_format = date(\"d-m-Y\");\n$slot=0;\n\nprint \"<tr align=center >\\n\"; // First row starts\nfor($i=0;$i<$weekday_first_day;$i++) // Pad the first few rows(slots)\n{\nprint \" <td id=ignore width =308></td>\"; // Empty slots \n$slot++;\n}\n\tif($day == '')\n\t{\n\t\t$ig = 'ignore';\n\t\techo \">>\";\n\t}\n\nwhile(checkdate($month,$day,$year) && $date<32) // till there are valid days in current month\n{\nif($slot == 7) // if we moved past saturday\n{\n$slot = 0; // reset and move back to sunday\nprint \"</tr>\\n\"; // end of this row\nprint \"<tr align=center width =50>\\n\"; // move on to next row\n\n}\n\t//$system_date = '$day-$month-$year';\n\t//$db_date = date('d-m-Y',$day $month $year);\n\t$system_date = mktime(0, 0, 0, $month, $day, $year);\n\t$db_date = date('d-m-Y',$system_date);\n\t$db_date_search = explode('-',$db_date);\n\t//print_r($db_date_search);\n\t$search_date = mktime(0, 0, 0, $month, $day);\n\t$search_date = sprintf(date('d-m-',$search_date));\n\t$month_no = $db_date_search[1];\n\t $query =\"select * from calender_event where active = '1' and day = '$db_date_search[0]' and `month_no` = '$month_no' and year = '$db_date_search[2]' \";\n\t\n\t$result = mysql_query($query) or die(mysql_error());\n\t$count = mysql_num_rows($result);\n\t/* echo $query;\n\techo $count; */\n\t$tr = 0;\n\t\n\tif($count != '0')\n\t{\t$msg .= \"<table id=ignore width=100%>\";\n\t\twhile($row=mysql_fetch_array($result))\n\t\t{\n\t\t\n\t\tif($row[popup] =='1')\n\t\t{\n\t\t\t$popup_link = \" onmouseout=\\\"hideTooltip()\\\" onmouseover=\\\"showTooltip(event,'$row[pop_msg]'\";\n\t\t\n\t\t}else\n\t\t{\n\t\t\t$popup_link =\"\";\n\t\t}\n\t\t\n\t\t$msg .= \"<tr ><td id=ignore bgcolor=green>$row[heading]</td></tr><tr><td id=ignore bgcolor=white><a href=\\\"comm.php?crypted=$_GET[crypted]&last=$month_no&year=$db_date_search[2]&calender&edit_event=$row[sno]\\\" $popup_link);return false\\\">$row[details]</a></td></tr>\";\n\t\t}\n\t\t$msg .= \"</table>\";\n\t}else\n\t{\n\t\t$msg ='';\n\t\n\t}\n\t//chking all db\n\t$color = \"bgcolor = white\";\n\techo \"<td $color id=$idd width =308 hight=308><DIV align=center id= tips><a href = #><font color=black><a href=comm.php?crypted=$_GET[crypted]&last=$month_no&year=$db_date_search[2]&calender&add_event=$db_date_search[0]-$db_date_search[1]-$db_date_search[2]>$day</a> </font>\n\t\t\n\t\t \";\n\t\n\t\n\t\techo \"</div ></a>$msg</div ></td>\";\n$msg ='';\n\t\n\n$day++;\n$slot++;\n}\n\nif($slot>0) // have we started off a new last row \n{\nwhile($slot<7) // padding at the end to complete the last row table\n{\nprint \" <td id=ignore></td>\"; // empty slots\n$slot++;\n}\nprint \"\\n</tr>\\n\"; // close out last row\n}\nprint '</table>'; //end of table\n}", "public function api_getTable($month,$year)\n\t{\n\t\t$employees = Employee::all();\n\n\t\tforeach ($employees as $key => $value) {\n\t\t\t$calendar = Calendar::where('employee_id', '=', $value->id)->where('month',$month)->where('year',$year)->first();\n\t\t\tif($calendar == null)\n\t\t\t{\n\t\t\t\t$calendar = $this->bornCalendarEmpty($value->id, $month, $year);\n\t\t\t}\n\t\t\t$this->generatePresenteWhenInitNewDate($calendar, $month, $year);\n\t\t\t$employees[$key]->calendar = $calendar;\n\t\t}\n\n?>\n <div id=\"datafullname\" style=\"display:none\"></div>\n <div class=\"sidebar-calendar\">\n <table>\n <thead>\n <tr><th><div class=\"nameitem\">Fullname</div></th></tr>\n </thead>\n <tbody>\n <tr class=\"itemblank\">\n <td><div class=\"nameitem\"></div></td>\n </tr>\n <?php foreach($employees as $key => $value) : ?>\n <tr>\n <!-- <td><div class=\"nameitem\">{{ $value->id }}</div></td> -->\n <td><div class=\"nameitem\" idem=\"<?php echo $value->id; ?>\"><?php echo $value->lastname.\" \".$value->firstname; ?></div></td>\n </tr>\n <?php endforeach;?>\n </tbody>\n </table>\n </div>\n <div class=\"content-calendar\">\n <div id=\"datacalendar\" style=\"display:none\"></div>\n <table>\n <thead>\n <tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ($i=1;$i<=31;$i++)\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$dt = null;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (checkDateValid($i, $month, $year)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$dt = Carbon::create($year, $month, $i);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo \"<th><div class='day'>\".$i.\"<br/>\".toEnglishDate($dt->dayOfWeek).\"</div></th>\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t?>\n </tr>\n </thead>\n <tbody>\n <tr class=\"itemblank\">\n <td><div class=\"innerblank\"></div></td>\n </tr>\n <?php\n foreach($employees as $key => $value)\n {\n $calendar = $value->calendar;\n ?>\n <tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ($i=1;$i<=31;$i++)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$dt = Carbon::create($year, $month, $i);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (checkDateValid($i, $month, $year)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ($dt->dayOfWeek == 6 || $dt->dayOfWeek == 0)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td style=\"background-color:#ffbff7\"><div class=\"item\" idem=\"{{ $value->id }}\" idday=\"<?php echo $i;?>\" ><?php echo $calendar->{'n'.$i};?></div></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td><div class=\"item\" idem=\"{{ $value->id }}\" idday=\"<?php echo $i;?>\" ><?php echo $calendar->{'n'.$i};?></div></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t?>\n </tr>\n <?php\n }\n ?>\n\n </tbody>\n </table>\n </div>\n\n\t\t<?php\n\t}", "private function buildBodyDay()\n {\n\n $events = $this->events;\n $h = \"\";\n for ($i = $this->start_hour; $i < $this->end_hour; $i++) {\n for ($t = 0; $t < 2; $t++) {\n $h .= \"<tr>\";\n $min = $t == 0 ? \":00\" : \":30\";\n $h .= \"<td class='$this->timeClass'>\" . date('g:ia', strtotime($i . $min)) . \"</td>\";\n for ($k = 0; $k < 1; $k++) {\n $wd = $this->week_days[$k];\n $time_r = $this->year . '-' . $this->month . '-' . $wd . ' ' . $i . ':00:00';\n $min = $t == 0 ? '' : '+30 minute';\n $time_1 = strtotime($time_r . $min);\n $time_2 = strtotime(date('Y-m-d H:i:s', $time_1) . '+30 minute');\n $dt = date('Y-m-d H:i:s', $time_1);\n $h .= \"<td colspan='3' data-datetime='$dt'>\";\n $h .= $this->dateWrap[0];\n\n $hasEvent = false;\n foreach ($events as $key => $event) {\n //EVENT TIME AND DATE\n $time_e = strtotime($key);\n if ($time_e >= $time_1 && $time_e < $time_2) {\n $hasEvent = true;\n $h .= $this->buildEvents(false, $event);\n }\n }\n $h .= !$hasEvent ? '&nbsp;' : '';\n $h .= $this->dateWrap[1];\n $h .= \"</td>\";\n }\n $h .= \"</tr>\";\n }\n }\n $h .= \"</tbody>\";\n $h .= \"</table>\";\n\n $this->html .= $h;\n }", "function build_calendar($month,$year,$dateArray) {\r\n $daysOfWeek = array('S','M','T','W','T','F','S');\r\n\r\n // What is the first day of the month in question?\r\n $firstDayOfMonth = mktime(0,0,0,$month,1,$year);\r\n\r\n // How many days does this month contain?\r\n $numberDays = date('t',$firstDayOfMonth);\r\n\r\n // Retrieve some information about the first day of the\r\n // month in question.\r\n $dateComponents = getdate($firstDayOfMonth);\r\n\r\n // What is the name of the month in question?\r\n $monthName = $dateComponents['month'];\r\n\r\n // What is the index value (0-6) of the first day of the\r\n // month in question.\r\n $dayOfWeek = $dateComponents['wday'];\r\n\r\n // Create the table tag opener and day headers\r\n\r\n $calendar = \"<table class='table table-bordered'>\";\r\n $calendar .= \"<caption>$monthName $year</caption>\";\r\n $calendar .= \"<tr>\";\r\n\r\n // Create the calendar headers\r\n\r\n foreach($daysOfWeek as $day) {\r\n $calendar .= \"<th class='header'>$day</th>\";\r\n } \r\n\r\n // Create the rest of the calendar\r\n\r\n // Initiate the day counter, starting with the 1st.\r\n\r\n $currentDay = 1;\r\n\r\n $calendar .= \"</tr><tr>\";\r\n\r\n // The variable $dayOfWeek is used to\r\n // ensure that the calendar\r\n // display consists of exactly 7 columns.\r\n\r\n if ($dayOfWeek > 0) { \r\n $calendar .= \"<td colspan='$dayOfWeek'>&nbsp;</td>\"; \r\n }\r\n \r\n $month = str_pad($month, 2, \"0\", STR_PAD_LEFT);\r\n \r\n while ($currentDay <= $numberDays) {\r\n\r\n // Seventh column (Saturday) reached. Start a new row.\r\n\r\n if ($dayOfWeek == 7) {\r\n\r\n $dayOfWeek = 0;\r\n $calendar .= \"</tr><tr>\";\r\n\r\n }\r\n \r\n $currentDayRel = str_pad($currentDay, 2, \"0\", STR_PAD_LEFT);\r\n \r\n $date = \"$year-$month-$currentDayRel\";\r\n\t\tif($date == date('Y-m-d')){\r\n\t\t\t$calendar .= \"<td class='col-md-1 col-xs-1' rel='$date' bgcolor='#ADD8E6'>$currentDay<br/>\";\r\n\t\t}else{\r\n\t\t\t$calendar .= \"<td class='col-md-1 col-xs-1' rel='$date'>$currentDay<br/>\";\r\n\t\t}\r\n \r\n\t\t $sql = mysql_query(\"SELECT * FROM leavesys.leave_details WHERE date = '\".$date.\"'\");\r\n\t\t while($result = mysql_fetch_array($sql)){\r\n\t\t\t $sql2 = mysql_query(\"SELECT * FROM user WHERE id = '\".$result['applicant_id'].\"'\");\r\n\t\t\t $result2 = mysql_fetch_assoc($sql2);\r\n\t\t\t\tif($result['half'] == 1){\r\n\t\t\t\t\t$c_content = \" (am)\";\r\n\t\t\t\t}else if($result['half'] == 2){\r\n\t\t\t\t\t$c_content = \" (pm)\";\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$c_content = \"\";\r\n\t\t\t\t}\r\n\t\t\t\t$calendar .= $result2['country_code'].\" - \".$result2['name'].$c_content.\"<br/>\";\r\n\t\t }\r\n\t\t $sql1 = mysql_query(\"SELECT * FROM leavesys.holiday WHERE date = '\".$date.\"'\");\r\n\t\t while($result1 = mysql_fetch_array($sql1)){\r\n\t\t\t if($result1['country'] == \"al\"){\r\n\t\t\t\t $calendar .= \"<font color='blue;'>\".$result1['name'].\"</font><br/>\";\r\n\t\t\t }else{\r\n\t\t\t\t$calendar .= \"<font color='blue;'>\".$result1['name'].\" (\".$result1['country'].\")</font><br/>\";\r\n\t\t\t }\r\n\t\t }\r\n\t\t $calendar .= \"</td>\";\r\n\r\n // Increment counters\r\n \r\n $currentDay++;\r\n $dayOfWeek++;\r\n\r\n }\r\n \r\n \r\n\r\n // Complete the row of the last week in month, if necessary\r\n\r\n if ($dayOfWeek != 7) { \r\n \r\n $remainingDays = 7 - $dayOfWeek;\r\n $calendar .= \"<td colspan='$remainingDays'>&nbsp;</td>\"; \r\n\r\n }\r\n \r\n $calendar .= \"</tr>\";\r\n\r\n $calendar .= \"</table>\";\r\n\r\n return $calendar;\r\n\r\n}", "function calendar($url,$class='') {\n\n\tglobal $width;\n\tglobal $cell_width;\n\tglobal $legend_height;\n\tglobal $entry_color;\n\tglobal $entry_background_color;\n\tglobal $today_color;\n\tglobal $today_background_color;\n\tglobal $l_calendar;\n\tglobal $blog_script;\n\tglobal $lang;\n\tglobal $mysql_table;\n\t\n\tif ($_GET['date'] != '') {\n\t\t$MyDate = intval($_GET['date']);\n\t\t$year = substr($MyDate,0,4);\n\t\t$month = substr($MyDate,4,-2);\n\t} else {\n\t\t$month = date(\"n\");\n\t\t$year = date(\"Y\");\n\t}\n\t\n\t$prev = $month - 1;\n\t$next = $month + 1;\n\t$yearP = $year;\n\t$yearN = $year;\n\tif ($prev == \"0\") { $yearP--; $prev = \"12\"; }\n\tif ($prev < 10) $prev = '0'.$prev;\n\tif ($next == \"13\") { $yearN++; $next = \"1\"; }\n\tif ($next < 10) $next = '0'.$next;\n\n\t$transform_month = array(\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\");\n\t$into_month = array('Janvier','F&eacute;vrier','Mars','Avril','Mai','Juin','Juillet','Août','Septembre','Octobre','Novembre','D&eacute;cembre');\n\t\n\tfor ($l = 0; $l < 12; $l++) {\n\t\tif ($month == $transform_month[$l]) {\n\t\t\t$month_word = $into_month[$l];\n\t\t}\n\t}\n\n\t$output .= '<table style=\"width: '.$width.'; height: '.$legend_height.'\" class=\"'.$class.'\">\n\t<tr>\n\t\t<!--<td style=\"width: 10%; text-align: left;\"><a href=\"'.$url.'&date='.$yearP.$prev.'00\">&laquo;</a></td>-->\n\t\t<td colspan=\"7\"><b>'.strtoupper($month_word).' '.$year.'</b></td>\n\t\t<!--<td style=\"width: 10%; text-align: right;\"><a href=\"'.$url.'&date='.$yearN.$next.'00\">&raquo;</a></td>-->\n\t</tr>\n\t<tr align=\"center\">\n\t\t<td><b>L</b></td>\n\t\t<td><b>M</b></td>\n\t\t<td><b>M</b></td>\n\t\t<td><b>J</b></td>\n\t\t<td><b>V</b></td>\n\t\t<td><b>S</b></td>\n\t\t<td><b>D</b></td>\n\t</tr>\n\t<tr align=\"center\">';\n\t\n\t$no_days = date(\"t\", mktime(0, 0, 0, $month, 1, $year));\n\t$first_day = date(\"w\", mktime(0, 0, 0, $month, 1, $year));\n\t$today_day = date(\"j\");\n\t$today_month = date(\"n\");\n\t$today_year = date(\"Y\");\n\t\n\tif ($first_day == \"0\") $first_day = \"7\";\n\t\n\tfor ($i = 0; $i < $first_day-1; $i++) $output .= '<td style=\"width:'.$cell_width.';\">&nbsp;</td>';\n\n\tfor ($i = 1; $i <= $no_days; $i++) {\n\t\t//$result = mysql_query(\"SELECT id FROM blog WHERE DAYOFMONTH(timestamp)='$i' AND MONTH(timestamp) = '$month' AND YEAR(timestamp) = '$year' ORDER BY id DESC;\");\n\t\t$selectDate = $year.$month.($i<10?'0'.$i:$i);\n\t\t$result = mysql_query(\"SELECT id FROM blog WHERE datepubli='$selectDate' LIMIT 1 \");\n\t\t$num = mysql_num_rows($result);\n\t\t//$res = mysql_fetch_array($result);\n\t\n\t\tif ($first_day == \"8\") { $first_day = \"1\"; $output .= '<tr style=\"width: '.$width.';\" align=\"center\">'; }\n\t\tif ($i < 10) $space = ' '; else $space = '';\n\t\n\t\tif ($i == $today_day && $month == $today_month && $year == $today_year) \n\t\t\t$style = 'background-color: '.$today_background_color.'; color: '.$today_color.'; font-weight: bold;';\n\t\telse $style = '';\n\t\tif (intval($_GET['date']) == $selectDate) $style .= 'border:1px solid #000000;';\n\t\t\n\t\tif ($num < 1) $output .= '<td style=\"'.$style.' width: '.$cell_width.';\">'.$i.'</td>';\n\t\telse $output .= '<td style=\"background-color:'.$entry_background_color.';'.$style.'width: '.$cell_width.';color: '.$entry_color.';\"><a href=\"'.$url.'&date='.$selectDate.'\" style=\"color: '.$today_color.'\" title=\"Voir le sujet posté à cette date\">'.$i.'</a></td>';\n\t\t\n\t\tif ($first_day == \"7\") $output .= '</tr>';\n\t\t$first_day++;\n\t}\n\t\n\t$output .= '</table>';\n\t\n\treturn $output;\n\n}", "public function calendar()\n {\n $this->template->set('global_setting', $this->global_setting);\n $this->template->set('page', 'calendar');\n $this->template->set_theme('default_theme');\n $this->template->set_layout('frontend')\n ->title($this->global_setting['site_title'] . ' | Calendar')\n ->set_partial('header', 'partials/header')\n ->set_partial('footer', 'partials/footer');\n $this->template->build('frontpages/calendar');\n }", "function DisplayCalendarOfEvents()\r\n\t{\r\n\t\tglobal $_SETTINGS;\r\n\t\techo \"<div id='calendar'></div>\";\t\r\n\t}", "private function buildBody()\n {\n $day = 1;\n $now_date = $this->year . '-' . $this->month . '-01';\n $startingDay = date('N', strtotime('first day of this month', strtotime($now_date)));\n //Add the following line if you want to start the week with monday instead of sunday. Or change the number to suit your needs.\n //$startingDay = $startingDay - 1;\n $monthLength = $this->daysMonth[$this->month - 1];\n if ($this->month == 2 && ((($this->year % 4) == 0) && ((($this->year % 100) != 0) || (($this->year % 400) == 0)))) {\n $monthLength = $monthLength + 1;\n }\n $h = \"<tr>\";\n for ($i = $startingDay == 7 ? 1 : 0; $i < 9; $i++) {\n for ($j = 0; $j <= 6; $j++) {\n $currDate = $this->getDayDate($day);\n $class = $this->getTdClass($day);\n $h .= \"<td data-datetime='$currDate' $class>\";\n $h .= $this->dateWrap[0];\n if ($day <= $monthLength && ($i > 0 || $j >= $startingDay)) {\n $h .= $this->dayWrap[0];\n $h .= $this->getEventSearchLink($day);\n $h .= $this->dayWrap[1];\n $h .= $this->buildEvents($currDate);\n $day++;\n } else {\n $h .= \"&nbsp;\";\n }\n $h .= $this->dateWrap[1];\n $h .= \"</td>\";\n }\n // stop making rows if we've run out of days\n if ($day > $monthLength) {\n break;\n } else {\n $h .= \"</tr>\";\n $h .= \"<tr>\";\n }\n }\n $h .= \"</tr>\";\n $h .= \"</tbody>\";\n $h .= \"</table>\";\n $this->html .= $h;\n }", "function ShowCalendar()\n{\n\t$str1=\"select value1 from options where name='calendar'\";\n\t$result=mysql_query($str1) or\n\t\tdie(mysql_error());\n\t$row=mysql_fetch_array($result);\n\tif ($row['value1']==1)\n\t{\n echo(\"<tr><td height='154' valign='top'><table width='100%' border='0' cellpadding='0' cellspacing='0' bgcolor='#F0F8FF'>\");\n echo(\"<tr><td bgcolor='\");\n\t echo(background());\n\t echo(\"' class='leftmenumainitem' width='216' valign='top'>\");\n\t\techo(\"<img src='image/point.jpg' />&nbsp;&nbsp;\");\n\t\techo(getPara('calendar','value2'));\n\t\techo(\" </td></tr>\");\n echo(\"<tr><td height='132' align='center' valign='middle'><div align='center'>\");\n echo(\"<script language='javascript'>calendar();</script>\");\n echo(\"</div></td></tr></table></td></tr>\");\n\t}\n\n\tmysql_free_result($result);\n}", "function display_day()\n{\n global $phpcid, $phpc_cal, $phpc_script, $phpcdb, $day, $month, $year;\n\n\t$monthname = month_name($month);\n\n $results = $phpcdb->get_occurrences_by_date($phpcid, $year, $month, $day);\n\n\t$have_events = false;\n\n\t$html_table = tag('table', attributes('class=\"phpc-main\"'),\n\t\t\ttag('caption', \"$day $monthname $year\"),\n\t\t\ttag('thead',\n\t\t\t\ttag('tr',\n\t\t\t\t\ttag('th', __('Title')),\n\t\t\t\t\ttag('th', __('Time')),\n\t\t\t\t\ttag('th', __('Description'))\n\t\t\t\t )));\n\tif($phpc_cal->can_modify()) {\n\t\t$html_table->add(tag('tfoot',\n\t\t\t\t\ttag('tr',\n\t\t\t\t\t\ttag('td',\n\t\t\t\t\t\t\tattributes('colspan=\"4\"'),\n\t\t\t\t\t\t\tcreate_hidden('action', 'event_delete'),\n\t\t\t\t\t\t\tcreate_hidden('day', $day),\n\t\t\t\t\t\t\tcreate_hidden('month', $month),\n\t\t\t\t\t\t\tcreate_hidden('year', $year),\n\t\t\t\t\t\t\tcreate_submit(__('Delete Selected'))))));\n\t}\n\n\t$html_body = tag('tbody');\n\n\twhile($row = $results->fetch_assoc()) {\n\t\n\t\t$event = new PhpcOccurrence($row);\n\n\t\tif(!$event->can_read())\n\t\t\tcontinue;\n\n\t\t$have_events = true;\n\n\t\t$eid = $event->get_eid();\n\t\t$oid = $event->get_oid();\n\n\t\t$html_subject = tag('td');\n\n\t\tif($event->can_modify()) {\n\t\t\t$html_subject->add(create_checkbox('eid[]',\n\t\t\t\t\t\t$eid));\n\t\t}\n\n\t\t$html_subject->add(create_occurrence_link(tag('strong',\n\t\t\t\t\t\t$event->get_subject()),\n\t\t\t\t\t'display_event', $oid));\n\n\t\tif($event->can_modify()) {\n\t\t\t$html_subject->add(\" (\");\n\t\t\t$html_subject->add(create_event_link(\n\t\t\t\t\t\t__('Modify'), 'event_form',\n\t\t\t\t\t\t$eid));\n\t\t\t$html_subject->add(')');\n\t\t}\n\n\t\t$html_body->add(tag('tr',\n\t\t\t\t\t$html_subject,\n\t\t\t\t\ttag('td', $event->get_time_span_string()),\n\t\t\t\t\ttag('td', attributes('class=\"phpc-desc\"'), $event->get_desc())));\n\t}\n\n\t$html_table->add($html_body);\n\n\tif($phpc_cal->can_modify()) {\n\t\t$output = tag('form',\n\t\t\t\tattributes(\"action=\\\"$phpc_script\\\"\"),\n\t\t\t\t$html_table);\n\t} else {\n\t\t$output = $html_table;\n\t}\n\n\tif(!$have_events)\n\t\t$output = tag('h2', __('No events on this day.'));\n\n\treturn tag('', create_day_menu(), $output);\n}", "function build_calendar($month,$year,$dateArray) {\n $daysOfWeek = array('S','M','T','W','T','F','S');\n\n // What is the first day of the month in question?\n $firstDayOfMonth = mktime(0,0,0,$month,1,$year);\n\n // How many days does this month contain?\n $numberDays = date('t',$firstDayOfMonth);\n\n // Retrieve some information about the first day of the\n // month in question.\n $dateComponents = getdate($firstDayOfMonth);\n\n // What is the name of the month in question?\n $monthName = $dateComponents['month'];\n\n // What is the index value (0-6) of the first day of the\n // month in question.\n $dayOfWeek = $dateComponents['wday'];\n\n // Create the table tag opener and day headers\n\n $calendar = \"<table class='calendar'>\";\n $calendar .= \"<caption>$monthName $year</caption>\";\n $calendar .= \"<tr>\";\n\n // Create the calendar headers\n\n foreach($daysOfWeek as $day) {\n $calendar .= \"<th class='header'>$day</th>\";\n }\n\n // Create the rest of the calendar\n\n // Initiate the day counter, starting with the 1st.\n\n $currentDay = 1;\n\n $calendar .= \"</tr><tr>\";\n\n // The variable $dayOfWeek is used to\n // ensure that the calendar\n // display consists of exactly 7 columns.\n\n if ($dayOfWeek > 0) {\n $calendar .= \"<td colspan='$dayOfWeek'>&nbsp;</td>\";\n }\n\n $month = str_pad($month, 2, \"0\", STR_PAD_LEFT);\n\n while ($currentDay <= $numberDays) {\n\n // Seventh column (Saturday) reached. Start a new row.\n\n if ($dayOfWeek == 7) {\n\n $dayOfWeek = 0;\n $calendar .= \"</tr><tr>\";\n\n }\n\n $currentDayRel = str_pad($currentDay, 2, \"0\", STR_PAD_LEFT);\n\n $date = \"$year-$month-$currentDayRel\";\n\n $calendar .= \"<td class='day' rel='$date'>$currentDay</td>\";\n\n // Increment counters\n\n $currentDay++;\n $dayOfWeek++;\n\n }\n\n\n\n // Complete the row of the last week in month, if necessary\n\n if ($dayOfWeek != 7) {\n\n $remainingDays = 7 - $dayOfWeek;\n $calendar .= \"<td colspan='$remainingDays'>&nbsp;</td>\";\n\n }\n\n $calendar .= \"</tr>\";\n\n $calendar .= \"</table>\";\n\n return $calendar;\n\n}", "function EventsHtmlTable()\n {\n return \n $this->Html_Table\n (\n \"\",\n $this->EventsTable()\n );\n }", "function calendar ($whereto=\"./index.php\") {\n global $_GET, $_SERVER;\n $currMonth = ($_GET['month']) ? $_GET['month'] : date(\"n\"); # numeric calendar month\n $currYear = ($_GET['year']) ? $_GET['year'] : date(\"Y\");\n $tm = mktime(0, 0, 0, ($currMonth +$shifted), 1, $currYear);\n $dim = date(\"t\", $tm); # days in month\n $dow = date(\"w\", $tm); # day of week month starts on\n $txm = date(\"F\", $tm); # text name of month\n $pMon = date(\"M\", mktime(0, 0, 0, $currMonth-1, 1, $currYear));\n $nMon = date(\"M\", mktime(0, 0, 0, $currMonth+1, 1, $currYear));\n $cal .= \" <tr><td><br/></td></tr>\\n<tr><th>$txm $currYear</th></tr>\\n<tr><td>\";\n $cal .= \"<table class='cal' width='15%'>\\n <tr>\";\n foreach (array(\"S\",\"M\",\"T\",\"W\",\"T\",\"F\",\"S\") as $k => $v) { $cal .= \"<th>$v</th>\"; }\n $cal .= \"</tr>\\n\";\n $day = \" \";\n for ($row=0; $row<6; $row++) {\n $cal .= \" <tr>\";\n for ($col=0; $col<7; $col++) {\n if (($row == 0) && ($col == $dow)) { $day = 1; }\n if (is_numeric($day)) {\n $dday = ($day < 10) ? \"0$day\" : $day;\n $link = \"?date=$currYear-\".(($currMonth<10)?\"0\":\"\").\"$currMonth-$dday\";\n $cal .= \"<td><a href='$link'>$dday</a></td>\";\n $day++;\n } else {\n $cal .= \"<td>&nbsp;</td>\";\n }\n if ($day > $dim) { $day = \"&nbsp;\"; }\n }\n $cal .= \"</tr>\\n\";\n if ($day >= $dim) { break; }\n }\n $cal .= \" <tr>\\n <td colspan='7' nowrap>\\n\";\n $cal .= \" <a href='?year=\".($currYear-1).\"'>\".substr(($currYear-1),2).\"</a>&nbsp;\\n\";\n $cal .= \" <a href='?month=\".((($currMonth -1) < 1)?12:$currMonth -1).\"&year=\" .((($currMonth -1) < 1)?$currYear -1:$currYear).\"'>$pMon</a>\";\n if (!(($currMonth == date(\"n\")) && ($currYear == date(\"Y\")))) {\n $cal .= \"&nbsp;<a href='?month=\".date(\"n\").\"&year=\".date(\"Y\").\"'>Home</a>\";\n } else {\n $cal .= \"&nbsp;&nbsp;--&nbsp;&nbsp;\";\n }\n $cal .= \"&nbsp;\\n <a href='?month=\".((($currMonth +1) > 12)?1:$currMonth +1).\"&year=\".((($currMonth +1) > 12)?$currYear +1:$currYear).\"'>$nMon</a>&nbsp;\\n\";\n $cal .= \" <a href='?year=\".($currYear+1).\"'>\".substr(($currYear+1),2).\"</a>\\n\";\n $cal .= \" </td>\\n </tr>\\n</table>\\n\";\n $cal .= \"<!-- end calendar -->\\n\";\n return $cal;\n}", "public function ownerCombinedCal()\n {\n // Restricted access\n if ( ! $this->ownerLoggedIn() )\n {\n $this->restricted();\n return;\n }\n\n require_once('views/OwnerCombinedCalView.class.php');\n $site = new SiteContainer($this->db);\n $page = new OwnerCombinedCalView();\n \n $site->printHeader();\n $site->printNav(\"owner\");\n $site->printCombinedCalFooter();\n $page->printHtml();\n $page->printCalendar(); \n\n }", "protected function build_calendar()\n\t{\n\t\t//ee()->TMPL->log_item('Calendar: Building calendar output');\n\n\t\t$disable\t= array(\n\t\t\t'categories',\n\t\t\t'category_fields',\n\t\t\t'custom_fields',\n\t\t\t'member_data',\n\t\t\t'pagination',\n\t\t\t'trackbacks'\n\t\t);\n\n\t\t$this->CDT->reset();\n\t\t$today_ymd\t= $this->CDT->ymd;\n\n\t\t// -------------------------------------\n\t\t// Set dynamic=\"off\", lest Channel get uppity and try\n\t\t// to think that it's in charge here.\n\t\t// -------------------------------------\n\n\t\t//default off.\n\t\tif ( $this->check_yes( ee()->TMPL->fetch_param('dynamic') ) )\n\t\t{\n\t\t\tee()->TMPL->tagparams['dynamic'] \t= 'yes';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tee()->TMPL->tagparams['dynamic'] \t= 'no';\n\t\t}\n\n\t\tif (isset(ee()->TMPL->tagparams['category']))\n\t\t{\n\t\t\t$this->convert_category_titles();\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Collect important bits of tagdata\n\t\t// -------------------------------------\n\n\t\t//ee()->TMPL->log_item('Calendar: Collecting tagdata');\n\n\t\t$output_at\t= '';\n\t\t$tagdata\t= ee()->TMPL->tagdata;\n\t\t$each_year\t= $each_month = $each_week = $each_day = $each_hour = $each_event = '';\n\t\t$hash_event\t= 'd38bf16a9a74c63fa5eb6d1ac082d539'.\"\\n\";\n\t\t$hash_hour\t= 'fe16402ccfad7e120a7ca3a31df3a019'.\"\\n\";\n\t\t$hash_day\t= '2aa2a1a0724182b1d876232c137a6d4f'.\"\\n\";\n\t\t$hash_week\t= 'b657210371b3e2a6f955ef6a404689de'.\"\\n\";\n\t\t$hash_month\t= 'd03207661c36a3bfd43b9dd239e41676'.\"\\n\";\n\t\t$hash_year\t= '97a92770ab082652cf662bdacc311dff'.\"\\n\";\n\n\t\t//--------------------------------------------\n\t\t//\tremove pagination before we start\n\t\t//--------------------------------------------\n\n\t\t//has tags?\n\t\tif (preg_match(\n\t\t\t\t\"/\" . LD . \"calendar_paginate\" . RD .\n\t\t\t\t\t\"(.+?)\" .\n\t\t\t\tLD . preg_quote(T_SLASH, '/') . \"calendar_paginate\" . RD . \"/s\",\n\t\t\t\t$tagdata,\n\t\t\t\t$match\n\t\t\t))\n\t\t{\n\t\t\t$this->paginate_tagpair_data\t= $match[0];\n\t\t\t$tagdata \t\t\t\t\t\t= str_replace( $match[0], '', $tagdata );\n\t\t}\n\t\t//prefix comes first\n\t\telse if (preg_match(\n\t\t\t\t\"/\" . LD . \"paginate\" . RD .\n\t\t\t\t\t\"(.+?)\" .\n\t\t\t\tLD . preg_quote(T_SLASH, '/') . \"paginate\" . RD . \"/s\",\n\t\t\t\t$tagdata,\n\t\t\t\t$match\n\t\t\t))\n\t\t{\n\t\t\t$this->paginate_tagpair_data\t= $match[0];\n\t\t\t$tagdata \t\t\t\t\t\t= str_replace( $match[0], '', $tagdata );\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Replace days of the week first, cuz they're easy\n\t\t// -------------------------------------\n\n\n\t\tif (isset(ee()->TMPL->var_pair['display_each_day_of_week']))\n\t\t{\n\t\t\tpreg_match(\n\t\t\t\t'/' . LD . 'display_each_day_of_week' . RD .\n\t\t\t\t\t'(.*?)' .\n\t\t\t\tLD . preg_quote(T_SLASH, '/') . 'display_each_day_of_week' . RD . '/s',\n\t\t\t\t$tagdata,\n\t\t\t\t$match\n\t\t\t);\n\n\t\t\tif (isset($match[1]))\n\t\t\t{\n\t\t\t\t$dow_output\t\t= '';\n\t\t\t\t$vars\t\t\t= array();\n\t\t\t\t$current_dow\t= $this->CDT->day_of_week;\n\n\t\t\t\t$this->CDT->change_ymd($this->P->value('date_range_start', 'ymd'));\n\n\t\t\t\tif ($this->CDT->day_of_week != $this->first_day_of_week)\n\t\t\t\t{\n\t\t\t\t\t$this->CDT->add_day(\n\t\t\t\t\t\t$this->first_day_of_week - $this->CDT->day_of_week\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tfor ($i = 0; $i < 7; $i++)\n\t\t\t\t{\n\t\t\t\t\tif ($i > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->CDT->add_day();\n\t\t\t\t\t}\n\n\t\t\t\t\t$vars['conditional'] = array(\n\t\t\t\t\t\t'day_of_week_is_weekend'\t=> (\n\t\t\t\t\t\t\t$this->CDT->day_of_week == 0 OR\n\t\t\t\t\t\t\t$this->CDT->day_of_week == 6\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'day_of_week_is_current'\t=> (\n\t\t\t\t\t\t\t$this->CDT->day_of_week == $current_dow\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\n\t\t\t\t\t$vars['single'] = array(\n\t\t\t\t\t\t'day_of_week'\t\t\t=> $this->cdt_format_date_string($this->CDT->datetime_array(), 'l'),\n\t\t\t\t\t\t'day_of_week_one'\t\t=> $this->cdt_format_date_string($this->CDT->datetime_array(), 'b'),\n\t\t\t\t\t\t'day_of_week_short'\t\t=> $this->cdt_format_date_string($this->CDT->datetime_array(), 'D'),\n\t\t\t\t\t\t'day_of_week_N'\t\t\t=> $this->cdt_format_date_string($this->CDT->datetime_array(), 'N'),\n\t\t\t\t\t\t'day_of_week_number'\t=> $this->cdt_format_date_string($this->CDT->datetime_array(), 'w')\n\t\t\t\t\t);\n\n\t\t\t\t\t$dow_output .= $this->swap_vars($vars, $match[1]);\n\t\t\t\t}\n\t\t\t\t$tagdata = str_replace($match[0], $dow_output, $tagdata);\n\t\t\t}\n\t\t}\n\n\t\t$tagdata = trim($tagdata).\"\\n\";\n\n\t\t// -------------------------------------\n\t\t// Now the rest\n\t\t// -------------------------------------\n\n\t\tif (isset(ee()->TMPL->var_pair['events']))\n\t\t{\n\t\t\tpreg_match(\n\t\t\t\t'/'.LD.'events'.RD.'(.*?)'.LD.preg_quote(T_SLASH, '/').'events'.RD.'/s',\n\t\t\t\t$tagdata,\n\t\t\t\t$match\n\t\t\t);\n\n\t\t\tif (isset($match[1]))\n\t\t\t{\n\t\t\t\t$each_event \t\t= trim($match[1]).\"\\n\";\n\t\t\t\t$tagdata \t\t\t= str_replace($match[0], $hash_event, $tagdata);\n\t\t\t\tee()->TMPL->tagdata = $each_event;\n\t\t\t\t$output_at \t\t\t= 'event';\n\t\t\t}\n\t\t}\n\n\t\tif (isset(ee()->TMPL->var_pair['display_each_hour']))\n\t\t{\n\t\t\tpreg_match(\n\t\t\t\t'/'.LD.'display_each_hour'.RD.'(.*?)'.LD.preg_quote(T_SLASH, '/').'display_each_hour'.RD.'/s',\n\t\t\t\t$tagdata,\n\t\t\t\t$match\n\t\t\t);\n\n\t\t\tif (isset($match[1]))\n\t\t\t{\n\t\t\t\t$each_hour \t\t\t= trim($match[1]).\"\\n\";\n\t\t\t\t$tagdata \t\t\t= str_replace($match[0], $hash_hour, $tagdata);\n\t\t\t\t$output_at \t\t\t= 'hour';\n\t\t\t}\n\t\t}\n\n\t\tif (isset(ee()->TMPL->var_pair['display_each_day']))\n\t\t{\n\t\t\tpreg_match(\n\t\t\t\t'/'.LD.'display_each_day'.RD.'(.*?)'.LD.preg_quote(T_SLASH, '/').'display_each_day'.RD.'/s',\n\t\t\t\t$tagdata,\n\t\t\t\t$match\n\t\t\t);\n\n\t\t\tif (isset($match[1]))\n\t\t\t{\n\t\t\t\t$each_day \t\t\t= trim($match[1]).\"\\n\";\n\t\t\t\t$tagdata \t\t\t= str_replace($match[0], $hash_day, $tagdata);\n\t\t\t\t$output_at \t\t\t= 'day';\n\t\t\t}\n\t\t}\n\n\t\tif (isset(ee()->TMPL->var_pair['display_each_week']))\n\t\t{\n\t\t\tpreg_match(\n\t\t\t\t'/'.LD.'display_each_week'.RD.'(.*?)'.LD.preg_quote(T_SLASH, '/').'display_each_week'.RD.'/s',\n\t\t\t\t$tagdata,\n\t\t\t\t$match\n\t\t\t);\n\n\t\t\tif (isset($match[1]))\n\t\t\t{\n\t\t\t\t$each_week \t\t\t= trim($match[1]).\"\\n\";\n\t\t\t\t$tagdata \t\t\t= str_replace($match[0], $hash_week, $tagdata);\n\t\t\t\t$output_at \t\t\t= 'week';\n\t\t\t}\n\t\t}\n\n\t\tif (isset(ee()->TMPL->var_pair['display_each_month']))\n\t\t{\n\t\t\tpreg_match(\n\t\t\t\t'/'.LD.'display_each_month'.RD.'(.*?)'.LD.preg_quote(T_SLASH, '/').'display_each_month'.RD.'/s',\n\t\t\t\t$tagdata,\n\t\t\t\t$match\n\t\t\t);\n\n\t\t\tif (isset($match[1]))\n\t\t\t{\n\t\t\t\t$each_month \t\t= trim($match[1]).\"\\n\";\n\t\t\t\t$tagdata \t\t\t= str_replace($match[0], $hash_month, $tagdata);\n\t\t\t\t$output_at \t\t\t= 'month';\n\t\t\t}\n\t\t}\n\n\t\tif (isset(ee()->TMPL->var_pair['display_each_year']))\n\t\t{\n\t\t\tpreg_match(\n\t\t\t\t'/'.LD.'display_each_year'.RD.'(.*?)'.LD.preg_quote(T_SLASH, '/').'display_each_year'.RD.'/s',\n\t\t\t\t$tagdata,\n\t\t\t\t$match\n\t\t\t);\n\n\t\t\tif (isset($match[1]))\n\t\t\t{\n\t\t\t\t$each_year \t\t\t= trim($match[1]).\"\\n\";\n\t\t\t\t$tagdata \t\t\t= str_replace($match[0], $hash_year, $tagdata);\n\t\t\t\t$output_at \t\t\t= 'year';\n\t\t\t}\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// If there aren't any display_each_X var pairs, default to event\n\t\t// -------------------------------------\n\n\t\tif ($output_at == '')\n\t\t{\n\t\t\t$each_event \t= $tagdata;\n\t\t\t$tagdata \t\t= $hash_event;\n\t\t\t$output_at \t\t= 'event';\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Set the default date to the start of our range\n\t\t// -------------------------------------\n\n\t\t$start_blank = (\n\t\t\t$this->P->value('date_range_start') === FALSE AND\n\t\t\t$this->P->value('date_range_end') === FALSE\n\t\t);\n\n\t\t$start\t= $this->CDT->change_datetime(\n\t\t\t$this->P->value('date_range_start', 'year'),\n\t\t\t$this->P->value('date_range_start', 'month'),\n\t\t\t$this->P->value('date_range_start', 'day'),\n\t\t\t$this->P->value('date_range_start', 'hour'),\n\t\t\t$this->P->value('date_range_start', 'minute')\n\t\t);\n\n\t\t$end\t= $this->CDT->change_datetime(\n\t\t\t$this->P->value('date_range_end', 'year'),\n\t\t\t$this->P->value('date_range_end', 'month'),\n\t\t\t$this->P->value('date_range_end', 'day'),\n\t\t\t($start_blank ? '23' : $this->P->value('date_range_end', 'hour')),\n\t\t\t($start_blank ? '59' : $this->P->value('date_range_end', 'minute'))\n\t\t);\n\n\t\t$current_period_start\t= $start;\n\t\t$current_period_end\t\t= $end;\n\n\t\t$this->CDT->set_default($start);\n\t\t$this->CDT->reset();\n\n\t\t// -------------------------------------\n\t\t// If we are \"padding\" short weeks, modify our dates\n\t\t// -------------------------------------\n\n\t\tif ($this->P->value('pad_short_weeks') === TRUE)\n\t\t{\n\t\t\t// -------------------------------------\n\t\t\t// Adjust the start date backward to the first day of the week, if necessary\n\t\t\t// -------------------------------------\n\n\t\t\t$old_end = $end;\n\n\t\t\tif ($start['day_of_week'] != $this->first_day_of_week)\n\t\t\t{\n\t\t\t\t$offset = ($start['day_of_week'] > $this->first_day_of_week) ?\n\t\t\t\t\t$start['day_of_week'] - $this->first_day_of_week :\n\t\t\t\t\t7 - ($this->first_day_of_week - $start['day_of_week']);\n\n\t\t\t\t$start \t= $this->CDT->add_day(-$offset);\n\t\t\t\t$this->CDT->reset();\n\t\t\t}\n\n\t\t\t// -------------------------------------\n\t\t\t// Adjust the end date forward to the last day of the week, if necessary\n\t\t\t// -------------------------------------\n\n\t\t\t$last_dow = ($this->first_day_of_week > 0) ? $this->first_day_of_week - 1 : 6;\n\n\t\t\tif ($end['day_of_week'] != $last_dow)\n\t\t\t{\n\t\t\t\t$this->CDT->change_ymd($end['ymd']);\n\t\t\t\t$offset = ($end['day_of_week'] > $last_dow) ?\n\t\t\t\t\t7 - ($end['day_of_week'] - $last_dow) :\n\t\t\t\t\t$last_dow - $end['day_of_week'];\n\n\t\t\t\t$end \t= $this->CDT->add_day($offset);\n\t\t\t\t$this->CDT->reset();\n\t\t\t}\n\n\t\t\t$end['time']\t= $old_end['time'];\n\t\t\t$end['hour']\t= $old_end['hour'];\n\t\t\t$end['minute']\t= $old_end['minute'];\n\n\t\t\t$this->CDT->set_default($start);\n\t\t\t$this->P->set('date_range_start', $start);\n\t\t\t$this->P->set('date_range_end', $end);\n\t\t}\n\n\t\t//ee()->TMPL->log_item('Calendar: Date range start: '. $this->P->value('date_range_start', 'ymd'));\n\n\t\t//ee()->TMPL->log_item('Calendar: Date range end: '. $this->P->value('date_range_end', 'ymd'));\n\n\t\t// -------------------------------------\n\t\t// Let's go fetch some events\n\t\t// -------------------------------------\n\n\t\t/*$category = FALSE;\n\n\t\tif (isset(ee()->TMPL) AND\n\t\t\t is_object(ee()->TMPL) AND\n\t\t\t ee()->TMPL->fetch_param('category') !== FALSE AND\n\t\t\t ee()->TMPL->fetch_param('category') != ''\n\t\t)\n\t\t{\n\t\t\t$category = ee()->TMPL->fetch_param('category');\n\n\t\t\tunset(ee()->TMPL->tagparams['category']);\n\t\t}*/\n\n\t\t$ids \t\t\t= $this->data->fetch_event_ids($this->P /*, $category*/);\n\n\t\t//ee()->TMPL->log_item('Calendar:build_calendar() Fetching events. ' . count( $ids ) . ' events were found.');\n\n\t\t$entry_data \t= array();\n\t\t$events \t\t= array();\n\n\t\t// -------------------------------------\n\t\t// No events? You really need to work on your social calendar...\n\t\t// -------------------------------------\n\n\t\tif (empty($ids))\n\t\t{\n\t\t\t// -------------------------------------\n\t\t\t// If they used a no_results tag, let 'em have it\n\t\t\t// -------------------------------------\n\n\t\t\tif (ee()->TMPL->no_results != '')\n\t\t\t{\n\t\t\t\t//ee()->TMPL->log_item('Calendar:build_calendar() No results, going home');\n\t\t\t\treturn $this->no_results();\n\t\t\t}\n\n\t\t\t//ee()->TMPL->log_item('Calendar:build_calendar() No results, but staying around for the show');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// -------------------------------------\n\t\t\t// We only care about this stuff if:\n\t\t\t// \t* there's an {event}{/event} tag pair\n\t\t\t// \t* thar be one or more xxx_has_events variables\n\t\t\t// -------------------------------------\n\n\t\t\tif ($each_event != '' OR strpos(ee()->TMPL->tagdata, '_event_total') !== FALSE)\n\t\t\t{\n\t\t\t\twhile (TRUE)\n\t\t\t\t{\n\t\t\t\t\t//ee()->TMPL->log_item('Calendar:build_calendar() Firing up the ol Channel Module to try and process ' . count( $ids ) . ' events.');\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Fetch occurrence info\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t$occurrence_ids = $this->data->fetch_occurrence_entry_ids($ids);\n\n\t\t\t\t\t//ee()->TMPL->log_item('Calendar:build_calendar() ' . count( $occurrence_ids ) . ' occurrences were found.');\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// If the entry_id of the occurrence doesn't match the entry_id\n\t\t\t\t\t// of the entry, we need to fetch the occurrence data separately\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tforeach ($occurrence_ids as $id => $data)\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ($data as $oid => $o_entry_id)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($id != $o_entry_id)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$ids[$o_entry_id] = $id; //$o_entry_id;\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// -------------------------------------\n\t\t\t\t\t// Prepare tagdata for Calendar-specific variable pairs, which\n\t\t\t\t\t// we will process later.\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tee()->TMPL->var_single['entry_id'] = 'entry_id';\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Prepare tagdata for Calendar-specific date variables, which\n\t\t\t\t\t// we will process later.\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t$var_dates = array(\n\t\t\t\t\t\t'event_start_date' \t=> FALSE,\n\t\t\t\t\t\t'event_start_time' \t=> FALSE,\n\t\t\t\t\t\t'event_end_date' \t=> FALSE,\n\t\t\t\t\t\t'event_end_time' \t=> FALSE\n\t\t\t\t\t);\n\n\t\t\t\t\tforeach (ee()->TMPL->var_single as $k => $v)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (($pos = strpos($k, ' format')) !== FALSE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$name = substr($k, 0, $pos);\n\n\t\t\t\t\t\t\tif (array_key_exists($name, $var_dates))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$var_dates[$name][$k] \t\t= $v;\n\t\t\t\t\t\t\t\tee()->TMPL->var_single[$k] \t= $k;\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//\t----------------------------------------\n\t\t\t\t\t//\tInvoke Channel class\n\t\t\t\t\t//\t----------------------------------------\n\n\t\t\t\t\tif ( ! class_exists('Channel') )\n\t\t\t\t\t{\n\t\t\t\t\t\trequire PATH_MOD.'/channel/mod.channel.php';\n\t\t\t\t\t}\n\n\t\t\t\t\t$channel = new Channel();\n\n\t\t\t\t\t//need to remove limit here so huge amounts of events work\n\t\t\t\t\t$channel->limit = 1000000;\n\n\t\t\t\t\t// --------------------------------------------\n\t\t\t\t\t// Invoke Pagination for EE 2.4 and Above\n\t\t\t\t\t// --------------------------------------------\n\n\t\t\t\t\t$channel = $this->add_pag_to_channel($channel);\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Prepare parameters\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tee()->TMPL->tagparams['entry_id'] = implode('|', array_keys($ids));\n\n\t\t\t\t\tif ($this->P->value('enable') != FALSE)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (is_array($this->P->value('enable')))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tee()->TMPL->tagparams['disable'] = implode('|', array_diff($disable, $this->P->value('enable')));\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\tee()->TMPL->tagparams['disable'] = implode('|', array_diff($disable, array($this->P->value('enable'))));\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\tee()->TMPL->tagparams['disable'] = implode('|', $disable);\n\t\t\t\t\t}\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Pre-process related data\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t//ee()->TMPL->tagdata = ee()->TMPL->assign_relationship_data( ee()->TMPL->tagdata );\n\n\t\t\t\t\tif (version_compare($this->ee_version, '2.6.0', '<'))\n\t\t\t\t\t{\n\t\t\t\t\t\tee()->TMPL->tagdata = ee()->TMPL->assign_relationship_data(\n\t\t\t\t\t\t\t$each_event\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tee()->TMPL->var_single \t= array_merge( ee()->TMPL->var_single, ee()->TMPL->related_markers );\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Execute needed methods\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t$channel->fetch_custom_channel_fields();\n\n\t\t\t\t\t$channel->fetch_custom_member_fields();\n\n\t\t\t\t\t// --------------------------------------------\n\t\t\t\t\t// Pagination Tags Parsed Out\n\t\t\t\t\t// --------------------------------------------\n\n\t\t\t\t\t$channel = $this->fetch_pagination_data($channel);\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Querification\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t//for some reason without this in EE 2.8.x\n\t\t\t\t\t//pagination has some sort of dynamic detection\n\t\t\t\t\t//that it didn't in EE 2.7 and below and hoses our\n\t\t\t\t\t//pagination setup because we are doing it\n\t\t\t\t\t//manually later as this is just data gathering\n\t\t\t\t\t//for events.\n\t\t\t\t\tif (\n\t\t\t\t\t\tversion_compare($this->ee_version, '2.8.0', '>=') &&\n\t\t\t\t\t\tisset($channel->pagination)\n\t\t\t\t\t)\n\t\t\t\t\t{\n\t\t\t\t\t\t$channel->pagination->paginate = false;\n\t\t\t\t\t}\n\n\t\t\t\t\t$channel->build_sql_query();\n\n\t\t\t\t\tif ($channel->sql == '')\n\t\t\t\t\t{\n\t\t\t\t\t\t//ee()->TMPL->log_item('Calendar: Channel query empty');\n\n\t\t\t\t\t\tif (ee()->TMPL->no_results != '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn $this->no_results();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\t$channel->query = ee()->db->query($channel->sql);\n\n\t\t\t\t\tif ($channel->query->num_rows == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t//ee()->TMPL->log_item('Calendar: Channel Module returned no results');\n\n\t\t\t\t\t\tif (ee()->TMPL->no_results != '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn $this->no_results();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\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//ee()->TMPL->log_item('Calendar:build_calendar() Channel module found ' . $channel->query->num_rows . ' results.');\n\t\t\t\t\t}\n\n\t\t\t\t\t$channel->query->result\t= $channel->query->result_array();\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Trim IDs and build events\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t$new_ids = array();\n\n\t\t\t\t\tforeach ($channel->query->result as $k => $row)\n\t\t\t\t\t{\n\t\t\t\t\t\t$new_ids[$row['entry_id']] = $ids[$row['entry_id']];\n\t\t\t\t\t}\n\n\t\t\t\t\t$event_data = $this->data->fetch_all_event_data($new_ids);\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Turn these IDs into events\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t$events = array();\n\n\t\t\t\t\t//ee()->TMPL->log_item('Calendar:build_calendar() Beginning event creation process.');\n\n\t\t\t\t\tif ( ! class_exists('Calendar_event'))\n\t\t\t\t\t{\n\t\t\t\t\t\trequire_once CALENDAR_PATH.'calendar.event.php';\n\t\t\t\t\t}\n\n\t\t\t\t\t$calendars = array();\n\n\t\t\t\t\tforeach ($event_data as $k => $edata)\n\t\t\t\t\t{\n\t\t\t\t\t\t$temp = new Calendar_event(\n\t\t\t\t\t\t\t$edata,\n\t\t\t\t\t\t\t$this->P->params['date_range_start']['value'],\n\t\t\t\t\t\t\t$this->P->params['date_range_end']['value']\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tif ( ! empty($temp->dates))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$temp->prepare_for_output();\n\t\t\t\t\t\t\t$events[$edata['entry_id']] = $temp;\n\t\t\t\t\t\t\t$calendars[$events[$edata['entry_id']]->default_data['calendar_id']] = array();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t//ee()->TMPL->log_item('Calendar:build_calendar() Event creation resulted in the creation of ' . count( $events ) . ' events.');\n\n\t\t\t\t\t//ee()->TMPL->log_item('Calendar:build_calendar() Event creation process finished.');\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Leaving so soon?\n\t\t\t\t\t// There's no point in continuing if we're just interested\n\t\t\t\t\t// in whether or not there are events on this day.\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tif ($each_event == '')\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach (array_keys($events) as $id)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$entry_data[$id] = $id;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//ee()->TMPL->log_item('Calendar:build_calendar() Skipping further channel module processing because $each_event variable was empty string. ' . count( $entry_data ) . ' events were found and logged into the $entry_data array.');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Nor should we stay around if there's nothing to process\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\telseif (empty($calendars))\n\t\t\t\t\t{\n\t\t\t\t\t\t//ee()->TMPL->log_item('Calendar:build_calendar() Skipping further channel module processing because there were no calendars connected to the events found.');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Fetch information about the calendars\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t$calendars = $this->data->fetch_calendar_data_by_id(array_keys($calendars));\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Prepare the tagdata that will be parsed by the channel module\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t$blargle = '3138ad2081984be5dea40e593fd61f87';\n\t\t\t\t\t$bleegle = '6f8de301e6e6f2cd80ad99aa3a765b31';\n\t\t\t\t\t//ee()->TMPL->tagdata = $blargle . '[' . LD . \"entry_id\" . RD . ']' . $each_event . $bleegle;\n\t\t\t\t\tee()->TMPL->tagdata = $blargle .\n\t\t\t\t\t\t'[' . LD . \"entry_id\" . RD . ']' .\n\t\t\t\t\t\tee()->TMPL->tagdata .\n\t\t\t\t\t\t$bleegle;\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Prep variable aliases\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t$variables = array(\n\t\t\t\t\t\t'title'\t\t\t=> 'event_title',\n\t\t\t\t\t\t'url_title'\t\t=> 'event_url_title',\n\t\t\t\t\t\t'entry_id'\t\t=> 'event_id',\n\t\t\t\t\t\t'author_id'\t\t=> 'event_author_id',\n\t\t\t\t\t\t'author'\t\t=> 'event_author',\n\t\t\t\t\t\t'status'\t\t=> 'event_status'\n\t\t\t\t\t);\n\n\t\t\t\t\t//custom variables with the letters 'url' are borked in\n\t\t\t\t\t//EE 2.6. Bug reported, but this should fix.\n\t\t\t\t\t//https://support.ellislab.com/bugs/detail/19337\n\t\t\t\t\tif (version_compare($this->ee_version, '2.6.0', '>='))\n\t\t\t\t\t{\n\t\t\t\t\t\t$variables['url_title'] = 'event_borked_title';\n\n\t\t\t\t\t\tee()->TMPL->var_single['event_borked_title'] = 'event_borked_title';\n\n\t\t\t\t\t\tunset(ee()->TMPL->var_single['event_url_title']);\n\n\t\t\t\t\t\tee()->TMPL->tagdata = str_replace(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\tLD . 'event_url_title' . RD,\n\t\t\t\t\t\t\t\t'\"event_url_title\"',\n\t\t\t\t\t\t\t\t\"'event_url_title'\"\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\tLD . 'event_borked_title' . RD,\n\t\t\t\t\t\t\t\t'\"event_borked_title\"',\n\t\t\t\t\t\t\t\t\"'event_borked_title'\"\n\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tee()->TMPL->tagdata\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tee()->TMPL->var_single['event_calendar_borked_title'] = 'event_calendar_borked_title';\n\n\t\t\t\t\t\tunset(ee()->TMPL->var_single['event_calendar_url_title']);\n\n\t\t\t\t\t\tee()->TMPL->tagdata = str_replace(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\tLD . 'event_calendar_url_title' . RD,\n\t\t\t\t\t\t\t\t'\"event_calendar_url_title\"',\n\t\t\t\t\t\t\t\t\"'event_calendar_url_title'\"\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\tLD . 'event_calendar_borked_title' . RD,\n\t\t\t\t\t\t\t\t'\"event_calendar_borked_title\"',\n\t\t\t\t\t\t\t\t\"'event_calendar_borked_title'\"\n\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tee()->TMPL->tagdata\n\t\t\t\t\t\t);\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// --------------------------------------------\n\t\t\t\t\t// Typography\n\t\t\t\t\t// --------------------------------------------\n\n\t\t\t\t\tee()->load->library('typography');\n\t\t\t\t\tee()->typography->initialize();\n\t\t\t\t\tee()->typography->convert_curly = FALSE;\n\n\t\t\t\t\t$channel->fetch_categories();\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Add variables to the query result\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tforeach ($channel->query->result as $k => $row)\n\t\t\t\t\t{\n\t\t\t\t\t\t$entry_id = $row['entry_id'];\n\n\t\t\t\t\t\t$channel->query->result[$k]['author'] = ($row['screen_name'] != '') ? $row['screen_name'] : $row['username'];\n\n\t\t\t\t\t\t//ee()->TMPL->log_item('Calendar:build_calendar() We\\'re in the channel query result loop. Entry id is ' . $entry_id );\n\n\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t// Skip this result if the event data doesn't exist\n\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\tif (! isset($events[$ids[$entry_id]]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tunset($channel->query->result[$k]);\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$channel->query->result[$k]['edited_occurrence'] \t= FALSE;\n\t\t\t\t\t\t$channel->query->result[$k]['event_parent_id']\t\t= ($ids[$entry_id] == $entry_id) ? 0 : $ids[$entry_id];\n\n\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t// If this entry_id is not in the $events array, this is an edited occurrence\n\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\tif (! isset($events[$entry_id]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t// Add this info to the $events array\n\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t$events[$entry_id] = clone $events[$ids[$entry_id]];\n\n\t\t\t\t\t\t\t$channel->query->result[$k]['edited_occurrence'] = TRUE;\n\n\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t// Correct the info\n\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\tforeach ($events[$entry_id]->occurrences as $ymd => $times)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tforeach ($times as $time => $data)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ($data['entry_id'] != $entry_id)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tunset($events[$entry_id]->occurrences[$ymd][$time], $events[$entry_id]->dates[$ymd][$time]);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tunset($events[$data['event_id']]->occurrences[$ymd][$time], $events[$data['event_id']]->dates[$ymd][$time]);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// NOTE: Requires PHP >= 5.1.0\n\t\t\t\t\t\t\t$events[$entry_id]->dates = array_intersect_key($events[$entry_id]->dates, $events[$entry_id]->occurrences);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t// Alias\n\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\tforeach ($variables as $old => $new)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($old == 'title')\n\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t$channel->query->result[$k][$old]\t= ee()->typography->parse_type(\n\t\t\t\t\t\t\t\t\t$channel->query->result[$k][$old],\n\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t'text_format' \t=> 'lite',\n\t\t\t\t\t\t\t\t\t\t'html_format' \t=> 'none',\n\t\t\t\t\t\t\t\t\t\t'auto_links' \t=> 'n',\n\t\t\t\t\t\t\t\t\t\t'allow_img_url' => 'no'\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t$channel->query->result[$k][$new]\t= $channel->query->result[$k][$old];\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$channel->query->result[$k][$new]\t= $channel->query->result[$k][$old];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t// Calendar variables\n\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\tforeach ($calendars[$events[$entry_id]->default_data['calendar_id']] as $key => $val)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$channel->query->result[$k][$key] = $val;\n\n\t\t\t\t\t\t\tif ($key == 'calendar_url_title' AND\n\t\t\t\t\t\t\t\tversion_compare($this->ee_version, '2.6.0', '>='))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$channel->query->result[$k]['event_calendar_borked_title'] = $val;\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$channel->query->result[$k]['event_'.$key] = $val;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\t//\t----------------------------------------\n\t\t\t\t\t//\tRedeclare\n\t\t\t\t\t//\t----------------------------------------\n\t\t\t\t\t//\tWe will reassign the $channel->query->result with our\n\t\t\t\t\t//\treordered array of values. Thank you PHP for being so fast with array loops.\n\t\t\t\t\t//\t----------------------------------------\n\n\t\t\t\t\t$super_temp_fake = $channel->query->result_array = $channel->query->result;\n\n\t\t\t\t\t$channel->fetch_categories();\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Handle {title} and {event_title} differently\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tee()->TMPL->tagdata\t= str_replace(\n\t\t\t\t\t\tLD . 'title' . RD,\n\t\t\t\t\t\t'6c21bdf1bfdab13bc8df8fcfeb2763a6' . LD . 'entry_id' . RD,\n\t\t\t\t\t\tee()->TMPL->tagdata\n\t\t\t\t\t);\n\n\t\t\t\t\tee()->TMPL->tagdata\t= str_replace(\n\t\t\t\t\t\tLD . 'event_title' . RD,\n\t\t\t\t\t\t'6c21bdf1bfdab13bc8df8fcfeb2763a6' . LD . 'entry_id' . RD,\n\t\t\t\t\t\tee()->TMPL->tagdata\n\t\t\t\t\t);\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Remove \"ignore\" prefixes\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tee()->TMPL->tagdata = str_replace(\n\t\t\t\t\t\t'calendar_ignore_',\n\t\t\t\t\t\t'',\n\t\t\t\t\t\tee()->TMPL->tagdata\n\t\t\t\t\t);\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Parse Weblog stuff\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t//ee()->TMPL->log_item('Calendar: Parsing Weblog stuff');\n\n\t\t\t\t\t$channel->parse_channel_entries();\n\n\t\t\t\t\tforeach ($super_temp_fake as $k => $data)\n\t\t\t\t\t{\n\t\t\t\t\t\t$channel->return_data = str_replace(\n\t\t\t\t\t\t\t'6c21bdf1bfdab13bc8df8fcfeb2763a6' . $data['entry_id'],\n\t\t\t\t\t\t\t$super_temp_fake[$k]['title'],\n\t\t\t\t\t\t\t$channel->return_data\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Related entries\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t//ee()->TMPL->log_item('Calendar: Parsing related entries');\n\n\t\t\t\t\tif (version_compare($this->ee_version, '2.6.0', '<'))\n\t\t\t\t\t{\n\t\t\t\t\t\tif (count(ee()->TMPL->related_data) > 0 AND\n\t\t\t\t\t\t\tcount($channel->related_entries) > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$channel->parse_related_entries();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (count(ee()->TMPL->reverse_related_data) > 0 AND\n\t\t\t\t\t\t\tcount($channel->reverse_related_entries) > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$channel->parse_reverse_related_entries();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Collect the parsed data for use later\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tpreg_match_all('/' . $blargle . '\\[(\\d+)\\](.*?)' . $bleegle . '/s', $channel->return_data, $matches);\n\t\t\t\t\tforeach ($matches[0] as $k => $match)\n\t\t\t\t\t{\n\t\t\t\t\t\t$entry_data[$matches[1][$k]] = $matches[2][$k];\n\t\t\t\t\t}\n\n\t\t\t\t\tunset($channel);\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Stop the insanity!\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//ee()->TMPL->log_item('Calendar:build_calendar() Channel module stuff done');\n\n\t\t// -------------------------------------\n\t\t// Build the calendar\n\t\t// -------------------------------------\n\n\t\t//ee()->TMPL->log_item('Calendar: Starting to build the calendar');\n\n\t\t$start_year\t\t= $start['year'];\n\t\t$start_month\t= $start['month'];\n\t\t$start_day\t\t= $start['day'];\n\t\t$end_year\t\t= $end['year'];\n\t\t$end_month\t\t= $end['month'];\n\t\t$end_day\t\t= $end['day'];\n\t\t$w\t\t\t\t= 0;\n\n\t\t$this->CDT->reset();\n\n\t\tif ($this->P->value('pad_short_weeks') === TRUE)\n\t\t{\n\t\t\t$week_counter = 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$week_counter = ($this->CDT->day_of_week >= $this->first_day_of_week) ?\n\t\t\t\t\t\t\t\t$this->CDT->day_of_week - $this->first_day_of_week :\n\t\t\t\t\t\t\t\t7 + $this->CDT->day_of_week - $this->first_day_of_week;\n\t\t}\n\n\t\t$output = '';\n\t\t$week_temp = $month_temp = $year_temp = '';\n\t\t$day_count = 0;\n\n\t\t$next_CDT = $prev_CDT = $start;\n\n\t\t$all_day = array();\n\t\t$event_array = array();\n\n\t\t// -------------------------------------\n\t\t// Prepare the events\n\t\t// -------------------------------------\n\n\t\t//ee()->TMPL->log_item('Calendar: Preparing events');\n\n\t\tforeach ($events as $id => $event)\n\t\t{\n\t\t\t//prevent missing entry data from attempting to display and causing errors\n\t\t\tif ( ! isset($entry_data[$event->default_data['entry_id']]))\n\t\t\t{\n\t\t\t\tunset($events[$id]);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (empty($event->dates))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tforeach ($event->dates as $ymd => $items)\n\t\t\t{\n\t\t\t\tforeach ($items as $time => $ddata)\n\t\t\t\t{\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// It was over before it started\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tif ($ddata['end_date']['ymd'].$ddata['end_date']['time'] <\n\t\t\t\t\t\t$this->P->value('date_range_start', 'ymd') .\n\t\t\t\t\t\t$this->P->value('date_range_start', 'time'))\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// -------------------------------------\n\t\t\t\t\t// ...or the inverse\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tif ($ddata['date']['ymd'].$ddata['date']['time'] >\n\t\t\t\t\t\t $this->P->value('date_range_end', 'ymd') .\n\t\t\t\t\t\t $this->P->value('time_range_end', 'time'))\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// -------------------------------------\n\t\t\t\t\t// If the start date of the event is less than the first\n\t\t\t\t\t// day of the calendar, we've got ourselves a hangover.\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tif ($ddata['date']['ymd'] < $this->P->value('date_range_start', 'ymd'))\n\t\t\t\t\t{\n\t\t\t\t\t\t$event_array[$this->P->value('date_range_start', 'ymd')]['all_day'][$id]\t= $id;\n\t\t\t\t\t\t$events[$id]->dates[$this->P->value('date_range_start', 'ymd')]\t\t\t\t= $events[$id]->dates[$ymd];\n\t\t\t\t\t}\n\t\t\t\t\telseif ($ddata['all_day'] === TRUE)\n\t\t\t\t\t{\n\t\t\t\t\t\t$event_array[$ymd]['all_day'][$id] = $id;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($ddata['multi_day'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$event_array[$ymd]['all_day'][$id] = $id;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$start_hour\t= str_pad($ddata['date']['hour'], 2, 0, STR_PAD_LEFT);\n\t\t\t\t\t\t\t$start_min\t= str_pad($ddata['date']['minute'], 2, 0, STR_PAD_LEFT);\n\t\t\t\t\t\t\t$end_hour\t= str_pad($ddata['end_date']['hour'], 2, 0, STR_PAD_LEFT);\n\t\t\t\t\t\t\t$end_min\t= str_pad($ddata['end_date']['minute'], 2, 0, STR_PAD_LEFT);\n\t\t\t\t\t\t\t$event_array[$ymd][$start_hour][$start_min][$end_hour][$end_min][$id] = $id;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\n\n\t\t\t// -------------------------------------\n\t\t\t// Aliases\n\t\t\t// -------------------------------------\n\n\t\t\t$events[$id]->default_data['first_date']\t= $events[$id]->default_data['start_date'];\n\t\t}\n\n\t\t$this->CDT->reset();\n\n\t\t// -------------------------------------\n\t\t// Prune the event array, if there's an event limit.\n\t\t// NOTE: apply_event_limit() also sorts the array for us.\n\t\t// -------------------------------------\n\n\t\t//--------------------------------------------\n\t\t//\tcount all events for tag and pagination\n\t\t//--------------------------------------------\n\n\t\t$this->event_timeframe_total = $this->count_event_results($event_array);\n\n\t\t//--------------------------------------------\n\t\t//\tpagination\n\t\t//--------------------------------------------\n\n\t\t$this->paginate = FALSE;\n\n\t\tif ($this->P->value('event_limit') > 0 AND\n\t\t\t$this->event_timeframe_total > $this->P->value('event_limit'))\n\t\t{\n\t\t\t//get pagination info\n\t\t\t$pagination_data = $this->universal_pagination(array(\n\t\t\t\t'total_results'\t\t\t=> $this->event_timeframe_total,\n\t\t\t\t//had to remove this jazz before so it didn't get iterated over\n\t\t\t\t'tagdata'\t\t\t\t=> $tagdata . $this->paginate_tagpair_data,\n\t\t\t\t'limit'\t\t\t\t\t=> $this->P->value('event_limit'),\n\t\t\t\t'uri_string'\t\t\t=> ee()->uri->uri_string,\n\t\t\t\t'paginate_prefix'\t\t=> 'calendar_'\n\t\t\t));\n\n\t\t\t// -------------------------------------------\n\t\t\t// 'calendar_events_create_pagination' hook.\n\t\t\t// - Let devs maniuplate the pagination display\n\n\t\t\tif (ee()->extensions->active_hook('calendar_build_calendar_create_pagination') === TRUE)\n\t\t\t{\n\t\t\t\t$pagination_data = ee()->extensions->call(\n\t\t\t\t\t'calendar_build_calendar_create_pagination',\n\t\t\t\t\t$this,\n\t\t\t\t\t$pagination_data\n\t\t\t\t);\n\t\t\t}\n\t\t\t//\n\t\t\t// -------------------------------------------\n\n\t\t\t//if we paginated, sort the data\n\t\t\tif ($pagination_data['paginate'] === TRUE)\n\t\t\t{\n\t\t\t\t$this->paginate\t\t\t= $pagination_data['paginate'];\n\t\t\t\t$this->page_next\t\t= $pagination_data['page_next'];\n\t\t\t\t$this->page_previous\t= $pagination_data['page_previous'];\n\t\t\t\t$this->p_page\t\t\t= $pagination_data['pagination_page'];\n\t\t\t\t$this->current_page \t= $pagination_data['current_page'];\n\t\t\t\t$this->pager \t\t\t= $pagination_data['pagination_links'];\n\t\t\t\t$this->basepath\t\t\t= $pagination_data['base_url'];\n\t\t\t\t$this->total_pages\t\t= $pagination_data['total_pages'];\n\t\t\t\t$this->paginate_data\t= $pagination_data['paginate_tagpair_data'];\n\t\t\t\t$this->page_count\t\t= $pagination_data['page_count'];\n\t\t\t\t//$tagdata\t\t\t\t= $pagination_data['tagdata'];\n\t\t\t}\n\t\t}\n\n\t\t//--------------------------------------------\n\t\t//\tevent limiter\n\t\t//--------------------------------------------\n\n\t\t$offset = (\n\t\t\tee()->TMPL->fetch_param('event_offset') ?\n\t\t\t\tee()->TMPL->fetch_param('event_offset') :\n\t\t\t\t0\n\t\t);\n\n\t\t$page \t= (($this->current_page -1) * $this->P->value('event_limit'));\n\n\t\tif ($page > 0)\n\t\t{\n\t\t\t$offset += $page;\n\t\t}\n\n\t\t$event_array = $this->apply_event_limit(\n\t\t\t$event_array,\n\t\t\t$this->P->value('event_limit'),\n\t\t\t$offset\n\t\t);\n\n\t\t// -------------------------------------\n\t\t// Loopage\n\t\t// -------------------------------------\n\n\t\t//ee()->TMPL->log_item('Calendar: Beginning date loops');\n\n\t\t$week_event_count\t= 0;\n\t\t$event_count\t\t= 0;\n\t\t$year_tick\t\t\t= 0;\n\t\t$month_tick\t\t\t= 0;\n\n\t\tfor ($y = $start_year; $y <= $end_year; $y++)\n\t\t{\n\t\t\t$year_event_count = 0;\n\n\t\t\t//blank out\n\t\t\t$this->counted['year'] = array();\n\n\t\t\t$mx = ($y == $start_year) ? $start_month : 1;\n\t\t\t$my = ($y == $end_year) ? $end_month : 12;\n\n\t\t\t$year_ymd_cache = $this->CDT->ymd;\n\n\n\t\t\tfor ($m = $mx; $m <= $my; $m++)\n\t\t\t{\n\t\t\t\t$month_ymd_cache \t= $this->CDT->ymd;\n\n\n\t\t\t\t$month_event_count = 0;\n\n\t\t\t\t//blank out\n\t\t\t\t$this->counted['month'] = array();\n\n\t\t\t\t$dx = ($y == $start_year AND $m == $start_month) ?\n\t\t\t\t\t\t$start_day :\n\t\t\t\t\t\t1;\n\n\t\t\t\t$dy = ($y == $end_year AND $m == $end_month) ?\n\t\t\t\t\t\t$end_day :\n\t\t\t\t\t\t$this->CDT->days_in_month($m, $y);\n\n\t\t\t\tfor ($d = $dx; $d <= $dy; $d++)\n\t\t\t\t{\n\t\t\t\t\t$day_ymd_cache \t= $this->CDT->ymd;\n\t\t\t\t\t$day_tick\t\t= 0;\n\n\t\t\t\t\t$this->CDT->change_date($y, $m, $d);\n\t\t\t\t\t$this->CDT->set_default($this->CDT->date_array());\n\n\t\t\t\t\t$ymd = $this->CDT->ymd;\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Prepare counts and totals, also\n\t\t\t\t\t// altered later in the loop in some cases\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t$day_event_count = 0;\n\t\t\t\t\t$day_event_total = 0;\n\n\t\t\t\t\t//blank out\n\t\t\t\t\t$this->counted['day'] = array();\n\n\t\t\t\t\tif (! isset($event_array[$ymd])) $event_array[$ymd] = array();\n\n\t\t\t\t\t$day_event_total\t= $this->count_events(\n\t\t\t\t\t\t$ymd,\n\t\t\t\t\t\t$event_array,\n\t\t\t\t\t\t$all_day,\n\t\t\t\t\t\t'day',\n\t\t\t\t\t\t$events\n\t\t\t\t\t);\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Start events for the day\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t//ee()->TMPL->log_item('Calendar: Beginning ' . $ymd . count( $event_array[$ymd] ) . ' events for this day.');\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// This looks a little goofy, but it\n\t\t\t\t\t// prevents extra years/months\n\t\t\t\t\t// showing up thanks to padded weeks\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t$day_count++;\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Week stuff\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tif ($week_counter % 7 == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t//blank out\n\t\t\t\t\t\t$this->counted['week'] = array();\n\n\t\t\t\t\t\t$w = str_pad($this->CDT->week_number, 2, 0, STR_PAD_LEFT);\n\t\t\t\t\t}\n\n\t\t\t\t\t$week_counter++;\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// \"next\" stuff\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t$next_y = ($m == 12 AND $d == 31) ? $y+1 : $y;\n\t\t\t\t\t$next_m = ($d == $this->CDT->days_in_month()) ? $m + 1 : $m;\n\t\t\t\t\t$next_w = ($week_counter % 7 == 0) ? $w + 1 : $w;\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Yodelers of Mass Destruction\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t$find\t\t\t= '';\n\t\t\t\t\t$replace\t\t= '';\n\t\t\t\t\t$hour_events\t= array();\n\t\t\t\t\t$last_day\t\t= (\n\t\t\t\t\t\t$y == $end_year AND\n\t\t\t\t\t\t$m == $end_month AND\n\t\t\t\t\t\t$d == $end_day\n\t\t\t\t\t) ? TRUE : FALSE;\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Remove \"all day\" stragglers\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tforeach ($all_day as $i => $stuff)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($ymd > $stuff['end_ymd'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tunset($all_day[$i]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Each event\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// \t$each_event contains the formatting\n\t\t\t\t\t// \tto use for displaying the contents\n\t\t\t\t\t// \tof an event on a given day in the calendar.\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tif ($each_event != '')\n\t\t\t\t\t{\n\t\t\t\t\t\t$event_output = '';\n\n\t\t\t\t\t\tif ( ! empty($event_array[$ymd]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach ($event_array[$ymd] as $start_hour => $sh_data)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$hour_event_count\t= 0;\n\t\t\t\t\t\t\t\t$hour_event_total\t= count($sh_data);\n\n\t\t\t\t\t\t\t\tif ($start_hour == 'all_day')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$prev_index = 0;\n\t\t\t\t\t\t\t\t\t$index = 0;\n\n\t\t\t\t\t\t\t\t\tforeach ($sh_data as $i => $id)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t\t\t\t// Multi-day events get one time key, regular\n\t\t\t\t\t\t\t\t\t\t// all day events get another\n\t\t\t\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t\t\t\t$time_key = '00002400';\n\n\t\t\t\t\t\t\t\t\t\tif ( ! isset( $events[$id]->dates[$ymd][$time_key]))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t//so in some rare situations this\n\t\t\t\t\t\t\t\t\t\t\t//can come to us without being reset?\n\t\t\t\t\t\t\t\t\t\t\t//I hate moving pointers :p\n\t\t\t\t\t\t\t\t\t\t\treset($events[$id]->dates[$ymd]);\n\n\t\t\t\t\t\t\t\t\t\t\t$time_key = key($events[$id]->dates[$ymd]);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t$event_count++;\n\t\t\t\t\t\t\t\t\t\t$year_event_count++;\n\t\t\t\t\t\t\t\t\t\t$month_event_count++;\n\t\t\t\t\t\t\t\t\t\t$week_event_count++;\n\t\t\t\t\t\t\t\t\t\t$day_event_count++;\n\t\t\t\t\t\t\t\t\t\t$hour_event_count++;\n\n\t\t\t\t\t\t\t\t\t\t$vars = $this->get_occurrence_vars($id, $events[$id], $ymd, $time_key);\n\n\t\t\t\t\t\t\t\t\t\t$vars['conditional']['event_all_day']\t= TRUE;\n\n\t\t\t\t\t\t\t\t\t\t$vars['single']\t+= array(\n\t\t\t\t\t\t\t\t\t\t\t'event_count'\t\t\t\t=> $this->create_count_hash('event_count'),\n\t\t\t\t\t\t\t\t\t\t\t'year_event_count'\t\t\t=> $this->create_count_hash('year_event_count'),\n\t\t\t\t\t\t\t\t\t\t\t'month_event_count'\t\t\t=> $this->create_count_hash('month_event_count'),\n\t\t\t\t\t\t\t\t\t\t\t'week_event_count'\t\t\t=> $this->create_count_hash('week_event_count'),\n\t\t\t\t\t\t\t\t\t\t\t'day_event_count'\t\t\t=> $this->create_count_hash('day_event_count'),\n\t\t\t\t\t\t\t\t\t\t\t'hour_event_count'\t\t\t=> $this->create_count_hash('hour_event_count'),\n\t\t\t\t\t\t\t\t\t\t\t'all_day_event_index_difference' => $index - $prev_index,\n\t\t\t\t\t\t\t\t\t\t\t'all_day_event_index'\t\t=> $index++,\n\n\t\t\t\t\t\t\t\t\t\t\t'event_duration_minutes'\t=> (isset($events[$id]->dates[$ymd][$time_key])) ?\n\t\t\t\t\t\t\t\t\t\t\t\t\t$events[$id]->dates[$ymd][$time_key]['duration']['minutes'] :\n\t\t\t\t\t\t\t\t\t\t\t\t\t$events[$id]->default_data['duration']['minutes'],\n\n\t\t\t\t\t\t\t\t\t\t\t'event_duration_hours'\t\t=> (isset($events[$id]->dates[$ymd][$time_key])) ?\n\t\t\t\t\t\t\t\t\t\t\t\t\t$events[$id]->dates[$ymd][$time_key]['duration']['hours'] :\n\t\t\t\t\t\t\t\t\t\t\t\t\t$events[$id]->default_data['duration']['hours'],\n\n\t\t\t\t\t\t\t\t\t\t\t'event_duration_days'\t\t=> (isset($events[$id]->dates[$ymd][$time_key])) ?\n\t\t\t\t\t\t\t\t\t\t\t\t\t$events[$id]->dates[$ymd][$time_key]['duration']['days'] :\n\t\t\t\t\t\t\t\t\t\t\t\t\t$events[$id]->default_data['duration']['days']\n\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t//we have to remove conditionals for these items as well\n\t\t\t\t\t\t\t\t\t\t//because the dummy hashes screw with them\n\t\t\t\t\t\t\t\t\t\t$output_data = $this->remove_post_parse_conditionals(array(\n\t\t\t\t\t\t\t\t\t\t\t'event_count'\t=> $vars['single']['event_count'],\n\t\t\t\t\t\t\t\t\t\t\t'year_event_count'\t\t=> $vars['single']['year_event_count'],\n\t\t\t\t\t\t\t\t\t\t\t'month_event_count' \t=> $vars['single']['month_event_count'],\n\t\t\t\t\t\t\t\t\t\t\t'week_event_count'\t\t=> $vars['single']['week_event_count'],\n\t\t\t\t\t\t\t\t\t\t\t'day_event_count'\t\t=> $vars['single']['day_event_count'],\n\t\t\t\t\t\t\t\t\t\t\t'hour_event_count'\t\t=> $vars['single']['hour_event_count']\n\t\t\t\t\t\t\t\t\t\t), $entry_data[$id]);\n\n\t\t\t\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t\t\t\t// If we're outputting at the event level, then we have\n\t\t\t\t\t\t\t\t\t\t// to spit out the all day stuff here.\n\t\t\t\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t\t\t\tif ($output_at == 'event')\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$event_output .= $this->swap_vars($vars, $output_data);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t//shortcut\n\t\t\t\t\t\t\t\t\t\t$evtk =& $events[$id]->dates[$ymd][$time_key];\n\n\t\t\t\t\t\t\t\t\t\t$array = array(\n\t\t\t\t\t\t\t\t\t\t\t'output'\t\t\t\t\t=> $output_data,\n\t\t\t\t\t\t\t\t\t\t\t'vars'\t\t\t\t\t\t=> $vars,\n\t\t\t\t\t\t\t\t\t\t\t'first_day'\t\t\t\t\t=> $evtk['date']['ymd'],\n\t\t\t\t\t\t\t\t\t\t\t'last_day'\t\t\t\t\t=> $evtk['end_date']['ymd'],\n\t\t\t\t\t\t\t\t\t\t\t'start_ymd'\t\t\t\t\t=> $evtk['date']['ymd'],\n\t\t\t\t\t\t\t\t\t\t\t'end_ymd'\t\t\t\t\t=> $evtk['end_date']['ymd'],\n\t\t\t\t\t\t\t\t\t\t\t'time'\t\t\t\t\t\t=> $time_key,\n\t\t\t\t\t\t\t\t\t\t\t'id'\t\t\t\t\t\t=> $id,\n\t\t\t\t\t\t\t\t\t\t\t'event_duration_minutes'\t=> $evtk['duration']['minutes'],\n\t\t\t\t\t\t\t\t\t\t\t'event_duration_hours'\t\t=> $evtk['duration']['hours'],\n\t\t\t\t\t\t\t\t\t\t\t'event_duration_days'\t\t=> $evtk['duration']['days']\n\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t//unset($event_array[$ymd]['all_day'][$id]);\n\n\t\t\t\t\t\t\t\t\t\t$count\t\t= (empty($all_day)) ? 0 : max(array_keys($all_day));\n\t\t\t\t\t\t\t\t\t\t$inserted\t= FALSE;\n\t\t\t\t\t\t\t\t\t\t$prev_index\t= $index + 1;\n\n\t\t\t\t\t\t\t\t\t\tif (! in_array($array, $all_day))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tfor ($i = 0; $i <= $count; $i++)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t\t\t\t\t\t// Find a spot for this event\n\t\t\t\t\t\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t\t\t\t\t\tif (! isset($all_day[$i]))\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t$all_day[$i] = $array;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$inserted = TRUE;\n\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\tif ($inserted === FALSE)\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$all_day[$i] = $array;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tksort($all_day);\n\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif ($each_hour != '')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$hour_events[$start_hour] = $sh_data;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tforeach ($sh_data as $start_minute => $sm_data)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tforeach ($sm_data as $end_hour => $eh_data)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tforeach ($eh_data as $end_minute => $event_ids)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tforeach ($event_ids as $id)\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (isset($entry_data[$id]))\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$start_hour\t= str_pad($start_hour, 2, 0, STR_PAD_LEFT);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$start_min\t= str_pad($start_min, 2, 0, STR_PAD_LEFT);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$end_hour\t= str_pad($end_hour, 2, 0, STR_PAD_LEFT);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$end_min\t= str_pad($end_min, 2, 0, STR_PAD_LEFT);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$time_key = $start_hour.$start_minute.$end_hour.$end_minute;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ( ! isset($events[$id]->dates[$ymd][$time_key]))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$event_count++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$year_event_count++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$month_event_count++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$week_event_count++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$day_event_count++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$hour_event_count++;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$vars = $this->get_occurrence_vars(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$events[$id],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$ymd,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$start_hour . $start_minute . $end_hour . $end_minute\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['event_duration_minutes']\t= $events[$id]->dates[$ymd][$time_key]['duration']['minutes'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['event_duration_hours']\t\t= $events[$id]->dates[$ymd][$time_key]['duration']['hours'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['event_duration_days']\t\t= $events[$id]->dates[$ymd][$time_key]['duration']['days'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['event_count']\t\t\t\t= $this->create_count_hash('event_count');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['year_event_count']\t\t\t= $this->create_count_hash('year_event_count');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['month_event_count']\t\t= $this->create_count_hash('month_event_count');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['week_event_count']\t\t\t= $this->create_count_hash('week_event_count');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['day_event_count']\t\t\t= $this->create_count_hash('day_event_count');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['hour_event_count']\t\t\t= $this->create_count_hash('hour_event_count');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['day_event_total']\t\t\t= $day_event_total;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['hour_event_total']\t\t\t= $hour_event_total;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['all_day_event_index']\t\t= 0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['all_day_event_index_difference'] = 0;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//we have to remove conditionals for these items as well\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//because the dummy hashes screw with them\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$output_data = $this->remove_post_parse_conditionals(array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'event_count'\t\t\t=> $vars['single']['event_count'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'year_event_count'\t\t=> $vars['single']['year_event_count'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'month_event_count'\t\t=> $vars['single']['month_event_count'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'week_event_count'\t\t=> $vars['single']['week_event_count'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'day_event_count'\t\t=> $vars['single']['day_event_count'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'hour_event_count'\t\t=> $vars['single']['hour_event_count']\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t), $entry_data[$id]);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$event_output .= $this->swap_vars($vars, $output_data);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t//parse day event counts\n\t\t\t\t\t\t\t$event_output = $this->parse_count_hashes('hour_event_count', $event_output);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$find = $hash_event;\n\t\t\t\t\t\t$replace = $event_output;\n\n\t\t\t\t\t\tif ($output_at == 'event')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$output .= $replace;\n\t\t\t\t\t\t\t$replace = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// If $each_event is empty, $all_day never gets filled. Let's fix that.\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tif ($each_event == '' AND isset($event_array[$ymd]['all_day']))\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ($event_array[$ymd]['all_day'] as $id)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$time_key\t\t\t= (! isset( $events[$id]->dates[$ymd]['00002400'])) ?\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey($events[$id]->dates[$ymd]) :\n\t\t\t\t\t\t\t\t\t\t\t\t\t'00002400';\n\n\t\t\t\t\t\t\t$data['end_ymd']\t= $events[$id]->dates[$ymd][$time_key]['end_date']['ymd'];\n\n\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t// This stuff can be gibberish since it'll never show, but we\n\t\t\t\t\t\t\t// provide it because other parts of the code expect it to exist\n\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t$data['time']\t\t= '';\n\t\t\t\t\t\t\t$data['vars']\t\t= array();\n\t\t\t\t\t\t\t$data['first_day']\t= FALSE;\n\t\t\t\t\t\t\t$data['last_day']\t= FALSE;\n\t\t\t\t\t\t\t$data['output']\t\t= '';\n\n\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t// Add the all day event\n\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t$all_day[]\t\t\t= $data;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$all_day_event_total\t= count($all_day);\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// \"All day\" output\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t$all_day_output = '';\n\n\t\t\t\t\tif ( ! empty($all_day))\n\t\t\t\t\t{\n\t\t\t\t\t\t$prev_index = 0;\n\t\t\t\t\t\t$hour_event_count = 0;\n\n\t\t\t\t\t\tforeach ($all_day as $all_day_data)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$time_key\t= $all_day_data['time'];\n\t\t\t\t\t\t\t$vars\t\t= $all_day_data['vars'];\n\t\t\t\t\t\t\t$vars['single']['event_first_day']\t= ($ymd == $all_day_data['first_day']) ? TRUE : FALSE;\n\t\t\t\t\t\t\t$vars['single']['event_last_day']\t= ($ymd == $all_day_data['last_day']) ? TRUE : FALSE;\n\n\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t// Process all day variables\n\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t$all_day_output\t.= $this->swap_vars($vars, $all_day_data['output']);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this->CDT->reset();\n\t\t\t\t\t}\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Each hour\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tif ($each_hour != '')\n\t\t\t\t\t{\n\t\t\t\t\t\t$hour_output = '';\n\t\t\t\t\t\t$hour_temp = '';\n\n\t\t\t\t\t\tif ($all_day_output != '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$hour_output = $all_day_output;\n\t\t\t\t\t\t\t$all_day_output = '';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfor ($i = 0; $i < 24; $i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$hour_temp\t\t\t= '';\n\t\t\t\t\t\t\t$hour_count\t\t\t= 0;\n\t\t\t\t\t\t\t$hour_event_count\t= 0;\n\t\t\t\t\t\t\t$h\t\t\t\t\t= str_pad($i, 2, '0', STR_PAD_LEFT);\n\t\t\t\t\t\t\t//$this->cdt_format_date_string($this->CDT->datetime_array(), 'H');\n\t\t\t\t\t\t\t$minute\t\t\t\t= '00';\n\t\t\t\t\t\t\t//$this->cdt_format_date_string($this->CDT->datetime_array(), 'i');\n\n\t\t\t\t\t\t\tif (isset($hour_events[$h]))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tforeach ($hour_events[$h] as $start_minute => $sm_data)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tforeach ($sm_data as $end_hour => $eh_data)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tforeach ($eh_data as $end_minute => $event_ids)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$hour_count += count($event_ids);\n\n\t\t\t\t\t\t\t\t\t\t\tforeach ($event_ids as $id)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif (isset($entry_data[$id]))\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t$event_count++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$year_event_count++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$month_event_count++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$week_event_count++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$day_event_count++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$hour_event_count++;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t$vars = $this->get_occurrence_vars(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$events[$id],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$ymd,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$h . $start_minute . $end_hour . $end_minute\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['event_count']\t\t\t= $this->create_count_hash('event_count');\n\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['hour_event_count']\t\t= $this->create_count_hash('hour_event_count');\n\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['year_event_count']\t\t= $this->create_count_hash('year_event_count');\n\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['month_event_count']\t= $this->create_count_hash('month_event_count');\n\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['week_event_count']\t\t= $this->create_count_hash('week_event_count');\n\t\t\t\t\t\t\t\t\t\t\t\t\t$vars['single']['day_event_count']\t\t= $this->create_count_hash('day_event_count');\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t//we have to remove conditionals for these items as well\n\t\t\t\t\t\t\t\t\t\t\t\t\t//because the dummy hashes screw with them\n\t\t\t\t\t\t\t\t\t\t\t\t\t$output_data = $this->remove_post_parse_conditionals(array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'event_count'\t\t\t=> $vars['single']['event_count'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'year_event_count'\t\t=> $vars['single']['year_event_count'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'month_event_count'\t\t=> $vars['single']['month_event_count'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'week_event_count'\t\t=> $vars['single']['week_event_count'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'day_event_count'\t\t=> $vars['single']['day_event_count'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'hour_event_count'\t\t=> $vars['single']['hour_event_count']\n\t\t\t\t\t\t\t\t\t\t\t\t\t), $entry_data[$id]);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t$hour_temp .= $this->swap_vars($vars, $output_data);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$hour_temp = str_replace($find, $hour_temp, $each_hour);\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$hour_temp = str_replace($find, $replace, $each_hour);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$vars = array();\n\t\t\t\t\t\t\t$total_events = $hour_count;\n\t\t\t\t\t\t\t$this->CDT->change_time($i, 0);\n\n\t\t\t\t\t\t\t$vars['date'] = array(\n\t\t\t\t\t\t\t\t'time'\t\t=> $this->CDT->datetime_array(),\n\t\t\t\t\t\t\t\t'date'\t\t=> $this->CDT->datetime_array()\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t$vars['single'] = array(\n\t\t\t\t\t\t\t\t'hour'\t\t\t\t=> $h,\n\t\t\t\t\t\t\t\t'minute'\t\t\t=> $minute,\n\t\t\t\t\t\t\t\t'time'\t\t\t\t=> $h.':'.$minute,\n\t\t\t\t\t\t\t\t'hour_event_total' \t=> $total_events\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t$hour_output .= $this->swap_vars($vars, $hour_temp);\n\n\t\t\t\t\t\t\t//parse day event counts\n\t\t\t\t\t\t\t$hour_output = $this->parse_count_hashes('hour_event_count', $hour_output);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$find = $hash_hour;\n\t\t\t\t\t\t$replace = $hour_output;\n\n\t\t\t\t\t\tif ($output_at == 'hour')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$output .= $replace;\n\t\t\t\t\t\t\t$replace = '';\n\n\t\t\t\t\t\t\t//ee()->TMPL->log_item('Calendar: Outputting hour data for '.$ymd);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Each day\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t//var_dump($this->CDT->ymd . ' OUTSIDE DAY');\n\n\t\t\t\t\tif ($each_day != '')\n\t\t\t\t\t{\n\t\t\t\t\t\t$prefix = $suffix = '';\n\n\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t// Prep day variables\n\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\tif ($all_day_output != '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$replace = $all_day_output . $replace;\n\t\t\t\t\t\t\t$all_day_output = '';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//var_dump($this->CDT->ymd . ' DAY');\n\n\t\t\t\t\t\t$day_output = str_replace($find, $replace, $each_day);\n\n\t\t\t\t\t\t$next_CDT = $this->CDT->add_day(1);\n\t\t\t\t\t\t$prev_CDT = $this->CDT->add_day(-2);\n\t\t\t\t\t\t$this->CDT->reset();\n\n\t\t\t\t\t\t//var_dump($this->CDT->ymd . ' DAY 2');\n\n\t\t\t\t\t\t$vars = array();\n\n\t\t\t\t\t\t$vars['conditional'] = array(\n\t\t\t\t\t\t\t'day_is_today'\t\t\t=> ($today_ymd == $ymd) ? TRUE : FALSE,\n\t\t\t\t\t\t\t'day_is_weekend'\t\t=> ($this->CDT->day_of_week == 0 OR\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->CDT->day_of_week == 6) ? TRUE : FALSE,\n\t\t\t\t\t\t\t'day_is_weekday'\t\t=> ($this->CDT->day_of_week == 0 OR\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->CDT->day_of_week == 6) ? FALSE : TRUE,\n\t\t\t\t\t\t\t'day_in_current_month'\t=> ($this->CDT->month == $current_period_start['month']) ? TRUE : FALSE,\n\t\t\t\t\t\t\t'day_in_previous_month'\t=> ($this->CDT->month < $current_period_start['month'] OR\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->CDT->year < $current_period_start['year']) ? TRUE : FALSE,\n\t\t\t\t\t\t\t'day_in_next_month'\t\t=> ($this->CDT->month > $current_period_start['month'] OR\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->CDT->year > $current_period_start['year']) ? TRUE : FALSE\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t$vars['single'] = array(\n\t\t\t\t\t\t\t'day'\t\t\t\t\t=> $d,\n\t\t\t\t\t\t\t'prev_day'\t\t\t\t=> $prev_CDT['day'],\n\t\t\t\t\t\t\t'next_day'\t\t\t\t=> $next_CDT['day'],\n\t\t\t\t\t\t\t'day_event_total'\t\t=> $day_event_total,\n\t\t\t\t\t\t\t'all_day_event_total'\t=> $all_day_event_total\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t$vars['date'] = array(\n\t\t\t\t\t\t\t'day' \t\t=> $this->CDT->datetime_array(),\n\t\t\t\t\t\t\t'date'\t\t=> $this->CDT->datetime_array(),\n\t\t\t\t\t\t\t'prev_day' \t=> $prev_CDT,\n\t\t\t\t\t\t\t'next_day'\t=> $next_CDT\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t$day_output = $this->parse_count_hashes('day_event_count', $this->swap_vars($vars, $day_output));\n\n\n\t\t\t\t\t\t$find = $hash_day;\n\t\t\t\t\t\t$replace = $prefix.$day_output.$suffix;\n\n\t\t\t\t\t\tif ($output_at == 'day')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$output .= $replace;\n\t\t\t\t\t\t\t$replace = '';\n//ee()->TMPL->log_item('Calendar: Outputting day data for '.$ymd);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$this->CDT->reset();\n\n\t\t\t\t\t\t//var_dump($this->CDT->ymd . ' DAY 3');\n\t\t\t\t\t}\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Each week\n\t\t\t\t\t// -------------------------------------\n\n//var_dump($this->CDT->ymd . ' OUTSIDE WEEK');\n\n\t\t\t\t\tif ($each_week != '')\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($all_day_output != '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$replace = $all_day_output . $replace;\n\t\t\t\t\t\t\t$all_day_output = '';\n\t\t\t\t\t\t\tif ($each_day == '')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$all_day = array();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ($w != $next_w OR\n\t\t\t\t\t\t\t($each_month != '' AND\n\t\t\t\t\t\t\t\t(($m != $next_m OR $last_day === TRUE) AND\n\t\t\t\t\t\t\t\t\t($ymd >= $current_period_start['ymd'] AND\n\t\t\t\t\t\t\t\t\t\t(\t($last_day === TRUE AND $ymd == $current_period_end['ymd']) OR\n\t\t\t\t\t\t\t\t\t\t($ymd != $current_period_end['ymd']))))) OR\n\t\t\t\t\t\t\t$last_day === TRUE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//var_dump($this->CDT->ymd . ' WEEK');\n\n\t\t\t\t\t\t\t$week_temp .= $replace;\n\t\t\t\t\t\t\t$week_output = str_replace($find, $week_temp, $each_week);\n\n\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t// Prep week variables\n\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t$offset = ($this->CDT->day_of_week > $this->first_day_of_week) ?\n\t\t\t\t\t\t\t\t\t\t$this->CDT->day_of_week - $this->first_day_of_week :\n\t\t\t\t\t\t\t\t\t\t7 - ($this->first_day_of_week - $this->CDT->day_of_week);\n\n\t\t\t\t\t\t\t$this->CDT->add_day(-$offset);\n\t\t\t\t\t\t\t$this->CDT->set_default($this->CDT->datetime_array());\n\t\t\t\t\t\t\t$next_CDT = $this->CDT->add_day(7);\n\t\t\t\t\t\t\t$prev_CDT = $this->CDT->add_day(-14);\n\t\t\t\t\t\t\t$this->CDT->reset();\n\n\t\t\t\t\t\t\t//var_dump($this->CDT->ymd . ' WEEK 2');\n\n\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t// Calculate the number of events this week\n\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t$week_event_total \t= 0;\n\n\t\t\t\t\t\t\t//$week_count_id\t\t= 'week_event_total_' . uniqid();\n\n\t\t\t\t\t\t\tif (strpos($each_week, 'week_event_total') !== FALSE)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$low\t= $this->CDT->year .\n\t\t\t\t\t\t\t\t\t\t\tstr_pad($this->CDT->month, 2, '0', STR_PAD_LEFT) .\n\t\t\t\t\t\t\t\t\t\t\tstr_pad($this->CDT->day, 2, '0', STR_PAD_LEFT);\n\n\t\t\t\t\t\t\t\t$this->CDT->add_day(6);\n\n\t\t\t\t\t\t\t\t$high\t= $this->CDT->year .\n\t\t\t\t\t\t\t\t\t\t\tstr_pad($this->CDT->month, 2, '0', STR_PAD_LEFT) .\n\t\t\t\t\t\t\t\t\t\t\tstr_pad($this->CDT->day, 2, '0', STR_PAD_LEFT);\n\n\t\t\t\t\t\t\t\t$this->CDT->reset();\n\n\t\t\t\t\t\t\t\tforeach ($event_array as $k => $v)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ($k < $low OR $k > $high)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t$week_event_total += $this->count_events($k, $event_array, $all_day, 'week', $events);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$vars = array();\n\n\t\t\t\t\t\t\t$vars['single'] = array(\n\t\t\t\t\t\t\t\t'week'\t\t\t\t=> $w,\n\t\t\t\t\t\t\t\t'prev_week'\t\t\t=> $prev_CDT['week_number'],\n\t\t\t\t\t\t\t\t'next_week'\t\t\t=> $next_CDT['week_number'],\n\t\t\t\t\t\t\t\t'week_event_total' \t=> $week_event_total\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t$vars['date'] = array(\n\t\t\t\t\t\t\t\t'week' \t\t \t\t=> $this->CDT->datetime_array(),\n\t\t\t\t\t\t\t\t'date' \t\t \t\t=> $this->CDT->datetime_array(),\n\t\t\t\t\t\t\t\t'prev_week' \t\t=> $prev_CDT,\n\t\t\t\t\t\t\t\t'next_week'\t \t\t=> $next_CDT\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t$week_output = $this->parse_count_hashes('week_event_count', $this->swap_vars($vars, $week_output));\n\n\t\t\t\t\t\t\t$find = $hash_week;\n\t\t\t\t\t\t\t$replace = $week_output;\n\t\t\t\t\t\t\t$week_temp = '';\n\n\t\t\t\t\t\t\tif ($output_at == 'week')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$output .= $replace;\n\t\t\t\t\t\t\t\t$replace = '';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$this->CDT->reset();\n\t\t\t\t\t\t\t$week_event_count = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif ($end['day'] == $d AND\n\t\t\t\t\t\t\t\t$end['month'] == $m AND\n\t\t\t\t\t\t\t\t$d == $this->CDT->days_in_month($m, $y) AND\n\t\t\t\t\t\t\t\t$this->P->value('pad_short_weeks') === TRUE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$week_temp .= $replace;\n\t\t\t\t\t\t\t$week_output = str_replace($find, $week_temp, $each_week);\n\n\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t// Prep week variables\n\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t$this->CDT->add_day(-6);\n\t\t\t\t\t\t\t$next_CDT = $this->CDT->add_day(7);\n\t\t\t\t\t\t\t$prev_CDT = $this->CDT->add_day(-14);\n\t\t\t\t\t\t\t$this->CDT->reset();\n\n\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t// Calculate the number of events this week\n\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t$week_event_total = 0;\n\n\t\t\t\t\t\t\tif (strpos($each_week, 'week_event_total') !== FALSE)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$low\t= $this->CDT->year .\n\t\t\t\t\t\t\t\t\t\t\tstr_pad($this->CDT->month, 2, '0', STR_PAD_LEFT) .\n\t\t\t\t\t\t\t\t\t\t\tstr_pad($this->CDT->day, 2, '0', STR_PAD_LEFT);\n\n\t\t\t\t\t\t\t\t$this->CDT->add_day(6);\n\n\t\t\t\t\t\t\t\t$high\t= $this->CDT->year .\n\t\t\t\t\t\t\t\t\t\t\tstr_pad($this->CDT->month, 2, '0', STR_PAD_LEFT) .\n\t\t\t\t\t\t\t\t\t\t\tstr_pad($this->CDT->day, 2, '0', STR_PAD_LEFT);\n\n\t\t\t\t\t\t\t\t$this->CDT->reset();\n\n\t\t\t\t\t\t\t\tforeach ($event_array as $k => $v)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ($k < $low OR $k > $high)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t$week_event_total += $this->count_events($k, $event_array, $all_day, 'week', $events);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$vars = array();\n\n\t\t\t\t\t\t\t$vars['single'] = array(\n\t\t\t\t\t\t\t\t'week'\t\t\t\t=> $w,\n\t\t\t\t\t\t\t\t'prev_week'\t\t\t=> $prev_CDT['week_number'],\n\t\t\t\t\t\t\t\t'next_week'\t\t\t=> $next_CDT['week_number'],\n\t\t\t\t\t\t\t\t'week_event_total' \t=> $week_event_total\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t$vars['date'] = array(\n\t\t\t\t\t\t\t\t'week' \t\t\t\t=> $this->CDT->datetime_array(),\n\t\t\t\t\t\t\t\t'date'\t\t\t\t=> $this->CDT->datetime_array(),\n\t\t\t\t\t\t\t\t'prev_week' \t\t=> $prev_CDT,\n\t\t\t\t\t\t\t\t'next_week'\t\t\t=> $next_CDT\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t$week_output = $this->parse_count_hashes('week_event_count', $this->swap_vars($vars, $week_output));\n\n\t\t\t\t\t\t\t$find \t\t= $hash_week;\n\t\t\t\t\t\t\t$replace \t= $week_output;\n\t\t\t\t\t\t\t$week_temp \t= '';\n\n\t\t\t\t\t\t\tif ($output_at == 'week')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$output .= $replace;\n\t\t\t\t\t\t\t\t$replace = '';\n//ee()->TMPL->log_item('Calendar: Outputting week data for '.$ymd);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$this->CDT->reset();\n\t\t\t\t\t\t\t$week_event_count = 0;\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$week_temp .= $replace;\n\t\t\t\t\t\t\t$replace = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Each month\n\t\t\t\t\t// -------------------------------------\n\n//var_dump($this->CDT->ymd . ' OUTSIDE MONTH');\n\n\t\t\t\t\tif ($each_month != '')\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($all_day_output != '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$replace = $all_day_output . $replace;\n\t\t\t\t\t\t\t$all_day_output = '';\n\t\t\t\t\t\t\tif ($each_day == '')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$all_day = array();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (($m != $next_m OR $last_day === TRUE) AND\n\t\t\t\t\t\t\t(\t$ymd >= $current_period_start['ymd'] AND\n\t\t\t\t\t\t\t\t(\t($last_day === TRUE AND $ymd == $current_period_end['ymd']) OR\n\t\t\t\t\t\t\t\t\t($ymd != $current_period_end['ymd'])\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t$month_temp .= $replace;\n\t\t\t\t\t\t\t$month_output = str_replace($find, $month_temp, $each_month);\n\n\t\t\t\t\t\t\t//--------------------------------------------\n\t\t\t\t\t\t\t//\treset and add month because\n\t\t\t\t\t\t\t//\tthis gets 'off' some places\n\t\t\t\t\t\t\t//--------------------------------------------\n\t\t\t\t\t\t\t$this->CDT->set_default($current_period_start);\n\t\t\t\t\t\t\t$this->CDT->reset();\n\n\t\t\t\t\t\t\t//first month is correct\n\t\t\t\t\t\t\tif ($month_tick > 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->CDT->add_month($month_tick);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$month_tick++;\n\n\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t// Prep month variables\n\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t//add a month\n\t\t\t\t\t\t\t$next_CDT = $this->CDT->add_month();\n\n\t\t\t\t\t\t\t//subtract 2\n\t\t\t\t\t\t\t$prev_CDT = $this->CDT->add_month(-2);\n\n\t\t\t\t\t\t\t//add 1, now we are back where we started!\n\t\t\t\t\t\t\t$this->CDT->add_month();\n\t\t\t\t\t\t\t$this->CDT->change_date($this->CDT->year, $this->CDT->month, 1);\n\n\t\t\t\t\t\t\t$vars = array();\n\n\t\t\t\t\t\t\t//var_dump($this->CDT->ymd . ' MONTH 2');\n\n\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t// Calculate the number of events this month\n\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t$month_event_total = 0;\n\n\t\t\t\t\t\t\tif (strpos($each_month, 'month_event_total') !== FALSE)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$low\t= $this->CDT->year.str_pad($this->CDT->month, 2, '0', STR_PAD_LEFT).'01';\n\t\t\t\t\t\t\t\t$high\t= $this->CDT->year.str_pad($this->CDT->month, 2, '0', STR_PAD_LEFT).$this->CDT->days_in_month();\n\n\t\t\t\t\t\t\t\tforeach ($event_array as $k => $v)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ($k < $low OR $k > $high)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t$month_event_total += $this->count_events($k, $event_array, $all_day, 'month', $events);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t//$vars['conditional'] = array( 'day_in_current_month' => TRUE );\n\t\t\t\t\t\t\t$vars['single'] = array(\n\t\t\t\t\t\t\t\t'month'\t\t\t\t=> $m,\n\t\t\t\t\t\t\t\t'prev_month'\t\t=> $prev_CDT['month'],\n\t\t\t\t\t\t\t\t'next_month'\t\t=> $next_CDT['month'],\n\t\t\t\t\t\t\t\t'month_event_total' => $month_event_total\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t$vars['date'] = array(\n\t\t\t\t\t\t\t\t'month' \t\t\t=> $this->CDT->datetime_array(),\n\t\t\t\t\t\t\t\t'date'\t\t\t\t=> $this->CDT->datetime_array(),\n\t\t\t\t\t\t\t\t'prev_month' \t\t=> $prev_CDT,\n\t\t\t\t\t\t\t\t'next_month'\t\t=> $next_CDT\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t$month_output \t= $this->parse_count_hashes(\n\t\t\t\t\t\t\t\t'month_event_count',\n\t\t\t\t\t\t\t\t$this->swap_vars($vars, $month_output)\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t$replace \t\t= $month_output;\n\n\t\t\t\t\t\t\t$find = $hash_month;\n\t\t\t\t\t\t\t$month_temp = '';\n\n\t\t\t\t\t\t\tif ($output_at == 'month')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$output .= $replace;\n\t\t\t\t\t\t\t\t$replace = '';\n//ee()->TMPL->log_item('Calendar: Outputting month data for '.$ymd);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$this->CDT->reset();\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$month_temp .= $replace;\n\t\t\t\t\t\t\t$replace = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t// Each year\n\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\tif ($each_year != '')\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($all_day_output != '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$replace = $all_day_output . $replace;\n\t\t\t\t\t\t\t$all_day_output = '';\n\t\t\t\t\t\t\tif ($each_day == '')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$all_day = array();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ($y != $next_y OR $last_day === TRUE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//if ($last_day !== TRUE)\n\t\t\t\t\t\t\tif ($last_day == TRUE)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$year_temp .= $replace;\n\n\t\t\t\t\t\t\t\t$year_output = str_replace($find, $year_temp, $each_year);\n\n\t\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t\t// Calculate the number of events this year\n\t\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t\t$year_event_total = 0;\n\n\t\t\t\t\t\t\t\tif (strpos(ee()->TMPL->tagdata, 'year_event_total') !== FALSE)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$low\t= $this->CDT->year.'0101';\n\t\t\t\t\t\t\t\t\t$high\t= $this->CDT->year.'1231';\n\t\t\t\t\t\t\t\t\tforeach ($event_array as $k => $v)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif ($k < $low OR $k > $high)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t$year_event_total += $this->count_events($k, $event_array, array(), 'year', $events);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// -------------------------------------\n\t\t\t\t\t\t\t\t// Prep year variables\n\t\t\t\t\t\t\t\t// -------------------------------------\n\n\t\t\t\t\t\t\t\t$this->CDT->set_default($current_period_start);\n\t\t\t\t\t\t\t\t$this->CDT->reset();\n\t\t\t\t\t\t\t\tif ($year_tick > 1)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$this->CDT->add_year($year_tick);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$year_tick++;\n\n\t\t\t\t\t\t\t\t$next_CDT = $this->CDT->add_year(1);\n\t\t\t\t\t\t\t\t$prev_CDT = $this->CDT->add_year(-2);\n\t\t\t\t\t\t\t\t$this->CDT->reset();\n\n\t\t\t\t\t\t\t\t$vars = array();\n\n\t\t\t\t\t\t\t\t$vars['conditional']\t\t= array(\n\t\t\t\t\t\t\t\t\t'year_is_leap_year'\t=> $this->CDT->is_leap_year()\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t$vars['single']\t\t\t\t= array(\n\t\t\t\t\t\t\t\t\t'year'\t\t\t\t=> $y,\n\t\t\t\t\t\t\t\t\t'prev_year'\t\t\t=> $prev_CDT['year'],\n\t\t\t\t\t\t\t\t\t'next_year'\t\t\t=> $next_CDT['year'],\n\t\t\t\t\t\t\t\t\t'year_event_total'\t=> $year_event_total\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t$vars['date']\t\t\t\t= array(\n\t\t\t\t\t\t\t\t\t'year' \t\t\t\t=> $this->CDT->datetime_array(),\n\t\t\t\t\t\t\t\t\t'date'\t\t\t\t=> $this->CDT->datetime_array(),\n\t\t\t\t\t\t\t\t\t'prev_year' \t\t=> $prev_CDT,\n\t\t\t\t\t\t\t\t\t'next_year' \t\t=> $next_CDT\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t$year_output = $this->parse_count_hashes(\n\t\t\t\t\t\t\t\t\t'year_event_count',\n\t\t\t\t\t\t\t\t\t$this->swap_vars($vars, $year_output)\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t$replace = $year_output;\n\n\t\t\t\t\t\t\t\t$this->CDT->reset();\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//$replace = '';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$find = $hash_year;\n\t\t\t\t\t\t\t$year_temp = '';\n\n\t\t\t\t\t\t\tif ($output_at == 'year')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$output .= $replace;\n\t\t\t\t\t\t\t\t$replace = '';\n//ee()->TMPL->log_item('Calendar: Outputting year data for '.$ymd);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$year_temp .= $replace;\n\t\t\t\t\t\t\t$replace = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t//parse day event counts\n\t\t\t\t\t//$output = $this->parse_count_hashes('day_event_count', $output);\n\n\t\t\t\t\t//parse week event counts\n\t\t\t\t\t//$output = $this->parse_count_hashes('week_event_count', $output);\n\t\t\t\t}\n\n\t\t\t\t//parse month event counts\n\t\t\t\t//$output = $this->parse_count_hashes('month_event_count', $output);\n\t\t\t}\n\n\t\t\t//parse year event count\n\t\t\t//$output = $this->parse_count_hashes('year_event_count', $output);\n\t\t}\n\n\t\t// -------------------------------------\n\t\t//\trunning all of these again in case\n\t\t//\tthe didn't fire. This means we\n\t\t//\tare in a straight event loop in\n\t\t//\tcal and it's probably errorsome :/\n\t\t// -------------------------------------\n\n\t\t//parse hour event counts\n\t\t$output = $this->parse_count_hashes('hour_event_count', $output);\n\n\t\t//parse day event counts\n\t\t$output = $this->parse_count_hashes('day_event_count', $output);\n\n\t\t//parse week event counts\n\t\t$output = $this->parse_count_hashes('week_event_count', $output);\n\n\t\t//parse month event counts\n\t\t$output = $this->parse_count_hashes('month_event_count', $output);\n\n\t\t//parse year event count\n\t\t$output = $this->parse_count_hashes('year_event_count', $output);\n\n\t\t//parse year event count\n\t\t$output = $this->parse_count_hashes('event_count', $output);\n\n\t\t$output = $this->swap_vars(array('single'=>array('event_total' => $event_count)), $output);\n\n\t\t$hash = 'hash_'.$output_at;\n\n\t\t$tagdata = isset($$hash) ? str_replace($$hash, $output, $tagdata) : $output;\n\n\t\t$tagdata = $this->parse_pagination($tagdata);\n\n\t\t//ee()->TMPL->log_item('Calendar: All done!');\n\n\t\t// -------------------------------------\n\t\t//\tsetting everything back thats not parsed\n\t\t//\tin case people were writing it in plain text\n\t\t// -------------------------------------\n\n\t\t//custom variables with the letters 'url' are borked in\n\t\t//EE 2.6. Bug reported, but this should fix.\n\t\t//https://support.ellislab.com/bugs/detail/19337\n\t\tif (version_compare($this->ee_version, '2.6.0', '>='))\n\t\t{\n\t\t\t$tagdata = str_replace(\n\t\t\t\tarray(\n\t\t\t\t\tLD . 'event_borked_title' . RD,\n\t\t\t\t\t'\"event_borked_title\"',\n\t\t\t\t\t\"'event_borked_title'\"\n\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\tLD . 'event_url_title' . RD,\n\t\t\t\t\t'\"event_url_title\"',\n\t\t\t\t\t\"'event_url_title'\"\n\t\t\t\t),\n\t\t\t\t$tagdata\n\t\t\t);\n\n\n\t\t\t$tagdata = str_replace(\n\t\t\t\tarray(\n\t\t\t\t\tLD . 'event_calendar_borked_title' . RD,\n\t\t\t\t\t'\"event_calendar_borked_title\"',\n\t\t\t\t\t\"'event_calendar_borked_title'\"\n\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\tLD . 'event_calendar_url_title' . RD,\n\t\t\t\t\t'\"event_calendar_url_title\"',\n\t\t\t\t\t\"'event_calendar_url_title'\"\n\t\t\t\t),\n\t\t\t\t$tagdata\n\t\t\t);\n\t\t}\n\n\t\t//--------------------------------------------\n\t\t//\tthis shouldn't ever be needed, but here we are\n\t\t//--------------------------------------------\n\n\t\tif (trim($tagdata) === '')\n\t\t{\n\t\t\treturn $this->no_results();\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Send 'em home\n\t\t// -------------------------------------\n\n\t\treturn $tagdata;\n\t}", "public function render($printOutput = false)\n {\n $now = time();\n $output = '';\n\n foreach ($this->entries as $entry) {\n if (!empty($entry['doorImageLeft']) && !empty($entry['doorImageRight'])) {\n $totalWidth = $entry['doorWidth'] * 2;\n } else {\n $totalWidth = $entry['doorWidth'];\n }\n if ($now >= strtotime($entry['unlockDate'])) {\n $output .= '<a href=\"' . $entry['url'] .\n '\" class=\"advent-calendar-entry\" style=\"width:' . $totalWidth .\n 'px;top:' . $entry['positionTop'] . 'px;left:' . $entry['positionLeft'] . 'px;\">';\n if (!empty($entry['backgroundImage'])) {\n $output .= '<img class=\"advent-calendar-background\" src=\"' .\n $entry['backgroundImage'] . '\" alt=\"\" />';\n }\n if (!empty($entry['doorImageLeft'])) {\n $output .= '<div class=\"advent-calendar-door-left-wrapper\">' .\n '<img class=\"advent-calendar-door\" src=\"' . $entry['doorImageLeft'] . '\" alt=\"\" />' .\n '</div>';\n }\n if (!empty($entry['doorImageRight'])) {\n $output .= '<div class=\"advent-calendar-door-right-wrapper\">' .\n '<img class=\"advent-calendar-door\" src=\"' . $entry['doorImageRight'] . '\" alt=\"\" /></div>';\n }\n $output .= '</a>';\n } else {\n $output .= '<div class=\"advent-calendar-entry\" ' .\n 'style=\"width:' . $totalWidth . 'px;' .\n 'top:' . $entry['positionTop'] . 'px;' .\n 'left:' . $entry['positionLeft'] . 'px;\">';\n if (!empty($entry['doorImageLeft'])) {\n $output .= '<div class=\"advent-calendar-door-left-wrapper\">' .\n '<img class=\"advent-calendar-door\" src=\"' . $entry['doorImageLeft'] . '\" alt=\"\" /></div>';\n }\n if (!empty($entry['doorImageRight'])) {\n $output .= '<div class=\"advent-calendar-door-right-wrapper\">' .\n '<img class=\"advent-calendar-door\" src=\"' . $entry['doorImageRight'] . '\" alt=\"\" /></div>';\n }\n $output .= '</div>';\n }\n }\n\n // wrap elements\n $output = '<div class=\"advent-calendar\" ' .\n 'style=\"width:' . $this->calendarWidth . 'px;height:' . $this->calendarHeight . 'px;\">' .\n $output .\n '</div>';\n\n if ($printOutput) {\n echo $output;\n }\n\n return $output;\n }", "function calendar($date) {\r\n\t //If no parameter is passed use the current date.\r\n\t if($date == null)\r\n\t $date = getDate();\r\n\r\n\t $day \t\t\t= $date[\"mday\"];\r\n\t $month \t\t= $date[\"mon\"];\r\n\t $month_name \t= $date[\"month\"];\r\n\t $year \t\t\t= $date[\"year\"];\r\n\r\n\t $this_month \t= getDate(mktime(0, 0, 0, $month, 1, $year));\r\n\t $next_month \t= getDate(mktime(0, 0, 0, $month + 1, 1, $year));\r\n\r\n\t //Find out when this month starts and ends.\r\n\t $first_week_day = $this_month[\"wday\"];\r\n\t $days_in_this_month = round(($next_month[0] - $this_month[0]) / (60 * 60 * 24));\r\n\r\n\t $calendar_html = \"<table width='100%'>\";\r\n\t $calendar_html = $calendar_html.\"<tr>\t<td class='perp_report_header' colspan='7' /> Month: \".$month_name.\" / Year: \".$year.\"</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\";\r\n\t $calendar_html = $calendar_html.\"<tr>\t<td class='perp_report_subheader'>Sunday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='perp_report_subheader'>Monday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='perp_report_subheader'>Tuesday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='perp_report_subheader'>Wednesday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='perp_report_subheader'>Thursday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='perp_report_subheader'>Friday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='perp_report_subheader'>Saterday</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t\t<tr>\";\r\n\r\n\t// Fill the first week of the month with the appropriate number of blanks.\r\n\t\t\t$gapcounter = 0;\r\n\t\t\tfor($week_day = 0; $week_day < $first_week_day; $week_day++) {\r\n\t\t\t\t\t$gapcounter = $gapcounter + 1;\r\n\t\t\t\t}\r\n\t\t\t$calendar_html = $calendar_html.\"<td class='perp_report_cell' colspan='\".$gapcounter.\"'></td>\";\t\r\n\t\r\n\t// Draw Calendar Elements\r\n\t\t\t// I forget!\t\t\t\t\r\n\t $week_day = $first_week_day;\r\n\t for($day_counter = 1; $day_counter <= $days_in_this_month; $day_counter++) {\r\n\t\t\t\t\t// Determine Day of the week\r\n\t\t\t\t\t$week_day %= 7;\r\n\t\t\t\t\r\n\t\t\t\t\t// If this variable equals 0, we will need to start a new row.\r\n\t\t\t\t\tif($week_day == 0) {\r\n\t\t\t\t\t\t\t$calendar_html = $calendar_html.\"</tr><tr>\";\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$datetopull = $year.\"/\".$month.\"/\".$day_counter;\r\n\t\t\t\t\t$innercell = \"<TABLE width='100%' style='margin-bottom:0;margin-top:0;'><tr><td class='perp_report_fieldname'>Date:</td><td class='perp_report_fieldcontent'>\".$datetopull.\"</td></tr>\";\r\n\t\t\t\t\t//Now Get inspection List for this day.....\r\n\t\t\t\t\t$objconn = mysqli_connect($GLOBALS['hostdomain'], $GLOBALS['hostusername'], $GLOBALS['passwordofdatabase'], $GLOBALS['nameofdatabase']);\t\t\t\t\t\r\n\t\t\t\t\tif (mysqli_connect_errno()) {\r\n\t\t\t\t\t\t\t// there was an error trying to connect to the mysql database\r\n\t\t\t\t\t\t\t//printf(\"connect failed: %s\\n\", mysqli_connect_error());\r\n\t\t\t\t\t\t\texit();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t$sql = \"SELECT * FROM tbl_139_337_main WHERE 139337_date = '\".$datetopull.\"' ORDER BY 139337_time\";\r\n\t\t\t\t\t\t\t//echo \"The SQL Statement is :\".$sql.\"<br>\";\r\n\t\t\t\t\t\t\t$objrs = mysqli_query($objconn, $sql);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\tif ($objrs) {\r\n\t\t\t\t\t\t\t\t\t$number_of_rows = mysqli_num_rows($objrs);\r\n\t\t\t\t\t\t\t\t\twhile ($objarray = mysqli_fetch_array($objrs, MYSQLI_ASSOC)) {\r\n\t\t\t\t\t\t\t\t\t\t$counter = $counter + 1;\r\n\t\t\t\t\t\t\t\t\t\t\t$counter = $counter + 1;\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// So the Archieved or Duplicate Narrowing...\r\n\t\t\t\t\t\t\t\t\t\t\t$displayrow\t\t\t\t\t= 0;\r\n\t\t\t\t\t\t\t\t\t\t\t$displayrow_a\t\t\t\t= 0;\r\n\t\t\t\t\t\t\t\t\t\t\t$displayrow_b\t\t\t\t= 0;\r\n\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t$tmpdiscrepancyid\t\t\t= $objarray['Discrepancy_id'];\r\n\t\t\t\t\t\t\t\t\t\t\t$tmpdiscrepancycondition\t= $objarray['discrepancy_checklist_id'];\t\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$displayrow_a\t\t\t\t= preflights_tbl_139_337_main_a_yn($tmpdiscrepancyid,0); // 0 will not return a row even if it is archieved.\r\n\t\t\t\t\t\t\t\t\t\t\t//$displayrow_d\t\t\t\t= preflights_tbl_139_327_main_sub_d_d_yn($tmpdiscrepancyid,0); // 0 will not return a row even if it is duplicate.\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tif($displayrow_a == 1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$displayrow = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif($displayrow_d == 1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$displayrow = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\tif($displayrow_d == 1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$displayrow = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif($displayrow_a == 1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$displayrow = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\tif ($displayrow == 1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$innercell = $innercell.\"<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<form style='margin-bottom:0;' action='part139337_report_display.php' method='POST' name='reportform' id='reportform' target='WLHMWindow' onsubmit='window.open('', 'WLHMWindow', 'width=800,height=600,status=no,resizable=no,scrollbars=yes')'>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td colspan='2' class='formoptionsubmit'>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type='hidden' name='recordid'\tID='recordid' \t\t\tvalue=\".$tmpdiscrepancyid.\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type='submit' value='D:\".$tmpdiscrepancyid.\"' name='b1' ID='b1' class='makebuttonlooklikelargetext' style='width:100%;'>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</form>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t$innercell = $innercell.\"</table>\";\t\r\n\t\t\t\t\tif ($counter == 0) {\r\n\t\t\t\t\t\t\t$innercell = $innercell.\"Nothing Reported\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t$calendar_html = $calendar_html.\"<td align=\\\"center\\\" valign='top' class='perp_report_activecell'>&nbsp;\".$innercell.\"</td>\";\r\n\t\t\t\t\t$week_day++;\r\n\t\t\t\t\t$counter = 0;\r\n\t\t\t\t}\r\n\r\n\t $calendar_html .= \"</tr>\";\r\n\t $calendar_html .= \"</table>\";\r\n\r\n\t return($calendar_html);\r\n\t }", "function print_calendar($mon,$year)\n\t{\n\t\tglobal $dates, $first_day, $start_day;\n\t\t\t$cellWidth =\"150\";\n\t\t$first_day = mktime(0,0,0,$mon,1,$year);\n\t\t$start_day = date(\"w\",$first_day);\n\t\t$res = getdate($first_day);\n\t\t$month_name = $res[\"month\"];\n\t\t$no_days_in_month = date(\"t\",$first_day);\n\t\t\n\t\t//If month's first day does not start with first Sunday, fill table cell with a space\n\t\tfor ($i = 1; $i <= $start_day;$i++)\n\t\t\t$dates[1][$i] = \" \";\n\n\t\t$row = 1;\n\t\t$col = $start_day+1;\n\t\t$num = 1;\n\t\twhile($num<=31)\n\t\t\t{\n\t\t\t\tif ($num > $no_days_in_month)\n\t\t\t\t\t break;\n\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$dates[$row][$col] = $num;\n\t\t\t\t\t\tif (($col + 1) > 7)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$row++;\n\t\t\t\t\t\t\t\t$col = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$col++;\n\t\t\t\t\t\t$num++;\n\t\t\t\t\t}//if-else\n\t\t\t}//while\n\t\t$mon_num = date(\"n\",$first_day);\n\t\t$temp_yr = $next_yr = $prev_yr = $year;\n\n\t\t$prev = $mon_num - 1;\n\t\t$next = $mon_num + 1;\n\n\t\t//If January is currently displayed, month previous is December of previous year\n\t\tif ($mon_num == 1)\n\t\t\t{\n\t\t\t\t$prev_yr = $year - 1;\n\t\t\t\t$prev = 12;\n\t\t\t}\n \n\t\t//If December is currently displayed, month next is January of next year\n\t\tif ($mon_num == 12)\n\t\t\t{\n\t\t\t\t$next_yr = $year + 1;\n\t\t\t\t$next = 1;\n\t\t\t}\n\n\t\techo \"<DIV ALIGN='center'><TABLE BORDER=1 WIDTH=1600px CELLSPACING=0 BORDERCOLOR='silver'>\";\n\n\t\techo \t\"\\n<TR ALIGN='center'><TD BGCOLOR='white'> \".\n\t\t\t \"<A HREF='index.php?month=$prev&year=$prev_yr' STYLE=\\\"text-decoration: none\\\"><B><<</B></A> </TD>\".\n\t\t\t \"<TD COLSPAN=5 BGCOLOR='#99CCFF'><B>\".date(\"F\",$first_day).\" \".$temp_yr.\"</B></TD>\".\n\t\t\t \"<TD BGCOLOR='white'> \".\n\t\t\t \"<A HREF='index.php?month=$next&year=$next_yr' STYLE=\\\"text-decoration: none\\\"><B>>></B></A> </TD></TR>\";\n\n\t\techo \"\\n<TR ALIGN='center'><TD width='$cellWidth'><B>Domenica</B></TD><TD width='$cellWidth'><B>Lunedi</B></TD><TD width='$cellWidth'><B>Martedi</B></TD>\";\n\t\techo \"<TD width='$cellWidth'><B>Mercoledi</B></TD><TD width='$cellWidth'><B>Giovedi</B></TD><TD width='$cellWidth'><B>Venerdi</B></TD><TD width='$cellWidth'><B>Sabato</B></TD></TR>\";\n\t\techo \"<TR><TD COLSPAN=7> </TR><TR height='100px;' ALIGN='center'>\";\n\t\t\t\t\n\t\t$end = ($start_day > 4)? 6:5;\n\t\tfor ($row=1;$row<=$end;$row++)\n\t\t\t{\n\t\t\t\tfor ($col=1;$col<=7;$col++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($dates[$row][$col] == \"\")\n\t\t\t\t\t\t$dates[$row][$col] = \" \";\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!strcmp($dates[$row][$col],\" \"))\n\t\t\t\t\t\t\t$count++;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$t = $dates[$row][$col];\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t//If date is today, highlight it\n\t\t\t\t\t\tif (($t == date(\"j\")) && ($mon == date(\"n\")) && ($year == date(\"Y\"))){\n\t\t\t\t\t\t\techo \"\\n<TD valign='top' BGCOLOR='aqua'><a onclick=\\\"NewWindow(this.href,'pg_center','780','670','no');return false;\\\" href='calendar_add_event.php?azione=add&gg=$t&mm=$mon&yyyy=$year'>\".$t.\"</a>\";\n echo '<div align=\"left\">';\n echo stampa_appuntamenti($t,$mon,$year,$_SESSION['id_utente']);\n echo '</div>';\n echo \"</TD>\";\n }\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t//If the date is absent ie after 31, print space\n\t\t\t\t\t\t\techo \"\\n<TD valign='top'>\".(($t == \" \" )? \"&nbsp;\" : \"<a onclick=\\\"NewWindow(this.href,'pg_center','780','670','no');return false;\\\" href='calendar_add_event.php?azione=add&gg=$t&mm=$mon&yyyy=$year'>\".$t.\"</a>\");\n echo '<div align=\"left\">';\n echo stampa_appuntamenti($t,$mon,$year,$_SESSION['id_utente']);\n echo '</div>';\n echo \"</TD>\";\n\t\t\t\t\t }\n }// for -col\n\t\t\t\t\n\t\t\t\tif (($row + 1) != ($end+1))\n\t\t\t\t\techo \"</TR>\\n<TR ALIGN='center' height='100px;'>\";\n\t\t\t\telse\n\t\t\t\t\techo \"</TR>\";\n\t\t\t}// for - row\n\t\techo \"\\n</TABLE><BR><BR><A HREF=\\\"index.php\\\">Visualizza mese corrente</A> </DIV>\";\n\t}", "public function drawHTMLNavigation() {\r\n \t\techo (\"<table \".$this->cssTableId.\">\\n\");\r\n\t\techo (\" <tr \".$this->cssTrId.\">\\n\");\r\n\t\techo (\" <td \".$this->cssTdId.\">&nbsp;\\n\");\r\n\t\t// FIRST \t\t\r\n\t\t$this->drawFirst();\r\n\t\techo (\" </td>\\n\");\r\n\t\techo (\" <td \".$this->cssTdId.\">&nbsp;\\n\");\r\n \t// PREV\r\n \t$this->drawPrev();\r\n\t\techo (\" </td>\\n\");\r\n\t\techo (\" <td \".$this->cssTdId.\">&nbsp;\\n\");\r\n \t// NEXT\r\n\t\t$this->drawNext();\r\n\t\techo (\" </td>\\n\");\r\n\t\techo (\" <td \".$this->cssTdId.\">&nbsp;\\n\");\r\n \t// LAST\r\n \t$this->drawLast();\r\n\t\techo (\" </td>\\n\");\r\n\t\techo (\" </tr>\\n\");\r\n\t\techo (\"</table>\\n\");\r\n \t}", "public function getMonthAsTable()\n {\n // Get all days to put in calendar\n $days = $this->getDaysAsArray();\n\n // Start table\n $html = \"<table class='table'><thead><tr>\";\n\n // Add weekday names to table head\n foreach (array_keys($this->weekdayIndexes) as $key) {\n $html .= \"<th>{$key}</th>\";\n }\n $html .= \"</tr></thead><tbody>\";\n\n // Add day numbers to table body\n for ($i = 0; $i < count($days); $i++) {\n // New row at start of week\n $html .= $i % 7 === 0 ? \"<tr>\" : \"\";\n\n if (($days[$i] > $i + 7) || ($days[$i] < $i - 7)) {\n // Add class 'outside' if number is part of previous or next month\n $html .= \"<td class='outside'>\";\n } elseif ($i % 7 === 6) {\n // Add class 'red' to Sundays\n $html .= \"<td class='red'>\";\n } else {\n $html .= \"<td>\";\n }\n $html .= \"{$days[$i]}</td>\";\n // Close row at end of week\n $html .= $i % 7 === 6 ? \"</tr>\" : \"\";\n }\n $html .= \"</tbody></table>\";\n return $html;\n }", "public function render()\n\t{\n\n\t\t$table = \"<table\";\n\n\t\t// Add all attributes\n\t\tforeach ($this->attributes as $key => $value) {\n\t\t\t$table .= ' ' . $key . '=\"' . $value .'\"';\n\t\t}\n\n\t\t$table .= \">\"; // Close table\n\n\t\t// Add the head\n\t\tif ($this->showHeadRow) {\n\t\t\t$table .= \"<thead><tr>\";\n\n\t\t\t// Show the number header.\n\t\t\tif ($this->showNumberColumn) {\n\t\t\t\t$table .= \"<th>#</th>\";\n\t\t\t}\n\n\t\t\tforeach ($this->columns as $column) {\n\t\t\t\t$columnHeadTitle = isset($column['headTitle']) ? $column['headTitle'] : $column[0];\n\t\t\t\t$table .= \"<th>\" . $columnHeadTitle . \"</th>\";\n\t\t\t}\n\n\t\t\t$table .= \"</tr></thead>\"; // finish head\n\t\t}\n\n\t\t// Body\n\t\t$table .= \"<tbody>\";\n\n\t\t$row = $this->numberColumnOffset;\n\n\t\tif (count($this->data) == 0) {\n\t\t\t// Show a no data entry\n\t\t\t$colspan = count($this->columns) + ($this->showNumberColumn ? 1 : 0);\n\t\t\t$table .= '<tr><td colspan=\"'.$colspan.'\"><p align=\"center\" style=\"font-weight:bold;\">Keine Einträge</p></td></tr>';\n\t\t}\n\t\telse {\n\t\t\tforeach ($this->data as $dataObject) {\n\n\t\t\t\t// Row attributes\n\t\t\t\t$attributes = $this->rowAttributes;\n\t\t\t\tif (!is_array($attributes)) {\n\t\t\t\t\tif (is_callable($this->rowAttributes)) {\n\t\t\t\t\t\t$callable = $this->rowAttributes;\n\t\t\t\t\t\t$attributes = $callable($dataObject);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$attributeString = '';\n\t\t\t\tif ($attributes) {\t\t// Add attributes if we have some\n\t\t\t\t\tforeach ($attributes as $attributeName => $attributeValue) {\n\t\t\t\t\t\t$attributeString .= $attributeName . '=\"' . $attributeValue . '\" ' ;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ($this->rowIdDataMethod) {\n\t\t\t\t\t// method name or closure?\n\t\t\t\t\t$id = '';\n\t\t\t\t\tif (is_string($this->rowIdDataMethod)) {\n\t\t\t\t\t\t$id = $dataObject->{$this->rowIdDataMethod}(); // Call the row data method\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$rf = new \\ReflectionFunction($this->rowIdDataMethod);\n\t\t\t\t\t\tif ($rf->isClosure()) {\n\t\t\t\t\t\t\t// we got a closure\n\t\t\t\t\t\t\t$closure = $this->rowIdDataMethod;\n\t\t\t\t\t\t\t$id = $closure($dataObject);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\n\n\t\t\t\t\t$table .= '<tr id=\"'. $id .'\" ' . $attributeString . '>'; // Start row with id\n\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$table .= \"<tr \". $attributeString .\">\";\t// Start row without id\n\t\t\t\t}\n\n\t\t\t\t// Number?\n\t\t\t\tif ($this->showNumberColumn) {\n\t\t\t\t\t$table .= \"<td>\" . $row . \"</td>\";\n\t\t\t\t}\n\n\t\t\t\tforeach ($this->columns as $column) {\n\t\t\t\t\t$dataMethod = isset($column['dataMethod']) ? $column['dataMethod'] : $column[1];\n\t\t\t\t\tif (is_string($dataMethod)) {\n\t\t\t\t\t\t// Just call the method an insert the return value into the table cell\n\t\t\t\t\t\t$table .= \"<td>\". $dataObject->$dataMethod() .\"</td>\";\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$rf = new \\ReflectionFunction($dataMethod);\n\t\t\t\t\t\tif ($rf->isClosure()) {\n\n\t\t\t\t\t\t\t// Call the closure and get the result\n\t\t\t\t\t\t\t$value = $dataMethod($dataObject, $this);\n\n\t\t\t\t\t\t\t$table .= \"<td>\". $value .\"</td>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$table .= \"</tr>\";\t// End the table row\n\t\t\t\t$row++;\n\t\t\t}\n\n\t\t\t// Render the footer row\n\t\t\t$table = $this->renderFooter($table);\n\n\t\t}\n\n\t\t$table .= \"</tbody>\";\n\n\t\t$table .= \"</table>\";\n\t\treturn $table;\n\t}", "public function render()\n {\n $chromosome = explode(\",\", $this->timetable->chromosome);\n $scheme = explode(\",\", $this->timetable->scheme);\n $data = $this->generateData($chromosome, $scheme);\n\n $days = $this->timetable->days()->orderBy('id', 'ASC')->get();\n $timeslots = TimeslotModel::orderBy('rank', 'ASC')->get();\n $classes = CollegeClassModel::all();\n\n $tableTemplate = '<h3 class=\"text-center\">{TITLE}</h3>\n <div style=\"page-break-after: always\">\n <table class=\"table table-bordered\">\n <thead>\n {HEADING}\n </thead>\n <tbody>\n {BODY}\n </tbody>\n </table>\n </div>';\n\n $content = \"\";\n\n foreach ($classes as $class) {\n $header = \"<tr class='table-head'>\";\n $header .= \"<td>Days</td>\";\n\n foreach ($timeslots as $timeslot) {\n $header .= \"\\t<td>\" . $timeslot->time . \"</td>\";\n }\n\n $header .= \"</tr>\";\n\n $body = \"\";\n\n foreach ($days as $day) {\n $body .= \"<tr><td>\" . strtoupper($day->short_name) . \"</td>\";\n foreach ($timeslots as $timeslot) {\n if (isset($data[$class->id][$day->name][$timeslot->time])) {\n $body .= \"<td class='text-center'>\";\n $slotData = $data[$class->id][$day->name][$timeslot->time];\n $courseCode = $slotData['course_code'];\n $courseName = $slotData['course_name'];\n $professor = $slotData['professor'];\n $room = $slotData['room'];\n\n $body .= \"<span class='course_code'>{$courseCode}</span><br />\";\n $body .= \"<span class='room pull-left'>{$room}</span>\";\n $body .= \"<span class='professor pull-right'>{$professor}</span>\";\n\n $body .= \"</td>\";\n } else {\n $body .= \"<td></td>\";\n }\n }\n $body .= \"</tr>\";\n }\n\n $title = $class->name;\n $content .= str_replace(['{TITLE}', '{HEADING}', '{BODY}'], [$title, $header, $body], $tableTemplate);\n }\n\n $path = 'public/timetables/timetable_' . $this->timetable->id . '.html';\n Storage::put($path, $content);\n\n $this->timetable->update([\n 'file_url' => $path\n ]);\n }", "public static function day_calendar($day, $month, $year) {\r\n global $langNoEvents, $langDay, $langWeek, $langMonth, $langViewShow;\r\n\r\n $calendar_content = \"\";\r\n if (is_null($day)) {\r\n $day = 1;\r\n }\r\n $nextdaydate = new DateTime(\"$year-$month-$day\");\r\n $nextdaydate->add(new DateInterval('P1D'));\r\n $previousdaydate = new DateTime(\"$year-$month-$day\");\r\n $previousdaydate->sub(new DateInterval('P1D'));\r\n\r\n $thisday = new DateTime(\"$year-$month-$day\");\r\n $daydescription = ucfirst(format_locale_date($thisday->getTimestamp()));\r\n\r\n $backward = array('day'=>$previousdaydate->format('d'), 'month'=>$previousdaydate->format('m'), 'year' => $previousdaydate->format('Y'));\r\n $foreward = array('day'=>$nextdaydate->format('d'), 'month'=>$nextdaydate->format('m'), 'year' => $nextdaydate->format('Y'));\r\n\r\n $calendar_content .= '<div class=\"right\" style=\"width:100%\">'.$langViewShow.':&nbsp;'.\r\n '<a href=\"#\" onclick=\"show_day(selectedday, selectedmonth, selectedyear);return false;\">'.$langDay.'</a>&nbsp;|&nbsp;'.\r\n '<a href=\"#\" onclick=\"show_week(selectedday, selectedmonth, selectedyear);return false;\">'.$langWeek.'</a>&nbsp;|&nbsp;'.\r\n '<a href=\"#\" onclick=\"show_month(selectedday, selectedmonth, selectedyear);return false;\">'.$langMonth.'</a></div>';\r\n\r\n $calendar_content .= \"<table class='table-default'>\";\r\n $calendar_content .= \"<tr>\";\r\n $calendar_content .= '<td width=\"25\"><a href=\"#\" onclick=\"show_day('.$backward['day'].','.$backward['month'].','.$backward['year'].'); return false;\">&laquo;</a></td>';\r\n $calendar_content .= \"<td class='center'><b>$daydescription</b></td>\";\r\n $calendar_content .= '<td width=\"25\" class=\"right\"><a href=\"#\" onclick=\"show_day('.$foreward['day'].','.$foreward['month'].','.$foreward['year'].'); return false;\">&raquo;</a></td>';\r\n $calendar_content .= \"</tr>\";\r\n $calendar_content .= \"</table>\";\r\n\r\n $eventlist = Calendar_Events::get_calendar_events(\"day\", \"$year-$month-$day\");\r\n $calendar_content .= \"<table class='table-default'>\";\r\n\r\n $curhour = 0;\r\n $now = getdate();\r\n $today = new DateTime($now['year'].'-'.$now['mon'].'-'.$now['mday'].' '.$now['hours'].':'.$now['minutes']);\r\n if ($now['year'].'-'.$now['mon'].'-'.$now['mday'] == \"$year-$month-$day\") {\r\n $thisdayistoday = true;\r\n }\r\n else{\r\n $thisdayistoday = false;\r\n }\r\n $thishour = new DateTime($today->format('Y-m-d H:00'));\r\n $cursorhour = new DateTime(\"$year-$month-$day 00:00\");\r\n $curstarthour = \"\";\r\n\r\n foreach ($eventlist as $thisevent) {\r\n $thiseventstart = new DateTime($thisevent->start);\r\n $thiseventhour = new DateTime($thiseventstart->format('Y-m-d H:00'));\r\n if ($curstarthour != $thiseventhour) { //event date changed\r\n while($cursorhour < $thiseventhour) {\r\n if ($thisdayistoday && $thishour>=$cursorhour && intval($cursorhour->diff($thishour,true)->format('%h'))<6)\r\n $class = 'today';\r\n else\r\n $class = 'monthLabel';\r\n $calendar_content .= \"<tr><td colspan='3' class='$class'>\" . \"&nbsp;<b>\" . ucfirst($cursorhour->format('H:i')) . \"</b></td></tr>\";\r\n if (intval($cursorhour->diff($thiseventhour,true)->format('%h'))>6) {\r\n $calendar_content .= \"<tr><td colspan='3'>$langNoEvents</td></tr>\";\r\n }\r\n $cursorhour->add(new DateInterval('PT6H'));\r\n $curhour += 6;\r\n }\r\n\r\n if ($thisdayistoday && $thishour>=$cursorhour && intval($cursorhour->diff($thishour,true)->format('%h'))<6)\r\n $class = 'today';\r\n else\r\n $class = 'monthLabel';\r\n //No hour tr for the event\r\n //$calendar_content .= \"<tr><td colspan='3' class='$class'>\" . \"&nbsp;<b>\" . ucfirst($thiseventhour->format('H:i')) . \"</b></td></tr>\";\r\n if ($cursorhour <= $thiseventhour) {\r\n $cursorhour->add(new DateInterval('PT6H'));\r\n $curhour += 6;\r\n }\r\n }\r\n $calendar_content .= Calendar_Events::day_calendar_item($thisevent, 'even');\r\n $curstarthour = $thiseventhour;\r\n }\r\n /* Fill with empty days*/\r\n for($i=$curhour;$i<24;$i+=6) {\r\n if ($thisdayistoday && $thishour>=$cursorhour && intval($cursorhour->diff($thishour,true)->format('%h'))<6)\r\n $class = 'today';\r\n else\r\n $class = 'monthLabel';\r\n $calendar_content .= \"<tr><td colspan='3' class='$class'>\" . \"&nbsp;<b>\" . ucfirst($cursorhour->format('H:i')) . \"</b></td></tr>\";\r\n $calendar_content .= \"<tr><td colspan='3'>$langNoEvents</td></tr>\";\r\n $cursorhour->add(new DateInterval('PT6H'));\r\n }\r\n $calendar_content .= \"</table>\";\r\n /* Legend */\r\n $calendar_content .= Calendar_Events::calendar_legend();\r\n\r\n return $calendar_content;\r\n }", "public function getCalendarPage();", "private function Write_Monthly_Table() {\n\t\t$top = 445 + self::VERT_MARGIN;\n\t\t$left = self::HORZ_MARGIN;\n\t\t$label_width = 160;\n\t\t$table_left = $left + $label_width;\n\t\t$cell_width = 55;\n\t\t$row_height = 8.5;\n\t\t\n\t\t/**\n\t\t * Build label backgrounds\n\t\t */\n\t\t$this->pdf->setcolor('fill', 'gray', 0.75, 0, 0, 0);\n\t\t$this->Rect_TL($left, $top, $label_width + ($cell_width * 1), $row_height);\n\t\t$this->pdf->fill();\n\t\t\n\t\t/**\n\t\t * Add the strokes\n\t\t */\n\t\t$this->Rect_TL($table_left, $top, $cell_width, $row_height);\n\t//\t$this->Rect_TL($table_left + ($cell_width * 1), $top, $cell_width, $row_height);\n\t//\t$this->Rect_TL($table_left + ($cell_width * 2), $top, $cell_width, $row_height);\n\t\t$this->pdf->stroke();\n\t\t\n\t\t/**\n\t\t * Add the labels\n\t\t */\n\t\t$this->Text_TL(\"CURRENT PERIOD\",\n\t\t\t$left, $top, \n\t\t\t$label_width, $row_height,\n\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['ITALICS']} {$this->formats['LEFT']}\");\n\t\t\n\t\t$this->Text_TL(\"PERIOD\",\n\t\t\t$table_left, $top, \n\t\t\t$cell_width, $row_height,\n\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['ITALICS']} {$this->formats['CENTER']}\");\n\t\t\n\t\t/*$this->Text_TL(\"WEEK\",\n\t\t\t$table_left + ($cell_width * 1), $top, \n\t\t\t$cell_width, $row_height,\n\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['ITALICS']} {$this->formats['CENTER']}\");\n\t\t\n\t\t$this->Text_TL(\"MONTH\",\n\t\t\t$table_left + ($cell_width * 2), $top, \n\t\t\t$cell_width, $row_height,\n\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['ITALICS']} {$this->formats['CENTER']}\");*/\n\t\t\t\n\t\t$current_row = 1;\n\t\t$totals = array(\n\t\t\t'weekly' => 0,\n\t\t\t'biweekly' => 0,\n\t\t\t'semimonthly' => 0,\n\t\t\t'monthly' => 0,\n\t\t);\n\t\tforeach ($this->data['period'] as $label => $values) {\n\t\t\t/**\n\t\t\t * Special processing\n\t\t\t */\n\t\t\tswitch ($label) {\n\t\t\t\tcase 'nsf$':\n\t\t\t\t\tcontinue 2;\n\t\t\t\tcase 'debit returns':\n//\t\t\t\t\t$this->pdf->setcolor('fill', 'rgb', 1, 1, 176/255, 0);\n//\t\t\t\t\t$this->Rect_TL($table_left + ($cell_width * 1), $top + ($row_height * $current_row), $cell_width, $row_height);\n//\t\t\t\t\t$this->pdf->fill();\n\t\t\t\t\t\n//\t\t\t\t\t$this->Rect_TL($table_left + ($cell_width * 1), $top + ($row_height * $current_row), $cell_width, $row_height);\n//\t\t\t\t\t$this->pdf->stroke();\n\t\t\t\t\t/*$percentage = $values['month']? number_format($values['month'] / $this->data['monthly']['total debited']['month'] * 100, 1):0;\n\t\t\t\t\t$this->Text_TL($percentage.'%',\n\t\t\t\t\t\t$table_left + ($cell_width * 3), $top + ($row_height * $current_row), \n\t\t\t\t\t\t$cell_width, $row_height,\n\t\t\t\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['CENTER']}\");*/\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'net cash collected':\n\t\t\t\t\t$this->pdf->setcolor('fill', 'rgb', 1, 1, 176/255, 0);\n\t\t\t\t\t$this->Rect_TL($table_left, $top + ($row_height * $current_row), $cell_width, $row_height);\n\t\t\t\t\t//$this->Rect_TL($table_left + ($cell_width * 1), $top + ($row_height * $current_row), $cell_width, $row_height);\n\t\t\t\t\t//$this->Rect_TL($table_left + ($cell_width * 2), $top + ($row_height * $current_row), $cell_width, $row_height);\n\t\t\t\t\t$this->pdf->fill();\n\t\t\t\t\t\n\t\t\t\t\t//$this->Text_TL(number_format($this->data['period']['total debited']['span'] - $this->data['period']['debit returns']['span'], 2),\n\t\t\t\t\t$this->Text_TL(number_format($this->data['period']['total debited']['span'] - $this->data['period']['nsf$']['span'], 2),\n\t\t\t\t\t\t$table_left, $top + ($row_height * $current_row), \n\t\t\t\t\t\t$cell_width, $row_height,\n\t\t\t\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\t\t\t\t\t\t\n\t\t\t\t\t/*$this->Text_TL(number_format($this->data['monthly']['total debited']['week'] - $this->data['monthly']['debit returns']['week'], 2),\n\t\t\t\t\t\t$table_left + ($cell_width * 1), $top + ($row_height * $current_row), \n\t\t\t\t\t\t$cell_width, $row_height,\n\t\t\t\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\t\t\t\t\t$this->Text_TL(number_format($this->data['monthly']['total debited']['month'] - $this->data['monthly']['debit returns']['month'], 2),\n\t\t\t\t\t\t$table_left + ($cell_width * 2), $top + ($row_height * $current_row), \n\t\t\t\t\t\t$cell_width, $row_height,\n\t\t\t\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");*/\n\t\t\t\t\tbreak;\n\t\t\t\t//FORBIDDEN ROWS!\n\t\t\t\tcase 'moneygram deposit':\n\t\t\t\t//case 'credit card payments':\n\t\t\t\t\tcontinue 2;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t\t$format_decimals = 0;\n\t\t\tswitch ($label) {\n\t\t\t\tcase 'new customers':\n\t\t\t\tcase 'card reactivations':\n\t\t\t\tcase 'reactivated customers':\n\t\t\t\tcase 'refunded customers':\n\t\t\t\tcase 'resend customers':\n\t\t\t\tcase 'cancelled customers':\n\t\t\t\tcase 'paid out customers (ach)':\n\t\t\t\tcase 'paid out customers (non-ach)':\n\t\t\t\t\t$format_decimals = 0;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$format_decimals = 2;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t$this->pdf->setcolor('fill', 'gray', 0.75, 0, 0, 0);\n\t\t\t$this->Rect_TL($left, $top + ($row_height * $current_row), $label_width, $row_height);\n\t\t\t$this->pdf->fill();\n\t\t\t\n\t\t\t$this->Rect_TL($table_left, $top + ($row_height * $current_row), $cell_width, $row_height);\n//\t\t\t$this->Rect_TL($table_left + ($cell_width * 1), $top + ($row_height * $current_row), $cell_width, $row_height);\n//\t\t\t$this->Rect_TL($table_left + ($cell_width * 2), $top + ($row_height * $current_row), $cell_width, $row_height);\n\t\t\t$this->pdf->stroke();\n\t\t\t\n\t\t\t$this->Text_TL(strtoupper($label),\n\t\t\t\t$left + $label_indent, $top + ($row_height * $current_row), \n\t\t\t\t$label_width - $label_indent, $row_height,\n\t\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['ITALICS']} {$this->formats['RIGHT']}\");\n\t\t\t\n\t\t\tif ($label != 'net cash collected') {\n\t\t\t\t$this->Text_TL(number_format($values['span'], $format_decimals),\n\t\t\t\t\t$table_left, $top + ($row_height * $current_row), \n\t\t\t\t\t$cell_width, $row_height,\n\t\t\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\t\t\t\t\n\t\t\t\t/*$this->Text_TL(number_format($values['week'], $format_decimals),\n\t\t\t\t\t$table_left + ($cell_width * 1), $top + ($row_height * $current_row), \n\t\t\t\t\t$cell_width, $row_height,\n\t\t\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\t\t\t\t\n\t\t\t\t$this->Text_TL(number_format($values['month'], $format_decimals),\n\t\t\t\t\t$table_left + ($cell_width * 2), $top + ($row_height * $current_row), \n\t\t\t\t\t$cell_width, $row_height,\n\t\t\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");*/\n\t\t\t}\n\t\t\t\n\t\t\t$current_row++;\n\t\t}\n\t\t\n\t\t/**\n\t\t * Advances in Collection\n\t\t */\n\t\t$this->pdf->setcolor('fill', 'gray', 0.75, 0, 0, 0);\n\t\t$this->Rect_TL($left, $top + ($row_height * $current_row), $label_width, $row_height);\n\t\t$this->pdf->fill();\n\t\t\n\t\t$this->Rect_TL($table_left, $top + ($row_height * $current_row), $cell_width, $row_height);\n\t\t$this->pdf->stroke();\n\t\t\n\t\t$this->Text_TL(\"ADVANCES IN COLLECTION\",\n\t\t\t$left, $top + ($row_height * $current_row), \n\t\t\t$label_width, $row_height,\n\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['ITALICS']} {$this->formats['RIGHT']}\");\n\t\t\n\t\t$this->Text_TL(number_format($this->data['advances_collections'], 2),\n\t\t\t$table_left, $top + ($row_height * $current_row), \n\t\t\t$cell_width, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\t\t\n\t\t/**\n\t\t * Advances in Active\n\t\t */\n\t\t$this->pdf->setcolor('fill', 'gray', 0.75, 0, 0, 0);\n\t\t$this->Rect_TL($table_left + ($cell_width * 4), $top + ($row_height * $current_row), $cell_width * 2, $row_height);\n\t\t$this->pdf->fill();\n\t\t\n\t\t$this->Rect_TL($table_left + ($cell_width * 6), $top + ($row_height * $current_row), $cell_width, $row_height);\n\t\t$this->pdf->stroke();\n\t\t\n\t\t$this->Text_TL(\"ACTIVE ADVANCES OUT\",\n\t\t\t$table_left + ($cell_width * 4), $top + ($row_height * $current_row), \n\t\t\t$cell_width * 2, $row_height,\n\t\t\t\"{$this->formats['BOLD_FONT']} {$this->formats['ITALICS']} {$this->formats['RIGHT']}\");\n\t\t\n\t\t$this->Text_TL(number_format($this->data['advances_active'], 2),\n\t\t\t$table_left + ($cell_width * 6), $top + ($row_height * $current_row), \n\t\t\t$cell_width, $row_height,\n\t\t\t\"{$this->formats['NORMAL_FONT']} {$this->formats['RIGHT']}\");\n\t\t\n\t}", "function draw() {\n\t\t$currentMonthInfo = getdate($this->_monthTimestamp);\n\t\t$nextMonthInfo = getdate($this->_nextMonthTimestamp());\n\t\t$prevMonthInfo = getdate($this->_previousMonthTimestamp());\n\t\t\n\t\t$prevLinkTop = \"\";\n\t\t$nextLinkTop = \"\";\n\t\t$prevLinkBottom = \"\";\n\t\t$nextLinkBottom = \"\";\n\t\t$extraVars = \"\";\n\t\t$varBase = \"\";\n\t\tif ($this->_submitMethod == \"post\") {\n\t\t\tif (sizeof($this->_extraVars) > 0) {\n\t\t\t\tforeach ($this->_extraVars as $extraVar=>$extraVal) {\n\t\t\t\t\t$extraVars .= \"<input type=\\\"hidden\\\" name=\\\"\".htmlentities($extraVar).\"\\\" value=\\\"\".htmlentities($extraVal).\"\\\" />\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t$varBase = \"<a href=\\\"javascript: document.forms['%s'].submit()\\\"><form name=\\\"%s\\\" action=\\\"\".$_SERVER['PHP_SELF'].\"\\\" method=\\\"post\\\" style=\\\"display: inline; margin: 0; padding: 0\\\"><input type=\\\"hidden\\\" name=\\\"\".$this->_monthParamName.\"\\\" value=\\\"%s\\\" /><input type=\\\"hidden\\\" name=\\\"\".$this->_yearParamName.\"\\\" value=\\\"%s\\\" />\".$extraVars.\"</form>%s</a>\";\n\t\t\t$prevLinkTop = sprintf($varBase, \"prevLinkTop\", \"prevLinkTop\", $prevMonthInfo['mon'], $prevMonthInfo['year'], \"<span class=\\\"link_arrows\\\">&lt;&lt;</span> <span class=\\\"link_month\\\">\".$prevMonthInfo['month'].\"</span> <span class=\\\"link_year\\\">\".$prevMonthInfo['year'].\"</span>\");\n\t\t\t$nextLinkTop = sprintf($varBase, \"nextLinkTop\", \"nextLinkTop\", $nextMonthInfo['mon'], $nextMonthInfo['year'], \"<span class=\\\"link_month\\\">\".$nextMonthInfo['month'].\"</span> <span class=\\\"link_year\\\">\".$nextMonthInfo['year'].\"</span> <span class=\\\"link_arrows\\\">&gt;&gt;</span>\");\n\t\t\t$prevLinkBottom = sprintf($varBase, \"prevLinkBottom\", \"prevLinkBottom\", $prevMonthInfo['mon'], $prevMonthInfo['year'], \"<span class=\\\"link_arrows\\\">&lt;&lt;</span> <span class=\\\"link_month\\\">\".$prevMonthInfo['month'].\"</span> <span class=\\\"link_year\\\">\".$prevMonthInfo['year'].\"</span>\");\n\t\t\t$nextLinkBottom = sprintf($varBase, \"nextLinkBottom\", \"nextLinkBottom\", $nextMonthInfo['mon'], $nextMonthInfo['year'], \"<span class=\\\"link_month\\\">\".$nextMonthInfo['month'].\"</span> <span class=\\\"link_year\\\">\".$nextMonthInfo['year'].\"</span> <span class=\\\"link_arrows\\\">&gt;&gt;</span>\");\n\t\t}\n\t\telse {\n\t\t\tif (sizeof($this->_extraVars) > 0) {\n\t\t\t\tforeach ($this->_extraVars as $extraVar=>$extraVal) {\n\t\t\t\t\t$extraVars .= \"&amp;\".urlencode($extraVar).\"=\".urlencode($extraVal);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$varBase = \"<a href=\\\"\".$_SERVER['PHP_SELF'].\"?\".$this->_monthParamName.\"=%s&amp;\".$this->_yearParamName.\"=%s\".$extraVars.\"\\\">%s</a>\";\n\t\t\t$prevLinkTop = $prevLinkBottom = sprintf($varBase, $prevMonthInfo['mon'], $prevMonthInfo['year'], \"<span class=\\\"link_arrows\\\">&lt;&lt;</span> <span class=\\\"link_month\\\">\".$prevMonthInfo['month'].\"</span> <span class=\\\"link_year\\\">\".$prevMonthInfo['year'].\"</span>\");\n\t\t\t$nextLinkTop = $nextLinkBottom = sprintf($varBase, $nextMonthInfo['mon'], $nextMonthInfo['year'], \"<span class=\\\"link_month\\\">\".$nextMonthInfo['month'].\"</span> <span class=\\\"link_year\\\">\".$nextMonthInfo['year'].\"</span> <span class=\\\"link_arrows\\\">&gt;&gt;</span>\");\n\t\t}\n\t\t\n\t\tprint '<div class=\"calendar_container\">\n\t<table class=\"calendar\">\n\t\t<tr class=\"calendar_title_row_top\">\n\t\t\t<td class=\"calendar_cell calendar_previous_link\" colspan=\"'.(($this->_showPreWeekColumn) ? '3' : '2').'\">'.$prevLinkTop.'</td>\n\t\t\t<td class=\"calendar_cell calendar_title\" colspan=\"3\"><span>'.$this->calendarTitleCellContent().'</span></td>\n\t\t\t<td class=\"calendar_cell calendar_next_link\" colspan=\"'.(($this->_showPostWeekColumn) ? '3' : '2').'\">'.$nextLinkTop.'</td>\n\t\t</tr>\n\t\t<tr class=\"calendar_header_row_top\">'.\"\\n\";\n\t\tif ($this->_showPreWeekColumn) print '\t\t\t<th class=\"calendar_cell calendar_column_0\" width=\"0\"><span>'.$this->_fillContent($this->preWeekColumnHeader()).'</span></th>'.\"\\n\";\n\t\tprint '\t\t\t<th class=\"calendar_cell calendar_column_1\" width=\"14%\"><span>'.$this->_fillContent($this->SundayColumnHeader()).'</span></th>\n\t\t\t<th class=\"calendar_cell calendar_column_2\" width=\"14%\"><span>'.$this->_fillContent($this->MondayColumnHeader()).'</span></th>\n\t\t\t<th class=\"calendar_cell calendar_column_3\" width=\"14%\"><span>'.$this->_fillContent($this->TuesdayColumnHeader()).'</span></th>\n\t\t\t<th class=\"calendar_cell calendar_column_4\" width=\"14%\"><span>'.$this->_fillContent($this->WednesdayColumnHeader()).'</span></th>\n\t\t\t<th class=\"calendar_cell calendar_column_5\" width=\"14%\"><span>'.$this->_fillContent($this->ThursdayColumnHeader()).'</span></th>\n\t\t\t<th class=\"calendar_cell calendar_column_6\" width=\"14%\"><span>'.$this->_fillContent($this->FridayColumnHeader()).'</span></th>\n\t\t\t<th class=\"calendar_cell calendar_column_7\" width=\"14%\"><span>'.$this->_fillContent($this->SaturdayColumnHeader()).'</span></th>'.\"\\n\";\n\t\tif ($this->_showPostWeekColumn) print '\t\t\t<th class=\"calendar_cell calendar_column_8\" width=\"0\"><span>'.$this->_fillContent($this->postWeekColumnHeader()).'</span></th>'.\"\\n\";\n\t\tprint '\t\t</tr>'.\"\\n\";\n\t\t\t\n\t\t$iDaysPerWeek = 7;\n\t\t$iCurrDay = 0;\n\t\t$iCurrWeek = 1;\n\t\t$iCounter = 0;\n\n\t\t//Write any initial blank days\n\t\tif ($currentMonthInfo['wday'] > 0) {\n\t\t\tprint '\t\t<tr class=\"calendar_week_row\" id=\"calendar_week_'.$iCurrWeek.'\">'.\"\\n\";\n\t\t\tif ($this->_showPreWeekColumn) print '\t\t\t<td class=\"calendar_cell calendar_column_0 calendar_day calendar_day_0\" id=\"calendar_week_'.$iCurrWeek.'_column_0\"><div class=\"calendar_day_date\"><span>&nbsp;</span></div><div class=\"calendar_day_content\"><span>'.((array_key_exists($iCurrWeek,$this->_preWeekArray)) ? $this->_fillContent($this->_preWeekArray[($iCurrWeek)]) : \"\").'</span></div></td>'.\"\\n\";\n\t\t\twhile ($iCounter < $currentMonthInfo['wday'] && $iCounter < $iDaysPerWeek) {\n\t\t\t\tprint '\t\t\t<td class=\"calendar_cell calendar_column_'.(($iCounter % $iDaysPerWeek) + 1).' calendar_day calendar_day_0\">\n\t\t\t\t<div class=\"calendar_day_container\">\n\t\t\t\t\t<div class=\"calendar_day_date\"><span>&nbsp;</span></div>\n\t\t\t\t\t<div class=\"calendar_day_content\"><span>&nbsp;</span></div>\n\t\t\t\t</div>\n\t\t\t</td>'.\"\\n\";\n\t\t\t\t$iCounter++;\n\t\t\t}\n\t\t\tif ($iCounter % $iDaysPerWeek == $iDaysPerWeek) {\n\t\t\t\tif ($this->_showPostWeekColumn) print '\t\t\t<td class=\"calendar_cell calendar_column_8 calendar_day calendar_day_0\" id=\"calendar_week_'.$iCurrWeek.'_column_8\"><div class=\"calendar_day_date\"><span>&nbsp;</span></div><div class=\"calendar_day_content\"><span>'.((array_key_exists($iCurrWeek,$this->_postWeekArray)) ? $this->_fillContent($this->_postWeekArray[($iCurrWeek)]) : \"\").'</span></div></td>'.\"\\n\";\n\t\t\t\tprint '\t\t</tr>'.\"\\n\";\n\t\t\t\t$iCurrWeek++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t//Pick up at the first day and continue through end of month\n\t\twhile ($iCurrDay < $this->_currentMonthNumDays) {\n\t\t\t$this->_dayTimestamp = mktime(0,0,0,$this->_currentMonth,($iCurrDay + 1),$this->_currentYear);\n\t\t\t\n\t\t\tif ($iCounter % $iDaysPerWeek == 0) {\n\t\t\t\tprint '\t\t<tr class=\"calendar_week_row\" id=\"calendar_week_'.$iCurrWeek.'\">'.\"\\n\";\n\t\t\t\tif ($this->_showPreWeekColumn) print '\t\t\t<td class=\"calendar_cell calendar_column_0 calendar_day calendar_day_0\" id=\"calendar_week_'.$iCurrWeek.'_column_0\"><div class=\"calendar_day_date\"><span>&nbsp;</span></div><div class=\"calendar_day_content\"><span>'.((array_key_exists($iCurrWeek,$this->_preWeekArray)) ? $this->_fillContent($this->_preWeekArray[($iCurrWeek)]) : \"\").'</span></div></td>'.\"\\n\";\n\t\t\t}\n\t\t\t\n\t\t\tprint '\t\t\t<td class=\"calendar_cell calendar_column_'.(($iCounter % $iDaysPerWeek) + 1).' calendar_day '.((trim($this->_dateArray[($iCurrDay + 1)]) == \"\") ? 'calendar_day_no_content' : 'calendar_day_with_content').((date('Ymd') == date('Ymd',mktime(0,0,0,$this->_currentMonth,$iCurrDay + 1,$this->_currentYear))) ? ' calendar_day_today' : '').'\" id=\"calendar_date_'.($iCurrDay + 1).'\">\n\t\t\t\t<div class=\"calendar_day_container\">\n\t\t\t\t\t<div class=\"calendar_day_date\"><span>'.($iCurrDay + 1).'</span></div>\n\t\t\t\t\t<div class=\"calendar_day_content\"><span>'.((array_key_exists($iCurrDay + 1,$this->_dateArray)) ? $this->_fillContent($this->_dateArray[($iCurrDay + 1)]) : \"\").'</span></div>\n\t\t\t\t</div>\n\t\t\t</td>'.\"\\n\";\n\t\t\t\n\t\t\tif ($iCounter % $iDaysPerWeek == $iDaysPerWeek - 1) {\n\t\t\t\tif ($this->_showPostWeekColumn) print '\t\t\t<td class=\"calendar_cell calendar_column_8 calendar_day calendar_day_0\" id=\"calendar_week_'.$iCurrWeek.'_column_8\"><div class=\"calendar_day_date\"><span>&nbsp;</span></div><div class=\"calendar_day_content\"><span>'.((array_key_exists($iCurrWeek,$this->_postWeekArray)) ? $this->_fillContent($this->_postWeekArray[($iCurrWeek)]) : \"\").'</span></div></td>'.\"\\n\";\n\t\t\t\tprint '\t\t</tr>'.\"\\n\";\n\t\t\t\t$iCurrWeek++;\n\t\t\t}\n\t\t\t\n\t\t\t$iCurrDay++;\n\t\t\t$iCounter++;\n\t\t}\n\t\t\n\t\t//Write any remaining TD's\n\t\tif (($iCounter % $iDaysPerWeek) > 0 && ($iCounter % $iDaysPerWeek) <= ($iDaysPerWeek - 1)) {\n\t\t\twhile (($iCounter % $iDaysPerWeek) !== 0) {\n\t\t\t\tprint '\t\t\t<td class=\"calendar_cell calendar_column_'.(($iCounter % $iDaysPerWeek) + 1).' calendar_day calendar_day_0\">\n\t\t\t\t<div class=\"calendar_day_container\">\n\t\t\t\t\t<div class=\"calendar_day_date\"><span>&nbsp;</span></div>\n\t\t\t\t\t<div class=\"calendar_day_content\"><span>&nbsp;</span></div>\n\t\t\t\t</div>\n\t\t\t</td>'.\"\\n\";\n\t\t\t\t$iCounter++;\n\t\t\t}\n\t\t\tif ($this->_showPostWeekColumn) print '\t\t\t<td class=\"calendar_cell calendar_column_8 calendar_day calendar_day_0\" id=\"calendar_week_'.$iCurrWeek.'_column_8\"><div class=\"calendar_day_date\"><span>&nbsp;</span></div><div class=\"calendar_day_content\"><span>'.((array_key_exists($iCurrWeek,$this->_postWeekArray)) ? $this->_fillContent($this->_postWeekArray[($iCurrWeek)]) : \"\").'</span></div></td>'.\"\\n\";\n\t\t\tprint '\t\t</tr>'.\"\\n\";\n\t\t}\n\t\t\n\t\t//Reset dayTimestamp to beginning of month\n\t\t$this->_dayTimestamp = $this->_monthTimestamp;\n\t\t\n\t\t//Finish writing table elements\n\t\tprint '\t\t<tr class=\"calendar_header_row_bottom\">'.\"\\n\";\n\t\tif ($this->_showPreWeekColumn) print '\t\t\t<th class=\"calendar_cell calendar_column_0\" width=\"0\"><span>'.$this->_fillContent($this->preWeekColumnHeader()).'</span></th>'.\"\\n\";\n\t\tprint '\t\t\t<th class=\"calendar_cell calendar_column_1\" width=\"14%\"><span>'.$this->_fillContent($this->SundayColumnHeader()).'</span></th>\n\t\t\t<th class=\"calendar_cell calendar_column_2\" width=\"14%\"><span>'.$this->_fillContent($this->MondayColumnHeader()).'</span></th>\n\t\t\t<th class=\"calendar_cell calendar_column_3\" width=\"14%\"><span>'.$this->_fillContent($this->TuesdayColumnHeader()).'</span></th>\n\t\t\t<th class=\"calendar_cell calendar_column_4\" width=\"14%\"><span>'.$this->_fillContent($this->WednesdayColumnHeader()).'</span></th>\n\t\t\t<th class=\"calendar_cell calendar_column_5\" width=\"14%\"><span>'.$this->_fillContent($this->ThursdayColumnHeader()).'</span></th>\n\t\t\t<th class=\"calendar_cell calendar_column_6\" width=\"14%\"><span>'.$this->_fillContent($this->FridayColumnHeader()).'</span></th>\n\t\t\t<th class=\"calendar_cell calendar_column_7\" width=\"14%\"><span>'.$this->_fillContent($this->SaturdayColumnHeader()).'</span></th>'.\"\\n\";\n\t\tif ($this->_showPostWeekColumn) print '\t\t\t<th class=\"calendar_cell calendar_column_8\" width=\"0\"><span>'.$this->_fillContent($this->postWeekColumnHeader()).'</span></th>'.\"\\n\";\n\t\tprint '\t\t</tr>\n\t\t<tr class=\"calendar_title_row_bottom\">\n\t\t\t<td class=\"calendar_cell calendar_previous_link\" colspan=\"'.(($this->_showPreWeekColumn) ? '3' : '2').'\">'.$prevLinkBottom.'</td>\n\t\t\t<td class=\"calendar_cell calendar_title\" colspan=\"3\"><span>'.$this->calendarTitleCellContent().'</span></td>\n\t\t\t<td class=\"calendar_cell calendar_next_link\" colspan=\"'.(($this->_showPostWeekColumn) ? '3' : '2').'\">'.$nextLinkBottom.'</td>\n\t\t</tr>\n\t</table>\n</div>'.\"\\n\";\n\t}", "private function buildCalendar($opt)\n {\n $day_names = $this->getLang('yearbox_days');\n $cal = '';\n\n list($years, $first_weekday, $table_cols, $today) = $this->defineCalendar($opt);\n end($years);\n $last_year = key($years);\n\n // initial CSS\n $font_css = ($opt['size'] != 0) ? ' style=\"font-size:' . $opt['size'] . 'px;\"' : '';\n if ($opt['align'] == 'left') {\n $align = ' class=left';\n } elseif ($opt['align'] == 'right') {\n $align = ' class=right';\n } else {\n $align = '';\n }\n $cal .= '<div class=\"yearbox\"' . $font_css . '><table' . $align . '><tbody>';\n\n foreach ($years as $year_num => $year) {\n // display the year and day-of-week header\n $cal .= '<tr class=\"yr-header\">';\n for ($col = 0; $col < $table_cols; $col++) {\n $weekday_num = ($col + $first_weekday) % 7; // current day of week as a number\n if ($col == 0) {\n $cal .= '<th class=\"plain\">' . $year_num . '</th>';\n }\n $h = $day_names[$weekday_num];\n $cal .= '<th>' . $h . '</th>';\n }\n $cal .= '</tr>';\n\n foreach ($year as $mth_num => $month) {\n $cal .= $this->getMonthHTML(\n $month,\n $mth_num,\n $opt,\n $year_num,\n $table_cols,\n $first_weekday,\n $today\n );\n }\n // separator between years in a range\n if ($year_num != $last_year) {\n $cal .= '<tr class=\"blank\"><td></td></tr>';\n }\n }\n\n $cal .= '</tbody></table></div><div class=\"clearer\"></div>';\n return $cal;\n }", "function portal_dashboard_calendar_widget() {\n\n\techo portal_output_project_calendar();\n\n}", "private function makeCalendarHead()\n\t{\n\t\tif(strlen($this->headerStr) < 1) {\n\t\t\t$head = \"\\t<tr>\\n\\t\\t<th colspan=\\\"7\\\" class=\\\"headerString\\\">\";\n\t\t\tif(!is_null($this->curDay)) {\n\t\t\t\t$head .= $this->curDayName.' the '.$this->curDayS.' of '.$this->curMonthName.', '.$this->curYear;\n\t\t\t} else {\n\t\t\t\t$head .= $this->curMonthName.', '.$this->curYear;\n\t\t\t}\n\t\t\t$head .= \"</th>\\n\\t</tr>\\n\";\n\t\t} else {\n\t\t\t$head = $this->headerStr;\n\t\t}\n\t\t\n\t\t$this->calWeekDays .= $head;\n\t\t$this->outArray['head'] = $head;\n\t}", "function makeWeb()\n {\n\n $web = \"</div>No calendar information available.</div>\";\n if (isset($this->calendar->events)) {\n $web = \"\";\n foreach ($this->calendar->events as $event) {\n $timestamp = $this->textCalendar($event, [\"timestamp\"]);\n\n $web .=\n \"<div>\" .\n \"<div>\" .\n $this->thing->time_handler->textTime($timestamp) .\n \" \" .\n $event->summary .\n \" [\" .\n $event->runtime .\n \"] \" .\n \"</div><div>\" .\n $event->description .\n \"</div><div>\" .\n $event->location .\n \"</div></div>\";\n }\n }\n\n $this->thing_report[\"info\"] =\n \"Times are \" . $this->time_zone . \". Click refresh to update.\";\n\n $this->web = $web;\n $this->thing_report[\"web\"] = $this->web;\n }", "private function makeDayEventListHTML()\n\t{\n\t\t$showtext = \"\";\n\t\tforeach($this->eventItems as $item) {\n\t\t\tif($item['date'] == $this->curYear.'-'.$this->curMonth.'-'.$this->dayOfMonth) {\n\t\t\t\t$category = (strlen($item['cat']) > 0 ? 'Category: '.$item['cat'].' - ' : '');\n\t\t\t\t$outevents[$n]['category'] = $item['cat'];\n\t\t\t\t\n\t\t\t\tif($item['stdurl']) {\n\t\t\t\t\t$href = '<a href=\"'.$item['url'].'?id='.$item['id'].'\" title=\"'.$category.$item['desc'].'\">'.$item['text'].'</a>';\n\t\t\t\t\t$outevents[$n]['url'] = $item['url'].'?id='.$item['id'];\n\t\t\t\t} else {\n\t\t\t\t\t$href = (strlen($item['url']) > 0 ? '<a href=\"'.$item['url'].'\" title=\"'.$category.$item['desc'].'\">'.$item['text'].'</a>' : $item['text']);\n\t\t\t\t\t$outevents[$n]['url'] = $item['url'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$style = (strlen($item['catcolor']) > 0 ? ' style=\"background-color:#'.str_replace('#','',$item['catcolor']).';\" ' : ' style=\"background-color:#eeeeee;\" ');\n\t\t\t\t\n\t\t\t\t$showtext .= \"\\n\\t\\t\\t<div class=\\\"dayContent\\\"\".$style.\">\".$href.\"</div>\\n\\t\\t\";\n\t\t\t\t\n\t\t\t\t$outevents[$n]['summary'] = $item['text'];\n\t\t\t\t$outevents[$n]['description'] = $item['desc'];\n\t\t\t\t$outevents[$n]['categorycolor'] = (strlen($item['catcolor']) > 0 ? str_replace('#','',$item['catcolor']) : '#eeeeee');\n\t\t\t}\n\t\t\t$n++;\n\t\t}\n\t\treturn $showtext;\n\t}", "public function index()\n {\n $this->view('calendar');\n }", "function cal_body ($erster,$dat0,$dat1,$dath,$script,$params,$seldate) {\n\t$head = <<<HTML\n<table class=\"caltab2\" width=100%>\n<tr>\n<td align=center class=\"calwt\">Mon</td>\n<td align=center class=\"calwt\">Tue</td>\n<td align=center class=\"calwt\">Wed</td>\n<td align=center class=\"calwt\">Thu</td>\n<td align=center class=\"calwt\">Fri</td>\n<td align=center class=\"calwt\">Sat</td>\n<td align=center class=\"calwt\">Sun</td>\n</tr>\nHTML;\n\tif (strpos($script,'?') === false) $script .= '?';\n\t$script .= $params;\n\tif($erster!=1) {\n\t\tif($erster==0) $erster=7;\n\t\t$body .= \"<tr>\";\n\t\tfor($i=0;$i<$erster-1;$i++) {\n\t\t\t$body .= \"<td class=\\\"calat\\\">&nbsp;</td>\\n\";\n\t\t}\n\t}\n\tfor($i=1; $i<=31; $i++) {\n\t\t$dat4 = getdate(strtotime($i.\" \".$dath));\n\t\t$heute = $dat4[wday];\n\t\tif($heute==0) $heute=7;\n\t\tif($dat1[mon]==$dat4[mon]) {\n\t\t\t$stil=\"calat\";\n\t\t\t$dum1=$dat0[mday].\".\".$dat0[mon].\".\".$dat0[year];\n\t\t\t$dum2=$dat4[mday].\".\".$dat4[mon].\".\".$dat4[year];\n\t\t\tif($dum1==$dum2) {\n\t\t\t\tif(($heute==6) || ($heute==7)) {\n\t\t\t\t\t$stil=\"calhe\"; \n\t\t\t\t\t$stil_l=\"sellinkbold\"; \n\t\t\t\t} else {\n\t\t\t\t\t$stil=\"calht\"; $stil_l=\"sellink\"; \n\t\t\t\t}\n\t\t\t} else{\n\t\t\t\tif(($heute==6) || ($heute==7)) {\n\t\t\t\t\t$stil=\"calwe\"; \n\t\t\t\t\t$stil_l=\"sellinkbold\"; \n\t\t\t\t} else {\n\t\t\t\t\t$stil=\"calat\"; \n\t\t\t\t\t$stil_l=\"sellink\"; \n\t\t\t\t}\n\t\t\t}\n\t\t\t$i = sprintf('%02d',$i);\n\t\t\tif($heute==1) $body .= \"<tr>\";\n\t\t\t$seldate = sprintf(\"%04d-%02d-%02d\",$dat1[year],$dat1[mon],$i);\n\t\t\t$body .= \"<td align=center class=\\\"\".$stil.\"\\\">\".\n\t\t\t\t \"<a class=$stil_l href=\\\"${script}$seldate\\\">\".$i.\n\t\t\t\t \"</a></td>\\n\";\n\t\t\tif($heute==7) $body .= \"</tr>\";\n\t\t\t$j = $heute;\n\t\t}\n\t}\n\tif ($j < 7) {\n\t\tfor ($i=0;$i<7-$j;$i++) {\n\t\t\t$body .= \"<td class=\\\"calat\\\">&nbsp;</td>\\n\";\n\t\t}\n\t\t$body .= \"</tr>\\n\";\n\t}\n\treturn $head.$body;\n}", "public function getRender(){\n /*\n * adiciona os listeners de comportamento padrão do componente\n */\n \n //ação que executa ao clicar sobre algum evento, abre a tela com as informações carregadas\n $sFuncao = \"eventWindow.show(record, el);\";\n $this->addListener(self::EVENTO_CLICK,$sFuncao,\"view, record, el\");\n \n //ação que ocorre ao clicar sobre os grids (dia, semana, mês)\n $sFuncao = \"eventWindow.show({\"\n .\"StartDate: date,\"\n .\"IsAllDay: allDay\"\n .\"}, el);\";\n $this->addListener(self::EVENTO_DAY_CLICK,$sFuncao,\"view, date, allDay, el\");\n \n //ação que ocorre ao redimensionar (aumentar ou reduzir) o tempo de um evento\n $sFuncaoUpdate = \"var calendarEventStore = Ext.ComponentQuery.query('#\".$this->getId().\"-calendar')[0].eventStore;\"\n .\"calendarEventStore.sync({\"\n .\"callback: function(batch, operation){\"\n .\"var result = batch.operations[0].request.scope.reader.jsonData['success'];\"\n .\"if(!result){\"\n .\"calendarEventStore.rejectChanges();\"\n .\"}\"\n .\"}\"\n .\"});\";\n $this->addListener(self::EVENTO_RESIZE,$sFuncaoUpdate,\"view, record\");\n \n //ação que ocorre ao mover um evento na tela\n $this->addListener(self::EVENTO_MOVE,$sFuncaoUpdate,\"view, record\");\n \n //ação que ocorre ao iniciar a movimentação dos elementos na tela\n $sFuncao = \"if(eventWindow && eventWindow.isVisible()){\"\n .\"eventWindow.hide();\"\n .\"}\";\n $this->addListener(self::EVENTO_DRAG,$sFuncao,\"view\");\n \n //ação que ocorre após selecionar várias linhas no grid (permite criar novo eventos por intervalos)\n $sFuncao = \"eventWindow.show(dates);\"\n .\"eventWindow.on('hide', onComplete, this, {single:true});\";\n $this->addListener(self::EVENTO_RANGE,$sFuncao,\"window, dates, onComplete\");\n \n /*\n * eventos que podem ser implementados no componente\n */\n //$this->addListener(self::EVENTO_OVER,\"\",\"view, record, el\");\n //$this->addListener(self::EVENTO_OUT,\"\",\"view, record, el\");\n //$this->addListener(self::EVENTO_ADD,$sFuncao,\"form, record\");\n //$this->addListener(self::EVENTO_UPDATE,$sFuncao,\"form, record\");\n //$this->addListener(self::EVENTO_DELETE,$sFuncao,\"window, record\");\n //$this->addListener(self::EVENTO_CANCEL,\"\",\"form, record\");\n //$this->addListener(self::EVENTO_VIEW_CHANGE,$sFuncao,\"panel, view, info\");\n \n $aRender = array(\n \"xtype\" => 'calendarpanel',\n \"itemId\" => $this->getId().\"-calendar\",\n \"calendarStore\" => $this->getRenderStoreTipoEvento(),\n \"eventStore\" => $this->getRenderStoreEvento(),\n \"activeItem\" => $this->getPerspectiva(),\n \"showNavBar\" => $this->getMostraBarraPerspectivas(),\n \"showDayView\" => $this->getMostraPerspectivaDia(),\n \"showWeekView\" => $this->getMostraPerspectivaSemana(),\n \"showMonthView\" => $this->getMostraPerspectivaMes(),\n \"showTime\" => $this->getMostraHora(),\n \"monthViewCfg\" => $this->getConfiguracaoMes(),\n \"eventIncrement\" => $this->getDuracaoEvento(),\n \"viewStartHour\" => $this->getHoraInicial(),\n \"viewStartMinute\" => $this->getMinutoInicial(),\n \"viewEndHour\" => $this->getHoraFinal(),\n \"viewEndMinute\" => $this->getMinutoFinal(),\n \"viewConfig\" => $this->getConfiguracao(),\n \"listeners\" => $this->getListeners()\n );\n \n $sRender = \"Ext.create('Ext.panel.Panel', {\"\n .\"layout: 'border',\"\n .\"border: true,\"\n .\"items: [{\"\n .\"xtype: 'panel',\"\n .\"itemId: '\".$this->getId().\"-region-west',\"\n .\"region: 'west',\"\n .\"title: 'Calendário',\"\n .\"collapsible: true,\"\n .\"split: true,\"\n .\"width: 220,\"\n .\"maxWidth: 220,\"\n .\"layoutConfig: {\"\n .\"fill: false,\"\n .\"animate: true\"\n .\"},\"\n .\"padding: '3',\"\n .\"bodyStyle:{\"\n .\"backgroundColor: '#157fcc'\"\n .\"},\"\n .\"items: [{\"\n .\"xtype: 'datepicker',\"\n .\"itemId: '\".$this->getId().\"-picker',\"\n .\"cls: 'ext-cal-nav-picker',\"\n .\"listeners: {\"\n .\"'select': {\"\n .\"fn: function(dp, dt){\"\n .\"Ext.ComponentQuery.query('#\".$this->getId().\"-calendar')[0].setStartDate(dt);\"\n .\"},\"\n .\"scope: this\"\n .\"}\"\n .\"}\"\n .\"},{\"\n .$this->getListaAgenda()\n .\"}]\"\n .\"},{\"\n .\"region: 'center',\"\n .\"itemId: '\".$this->getId().\"-region-center',\"\n .\"style:{\"\n .\"border: '3px solid #5A91D2',\"\n .\"borderLeft: 'none'\"\n .\"},\"\n .Base::getRender($aRender)\n .\"}]\"\n .\"})\";\n \n return Base::addObj($sRender,$this->getRenderTo()).$this->getTelaManutencao();\n }", "public function show() {\n $year = null;\n \n $month = null;\n \n if(null==$year&&isset($_GET['year'])){\n \n $year = $_GET['year'];\n \n }else if(null==$year){\n \n $year = date(\"Y\",time()); \n \n } \n \n if(null==$month&&isset($_GET['month'])){\n \n $month = $_GET['month'];\n \n }else if(null==$month){\n \n $month = date(\"m\",time());\n \n } \n \n $this->thisYear=$year;\n \n $this->thisMonth=$month;\n \n $this->daysInMonth=$this->_daysInMonth($month,$year); \n \n $content='<div id=\"calendar\">'.\n\t\t\t\t\t\"<img src = 'img/manadensbabe/$month.jpg'>\".\n\t\t\t\t\t\n '<div class=\"box\">'.\n $this->_createNavi().\n '</div>'.\n '<div class=\"box-content\">'.\n '<ul class=\"label\">'.$this->_createCalender().'</ul>'; \n $content.='<div class=\"clear\"></div>'; \n $content.='<ul class=\"dates\">'; \n \n $weeksInMonth = $this->_weeksInMonth($month,$year);\n \n for( $i=0; $i<$weeksInMonth; $i++ ){\n \n for($j=1;$j<=7;$j++){\n $content.=$this->_showDay($i*7+$j);\n }\n }\n \n $content.='</ul>';\n \n $content.='<div class=\"clear\"></div>'; \n \n $content.='</div>';\n \n $content.='</div>';\n return $content; \n }", "function icalendar_render_events( $url = '', $args = array() ) {\n\t$ical = new iCalendarReader();\n\treturn $ical->render( $url, $args );\n}", "private function _drawTables()\n {\n foreach ($this->_tables as $table) {\n $table->tableDraw($this->showColor);\n }\n }", "function show_calendar_events()\n\t{\n\t\t$stats_html = \"\";\n\t\t\n\t\tif ($this->ipsclass->vars['show_birthdays'] or $this->ipsclass->vars['show_calendar'] )\n\t\t{\n\t\t\t$a = explode( ',', gmdate( 'Y,n,j,G,i,s', time() + $this->ipsclass->get_time_offset() ) );\n\t\t\n\t\t\t$day = $a[2];\n\t\t\t$month = $a[1];\n\t\t\t$year = $a[0];\n\t\t\t\n\t\t\t$birthstring = \"\";\n\t\t\t$count = 0;\n\t\t\t$users = array();\n\t\t\t\n\t\t\tif ( $this->ipsclass->vars['show_birthdays'] )\n\t\t\t{\n\t\t\t\tif ( is_array($this->ipsclass->cache['birthdays']) AND count( $this->ipsclass->cache['birthdays'] ) )\n\t\t\t\t{\n\t\t\t\t\tforeach( $this->ipsclass->cache['birthdays'] as $u )\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( $u['bday_day'] == $day and $u['bday_month'] == $month )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$users[] = $u;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if( $day == 28 && $month == 2 && !date(\"L\") )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ( $u['bday_day'] == \"29\" and $u['bday_month'] == $month )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$users[] = $u;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Spin and print...\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\tforeach ( $users as $user )\n\t\t\t\t{\n\t\t\t\t\t$birthstring .= \"<a href='{$this->ipsclass->base_url}showuser={$user['id']}'>{$user['members_display_name']}</a>\";\n\t\t\t\t\t\n\t\t\t\t\tif ($user['bday_year'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$pyear = $year - $user['bday_year'];\n\t\t\t\t\t\t$birthstring .= \"(<b>$pyear</b>)\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$birthstring .= $this->sep_char.\"\\n\";\n\t\t\t\t\t\n\t\t\t\t\t$count++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Fix up string...\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$birthstring = preg_replace( \"/\".$this->sep_char.\"$/\", \"\", trim($birthstring) );\n\t\t\t\t\n\t\t\t\t$lang = $this->ipsclass->lang['no_birth_users'];\n\t\t\t\t\n\t\t\t\tif ($count > 0)\n\t\t\t\t{\n\t\t\t\t\t$lang = ($count > 1) ? $this->ipsclass->lang['birth_users'] : $this->ipsclass->lang['birth_user'];\n\t\t\t\t\t$stats_html .= $this->ipsclass->compiled_templates['skin_boards']->birthdays( $birthstring, $count, $lang );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$count = \"\";\n\t\t\t\t\t\n\t\t\t\t\tif ( ! $this->ipsclass->vars['autohide_bday'] )\n\t\t\t\t\t{\n\t\t\t\t\t\t$stats_html .= $this->ipsclass->compiled_templates['skin_boards']->birthdays( $birthstring, $count, $lang );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Are we viewing the calendar?\n\t\t//-----------------------------------------\n\t\t\n\t\tif ($this->ipsclass->vars['show_calendar'])\n\t\t{\n\t\t\t$this->ipsclass->vars['calendar_limit'] = intval($this->ipsclass->vars['calendar_limit']) < 2 ? 1 : intval($this->ipsclass->vars['calendar_limit']);\n\t\t\t\n\t\t\t$our_unix = gmmktime( 0, 0, 0, $month, $day, $year);\n\t\t\t$max_date = $our_unix + ($this->ipsclass->vars['calendar_limit'] * 86400);\n\t\t\t$events = array();\n\t\t\t$show_events = array();\n\t\t\t\n\t\t\tif( $this->ipsclass->member['org_perm_id'] )\n\t\t\t{\n\t\t\t\t$member_permission_groups = explode( \",\", $this->ipsclass->clean_perm_string( $this->ipsclass->member['org_perm_id'] ) );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$member_permission_groups = explode( \",\", $this->ipsclass->clean_perm_string( $this->ipsclass->member['g_perm_id'] ) );\n\t\t\t\t\n\t\t\t\tif( isset($this->ipsclass->member['mgroup_others']) AND $this->ipsclass->member['mgroup_others'] )\n\t\t\t\t{\n\t\t\t\t\t$this->ipsclass->member['mgroup_others'] = $this->ipsclass->clean_perm_string($this->ipsclass->member['mgroup_others']);\n\t\t\t\t\t\n\t\t\t\t\t$mgroup_others = explode( \",\", $this->ipsclass->member['mgroup_others'] );\n\t\t\t\t\t\n\t\t\t\t\tif( count($mgroup_others) )\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach( $mgroup_others as $mgroup )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif( $mgroup )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$member_permission_groups = array_merge( $member_permission_groups, explode( \",\", $this->ipsclass->clean_perm_string( $this->ipsclass->cache['group_cache'][$mgroup]['g_perm_id'] ) ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ( is_array($this->ipsclass->cache['calendar']) AND count( $this->ipsclass->cache['calendar'] ) )\n\t\t\t{\n\t\t\t\tforeach( $this->ipsclass->cache['calendar'] as $u )\n\t\t\t\t{\n\t\t\t\t\t$set_offset = 0;\n\n\t\t\t\t\tif( $u['event_timeset'] && !($u['event_recurring'] == 0 AND $u['event_unix_to']) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$set_offset = isset($this->ipsclass->member['time_offset']) ? $this->ipsclass->member['time_offset'] * 3600 : 0;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$u['_unix_from'] = $u['event_unix_from'] - $set_offset;\n\t\t\t\t\t$u['_unix_to'] = $u['event_unix_to'] - $set_offset;\n\t\t\t\t\t\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// Private?\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t\n\t\t\t\t\tif ( $u['event_private'] == 1 and $this->ipsclass->member['id'] != $u['event_member_id'] )\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// Got perms?\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t\n\t\t\t\t\tif ( $u['event_perms'] != \"*\" )\n\t\t\t\t\t{\n\t\t\t\t\t\t$event_perms = explode( \",\", $this->ipsclass->clean_perm_string( $u['event_perms'] ) );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$check = 0;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( count($event_perms) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach( $event_perms as $mgroup_perm )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif( in_array( $mgroup_perm, $member_permission_groups ) )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$check = 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( !$check )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// Got calendar perms?\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t\n\t\t\t\t\tif ( $u['_perm_read'] != \"*\" )\n\t\t\t\t\t{\n\t\t\t\t\t\t$read_perms = explode( \",\", $this->ipsclass->clean_perm_string( $u['_perm_read'] ) );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$check = 0;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( count($read_perms) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach( $read_perms as $mgroup_perm )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif( in_array( $mgroup_perm, $member_permission_groups ) )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$check = 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( !$check )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontinue;\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\t// In range?\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t\tif ( $u['event_recurring'] == 0 AND ( ( $u['event_unix_to'] >= $our_unix AND $u['event_unix_from'] <= $max_date )\n\t\t\t\t\t\tOR ( $u['event_unix_to'] == 0 AND $u['event_unix_from'] >= $our_unix AND $u['event_unix_from'] <= $max_date ) ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$u['event_activetime'] = $u['_unix_from'];\n\t\t\t\t\t\t$events[ str_pad( $u['event_unix_from'].$u['event_id'], 15, \"0\" ) ] = $u;\n\t\t\t\t\t}\n\t\t\t\t\telseif( $u['event_recurring'] > 0 )\n\t\t\t\t\t{\n\t\t\t\t\t\t$cust_range_s = $u['event_unix_from'];\n\n\t\t\t\t\t\twhile( $cust_range_s < $u['event_unix_to'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif( $cust_range_s >= $our_unix AND $cust_range_s <= $max_date )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$u['event_activetime'] = $cust_range_s;\n\t\t\t\t\t\t\t\t$events[ str_pad( $cust_range_s.$u['event_id'], 15, \"0\" ) ] = $u;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif( $u['event_recurring'] == \"1\" )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$cust_range_s += 604800;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telseif ( $u['event_recurring'] == \"2\" )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$cust_range_s += 18144000;\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$cust_range_s += 31536000;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Print...\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\tksort($events);\n\t\t\t\n\t\t\tforeach( $events as $event )\n\t\t\t{\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Recurring?\n\t\t\t\t//-----------------------------------------\n\n\t\t\t\t$c_time = '';\n\t\t\t\t$c_time = gmdate( 'j-F-y', $event['event_activetime'] );\n\t\t\t\t\n\t\t\t\t$show_events[] = \"<a href='{$this->ipsclass->base_url}act=calendar&amp;code=showevent&amp;calendar_id={$event['event_calendar_id']}&amp;event_id={$event['event_id']}' title='$c_time'>\".$event['event_title'].\"</a>\";\n\t\t\t}\n\t\t\t\n\t\t\t$this->ipsclass->lang['calender_f_title'] = sprintf( $this->ipsclass->lang['calender_f_title'], $this->ipsclass->vars['calendar_limit'] );\n\t\t\t\n\t\t\tif ( count($show_events) > 0 )\n\t\t\t{\n\t\t\t\t$event_string = implode( $this->sep_char.' ', $show_events );\n\t\t\t\t$stats_html .= $this->ipsclass->compiled_templates['skin_boards']->calendar_events( $event_string );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ( ! $this->ipsclass->vars['autohide_calendar'] )\n\t\t\t\t{\n\t\t\t\t\t$event_string = $this->ipsclass->lang['no_calendar_events'];\n\t\t\t\t\t$stats_html .= $this->ipsclass->compiled_templates['skin_boards']->calendar_events( $event_string );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\treturn $stats_html;\n\t\n\t}", "public function getOutput()\n\t{\n\t\tif( ! IPSLib::appIsInstalled( 'calendar' ) )\n\t\t{\n\t\t\treturn '';\n\t\t}\n\t\t\n\t\t/* Load language */\n\t\t$this->registry->class_localization->loadLanguageFile( array( 'public_calendar' ), 'calendar' );\n\n\t\t/* Load calendar library */\n\t\t$classToLoad = IPSLib::loadActionOverloader( IPSLib::getAppDir( 'calendar' ) .'/modules_public/calendar/view.php', 'public_calendar_calendar_view' );\n\t\t$cal = new $classToLoad();\n\t\t$cal->makeRegistryShortcuts( $this->registry );\n\t\t\n\t\tif( !$cal->initCalendar( true ) )\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\t/* Return calendar */\n\t\treturn \"<div id='hook_calendar' class='calendar_wrap'>\". $cal->getMiniCalendar( date('n'), date('Y') ) . '</div><br />';\n\t}", "public function forgeHtml($source) {\n\t\t$days = $source['days'];\n\t\t$hours = $source['hours'];\n\n\t\t$props = $this->getProperties();\n\t\t$format = $props->calendar->week->view;\n\t\t$idDom = $props->date->id->dom;\n\t\t$s = \"<table id=\\\"rounded-corner\\\"><thead><tr><th class=\\\"rounded-calendar\\\"></th>\";\n\t\t$count = count($days)-1;\n\t\tforeach( $days as $id=>$dteObject ) {\n\t\t\tif($id==$count) {\n\t\t\t\t$s .=\"<th class=\\\"rounded-q4\\\">\".$dteObject->toString($format).\"</th>\";\n\t\t\t} else {\n\t\t\t\t$s .=\"<th>\".$dteObject->toString($format).\"</th>\";\n\t\t\t}\n\t\t}\n\t\t$s .=\"</tr></thead><tbody>\";\n\n\t\t$cells = count($days)-1;\n\n\t\tforeach($hours as $index=>$hour) {\n\t\t\t$s .=\"<tr><td>{$hour}</td>\";\n\t\t\tforeach( $days as $id=>$dteObject ) {\n\t\t\t\t$s .=\"<td id=\\\"\".$dteObject->toString($idDom).\"$hour\\\"></td>\";\n\t\t\t}\n\t\t\t$s.\"</tr>\";\n\t\t}\n\t\t$s .=\"</tbody></table>\";\n\n\t\treturn $s;\n\t}", "public function render() {\n echo \"BEGIN:VCALENDAR\\r\\n\";\n echo \"VERSION:2.0\\r\\n\";\n echo \"PRODID:-//X2Engine//NONSGML X2 Calendar//EN\\r\\n\";\n \n if (is_array($this->_actions)) {\n $actionsPrinted = array();\n $users = array();\n foreach($this->_actions as $action) {\n // skip events showing up more than once (i.e. combined cal)\n if(!($action instanceof Actions) || !empty($actionsPrinted[$action->id])) \n continue;\n // Render a VEVENT for each action\n echo \"BEGIN:VEVENT\\r\\n\";\n // Treat the first assignee as the one to use for generating the \"organizer\" \n // and all of the assignees for the unique ID field\n $assignees = $action->getAssignees();\n if(!empty($assignees)) {\n $first = reset($assignees);\n echo \"UID:\".$action->assignedTo.\"-\".$action->id.\"@\".$_SERVER['SERVER_NAME'].\"\\r\\n\";\n \n if (!empty($first) && !array_key_exists($first, $users)) {\n // cache user emails\n $user = User::model()->findByAttributes(array('username'=>$first));\n $users[$first] = array(\n 'name'=>$user->name, \n 'email'=>$user->emailAddress,\n 'timeZone'=>$user->profile->timeZone\n );\n }\n $tz = $users[$first]['timeZone'];\n echo \"ORGANIZER;CN=\\\"\".$users[$first]['name'].\"\\\":mailto:\".$users[$first]['email'].\"\\r\\n\";\n } else {\n // Default app timezone (which is actually stored as the column default value)\n $tz = Profile::model()->tableSchema->columns['timeZone']->defaultValue;\n echo \"UID:Anyone-{$action->id}@{$_SERVER['SERVER_NAME']}\\r\\n\";\n }\n $start = new DateTime();\n $end = new DateTime();\n $tzOb = new DateTimeZone($tz);\n $start->setTimestamp($action->dueDate);\n $end->setTimestamp($action->completeDate);\n $start->setTimezone($tzOb);\n $end->setTimezone($tzOb);\n echo \"DTSTART;TZID=$tz:\".$start->format('Ymd\\THis').\"\\r\\n\";\n echo \"DTEND;TZID=$tz:\".$end->format('Ymd\\THis').\"\\r\\n\";\n echo \"SUMMARY:\".self::escapeText($action->actionText->text).\"\\r\\n\";\n echo \"END:VEVENT\\r\\n\";\n $actionsPrinted[$action->id] = true;\n }\n }\n\n echo \"END:VCALENDAR\\r\\n\";\n }", "public function createGridDataHorizontalDates()\n {\n $aPeriods = $this->getGridDataPeriods();\n $aLevels = $this->getGridDataLevels();\n if (empty($aPeriods) || empty($aLevels)) {\n $this->aErrors[] = 'No period or level data provided';\n\n return false;\n }\n $aAllPeriodLevels = $this->getAllGridDataPeriodLevels($aPeriods, $aLevels);\n ?>\n <table id=\"dimension_table\" border=\"1\" class=\"dim_table\">\n <tbody><tr><th></th>\n <?php\n foreach ($aPeriods as $nPeriodId => $aPeriod) {\n echo \"<th>{$aPeriod['period_name_x_axis']}</th>\\n\";\n }\n ?>\n </tr></tbody>\n <?php\n foreach ($aLevels as $nLevelId => $aLevel) {\n $nLevelId = $aLevel['id'];\n echo \"<tr>\\n\";\n ?>\n <td>\n <?php\n if (!empty($aLevel['link_exists'])) {\n ?>\n <a class=\"more\" title=\"<?=$aLevel['label']?>\" \n href=\"?year=<?=$aLevel['nYear']?>&amp;level=<?=$aLevel['level']\n ?>&amp;parent_level_id=<?=$aLevel['level_id']?>\"><?=$aLevel['code']?></a>\n <?php\n } else {\n echo $aLevel['code'];\n }\n ?>\n </td>\n <?php\n foreach ($aPeriods as $nPeriodId => $sPeriod) {\n ?>\n <td>\n <?php\n if (!empty($aAllPeriodLevels[$nPeriodId][$nLevelId]['link_exists'])) {\n ?>\n <a class=\"more\" title=\"<?=$aLevel['label']?>\" \n href=\"?year=<?=$aLevel['nYear']?>&amp;period_id=<?=\n $aAllPeriodLevels[$nPeriodId][$nLevelId]['period_id']?>&amp;level=<?=\n $aAllPeriodLevels[$nPeriodId][$nLevelId]['level']?>&amp;parent_level_id=<?=\n $aAllPeriodLevels[$nPeriodId][$nLevelId]['parent_level_id']?>&amp;level_id=<?=\n $aAllPeriodLevels[$nPeriodId][$nLevelId]['level_id']?>\"><?=\n $this->getFormattedAmt($aAllPeriodLevels[$nPeriodId][$nLevelId]['amt'])?></a>\n <?php\n } else {\n echo '0';\n }\n ?>\n </td>\n <?php\n }\n echo \"</tr>\\n\";\n }\n\n echo '</table>';\n }", "function GetEventsJsForCalendar($frontend=true)\r\n\t{\r\n\t\tglobal $_SETTINS;\r\n\r\n\t\t// SELECT EVENTS\r\n\t\t$select = \t\"SELECT * FROM events \".\r\n\t\t\t\t\t\"WHERE events.active='1' \".\r\n\t\t\t\t\t\"\".$_SETTINGS['demosqland'].\" \".\r\n\t\t\t\t\t\"ORDER BY events.date DESC \";\r\n\t\t$result = doQuery($select);\t\t\t\r\n\t\t$num = mysql_num_rows($result);\r\n\t\t$i = 0;\r\n\t\twhile($i<$num){\r\n\t\t\t$row = mysql_fetch_array($result);\r\n\t\t\tif($i != 0){ $js .= \",\"; }\r\n\t\t\t$js .= \t\"{\";\r\n\t\t\t\r\n\t\t\t\t// TITLE CHECK\r\n\t\t\t\t$js .= \"title: '\".$row['title'].\"',\";\r\n\t\t\t\t$js .= \"description: '\".$row['description'].\"',\";\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// GET FORMAT AND EXPLODE DATE\r\n\t\t\t\t$start_date = TimestampIntoDate($row['date']);\r\n\t\t\t\t$end_date = TimestampIntoDate($row['end_date']);\r\n\t\t\t\t$startArray = explode(\"/\",$start_date);\r\n\t\t\t\t$endArray = explode(\"/\",$end_date);\t\t\r\n\t\t\t\t$sy = $startArray[2];\r\n\t\t\t\t$sm = $startArray[0];\r\n\t\t\t\t$sd = $startArray[1];\t\t\t\r\n\t\t\t\t$ey = $endArray[2];\r\n\t\t\t\t$em = $endArray[0];\r\n\t\t\t\t$ed = $endArray[1];\r\n\t\t\t\t\r\n\t\t\t\t$js .= \"start: new Date(\".$sy.\", \".$sm.\"-1, \".$sd.\"),\";\r\n\t\t\t\t\r\n\t\t\t\tif($_POST['end_date'] == \"0000-00-00 00:00:00\" || $_POST['end_date'] == \"\"){\r\n\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$js .= \"end: new Date(\".$ey.\", \".$em.\"-1, \".$ed.\"),\";\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif($frontend == true){\t\t\t\r\n\t\t\t\t\t$js .= \"url: 'http://\".$_SETTINGS['website'].$_SETTINGS['events_page_clean_url'].\"/'\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$js .= \"url: 'http://\".$_SETTINGS['website'].$_SETTINGS['events_page_clean_url'].\"/'\";\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t$js .= \"}\";\r\n\t\t\t$i++;\r\n\t\t}\r\n\t\t\r\n\t\t$js .=\t\"\";\r\n\t\treturn $js;\r\n\t\t\r\n\t\t/*\r\n\t\t{\r\n\t\t\ttitle: 'All Day Event',\r\n\t\t\tstart: new Date(y, m, 1)\r\n\t\t},\r\n\t\t{\r\n\t\t\ttitle: 'Long Event',\r\n\t\t\tstart: new Date(y, m, d-5),\r\n\t\t\tend: new Date(y, m, d-2)\r\n\t\t},\r\n\t\t{\r\n\t\t\tid: 999,\r\n\t\t\ttitle: 'Repeating Event',\r\n\t\t\tstart: new Date(y, m, d-3, 16, 0),\r\n\t\t\tallDay: false\r\n\t\t},\r\n\t\t{\r\n\t\t\tid: 999,\r\n\t\t\ttitle: 'Repeating Event',\r\n\t\t\tstart: new Date(y, m, d+4, 16, 0),\r\n\t\t\tallDay: false\r\n\t\t},\r\n\t\t{\r\n\t\t\ttitle: 'Meeting',\r\n\t\t\tstart: new Date(y, m, d, 10, 30),\r\n\t\t\tallDay: false\r\n\t\t},\r\n\t\t{\r\n\t\t\ttitle: 'Lunch',\r\n\t\t\tstart: new Date(y, m, d, 12, 0),\r\n\t\t\tend: new Date(y, m, d, 14, 0),\r\n\t\t\tallDay: false\r\n\t\t},\r\n\t\t{\r\n\t\t\ttitle: 'Birthday Party',\r\n\t\t\tstart: new Date(y, m, d+1, 19, 0),\r\n\t\t\tend: new Date(y, m, d+1, 22, 30),\r\n\t\t\tallDay: false\r\n\t\t},\r\n\t\t{\r\n\t\t\ttitle: 'Click for Google',\r\n\t\t\tstart: new Date(y, m, 28),\r\n\t\t\tend: new Date(y, m, 29),\r\n\t\t\turl: 'http://google.com/'\r\n\t\t}\r\n\t\t*/\r\n\t\t\r\n\t\t\r\n\t}", "public function render(): void {\r\n $pages = MJKGTAPI::pages();\r\n $wp_cron = get_option('cron');\r\n\r\n $this->render_css();\r\n\r\n printf('<div class=\"wrap\">');\r\n $this->output_intro();\r\n printf('<div id=\"%s\">', self::id_main);\r\n $this->output_sections($pages, $wp_cron);\r\n printf('</div></div>');\r\n }", "public function render()\n\t{\n\t\t// convert json to PHP arrays\n\t\tif(!is_array($this->headers))\n\t\t\t$this->headers = $this->extract_json($this->headers);\n\t\tif(!is_array($this->data))\n\t\t\t$this->data = $this->extract_json($this->data);\n\n\t\t// generate a table of the appropriate type with sub-render method\n\t\t$table_html = $this->{\"render_$this->type\"}();\n\t\t\n\t\t// get the snippets directory if set\n\t\tif($this->snippets_dir && file_exists(\"$this->snippets_dir/table.php\"))\n\t\t\t$snippet = \"$this->snippets_dir/table.php\";\n\t\telse\n\t\t\t$snippet = __DIR__ . \"/snippets/table.php\";\n\t\t\n\t\t// build up the replacements array\n\t\t$replacements = array(\n\t\t\t'body' => $table_html,\n\t\t\t'class' => strlen($this->class)?\"class=\\\"$this->class\\\"\":'',\n\t\t\t'id' => strlen($this->id)?\"id=\\\"$this->id\\\"\":'',\n\t\t\t'caption' => strlen($this->caption)?\"<caption>$this->caption</caption>\":'',\n\t\t);\n\t\t\n\t\t$html = \\helpers\\html\\html::load_snippet($snippet, $replacements);\n\n\t\treturn $html;\n\t}", "function generate_category_content()\n {\n global $conf, $page;\n\n $view_type = $page['chronology_view'];\n if ($view_type==CAL_VIEW_CALENDAR)\n {\n global $template;\n $tpl_var = array();\n if ( count($page['chronology_date'])==0 )\n {//case A: no year given - display all years+months\n if ($this->build_global_calendar($tpl_var))\n {\n $template->assign('chronology_calendar', $tpl_var);\n return true;\n }\n }\n\n if ( count($page['chronology_date'])==1 )\n {//case B: year given - display all days in given year\n if ($this->build_year_calendar($tpl_var))\n {\n $template->assign('chronology_calendar', $tpl_var);\n $this->build_nav_bar(CYEAR); // years\n return true;\n }\n }\n\n if ( count($page['chronology_date'])==2 )\n {//case C: year+month given - display a nice month calendar\n if ( $this->build_month_calendar($tpl_var) )\n {\n $template->assign('chronology_calendar', $tpl_var);\n }\n $this->build_next_prev();\n return true;\n }\n }\n\n if ($view_type==CAL_VIEW_LIST or count($page['chronology_date'])==3)\n {\n if ( count($page['chronology_date'])==0 )\n {\n $this->build_nav_bar(CYEAR); // years\n }\n if ( count($page['chronology_date'])==1)\n {\n $this->build_nav_bar(CMONTH); // month\n }\n if ( count($page['chronology_date'])==2 )\n {\n $day_labels = range( 1, $this->get_all_days_in_month(\n $page['chronology_date'][CYEAR] ,$page['chronology_date'][CMONTH] ) );\n array_unshift($day_labels, 0);\n unset( $day_labels[0] );\n $this->build_nav_bar( CDAY, $day_labels ); // days\n }\n $this->build_next_prev();\n }\n return false;\n }", "public function genHTMLCronograma(){\n \n //Usuario conectado ==========================================================================\n $_solicitudes = $this->cdaSolicitudesOpen(Yii::$app->user->identity->id_usuario);\n $_tramites = $this->cdaTramitesOpen();\n $_tecnicos = $this->cdaTecnicos();\n $j_user=0;\n \n $string=\"\";\n \n $string.=\"<table class='tablecronograma'>\";\n \n foreach($_solicitudes[1] as $valor){\n \n $_drhidricos = $valor[0];\n \n if($j_user>0){\n $string.=\"<tr>\";\n $string.=\"<td colspan='7' class='noborders'>&nbsp;</td>\";\n $string.=\"</tr>\";\n }\n \n $string.=\"<tr>\";\n $string.=\"<td rowspan='2'>\".$valor[1].\"</td>\";\n \n //Sacando la fila de solicitudes asociadas al usuario ===================================================\n foreach($_solicitudes[2][$valor[0]] as $numsolicitud){\n $string.=\"<td colspan='6'>\".$numsolicitud.\"</td>\";\n }\n \n $string.=\"</tr>\";\n \n $string.=\"<tr>\";\n \n //Armando cuadro de casillas por solicitud ===================================================\n foreach($_solicitudes[2][$valor[0]] as $idSol=>$numsolicitud){\n $string.=\"<td bgcolor='\".$_solicitudes[3][$idSol][0].\"'>1</td>\";\n $string.=\"<td bgcolor='\".$_solicitudes[3][$idSol][1].\"'>2</td>\";\n $string.=\"<td bgcolor='\".$_solicitudes[3][$idSol][2].\"'>3</td>\";\n $string.=\"<td bgcolor='\".$_solicitudes[3][$idSol][3].\"'>4</td>\";\n $string.=\"<td bgcolor='\".$_solicitudes[3][$idSol][4].\"'>5</td>\";\n $string.=\"<td bgcolor='\".$_solicitudes[3][$idSol][5].\"'>6</td>\";\n }\n $string.=\"</tr>\";\n \n //Organizando segunda parate la de TECNICOS ======================================================================\n \n foreach($_tecnicos as $tecnicosRH){\n \n $string.=\"<tr>\";\n $string.=\"<td>\".$tecnicosRH['nombres'].\"</td>\";\n foreach($_solicitudes[2][$valor[0]] as $idSol=>$numsolicitud){\n \n if (!empty($tecnicosRH['id_usuario']) ){\n $_idusuario = $tecnicosRH['id_usuario'];\n }else{\n $string.=\"<td></td>\"; \n $string.=\"<td></td>\"; \n $string.=\"<td></td>\"; \n $string.=\"<td></td>\"; \n $string.=\"<td></td>\"; \n $string.=\"<td></td>\"; \n continue;\n }\n \n if(!empty( $_tramites[$_idusuario] )){\n \n if(!empty($_tramites[$_idusuario][$idSol]['tip1'])){\n $string.=\"<td bgcolor='blue'>&nbsp;</td>\";\n }else{\n $string.=\"<td></td>\"; \n }\n \n if(!empty($_tramites[$_idusuario][$idSol]['tip2'])){\n $string.=\"<td bgcolor='blue'>&nbsp;</td>\";\n }else{\n $string.=\"<td></td>\"; \n }\n \n if(!empty($_tramites[$_idusuario][$idSol]['tip3'])){\n $string.=\"<td bgcolor='blue'>&nbsp;</td>\";\n }else{\n $string.=\"<td></td>\"; \n }\n \n if(!empty($_tramites[$_idusuario][$idSol]['tip4'])){\n $string.=\"<td bgcolor='blue'>&nbsp;</td>\";\n }else{\n $string.=\"<td></td>\"; \n }\n \n if(!empty($_tramites[$_idusuario][$idSol]['tip5'])){\n $string.=\"<td bgcolor='blue'>&nbsp;</td>\";\n }else{\n $string.=\"<td></td>\"; \n }\n \n if(!empty($_tramites[$_idusuario][$idSol]['tip6'])){\n $string.=\"<td bgcolor='blue'>&nbsp;</td>\";\n }else{\n $string.=\"<td></td>\"; \n }\n \n }else{\n $string.=\"<td></td>\"; \n $string.=\"<td></td>\"; \n $string.=\"<td></td>\"; \n $string.=\"<td></td>\"; \n $string.=\"<td></td>\"; \n $string.=\"<td></td>\"; \n \n }\n }\n $string.=\"</tr>\";\n }\n \n $j_user+=1;\n }\n \n \n \n $string.=\"</table>\";\n \n \n return $string;\n }", "public function getChartHtml()\n {\n $this->calculateEventDimensions();\n $chartNum = $this->getChartNum();\n\n $return = '';\n\n // if (!$this->initialized) $return .= $this->getInitializationHtml();\n\n list($decadeHtml, $yearHtml) = $this->getYearHtml();\n\n $return .= '<div class=\"chart\" id=\"chart-'.$chartNum.'\">'.\n '<div class=\"chart-controls-container\">'.\n '<div class=\"chart-controls-left\"></div>'.\n '<div class=\"chart-controls-right\"></div>'.\n '<div class=\"chart-scroll-container\">'.\n '<div class=\"chart-content\" style=\"width: '.$this->chartWidth.'px\">'.\n '<div class=\"chart-decade-container\">'. $decadeHtml.'</div>'.\n '<div class=\"chart-year-container\">'. $yearHtml.'</div>'.\n '<div class=\"chart-event-container\" style=\"width: '.$this->chartWidth.'px; height: '.$this->chartHeight.'px\">'.\n '<div class=\"chart-event-padding\">'.$this->getEventHtml().'</div>'.\n '</div>'.\n '<div class=\"chart-month-container\" style=\"width: '.$this->chartWidth.'px\"></div>'.\n '</div>'.\n '</div>'.\n '</div>'.\n '<div class=\"chart-info\">'.\n '<div class=\"chart-info-help\">Napsauta sotaa aikajanalla saadaksesi siitä lisätietoja</div>'.\n '</div>'.\n '</div>'.\n '<script type=\"text/javascript\">'.\n 'charts.push('.json_encode(['id' => 'chart-'.$chartNum, 'events' => $this->events, 'groups' => $this->groups]).');'.\n '</script>';\n\n return $return;\n }", "public function render(Carbon $date, $bookings)\n { \n $html = ''; \n \n // Determine the total days in the month\n $total_days = $date->daysInMonth;\n \n // Set the starting day number\n $day = $this->start_day + 1 - $date->startOfMonth()->dayOfWeek;\n\n while ($day > 1)\n {\n $day -= 7;\n }\n \n $html .= '<table id=\"'.$date->format('F').'\">';\n $html .= '<thead><tr><th colspan=\"7\">'.$date->format('F').'</th></tr>';\n \n $html .= '<tr><th>Mo</th><th>Tu</th><th>We</th><th>Th</th><th>Fr</th><th>Sa</th><th>Su</th></tr></thead>';\n \n $bookings = $this->parseBookings($bookings, $date);\n $first_night = true;\n \n while ($day <= $total_days)\n {\n $html .='<tr>';\n for($i=0;$i<7;$i++)\n { \n if($day > 0 && $day <= $total_days)\n {\n $date->day($day); // set Carbon's date\n $html_classes = array();\n $bookable = true; // default\n \n // is in the past, is today, is weekend and is start day\n if($date->lt(Carbon::now()->startOfDay())) \n $html_classes[] = 'past';\n else\n {\n if($date->isToday()) $html_classes[] = 'today';\n if($date->isWeekend()) $html_classes[] = 'weekend';\n if(in_array($date->dayOfWeek, $this->arrival_days)) $html_classes['changeover'] = 'changeover'; \n }\n \n // is booked\n if(in_array($date, $bookings)) \n {\n $bookable = false;\n $html_classes[] = 'booked';\n \n if($first_night) \n {\n $html_classes[] = 'first_night';\n $bookable = true; // can be a departure day\n }\n else\n {\n // mid week arrival date: get rid\n unset($html_classes['changeover']);\n }\n $first_night = false;\n }\n else\n {\n $first_night = true;\n }\n \n $html .= '<td class=\"'. implode(' ', $html_classes).'\" ';\n $html .= ($bookable) ? ' data-date=\"'.$date->format('Y-m-d').'\"' : '';\n $html .= '>'.$date->format('j').'</td>';\n }\n else\n {\n $html .= '<td class=\"calday_empty\">&nbsp;</td>';\n }\n \n $day++;\n }\n $html .='</tr>';\n }\n \n \n $html .= '</tbody><tfoot></tfoot></table>';\n return $html;\n }", "public function drawArray()\n\t{\n\t\t$this->outArray['days'] = array();\n\t\t$this->makeCalendarTitle();\n\t\t$this->makeCalendarHead();\n\t\t$this->makeDayHeadings();\n\t\t$this->startMonthSpacers();\n\t\t$this->makeArrayIterator();\n\t\t$this->endMonthSpacers();\t\t\n\t\t\n\t\treturn $this->outArray;\n\t}", "public function showEventsTable() {\r\n\t\t$stmt = $this->connect()->query(\"SELECT * FROM event\");\r\n\t\techo \"<h3>Event Table</h3>\";\r\n\t\techo \"<table><tr><td>\" . \"id\" . \"</td><td>\" . \"competition_id\" . \"</td><td>\" . \"name\" . \"</td><td>\" . \"score\" . \"</td><td>\" . \"time\" . \"</td><td>\" . \"tie_break\" . \"</td></tr>\";\r\n\t\twhile ($row = $stmt->fetch()) {\r\n\t\t\techo \"<tr><td>\" . $row['id'] . \"</td><td>\" . $row['competition_id'] . \"</td><td>\" . $row['name'] . \"</td><td>\" . $row['score'] . \"</td><td>\" . $row['time'] . \"</td><td>\" . $row['tie_break'] . \"</td></tr>\"; \r\n\t\t}\r\n\t\techo \"</table>\";\r\n\t}", "private function make_calendar($year, $month){\n\t\t$first_of_month = gmmktime(0,0,0,$month,1,$year);\n\t\t#remember that mktime will automatically correct if invalid dates are entered\n\t\t# for instance, mktime(0,0,0,12,32,1997) will be the date for Jan 1, 1998\n\t\t# this provides a built in \"rounding\" feature to generate_calendar()\n\t\n\t\t$day_names = array(); #generate all the day names according to the current locale\n\t\tfor($n=0,$t=(3+$this->firstDay)*86400; $n<7; $n++,$t+=86400) #January 4, 1970 was a Sunday\n\t\t\t$day_names[$n] = ucfirst(gmstrftime('%A',$t)); #%A means full textual day name\n\t\n\t\tlist($month, $year, $month_name, $weekday) = explode(',',gmstrftime('%m,%Y,%B,%w',$first_of_month));\n\t\t$weekday = ($weekday + 7 - $this->firstDay) % 7; #adjust for $firstDay\n\t\t$title = htmlentities(ucfirst($month_name)).'&nbsp;'.$year; #note that some locales don't capitalize month and day names\n\t\n\t\t#Begin calendar. Uses a real <caption>. See http://diveintomark.org/archives/2002/07/03\n\t\t@list($p, $pl) = each($this->canonicals); @list($n, $nl) = each($this->canonicals); #previous and next links, if applicable\n\t\tif($p) $p = '<span class=\"calendar-prev\">'.($pl ? '<a href=\"'.htmlspecialchars($pl).'\">'.$p.'</a>' : $p).'</span>&nbsp;';\n\t\tif($n) $n = '&nbsp;<span class=\"calendar-next\">'.($nl ? '<a href=\"'.htmlspecialchars($nl).'\">'.$n.'</a>' : $n).'</span>';\n\t\t$calendar = '<table class=\"calendar\">'.\"\\n\".\n\t\t\t'<caption class=\"calendar-month\">'.$p.($this->monthLink ? '<a href=\"'.htmlspecialchars($this->monthLink).'\">'.$title.'</a>' : $title).$n.\"</caption>\\n<tr>\";\n\t\n\t\tif($this->dayNameLength){ #if the day names should be shown ($day_name_length > 0)\n\t\t\t#if day_name_length is >3, the full name of the day will be printed\n\t\t\tforeach($day_names as $d)\n\t\t\t\t$calendar .= '<th abbr=\"'.htmlentities($d).'\">'.htmlentities($this->dayNameLength < 4 ? substr($d,0,$this->dayNameLength) : $d).'</th>';\n\t\t\t$calendar .= \"</tr>\\n<tr>\";\n\t\t}\n\t\n\t\tif($weekday > 0) $calendar .= '<td colspan=\"'.$weekday.'\">&nbsp;</td>'; #initial 'empty' days\n\t\tfor($day=1,$days_in_month=gmdate('t',$first_of_month); $day<=$days_in_month; $day++,$weekday++){\n\t\t\tif($weekday == 7){\n\t\t\t\t$weekday = 0; #start a new week\n\t\t\t\t$calendar .= \"</tr>\\n<tr>\";\n\t\t\t}\n\t\t\tif(isset($this->days[$day]) and is_array($this->days[$day])){\n\t\t\t\t@list($link, $classes, $content) = $this->days[$day];\n\t\t\t\tif(is_null($content)) $content = $day;\n\t\t\t\t$calendar .= '<td'.($classes ? ' class=\"'.htmlspecialchars($classes).'\">' : '>').\n\t\t\t\t\t($link ? '<a href=\"'.htmlspecialchars($link).'\">'.$content.'</a>' : $content).'</td>';\n\t\t\t}\n\t\t\telse $calendar .= \"<td>$day</td>\";\n\t\t}\n\t\tif($weekday != 7) $calendar .= '<td colspan=\"'.(7-$weekday).'\">&nbsp;</td>'; #remaining \"empty\" days\n\t\n\t\treturn $calendar.\"</tr>\\n</table>\\n\";\n\t}", "public function draw( AbstractXhtml $root )\n {\n\n $wrapper = Xhtml::div()->class_( \"overview_wrapper\" );\n\n $table = Xhtml::table()->class_( \"overview_table\" );\n\n $cardBody = Xhtml::tbody()->class_( \"card_wrapper\", \"template\" );\n $cardRow = Xhtml::tr()->class_( \"card_row\" );\n $typeRow = Xhtml::tr()->class_( \"type_row\" );\n $entryRow = Xhtml::tr()->class_( \"entry_row\" );\n // $cardSumRow = Xhtml::tr()->class_( \"card_sum_row\" );\n\n\n $cardRow->addContent( Xhtml::td( \"Card\" )->colspan( 4 )->class_( \"card\" ) );\n\n $typeRow->addContent( Xhtml::td( \"Type\" )->class_( \"type\" ) );\n $typeRow->addContent( Xhtml::td( \"Prday\" )->class_( \"prday\" ) );\n $typeRow->addContent(\n Xhtml::td( Xhtml::span( Xhtml::span( \"Entries\" )->class_( \"entries\" ) )->class_( \"entries_wrapper\" ) )->class_(\n \"entries_count\" ) );\n $typeRow->addContent( Xhtml::td( \"Sum\" )->class_( \"sum\" ) );\n\n $entryRow->addContent( Xhtml::td( \"Date\" )->class_( \"date\" ) );\n $entryRow->addContent( Xhtml::td( Xhtml::span( \"Comment\" )->class_(\"comment\") )->addContent( Xhtml::span( \"Cost\" )->class_(\"cost\") )->class_( \"comment_cost\" ) );\n $entryRow->addContent( Xhtml::td( \"Single\" )->class_( \"single\" ) );\n $entryRow->addContent( Xhtml::td( \"Sum\" )->class_( \"cost_sum\" ) );\n\n // $cardSumRow->addContent( Xhtml::td( \"Prday\" )->colspan( 2 )->class_( \"prday\" ) );\n // $cardSumRow->addContent( Xhtml::td( Xhtml::$NBSP ) );\n // $cardSumRow->addContent( Xhtml::td( \"Sum\" )->class_( \"sum\" ) );\n\n\n $cardBody->addContent( $cardRow );\n $cardBody->addContent( $typeRow );\n $cardBody->addContent( $entryRow );\n // $cardBody->addContent( $cardSumRow );\n $table->addContent( $cardBody );\n\n $wrapper->addContent( $table );\n $root->addContent( $wrapper );\n\n }", "public function render()\n {\n /** @var License[] $licenses */\n $licenses = $this->data['licenses'];\n $days = $this->data['days'];\n $this->getSharedView('Header')->render();\n $this->getSharedView('TopBar')->render();\n $this->getSharedView('SideBar')->render(); ?>\n<div class=\"container-fluid\">\n <div class=\"page-head bg-main\">\n <h1><i class=\"fa fa-fw fa-key\"></i> Expired licenses within the last <?php echo $days ?> days</h1>\n </div>\n <div class=\"table-responsive\">\n <table class=\"table table-condensed table-bordered table-hover\">\n <thead class=\"bg-main\">\n <tr>\n <th>#</th>\n <th>License ID</th>\n <th>License Serial</th>\n <th>License Client</th>\n <th>License Invoice</th>\n <th>License Product</th>\n <th>License Type</th>\n <th>License Expire</th>\n </tr>\n </thead>\n <tbody>\n <?php $i = 0; foreach ($licenses as $license): ?>\n <tr>\n <td><?php echo ++$i; ?></td>\n <td><?php echo $license->id; ?></td>\n <td><a href=\"<?php $this->publicPath() ?>Licenses/Show/<?php echo $license->id; ?>\"><?php echo $license->serial; ?></a></td>\n <td><a href=\"<?php $this->publicPath() ?>Clients/Show/<?php echo $license->client->id; ?>\"><?php echo $license->client->name; ?></a></td>\n <td><?php echo $license->invoice == null ? '' : str_pad($license->invoice->id,8,'0',STR_PAD_LEFT) ?></td>\n <td><a href=\"<?php $this->publicPath() ?>Products/Show/<?php echo $license->product->id; ?>\"><?php echo $license->product->name; ?></a></td>\n <td><?php echo $license->type->name; ?></td>\n <td><?php echo $this->formatSqlDateTime($license->expire, 'Y-m-d H:i:s', 'd/m/Y') ?></td>\n </tr>\n <?php endforeach; ?>\n </tbody>\n </table>\n </div>\n <div class=\"row\">\n <div class=\"panel\">\n <div class=\"panel-footer text-right\">\n <a href=\"<?php $this->publicPath() ?>Reports\" class=\"btn btn-link hidden-xs\">Reports</a>\n <a href=\"<?php $this->publicPath() ?>Reports\" class=\"btn btn-link btn-block visible-xs\">Reports</a>\n </div>\n </div>\n </div>\n</div>\n<?php\n $this->getSharedView('Footer')->render();\n }", "public function display($month='', $year='') {\n\t\n\t\t// Remove whitespaces\n\t\t$year = trim($year);\n\t\t$month = trim($month);\n\n\t\t// Set day, month and year of calendar\n\t\t$this->day = 1;\n\t\t$this->month = ($month == '') ?\tdate('n') : $month;\n\t\t$this->year = ($year == '') ? date('Y') : $year;\n\n\t\t// Check for valid input\t\n\t\tif (!preg_match('~[0-9]{4}~', $this->year))\n\t\t\tthrow new exception('Invalid value for year');\n\t\tif (!is_numeric($this->month) || $this->month < 0 || $this->month > 13)\n\t\t\tthrow new exception('Invalid value for month');\n\n\t\t// Set the current timestamp\n\t\t$this->timeStamp = mktime(1,1,1,$this->month, $this->day, $this->year);\n\t\t// Set the number of days in teh current month\n\t\t$this->daysInMonth = date('t',$this->timeStamp);\n\n\t\t// Start table\n\t\t$calHTML = sprintf(\"<table id=\\\"%s\\\" cellpadding=\\\"0\\\" cellspacing=\\\"%d\\\"><thead><tr>\", $this->calendarName, $this->innerBorder);\n\t\t// Display previous month navigation\n\t\tif ($this->enableNav) {\n\t\t\t$pM = explode('-', date('n-Y', strtotime('-1 month', $this->timeStamp)));\n\t\t\t$calHTML .= sprintf(\"<td class=\\\"%s-%s\\\"><a href=\\\"?%smonth=%d&amp;year=%d\\\">%s</a></td>\", $this->calendarName, $this->markup['nav'], $this->queryString, $pM[0], $pM[1],$this->prevMonthNavTxt);\n\t\t}\n\t\t\n\t\t// Month name and optional year\n\t\t$calHTML .= sprintf(\"<td colspan=\\\"%d\\\" id=\\\"%s-%s\\\">%s%s</td>\", ($this->enableNav ? 5 : 7), $this->calendarName, $this->markup['header'], $this->getMonthName(), ($this->displayYear ? ' ' .$this->year : ''));\n\n\t\t// Display next month navigation\n\t\tif ($this->enableNav) {\n\t\t\t$nM = explode('-', date('n-Y', strtotime('+1 month', $this->timeStamp)));\n\t\t\t$calHTML .= sprintf(\"<td class=\\\"%s-%s\\\"><a href=\\\"?%smonth=%d&amp;year=%d\\\">%s</a></td>\", $this->calendarName, $this->markup['nav'], $this->queryString, $nM[0], $nM[1],$this->nextMonthNavTxt);\n\t\t}\n\n\t\t$calHTML .= sprintf(\"</tr></thead><tbody><tr id=\\\"%s\\\">\", $this->markup['days_of_week']);\n\n\t\t// Display day headers\n\t\tforeach($this->dayNames as $k => $dayName)\n\t\t\t$calHTML .= sprintf(\"<td>%s</td>\", $dayName);\n\n\t\t$calHTML .= \"</tr><tr>\";\n\t\t\n\t\t/// What the heck is this\n\t\t$sDay = date('N', $this->timeStamp) + $this->startDay - 1;\n\t\t\n\t\t// Print previous months days\n\t\t\tfor ($e=1;$e<=$sDay;$e++)\n\t\t\t\t$calHTML .= sprintf(\"<td class=\\\"%s-%s\\\">%s</td>\", $this->calendarName, $this->markup['prev_month'], (($this->displayNonMonthDays) ? $this->timeTravel(\"-\" . ($sDay -$e) . \" days\", 'd', $this->timeStamp) : ''));\n\t\n\t\t// Print days\n\t\tfor ($i=1;$i<=$this->daysInMonth;$i++) {\n\t\t\t// Set current day and timestamp\n\t\t\t$this->day = $i;\n\t\t\t$this->timeStamp = mktime(1,1,1,$this->month, $this->day, $this->year);\n\t\t\t\n\t\t\t// Set day as either plain text or event link\n\t\t\tif (isset($this->events[$this->year][$this->month][$this->day]))\n\t\t\t\t$this->htmlDay = sprintf(\"<a href=\\\"%s\\\" title=\\\"%s\\\">%s</a>\", $this->events[$this->year][$this->month][$this->day]['event_link'], $this->events[$this->year][$this->month][$this->day]['event_title'], $this->day);\n\t\t\telse\n\t\t\t\t$this->htmlDay = $this->day;\t\t\t\n\t\n\t\t\t// Display calendar cell\n\t\t\t$calHTML .= sprintf(\"<td %s%s>%s</td>\", ($this->timeStamp == mktime(1,1,1,date('n'),date('j'),date('Y')) ? 'id=\"' . $this->calendarName . '-' . $this->markup['current_day'] . '\" ' : ''), ((($sDay + $this->day) % 7 == 0) ? 'class=\"' . $this->calendarName . '-' . $this->markup['last_day_of_week'] . '\"' : ''), $this->htmlDay);\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t// End row if necessary\t\t\t\n\t\t\tif (($sDay + $this->day) % 7 == 0)\n\t\t\t\t$calHTML .= \"</tr><tr>\";\n\t\t}\n\t\t\n\t\t// Print next months days\n\t\tfor ($e2=1;$e2 < (7 - (($sDay + $this->daysInMonth -1) % 7)); $e2++)\n\t\t\t$calHTML .= sprintf(\"<td class=\\\"%s-next-month-day%s\\\">%s</td>\", $this->calendarName, ((($sDay + $this->day + $e2) % 7 == 0) ? ' ' . $this->calendarName . '-' . $this->markup['last_day_of_week'] : ''), (($this->displayNonMonthDays) ? $this->timeTravel(\"+$e2 days\", 'd', $this->timeStamp) : ''));\n\t\t\n\t\t$calHTML .= \"</tr></tbody></table>\";\n\t\n\t\t// Tidy up html\n\t\tif ($this->prettyHTML) {\n\t\t\t$replaceWhat = array('<tr', '<td', '</tr>', '</table>', '<thead>', '</thead>', '<tbody>', '</tbody>');\n\t\t\t$replaceWith = array(\"\\n\\t\\t<tr\", \"\\n\\t\\t\\t<td\", \"\\n\\t\\t</tr>\", \"\\n</table>\", \"\\n\\t<thead>\", \"\\n\\t</thead>\", \"\\n\\t<tbody>\", \"\\n\\t</tbody>\");\n\t\t\t$calHTML = str_replace($replaceWhat, $replaceWith, $calHTML);\n\t\t}\n\t\t\n\t\t// Print calendar\n\t\techo $calHTML;\n\t}", "public function display()\n\t{\n\t\tob_start();\n\t\t\n\t\t// Get the current information\n\t\t$actualMonth = date('m');\n\t\t$actualYear = date('Y');\n\t\t$actualDay = date('d'); // 09\n\t\t\n\t\t// Current day month and year we are viewing\n\t\tif (isset($_GET['m']))\n\t\t\t$curMonth = intval($_GET['m']);\n\t\telse\n\t\t\t$curMonth = $actualMonth; // 03 \n\t\t\n\t\tif (isset($_GET['y']))\n\t\t\t$curYear = intval($_GET['y']);\n\t\telse\n\t\t\t$curYear = $actualYear; // 2009\n\t\t\t\n\t\t\n\t\t// We need to get the info from the first day of the month by using maketime with the current info\n\t\t//mktime(hour, minute, second, monnth, day, year);\n\t\t$firstDayOfMonth = mktime(0,0,0,$curMonth, 1, $curYear); \n\t\t\n\t\t\n\t\t// Get the full month name of the current month (ex: March)\n\t\t$monthName = date('F', $firstDayOfMonth); \n\t\t\n\t\t// We need to know what day the first day is so that we know how many empty spots we need and when we wil\n\t\t// start the calendar\n\t\t$firstDayName = date('D', $firstDayOfMonth);\n\t\t\n\t\t// We need to increment a day counter so we can use it in the mysql search\n\t\t$curDay = mktime(0,0,0,$curMonth, 1, $curYear); \n\t\t\n\t\t// We need to get a count of how many blank days we have. Assuming the calendar starts on sunday.\n\t\tswitch($firstDayName)\n\t\t{\n\t\t\tcase \"Sun\": $blank = 0; break;\n\t\t\tcase \"Mon\": $blank = 1; break;\n\t\t\tcase \"Tue\": $blank = 2; break;\n\t\t\tcase \"Wed\": $blank = 3; break;\n\t\t\tcase \"Thu\": $blank = 4; break;\n\t\t\tcase \"Fri\": $blank = 5; break;\n\t\t\tcase \"Sat\": $blank = 6; break;\n\t\t}\n\t\t\n\t\t// how many days are in the current month?\n\t\t$daysInMonth = cal_days_in_month(CAL_GREGORIAN, $curMonth, $curYear);\n\t\t\n\t\t$lastDayOfMonth = mktime(0,0,0,$curMonth, $daysInMonth, $curYear); \n\t\t\n\t\t// We need to get the information about the previous month (to display the days at the end of the last month)\n\t\t// make sure it doesn't roll over the year.\n\t\tif ($curMonth == 1)\n\t\t{\n\t\t\t$prevMonth = 12;\n\t\t\t$prevYear = $curYear - 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$prevMonth = $curMonth-1;\n\t\t\t$prevYear = $curYear;\n\t\t}\n\t\t\t\n\t\t\n\t\t$daysInPrevMonth = cal_days_in_month(CAL_GREGORIAN, $prevMonth, $prevYear);\n\t\t\n\t\t// This is our counter for how many days we are at so far. When we hit 7, we need to make a new row and start over\n\t\t//\t\tIt keeps our table square, instead of all in one row.\n\t\t$dayCounter = 1;\n\t\t\n\t\t// Counter we will increment through the days while we make the calendar\n\t\t$day_num = 1;\n\n\t\t// We need to generate the urls for the prev and next links\n\t\t\n\t\tif ($curMonth == 1)\n\t\t{\n\t\t\t$linkPrevM = 12;\n\t\t\t$linkPrevY = $curYear - 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$linkPrevM = $curMonth - 1;\n\t\t\t$linkPrevY = $curYear;\n\t\t}\n\t\t\n\t\tif ($curMonth == 12)\n\t\t{\n\t\t\t$linkNextM = 1;\n\t\t\t$linkNextY = $curYear + 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$linkNextM = $curMonth + 1;\n\t\t\t$linkNextY = $curYear;\n\t\t}\n\t\t?>\n\t\t<table class=\"calendar\" border=\"0\">\n\t\t\t<caption class=\"catrow\"><a href=\"index.php?act=calendar&amp;m=<?php echo $linkPrevM?>&amp;y=<?php echo $linkPrevY?>\">&laquo;</a> <?php echo $monthName?> <a href=\"index.php?act=calendar&amp;m=<?php echo $linkNextM?>&amp;y=<?php echo $linkNextY?>\">&raquo;</a></caption>\n\t\t\t<tr>\n\t\t\t\t<th>Sun</th>\n\t\t\t\t<th>Mon</th>\n\t\t\t\t<th>Tue</th>\n\t\t\t\t<th>Wed</th>\n\t\t\t\t<th>Thu</th>\n\t\t\t\t<th>Fri</th>\n\t\t\t\t<th>Sat</th>\n\t\t\t</tr>\n\t\t<?php\n\t\techo \"<tr>\";\n\t\t//first we take care of those blank days\n\t\tfor ($i = $blank-1; $i >= 0; $i--)\n\t\t{\n\t\t\techo '<td class=\"inactive\">\n\t\t\t'.($daysInPrevMonth-$i).'\n\t\t\t</td>';\n\t\t\t$dayCounter++;\n\t\t} \n\t\t\n\t\t// Set the timezone to match php (This might not work on all installations.\n\t\t$GLOBALS['super']->db->query(\"SET time_zone = '\".date_default_timezone_get().\"'\");\n\t\t\n /*\n This needs to be changed. Potential solution:\n use time() to figure out the time of the beggining of the month,\n and the end of the month.\n */\n $start = mktime(0,0,0,$curMonth,0,$curYear);\n \n $end = mktime(0,0,0,$curMonth,$daysInPrevMonth,$curYear); \n /*echo \"Start: \".$start.\"<br />\";\n echo \"End: \".$end.\"<br />\";\n echo \"End - Start: \".($end-$start).\"<br />\";\n */\n\t\t$topicsQuery = \"\n\t\tSELECT DATE(FROM_UNIXTIME(time_added)) AS date , count(*) AS topicCount\n\t\tFROM \".TBL_PREFIX.\"topics\n\t\tWHERE time_added BETWEEN '\".$start.\"' AND '\".$end.\"'\n\t\tGROUP BY DATE(FROM_UNIXTIME(time_added))\n\t\tORDER BY DATE(FROM_UNIXTIME(time_added))\";\n\t\t$topicsQuery = $GLOBALS['super']->db->query($topicsQuery);\n\n\t\t$postsQuery = \"\n\t\tSELECT DATE(FROM_UNIXTIME(time_added)) AS date , count(*) AS postCount\n\t\tFROM \".TBL_PREFIX.\"posts\n\t\tWHERE time_added BETWEEN '\".$start.\"' AND '\".$end.\"' \n\t\tGROUP BY DATE(FROM_UNIXTIME(time_added))\n\t\tORDER BY DATE(FROM_UNIXTIME(time_added))\";\n\t\t$postsQuery = $GLOBALS['super']->db->query($postsQuery);\n\t\t\n\t\t$usersQuery = \"\n\t\tSELECT DATE(FROM_UNIXTIME(time_added)) AS date , count(*) AS userCount\n\t\tFROM \".TBL_PREFIX.\"users\n\t\tWHERE time_added BETWEEN '\".$start.\"' AND '\".$end.\"' \n\t\tGROUP BY DATE(FROM_UNIXTIME(time_added))\n\t\tORDER BY DATE(FROM_UNIXTIME(time_added))\";\n\t\t$usersQuery = $GLOBALS['super']->db->query($usersQuery);\n\t\t\n\t\t//echo $GLOBALS['super']->db->fetch_result($GLOBALS['super']->db->query(\"SELECT NOW()\"));\n\t\t$perDayArray = array();\n\t\t\n\t\twhile($day = $GLOBALS['super']->db->fetch_assoc($topicsQuery))\n\t\t{\n\t\t\t//$formatteddate = date(\"Y-m-d\",$day['date']);\n\t\t\t$perDayArray[$day['date']][\"Topics\"] = $day['topicCount'];\n\t\t}\n\t\twhile($day = $GLOBALS['super']->db->fetch_assoc($postsQuery))\n\t\t{\n\t\t\t//$formatteddate = date(\"Y-m-d\",$day['date']);\n\t\t\t// have to subtract the number of topics today from number of posts today\n\t\t\tif (isset($perDayArray[$day['date']][\"Topics\"]))\n\t\t\t\t$daysTopics = $perDayArray[$day['date']][\"Topics\"];\n\t\t\telse \n\t\t\t\t$daysTopics = 0;\n\t\t\t\t\n\t\t\t$perDayArray[$day['date']][\"Reply\"] = $day['postCount']-$daysTopics;\n\t\t}\n\t\twhile($day = $GLOBALS['super']->db->fetch_assoc($usersQuery))\n\t\t{\n\t\t\t$perDayArray[$day['date']][\"Users\"] = $day['userCount'];\n\t\t}\n\t\t\n\t\t//$GLOBALS['super']->functions->print_array($perDayArray);\n\t\t\n\t\t// go through all the days in the month and print them in a <td>\n\t\t// when we go through 7, lets reset the counter\n\t\twhile ($day_num <= $daysInMonth)\n\t\t{\n\t\t\t\n\t\t\t$mysqlFormat = date('Y-m-d', $curDay);\n\t\t\t//echo \"cur day:\".$mysqlFormat.\"<br />\";\n\t\t\tif (key_exists($mysqlFormat, $perDayArray))\n\t\t\t{\n\t\t\t\tif(isset($perDayArray[$mysqlFormat][\"Topics\"]) && $perDayArray[$mysqlFormat][\"Topics\"] > 0)\n\t\t\t\t{\n\t\t\t\t\t$plural = plural($perDayArray[$mysqlFormat][\"Topics\"]);\n\t\t\t\t\t$topicsToday = \"<li>\".$perDayArray[$mysqlFormat][\"Topics\"].\" Topic\".$plural.\"</li>\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$topicsToday = \"\";\n\t\t\t\t\t\n\t\t\t\tif(isset($perDayArray[$mysqlFormat][\"Reply\"]) && $perDayArray[$mysqlFormat][\"Reply\"] > 0)\n\t\t\t\t{\n\t\t\t\t\t$plural = plural($perDayArray[$mysqlFormat][\"Reply\"],true);\n\t\t\t\t\t$postsToday = \"<li>\".$perDayArray[$mysqlFormat][\"Reply\"].\" Repl\".$plural.\"</li>\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$postsToday = \"\";\n\t\t\t\t\t\n\t\t\t\tif(isset($perDayArray[$mysqlFormat][\"Users\"]) && $perDayArray[$mysqlFormat][\"Users\"] > 0)\n\t\t\t\t{\n\t\t\t\t\t$plural = plural($perDayArray[$mysqlFormat][\"Users\"]);\n\t\t\t\t\t$usersToday = \"<li>\".$perDayArray[$mysqlFormat][\"Users\"].\" User\".$plural.\"</li>\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$usersToday = \"\";\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\t$topicsToday = \"\";\n\t\t\t\t\t$postsToday = \"\";\n\t\t\t\t\t$usersToday = \"\";\n\t\t\t}\n\t\t\t\n\t\t\t// increment our time value by one day. We need this to use in our mysql statement.\n\t\t\t$curDay = mktime(null, null, null, $curMonth, $day_num+1, $curYear);\n\t\t\t\n\t\t\t//echo $curDay.\"<br />\";\n\t\t\t// We want to make the class be current on the cell that is the current date.\n\t\t\t$class = \"\";\n\t\t\tif ($actualMonth == $curMonth && $actualYear == $curYear && $day_num == $actualDay)\n\t\t\t{\n\t\t\t\t$class = ' class=\"current\"';\n\t\t\t}\n\t\t\t\n\t\t\t// we need to format $curDay to match mysql's date format:\n\t\t\t\n\t\t\t// 2007-12-31\n\t\t\t\n\t\t\t/*\n\t\t\t<span>4 Posts</span>\n\t\t\t\t\t<span>4 Topics</span>\n\t\t\t\t\t<span>1 New Member</span>\n\t\t\t*/\n\t\t\techo '<td'.$class.'>\n\t\t\t\t<ul>\n\t\t\t\t<li class=\"daynum\">'.$day_num.'</li>\n\t\t\t\t'.$topicsToday.\n\t\t\t\t$postsToday.\n\t\t\t\t$usersToday.'\n\t\t\t\t</ul>\n\t\t\t\t</td>';\n\t\t\t$day_num++;\n\t\t\t$dayCounter++;\n\t\t\t\n\t\t\t//Make sure we start a new row every week\n\t\t\tif ($dayCounter > 7)\n\t\t\t{\n\t\t\t\techo \"</tr><tr>\";\n\t\t\t\t$dayCounter = 1;\n\t\t\t}\n\n\t\t\t\n\t\t\t\n\t\t}\n\t\t// if we don't have an even square, lets finish out this week\n\t\t// We are reseting the counter to make it count for the next month\n\t\t$day_num = 1;\n\t\twhile($dayCounter >1 && $dayCounter <= 7)\n\t\t{\n\t\t\techo '<td class=\"inactive\">'. $day_num.'</td>';\n\t\t\t$day_num++;\n\t\t\t$dayCounter++;\n\t\t}\n\t\techo \"</tr>\";\n\t\techo \"</table>\";\n\n\t\t$output = ob_get_contents();\n\t\tob_end_clean();\n\t\treturn $output;\n\t}", "function render($events){\n\t\t// in the weekly event view\n\t\t$number_of_events=sizeof($events);\n\t\t$i=0;\n\t\t$return_val=\"\";\n\t\twhile($i<$number_of_events){\n\t\t\t$next_event=$events[$i];\n\t\t\t$return_val=$return_val.\"<a href=\\\"event_display_detail.php?event_id=\";\n\t\t\t$return_val=$return_val.($next_event->get_id());\n\t\t\t$return_val=$return_val.\"&amp;day=\".$next_event->get_start_day();\n\t\t\t$return_val.=\"&amp;month=\".$next_event->get_start_month();\n\t\t\t$return_val.=\"&amp;year=\".$next_event->get_start_year();\n\t\t\t$return_val.=\"\\\" class=\\\"eventTitle\\\">\";\n\t\t\t$return_val=$return_val.(htmlspecialchars($next_event->get_title()));\n\t\t\t$return_val=$return_val.\"</a><br />\";\n\n\t\t\t$start_time_obj=$next_event->get_start_time_object();\n\t\t\t$display_timerange=$start_time_obj->get_display_time();\n\t\t\tif ($next_event->get_duration()>0){\n\t\t\t\t$end_time_obj=$next_event->get_end_time_object();\n\t\t\t\t$display_timerange=$display_timerange.\" - \".$end_time_obj->get_display_time();\n\n\t\t\t}\n\n\t\t\t$return_val=$return_val.$display_timerange.\"<br />\";\n\t\t\tif (strlen(trim($next_event->get_event_type_name()))>0){\n\t\t\t\t$return_val=$return_val.htmlspecialchars($next_event->get_event_type_name()).\"<br />\";\n\t\t\t}\n\t\t\tif (strlen(trim($next_event->get_location_name()))>0){\n\t\t\t\t$return_val=$return_val.htmlspecialchars($next_event->get_location_name()).\"<br />\";\n\t\t\t}\n\t\t\t$return_val=$return_val.\"<br />\";\n\t\t\t$i=$i+1;\n\t\t}\n\t\tif (strlen($return_val)==0){\n\t\t\treturn \"&nbsp;\";\n\t\t}\n\t\treturn $return_val;\n\t}", "function render() {\n\t\t$this->setJs('owa.base', 'base/js/includes/jquery/flot_v0.7/flot.min.js'); \n\t\t\n\t\t// Sets the template php file you want to control the appearance of your report\n\t\t// Template path should be: example/templates/exampleDashboard.php\n\t\t$this->body->setTemplateFile('example','exampleDashboard.php');\n\t\t\n\t\t// $this->get gets the variables set by the report controller class\n\t\t// $this->body->set sets the variables you want your template to be able to access\n\t\t$this->body->set('users', $this->get('users'));\n\t\t$this->body->set('currentUser', $this->get('currentUser'));\n\t\t$this->body->set('actions', $this->get('actions'));\n\t\t$this->body->set('actionsByUser',$this->get('actionsByUser'));\n\t\t\n\t}", "function getTable($date)\n{\n list($year, $month) = explode(\"-\", $date);\n //echo $year + \", \";\n //echo $month + \", \";\n //echo $date + \", \";\n\n\n $days_in_month = cal_days_in_month(CAL_GREGORIAN, $month, $year);\n //echo \", \";\n\n // Creating connection\n include('DB_config.php');\n $conn = new mysqli($servername, $username, $password, $db_name);\n if ($conn->connect_error) {\n die(\"Connection failed: \" . $conn->connect_error);\n }\n echo '<script>console.log(\"[MySQL] Database connected successfully\")</script>';\n\n mysqli_set_charset($conn, \"utf8\");\n $sql = \"SELECT ID, NAME FROM users ORDER BY NAME\";\n $rs = $conn->query($sql);\n\n if ($rs->num_rows > 0) {\n $start = 0;\n $end = 0;\n $table = '<table id=\"dochadzka\">';\n $table .= '<col span=\"1\" class=\"wide\">';\n // first row\n $table .= '<tr><th>Meno</th>';\n $i = 1;\n while ($i != $days_in_month + 1) {\n if (isWeekend($year . \"-\" . $month . \"-\" . $i)) {\n $table .= '<th class = \"weekend\">' . $i++ . '.</th>';\n } else {\n $table .= '<th>' . $i++ . '.</th>';\n }\n\n }\n $table .= '</tr>';\n // end first row\n\n while ($row = $rs->fetch_assoc()) {\n //$table.='<option value=\"'.$row['id'].'\">'.$row['firstname'].' ' .$row['lastname'].'</option>';\n $table .= '<tr id=\"' . $row['ID'] . '\"><td id=\"name\">' . $row['NAME'] . '</td>';\n $user_id = $row['ID'];\n\n $sql = \"SELECT start_date,end_date,status_id FROM evidence WHERE user_id=\" . $user_id . \" AND MONTH(start_date)=\" . $month . \" AND YEAR(start_date)=\" . $year . \" ORDER BY id,start_date\";\n $rs1 = $conn->query($sql);\n $num_of_rows = $rs1->num_rows;\n if ($num_of_rows > 0) {\n $i = 1;\n\n $table_row = array();\n while ($i++ <= $days_in_month + 1) {\n array_push($table_row, \"<td></td>\");\n }\n\n while ($result = $rs1->fetch_assoc()) {\n\n\n list($year, $month, $day) = array_pad(explode('-', $result['start_date']), 3, null);\n $start = (int)$day;\n //echo $start.\" -> \";\n list($year, $month, $day) = array_pad(explode('-', $result['end_date']), 3, null);\n $end = (int)$day;\n //echo $end.\"<br />\";\n\n $i = $start;\n while ($end >= $i) {\n $table_row[$i++] = \"<td id=state\" . $result['status_id'] . \"></td>\";\n }\n /*\n if($num_of_rows > 1 && $j == $num_of_rows && $i < $days_in_month) {\n echo $i.\"<br />\";\n while($i++ != $days_in_month+1) {\n $table.='<th></th>';\n }\n }\n */\n\n\n //$start = 0;\n //$end = 0;\n }\n $i = 0;\n while ($i++ < $days_in_month) {\n $table .= $table_row[$i];\n }\n } else {\n $result = null;\n $i = 1;\n while ($i++ != $days_in_month + 1) {\n $table .= '<td></td>';\n }\n }\n\n }\n\n\n $table .= '</table>';\n echo $table;\n } else {\n echo \"0 results\";\n }\n\n}", "public function generate($year = NULL, $month = NULL, $events = array(), $uriPath = 'calendar/show/', $templatePath = 'calendar/') {\n // Set month and year\n if (is_null($year))\n $year = date(\"Y\", time());\n\n if (is_null($month))\n $month = date(\"m\", time());\n\n\n $this->_selected_year = $year;\n $this->_selected_month = $month;\n\n $header = self::generate_header($uriPath);\n $body = self::generate_body($events);\n\n\n $data = array_merge($header, $body);\n\n return $this->CI->load->view($templatePath.'calendar_template_view', $data);\n }", "abstract public function generateHtml();", "public function buildCalendarScripts(){\n\t\tob_start();?>\n \t<script>\n\t\t\t\t\n\t\t\t\t//on calendar cell click \n\t\t\t\t$(document).on('click', '.calendar_cell', function(e){\n\t\t\t\t\tif( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {\n\t\t\t\t\t\tvar fullDate = $(this).attr('id');\n\t\t\t\t\t\t\n\t\t\t\t\t\t$.ajax({\n\t\t\t\t\t\t url:'<?php echo $this->ajax_file; ?>',\n\t\t\t\t\t\t data:{action:'get_events', date: fullDate},\n\t\t\t\t\t\t async:false,\n\t\t\t\t\t\t success:function(data, textStatus, jqXHR) {\n\t\t\t\t\t\t\t if (data) {\n\t\t\t\t\t\t\t\t $('#day_events').replaceWith(data);\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t }\n\t\t\t\t\t\t});\t\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t//on view as calendar click\n\t\t\t\t$(document).on('click', '.view_as_calendar', function(e){\n\t\t\t\t\t$.ajax({\n\t\t\t\t\t url:'<?php echo $this->ajax_file; ?>',\n\t\t\t\t\t data:{action:'get_calendar'},\n\t\t\t\t\t async:false,\n\t\t\t\t\t success:function(data, textStatus, jqXHR) {\n\t\t\t\t\t\t if (data) {\n\t\t\t\t\t\t\t $('#events_calendar').replaceWith(data);\n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t\t});\t\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t//on view as list click\n\t\t\t\t$(document).on('click', '.view_as_list', function(e){\n\t\t\t\t\t$.ajax({\n\t\t\t\t\t url:'<?php echo $this->ajax_file; ?>',\n\t\t\t\t\t data:{action:'get_calendar_list'},\n\t\t\t\t\t async:false,\n\t\t\t\t\t success:function(data, textStatus, jqXHR) {\n\t\t\t\t\t\t if (data) {\n\t\t\t\t\t\t\t $('#day_events').html('');\n\t\t\t\t\t\t\t $('#events_calendar').replaceWith(data);\n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t\t});\t\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t//on previous month link click\n\t\t\t\t$(document).on('click', '.prev_month_link', function(e) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\n\t\t\t\t\tgetCalendar('previous');\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t//on next month link click\n\t\t\t\t$(document).on('click', '.next_month_link', function(e) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\n\t\t\t\t\tgetCalendar('next');\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\tfunction getCalendar(direction){\n\t\t\t\t\t$('.loading').show();\n\t\t\t\t\t$.ajax({\n\t\t\t\t\t url:'<?php echo $this->ajax_file; ?>',\n\t\t\t\t\t data:{action:'get_month',direction: direction},\n\t\t\t\t\t async:false,\n\t\t\t\t\t success:function(data, textStatus, jqXHR) {\n\t\t\t\t\t\t if (data) {\n\t\t\t\t\t\t\t $('.loading').delay( 800 ).hide();\n\t\t\t\t\t\t\t $('#day_events').html('');\n\t\t\t\t\t\t\t $('#events_calendar').replaceWith(data);\n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t\t});\t\n\t\t\t\t}\n </script>\n <?php\n\t\treturn ob_get_clean();\n\t}", "function cal_style () {\n\t$font_family = \"font-family: verdana,arial,helvetica,sans-serif;\";\n\t$font_size = \"font-size: xx-small;\";\n\t$textd = \"text-decoration:none;\";\n\t$standard = \"$font_family $font_size $textd\";\n\t$bold = \"font-weight: bold; $standard\";\n\treturn <<<CSS\n<style type=\"text/css\">\n<!--\na.sellinkbold:link \t{ color:#FF0000; $standard }\na.sellinkbold:visited \t{ color:#FF00FF; $standard }\na.sellinkbold:active \t{ color:#FF00FF; $standard }\na.sellinkbold:hover \t{ color:#0000FF; $standard }\na.sellink:link \t\t{ color:#000000; $standard }\na.sellink:visited \t{ color:#0000FF; $standard }\na.sellink:active \t{ color:#0000FF; $standard }\na.sellink:hover \t{ color:#FF0000; $standard }\na.callink:link \t\t{ color:#000000; $bold }\na.callink:visited \t{ color:#000000; $bold }\na.callink:active \t{ color:#000000; $bold }\na.callink:hover \t{ color:#000000; $bold }\na.calhome:link \t\t{ color:#000000; $standard }\na.calhome:visited \t{ color:#000000; $standard }\na.calhome:active \t{ color:#000000; $standard }\na.calhome:hover \t{ color:#000000; $standard }\ntd.caltz \t\t{ color:#000000; $font_family $font_size }\ntd.calwt \t\t{ color:#000000; $font_family $font_size font-weight: bold; }\ntd.calat \t\t{ color:#000000; $font_family $font_size }\ntd.calht \t\t{ color:#000000; background-color:#AAAAFF; $font_family $font_size }\ntd.calhe \t\t{ color:#FF0000; background-color:#AAAAFF; $font_family $font_size }\ntd.calwe \t\t{ color:#FF0000; $font_family $font_size }\ntable.caltab1 \t\t{ border:0px; padding:0px; margin:0px; }\ntable.caltab2 \t\t{ border:0px; padding:0px; margin:0px; }\ntable.caltab { \n\twidth:160px; \n\tborder:1px solid grey; \n\tbackground-color:#FFFFFF; \n\tpadding:2px; \n\tmargin:0px; \n}\n//-->\n</style>\nCSS;\n}", "public function calendarStyle($speAvailArray, $blocked, $partiallyBookedArray, $tableHtmlValue, $_sp, $partiallyBookedView, $customArray) {\n /**\n * Extracting the customArray\n */\n $day = $customArray ['day'];\n $totaldays = $customArray ['totaldays'];\n $x = $customArray ['x'];\n $year = $customArray ['year'];\n $notAvail = $customArray ['notAvail'];\n $dayArray = array (\n \"Sun\",\n \"Mon\",\n \"Tue\",\n \"Wed\",\n \"Thu\",\n \"Fri\",\n \"Sat\"\n );\n $styleData = $this->calendarStyleDayData ( $day, $dayArray );\n $tl = $this->getTL ( $styleData, $totaldays );\n $ctr = 1;\n $d = 1;\n for($i = 1; $i <= $tl; $i ++) {\n \n if ($ctr == 1) {\n $tableHtmlValue = $tableHtmlValue . \"<tr class='blockcal'>\";\n }\n if ($i >= $styleData && $d <= $totaldays) {\n if (strtotime ( \"$year-$x-$d\" ) < strtotime ( date ( \"Y-n-j\" ) )) {\n $tableHtmlValue = $tableHtmlValue . \"<td align='center' class='previous days '><font size = '2' face = 'tahoma'>$d</font></td>\";\n } else {\n /**\n * Store calender dates and data\n * 'year','x','d','tableHtmlValue'\n * 'partiallyBookedView','sp','not_avail'\n * 'speAvailArray','blocked','partiallyBookedArray','propertyTime'\n * 'propertyTimeData','hourlyEnabledOrNot'\n */\n $calendarDatesData = array (\n 'year' => $year,\n 'x' => $x,\n 'd' => $d,\n 'tableHtmlValue' => $tableHtmlValue,\n 'partiallyBookedView' => $partiallyBookedView,\n 'sp' => $_sp,\n 'not_avail' => $notAvail,\n 'speAvailArray' => $speAvailArray,\n 'blocked' => $blocked,\n 'partiallyBookedArray' => $partiallyBookedArray\n );\n $tableHtmlValue = $this->getCalendarDates ( $calendarDatesData );\n }\n $d ++;\n } else {\n $tableHtmlValue = $tableHtmlValue . \"<td>&nbsp</td>\";\n }\n $ctr ++;\n if ($ctr > 7) {\n $ctr = 1;\n $tableHtmlValue = $tableHtmlValue . \"</tr>\";\n }\n }\n /**\n * Returning the table html Value\n */\n return $tableHtmlValue;\n }", "public function start_output() {\n echo \"<!DOCTYPE html><html><head>\";\n echo \\html_writer::empty_tag('meta', ['charset' => 'UTF-8']);\n echo \\html_writer::tag('title', $this->filename);\n echo \"<style>\nhtml, body {\n margin: 0;\n padding: 0;\n font-family: sans-serif;\n font-size: 13px;\n background: #eee;\n}\nth {\n border: solid 1px #999;\n background: #eee;\n}\ntd {\n border: solid 1px #999;\n background: #fff;\n}\ntr:hover td {\n background: #eef;\n}\ntable {\n border-collapse: collapse;\n border-spacing: 0pt;\n width: 80%;\n margin: auto;\n}\n</style>\n</head>\n<body>\";\n }", "public function render()\r\n {\r\n $widths = $this->calculateWidths();\r\n\r\n $table = $this->renderHeaders($widths);\r\n $table .= $this->renderRows($widths);\r\n\r\n return $table;\r\n }", "public function htmlElementCalenderView($arrayHtmlElement){\n /**\n * Assign array elements to corresponding variables\n * @var unknown\n */\n $i = $arrayHtmlElement['i'];\n $st = $arrayHtmlElement['st'];\n $d = $arrayHtmlElement['d'];\n $totaldays = $arrayHtmlElement['totaldays'];\n $year = $arrayHtmlElement['year'];\n $x = $arrayHtmlElement['x'];\n $htmlElementValue = $arrayHtmlElement['htmlElementValue'];\n $date = $arrayHtmlElement['date'];\n $partiallyBookedArray = $arrayHtmlElement['partiallyBookedArray'];\n $propertyTime = $arrayHtmlElement['propertyTime'];\n $propertyTimeData = $arrayHtmlElement['propertyTimeData'];\n $hourlyEnabledOrNot = Mage::helper ( 'airhotels/product' )->getHourlyEnabledOrNot ();\n $blocked = $arrayHtmlElement['blocked'];\n $speAvailArray = $arrayHtmlElement['speAvailArray'];\n $notAvail = $arrayHtmlElement['notAvail'];\n $_sp = $arrayHtmlElement['_sp']; \n /**\n * Check condition for total days\n */\n if ($i >= $st && $d <= $totaldays) {\n if (strtotime ( \"$year-$x-$d\" ) < strtotime ( date ( \"Y-n-j\" ) )) {\n $htmlElementValue = $htmlElementValue . \"<td align='center' class='previous days '><font size = '2' face = 'tahoma'>$d</font></td>\";\n } else {\n $date = strtotime ( \"$year/$x/$d\" );\n $tdDate = 'tdId' . '_' . date ( \"m/d/Y\", $date );\n if (in_array ( $d, $partiallyBookedArray ) && $propertyTime == $propertyTimeData && $hourlyEnabledOrNot == 0) {\n $style = $this->styleChanges($d,$speAvailArray,$blocked);\n $htmlElementValue = $htmlElementValue . \"<td id=\" . $tdDate . \" class='normal days \" . $d . \" host_calendar_hourly_partially_avail' align='center' \" . $style . \"><font size = '2' face = 'tahoma'>$d</font></td>\";\n } else if (in_array ( $d, $notAvail )) {\n $htmlElementValue = $htmlElementValue . \"<td id=\" . $tdDate . \" class='normal days \" . $d . \" ' align='center'style='background-color:#F18200;color: black !important;' ><font size = '2' face = 'tahoma'>$d</font></td>\";\n } else if (array_key_exists ( $d, $_sp )) {\n $htmlElementValue = $htmlElementValue . \"<td style='background-color:#65AA5F;padding: 11px 23px;' id=\" . $tdDate . \" class='normal days \" . $d . \" ' align='center' ><font size = '2' face = 'tahoma'>$d</font><br><div style='width: 25px;font-size: 1.0em;text-align: right;'>\" . Mage::app ()->getLocale ()->currency ( Mage::app ()->getStore ()->getCurrentCurrencyCode () )->getSymbol () . Mage::helper ( 'directory' )->currencyConvert ( $_sp [$d], Mage::app ()->getStore ()->getBaseCurrencyCode (), Mage::app ()->getStore ()->getCurrentCurrencyCode () ) . \"</div></td>\"; \n } else if (in_array ( $d, $blocked )) {\n $htmlElementValue = $htmlElementValue . \"<td id=\" . $tdDate . \" class='normal days \" . $d . \" ' align='center' style='background-color:#E07272;'><font size = '2' face = 'tahoma'>$d</font></td>\";\n } else {\n $htmlElementValue = $htmlElementValue . \"<td id=\" . $tdDate . \" class='normal days \" . $d . \" ' align='center' ><font size = '2' face = 'tahoma'>$d</font></td>\";\n }\n } \n } else {\n $htmlElementValue = $htmlElementValue . \"<td>&nbsp</td>\";\n }\n /**\n * return html element value\n */ \n return $htmlElementValue;\n }", "public static function icalendar() {\r\n $ical = \"BEGIN:VCALENDAR\".PHP_EOL;\r\n $ical .= \"VERSION:2.0\".PHP_EOL;\r\n\r\n $show_personal_bak = Calendar_Events::$calsettings->show_personal;\r\n $show_course_bak = Calendar_Events::$calsettings->show_course;\r\n $show_deadline_bak = Calendar_Events::$calsettings->show_deadline;\r\n $show_admin_bak = Calendar_Events::$calsettings->show_admin;\r\n Calendar_Events::set_calendar_settings(1,1,1,1);\r\n Calendar_Events::get_calendar_settings();\r\n $eventlist = Calendar_Events::get_calendar_events();\r\n Calendar_Events::set_calendar_settings($show_personal_bak,$show_course_bak,$show_deadline_bak,$show_admin_bak);\r\n Calendar_Events::get_calendar_settings();\r\n\r\n $events = array();\r\n foreach ($eventlist as $event) {\r\n $ical .= \"BEGIN:VEVENT\".PHP_EOL;\r\n $startdatetime = new DateTime($event->start);\r\n $ical .= \"DTSTART:\".$startdatetime->format(\"Ymd\\THis\").PHP_EOL;\r\n $duration = new DateTime($event->duration);\r\n $ical .= \"DURATION:\".$duration->format(\"\\P\\TH\\Hi\\Ms\\S\").PHP_EOL;\r\n $ical .= \"SUMMARY:[\".strtoupper($event->event_group).\"] \".$event->title.PHP_EOL;\r\n $ical .= \"DESCRIPTION:\".canonicalize_whitespace(strip_tags($event->content)).PHP_EOL;\r\n if ($event->event_group == 'deadline')\r\n {\r\n $ical .= \"BEGIN:VALARM\".PHP_EOL;\r\n $ical .= \"TRIGGER:-PT24H\".PHP_EOL;\r\n $ical .= \"DURATION:PT10H\".PHP_EOL;\r\n $ical .= \"ACTION:DISPLAY\".PHP_EOL;\r\n $ical .= \"DESCRIPTION:DEADLINE REMINDER for \".canonicalize_whitespace(strip_tags($event->title)).PHP_EOL;\r\n $ical .= \"END:VALARM\".PHP_EOL;\r\n }\r\n $ical .= \"END:VEVENT\".PHP_EOL;\r\n }\r\n $ical .= \"END:VCALENDAR\".PHP_EOL;\r\n return $ical;\r\n }", "function generate_calendar($year, $month, $days = array(), $day_name_length = 3, $first_day = 0, $prev_link, $next_link)\n{\n\n\t$first_of_month = gmmktime(0,0,0,$month,1,$year);\n\t#remember that mktime will automatically correct if invalid dates are entered\n\t# for instance, mktime(0,0,0,12,32,1997) will be the date for Jan 1, 1998\n\t# this provides a built in \"rounding\" feature to generate_calendar()\n\n\t$day_names = array(); #generate all the day names according to the current locale\n\tfor($n=0,$t=(3+$first_day)*86400; $n<7; $n++,$t+=86400) #January 4, 1970 was a Sunday\n\t\t$day_names[$n] = ucfirst(gmstrftime('%A',$t)); #%A means full textual day name\n\n\tlist($month, $year, $month_name, $weekday) = explode(',',gmstrftime('%m,%Y,%B,%w',$first_of_month));\n\t$weekday = ($weekday + 7 - $first_day) % 7; #adjust for $first_day\n\t$title = htmlentities(ucfirst($month_name)).'&nbsp;'.$year; #note that some locales don't capitalize month and day names\t\n\t\n\n\n\t#Begin calendar. Uses a real <caption>. See http://diveintomark.org/archives/2002/07/03\n\t\n\t$calendar = '<div id=\"calendar-box\"><table class=\"calendar\">'.\"\\n\".\n\t\t'<caption class=\"calendar-month\">'.$prev_link.'&nbsp;&nbsp;&nbsp;&nbsp;';\n\n\t$calendar .= '<form class=\"cal-select\" method=\"GET\" action=\"manage.php\">\n\t\t\t\t\t<input type=\"hidden\" name=\"display\" value=\"month\" />\n\t\t\t\t\t<select name=\"month\">';\n\t$months = array(1=>'January',2=>'February',3=>'March',4=>'April',5=>'May',6=>'June',7=>'July',8=>'August',9=>'September',10=>'October',11=>'November',12=>'December');\n\t\n\tfor ($x = 1; $x <= 12; $x++)\n\t{\n\t\tif (isset($_GET['month']) || isset($_SESSION['lastMonthViewMonth']))\n\t\t{\n\t\t\tif (isset($_GET['month'])) { $m = $_GET['month']; } else { $m = $_SESSION['lastMonthViewMonth']; }\n\t\t\tif ($m == $x)\n\t\t\t\t$calendar .= '<option value=\"'.$x.'\" SELECTED>'.$months[$x].'</option>';\n\t\t\telse\n\t\t\t\t$calendar .= '<option value=\"'.$x.'\">'.$months[$x].'</option>';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (date('n', time()) == $x)\n\t\t\t\t$calendar .= '<option value=\"'.$x.'\" SELECTED>'.$months[$x].'</option>';\n\t\t\telse\n\t\t\t\t$calendar .= '<option value=\"'.$x.'\">'.$months[$x].'</option>';\n\t\t}\n\t\t\n\t}\n\t$calendar .= '</select> <select name=\"year\">';\n\tfor ($x = 2010; $x <= 2070; $x++)\n\t{\t\n\t\tif (isset($_GET['year']) || isset($_SESSION['lastMonthViewYear']))\n\t\t{\n\t\t\tif (isset($_GET['year'])) { $y = $_GET['year']; } else { $y = $_SESSION['lastMonthViewYear']; }\n\t\t\tif ($y == $x)\n\t\t\t\t$calendar .= '<option value=\"'.$x.'\" SELECTED>'.$x.'</option>';\n\t\t\telse\n\t\t\t\t$calendar .= '<option value=\"'.$x.'\">'.$x.'</option>';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (date('Y', time()) == $x)\n\t\t\t\t$calendar .= '<option value=\"'.$x.'\" SELECTED>'.$x.'</option>';\n\t\t\telse\n\t\t\t\t$calendar .= '<option value=\"'.$x.'\">'.$x.'</option>';\n\t\t}\n\t}\n\t$calendar .= '</select> <input type=\"submit\" value=\"view\" /></form>';\n\t\n\t$calendar .= '&nbsp;&nbsp;&nbsp;&nbsp;'.$next_link.\"</caption>\\n<tr class=\\\"day-names-row\\\">\";\n\n\tif($day_name_length){ #if the day names should be shown ($day_name_length > 0)\n\t\t#if day_name_length is >3, the full name of the day will be printed\n\t\tforeach($day_names as $d)\n\t\t\t$calendar .= '<th abbr=\"'.htmlentities($d).'\">'.htmlentities($day_name_length < 4 ? substr($d,0,$day_name_length) : $d).'</th>';\n\t\t$calendar .= \"</tr>\\n<tr class=\\\"day-row\\\">\";\n\t}\n\t\n\t// begin calendar days\n\tif($weekday > 0) $calendar .= '<td colspan=\"'.$weekday.'\">&nbsp;</td>'; #initial 'empty' days\n\tfor($day=1,$days_in_month=gmdate('t',$first_of_month); $day<=$days_in_month; $day++,$weekday++){\n\t\tif($weekday == 7){\n\t\t\t$weekday = 0; #start a new week\n\t\t\t$calendar .= \"</tr>\\n<tr class=\\\"day-row\\\">\";\n\t\t}\n\t\tif(isset($days[$day]) and is_array($days[$day]))\n\t\t{\n\t\t\t@list($classes, $content) = $days[$day];\n\t\t\tif(is_null($content)) $content = $day;\n\t\t\t$calendar .= '<td'.($classes ? ' class=\"'.htmlspecialchars($classes).'\">' : '>').\n\t\t\t\t($content).'</td></a>';\n\t\t}\n\t\telse $calendar .= '<td>'.$day.'</td>';\n\t}\n\tif($weekday != 7) $calendar .= '<td colspan=\"'.(7-$weekday).'\">&nbsp;</td>'; #remaining \"empty\" days\n\n\treturn $calendar.\"</tr>\\n</table></div>\\n\";\n}", "public function tableHtmlValue() {\n /**\n * Html Table Values\n */\n $tableHtmlValue = '';\n return $tableHtmlValue . \"<table border = '1' cellspacing = '0' bordercolor='blue' cellpadding ='2' class='calend'>\n <tr class='weekDays'>\n <th><font size = '2' face = 'tahoma'>Sun</font></th>\n <th><font size = '2' face = 'tahoma'>Mon</font></th>\n <th><font size = '2' face = 'tahoma'>Tue</font></th>\n <th><font size = '2' face = 'tahoma'>Wed</font></th>\n <th><font size = '2' face = 'tahoma'>Thu</font></th>\n <th><font size = '2' face = 'tahoma'>Fri</font></th>\n <th><font size = '2' face = 'tahoma'>Sat</font></th>\n </tr> \";\n }", "function event_grid_view() {\n\tsp_calendar_grid();\n}", "protected function generateHtml()\n\t{\n\t}", "public function cal_indexAction()\n {\n $startDate = date(\"Y-m-d\") ;\n $endDate = date(\"Y-m-d\", mktime(0,0,0,date(\"m\"),date(\"d\"),date(\"Y\")+1));\n $em = $this->getDoctrine()->getManager();\n $dql1 = \"SELECT c.title,c.date,c.time,c.description FROM EnglishCalendarBundle:Calendar c WHERE c.date >= ?1 and c.date < ?2 ORDER BY c.date ASC\";\n $calendar = $em->createQuery($dql1)->setParameter('1',$startDate)->setParameter('2',$endDate)->getResult();\n return $this->render('EnglishHomeBundle:Default:cal_index.html.twig', array('calendar' => $calendar,));\n\n }" ]
[ "0.7477533", "0.7392036", "0.7086154", "0.7049579", "0.703222", "0.7010395", "0.6995145", "0.6987137", "0.6983575", "0.687349", "0.68351984", "0.6822865", "0.6801249", "0.67956764", "0.67782706", "0.67735076", "0.6663788", "0.66468054", "0.6645773", "0.6644275", "0.6528975", "0.6514362", "0.6497018", "0.64516073", "0.6395689", "0.6348838", "0.6339743", "0.6333883", "0.6285749", "0.6261756", "0.62603927", "0.6253914", "0.621116", "0.6211049", "0.62104857", "0.61487067", "0.61139", "0.60778433", "0.60646826", "0.6058569", "0.604032", "0.60283184", "0.60047936", "0.60038847", "0.5994316", "0.59865135", "0.5985814", "0.59635663", "0.59457964", "0.5929344", "0.58550656", "0.5828204", "0.5827645", "0.5813355", "0.5806788", "0.58036447", "0.5784788", "0.57763535", "0.57488334", "0.5746487", "0.572753", "0.5715709", "0.570415", "0.5655874", "0.5648763", "0.56421286", "0.56371367", "0.56318796", "0.5628502", "0.5628341", "0.5620802", "0.5620414", "0.5610122", "0.5602475", "0.56002295", "0.55941254", "0.55910814", "0.5585639", "0.557479", "0.5572357", "0.5568424", "0.5554693", "0.55466646", "0.5543032", "0.553801", "0.5536568", "0.5536339", "0.5535895", "0.55357444", "0.55194736", "0.5517565", "0.5516129", "0.55047125", "0.548594", "0.5482211", "0.5474154", "0.54696685", "0.5464965", "0.5460689", "0.545871" ]
0.8193256
0
Get the list view.
public function getListView($actions) { $actionViews = [ 'index' => ['index', 'table'], 'create' => ['create', 'form'], 'edit' => ['edit', 'form'], 'show' => ['show'] ]; $views = collect($actionViews); if (! empty($actions)) { $actions = explode(',', str_replace(' ', '', trim($actions))); $views = $views->only($actions); } return $views->flatten()->unique(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getListView()\n {\n if (null !== $this->listView) {\n return $this->listView;\n }\n\n $listView = $this->createListView();\n\n if ($listView instanceof TemplatingAwareInterface) {\n $listView->setTemplating($this->getTemplating());\n }\n\n $this->buildListView($listView);\n\n return $this->listView = $listView;\n }", "function _sf_get_list_view() {\n\t\t\n\t\t///// IF WE ARE USING THE ALTERNATE VIEW\n\t\tif(ddp('lst_logo') == 'on') { return 'list'; }\n\t\t\n\t\t//// IF ITS LIST\n\t\tif(_sf_is_list_view('List')) {\n\t\t\t\n\t\t\treturn 'list';\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\treturn 'grid';\n\t\t\t\n\t\t}\n\t\t\n\t}", "protected function createListView()\n {\n return new TableListView($this->getOption('list_view_options'));\n }", "public function getView()\n\t{\n\t\treturn View::make($this->viewName, [\n\t\t\t'items' => $this->items,\n\t\t]);\n\t}", "public function getView()\r\n {\r\n return parent::getView();\r\n }", "abstract protected function getDefaultViewList();", "public function getListViewUrl() {\n\t\treturn \"index.php?module=\".$this->getName().\"&parent=\".$this->getParentName().\"&view=List\";\n\t}", "public function getListViewUrl() {\n\t\treturn \"index.php?module=\".$this->getName().\"&parent=\".$this->getParentName().\"&view=List\";\n\t}", "public function viewlistAction()\n\t{\n\t\t$view = new ViewModel();\n\t\t// this is not needed since it matches \"module/controller/action\"\n\t\t// $view->setTemplate('content/article/view');\n\t\t$article = 'var article';\n\t\t$articleView = new ViewModel(array(\n\t\t\t'article' => $article\n\t\t));\n\t\t$articleView->setTemplate('content/article');\n\t\t$primarySidebarView = new ViewModel();\n\t\t$primarySidebarView->setTemplate('content/main-sidebar');\n\t\t$config = $this->getServiceLocator()->get('Config');\n\t\t$dir = $config['settings']['audiodata'];\n\t\tif (file_exists($dir)) {\n\t\t\t$files = $this->dirToArray($dir);\n\t\t\tkrsort($files);\n\t\t}\n\t\t// $filelistView = new ViewModel();\n\t\t$filelistView = new ViewModel(array(\n\t\t\t'files' => $files,\n\t\t\t'dir' => $dir\n\t\t));\n\t\t$filelistView->setTemplate('audio/filelist');\n\t\t$secondarySidebarView = new ViewModel();\n\t\t$secondarySidebarView->setTemplate('content/secondary-sidebar');\n\t\t$sidebarBlockView = new ViewModel();\n\t\t$sidebarBlockView->setTemplate('content/block');\n\t\t$secondarySidebarView->addChild($sidebarBlockView, 'block');\n\t\t$view->addChild($articleView, 'article')->addChild($primarySidebarView, 'sidebar_primary')->addChild($filelistView, 'filelist')->addChild($secondarySidebarView, 'sidebar_secondary');\n\t\t\n\t\treturn $view;\n\t}", "public function getView(){ }", "public function getView();", "public function getView() {}", "public function getView() {}", "public function listview() {\n\n $photo_list = Doctrine::getTable('Photo')->findAll();\n $data['photo_list'] = $photo_list;\n\n $data['view_name'] = \"photo_list_view\";\n $this->load->view(\"admin/common/template\", $data);\n }", "public function getView()\n\t{\n\t\treturn $this->client->getView();\n\t}", "public function index()\n {\n return view('list_wrapper', [\n 'entityType' => 'qbd',\n 'datatable' => new QBDDatatable(),\n 'title' => mtrans('qbd', 'qbd_list'),\n ]);\n }", "public function listViewName() { return ContentServiceProvider::NAME.\"::admin.list\"; }", "public function view_list(){\n\t\treturn view(mProvider::$view_prefix.mProvider::$view_prefix_priv.'stock');\n\t}", "public function getView()\n {\n return $this->_view;\n }", "public function getView()\n {\n return $this->_view;\n }", "public function getView()\n {\n return $this->_view;\n }", "public function getView()\n {\n }", "function getView() {\n\t\treturn $this->View;\n\t}", "public function getView()\n\t{\n\t\treturn $this->_view;\n\t}", "public function getView() {\r\n return $this->_view;\r\n }", "public function getView()\r\n {\r\n return $this->_controller->getView();\r\n }", "public function render()\n {\n return view('components.produit.util.list-view');\n }", "protected function getView()\n {\n return $this->view;\n }", "public function getView() {\n\t\treturn $this -> st_view;\n\t}", "public function getListViewUrl()\n\t{\n\t\treturn 'index.php?module=TreesManager&parent=Settings&view=List';\n\t}", "public function getListView()\n {\n $data = Customer::select('customer.*', 'province.name as province_name')\n ->join('province', 'customer.province_id', '=', 'province.id')\n ->orderBy('customer.name')->get();\n\n //set lists\n $country = new Country();\n $country_data = $country->ListWithProvinces();\n\n /* FILTER DOWN BOTH LISTS TO ONLY WH AND CLIENT AVAILABLE TO THE LOGGED IN USER */\n $warehouse_data = Warehouse::select('id', 'name', 'active')->orderBy('name')->get();\n $client_data = Client::select('id', 'short_name', 'name', 'active')->orderBy('name')->get();\n\n return response()->view('pages.customer', ['main_data' => $data,\n 'url' => $this->url,\n 'my_name' => $this->my_name,\n 'country_data' => $country_data,\n 'warehouse_data' => $warehouse_data,\n 'client_data' => $client_data]);\n }", "public function getView()\n {\n return $this->view;\n }", "public function getView()\n {\n return $this->view;\n }", "public function getView()\n {\n return $this->view;\n }", "public function getView()\n {\n return $this->view;\n }", "public function getView()\n {\n return $this->view;\n }", "public function getView()\n {\n return $this->view;\n }", "public function getView()\n {\n return $this->view;\n }", "public function getView()\n {\n return $this->view;\n }", "public function getView()\n\t{\n\t\treturn $this->view;\n\t}", "function getView() {\r\n return $this->view;\r\n }", "public function getView() {\n return $this->setView();\n }", "public function getView()\r\n {\r\n return $this->view;\r\n }", "public function getView() {\n\t\treturn $this->view;\n\t}", "public function getView() {\n\t\treturn $this->view;\n\t}", "function action_listview() {\n\t\t$this->view = 'toplist';\n\t\t//$GLOBALS['log']->fatal('in controller');\n\t\t$this->bean = new REG_PatientListView();\n\t}", "public function getView() {\n \t\n \t// Return the current view\n \treturn $this->sView;\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 getView()\n {\n if (method_exists($this->module, 'getView')) {\n return $this->module->getView();\n }\n\n return parent::getView();\n }", "protected static function getView()\n {\n return null;\n }", "public function getView()\n\t{\n\t\tif(NULL === $this->_view) {\n\t\t\t$this->_view = agoractu_view::getInstance();\n\t\t}\n\t\treturn $this->_view;\n\t}", "public function listt(){\n\t \treturn view('menu_list', array('menus' => Menu::orderBy('date')->get()));\n\t }", "public function getView()\n {\n return $this->getService('view');\n }", "public function findForList()\n {\n return $this->findByShowInOverview(true);\n }", "public function list(){\n return view('admin.list');\n }", "public function getListViewScript()\n {\n return $this->__get(\"list_view_script\");\n }", "public function getListView()\n {\n $warehouse_id = auth()->user()->current_warehouse_id;\n $client_id = auth()->user()->current_client_id;\n\n //if not set, then we need to make the user set it first\n if( $warehouse_id === null || $client_id === null )\n {\n\n }\n\n //get the list data with the default sort set the same as in the angular table\n $data = $this->getList();\n\n //we need to send the url to do Ajax queries back here\n $url = url('/product');\n\n //build the list data\n $product_type = new ProductType();\n $product_type_data = ProductType::orderBy('name')->get();\n $default_uom_data = $product_type->getDefaultUomList();\n\n //build UOM and variant array - This is so we don't have to do variable assignments in the template and control\n //the number of each items here in the controller.\n for( $i = 1; $i < 9; $i++ ) { $uom[$i] = 'uom' . $i; }\n\n return response()->view('pages.product', ['main_data' => $data,\n 'url' => $url,\n 'my_name' => $this->my_name,\n 'uom' => $uom,\n 'default_uom_data' => $default_uom_data,\n 'product_type_data' => $product_type_data]);\n }", "public function index()\n {\n $contacts_lists = $this->getContactsLists();\n\n return view('contactslists.index', compact('contacts_lists'));\n }", "public static function getView(): string\n {\n return 'filament-drafts::filament.list-draftable-records';\n }", "function list_view()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $data = '';\n $this->global['pageTitle'] = '轮播图列表';\n $this->global['pageName'] = 'carousel';\n\n $this->loadViews(\"carousel\", $this->global, $data, NULL);\n }\n }", "public function getView(){\n\t\treturn $this->view;\n\t}", "public function getView()\n {\n if ($this->_view === null) {\n $this->_view = Yii::$app->getView();\n }\n\n return $this->_view;\n }", "function list_view()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $this->global['pageTitle'] = '订单管理';\n $this->global['pageName'] = 'order';\n\n $data['searchType'] = '0';\n $data['searchName'] = '';\n $data['searchStatus'] = '0';\n $data['searchMethod'] = '0';\n\n $this->loadViews(\"order_manage/order\", $this->global, $data, NULL);\n }\n }", "public function getListView()\n\t{\n\t\tAccessController::allowedOrNot('subject-teacher', 'can_view');\n\t\t$subjects = '';\n\t\tif(Input::has('class_id') && Input::has('section_id'))\n\t\t{\n\t\t\t$class_id = Input::get('class_id');\n\t\t\t$section_id = Input::get('section_id');\n\t\t\t$subject_table = Subject::getTableName();\n\t\t\t$employee_table = Employee::getTableName();\n\n\t\t\t$subjects = DB::table($subject_table)\n\t\t\t\t\t\t\t->join($employee_table, $employee_table.'.id', '=', $subject_table.'.teacher_id')\n\t\t\t\t\t\t\t->select('subject_name','subject_code','class_id','section_id','full_marks','pass_marks','remarks',\n\t\t\t\t\t\t\t\t\t'teacher_id', \n\t\t\t\t\t\t\t\t\t'employee_name as teacher_name', \n\t\t\t\t\t\t\t\t\t$subject_table.'.id as id',\n\t\t\t\t\t\t\t\t\t$subject_table.'.is_active as is_active')\n\t\t\t\t\t\t\t->where('class_id', $class_id)\n\t\t\t\t\t\t\t->where('section_id', $section_id)\n\t\t\t\t\t\t\t->get();\n\t\t}\n\n\t\treturn View::make($this->view . 'list')\n\t\t\t\t\t->with('role', $this->role)\n\t\t\t\t\t->with('subjects', $subjects)\n\t\t\t\t\t->with('module_name', $this->module_name);\n\t}", "public function getView()\n {\n return $this->cntView;\n }", "private function getView()\n {\n if ($this->view) {\n return $this->view;\n }\n\n $this->view = $this->services->get(View::class);\n return $this->view;\n }", "public function getView()\n {\n if (!$this->view) {\n $viewClass = $this->viewClass;\n $this->view = new $viewClass();\n\n $this->initializeViewAdditions();\n }\n\n return $this->view;\n }", "public function getView()\n {\n $view = App::$locator->view;\n if ($this->layout) {\n $view->setLayout($this->layout);\n }\n \n return $view;\n }", "public function getList()\n {\n $data = [];\n $data['results'] = Result::with('user')->get();\n return view('results.list', $data);\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 list()\n {\n $list = ProxyItem::all();\n return view('home')->withList($list);\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 $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $items = $this->model->orderBy('created_at', 'desc')->get();\n\n return view('admin.'.$this->resourceName.'.index', compact('items'));\n }", "public function getList()\n {\n $requests = Request::orderBy('id', 'desc')->paginate(15);\n return view('dj.requests', ['requests' => $requests]);\n }", "static public function getView() {\n\t\treturn self::$defaultInstance;\n\t}", "public function index()\n {\n //\n $items = TodoList::all();\n return view('list', ['items' => $items]);\n }", "public function getList()\n {\n return parent::getList();\n }", "public function index()\n {\n return view('listino.listino');\n }", "public function renderList()\n {\n $listUnit = $this->interActor->listUnit($this->inputHandler->getArrayMap());\n\n $view = new \\View\\Model(\n \\View\\Customer::list($listUnit),\n $this->inputHandler->routeArrayMap()\n );\n return $view->render();\n }", "public function indexAction()\n {\n\n $manager = $this->container->get('app_manager_listkdo');\n $data = array(\n 'manager' => $manager,\n 'dir' => 'AppBundle:ListKdo',\n 'show' => 'appbundle_listkdo_show',\n 'edit' => 'appbundle_listkdo_edit'\n );\n\n return $this->gridList($data);\n }", "public function newList()\n\t{\n\t\treturn view('newList');\n\t}", "public function index()\n {\n $foodlists = Foodlist::all();\n return view('admin.list.show',compact('foodlists'));\n }", "public function listView()\r\n {\r\n $data['roles'] = $this->AdminRoleModel->getAll();\r\n $firstRoleId = isset($data['roles'][0]['role_id']) ? $data['roles'][0]['role_id'] : '';\r\n $data['permissions'] = $this->AdminRoleModel->getPermissions($firstRoleId);\r\n echo $this->load->view('admin/roles/list', $data, TRUE);\r\n }", "public function index()\n {\n //\n $list = $this->model->latest()->paginate(10);\n return view(\"admin.$this->view.index\",compact('list'));\n }", "public function getView()\n {\n if (!$this->view) {\n $this->view = Kerisy::$app->get('view');\n $this->view->setDirectory($this->getViewPath());\n }\n return $this->view;\n }", "public function get_views()\n\t{\n\t\treturn $this->driver_query('view_list');\n\t}", "public function listView()\r\n {\r\n $data['page'] = lang('interview_categories');\r\n $data['menu'] = 'interview_categories';\r\n $this->load->view('admin/layout/header', $data);\r\n $this->load->view('admin/interview-categories/list');\r\n }", "public function getDataSourceView();", "public function index()\n {\n return view('polls.pollsList', [\n 'polls' => Poll::select('*')\n ->orderBy('created_at', 'desc')->get()\n ]); \n }", "public function liste()\n {\n $books = DB::select('select * from book');\n return view('get_list', ['book' => $books]);\n }", "public function getViews();", "public function getList() {\n return $this->list;\n }", "public function getList()\n {\n return $this->list;\n }", "public function getList()\n {\n return $this->list;\n }", "public function getList()\n {\n return $this->list;\n }", "public function adminIndexList()\n {\n return view('admin.list.index');\n }", "public function index()\n {\n return $this->user->recipeLists()->get(['title', 'id']);\n }", "public function index()\n\t{\n\t\t$lists = DB::table('lists')->where('user_id', Auth::user()->id)\n\t\t->get();\n\t\t$listItems = DB::table('list_items')->where('user_id', Auth::user()->id)\n\t\t->get();\n\n\t\treturn view('yourLists', compact('lists','listItems'));\n\t}" ]
[ "0.7510305", "0.71312916", "0.70297104", "0.69293696", "0.68020314", "0.6791699", "0.67443913", "0.67443913", "0.66790694", "0.66179925", "0.66057694", "0.65931267", "0.65931267", "0.6585763", "0.65695614", "0.65447944", "0.6529988", "0.6505345", "0.6489708", "0.6489708", "0.6489708", "0.64891493", "0.6461457", "0.645881", "0.6453013", "0.64262235", "0.6416175", "0.64056", "0.6405155", "0.63934475", "0.63649195", "0.63645566", "0.63645566", "0.63645566", "0.63645566", "0.63645566", "0.63645566", "0.63645566", "0.63645566", "0.6359152", "0.6355199", "0.63491994", "0.6342689", "0.6340359", "0.6340359", "0.63147056", "0.63129103", "0.63087577", "0.6306949", "0.6304231", "0.6300649", "0.6288401", "0.62720376", "0.62711257", "0.62691003", "0.626733", "0.62641203", "0.62558883", "0.6226278", "0.6222655", "0.6200988", "0.61743736", "0.6162864", "0.61598146", "0.6149958", "0.614615", "0.6141233", "0.6136111", "0.61341846", "0.6128778", "0.61234623", "0.6118961", "0.61079645", "0.61079645", "0.61079645", "0.60963506", "0.60913754", "0.60910237", "0.60798174", "0.6079332", "0.6078028", "0.6071578", "0.60257804", "0.60052866", "0.6003384", "0.599783", "0.59941214", "0.59658825", "0.596462", "0.59604216", "0.59535956", "0.5947042", "0.5945361", "0.59448135", "0.59440535", "0.5936299", "0.5936299", "0.5936299", "0.5923399", "0.59207594", "0.5920109" ]
0.0
-1
Show the application dashboard.
public function index() { $user = Auth::user(); $terceros=terceros::where('user_id',$user{'id'})->count(); $empresa=empresa::where('user_id',$user{'id'})->count(); $evaluacion=evaluacion::where('user_id',$user{'id'}) ->where('estado_id','1') ->count(); if ($terceros==0){ return redirect('/terceros'); } elseif ($empresa==0){ return redirect('/empresa'); } elseif ($evaluacion==0) { return redirect('test/introduccion'); } else{ return redirect('/test/test'); } //return view('home')->with('user',$user); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function dashboard()\n {\n\n $pageData = (new DashboardService())->handleDashboardLandingPage();\n\n return view('application', $pageData);\n }", "function dashboard() {\r\n\t\t\tTrackTheBookView::render('dashboard');\r\n\t\t}", "public function showDashboard() { \n\t\n return View('admin.dashboard');\n\t\t\t\n }", "public function showDashboard()\n {\n return View::make('users.dashboard', [\n 'user' => Sentry::getUser(),\n ]);\n }", "public function dashboard()\n {\n return view('backend.dashboard.index');\n }", "public function index() {\n return view(\"admin.dashboard\");\n }", "public function dashboard()\n {\n return $this->renderContent(\n view('dashboard'),\n trans('sleeping_owl::lang.dashboard')\n );\n }", "public function dashboard(){\n return view('backend.admin.index');\n }", "public function showDashBoard()\n {\n \treturn view('Admins.AdminDashBoard');\n }", "public function dashboard()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('admin.dashboard', ['title' => 'Dashboard']);\n }", "public function dashboard() \r\n {\r\n return view('admin.index');\r\n }", "public function dashboard()\n\t{\n\t\t$page_title = 'organizer dashboard';\n\t\treturn View::make('organizer.dashboard',compact('page_title'));\n\t}", "public function dashboard()\n {\n\t\t$traffic = TrafficService::getTraffic();\n\t\t$devices = TrafficService::getDevices();\n\t\t$browsers = TrafficService::getBrowsers();\n\t\t$status = OrderService::getStatus();\n\t\t$orders = OrderService::getOrder();\n\t\t$users = UserService::getTotal();\n\t\t$products = ProductService::getProducts();\n\t\t$views = ProductService::getViewed();\n\t\t$total_view = ProductService::getTotalView();\n\t\t$cashbook = CashbookService::getAccount();\n $stock = StockService::getStock();\n\n return view('backend.dashboard', compact('traffic', 'devices', 'browsers', 'status', 'orders', 'users', 'products', 'views', 'total_view', 'cashbook', 'stock'));\n }", "public function dashboard()\n {\n\n return view('admin.dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('adm.dashboard');\n }", "public function dashboard()\n {\n $users = \\App\\User::all()->count();\n $roles = \\Spatie\\Permission\\Models\\Role::all()->count();\n $permissions = \\Spatie\\Permission\\Models\\Permission::all()->count();\n $banner = \\App\\Banner::all();\n $categoria = \\App\\Categoria::all();\n $entidadOrganizativa = \\App\\Entidadorganizativa::all();\n $evento = \\App\\Evento::all();\n $fichero = \\App\\Fichero::all();\n $recurso = \\App\\Recurso::all();\n $redsocial = \\App\\Redsocial::all();\n $subcategoria = \\App\\Subcategoria::all();\n $tag = \\App\\Tag::all();\n\n $entities = \\Amranidev\\ScaffoldInterface\\Models\\Scaffoldinterface::all();\n\n return view('scaffold-interface.dashboard.dashboard',\n compact('users', 'roles', 'permissions', 'entities',\n 'banner', 'categoria', 'entidadOrganizativa',\n 'evento', 'fichero', 'recurso', 'redsocial', 'subcategoria', 'tag')\n );\n }", "public function show()\n {\n return view('dashboard');\n }", "public function index()\n\t{\n\t\treturn View::make('dashboard');\n\t}", "public function index() {\n return view('modules.home.dashboard');\n }", "public function show()\n {\n return view('dashboard.dashboard');\n \n }", "public function index()\n {\n return view('admin.dashboard.dashboard');\n\n }", "public function dashboard()\n { \n return view('jobposter.dashboard');\n }", "public function show()\n\t{\n\t\t//\n\t\t$apps = \\App\\application::all();\n\t\treturn view('applications.view', compact('apps'));\n\t}", "public function index()\n {\n return view('pages.admin.dashboard');\n }", "public function indexAction()\n {\n $dashboard = $this->getDashboard();\n\n return $this->render('ESNDashboardBundle::index.html.twig', array(\n 'title' => \"Dashboard\"\n ));\n }", "public function index()\n {\n //\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard.index');\n }", "public function dashboard()\n {\n return view('pages.backsite.dashboard');\n }", "public function index()\n {\n // return component view('dashboard.index');\n return view('layouts.admin_master');\n }", "public function index()\n {\n\n $no_of_apps = UploadApp::count();\n $no_of_analysis_done = UploadApp::where('isAnalyzed', '1')->count();\n $no_of_visible_apps = AnalysisResult::where('isVisible', '1')->count();\n\n return view('admin.dashboard', compact('no_of_apps', 'no_of_analysis_done', 'no_of_visible_apps'));\n }", "public function getDashboard() {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('smartcrud.auth.dashboard');\n }", "public function index()\n {\n if($this->isAdmin() == TRUE)\n {\n $this->loadThis();\n }\n $this->global['pageTitle'] = 'Touba : Dashboard';\n \n $this->loadViews(\"dashboard\", $this->global, NULL , NULL);\n }", "public function dashboard() {\n $data = ['title' => 'Dashboard'];\n return view('pages.admin.dashboard', $data)->with([\n 'users' => $this->users,\n 'num_services' => Service::count(),\n 'num_products' => Product::count(),\n ]);\n }", "public function index()\n {\n return view('board.pages.dashboard-board');\n }", "public function index()\n {\n return view('admin::settings.development.dashboard');\n }", "public function index()\n {\n return view('dashboard.dashboard');\n }", "public function show()\n {\n return view('dashboard::show');\n }", "public function adminDash()\n {\n return Inertia::render(\n 'Admin/AdminDashboard', \n [\n 'data' => ['judul' => 'Halaman Admin']\n ]\n );\n }", "public function dashboard()\n {\n return view('Admin.dashboard');\n }", "public function show()\n {\n return view('admins\\auth\\dashboard');\n }", "public function index()\n {\n // Report =============\n\n return view('Admin.dashboard');\n }", "public function index()\n {\n return view('bitaac::account.dashboard');\n }", "public function index()\n { \n return view('admin-views.dashboard');\n }", "public function getDashboard()\n {\n return view('dashboard');\n }", "function showDashboard()\n { \n $logeado = $this->checkCredentials();\n if ($logeado==true)\n $this->view->ShowDashboard();\n else\n $this->view->showLogin();\n }", "public function index()\n { \n $params['crumbs'] = 'Home';\n $params['active'] = 'home';\n \n return view('admin.dashboard.index', $params);\n }", "public function index()\n\t{\n\t\treturn view::make('customer_panel.dashboard');\n\t}", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index() {\n // return view('home');\n return view('admin-layouts.dashboard.dashboard');\n }", "public function index()\r\n {\r\n return view('user.dashboard');\r\n }", "public function index() {\n return view('dashboard', []);\n }", "public function index()\n {\n //\n return view('dashboard.dashadmin', ['page' => 'mapel']);\n }", "public function index()\n {\n return view('back-end.dashboard.index');\n //\n }", "public function index()\n\t{\n\t\t\n\t\t$data = array(\n\t\t\t'title' => 'Administrator Apps With Laravel',\n\t\t);\n\n\t\treturn View::make('panel/index',$data);\n\t}", "public function index() {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('page.dashboard.index');\n }", "public function index()\n {\n\n return view('dashboard');\n }", "public function dashboardview() {\n \n $this->load->model('Getter');\n $data['dashboard_content'] = $this->Getter->get_dash_content();\n \n $this->load->view('dashboardView', $data);\n\n }", "public function index()\n {\n $this->authorize(DashboardPolicy::PERMISSION_STATS);\n\n $this->setTitle($title = trans('auth::dashboard.titles.statistics'));\n $this->addBreadcrumb($title);\n\n return $this->view('admin.dashboard');\n }", "public function action_index()\r\n\t{\t\t\t\t\r\n\t\t$this->template->title = \"Dashboard\";\r\n\t\t$this->template->content = View::forge('admin/dashboard');\r\n\t}", "public function index()\n {\n $info = SiteInfo::limit(1)->first();\n return view('backend.info.dashboard',compact('info'));\n }", "public function display()\n\t{\n\t\t// Set a default view if none exists.\n\t\tif (!JRequest::getCmd( 'view' ) ) {\n\t\t\tJRequest::setVar( 'view', 'dashboard' );\n\t\t}\n\n\t\tparent::display();\n\t}", "public function index()\n {\n $news = News::all();\n $posts = Post::all();\n $events = Event::all();\n $resources = Resources::all();\n $admin = Admin::orderBy('id', 'desc')->get();\n return view('Backend/dashboard', compact('admin', 'news', 'posts', 'events', 'resources'));\n }", "public function index()\n {\n\n return view('superAdmin.adminDashboard')->with('admin',Admininfo::all());\n\n }", "public function index()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n $this->template->set('title', 'Dashboard');\n $this->template->load('admin', 'contents' , 'admin/dashboard/index', array());\n }", "public function index()\n {\n return view('/dashboard');\n }", "public function index()\n {\n \treturn view('dashboard');\n }", "public function index()\n {\n return view('ketua.ketua-dashboard');\n }", "public function index(){\n return View::make('admin.authenticated.dashboardview');\n }", "public function admAmwDashboard()\n {\n return View::make('admission::amw.admission_test.dashboard');\n }", "public function index()\n {\n return view('adminpanel.home');\n }", "public function dashboard()\n\t{\n\t\t$this->validation_access();\n\t\t\n\t\t$this->load->view('user_dashboard/templates/header');\n\t\t$this->load->view('user_dashboard/index.php');\n\t\t$this->load->view('user_dashboard/templates/footer');\n\t}", "public function index()\n {\n return view('dashboard.home');\n }", "public function index()\n {\n $admins = $this->adminServ->all();\n $adminRoles = $this->adminTypeServ->all();\n return view('admin.administrators.dashboard', compact('admins', 'adminRoles'));\n }", "public function index()\n {\n if (ajaxCall::ajax()) {return response()->json($this -> dashboard);}\n //return response()->json($this -> dashboard);\n JavaScript::put($this -> dashboard);\n return view('app')-> with('header' , $this -> dashboard['header']);\n //return view('home');\n }", "public function index()\n {\n $userinfo=User::all();\n $gateinfo=GateEntry::all();\n $yarninfo=YarnStore::all();\n $greyinfo=GreyFabric::all();\n $finishinfo=FinishFabric::all();\n $dyesinfo=DyeChemical::all();\n return view('dashboard',compact('userinfo','gateinfo','yarninfo','greyinfo','finishinfo','dyesinfo'));\n }", "public function actionDashboard(){\n \t$dados_dashboard = Yii::app()->user->getState('dados_dashbord_final');\n \t$this->render ( 'dashboard', $dados_dashboard);\n }", "public function index()\n {\n $user = new User();\n $book = new Book();\n return view('admin.dashboard', compact('user', 'book'));\n }", "public function dashboard() {\n if (!Auth::check()) { // Check is user logged in\n // redirect to dashboard\n return Redirect::to('login');\n }\n\n $user = Auth::user();\n return view('site.dashboard', compact('user'));\n }", "public function dashboard()\n {\n $users = User::all();\n return view('/dashboard', compact('users'));\n }", "public function index()\n {\n $lineChart = $this->getLineChart();\n $barChart = $this->getBarChart();\n $pieChart = $this->getPieChart();\n\n return view('admin.dashboard.index', compact(['lineChart', 'barChart', 'pieChart']));\n }" ]
[ "0.77850926", "0.7760142", "0.7561336", "0.75147176", "0.74653697", "0.7464913", "0.73652893", "0.7351646", "0.7346477", "0.73420244", "0.7326711", "0.7316215", "0.73072463", "0.7287626", "0.72826403", "0.727347", "0.727347", "0.727347", "0.727347", "0.7251768", "0.7251768", "0.7251768", "0.7251768", "0.7251768", "0.7241342", "0.7236133", "0.7235562", "0.7218318", "0.71989936", "0.7197427", "0.71913266", "0.71790016", "0.71684825", "0.71577966", "0.7146797", "0.7133428", "0.7132746", "0.71298903", "0.71249074", "0.71218014", "0.71170413", "0.7110151", "0.7109032", "0.7107029", "0.70974076", "0.708061", "0.7075653", "0.70751685", "0.7064041", "0.70550334", "0.7053102", "0.7051273", "0.70484304", "0.7043605", "0.70393986", "0.70197886", "0.70185125", "0.70139873", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.6992477", "0.6979631", "0.69741416", "0.69741327", "0.6968815", "0.6968294", "0.69677526", "0.69652885", "0.69586027", "0.6944985", "0.69432825", "0.69419175", "0.6941512", "0.6941439", "0.6938837", "0.6937524", "0.6937456", "0.6937456", "0.69276494", "0.6921651", "0.69074917", "0.69020325", "0.6882262", "0.6869339", "0.6867868", "0.68557185", "0.68479055", "0.684518", "0.68408877", "0.6838798", "0.6833479", "0.6832326", "0.68309164", "0.6826798", "0.6812457" ]
0.0
-1
Calls each plugin class for their custom logic before saving the entities into the database.
public function onSaveProjectExecBeforeSave( SaveProjectEvent $event, $eventName, EventDispatcherInterface $eventDispatcher ) { $instances = $event->getPluginInstances(); foreach ($instances as $instance) { if ($instance instanceof ProjectPluginInterface) { $event = $instance->beforeSaveAction($event); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function save()\n {\n foreach ($this->plugins as $name => $obj) {\n $this->updateServicesVars($name);\n\n if ($this->plugins[$name]->is_account) {\n $this->plugins[$name]->save();\n } elseif ($this->plugins[$name]->initially_was_account) {\n $this->plugins[$name]->remove_from_parent();\n }\n }\n }", "protected function beforeSaveInDB(){}", "protected function hook_beforeSave(){}", "protected function _beforeSave() {\n\t}", "protected function hook_afterSave(){}", "public function beforeSave(){\n $this->getType()->beforeSaveProcess($this);\n return parent::beforeSave();\n }", "private function before_custom_save()\n\t\t{\n\t\t\t$fields = self::$db->table_info($this->table_name);\n\t\t\tforeach($fields AS $field)\n\t\t\t{\n\t\t\t\tif(!strlen($this->$field['name'])) {\n\t\t\t\t\t$this->$field['name'] = 'NULL';\n\t\t\t\t}\n\t\t\t\tif(method_exists($this, 'preSave_'.$field['name'])) {\n\t\t\t\t\t$this->{'preSave_'.$field['name']}($field);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function _afterSave()\n {\n Mage::getResourceModel('bpost_shm/tablerates_international')->uploadAndImport($this);\n }", "private function setConfigEntities()\n {\n foreach ($this->entityMethods as $entity => $methodName) {\n $this->openEntity($entity);\n foreach ($this->generator->types as $objName => $objData) {\n if (in_array($objName, $this->generator->customTypes) === false) { // if this is not a custom type generate resources\n $excluded = false;\n foreach ($this->generator->excludedSubtypes as $type) {\n if (strpos($objName, $type) !== false) {\n $excluded = true;\n }\n }\n // if the type is among excluded - continue\n if ($excluded === true) {\n continue;\n }\n $this->setOptions($objName, $methodName);\n }\n }\n $this->closeEntities();\n }\n }", "public function prepareSave() {\n // @todo This code might be performing a fair number of HTTP requests. This is dangerously\n // brittle and should probably be handled by a queue, to avoid doing HTTP\n // operations during entity save. See\n // https://www.drupal.org/project/drupal/issues/2976875 for more.\n\n // In order for metadata to be mapped correctly, $this->original must be\n // set. However, that is only set once parent::save() is called, so work\n // around that by setting it here.\n if (!isset($this->original) && $id = $this->id()) {\n $this->original = $this->entityTypeManager()\n ->getStorage('hub_reference')\n ->loadUnchanged($id);\n }\n\n $hub_reference_source = $this->getSource();\n foreach ($this->translations as $langcode => $data) {\n if ($this->hasTranslation($langcode)) {\n $translation = $this->getTranslation($langcode);\n // Try to set fields provided by the hub reference source and mapped in\n // hub reference type config.\n foreach ($translation->type->entity->getFieldMap() as $metadata_attribute_name => $entity_field_name) {\n if ($translation->hasField($entity_field_name)) {\n $field_def = $translation->get($entity_field_name)->getFieldDefinition();\n $field_type = $field_def->getType();\n $metadata_values = $hub_reference_source->getMetadata($translation, $metadata_attribute_name);\n \n switch ($field_type) {\n case 'entity_reference':\n $this->handleEntityReferencePrepareSave($translation, $entity_field_name, $metadata_values);\n break;\n\n case 'string':\n case 'string_long':\n if (!empty($metadata_values) && !isset($metadata_values['value'])) {\n if ($resource = $this->getResourceObj()) {\n if (isset($resource->{$metadata_attribute_name})) {\n $metadata_values = ['value' => $resource->{$metadata_attribute_name}->getString()];\n }\n }\n }\n $translation->set($entity_field_name, $metadata_values);\n break;\n\n default:\n $translation->set($entity_field_name, $metadata_values);\n break;\n }\n }\n }\n\n // Try to set a default name for this hub reference item if no name is provided.\n if ($translation->get('title')->isEmpty()) {\n $translation->setTitle($translation->getTitle());\n }\n\n if ($path = $hub_reference_source->getMetadata($translation, 'path')) {\n $translation->set('path', [\n 'alias' => $path,\n 'pathauto' => PathautoState::SKIP,\n ]);\n }\n }\n }\n }", "public function preSave() {}", "protected function runExtTablesPostProcessingHooks() {}", "protected function _postSave()\r\n\t{\r\n\t}", "public function preSave() { }", "public function loadPlugins()\n {\n try {\n $pluginModel = Plugin::model(); \n $records = $pluginModel->findAllByAttributes(array('active'=>1));\n \n foreach ($records as $record) {\n $this->loadPlugin($record->name, $record->id);\n }\n } catch (Exception $exc) {\n // Something went wrong, maybe no database was present so we load no plugins\n }\n\n $this->dispatchEvent(new PluginEvent('afterPluginLoad', $this)); // Alow plugins to do stuff after all plugins are loaded\n }", "function save() {\n\n\t\t// calls generic ORM save (insert or update)\n\t\tparent::save();\n\n\t}", "public function postProcess()\n\t\t{\n\t\t\tforeach ($this->m_activeExtensions as $extension)\n\t\t\t{\n\t\t\t\t$extension->postProcess();\n\t\t\t}\n\t\t}", "public static function _setup_plugin() {\n\t\t\tadd_filter( 'mce_external_plugins', array( __CLASS__, 'mce_external_plugins' ) );\n\t\t\tadd_filter( 'mce_buttons_2', array( __CLASS__, 'mce_buttons_2' ) );\n\t\t\tadd_filter( 'content_save_pre', array( __CLASS__, 'content_save_pre' ), 20 );\n\t\t}", "public function onAfterWrite()\n\t{\n\t\tparent::onAfterWrite();\n\t\tif ($this->owner->UntranslatableFields_skipOnAfterWrite) return; //Another object has started the saving process, so don't create an infinite recursion loop\n\t\t$untranslatable_fields = $this->getUntranslatableFields();\n\t\tif (empty($untranslatable_fields)) return; //Should not translate this model at all (for some reason this extension has still been applied to this model, but there's nothing to do)\n\t\tforeach ($this->owner->getTranslations() as $translated_object)\n\t\t{\n\t\t\t$write = false;\n\t\t\tforeach ($untranslatable_fields as $field_name)\n\t\t\t{\n\t\t\t\tif ($translated_object->$field_name != $this->owner->$field_name)\n\t\t\t\t{\n\t\t\t\t\t$translated_object->$field_name = $this->owner->$field_name;\n\t\t\t\t\t$write = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($write)\n\t\t\t{\n\t\t\t\t$do_publish = $translated_object->hasMethod('Published') && $translated_object->Published();\n\t\t\t\tif ($do_publish) die();\n\t\t\t\t$translated_object->UntranslatableFields_skipOnAfterWrite = true;\n\t\t\t\t$translated_object->write();\n\t\t\t\tunset($translated_object->UntranslatableFields_skipOnAfterWrite);\n\t\t\t\t#if ($do_publish) $translated_object->Publish(); //If an object was published before this modification, publish it again in order to make the changes public.\n\t\t\t}\n\t\t}\n\t}", "protected function onBeforeSave()\n {\n }", "public function plugin_classes() {\r\n\t\t$this->filesystem = new PDT_Filesystem( $this );\r\n\t\t$this->auth = new PDT_Auth( $this );\r\n\t\t$this->api = new PDT_Api( $this );\r\n\t\t$this->plugins = new PDT_Plugins( $this );\r\n\t\t$this->installed = new PDT_Installed( $this );\r\n\t\t$this->cases = new PDT_Cases( $this );\r\n\t\t$this->clues = new PDT_Clues( $this );\r\n\t\t$this->detective = new PDT_Detective( $this );\r\n\t}", "protected function preRun()\n {\n if (@class_exists('Plugin_PreRun') &&\n in_array('Iface_PreRun', class_implements('Plugin_PreRun'))) {\n $preRun = new Plugin_PreRun();\n $preRun->process();\n }\n }", "private function before_execute()\n {\n }", "public function plugin_classes() {\n\t\t$this->options = new Options( $this ) ;\n\t\t$this->helpers = new Helpers( $this );\n\t\t$this->core = new Core( $this );\n\t}", "public function postImport() {\n parent::postImport();\n if (!civicrm_initialize()) {\n return;\n }\n // Need to clear the cache once the fields are created.\n civicrm_api3('system', 'flush', array('version' => 3));\n }", "protected function afterImport($entities)\n {\n\n }", "public function save_all() {\n\t\t$this->save_api();\n\t\t$this->save_field_map();\n\t\t$this->save_import();\n\t\t$this->save_requirement_set();\n\t}", "private function hooks() {\n\t\t\t// check for EDD when plugin is activated\n\t\t\tadd_action( 'admin_init', array( $this, 'activation' ), 1 );\n\t\t\t\n\t\t\t// plugin meta\n\t\t\tadd_filter( 'plugin_row_meta', array( $this, 'plugin_meta' ), null, 2 );\n\n\t\t\t// settings link on plugin page\n\t\t\tadd_filter( 'plugin_action_links_' . $this->basename, array( $this, 'settings_link' ), 10, 2 );\n\t\t\t\n\t\t\t// insert actions\n\t\t\tdo_action( 'edd_sd_setup_actions' );\n\t\t}", "protected function _saveBefore()\n {\n // nothing here\n }", "private function hooks() {\n\n\t\t\t// plugin meta\n\t\t\tadd_filter( 'plugin_row_meta', array( $this, 'plugin_meta' ), null, 2 );\n\n\t\t\t// Add template folder\n\t\t\tadd_filter( 'affwp_template_paths', array( $this, 'template' ) );\n\n\t\t}", "protected function beforeSave() {\n\n }", "public function afterCreate()\n {\n $this->saveCustomFields();\n }", "private function setAllLoaded()\n {\n $class_reflection = new ReflectionClass(get_class($this));\n do {\n if ($class_reflection->isInstantiable())\n $this->setLoadedFromDb($class_reflection->getName());\n\n } while (($class_reflection = $class_reflection->getParentClass()) && # get the parent\n $class_reflection->getName() != __CLASS__); # check that we're not hitting the top\n }", "protected function afterSave() {\n\n }", "function execute()\n {\n $this->OldModel = $this->getOldModelToUse();\n $this->OldModel->cacheQueries = false;\n $this->OldModel->cacheSQL = false;\n $this->NewModel = $this->getNewModelToUse();\n $this->NewModel->cacheQueries = false;\n $this->NewModel->cacheSQL = false;\n \n $tableMap = $this->getTableMap();\n debug($tableMap);\n if (!$tableMap)\n {\n $this->print_instructions();\n exit();\n }\n\n foreach ($tableMap as $table => $data)\n {\n if (!$this->specialProcessing($table, $data))\n {\n $this->import($table, $data);\n }\n }\n }", "function before_save(){}", "public function run()\n {\n $low = new Priority([\n 'name' => __('data.priority.low'),\n 'level' => 9,\n ]);\n $low->save();\n\n $medium = new Priority([\n 'name' => __('data.priority.medium'),\n 'level' => 5,\n ]);\n $medium->save();\n\n $high = new Priority([\n 'name' => __('data.priority.high'),\n 'level' => 1,\n ]);\n $high->save();\n }", "function _save_post_hook()\n {\n }", "public function preSaveCallback()\n {\n $this->performPreSaveCallback();\n }", "public function preSaveCallback()\n {\n $this->performPreSaveCallback();\n }", "public function onBeforeSave();", "protected function MetaAfterSave() {\n\t\t}", "protected function beforeImport($entities)\n {\n\n }", "public function prePersistCallback()\n {\n $this->performPrePersistCallback();\n }", "public function prePersistCallback()\n {\n $this->performPrePersistCallback();\n }", "protected function persistObjects() {}", "public function save()\n {\n $entities = $this->entities;\n Database::getInstance()->doTransaction(\n function() use ($entities)\n {\n foreach ($entities as $entity)\n {\n if ($entity->getMarkedAsDeleted())\n {\n $entity->delete();\n } \n else if ($entity->getMarkedAsUpdated())\n {\n $entity->saveWithDetails();\n }\n }\n }\n );\n }", "public function loadPlugins()\n\t{\n\t\t$this->pluginsToLoad = array_unique($this->pluginsToLoad);\n\n\t\t$pluginsToLoad = $this->pluginsToLoad;\n\n\t\tif($this->doLoadAlwaysActivatedPlugins)\n\t\t{\n\t\t\t$pluginsToLoad = array_merge($this->pluginsToLoad, $this->pluginToAlwaysEnable);\n\t\t}\n\n\t\tforeach($pluginsToLoad as $pluginName)\n\t\t{\n\t\t\t$newPlugin = $this->loadPlugin($pluginName);\n\n\t\t\t// if we have to load the plugins\n\t\t\t// and if this plugin is activated\n\t\t\tif($this->doLoadPlugins\n\t\t\t\t&& $this->isPluginEnabled($pluginName))\n\t\t\t{\n\t\t\t\t$newPlugin->registerTranslation( $this->languageToLoad );\n\t\t\t\t$this->addPluginObservers( $newPlugin );\n\t\t\t\t$this->addLoadedPlugin( $pluginName, $newPlugin);\n\n\t\t\t\t$newPlugin->postLoad();\n\t\t\t}\n\t\t}\n\t}", "protected function postApply(): void {\n\t\t// re-register events\n\t\telgg_register_event_handler('create', 'metadata', '\\ColdTrick\\TagTools\\Rules::applyRules', 1);\n\t\telgg_register_event_handler('create', 'metadata', '\\ColdTrick\\TagTools\\Enqueue::createMetadata');\n\t}", "function after_save() {}", "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 plugins_loaded(){\r\n\r\n\t\t$this->plugin_integration();\r\n\r\n\t\tWP_Job_Manager_Field_Editor_Job_Writepanels::get_instance();\r\n\t\tif( $this->wprm_active() ) WP_Job_Manager_Field_Editor_Resume_Writepanels::get_instance();\r\n\t}", "function qa_initialize_postdb_plugins()\n{\n\tglobal $qa_pluginManager;\n\n\trequire_once QA_INCLUDE_DIR . 'app/options.php';\n\tqa_preload_options();\n\n\t$qa_pluginManager->loadPluginsAfterDbInit();\n\tqa_load_override_files();\n\n\tqa_report_process_stage('plugins_loaded');\n}", "public function afterSave()\n {\n $savedItem = $this->attributes;\n $idSaved = $savedItem['id'];\n $post = post();\n if (empty($post['category']) && empty($post['product'])) {\n self::applyForAll($idSaved);\n } else {\n self::saveCategoryCoupon($post, $idSaved);\n self::saveProductCoupon($post, $idSaved);\n self::where('id', $idSaved)->update(['is_for_all'=>self::IS_NOT_FOR_ALL]);\n }\n $post = post();\n Event::fire('ideas.shop.save_coupon', [$savedItem, $post]);\n }", "public function initWpHooks(): void\n {\n parent::initWpHooks();\n\n // let all fields register their WP-hook implementations\n foreach ($this->getFields() as $field) {\n $field->initWpHooks();\n }\n }", "public function prePersist()\n {\n }", "private function _autoloadPluginClasses(BasePlugin $plugin)\n\t{\n\t\tforeach ($this->autoloadClasses as $classSuffix)\n\t\t{\n\t\t\t// *Controller's live in controllers/, etc.\n\t\t\t$classSubfolder = mb_strtolower($classSuffix).'s';\n\t\t\t$classes = $this->getPluginClasses($plugin, $classSubfolder, $classSuffix, true);\n\n\t\t\tif ($classSuffix == 'Service')\n\t\t\t{\n\t\t\t\t$this->_registerPluginServices($classes);\n\t\t\t}\n\t\t}\n\t}", "public function afterSave(){\n\t}", "private static function runAll () {\n\t\tif(empty(self::$registered)) return;\n\n\t\tforeach(self::$registered as $plugin) {\n\t\t\t$plugin->run();\n\t\t}\n\t}", "protected function saving() {\n // This will get reimplemented by children when necessary\n }", "public function afterSave()\n {\n\n }", "protected function after_execute() {\n $this->add_related_files('mod_ableplayer', 'intro', null);\n $this->add_related_files('mod_ableplayer', 'poster', null);\n $this->add_related_files('mod_ableplayer', 'media', 'ableplayer_media');\n $this->add_related_files('mod_ableplayer', 'desc', 'ableplayer_desc');\n $this->add_related_files('mod_ableplayer', 'caption', 'ableplayer_caption');\n }", "protected function setup() {\n\t\tCustomweb_Core_Util_Class::loadAllClassesOfPackage(\"Customweb_Database_Entity_Annotation\");\n\t}", "public function beforeSave(){\n\t}", "public function preSave(EntityStorageInterface $storage);", "public function apply(): void {\n\t\t// can we safely execute this?\n\t\t$entity_types = $this->getRegisteredEntityTypes();\n\t\t$tag_names = $this->getTagNames();\n\t\t\n\t\tif (empty($entity_types) || empty($tag_names)) {\n\t\t\t// no, we could remove too much\n\t\t\t// quit\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// prepare\n\t\t$this->preApply();\n\t\t\n\t\telgg_call(ELGG_IGNORE_ACCESS | ELGG_SHOW_DISABLED_ENTITIES, function() {\n\t\t\ttry {\n\t\t\t\tswitch ($this->tag_action) {\n\t\t\t\t\tcase 'delete':\n\t\t\t\t\t\t$this->applyDelete();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'replace':\n\t\t\t\t\t\t$this->applyReplace();\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (\\Exception $e) {\n\t\t\t\telgg_log($e->getMessage(), 'ERROR');\n\t\t\t}\n\t\t});\n\t\t\n\t\t// restore\n\t\t$this->postApply();\n\t}", "protected function save_meta() {}", "public function migrate()\n {\n $this->prepareWizardsTable();\n\n $this->processProcessing();\n $this->processLogs();\n $this->processConfigData();\n\n $this->prepareOrdersTables();\n $this->prepareOrdersConfigTable();\n $this->processOrdersData();\n }", "public function onAfterSave();", "protected function saveInsert()\n {\n }", "public function postSave()\n {\n // check if the model already exists\n if ((!isset($this->revisionEnabled) || $this->revisionEnabled)) {\n // if it does, it means we're updating\n\n $changes_to_record = $this->changedRevisionableFields();\n\n $revisions = array();\n\n foreach ($changes_to_record as $key => $change) {\n\n $revisions[] = array(\n 'revisionable_type' => get_class($this),\n 'revisionable_id' => $this->getKey(),\n 'key' => $key,\n 'old_value' => array_get($this->originalData, $key),\n 'new_value' => $this->updatedData[$key],\n 'user_id' => $this->getSystemUserId(),\n 'created_at' => new \\DateTime(),\n 'updated_at' => new \\DateTime(),\n 'activity_id' => $this->getActivityId()\n );\n }\n\n if (count($revisions) > 0) {\n $revision = new Revision();\n \\DB::table($revision->getTable())->insert($revisions);\n }\n\n }\n\n }", "private function executeExtraUpdates()\n {\n foreach ($this->extraUpdates as $oid => $update) {\n list ($entity, $changeset) = $update;\n $this->entityChangeSets[$oid] = $changeset;\n $this->getEntityPersister(get_class($entity))->update($entity);\n }\n $this->extraUpdates = [];\n }", "function plugin_integration(){\r\n\r\n\t\t$dir = WPJM_FIELD_EDITOR_PLUGIN_DIR . \"/classes/plugins/*\";\r\n\r\n\t\tforeach( glob( $dir ) as $file ) {\r\n\t\t\tif( ! is_dir( $file ) ) include_once( $file );\r\n\t\t}\r\n\r\n\t}", "public function save()\n {\n // Get all the defined database columns in the child class\n $columns = static::getConfig()[self::CONFIG_DB_COLUMNS];\n // Get the primary keys from the child class so we can use the in the where clause of the update query\n $primaryKeys = static::getConfig()[self::CONFIG_PRIMARY_KEYS];\n $data = [];\n\n // Foreach defined column get the child's current value for that column\n foreach ($columns as $columnName) {\n // generate a column => value array\n $data[$columnName] = $this->{$columnName};\n }\n\n MySql::update(\n self::getTableName(),\n $data,\n $primaryKeys\n );\n }", "public function process() {\n $this->migrate_course_files();\n // todo $this->migrate_site_files();\n }", "protected function callAfterSuccessfulSave()\n\t{\n\t\tforeach($this->editFields as $f)\n\t\t{\n\t\t\t$this->getControl($f, $this->id)->afterSuccessfulSave();\n\t\t}\n\t}", "public function prePersist($entity);", "public function postSave() {}", "protected function _postInsert()\n\t{\n\t}", "public function installHooks()\n {\n if (\\current_user_can('edit_posts') || $this->isWpCLI()) {\n \\add_action('future_to_publish', [$this, 'handleFutureToPublish']);\n\n foreach ($this->getConfig()->allowedPostTypes() as $postType) {\n \\add_action(\"rest_after_insert_{$postType}\", [$this, 'handleRestUpdatePost']);\n }\n\n \\add_action('save_post', [$this, 'handleSavePost'], 99, 1);\n\n \\add_action('transition_post_status', [$this, 'handleTransitionPostStatus'], 99, 3);\n \\add_action('trashed_post', [$this, 'handleTrashedPost']);\n\n\n \\add_action('swiftype_batch_post_index', [$this, 'handlePostBatchIndex']);\n \\add_action('swiftype_batch_post_delete', [$this, 'handlePostBatchDelete']);\n }\n }", "private function attach_external_plugin_integration() {\n\t\t$daos = ShoutemStandardDaoFactory :: instance()->get_external_plugin_integration_daos();\n\t\tforeach ($daos as $dao) {\n\t\t\t$dao->attach_to_hooks();\n\t\t}\n\t}", "public function save(){\r\n // Need the post type name again\r\n $post_type_name = $this->post_type_name;\r\n\r\n add_action( 'save_post',\r\n function() use( $post_type_name ){\r\n // Deny the WordPress autosave function\r\n if( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) return;\r\n\r\n if ( ! wp_verify_nonce( $_POST['custom_post_type'], plugin_basename(__FILE__) ) ) return;\r\n\r\n global $post;\r\n\r\n if( isset( $_POST ) && isset( $post->ID ) && get_post_type( $post->ID ) == $post_type_name ){\r\n global $custom_fields;\r\n\r\n // Loop through each meta box\r\n foreach( $custom_fields as $title => $fields ){\r\n // Loop through all fields\r\n foreach( $fields as $label => $type ){\r\n $field_id_name = strtolower( str_replace( ' ', '_', $title ) ) . '_' . strtolower( str_replace( ' ', '_', $label ) );\r\n if($_POST['custom_meta'][$field_id_name] != ''){//Check Entry is not empty\r\n update_post_meta( $post->ID, $field_id_name, $_POST['custom_meta'][$field_id_name] );\r\n }\r\n }\r\n\r\n }\r\n }\r\n }\r\n );\r\n }", "public function prepare() {\n // Initialize instance variables\n $this->postData = $this->bot->getPostData();\n\n $this->findAndReplacesForImageUrls = $this->bot->getSetting(SettingKey::POST_FIND_REPLACE_IMAGE_URLS);\n $this->postSaveImagesAsMedia = $this->bot->getSettingForCheckbox(SettingKey::POST_SAVE_IMAGES_AS_MEDIA);\n $this->postSaveAllImagesInContent = $this->bot->getSettingForCheckbox(SettingKey::POST_SAVE_ALL_IMAGES_IN_CONTENT);\n $this->postSaveImagesAsGallery = $this->postSaveImagesAsMedia && $this->bot->getSettingForCheckbox(SettingKey::POST_SAVE_IMAGES_AS_GALLERY);\n\n // If the user wants to save all images in the post content, set \"save images as media\" to true so that the\n // script can run properly.\n if($this->postSaveAllImagesInContent) {\n $this->postSaveImagesAsMedia = true;\n }\n\n // Save the thumbnail URL first, because the thumbnail may be removed by gallery image selectors later.\n $this->prepareAndSaveThumbnail();\n\n // Prepare the attachment data.\n $this->prepareAttachmentData();\n }", "public function run() {\n $this->insertProductCategories();\n\n $this->insertProducts();\n }", "protected function beforeSave()\n {\n return;\n }", "protected function firePostCreateHooks()\n {\n foreach ($this->postCreate as $callback) {\n call_user_func($callback);\n }\n }", "function beforeFilter() {\n parent::beforeFilter();\n \n $plugins = $this->loadAvailablePlugins('vetter');\n \n // Bind the models so Cake can magically pull associated data. Note this\n // will create associations with *all* vetter plugins, not just the one that\n // is actually associated with this VettingStep. Given that most\n // installations will only have a handful of vetters, that seems OK (vs\n // parsing the request data to figure out which type of Plugin we should\n // bind).\n \n foreach(array_values($plugins) as $plugin) {\n $this->VettingStep->bindModel(array('hasOne'\n => array($plugin\n => array('dependent' => true))),\n false);\n \n $this->edit_contains[] = $plugin;\n $this->view_contains[] = $plugin;\n }\n \n $this->set('plugins', $plugins);\n }", "private function _saveExt() {\r\n\r\n }", "protected function includeAndRegisterTaskClasses()\n {\n $this->includeAndRegisterDoctrineTaskClasses();\n\n //Always autoregister custom tasks _unless_ we've been explicitly asked not to\n if ($this->getConfigValue('autoregister_custom_tasks', true)) {\n $this->registerIncludedTaskClasses();\n }\n }", "function save($args, $instance) {\n\t\tdie('function cf_Field::save() must be over-ridden in a sub-class.');\n\t}", "protected function afterSave()\n {\n return;\n }", "public function loadPlugins()\n\t{\n\t\tif (!$this->_pluginsLoaded && !$this->_loadingPlugins)\n\t\t{\n\t\t\tif (craft()->isInstalled())\n\t\t\t{\n\t\t\t\t// Prevent this function from getting called twice.\n\t\t\t\t$this->_loadingPlugins = true;\n\n\t\t\t\t// Find all of the enabled plugins\n\t\t\t\t// TODO: swap the SELECT statements after next breakpoint\n\t\t\t\t$rows = craft()->db->createCommand()\n\t\t\t\t\t//->select('id, class, version, schemaVersion, settings, installDate')\n\t\t\t\t\t->select('*')\n\t\t\t\t\t->from('plugins')\n\t\t\t\t\t->where('enabled=1')\n\t\t\t\t\t->queryAll();\n\n\t\t\t\t$names = array();\n\n\t\t\t\tforeach ($rows as $row)\n\t\t\t\t{\n\t\t\t\t\t$plugin = $this->_getPlugin($row['class']);\n\n\t\t\t\t\tif ($plugin)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->_autoloadPluginClasses($plugin);\n\n\t\t\t\t\t\t// Clean it up a bit\n\t\t\t\t\t\t$row['settings'] = JsonHelper::decode($row['settings']);\n\t\t\t\t\t\t$row['installDate'] = DateTime::createFromString($row['installDate']);\n\n\t\t\t\t\t\t$this->_enabledPluginInfo[$row['class']] = $row;\n\n\t\t\t\t\t\t$lcPluginHandle = mb_strtolower($plugin->getClassHandle());\n\t\t\t\t\t\t$this->_plugins[$lcPluginHandle] = $plugin;\n\t\t\t\t\t\t$this->_enabledPlugins[$lcPluginHandle] = $plugin;\n\t\t\t\t\t\t$names[] = $plugin->getName();\n\n\t\t\t\t\t\t$plugin->setSettings($row['settings']);\n\n\t\t\t\t\t\t$plugin->isInstalled = true;\n\t\t\t\t\t\t$plugin->isEnabled = true;\n\n\t\t\t\t\t\t// If we're not updating, check if the plugin's version number changed, but not its schema version.\n\t\t\t\t\t\tif (!craft()->isInMaintenanceMode() && $this->hasPluginVersionNumberChanged($plugin) && !$this->doesPluginRequireDatabaseUpdate($plugin))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Update our record of the plugin's version number\n\t\t\t\t\t\t\tcraft()->db->createCommand()->update(\n\t\t\t\t\t\t\t\t'plugins',\n\t\t\t\t\t\t\t\tarray('version' => $plugin->getVersion()),\n\t\t\t\t\t\t\t\t'id = :id',\n\t\t\t\t\t\t\t\tarray(':id' => $row['id'])\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Sort plugins by name\n\t\t\t\t$this->_sortPlugins($names, $this->_enabledPlugins);\n\n\t\t\t\t// Now that all of the components have been imported, initialize all the plugins\n\t\t\t\tforeach ($this->_enabledPlugins as $plugin)\n\t\t\t\t{\n\t\t\t\t\t$plugin->init();\n\t\t\t\t}\n\n\t\t\t\t$this->_loadingPlugins = false;\n\t\t\t}\n\n\t\t\t$this->_pluginsLoaded = true;\n\n\t\t\t// Fire an 'onLoadPlugins' event\n\t\t\t$this->onLoadPlugins(new Event($this));\n\t\t}\n\t}", "public static function setup_actions() {\n\t\tadd_action(\n\t\t\t'astoundify_import_content_after_import_item_type_object',\n\t\t\tarray( __CLASS__, 'set_products' )\n\t\t);\n\t}", "protected function beforeSave()\n \t{\n \t\tif (parent::beforeSave()) {\n \t\t\tif (!empty($this->date_started)) {\n \t\t\t\tif (!is_numeric($this->date_started)) {\n \t\t\t\t\t$this->date_started = strtotime($this->date_started);\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (!empty($this->date_ended)) {\n \t\t\t\tif (!is_numeric($this->date_ended)) {\n \t\t\t\t\t$this->date_ended = strtotime($this->date_ended);\n \t\t\t\t}\n \t\t\t}\n\n \t\t\t// auto deal with date added and date modified\n \t\t\tif ($this->isNewRecord) {\n \t\t\t\t$this->date_added = $this->date_modified = time();\n \t\t\t} else {\n \t\t\t\t$this->date_modified = time();\n \t\t\t}\n\n \t\t\t// json\n \t\t\t$this->json_extra = json_encode($this->jsonArray_extra);\n \t\t\tif ($this->json_extra == 'null') {\n \t\t\t\t$this->json_extra = null;\n \t\t\t}\n\n \t\t\t// save as null if empty\n \t\t\tif (empty($this->slug)) {\n \t\t\t\t$this->slug = null;\n \t\t\t}\n \t\t\tif (empty($this->text_oneliner)) {\n \t\t\t\t$this->text_oneliner = null;\n \t\t\t}\n \t\t\tif (empty($this->text_short_description)) {\n \t\t\t\t$this->text_short_description = null;\n \t\t\t}\n \t\t\tif (empty($this->image_logo)) {\n \t\t\t\t$this->image_logo = null;\n \t\t\t}\n \t\t\tif (empty($this->date_started) && $this->date_started !== 0) {\n \t\t\t\t$this->date_started = null;\n \t\t\t}\n \t\t\tif (empty($this->date_ended) && $this->date_ended !== 0) {\n \t\t\t\t$this->date_ended = null;\n \t\t\t}\n \t\t\tif (empty($this->json_extra)) {\n \t\t\t\t$this->json_extra = null;\n \t\t\t}\n \t\t\tif (empty($this->date_added) && $this->date_added !== 0) {\n \t\t\t\t$this->date_added = null;\n \t\t\t}\n \t\t\tif (empty($this->date_modified) && $this->date_modified !== 0) {\n \t\t\t\t$this->date_modified = null;\n \t\t\t}\n\n \t\t\treturn true;\n \t\t} else {\n \t\t\treturn false;\n \t\t}\n \t}", "public function processTransactionsDb(){\n $wrapper = new fpgrowth\\PrestashopWrapper();\n $levels = $wrapper->getProductAssociationRules();\n $wrapper->saveProductAssociationRules($levels);\n }", "public function afterSave($insert, $changedAttributes)\n{\n //Deleteing all relations with article before saving\n TagArticles::deleteAll(['article_id' => $this->id]);\n\n //if tags is array and not empty\n if (is_array($this->tags) && !empty($this->tags)) {\n //create array wits new relations\n $values = [];\n foreach ($this->tags as $id) {\n $values[] = [$this->id, $id];\n }\n\n //save relations in DB\n self::getDb()->createCommand()\n ->batchInsert(TagArticles::tableName(), ['article_id', 'tag_id'], $values)->execute();\n }else {\n echo \"Not good!!!\";\n die();\n }\n\n parent::afterSave($insert, $changedAttributes);\n}", "static protected function persist() {\n\t\t$objectManager = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance(\\TYPO3\\CMS\\Extbase\\Object\\ObjectManager::class);\n\t\t$persistanceManager = $objectManager->get(\\TYPO3\\CMS\\Extbase\\Persistence\\Generic\\PersistenceManager::class);\n\t\t$persistanceManager->persistAll();\n\t}", "private function prepare(){\r\n \r\n $autoload = &$this->settings->autoload; \r\n \r\n if(isset($autoload)){\r\n \r\n foreach($autoload AS $key => $class){\r\n \r\n $settings = &$this->settings->{$key};\r\n \r\n if(isset($settings)){\r\n\r\n $this->{$key} = new $class($settings);\r\n }\r\n }\r\n }\r\n }", "public function setup()\n {\n CRUD::setModel(Plugin::class);\n CRUD::setRoute(config('backpack.base.route_prefix') . '/plugin');\n CRUD::setEntityNameStrings('plugin', 'plugins');\n $this->crud->denyAccess('update');\n }", "public function init_save_queries()\n {\n }", "public function onSave()\n {\n // first, use the default onSave()\n $object = parent::onSave();\n \n // if the object has been saved\n// if ($object instanceof Voo)\n// {\n// // $source_file = 'tmp/'.$object->photo_path;\n// // $target_file = 'images/' . $object->photo_path;\n// // $finfo = new finfo(FILEINFO_MIME_TYPE);\n// \n// // if the user uploaded a source file\n// if (file_exists($source_file) AND $finfo->file($source_file) == 'image/png')\n// {\n// // move to the target directory\n// // rename($source_file, $target_file);\n// \n// try\n// {\n// TTransaction::open($this->database);\n// // update the photo_path\n// // $object->photo_path = 'images/'.$object->photo_path;\n// $object->store();\n// TTransaction::close();\n// }\n// catch (Exception $e) // in case of exception\n// {\n// new TMessage('error', '<b>Error</b> ' . $e->getMessage());\n// TTransaction::rollback();\n// }\n// }\n// }\n }" ]
[ "0.60499036", "0.5883606", "0.5878067", "0.5756851", "0.5727931", "0.572369", "0.5723658", "0.57137036", "0.56861293", "0.5673229", "0.56674117", "0.5665621", "0.5648855", "0.56486046", "0.5645121", "0.56314296", "0.5569917", "0.5564235", "0.5520951", "0.5518778", "0.54887575", "0.54801404", "0.5477165", "0.5467325", "0.5464498", "0.5450747", "0.5447291", "0.54394597", "0.5401427", "0.5393413", "0.5392122", "0.5388147", "0.5376489", "0.5368416", "0.5357838", "0.5338336", "0.53320324", "0.53277004", "0.53217703", "0.53217703", "0.53180903", "0.5312594", "0.5309762", "0.5309052", "0.5309052", "0.5308142", "0.5300316", "0.52975816", "0.52841747", "0.5271502", "0.526558", "0.52593917", "0.5255647", "0.5242799", "0.52291596", "0.5228101", "0.5223164", "0.52220196", "0.52062315", "0.51992005", "0.519086", "0.51770836", "0.51741534", "0.5169132", "0.51660275", "0.5164976", "0.5161078", "0.51589453", "0.5158301", "0.5150372", "0.51443136", "0.5138523", "0.5132676", "0.5125028", "0.51163274", "0.5115486", "0.51123893", "0.51094764", "0.51091486", "0.5100998", "0.5100321", "0.50971", "0.50883466", "0.5077083", "0.507344", "0.50734395", "0.50716776", "0.5064732", "0.50622433", "0.505756", "0.5055343", "0.5052193", "0.5049799", "0.50493634", "0.5043596", "0.5042339", "0.5035901", "0.50334173", "0.503196", "0.5030978", "0.50277394" ]
0.0
-1
Iterates the fieldlist and executes a mandatory check for each field.
public function onSaveProjectCheckMandatory( SaveProjectEvent $event, $eventName, EventDispatcherInterface $eventDispatcher ) { $fieldList = $event->getFieldList(); $data = $event->getData(); foreach ($fieldList as $field) { if ($field->checkMandatory($data)) { // if there is a return value != false, the check failed $event->stopPropagation(); $data['errorString'] = 'There went something wrong in the mandatoy check of field with fieldname ' . $field->getFieldName(); $event->setData($data); // exit loop break; } // check passes...nothing to do } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validate_fields() {\n \n\t\t//...\n \n }", "public function validate_fields() {\n \n\t\t\n \n\t\t}", "public static function fieldListMandatory($method, $fieldList, $params) {\n $result = TRUE;\n $errorFieldList = array();\n foreach ($fieldList as $_field) {\n if (!isset($params[$_field])) {\n $result = FALSE;\n } elseif (is_array($params[$_field])) {\n if (count($params[$_field]) == 0) {\n $result = FALSE;\n }\n } else {\n if (strlen($params[$_field]) == 0) {\n $result = FALSE;\n }\n }\n $errorFieldList[] = $_field;\n }\n if ($result === FALSE && count($errorFieldList) > 0) {\n \\Raneko\\Log::error($method, \"Mandatory fields constraint violated: \" . implode(\", \", $errorFieldList));\n }\n return $result;\n }", "abstract protected function getMandatoryModelsFields();", "function validate_fields() {\n\t\treturn true;\n\t}", "public function validateFields($par)\n {\n $i=0;\n foreach ($par as $key => $value){\n if(empty($value)){\n $i++;\n }\n }\n if($i==0){\n return true;\n }else{\n $this->setErro(\"Preencha todos os dados!\");\n return false;\n }\n }", "function validate_fields( $array ) {\n\t\t$this->validate_list = $array;\n\t\t}", "function check_required_fields($required_array) {\r\n $field_errors = array();\r\n foreach($required_array as $fieldname) {\r\n if (isset($_POST[$fieldname]) && empty($_POST[$fieldname])) { \r\n $field_errors[] = ucfirst($fieldname). \" is required\"; \r\n }\r\n }\r\n return $field_errors;\r\n}", "protected function processRequiredAttributes(array $fields): void\n {\n if (!$this->model || !method_exists($this->model, 'setValidationAttributeName')) {\n return;\n }\n\n foreach ($fields as $field) {\n if ($field->required !== null) {\n continue;\n }\n\n $attrName = implode('.', HtmlHelper::nameToArray($field->fieldName));\n $field->required = $this->model->isAttributeRequired($attrName);\n }\n }", "private function validate_required_fields()\n\t{\n\t\t$errors = array();\n\t\t\n\t\tforeach (array_keys($this->_required_fields) as $field)\n\t\t{\n\t\t\t$value = $this->get_field_value($field);\n\t\t\t\n\t\t\tif (!validate::required($value))\n\t\t\t{\n\t\t\t\t$errors[$field] = 'Required';\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $errors;\n\t}", "static function checkForEmptyFields($fieldnames = array()) {\n\n $failure = false;\n foreach ($fieldnames as $fieldname) {\n $test = getInput($fieldname);\n if (!$test) {\n $failure = true;\n new SystemMessage($fieldname . \" can't be left empty\");\n }\n }\n if ($failure) {\n forward();\n }\n }", "protected function _checkFieldList($core = 'beowulf', $fields){\n if(!is_null($fields)){\n $this->_schemaFields[] = '*';\n $this->_schemaFields[] = 'q';\n foreach($fields as $f){\n if(!in_array($f,$this->_schemaFields)){\n throw new Pas_Solr_Exception('The field ' . $f\n . ' is not in the schema');\n }\n }\n } else {\n throw new Pas_Solr_Exception('The fields supplied are not an array');\n }\n }", "function checkForLists() {\n $res = true;\n foreach ($this->listFields() as $fieldName) {\n $fieldInfo = $this->getFieldInfo($fieldName);\n $res = $this->_checkForList($fieldName, $fieldInfo);\n }\n return $res;\n }", "protected function getAllFieldsAreEmpty() {}", "public function required_fields(array $fields)\n\t{\n\t\tif (count($fields) > 0)\n\t\t{\n\t\t\tforeach ($fields as $field)\n\t\t\t{\n\t\t\t\t$this->_required_fields[$field] = TRUE;\n\t\t\t}\n\t\t}\n\t}", "private function parseFields(): void\n {\n foreach ($this->reflect->getProperties() as $item) {\n $name = $item->getName();\n if (in_array($name, self::SKIP_FIELDS, true)) {\n continue;\n }\n\n $docblock = $item->getDocComment();\n $defType = $this->getFieldType($name, $docblock);\n $varType = $this->getVarType($name, $docblock);\n $isRequired = $this->isRequired($name, $docblock);\n $storage = &$this->fieldsBuffer[$defType];\n\n switch ($defType) {\n case self::FIELD_SIMPLE_TYPE:\n $storage[] = $this->processSimpleField($name, $varType, $isRequired);\n break;\n case self::FIELD_DATE_TYPE:\n $storage[] = $this->processDateField($name, $varType, $isRequired);\n break;\n case self::FIELD_MO_TYPE:\n $storage[] = $this->processManyToOneField($name, $varType, $isRequired);\n break;\n case self::FIELD_OM_TYPE:\n $storage[] = $this->processOneToManyField($name);\n break;\n }\n }\n\n unset($storage);\n }", "public function checkRequiredFields($count, $elementData) {\n foreach ($elementData as $header => $data) {\n foreach ($data as $key => $value) {\n if (in_array($header, $this->requiredHeaders)) {\n if (in_array($key, $this->requiredInputs[$header]) && $value) {\n $this->validateDetailTransactionData($header, $key, $count, $value);\n } elseif (!in_array($key, $this->requiredInputs[$header]) && ($value || !$value)) {\n if ($value)\n $this->validateDetailTransactionData($header, $key, $count, $value);\n } else {\n $this->error[$count][]['message'] = $header . '-' . $key .' is a required field.';\n }\n } else {\n if (in_array($key, $this->requiredInputs[$header]) && !$value) {\n $state = true; \n } elseif (in_array($key, $this->requiredInputs[$header]) && $value) {\n $state = false;\n $this->validateDetailTransactionData($header, $key, $count, $value);\n } elseif (!in_array($key, $this->requiredInputs[$header]) && $value && $state) {\n $this->error[$count][]['message'] = 'Cannot set ' . $header . '-' . $key . ' without setting ' . $header . '-' . $this->requiredInputs[$header][0] . '.';\n } elseif ($value) {\n $this->validateDetailTransactionData($header, $key, $count, $value);\n }\n }\n }\n }\n }", "public function validate() {\n // loop through validators and run them\n foreach($this->form_fields as $field) {\n $field->valid = TRUE;\n // validate required items\n if ($field->required) {\n if ((strlen($field->value) == 0) || (empty($field->value)) || (is_null($field->value)) ) {\n $field->valid = FALSE; $this->form_errors++; \n if ((isset($field->default_error)) && (!empty($field->default_error))) {\n $field->error = $field->default_error;\n }\n else {\n $field->error = \"This field is required\";\n }\n }\n }\n // run validators for items that are not already failed\n if (($field->valid) && (!empty($field->validator)) && (is_array($field->validator))) {\n\n // skip empty fields\n if (empty($field->value)) { continue; }\n\n foreach($field->validator as $validator) {\n // run the function\n if (call_user_func($validator['func'],$field->value)) {\n $field->valid = TRUE;\n }\n else {\n $field->valid = FALSE; $this->form_errors++; \n if ((isset($validator['message'])) && (!empty($validator['message']))) {\n $field->error = $validator['message'];\n }\n else if ((isset($field->default_error)) && (!empty($field->default_error))) {\n $field->error = $field->default_error;\n }\n else {\n $field->error = \"This field contains an invalid value\";\n }\n // break out of the loop. No need to continue with validations if one has failed\n break;\n }\n }\n }\n $this->form_validated = TRUE;\n // run the post validate method to levy modifications against the validated input\n $this->postValidate();\n }\n return;\n }", "function validate(){\r\n\t\t$missing_fields = Array ();\r\n\t\tforeach ( $this->required_fields as $field ) {\r\n\t\t\t$true_field = $this->fields[$field]['name'];\r\n\t\t\tif ( $this->$true_field == \"\") {\r\n\t\t\t\t$missing_fields[] = $field;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ( count($missing_fields) > 0){\r\n\t\t\t// TODO Create friendly equivelant names for missing fields notice in validation \r\n\t\t\t$this->errors[] = __ ( 'Missing fields: ' ) . implode ( \", \", $missing_fields ) . \". \";\r\n\t\t}\r\n\t\treturn apply_filters('em_event_validate', count($this->errors) == 0, $this );\r\n\t}", "public function checkFields()\n\t{\n\t\t$checkResult = new Result();\n\n\t\t$fieldsToCheck = [\n\t\t\t'ENTITY_ID',\n\t\t\t'USER_ID',\n\t\t\t'ID',\n\t\t\t'COPIED_ID',\n\t\t\t'CREATED_BY',\n\t\t\t'PARENT_ID',\n\t\t\t'TITLE',\n\t\t\t'SORT_INDEX',\n\t\t\t'IS_COMPLETE',\n\t\t\t'IS_IMPORTANT',\n\t\t\t'MEMBERS',\n\t\t\t'ATTACHMENTS',\n\t\t];\n\n\t\tforeach ($fieldsToCheck as $field)\n\t\t{\n\t\t\t$get = $this->convertToCamelCase('get_' . $field);\n\t\t\t$value = $this->$get();\n\t\t\t$saveCheck = $this->map[$field]['SAVE_CHECK'];\n\n\t\t\tif (!$saveCheck($value))\n\t\t\t{\n\t\t\t\tif (is_array($value))\n\t\t\t\t{\n\t\t\t\t\t$value = static::parseArrayValueForOutput($value);\n\t\t\t\t}\n\n\t\t\t\t$search = ['#VALUE#', '#FIELD#', '#ID#', '#TITLE#'];\n\t\t\t\t$replace = [$value, $field, $this->id, $this->title];\n\t\t\t\t$message = str_replace($search, $replace, Loc::getMessage('TASKS_CHECKLIST_FIELDS_CHECKING_FAILED'));\n\n\t\t\t\t$checkResult->addError('CHECK_FIELDS_FAILED', $message);\n\t\t\t\treturn $checkResult;\n\t\t\t}\n\t\t}\n\n\t\treturn $checkResult;\n\t}", "function validate()\n\t\t{\n\t\t\tif(count($this->validateFields)==0 || !is_array($this->validateFields)){\n\t\t\t\treturn false;\n\t\t\t}else{\n\t\t\t\t$error\t=\t0;\n\t\t\t\t$fieldPos=1;\n\t\t\t\t//First Validate For Empty on all fields //\n\t\t\t\tforeach($this->validateFields as $key=>$val){\n\t\t\t\t\t\n\t\t\t\t\t$checkedError\t=\t0;\n\t\t\t\t\t$parts\t=\texplode(\"/\",$val);\n\t\t\t\t\t$label\t=\t$parts[0];\n\t\t\t\t\t$valids\t=\texplode(\"|\",$parts[1]);\t\n\t\t\t\t\tif(in_array(\"EMPTY\",$valids) && $checkedError==0){\n\t\t\t\t\t\tif($this->validateEmpty($key)){\n\t\t\t\t\t\t\t$error++;\n\t\t\t\t\t\t\t$this->setError(\"Enter Mandatory Fields \");\n\t\t\t\t\t\t\t$checkedError\t=\t1;\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$fieldPos++;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif($error==0){\n\t\t\t\t\t$fieldPos=1;\n\t\t\t\t\tforeach($this->validateFields as $key=>$val){\n\t\t\t\t\t\n\t\t\t\t\t\t$checkedError\t=\t0;\n\t\t\t\t\t\t$parts\t=\texplode(\"/\",$val);\n\t\t\t\t\t\t$label\t=\t$parts[0];\n\t\t\t\t\t\t$valids\t=\texplode(\"|\",$parts[1]);\t\t\t\t\t\t\n\t\t\t\t\t\tif(in_array(\"EMAIL\",$valids)){\n\t\t\t\t\t\t\tif(!$this->validateEmail($key) && $checkedError==0 && $error==0){\n\t\t\t\t\t\t\t\t$error++;\n\t\t\t\t\t\t\t\t$this->setError(\"Invalid email id in field -\".$label.\"-\");\n\t\t\t\t\t\t\t\t$checkedError=1;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t\tif(in_array(\"NUMBER\",$valids)){\n\t\t\t\t\t\t\tif(!$this->validateNumeric($key) && $checkedError==0 && $error==0){\n\t\t\t\t\t\t\t\t$error++;\n\t\t\t\t\t\t\t\t$this->setError(\"Enter Numeric in field -\".$label.\"-\");\n\t\t\t\t\t\t\t\t$checkedError=1;\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\tif(in_array(\"FILTER\",$valids)){\n\t\t\t\t\t\t\tif($this->validateSpecial($key) && $checkedError==0 && $error==0){\n\t\t\t\t\t\t\t\t$error++;\n\t\t\t\t\t\t\t\t$this->setError(\"Special chars not allowed in field -\".$label.\"-\");\n\t\t\t\t\t\t\t\t$checkedError=1;\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\t\n\t\t\t\t\t\tif(in_array(\"URL\",$valids)){\n\t\t\t\t\t\t\tif(!$this->validateUrl($key) && $checkedError==0 && $error==0){\n\t\t\t\t\t\t\t\t$error++;\n\t\t\t\t\t\t\t\t$this->setError(\"Invalid website address in field -\".$label.\"-\");\n\t\t\t\t\t\t\t\t$checkedError=1;\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\t$fieldPos++;\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\t\t\t\n\t\t\tif($error==0){\n\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public function hasRequiredFields()\n {\n // If any of our fields are empty, reject stuff\n $all_fields_found = true;\n $field_list = array(\n 'email',\n 'password',\n 'password2',\n 'first_name',\n 'last_name',\n 'speaker_info'\n );\n\n foreach ($field_list as $field) {\n if (!isset($this->_data[$field])) {\n $all_fields_found = false;\n break;\n }\n }\n\n return $all_fields_found;\n }", "private function checkRequired()\n {\n if ($this->fld->is_required == 1 && !$this->is_val_set) {\n throw new Exceptions\\DXCustomException(sprintf(trans('errors.required_field'), $this->fld->title_list));\n }\n }", "public function validate ()\n {\n $errorCount = 0;\n foreach ($this->arrayFieldDefinition as $fieldName => $arrField) {\n if ( $arrField['required'] === true )\n {\n $accessor = $this->arrayFieldDefinition[$fieldName]['accessor'];\n if ( trim ($this->$accessor ()) == \"\" )\n {\n $this->validationFailures[] = $fieldName . \" Is empty. It is a required field\";\n $errorCount++;\n }\n }\n }\n if ( $errorCount > 0 )\n {\n return false;\n }\n return true;\n }", "private function READ_FIELDS()\r\r {\r\r foreach($this->_fields as $key => $attributes)\r\r {\r\r foreach($attributes as $attrib_key => $attribute)\r\r {\r\r if(is_numeric($attrib_key))\r\r {\r\r $this->_ready_fields[$key][$attribute] = true;\r\r }\r\r else\r\r {\r\r $this->_ready_fields[$key][$attrib_key] = $attribute; \r\r } \r\r }\r\r } \r\r }", "public function validate() {\n // Validate each form field\n foreach ($this->fields as $field => $value) {\n \n // If the field value is empty\n if (empty($value)) {\n // If the field is set as required, throw error\n if (isset($this->rules[$field]['required'])) {\n $this->errors[$field][] = self::ERROR_REQUIRED;\n }\n }\n // Else, if the field has a value and is declared in Rules\n else if (isset($this->rules[$field])) {\n \n // Remove 'required' from list of callable functions.\n // We already did this check above.\n unset($this->rules[$field]['required']);\n \n foreach ($this->rules[$field] as $rule => $rule_value) {\n /**\n * For each rule specified for an element,\n * call a function with the same name, e.g. 'email()' when\n * checking whether a field value is a valid email address.\n * \n * This replaces the previous switch statement, and reduces\n * the need to iterate through each switch case for every\n * rule. \n */\n call_user_func_array(\n // Function is in this instance, named identical to rule\n array($this, $rule),\n // Pass the Field name, Field value, and Rule value\n array($field, $value, $rule_value)\n );\n }\n }\n }\n \n // Return validation result\n if (empty($this->errors)) {\n return TRUE;\n }\n else {\n return FALSE;\n }\n }", "public function validate ()\n {\n $errorCount = 0;\n\n foreach ($this->arrFieldMapping as $fieldName => $arrField) {\n if ( $arrField['required'] === 'true' )\n {\n $accessor = $this->arrFieldMapping[$fieldName]['accessor'];\n\n if ( trim ($this->$accessor ()) == \"\" )\n {\n $this->validationFailures[] = $fieldName . \" Is empty. It is a required field\";\n $errorCount++;\n }\n }\n }\n\n if ( $errorCount > 0 )\n {\n return false;\n }\n\n return true;\n }", "private function loadFields() {\n\t\tif (count($this->fields) > 0) return;\n\t\t$db = getDB();\n\t\t$stat = $db->prepare(\"SELECT * FROM collection_has_field WHERE collection_id=:cid ORDER BY sort_order DESC\");\n\t\t$stat->execute(array('cid'=>$this->collection_id));\n\t\twhile($d = $stat->fetch()) {\n\t\t\tif ($d['type'] == \"STRING\") {\n\t\t\t\t$this->fields[] = new ItemFieldString( $d, $this->collection_id, $this);\n\t\t\t} else if ($d['type'] == \"TEXT\") {\n\t\t\t\t$this->fields[] = new ItemFieldText( $d, $this->collection_id, $this);\n\t\t\t} else if ($d['type'] == \"HTML\") {\n\t\t\t\t$this->fields[] = new ItemFieldHTML( $d, $this->collection_id, $this);\n\t\t\t} else if ($d['type'] == \"EMAIL\") {\n\t\t\t\t$this->fields[] = new ItemFieldEmail( $d, $this->collection_id, $this);\n\t\t\t} else if ($d['type'] == \"PHONE\") {\n\t\t\t\t$this->fields[] = new ItemFieldPhone( $d, $this->collection_id, $this);\n\t\t\t} else {\n\t\t\t\tthrow new Exception(\"We don't know about type: \".$d['type']);\n\t\t\t}\n\t\t}\n\t}", "function checkFields( $args )\r\n {\r\n\t\treturn true;\r\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 fillEmptyFields()\n\t{\n\t\tif(isset($this->data[$this->name])) \n\t\t{\n\t\t\t$data = $this->data[$this->name];\n\t\t} else {\n\t\t\t$data = $this->data;\n\t\t}\n\t\t\n\t\tforeach($this->_schema as $fieldname => $details) \n\t\t{\n\t\t\tif(!isset($data[$fieldname]))\n\t\t\t\t$this->set($fieldname, '');\n\t\t}\n\t}", "function validate_fields($var){\n global $errors;\n foreach ($var as $field) {\n $val = remove_junk($_POST[$field]);\n if(isset($val) && $val==''){\n $errors = $field .\" can't be blank.\";\n return $errors;\n }\n }\n}", "public function getFrontEndRequiredFields();", "public function setRequiredFields($required_fields){\n\t\tif(!is_array($required_fields)) return;\n\t\t\n\t\tforeach($required_fields as $field_name){\n\t\t\tif(isset($this->Fields[$field_name])){\n\t\t\t\t$this->Fields[$field_name]->is_required = true;\n\t\t\t}\n\t\t}\n\t}", "public function check_fields($fields) {\n\t \n\t if ($fields == \"*\") {\n\t\treturn array('error' => false, 'param' =>'');\n\t }\n\t \n $fields_arr = explode(',',$fields);\n\t \n\t foreach ($fields_arr as $element) {\n\t\tif (!isset($this->paramsStr[$element])) {\n\t\t return array('error' => true , 'param' => $element);\n\t\t}\n\t }\n\t return array('error' => false, 'param' =>'');\n\t}", "function formErrorCheck( $fields ) {\n\t\n\t$array = get_option( 'resume_input_fields' );\n\n\tforeach ( $array as $item => $key) {\n\t\t\n\t\tswitch($item){\n\t\t\tcase 'fname':\n\t\t\t\t\t\tif ( !$fields['fname'] && $key[1] == 1 )\n\t\t\t\t\t\t\t$error = true;\n\t\t\t\t\t\tbreak;\n\t\t\tcase 'lname':\n\t\t\t\t\t\tif ( !$fields['lname'] && $key[1] == 1 )\n\t\t\t\t\t\t\t$error = true;\n\t\t\t\t\t\tbreak;\n\t\t\tcase 'address':\n\t\t\t\t\t\tif ( !$fields['address'] && $key[1] == 1 )\n\t\t\t\t\t\t\t$error = true;\n\t\t\t\t\t\tbreak;\n\t\t\tcase 'address2':\n\t\t\t\t\t\tif ( !$fields['address2'] && $key[1] == 1 )\n\t\t\t\t\t\t\t$error = true;\n\n\t\t\t\t\t\tbreak;\n\t\t\tcase 'city':\n\t\t\t\t\t\tif ( !$fields['city'] && $key[1] == 1 )\n\t\t\t\t\t\t\t$error = true;\n\t\t\t\t\t\tbreak;\n\t\t\tcase 'state':\n\t\t\t\t\t\tif ( !$fields['state'] && $key[1] == 1 )\n\t\t\t\t\t\t\t$error = true;\n\t\t\t\t\t\tbreak;\n\t\t\tcase 'zip':\n\t\t\t\t\t\tif ( !$fields['zip'] && $key[1] == 1 )\n\t\t\t\t\t\t\t$error = true;\n\t\t\t\t\t\tbreak;\n\t\t\tcase 'pnumber':\n\t\t\t\t\t\tif ( ( !$fields['pnumber'] || !$fields['pnumbertype'] ) && $key[1] == 1 )\n\t\t\t\t\t\t\t$error = true;\n\t\t\t\t\t\tbreak;\n\t\t\tcase 'snumber':\n\t\t\t\t\t\tif ( ( !$fields['snumber'] || !$fields['snumbertype'] ) && $key[1] == 1 )\n\t\t\t\t\t\t\t$error = true;\n\t\t\t\t\t\tbreak;\n\t\t\tcase 'email':\n\t\t\t\t\t\tif ( !$fields['email'] && $key[1] == 1 )\n\t\t\t\t\t\t\t$error = true;\n\t\t\t\t\t\tbreak;\n\t\t\tcase 'attachment':\n\t\t\t\t\t\tif ( !$fields['attachment'][0]['name'][0] && $key[1] == 1 )\n\t\t\t\t\t\t\t$error = true;\n\t\t\t\t\t\tbreak;\n\t\t\tcase 'cover':\n\t\t\t\t\t\tif ( !$fields['cover'] && $key[1] == 1 )\n\t\t\t\t\t\t\t$error = true;\n\t\t\t\t\t\tbreak;\n\t\t\tcase 'resume':\n\t\t\t\t\t\tif ( !$fields['resume'] && $key[1] == 1 )\n\t\t\t\t\t\t\t$error = true;\n\t\t\t\t\t\tbreak;\n\t\t}\n\t\t\n\t}\n\t\n\treturn $error;\t\n}", "function checkEmptyField($requiredField){\n\n $formErrors = array();\n\n foreach($requiredField as $nameofField){\n\n if (!isset($_POST[$nameofField]) || $_POST[$nameofField] == NULL){\n \n $formErrors[] = $nameofField . \" is a required field.\" ;\n \n }\n }\n return $formErrors;\n }", "public function validate() {\n\n // Tell ourselves that the client has initiated validation.\n $this->hasRanValidation = true;\n\n // Sanitize and filter all of our field data.\n $this->filterFields();\n\n // Validate each field individually.\n foreach ($this->fields as $field) {\n\n // Skip fields with no rules.\n if (!$field->getGumpRules()) {\n continue;\n }\n\n // Validate this field.\n $fieldError = $field->validate();\n\n // Add any errors to our error log.\n if ($fieldError) {\n $this->addError($field, $fieldError);\n }\n }\n }", "function validateAll(){\n foreach($this->fields as $field){\n $val = $_POST[$field['id']];\n if($field['validate']){\n switch($field['type']){\n case \"email\":\n if(!filter_var($val, FILTER_VALIDATE_EMAIL)){\n $this->fields[$field['id']]['class'] .= \" error\";\n $this->has_errors = true;\n }\n break;\n case \"number\":\n if(!is_numeric($val)){\n $this->fields[$field['id']]['class'] .= \" error\";\n $this->has_errors = true;\n }else{\n if(isset($this->fields[$field['id']]['min'])){\n if($this->fields[$field['id']]['min'] > $val){\n $this->fields[$field['id']]['class'] .= \" error\";\n $this->has_errors = true;\n }\n }\n if(isset($this->fields[$field['id']]['max'])){\n if($this->fields[$field['id']]['max'] < $val){\n $this->fields[$field['id']]['class'] .= \" error\";\n $this->has_errors = true;\n }\n }\n }\n break;\n case \"password\":\n if($this->fields[$field['id']]['compare']){\n $compareWith = $this->fields[$field['id']]['compare'];\n if($val != $_POST[$compareWith]){\n $this->fields[$field['id']]['class'] .= \" error\";\n $this->fields[$compareWith]['class'] .= \" error\";\n $this->has_errors = true;\n }else if(!$this->validatePassword($val) || !$this->validatePassword($_POST[$compareWith])){\n $this->fields[$field['id']]['class'] .= \" error\";\n $this->fields[$compareWith]['class'] .= \" error\";\n $this->has_errors = true;\n }\n }else{\n if(!$this->validatePassword($val)){\n $this->fields[$field['id']]['class'] .= \" error\";\n $this->has_errors = true;\n }\n }\n break;\n case \"date\":\n if(!$this->validateDate($val)){\n $this->fields[$field['id']]['class'] .= \" error\";\n $this->has_errors = true;\n }else{\n if(isset($this->fields[$field['id']]['min'])){\n $min = $this->fields[$field['id']]['min'];\n if($this->compareDates($min, $val)){\n $this->fields[$field['id']]['class'] .= \" error\";\n $this->has_errors = true;\n }\n }\n if(isset($this->fields[$field['id']]['max'])){\n $max = $this->fields[$field['id']]['max'];\n if($this->compareDates($val, $max)){\n $this->fields[$field['id']]['class'] .= \" error\";\n $this->has_errors = true;\n }\n }\n }\n break;\n case \"radio\":\n if(!$val){\n $this->fields[$field['id']]['error'] .= \" error\";\n }\n break;\n default:\n if(!$val){\n $this->fields[$field['id']]['class'] .= \" error\";\n }\n }\n }\n }\n return ($this->has_errors ? false : true);\n }", "function required_validate() {\n if ($this->required) {\n if (array_key_exists('NOT_NULL', $this->condition)) \n {\n if ($this->value == '' || $this->value == NULL) {\n $this->errors->add_msj(NOT_NULL_PRE.$this->name.NOT_NULL_POS);\n }\n }\n\n if (array_key_exists('IS_INT', $this->condition)) \n {\n if (!field_is_int($this->value))\n {\n $this->errors->add_msj(IS_INT_PRE.$this->name.IS_INT_POS);\n }\n }\n\n }\n }", "private function validatePaymentFields(){\n }", "function testInvalidFieldsWithFieldListParams() {\n\t\t$TestModel =& new ValidationTest();\n\t\t$TestModel->validate = $validate = array(\n\t\t\t'title' => array('rule' => 'customValidator', 'required' => true),\n\t\t\t'name' => array('rule' => 'allowEmpty', 'required' => true),\n\t\t);\n\t\t$TestModel->invalidFields(array('fieldList' => array('title')));\n\t\t$expected = array('title' => 'This field cannot be left blank');\n\t\t$this->assertEqual($TestModel->validationErrors, $expected);\n\t\t$TestModel->validationErrors = array();\n\n\t\t$TestModel->invalidFields(array('fieldList' => array('name')));\n\t\t$expected = array('name' => 'This field cannot be left blank');\n\t\t$this->assertEqual($TestModel->validationErrors, $expected);\n\t\t$TestModel->validationErrors = array();\n\n\t\t$TestModel->invalidFields(array('fieldList' => array('name', 'title')));\n\t\t$expected = array('name' => 'This field cannot be left blank', 'title' => 'This field cannot be left blank');\n\t\t$this->assertEqual($TestModel->validationErrors, $expected);\n\n\t\t$this->assertEqual($TestModel->validate, $validate);\n\t}", "function validateBizAddFields($fields)\r\r\n\t\t\t{\r\r\n\t\t\t\t$f1 = $fields['businessName'];\r\r\n\t\t\t\t$f2 = $fields['businessCategory'];\r\r\n\t\t\t\t$f3 = $fields['address1'];\r\r\n\t\t\t\t$f4 = $fields['city'];\r\r\n\t\t\t\tif (($f1 == '') && ($f2 == '') && ($f3 == '') && ($f4 == '')) {\r\r\n\t\t\t\t\treturn array('businessName' => 'Business name, category, address and city are required fields');\r\r\n\t\t\t\t}\r\r\n\t\t\t\treturn true;\r\r\n\t\t\t}", "protected function traverseFields(): void\n {\n $columns = $this->definition->tca['columns'] ?? [];\n foreach ($this->definition->data as $fieldName => $value) {\n if (! is_array($columns[$fieldName])) {\n continue;\n }\n \n $this->registerHandlerDefinitions($fieldName, $columns[$fieldName], [$fieldName]);\n \n // Handle flex form fields\n if (isset($columns[$fieldName]['config']['type']) && $columns[$fieldName]['config']['type'] === 'flex') {\n $this->flexFormTraverser->initialize($this->definition, [$fieldName])->traverse();\n }\n }\n }", "function _required($required, $data)\n\t{\n\t\tforeach ($required as $field)\n\t\t{\n\t\t\tif ( ! isset($data[$field]))\n\t\t\t{\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\treturn TRUE;\n\t}", "function validate_rows() {\r\n $ok = True;\r\n for ($i = 0; $i < $this->db_count; $i++) {\r\n foreach ($this->properties as $colvar=>$col) {\r\n if (!$this->validate_field($colvar,$i)) { # make sure this field is not empty\r\n $ok = False;\r\n }\r\n }\r\n }\r\n return $ok;\r\n }", "protected function _processForm() {\n\t\t$formValidators = $this->getElement()->getValidators();\n\n\t\t$constraints = array();\n\t\tforeach ($formValidators as $validator) {\n\t\t\t$situations = array();\n\t\t\t$conditions = array();\n\t\t\tif (isset($validator['situations'])) {\n\t\t\t\tforeach ($validator['situations'] as $name => $validators) {\n\t\t\t\t\t$situations[$name] = $this->_generateClientSideValidation($name, $this->_convertFormValidation($validators), false);\n\t\t\t\t}\n\t\t\t}\n\t\t\tforeach ($validator['conditions'] as $name => $validators) {\n\t\t\t\t// Make the field trigger itself.\n\t\t\t\tif (!array_key_exists($name, $this->_validationTriggers)) {\n\t\t\t\t\t$this->_validationTriggers[$name] = array();\n\t\t\t\t}\n\t\t\t\t$this->_validationTriggers[$name][$name] = true;\n\n\t\t\t\t$clientsideValidation = $this->_generateClientSideValidation($name, $this->_convertFormValidation($validators));\n\t\t\t\tif (isset($validator['message'])) {\n\t\t\t\t\tforeach ($clientsideValidation as $rule => & $message) {\n\t\t\t\t\t\t$message = $validator['message'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->_validatedFields[$name][] = array(\n\t\t\t\t\t'situations' => $situations,\n\t\t\t\t\t'conditions' => array($name => $clientsideValidation)\n\t\t\t\t);\n\n\t\t\t\t// Now ensure that each element that determines whether the condition needs to be satisfied trigger the checks on this element.\n\t\t\t\tforeach (array_keys($situations) as $trigger) {\n\t\t\t\t\t$this->_validationTriggers[$trigger][$name] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function checkFields($fillable)\n {\n $fillable = array_merge(array('created_at','updated_at'),$fillable); //always include\n if(count($fillable)>0) {\n foreach ($this->posted as $key => $value) {\n if (!in_array($key, $fillable)) {\n $this->setError(\"$key is not allowed to be in the database. Please adjust the database accordingly.\");\n }\n }\n if (count($this->errors) > 0) {\n return false;\n }\n }\n return true;\n }", "public static function ValidateFields($fieldsRequired, $fieldsSize, $fieldsValidate, $dat, $die = true)\n {\n \tglobal $_error;\n\n\t$error = 0;\n foreach ($fieldsRequired as $field)\n {\n if (self::isEmpty($dat[$field]) AND (!is_numeric($dat[$field])))\n {\n \t$field_name = Core::FormatFieldName($field);\n $_error->AddError($field_name . ' is empty.');\n\t\t$error = 1;\n //return false;\n }\n }\n foreach ($fieldsSize as $field => $size)\n {\n if (isset($dat[$field]) AND self::strlen($this->{$field}) > $size)\n {\n /*\n if ($die) die (Tools::displayError().' ('.get_class($this).' -> '.$field.' length > '.$size.')');\n */\n\t\t$_error->AddError(\"Maximum size of \".$field_name.\" is \".$size);\n //return false;\n\t\t$error = 1;\n }\n }\n\n foreach ($fieldsValidate as $field => $method)\n {\n if (self::isEmpty($dat[$field]))\n {\n\t\t$error = 1;\n // return FALSE;\n }\n elseif (function_exists($method))\n {\n if(!$method($dat[$field]))\n {\n \t$field_name = Core::FormatFieldName($field);\n \t$_error->AddError('Provide Valid '.$field_name);\n\t\t\t$error = 1;\n \t//return FALSE;\n }\n }\n else\n {\n if (!self::$method($dat[$field]))\n {\n\t\t\t$error = 1;\n //return FALSE;\n }\n }\n }\n/*\n if (!method_exists($validate, $method))\n die (Tools::displayError('validation function not found').' '.$method);\n elseif (!Tools::isEmpty($this->{$field}) AND !call_user_func(array('Validate', $method), $this->{$field}))\n {\n if ($die) die (Tools::displayError().' ('.get_class($this).' -> '.$field.' = '.$this->{$field}.')');\n return false;\n }\n*/\tif($error == 1)\n\t\treturn false;\n\n return true;\n }", "function validate_fields($var){\n global $errors;\n foreach ($var as $field) {\n $val = remove_junk($_POST[$field]);\n if(isset($val) && $val==''){\n $errors = $field .\" No puede estar en blanco.\";\n return $errors;\n }\n }\n}", "public static function getMandatoryField() {\n\t\t$mandatory['AU'] = array('bsb' => 'required','account_number' => 'required', 'account_holder_name' => 'required', 'currency' => 'required', 'routing_number' => 'required');\n\t\t$mandatory['CA'] = array('transit_number' => 'required','account_number' => 'required','institution_number' => 'required', 'account_holder_name' => 'required', 'currency' => 'required', 'routing_number' => 'required');\n\t\t$mandatory['GB'] = array('sort_code' => 'required', 'account_number' => 'required', 'account_holder_name' => 'required', 'currency' => 'required');\n\t\t$mandatory['HK'] = array('clearing_code' => 'required', 'account_number' => 'required', 'branch_code' => 'required', 'account_holder_name' => 'required', 'currency' => 'required');\n\t\t$mandatory['JP'] = array('bank_code' => 'required','bank_code' => 'required', 'account_number' => 'required', 'branch_code' => 'required', 'bank_name' => 'required', 'branch_name' => 'required', 'account_owner_name' => 'required', 'account_holder_name' => 'required', 'currency' => 'required');\n\t\t$mandatory['NZ'] = array('routing_number' => 'required', 'account_number' => 'required', 'account_holder_name' => 'required', 'currency' => 'required');\n\t\t$mandatory['SG'] = array('bank_code' => 'required', 'account_number' => 'required', 'branch_code' => 'required', 'account_holder_name' => 'required', 'currency' => 'required');\n\t\t$mandatory['US'] = array('routing_number' => 'required', 'account_number' => 'required', 'account_holder_name' => 'required', 'currency' => 'required', 'ssn_last_4' => 'required');\n\t\t$mandatory['AT'] = array('iban' => 'required','account_number'=>'required','account_holder_name' => 'required', 'currency' => 'required');\n\t\t$mandatory['BE'] = array('iban' => 'required','account_holder_name' => 'required','currency' => 'required','account_number'=>'required');\n\t\t$mandatory['CH'] = array('iban' => 'required', 'account_holder_name' => 'required', 'currency' => 'required','account_number'=>'required');\n\t\t$mandatory['DE'] = array('iban' => 'required', 'account_holder_name' => 'required', 'currency' => 'required','account_number' => 'required');\n\t\t$mandatory['DK'] = array('iban' => 'required', 'account_holder_name' => 'required', 'currency' => 'required','account_number' => 'required');\n\t\t$mandatory['ES'] = array('iban' => 'required', 'account_holder_name' => 'required', 'currency' => 'required','account_number'=>'required');\n\t\t$mandatory['FI'] = array('iban' => 'required', 'account_holder_name' => 'required', 'currency' => 'required','account_number' => 'required');\n\t\t$mandatory['FR'] = array('iban' => 'required', 'account_holder_name' => 'required', 'currency' => 'required','account_number' => 'required');\n\t\t$mandatory['IE'] = array('iban' => 'required', 'account_holder_name' => 'required', 'currency' => 'required','account_number'=>'required');\n\t\t$mandatory['IT'] = array('iban' => 'required', 'account_holder_name' => 'required', 'currency' => 'required','account_number'=>'required');\n\t\t$mandatory['LU'] = array('iban' => 'required', 'account_holder_name' => 'required', 'currency' => 'required','account_number'=>'required');\n\t\t$mandatory['NL'] = array('iban' => 'required', 'account_holder_name' => 'required', 'currency' => 'required','account_number'=>'required');\n\t\t$mandatory['NO'] = array('iban' => 'required', 'account_holder_name' => 'required', 'currency' => 'required','account_number'=>'required');\n\t\t$mandatory['PT'] = array('iban' => 'required', 'account_holder_name' => 'required', 'currency' => 'required','account_number'=>'required');\n\t\t$mandatory['SE'] = array('iban' => 'required', 'account_holder_name' => 'required', 'currency' => 'required','account_number'=>'required');\n\t\t$mandatory['OT'] = array('account_number' => 'required', 'bank_name' => 'required', 'account_holder_name' => 'required','branch_name' => 'required');\n\n\t\treturn $mandatory;\n\t}", "private function validateFields()\n {\n $errors = array();\n for ($x=0; $x < count($this->_fields); $x++)\n {\n $field = $this->_fields[$x];\n if ($field['type'] == WFT_CC_EXPIRATION)\n {\n // one or both fields left blank\n if (strlen(trim($this->getPostValue($field['id'] . 'Month'))) == 0 ||\n strlen(trim($this->getPostValue($field['id'] . 'Year'))) == 0)\n {\n if ($field['required'])\n $errors[] = 'You must select an card expiration month and year';\n $monthValue = $yearValue = -1;\n $value = '';\n }\n else\n {\n $monthValue = intval($this->getPostValue($field['id'] . 'Month'));\n $yearValue = intval($this->getPostValue($field['id'] . 'Year'));\n $curYear = intval(date('Y'));\n if ($yearValue < $curYear)\n $errors[] = 'The expiration year is in the past';\n if ($monthValue < 1 || $monthValue > 12)\n $errors[] = 'The expiration month is not valid';\n }\n }\n else if($field['required'] && !strlen(trim($this->getPostValue($field['id']))))\n {\n if (strlen($field['caption']) > 0)\n $errors[] = $field['caption'] . ' is a required field';\n else\n $errors[] = 'This field is required';\n $value = '';\n }\n else if($field['type'] == WFT_CURRENCY)\n {\n $value = trim($this->getPostValue($field['id']));\n $value = str_replace('$', '', $value);\n $cur = floatval($value);\n $value = strval($cur);\n }\n else if($field['type'] == WFT_ANTI_SPAM_IMAGE)\n {\n $antiSpamInput = $this->getPostValue($field['id']);\n $wordVerifyID = $this->getPostValue('wordVerifyID');\n $graphs = new Graphs();\n $wordVerifyText = $graphs->getVerificationImageText($wordVerifyID);\n if (strtoupper($antiSpamInput) != $wordVerifyText || $antiSpamInput == '')\n {\n $errors[] = 'The text you entered did not correspond with the text in the security image';\n $value = 0;\n }\n else\n {\n $value = 1;\n }\n $graphs->clearVerificationImageText($wordVerifyID);\n }\n else if($field['type'] == WFT_SELECT || $field['type'] == WFT_CC_TYPE || $field['type'] == WFT_BOOLEAN)\n {\n $value = $this->getPostValue($field['id']);\n if (!strcmp($value, 'noset'))\n {\n $errors[] = $field['caption'] . ': You must select an option';\n }\n }\n else if($field['type'] == WFT_CC_NUMBER)\n {\n $value = '';\n // Clean credit card number input\n $cardNumber = preg_replace('/[^0-9]/', '', $this->getPostValue($field['id']));\n\n if ($field['required'] == false && !strlen($cardNumber))\n {\n $value = '';\n }\n else\n {\n // Guess the card type by using a pregex pattern matching algorithm\n $cardType = $this->getCreditCardTypeByNumber($cardNumber);\n if ($cardType == -1)\n $errors[] = 'The credit card number you entered is not a recognized Visa, MasterCard, American Express '\n . 'or Discover card.';\n else if (!$this->isCardNumberValid($cardType, $cardNumber))\n $errors[] = 'The credit card number you entered has not been recognized and may be invalid.';\n else\n {\n // Valid card number, now change all card type fields to match\n // the autodetected card type (visa, mastercard, etc.)\n $value = $cardNumber;\n $cardTypeName = $this->getCreditCardName($cardType);\n\n for ($y=0; $y < count($this->_fields); $y++)\n {\n if ($this->_fields[$y]['type'] == WFT_CC_TYPE)\n {\n $this->_fields[$y]['validatedDataOverride'] = $cardTypeName;\n $this->_fields[$y]['validatedData'] = $cardTypeName;\n }\n }\n }\n }\n }\n else\n {\n $value = trim($this->getPostValue($field['id']));\n\n if (!($field['required'] == false && !strlen($value)))\n {\n if (strlen($field['regex_test']) > 0)\n {\n if (!preg_match($field['regex_test'], $value))\n {\n $errors[] = $field['regex_fail'];\n }\n }\n if (strlen($value) < $field['length'][0] || strlen($value) > $field['length'][1])\n {\n if ($field['length'][0] == $field['length'][1])\n {\n if (strlen(trim($field['caption'])) > 0)\n $errors[] = sprintf(\"%s must be %d characters in length\",\n $field['caption'], $field['length'][0]);\n else\n $errors[] = sprintf(\"This field must be %d characters in length\",\n $field['length'][0]);\n }\n else\n $errors[] = sprintf(\"%s must be between %s characters in length\",\n $field['caption'], implode(' and ', $field['length']));\n }\n }\n $value = str_replace(array(\"\\r\",\"\\n\",\"\\t\",\"\\f\"), '', strip_tags($value));\n }\n\n // Set the validated (form returned) data\n switch($field['type'])\n {\n case WFT_CC_EXPIRATION:\n if ($monthValue != -1 && $yearValue != -1)\n $this->_fields[$x]['validatedData'] = sprintf('%d/%d', $monthValue, $yearValue);\n else\n $this->_fields[$x]['validatedData'] = '';\n break;\n default:\n if (isset($this->_fields[$x]['validatedDataOverride']) && strlen($this->_fields[$x]['validatedDataOverride']))\n $this->_fields[$x]['validatedData'] = $this->_fields[$x]['validatedDataOverride'];\n else\n $this->_fields[$x]['validatedData'] = $value;\n break;\n }\n }\n return $errors;\n }", "function get_required_fields($field, $html = false) {\n\n $meta_keys = fields\\get_field_ids($field, $html);\n\n if (isset($field['required'])) {\n if (gettype($field['required']) == 'boolean' && $field['required']) return $meta_keys;\n if (is_array($field['required'])) {\n if (count($field['required']) == count($meta_keys)) {\n $meta_keys = lib\\array_mask($meta_keys, $field['required']);\n } else {\n log\\error('INVALID_FIELD', 'The field is invalid because the length of the required array != number of meta keys ids for this type of field. Details '.json_encode($field));\n }\n } \n } else if ($field['type'] == 'REPEAT-GROUP') {\n $res = array_map(function($f) { return get_required_fields($f, true);}, $field['fields']);\n $meta_keys = lib\\array_flatten($res);\n }\n\n return $meta_keys;\n}", "public function validate($fields = false, $primary_key = false){\n\n\t\t$clean = parent::pre_validate($fields, $primary_key);\n\n\t\tif($clean->isEmpty('name')){\n\t\t\t$this->addError('name', text('db:error:groupname'));\n\t\t}\n\n\t\treturn $fields;\n\n\t}", "private function checkFields()\r\n {\r\n $vars = array('user', 'pass', 'numbers', 'message', 'date', 'ids', 'data_start', 'data_end',\r\n 'lido', 'status', 'entregue', 'data_confirmacao', 'return_format'\r\n );\r\n\r\n $final = array();\r\n foreach ($vars as $key => $value) {\r\n if ($this->$value !== '') {\r\n $final[$value] = $this->$value;\r\n }\r\n }\r\n return $final;\r\n }", "public function check() {\n $field = null;\n $this->_errors = [];\n $fields = $this->_getField();\n\n foreach ($this->_constraints as $constraints) {\n foreach ($fields as $value) {\n switch ($constraints['type']) {\n case self::EQUAL:\n if ($value != $constraints['value']) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::DIFFERENT:\n if ($value == $constraints['value']) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::MORETHAN:\n if ($value <= $constraints['value']) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::LESSTHAN:\n if ($value >= $constraints['value']) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::BETWEEN:\n if ($value < $constraints['value'][0] || $value > $constraints['value'][1]) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::IN:\n if (!in_array($value, $constraints['value'])) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::NOTIN:\n if (in_array($value, $constraints['value'])) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::LENGTH:\n if (strlen($value) != $constraints['value']) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::LENGTHMIN:\n if (strlen($value) < $constraints['value']) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::LENGTHMAX:\n if (strlen($value) > $constraints['value']) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::LENGTHIN:\n if (!in_array(strlen($value), $constraints['value'])) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::LENGTHBETWEEN:\n if (strlen($value) < $constraints['value'][0] || strlen($value) > $constraints['value'][1]) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::REGEX:\n if (!preg_match($constraints['value'], $value)) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::URL:\n if (!filter_var($value, FILTER_VALIDATE_URL)) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::MAIL:\n if (!filter_var($value, FILTER_VALIDATE_EMAIL)) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::INT:\n if (!filter_var($value, FILTER_VALIDATE_INT)) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::FLOAT:\n if (!filter_var($value, FILTER_VALIDATE_FLOAT)) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::ALPHA:\n if (!preg_match('#^([a-zA-Z]+)$#', $value)) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::ALPHANUM:\n if (!preg_match('#^([a-zA-Z0-9]+)$#', $value)) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::ALPHADASH:\n if (!preg_match('#^([a-zA-Z0-9_-]+)$#', $value)) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::IP:\n if (!filter_var($value, FILTER_VALIDATE_IP)) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::SQL:\n /** @var $value \\Gcs\\Framework\\Core\\Orm\\Entity\\Entity */\n\n $sql = new Sql();\n $sql->query('query-form-validation', $constraints['value']['query']);\n $sql->vars('value', $value);\n\n if (count($constraints['value']['vars']) > 0) {\n $sql->vars($constraints['value']['vars']);\n }\n\n $data = $sql->fetch('query-form-validation', Sql::PARAM_FETCHCOLUMN);\n\n $querySuccess = true;\n\n switch ($constraints['value']['constraint']) {\n case '==':\n if ($data != $constraints['value']['value']) {\n $querySuccess = false;\n }\n break;\n\n case '!=':\n if ($data == $constraints['value']['value']) {\n $querySuccess = false;\n }\n break;\n\n case '>':\n if ($data <= $constraints['value']['value']) {\n $querySuccess = false;\n }\n break;\n\n case '<':\n if ($data >= $constraints['value']['value']) {\n $querySuccess = false;\n }\n break;\n }\n\n if (!$querySuccess) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::CUSTOM:\n /** @var object[] $constraints */\n if ($constraints['value']->filter() == false) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['value']->error()]);\n }\n break;\n }\n }\n\n switch ($constraints['type']) {\n case self::COUNT:\n if (count($fields) != $constraints['value']) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::COUNTMIN:\n if (count($fields) < $constraints['value']) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::COUNTMAX:\n if (count($fields) > $constraints['value']) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::COUNTIN:\n /** @var array $constraints */\n if (!in_array(count($fields), $constraints['value'])) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::EXIST:\n if (count($fields) == 1 && $fields[0] == null) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::NOTEXIST:\n if (count($fields) == 1 && $fields[0] != null) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n }\n }\n }", "function validateBizEditFields($fields)\r\r\n\t\t\t{\r\r\n\t\t\t\t$f1 = $fields['businessName'];\r\r\n\t\t\t\t$f2 = $fields['catID'];\r\r\n\t\t\t\t$f3 = $fields['address1'];\r\r\n\t\t\t\t$f4 = $fields['city'];\r\r\n\t\t\t\tif (($f1 == '') && ($f2 == '') && ($f3 == '') && ($f4 == '')) {\r\r\n\t\t\t\t\treturn array('businessName' => 'Business name, category, address and city are required fields');\r\r\n\t\t\t\t}\r\r\n\t\t\t\treturn true;\r\r\n\t\t\t}", "protected function processFillingFields(Tx_Dce_Domain_Model_Dce $dce, array $fieldList) {\n\t\tforeach ($fieldList as $fieldVariable => $fieldValue) {\n\t\t\t$dceField = $dce->getFieldByVariable($fieldVariable);\n\t\t\tif ($dceField) {\n\t\t\t\tif (is_array($fieldValue)) {\n\t\t\t\t\tforeach($fieldValue as $sectionFieldValues) {\n\t\t\t\t\t\t$sectionFieldValues = current($sectionFieldValues);\n\t\t\t\t\t\tforeach($sectionFieldValues as $sectionFieldVariable => $sectionFieldValue) {\n\t\t\t\t\t\t\t$sectionField = $dceField->getSectionFieldByVariable($sectionFieldVariable);\n\t\t\t\t\t\t\tif ($sectionField instanceof Tx_Dce_Domain_Model_DceField) {\n\t\t\t\t\t\t\t\t$xmlIdentifier = $dce->getUid() . '-' . $dceField->getVariable() . '-' . $sectionField->getVariable();\n\t\t\t\t\t\t\t\t$this->fillFields($sectionField, $sectionFieldValue, TRUE, $xmlIdentifier);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$xmlIdentifier = $dce->getUid() . '-' . $dceField->getVariable();\n\t\t\t\t\t$this->fillFields($dceField, $fieldValue, FALSE, $xmlIdentifier);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function has_fields()\n {\n }", "public function Validate()\n\t{\n\t\t//\n\t\t// Traverse object.\n\t\t//\n\t\tforeach( $this as $condition => $statements )\n\t\t\t$this->_ValidateCondition( $condition, $statements, 0 );\n\t\n\t}", "protected function prepare_fields()\n {\n }", "protected function getRequiredFieldList()\n {\n return RequiredFields::create(\n $this->getBareRequiredFieldList()\n )\n ->setForm($this);\n }", "static function all_Empty()\r\n {\r\n echo PageBuilder::printError(\"Please enter valid data in all the fields, nothing can not be empty.\");\r\n }", "protected function checkStructure()\n {\n $structure = $this->getStructure();\n\n foreach ($structure as $field => $opt) {\n if (!array_key_exists($field, $this->data)) {\n continue;\n }\n\n $value = Arr::get($this->data, $field);\n if (is_array($value)) {\n $this->errors[$field][] = Translate::get('validate_wrong_type_data');\n continue;\n }\n\n $value = trim($value);\n $length = (int)$opt->length;\n\n if (!empty($length)) {\n $len = mb_strlen($value);\n if ($len > $length) {\n $this->errors[$field][] = Translate::getSprintf('validate_max_length', $length);\n continue;\n }\n }\n\n if (!$opt->autoIncrement && $opt->default === NULL && !$opt->allowNull && $this->isEmpty($value)) {\n $this->errors[$field][] = Translate::get('validate_not_empty');\n continue;\n }\n\n switch ($opt->dataType) {\n case 'int':\n case 'bigint':\n if (!$this->isEmpty($value) && (filter_var($value, FILTER_VALIDATE_INT) === false)) {\n $this->errors[$field][] = Translate::get('validate_int');\n continue 2;\n }\n break;\n\n case 'double':\n if (!is_float($value) && !$this->isEmpty($value)) {\n $this->errors[$field][] = Translate::get('validate_double');\n continue 2;\n }\n break;\n\n case 'float':\n if (!is_numeric($value) && !$this->isEmpty($value)) {\n $this->errors[$field][] = Translate::get('validate_float');\n continue 2;\n }\n break;\n\n case 'date':\n case 'datetime':\n case 'timestamp':\n if (!$this->isEmpty($value) && !Validate::dateSql($value)) {\n $this->errors[$field][] = Translate::get('validate_sql_date');\n continue 2;\n }\n break;\n\n default:\n continue 2;\n break;\n\n }\n }\n }", "public function checkFieldList($module, $field_list, $action, $context)\n {\n $result = array();\n foreach($field_list as $key => $field) {\n $result[$key] = $this->checkAccess($module, \"field\", $context + array(\"field\" => $field, \"action\" => $action));\n }\n return $result;\n }", "public function isRequired($field_array) {\n\t\tforeach($field_array as $field) {\n\t\t\tif ($_POST[''.$field.''] == '') {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public function getMandatoryFields()\n {\n if ($this->_mandatoryFields === null) {\n $this->_mandatoryFields = [];\n $mandatoryFields = $this->_config->get('dataprocessing/mandatory/fields');\n\n if (is_array($mandatoryFields)) {\n foreach ($mandatoryFields as $fieldName => $empty) {\n $this->_mandatoryFields[] = $fieldName;\n }\n }\n }\n\n return $this->_mandatoryFields;\n }", "protected function getBareRequiredFieldList()\n {\n $requiredFields = array_keys(singleton('NewsletterSubscription')->stat('db'));\n\n $this->extend('updateBareRequiredFieldList', $requiredFields);\n\n return $requiredFields;\n }", "public function valid () {\n return isset($this->__fields[key($this->__fields)]);\n }", "public function updateMemberFormFields(FieldList $fields)\n {\n //\n }", "function evaluate_allFields(&$fieldsValuesArr) {\n\t\t$result = array();\n\n\t\t\t// Evaluate all fields:\n\t\tforeach ($this->steps as $stepNr => $stepConf) {\n\t\t\t$evalRes = $this->evaluate_stepFields ($stepNr, $fieldsValuesArr);\n\t\t\tif (is_array($evalRes)) {\n\t\t\t\t$result = array_merge ($result, $evalRes);\t\n\t\t\t}\n\t\t}\n\n\t\t\t// Store the list of tables/fields which didn't validate:\n\t\t$this->currentEvalErrors = $result;\n\n\t\treturn (count($result) ? $result : TRUE);\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 give_validate_required_form_fields( $form_id ) {\n\n\t// Sanitize values submitted with donation form.\n\t$post_data = give_clean( $_POST ); // WPCS: input var ok, sanitization ok, CSRF ok.\n\n\t// Loop through required fields and show error messages.\n\tforeach ( give_get_required_fields( $form_id ) as $field_name => $value ) {\n\n\t\t// Clean Up Data of the input fields.\n\t\t$field_value = $post_data[ $field_name ];\n\n\t\t// Check whether the required field is empty, then show the error message.\n\t\tif ( in_array( $value, give_get_required_fields( $form_id ), true ) && empty( $field_value ) ) {\n\t\t\tgive_set_error( $value['error_id'], $value['error_message'] );\n\t\t}\n\t}\n}", "public function validate_fields() {\n\n\t\t$this->validate_refund_address_field();\n\t}", "public function validate(){\n $valid = true;\n foreach($this->fields as $field){\n if(!$field->validate()) $valid = false;\n }\n $this->setIsValid($valid);\n return $valid;\n }", "public function testFieldWithData()\n {\n $validationFieldList = new ValidationFieldList();\n $validationField = $validationFieldList->add(null, null, true);\n $validationField->required();\n\n $validationResult = $validationFieldList->validate();\n\n static::assertTrue($validationResult->getFails()[0]->field->data);\n }", "public function makeFieldList() {}", "public function requireFields(array $data, string $key): bool\n {\n $required = $this->getConfig($key);\n\n return $this->_mapFields(\n $data,\n $required,\n function (&$data, $field, $model = null) {\n if ($model === null) {\n if (!isset($data[$field])) {\n return false;\n }\n }\n\n return true;\n }\n );\n }", "function get_apr_mandatory_fields(){\n $fields = array(\n 'field_ef_date_and_partici_bm',\n 'field_ef_working_methods_rating',\n 'field_ef_general_kind_access',\n 'field_ef_related_acess',\n 'field_ef_general_kind_useful',\n 'field_ef_related_deliv_useful',\n 'field_ef_support_admin_rating',\n 'field_ef_support_deliver_rating',\n //'field_ef_invoicing_policy_rating',\n //'field_ef_ef_adherence_rating',\n //'field_ef_yammer_rating',\n 'field_ef_cms_system_rating',\n //'field_ef_network_tend_main_area',\n //'field_ef_completed_by',\n );\n\n return $fields;\n}", "private function validate_fields( $fields ) {\n\t\tforeach ( $fields as $field ) {\n\t\t\tif ( ! preg_match( '/^[0-9,a-z,A-Z$_]+$/i', $field ) ) {\n\t\t\t\tthrow new Exception( \"Invalid field name: $field is not allowed\" );\n\t\t\t}\n\n\t\t\t// TODO other verifications of the field names.\n\t\t}\n\t}", "public function validateFields($fieldRules)\n {\n global $errorFeedback;\n $errors = [];\n foreach($fieldRules as $field => $rules){\n $fieldErrors = [];\n $value = $_REQUEST[$field];\n\n $d = new Disinfect();\n $d->disinfect($value);\n\n foreach($rules as $rule){\n\n if($rule == 'required'){\n if(! isset($value) || trim($value) == '' ){\n $fieldErrors[] = $this->errorFeedback[$rule]; // 'its required'\n }\n }\n\n if($rule == 'number'){\n if($value != '' && ! preg_match('/^(\\d+)$/', $value)){\n $fieldErrors[] = $errorFeedback[$rule]; // 'its a number'\n }\n }\n\n if($rule == 'freeNickname'){\n $u = new UserModel();\n $nickexist = $u->getUsersByNickname($value);\n if (!$nickexist == false) {\n $fieldErrors[] = $this->errorFeedback[$rule]; // 'nickname not free'\n }\n }\n\n if($rule == 'max15chars'){\n if($value != '' && strlen($value) > 15){\n $fieldErrors[] = $this->errorFeedback[$rule]; // 'max chars 15'\n }\n }\n\n if($rule == 'max35chars'){\n if($value != '' && strlen($value) > 35){\n $fieldErrors[] = $this->errorFeedback[$rule]; // 'max chars 35'\n }\n }\n\n if($rule == 'min5chars'){\n if($value != '' && strlen($value) < 5){\n $fieldErrors[] = $this->errorFeedback[$rule]; // 'min chars 5'\n }\n }\n\n if($rule == 'password'){ // not in use jet!\n\n if($value != '' && ! preg_match('/^(?=.*[A-Z].*[A-Z])(?=.*[!@#$&*])(?=.*[0-9].*[0-9])(?=.*[a-z].*[a-z].*[a-z]).{8,}$/', $value)){\n $fieldErrors[] = $this->errorFeedback[$rule];\n //'its a password with = 8 characters length oe more, 2 letters in Upper Case, 1 Special Character, 2 numerals, 3 letters in Lower Case'\n // TODO use the Password validation if you want you passwords really save (and annoy the users)\n }\n }\n }\n // Are there some errors?\n if(count($fieldErrors) != 0){\n $errors[$field] = $fieldErrors;\n }\n }\n return $errors;\n }", "public static function fields() {\n // check that something was provided.\n return array(\n\t 'email' => array(\n\t 'required' => TRUE,\n\t 'default' => '',\n\t ),\n\t 'name.first' => array(\n\t 'required' => FALSE,\n\t 'default' => '',\n\t ),\n\t 'name.last' => array(\n\t 'required' => FALSE,\n\t 'default' => '',\n\t ),\n\t 'address.address' => array(\n\t 'required' => FALSE,\n\t 'default' => '',\n\t ),\n\t 'address.city' => array(\n\t 'required' => FALSE,\n\t 'default' => '',\n\t ),\n\t 'address.state.code' => array(\n\t 'required' => FALSE,\n\t 'default' => '',\n\t ),\n\t 'address.country' => array(\n\t 'required' => FALSE,\n\t 'default' => '',\n\t ),\n\t 'address.postal-code' => array(\n\t 'required' => FALSE,\n\t 'default' => '',\n\t ),\n\t 'address.postal-code.type' => array(\n\t 'required' => FALSE,\n\t 'default' => '',\n\t ),\n\t 'partner.code' => array(\n\t 'required' => FALSE,\n\t 'default' => '',\n\t ),\n\t 'action.id' => array(\n\t 'required' => TRUE,\n\t 'default' => '',\n\t ),\n\t 'action.signature-type' => array(\n\t 'required' => FALSE,\n\t 'default' => '',\n\t ),\n\t 'action.message' => array(\n\t 'required' => FALSE,\n\t 'default' => '',\n\t ),\n\t 'action.opt-ins.display' => array(\n\t 'required' => FALSE,\n\t 'default' => '',\n\t ),\n\t 'action.opt-ins.newsletters' => array(\n\t 'required' => FALSE,\n\t 'default' => '',\n\t ),\n\t 'action.opt-ins.partner' => array(\n\t 'required' => FALSE,\n\t 'default' => '',\n\t ),\n );\n }", "public function check () {\n $modelName = $this->field->model->name;\n $fieldName = $this->field->name;\n $bean = $this->field->model->bean;\n $ctx = @$this->field->constraints['context'];\n $update = $ctx ? strpos(\",,{$ctx->value},\", ',update,') : true;\n return $this->dispatch(\n (!$this->value) || ($this->field && $this->field->value) || ($bean->id && !$update),\n \"{$this->field->title} is required\"\n );\n }", "public function hasRequiredFields(&$failed){\n\t\tforeach($this->_requiredFields as $req){\n\t\t\tif(empty($this->$req)){\n\t\t\t\t$failed[] = $req;\n\t\t\t}\n\t\t}\n\t\treturn empty($failed);\n\t}", "protected function restrict_fields()\n {\n }", "abstract public function validate(array $data, array $fields);", "function validate_form($formtype, $formdata, $required_fields=array())\n{\n\n\t$empty_fields = array();\n\t$bool_result = TRUE;\n\t\t\t\n\tforeach($required_fields AS $required)\n\t{\n\t\tif(strpos($required, '*') !== FALSE){\n\t\t\t#This is a checkbox group\n\t\t\tif(strpos($required, 'CHECKBOXES') !== FALSE)\n\t\t\t{\n\t\t\t\t$field_str = explode('*', $required);\n\t\t\t\tif(empty($formdata[$field_str[0]])){\n\t\t\t\t\tarray_push($empty_fields, $field_str[0]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t#This is a combobox\n\t\t\tif(strpos($required, 'COMBOBOX') !== FALSE)\n\t\t\t{\n\t\t\t\t$field_str = explode('*', $required);\n\t\t\t\tif(count($formdata[$field_str[0]]) == 1){\n\t\t\t\t\tif(empty($formdata[$field_str[0]][0])){\n\t\t\t\t\t\tarray_push($empty_fields, $field_str[0]);\n\t\t\t\t\t}\n\t\t\t\t}elseif(empty($formdata[$field_str[0]])){\n\t\t\t\t\tarray_push($empty_fields, $field_str[0]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t#This is a required row\n\t\t\telse if(strpos($required, 'ROW') !== FALSE)\n\t\t\t{\n\t\t\t\t$row_str = explode('*', $required);\n\t\t\t\t$field_array = explode('<>', $row_str[1]);\n\t\t\t\t$decision = FALSE;\n\t\t\t\t\t\t\n\t\t\t\t$rowcounter = 0;\n\t\t\t\t#Take one row field and use that to check the rest\n\t\t\t\tforeach($formdata[$field_array[0]] AS $col_field)\n\t\t\t\t{\n\t\t\t\t\t$row_decision = TRUE;\n\t\t\t\t\tforeach($field_array AS $row_field){\n\t\t\t\t\t\tif(empty($formdata[$row_field][$rowcounter])){\n\t\t\t\t\t\t\t$row_decision = FALSE;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\tif($row_decision && !empty($col_field)){\n\t\t\t\t\t\t$decision = TRUE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t$rowcounter++;\n\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\tif(!$decision){\n\t\t\t\t\tarray_push($empty_fields, $field_array);\n\t\t\t\t}\n\t\t\t}\n\t\t\t#This is a required radio with other options\n\t\t\telse if(strpos($required, 'RADIO') !== FALSE)\n\t\t\t{\n\t\t\t\t$row_str = explode('*', $required);\n\t\t\t\t\t\t\n\t\t\t\t#The radio is not checked\n\t\t\t\tif(empty($formdata[$row_str[0]])){\n\t\t\t\t\tarray_push($empty_fields, $row_str[0]);\n\t\t\t\t}\n\t\t\t\t#if the radio is checked, check the other required fields\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif($formdata[$row_str[0]] == 'Y'){\n\t\t\t\t\t\t$field_array = explode('<>', $row_str[1]);\n\t\t\t\t\t\t#Remove first RADIO field item which is not needed\n\t\t\t\t\t\tarray_shift($field_array);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tforeach($field_array AS $radio_field)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(empty($formdata[$radio_field])){\n\t\t\t\t\t\t\t\tarray_push($empty_fields, $radio_field);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t#This is ensuring that the fields specified are the same\n\t\t\telse if(strpos($required, 'SAME') !== FALSE)\n\t\t\t{\n\t\t\t\t$row_str = explode('*', $required);\n\t\t\t\t$field_array = explode('<>', $row_str[1]);\n\t\t\t\t\n\t\t\t\tif($formdata[$row_str[0]] != $formdata[$field_array[1]]){\n\t\t\t\t\tarray_push($empty_fields, $row_str[0]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t#This is ensuring that the email is the correct format\n\t\t\telse if(strpos($required, 'EMAILFORMAT') !== FALSE)\n\t\t\t{\n\t\t\t\t$row_str = explode('*', $required);\n\t\t\t\t\n\t\t\t\tif(!is_valid_email($formdata[$row_str[0]]))\n\t\t\t\t{\n\t\t\t\t\tarray_push($empty_fields, $row_str[0]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t#This is ensuring that the number is the correct format\n\t\t\telse if(strpos($required, 'NUMBER') !== FALSE)\n\t\t\t{\n\t\t\t\t$row_str = explode('*', $required);\n\t\t\t\t\n\t\t\t\tif(!is_numeric($formdata[$row_str[0]]))\n\t\t\t\t{\n\t\t\t\t\tarray_push($empty_fields, $row_str[0]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t#This is ensuring that the first field is less than the next field\n\t\t\telse if(strpos($required, 'LESSTHAN') !== FALSE)\n\t\t\t{\n\t\t\t\t$row_str = explode('*', $required);\n\t\t\t\t$field_array = explode('<>', $row_str[1]);\n\t\t\t\t\n\t\t\t\tif(!($formdata[$row_str[0]] < $formdata[$field_array[1]] || $formdata[$row_str[0]] == '' || $formdata[$field_array[1]] == '')){\n\t\t\t\t\tarray_push($empty_fields, $row_str[0]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t#This field should validate code of the financial year :: \n\t\t}\n\t\t\t\t\n\t\t#Is a plain text field or other value field\n\t\telse\n\t\t{\n\t\t\tif(!(!empty($formdata[$required]) || $formdata[$required] == '0')){\n\t\t\t\tarray_push($empty_fields, $required);\n\t\t\t}\n\t\t}\n\t}\n\t\t\n\t\n\t\n\tif(empty($empty_fields)){\n\t\t$bool_result = TRUE;\n\t}else{\n\t\t$bool_result = FALSE;\n\t}\n\t\n\treturn array('bool'=>$bool_result, 'requiredfields'=>$empty_fields);\n\t\t\n}", "abstract protected function fields();", "abstract protected function fields();", "function addRequired($required) {\r\n\r\n\twhile (list($field,$description) = each($required)) {\r\n\t\r\n\t\techo \"document.main.$field.description='$description'; document.main.$field.isRequired=true; \";\r\n\t\t\r\n\t}\r\n\t\r\n}", "public final function verifyOnly($fields){\n\n foreach($fields as $k){\n $this->verifyData($k);\n }//foreach\n\n if(count($this->errors)){\n return false;\n }//if\n\n return true;\n\n }", "abstract protected function fieldValidation($submittedData);", "abstract public function supported_fields();", "function CheckRequired($reqd,$vars,&$missing)\n{\n $bad = false;\n $list = explode(\",\",$reqd);\n for ($ii = 0 ; $ii < count($list) ; $ii++)\n {\n $name = $list[$ii];\n if ($name)\n {\n //\n // field names can be just straight names, or in this\n // format:\n // fieldname:Nice printable name for displaying\n //\n if (($nice_name_pos = strpos($name,\":\")) > 0)\n {\n $nice_name = substr($name,$nice_name_pos + 1);\n $name = substr($name,0,$nice_name_pos);\n }\n else\n $nice_name = $name;\n if (!isset($vars[$name]) || empty($vars[$name]))\n {\n $bad = true;\n $missing .= \"$nice_name\\n\";\n }\n }\n }\n return (!$bad);\n}", "public static function ValidateAll()\n {\n $logger = self::getLogger();\n\n $aErrors = array();\n\n //get list of import handler\n /** @var $oCsv2SqlList TdbPkgCsv2sqlList */\n $oCsv2SqlList = TdbPkgCsv2sqlList::GetList();\n $oCsv2SqlList->GoToStart();\n while ($oListItem = $oCsv2SqlList->Next()) {\n $logger->info('TPkgCsv2SqlManager: Validating '.$oListItem->fieldName);\n $aItemErrors = $oListItem->Validate();\n $aErrors = TPkgCsv2Sql::ArrayConcat($aErrors, $aItemErrors);\n }\n\n return $aErrors;\n }", "public function loadFieldsRegexps()\n {\n // prepare request\n $sth = self::$connection->prepare('SELECT field_name, validator FROM fields ORDER BY field_order ASC');\n // run it\n $sth->execute();\n\n // check if not empty or error\n if ($result = $sth->fetchAll(PDO::FETCH_ASSOC)) {\n // go with foreach create needed structure\n foreach ($result as $field => $val) {\n self::$data[$val['field_name']] = $val['validator'];\n }\n\n // return answer\n return self::$data;\n }\n\n return false;\n }", "function getMandatoryInputFields_() {\n return $this->__inMandatoryFields;\n }", "abstract public function fields();", "function validate() {\n//print \"Calling validate()\";\n\t\t// clear flags\n\t\t$this->fail_validate = 0;\n\t\t$this->fail_require = 0;\n\t\t\n\t\t$msgengine = new ooFormMessages;\n\t\t \n\t// for each of the fields by name, examine values\n\t// of params that exist for that name, if any\n\t\n\t// IMPORTANT change, what we really need to do now that we have a data structure representing the vlaues of form fields, is when a form is submitted, update the field values with the values from the CGI parameters.\n/*\n\nDEFAULTS --> form fields --> CGI PARAMS --> FIELD VALUES --> so that at this point, after submission, the params and field values are in sync, so that if you say $form->field() to the value, it is the same as the param just submitted.\n\nThis may be why FB uses two passes, one to redistribute the parameter values over the corresponding form fields. CGI PARAM -> FIELD VALUE\n\nThen it uses the field values to check against the regular expressions. I think I am still checking against the param and not updating the fields.\n\nWhere do I set the field value to the cgi value?\n\n*/\n\t\n\t// debug\n\t//print \"Fields to validate: \";\n\t//print_r( $this->fields_list );\n\t\n\t foreach ( $this->fields_list as $field_name ) {\n\t\t\n\t \t// debug\n\t\t//if( $this->debug == DEBUG_VERBOSE ) {\n\t\t//print '<pre style=\"border: 1px solid #ccc; background: #eee\">';\n\t\t//print \"Processing Field\\n\";\n\t\t//print \"Field: \" . $field_name .\"<BR>\";\n\t\t//print \"Value: \" . $this->value($field_name) .\"<BR><br>\";\n\t\t//print \"Fields<br>\";\n\t\t//print_r( $this->fields );\n \t\t//print \"</pre>\";\n\t\t//}\n\t\t\n\t\t/* My first way of thinking is to validate the values of CGI parameters. I'm thinking of a firewall, that I want to get the values first and check them. But ooForm is the firewall. So it would not make any difference if all parameters were redistributed to field values now that we keep a data structure of field properties, one of which is the value.\n\t\tThe regexes could be run against the field values instead of the cgi parameter values.\n\t\t*/\n\t\t\n\t\t// get the generic dynamic value for this field\n\t\t// which is either the default stored in props or from cgi\n\t\t//$val = $this->value($fieldname);\n\t\t// look down to validate section for where this really gets used\n\t\t\n\t\t//if( $val == '' ) {\n\t\t// Note, required validation fails unless you check against cgi params, can't use value function becuase it may be sticky or default value, for required, we must check params to see what is being submitted and what is not, because value may be giving us the default value or the cgi value depending on sticky status.\n\n/**\n * If this field is empty, test for required status,\n * otheriwse check for validity.\n *\n * FIXME: I think this should use empty()\n */\n\n\t\tif( $this->params_list[$field_name] == '' ) {\n//\t\tif( empty( $this->params_list[$field_name] ) ) {\n\t\t\n\t\t\t\t//if( $this->debug == DEBUG_VERBOSE ) {\n\t\t\t\t//print \"Param: \" . $field_name .\" is empty<BR>\";\n\t\t\t\t//}\n\t\t\t\t\n\t\t\t// we know the field is empty, check if required\n\t\t\tif(\tin_array($field_name, $this->required_list) ) {\n\t\t\t\n\t\t\t\n\t\t\t\t// set flag\n\t\t\t\t$this->fail_require = 1;\n\t\t\t\n\t\t\t\t// if empty and on required list, field is invalid\n\t\t\t\t$this->fields[$field_name][invalid] = 1;\n\t\t\t\n\t\t\t\t// IMPORTANT: if the intention is to render the form again with fields filled in for correction and error messages beside the fields, then we must store the required errors, not just stop at the first one.\n\t\t\t\t// to prepare for that I will try setting the invalid flag in the stored fields array for this field\n\n\t\t\t\t$this->fields[$field_name][required] = 1;\n\t\t\t\n\t\t\t\t// set the error message for this field\n\t\t\t\n\t\t\t\t// move to messages config\n\t\t\t\t//$temp = \"<span>Please enter a value for the '$field_name' field.</span>\";\n\t\t\t\t//$this->fields[$field_name][error] = $temp\n\n\t\t\t\t//print \"Setting Error Message:\";\n\t\t\t\t//print $msgengine->message('field_required', $this->fields[$field_name][label]);\n\t\t\t\t\n\t\t\t\t$this->fields[$field_name][error] = $msgengine->message('field_required', $this->fields[$field_name][label]);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t// moreover, I suppose you don't need to use this as a flag, you don't need to store failed required status, if you know the field is required, then after validation, you can then check that each required field has a value and compute the intersection with falied validate fields. No flag needs to be set, so what am I doing here?\n\n\t\t\t\t// debug\n\t\t\t\tif( $this->debug == DEBUG_VERBOSE ) {\n\t\t\t\t\tprint \"Parameter \" . $field_name .\" failed required.<BR>\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\n\t\t/*\n\t\t * Validate Fields\n\t\t *\n\t\t */\n\t\t \n\t\t // Note: if a field is empty, we don't check it for validity, we only check non-empty fields for validity, we check empty fields to see if they are required, once that check is done, we don't have to check if valid.\n\t\t\n\t\t/* LOOK HERE! This is where we get the value to validate from the PAREMETER LIST instead of from the field value. This is legacy practice. It should get it from the field value and field values all \"redistributed\" prior to validation.\n\n\t\tStill does not answer where the value is being set.\n\t\t*/\n\t\t\n\t\t// now we get value at top before conditional\n\t\t//$val = $this->params_list[$field_name];\n\t\t\n\t\tif( $this->debug == DEBUG_VERBOSE ) {\n\t\tprint \"Validating \" . $field_name .\"<BR>\";\n\t\tprint \"With Value: \" . $this->value($field_name) .\"<BR>\";\n\t\t}\n\t\t\n\t\t// get regex\n\t\tif( array_key_exists($this->validate_list[$field_name], $this->rules_list) \n\t\t\t&& preg_match('/_[a-zA-Z]+$/', $this->validate_list[$field_name])\n\t\t\t) {\n\t\t\tif( $this->debug == DEBUG_VERBOSE ) {\n\t\t\tprint \"Using rule\";\n\t\t\t}\n\t\t $regex = $this->rules_list[$this->validate_list[$field_name]];\n\t\t } else {\n\t\t\tif( $this->debug == DEBUG_VERBOSE ) {\n\t\t\tprint \"Using user defined rule\";\n\t\t\t}\n\t\t $regex = $this->validate_list[$field_name];\n\t\t }\n\t\t\tif( $regex != '' && (! preg_match( $regex, $this->value($field_name))) )\n\t\t\t{\n\t\t\t// error validation\n\t\t\t$this->fail_validate = 1;\n\t\t\t\t\t\t\n\t\t\t// experimental code to set invalid flag for this field\n\t\t\t$this->fields[$field_name][invalid] = 1;\n\t\t\t// and error message\n\t\t\t//$this->fields[$field_name][error] = $this->messages_list[$field_name];\n// set through class\n\n/**\n * Validate message trumps required message.\n */\n \n// TEMP DISABLED\n$this->fields[$field_name][error] = $msgengine->message('field_invalid', $this->fields[$field_name][label]);\n\t\t\t\n\t\t\t}\n\t\t}\n\t\n\t} // end foreach\n\t\n\t// debug\t\n\t//print \"Fail Validate: \". $this->fail_validate .\"<br>\";;\n\t//print \"Fail Require: \". $this->fail_require .\"<BR><br>\";;\n\t\t\n\t\t\n\tif( $this->fail_validate\n\t|| $this->fail_require ) {\n\t\treturn false;\n\t} else {\n\t\treturn true;\n\t}\n\t\n\t\n}", "public function execute(): bool {\r\n\r\n //Check if validation already executed before\r\n if(null !== $this -> validated) {\r\n return $this -> validated;\r\n }\r\n\r\n $passed = true;\r\n\r\n foreach($this -> fieldCollection as $fieldItem) {\r\n\r\n /** @var CollectionAbstract $fieldItem */\r\n $fieldNames = $fieldItem -> getFieldNames();\r\n $ruleSets = $fieldItem -> getRuleCollection();\r\n $middleware = $this -> getMiddleware($fieldItem);\r\n\r\n foreach($fieldNames as $fieldName) {\r\n \r\n //Find the values for each field in a combine instance and process them\r\n $this -> fillCombineValues($fieldName);\r\n\r\n //Retrieve the value and path for the given field name\r\n $path = $this -> getPath($fieldName);\r\n\r\n foreach($path as $info) {\r\n\r\n //Add the value to the validated data after executing the middleware\r\n if(null !== $info['path']) {\r\n\r\n //Execute middleware\r\n foreach($middleware as $middlewareClass) {\r\n $info['value'] = $this -> executeMiddleware($middlewareClass, $fieldName, $info['value']);\r\n }\r\n\r\n $this -> addValidatedData($info['path'], $fieldName, $info['value'], $fieldItem);\r\n }\r\n\r\n foreach($ruleSets as $ruleSet) {\r\n\r\n /** @var RuleSet $ruleSet */\r\n $class = $ruleSet -> getNamespace();\r\n\r\n /** @var RuleAbstract $rule */\r\n $rule = new $class(...$ruleSet -> getParameters());\r\n $rule -> setValidationData($this -> validationData);\r\n $rule -> setFieldName($fieldName);\r\n\r\n //Set custom message if found\r\n $message = $this -> message -> find($fieldName, $rule -> getName());\r\n\r\n if(null !== $message) {\r\n $rule -> setMessage($message);\r\n }\r\n\r\n $valid = $this -> executeRule($rule, $info['value']);\r\n\r\n //Check if the rule is valid or not\r\n if(false === $valid) {\r\n\r\n $this -> addValidationError($info['path'] ?? [$fieldName], $info['value'], $rule);\r\n $passed = false;\r\n\r\n //Break the loop if bailing is globally enabled\r\n if(true === $fieldItem -> isBail()) {\r\n break;\r\n }\r\n }\r\n\r\n //Break the loop if the rule should bail the rest\r\n if(true === $rule -> isBail()) {\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n $this -> validated = $passed;\r\n return $passed;\r\n }", "public function testHavingRequiredFields($data) {\n $this->assertTrue($this->dataValidationService->hasRequiredFields($data));\n }" ]
[ "0.6557573", "0.6478085", "0.6364737", "0.627126", "0.6181725", "0.6176689", "0.61495155", "0.6127725", "0.61211014", "0.61063164", "0.60976934", "0.6081187", "0.60510814", "0.60347253", "0.6025397", "0.5946796", "0.5916256", "0.58908486", "0.5855788", "0.5837541", "0.58063966", "0.5800821", "0.58003837", "0.5764449", "0.5732759", "0.5693797", "0.56634897", "0.56188893", "0.5612154", "0.5609908", "0.5609475", "0.5607754", "0.55941767", "0.55871284", "0.5584385", "0.5583156", "0.55822664", "0.55259866", "0.5519011", "0.55188006", "0.5487766", "0.54827595", "0.54760873", "0.54754484", "0.54709214", "0.54593456", "0.54524064", "0.54508156", "0.5442268", "0.54370046", "0.5429966", "0.5426719", "0.5423666", "0.54209167", "0.54136693", "0.5412408", "0.5396938", "0.53968525", "0.53946114", "0.53899205", "0.53871083", "0.5386093", "0.5383067", "0.53794074", "0.53758156", "0.53715193", "0.5369863", "0.5364642", "0.53628635", "0.5350132", "0.53499806", "0.5344161", "0.5344018", "0.53432244", "0.53424394", "0.53385425", "0.53367347", "0.53338236", "0.5327526", "0.5324793", "0.53219694", "0.53158796", "0.5311108", "0.5309656", "0.53088003", "0.53083086", "0.5300322", "0.5286974", "0.5286974", "0.52824765", "0.52726775", "0.526625", "0.5264016", "0.5251479", "0.52490145", "0.52486557", "0.52452207", "0.5244611", "0.5236473", "0.52361786", "0.5226978" ]
0.0
-1
Iterates the entities and fills the given data.
public function onSaveProjectFillData( SaveProjectEvent $event, $eventName, EventDispatcherInterface $eventDispatcher ) { $entities = $event->getEntities(); $data = $event->getData(); $fields = $event->getFieldList(); // iterate each entity foreach ($entities as $entity) { $currentData = $data; foreach ($currentData as $key => $datum) { $setter = 'set' . ucfirst(str_replace('_', '', $key)); // set the value if it belongs in this entity if (method_exists($entity, $setter)) { $currentField = $fields[$key]; if ($currentField instanceof C4GBrickField) { $value = $currentField->createFieldData($currentData); $entity->$setter($value); } } } } $event->setEntities($entities); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function fillEntity(array $data)\n {\n $this->entity->setData($data);\n }", "public function fillFromArray($entity, $data) {\n $this->_fillFromArray($entity, $data);\n }", "public function populateEntity($data = null) {\n //Preenchendo a entity com os dados novos.\n if ($data) {\n foreach ($data as $key => $value) {\n if (isset($this->entity[$key]))\n $this->entity[$key]['value'] = $value;\n }\n }\n\n // Se todas as chaves primarias tiverem valor, pega os valores de acordo com as chaves primarias.\n if ($this->checkPkValues()) {\n\n $entityValuesBD = $this->getByValues($this->getPkValues());\n // Se tiver valores no banco de acordo de acordo com as chaves primarias ele preenche a entity com esses dados.\n if ($entityValuesBD) {\n foreach ($entityValuesBD as $key => $value) {\n if (isset($this->entity[$key]) && !empty($value))\n $this->entity[$key]['value'] = $value;\n }\n }\n }\n\n //Preenchendo a entity com os dados novos.\n if ($data) {\n foreach ($data as $key => $value) {\n if (isset($this->entity[$key]))\n $this->entity[$key]['value'] = $value;\n }\n }\n }", "protected function _fillFromArray($entity, $data)\n { \n \n if ($data) {\n \n foreach ($data as $key => $value) {\n if (!is_null($value)){\n if (is_array($value)) {\n $className = 'MercadoPago\\\\' . $this->_camelize($key);\n if (class_exists($className, true)) {\n $entity->_setValue($key, new $className, false);\n $entity->_fillFromArray($this->{$key}, $value);\n } else {\n $entity->_setValue($key, json_decode(json_encode($value)), false);\n }\n continue;\n }\n $entity->_setValue($key, $value, false);\n }\n }\n }\n }", "public function withData(iterable $data): EntityInterface;", "public function withMetaData(iterable $data): EntityInterface;", "abstract protected function prepareEntity(/*array*/ $entity_data);", "public function withAddedMetaData(iterable $data): EntityInterface;", "public function patchEntities(iterable $entities, array $data, array $options = []): array;", "public function hydrate($data){\n foreach ($data as $key => $value){\n $method = 'set'.ucfirst($key);\n \n if (method_exists($this, $method)){\n $this->$method($value);\n }\n }\n }", "protected function fillFromAPI($entity) {\n $this->products = [];\n\n // Parse the products from the data\n foreach ($entity->details as $product) {\n $this->addProduct(new InvoiceProduct($product, true));\n }\n\n // unset the entity-details\n unset($entity->details);\n\n // fill the entity with results from the API-response\n parent::fillFromAPI($entity);\n }", "public function setAllData($data)\n {\n \n foreach ($data as $key => $value) {\n $this->setData($key, $value);\n }\n \n }", "public function hydrate($data) {\n foreach ($data as $key => $value) {\n $method = 'set' . ucfirst($key);\n if(!isset($value)){\n $v = null;\n }else{\n $v = $value;\n }\n if (method_exists($this, $method)) {\n $this -> $method($v);\n }\n }\n\t}", "public function patchEntities(iterable $entities, array $data, array $options = []): array\n {\n $marshaller = $this->marshaller();\n\n return $marshaller->mergeMany($entities, $data, $options);\n }", "public function populate($data)\n {\n $set_data = [];\n\n foreach ((array)$data as $row_key => $row_value) {\n if (is_array($row_value) && isset($this->groups[$row_key])) {\n foreach ($row_value as $row_subkey => $row_subvalue) {\n $set_data[$row_key . '_' . $row_subkey] = $row_subvalue;\n }\n } else {\n $set_data[$row_key] = $row_value;\n }\n }\n\n foreach ($set_data as $field_name => $field_value) {\n if (isset($this->fields[$field_name])) {\n $field = $this->fields[$field_name];\n $field->setValue($field_value);\n }\n }\n }", "public function setData($data) {\n if (empty($data)) {\n return;\n }\n if (is_object($data) || is_array($data)) {\n foreach ($this->_data as $field => $value) {\n if (array_key_exists($field, $data)) {\n $temp_val = $data[$field];\n } else {\n $temp_val = $value;\n }\n $this->__set($field, $temp_val);\n }\n } else {\n throw new Exception('The entity \"' . get_class($this) .\n '\" must be created by an array or object.');\n }\n }", "public function populate(array $data);", "public static function fill($data=[])\n {\n if(!empty($data)){\n foreach ($data as $item){\n self::add($item);\n }\n }\n\n }", "public function populateValues($data)\n {\n if (!is_array($data) && !$data instanceof Traversable) {\n throw new Exception\\InvalidArgumentException(sprintf(\n '%s expects an array or Traversable set of data; received \"%s\"',\n __METHOD__,\n (is_object($data) ? get_class($data) : gettype($data))\n ));\n }\n\n foreach ($data as $name => $value) {\n if (!$this->has($name)) {\n continue;\n }\n\n $element = $this->get($name);\n if ($element instanceof FieldsetInterface && is_array($value)) {\n $element->populateValues($value);\n continue;\n }\n\n $element->setAttribute('value', $value);\n }\n }", "public static function arrayToEntity(OrmEntity $entity, $data) {\n\t\tforeach($entity->getFields() as $field) {\n\t\t\tif(isset($data[$field->getName()])) {\n\t\t\t\t$entity->set($field->getName(), $data[$field->getName()]);\n\t\t\t}\n\t\t}\n\t}", "public function updateEntityData(EntityData $entityData);", "public function hydrate(array $data){ \n \tforeach ($data as $key => $value){\n \t\t$method = 'set'.ucfirst($key); \n \tif (method_exists($this, $method)){\n \t$this->$method($value);\n }\n }\n\t}", "public function testPutForAllData()\n {\n $dataLoader = $this->getDataLoader();\n $all = $dataLoader->getAll();\n $faker = $this->getFaker();\n foreach ($all as $data) {\n $data['username'] = $faker->text(50);\n unset($data['passwordHash']);\n\n $this->putTest($data, $data, $data['user']);\n }\n }", "public function buildAndFetchAll( $data, $arrayIndex=null );", "public static function setMany($data)\n {\n foreach ($data as $key => $value) {\n if ($key === 'translatable') {\n self::setTranslatable($value);\n } else {\n if (is_array($value))\n $value = json_encode($value);\n self::updateOrCreate(['key' => $key], ['plain_value' => $value]);\n }\n }\n }", "private static function loadEntityList()\n {\n if (!isset(self::$_data[self::KEY_ENTITY_LIST]))\n {\n $_adapter = self::getZendDbAdapter(TRUE);\n $_dbSelect = $_adapter->select()\n ->from(\"c_entity\", array(\"entity_id\" => \"id\", \"entity_name\" => \"name\", \"entity_label\" => \"label\"))\n ->join(\"c_entity_field\", \"c_entity_field.entity_id = c_entity.id\", array(\"field_id\" => \"id\", \"field_name\" => \"name\", \"field_label\" => \"label\"))\n ->join(\"c_entity_option\", \"c_entity_option.field_id = c_entity_field.id\", array(\"option_id\" => \"id\", \"option_value\" => \"value\", \"option_label\" => \"label\"))\n ->order(\"c_entity.id\")\n ->order(\"c_entity_field.id\")\n ->order(\"c_entity_option.label\")\n ;\n $_recordList = $_adapter->fetchAll($_dbSelect);\n\n $_data = array();\n foreach ($_recordList as $_record)\n {\n $_eName = $_record[\"entity_name\"];\n $_fName = $_record[\"field_name\"];\n $_oName = $_record[\"option_value\"];\n if (!isset($_data[$_eName]))\n {\n $_data[$_eName] = array(\n \"id\" => $_record[\"entity_id\"],\n \"label\" => $_record[\"entity_label\"],\n \"field_list\" => array()\n );\n }\n if (!isset($_data[$_eName][\"field_list\"][$_fName]))\n {\n $_data[$_eName][\"field_list\"][$_fName] = array(\n \"id\" => $_record[\"field_id\"],\n \"label\" => $_record[\"field_label\"],\n \"option_list\" => array()\n );\n }\n\n $_data[$_eName][\"field_list\"][$_fName][\"option_list\"][$_oName] = array(\n \"id\" => $_record[\"option_id\"],\n \"label\" => $_record[\"option_label\"]\n );\n }\n self::$_data[self::KEY_ENTITY_LIST] = $_data;\n }\n }", "protected function setEntities(iterable $entities): void\n {\n $this->entities = i\\iterable_to_array($entities, true);\n }", "public function hydrate($data)\n\t{\n\t\tforeach ($data as $attribut => $value)\n\t\t{\n\t\t\t$methode = 'set'.ucfirst($attribut);\n\t\t\tif (is_callable([$this, $methode]))\n\t\t\t{\n\t\t\t\t$this->$methode($value);\n\t\t\t}\n\t\t}\n\t}", "public function testGetAll() {\n\t\t$class = get_class($this->entity);\n\t\t$array = $this->entity->toArray(true);\n\t\t$filled = $this->fillArray($array);\n\t\t$entity = new $class($filled);\n\t\t\n\t\t$result = array();\n\t\tforeach ($filled as $attr => $val){\n\t\t\t$entity->{'set' . $attr}($val);\n\t\t\t$result[$attr] = $entity->{'get' . $attr}();\n\t\t}\n\t\t\n\t\t$this->assertEquals($filled, $result);\n\t}", "protected function saveAndReplaceEntity()\n {\n $behavior = $this->getBehavior();\n $listId = [];\n while ($bunch = $this->_dataSourceModel->getNextBunch()) {\n $entityList = [];\n foreach ($bunch as $rowNum => $rowData) {\n if (!$this->validateRow($rowData, $rowNum)) {\n $this->addRowError(ValidatorInterface::ERROR_ID_IS_EMPTY, $rowNum);\n continue;\n }\n if ($this->getErrorAggregator()->hasToBeTerminated()) {\n $this->getErrorAggregator()->addRowToSkip($rowNum);\n continue;\n }\n $taskId= $rowData[self::TASK_ID];\n $listId[] = $taskId;\n $entityList[$taskId][] = [\n self::TASK_ID => $rowData[self::TASK_ID ],\n self::TASK_NAME => $rowData[self::TASK_NAME ],\n self::TASK_CONTENT => $rowData[self::TASK_CONTENT],\n self::START_DATE => $rowData[self::START_DATE ],\n self::END_DATE => $rowData[self::END_DATE ],\n self::STATUS => $rowData[self::STATUS ],\n self::ASSIGN_TO => $rowData[self::ASSIGN_TO ],\n self::PROGRESS => $rowData[self::PROGRESS ],\n self::DESCRIPTION => $rowData[self::DESCRIPTION ],\n self::PRIORITY => $rowData[self::PRIORITY ],\n self::CREATED_AT => $rowData[self::CREATED_AT ],\n self::UPDATED_AT => $rowData[self::UPDATED_AT ],\n self::USER_CREATED => $rowData[self::USER_CREATED],\n self::USER_UPDATED => $rowData[self::USER_UPDATED],\n ];\n }\n\n if (Import::BEHAVIOR_REPLACE == $behavior) {\n if ($listId) {\n if ($this->deleteEntityFinish(array_unique($listId), self::TABLE_ENTITY)) {\n $this->saveEntityFinish($entityList, self::TABLE_ENTITY);\n }\n }\n } elseif (Import::BEHAVIOR_APPEND == $behavior) {\n $this->saveEntityFinish($entityList, self::TABLE_ENTITY);\n }\n }\n\n return $this;\n }", "public function fill($data);", "abstract public function hydrate($data);", "public function testBasicPopulate() {\n\t\t$class = get_class($this->entity);\n\t\t$array = $this->entity->toArray(true);\n\t\t$filled = $this->fillArray($array);\n\n\t\t$entity = new $class($filled);\n\t\t$result = $entity->toArray();\n\t\t\n\t\t$this->assertEquals($filled, $result);\n\t}", "function prepareData(){\n $this->ref = array();\n foreach($this->getIterator() as $junk=>$item){\n // current values\n $id = $item[$this->id_field];\n \n // save item\n $this->items[$id] = $item;\n \n // save relation\n if(isset($item[$this->parent_id_field])) {\n $this->ref[$item[$this->parent_id_field]][] = $id;\n } else {\n $this->ref[undefined][] = $id;\n }\n }\n }", "public function fillIngredients()\n {\n $ingredients_data = $this->_db()->select('select id_ingredient, base_quantity from product_ingredients where id_product=?d', $this->id);\n foreach ($ingredients_data as $ing)\n {\n $this->ingredients[$ing['id_ingredient']] = new Model_Product($ing['id_ingredient']);\n $this->ingredients[$ing['id_ingredient']]->base_quantity = $ing['base_quantity'];\n $this->ingredients[$ing['id_ingredient']]->fillIngredients();\n }\n }", "public function ingest(array $data)\n {\n foreach ($data as $item) {\n if (!$item instanceof InvoiceEntry) {\n list($invalidClass, $expectedClass) = [get_class($item), InvoiceEntry::class];\n throw new \\InvalidArgumentException(\n \"Invalid entity class provided: {$invalidClass}. Expected: {$expectedClass}\"\n );\n }\n }\n\n $this->dataStorage = array_merge($this->dataStorage, $data);\n }", "abstract protected function getEntitiesToSync();", "public function setFromArray(array $data): AbstractEntity {\n\n foreach ($data as $property => $value) {\n\n if(true === is_array($value)) {\n $value = filter_var_array($value, FILTER_SANITIZE_SPECIAL_CHARS);\n } else {\n $value = filter_input(INPUT_POST, $property, FILTER_SANITIZE_SPECIAL_CHARS);\n }\n $this->vars[$property] = $value;\n }\n return $this;\n }", "public function posts()\n {\n $source = $this->source[ $this->cm->cena ];\n $data = array();\n foreach( $source as $entityName => $types ) {\n foreach( $types as $type => $ids ) {\n foreach( $ids as $id => $info ) {\n $cenaID = $this->cm->construct->compose( $entityName, $type, $id );\n $data[ $cenaID ] = $info;\n if( $type == EntityAbstract::_ID_TYPE_VIRTUAL && $id > EntityAbstract::$_id_for_new ) {\n // keep up with the largest *new* id.\n EntityAbstract::$_id_for_new = $id+1;\n }\n }\n }\n }\n return $this->process( $data );\n }", "protected function applyReplace(): void {\n\t\t$entity_types = $this->getRegisteredEntityTypes();\n\t\t$tag_names = $this->getTagNames();\n\t\t$to_tag = $this->to_tag;\n\t\t\n\t\tif (empty($entity_types) || empty($tag_names) || elgg_is_empty($to_tag)) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$batch = elgg_get_entities([\n\t\t\t'type_subtype_pairs' => $entity_types,\n\t\t\t'metadata_names' => $tag_names,\n\t\t\t'metadata_value' => $this->from_tag,\n\t\t\t'metadata_case_sensitive' => false,\n\t\t\t'limit' => false,\n\t\t\t'batch' => true,\n\t\t\t'batch_inc_offset' => false,\n\t\t]);\n\t\t\n\t\t/* @var $entity \\ElggEntity */\n\t\tforeach ($batch as $entity) {\n\t\t\t// check all tag fields\n\t\t\tforeach ($tag_names as $tag_name) {\n\t\t\t\t$value = $entity->$tag_name;\n\t\t\t\tif (elgg_is_empty($value)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!is_array($value)) {\n\t\t\t\t\t$value = [$value];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$found = false;\n\t\t\t\t$add = true;\n\t\t\t\t\n\t\t\t\tforeach ($value as $index => $v) {\n\t\t\t\t\tif (strtolower($v) === $this->from_tag) {\n\t\t\t\t\t\t$found = true;\n\t\t\t\t\t\tunset($value[$index]);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ($v === $to_tag) {\n\t\t\t\t\t\t// found replacement value, no need to add\n\t\t\t\t\t\t$add = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!$found) {\n\t\t\t\t\t// this field doesn't contain the original value\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// only add new value if doesn't already contain this\n\t\t\t\tif ($add) {\n\t\t\t\t\t$value[] = $to_tag;\n\t\t\t\t\t\n\t\t\t\t\tif (($tag_name === 'tags') && tag_tools_is_notification_entity($entity->guid)) {\n\t\t\t\t\t\t// set tag as notified\n\t\t\t\t\t\ttag_tools_add_sent_tags($entity, [$to_tag]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// store new value\n\t\t\t\t$entity->$tag_name = $value;\n\t\t\t\t\n\t\t\t\t// let system know entity has been updated\n\t\t\t\t$entity->save();\n\t\t\t}\n\t\t}\n\t}", "abstract public function populate();", "public function __construct(array $entityData = [])\n {\n foreach ($entityData as $field => $value) {\n if (property_exists($this, $field)) {\n $method = 'set' . ucfirst($field);\n $this->$method($value);\n }\n }\n }", "public function hydrate($datas) {\n foreach($datas as $field => $value) {\n\n $elements = explode('_', $field); // array(0 => 'autor', 1 => 'id');\n\n $method = \"set\";\n foreach($elements as $e){\n $method .= ucfirst($e);\n }\n if(method_exists($this, $method)) {\n $this->$method($value);\n }\n }\n }", "private function setConfigEntities()\n {\n foreach ($this->entityMethods as $entity => $methodName) {\n $this->openEntity($entity);\n foreach ($this->generator->types as $objName => $objData) {\n if (in_array($objName, $this->generator->customTypes) === false) { // if this is not a custom type generate resources\n $excluded = false;\n foreach ($this->generator->excludedSubtypes as $type) {\n if (strpos($objName, $type) !== false) {\n $excluded = true;\n }\n }\n // if the type is among excluded - continue\n if ($excluded === true) {\n continue;\n }\n $this->setOptions($objName, $methodName);\n }\n }\n $this->closeEntities();\n }\n }", "private function _populate()\n {\n // populate Rgion\n foreach ($this->regionData as $region)\n {\n $this->region->create(\n $region['name'],\n $region['promotor_ID']\n );\n }\n \n // Populate branch\n foreach ($this->branchData as $branch)\n {\n $this->branch->create(\n $branch['name'],\n $branch['region_ID'],\n $branch['promotor_ID']\n );\n }\n\n // Popular Dealer \n foreach ($this->dealerData as $dealer)\n { \n $data = [\n 'region_ID' => $dealer['region_ID'],\n 'branch_ID' => $dealer['branch_ID'],\n 'dealer_account_ID' => $dealer['dealer_account_ID'],\n 'dealer_channel_ID' => $dealer['dealer_channel_ID'],\n 'dealer_type_ID' => $dealer['dealer_type_ID'],\n 'code' => $dealer['code'],\n 'name' => $dealer['name'],\n 'company' => $dealer['company'],\n 'address' => $dealer['address']\n ];\n\n $this->dealer->create($data);\n }\n\n foreach ($this->dealerChannelData as $dealerChannel)\n {\n $this->dealerChannel->create(\n $dealerChannel['name']\n );\n }\n\n // Populate dealer account\n foreach ($this->dealerAccountData as $dealerAccount)\n {\n $this->dealerAccount->create(\n $dealerAccount['name'],\n $dealerAccount['branch_ID'],\n $dealerAccount['promotor_ID']\n );\n }\n\n //Populate token\n foreach ($this->tokenData as $token)\n {\n $this->token->create(\n $token['dashboard_account_ID'],\n $token['token']\n );\n }\n\n // Populate promotor\n foreach ($this->promotorData as $promotor)\n { \n $this->promotor->create(\n $promotor['dealer_ID'],\n $promotor['phone'],\n $promotor['password'],\n $promotor['name'],\n $promotor['gender'],\n $promotor['type'],\n $promotor['parent_ID']\n );\n }\n\n // Populate report\n foreach ($this->reportData as $data)\n {\n return $this->report->create($data);\n\n }\n \n // Populate dashboard \n $accountIDs = [];\n\n foreach ($this->accountData as $account)\n {\n $accountIDs[] = $this->account->create(\n $account['email'],\n $account['name'],\n $account['last_access']\n );\n }\n\n return $accountIDs;\n }", "public function buildAndFetch( $data );", "protected function hydrate($dataSet)\r\n {\r\n $this->id = $dataSet['id'];\r\n $this->label = $dataSet['label'];\r\n $this->description = $dataSet['description'];\r\n $this->contenu = $dataSet['contenu'];\r\n }", "public function hydrate($data) {\r\n $this->orm->hydrate($data)->force_all_dirty();\r\n }", "public function newEntities(array $data, array $options = []): array;", "public function hydrate($dataSet)\r\n {\r\n $this->id = $dataSet['id'];\r\n $this->nom = $dataSet['nom'];\r\n $this->archi = $dataSet['archi'];\r\n $this->version = $dataSet['version'];\r\n $this->ihm = $dataSet['ihm'];\r\n $this->visible = $dataSet['visible'];\r\n }", "public function createData(EntityManager $em);", "protected function processEntityDataCollection(SyncState $state, array $entitiesData)\n {\n if (count($entitiesData) == 0) {\n return;\n }\n\n foreach ($entitiesData as $entityData) {\n $resolved = true;\n\n // If an entity requires dependencies, initiate dependency resolving\n // Depending on the configuration it will be resolved immediately or delayed\n if ($unresolvedDependencies = $entityData->getUnresolvedDependencies()) {\n $resolved = $this->processEntityDataCollectionDependencies($entityData, $unresolvedDependencies);\n }\n\n if (true == $resolved) {\n // Transform the entity data into a real entity\n $localEntity = $this->transformEntityData($entityData);\n } else {\n // Add to queue\n $this->gateway->updateEntityData($entityData);\n }\n }\n\n // Get the last entity\n $lastEntityData = end($entitiesData);\n\n $state->setLastValue($lastEntityData->getEntityId()); // TODO: use config\n }", "protected function hydrate($data){\n\n foreach($data as $field => $value){\n\n //field = marque_id\n //fieldarray = ['marque','id']\n $fieldArray = explode(\"_\", $field);\n\n if(isset($fieldArray[1]) && $fieldArray[1] == \"id\"){\n $manName = ucfirst($fieldArray[0]).\"Manager\";\n require_once(\"./model/managers/\".$manName.\".php\");\n $man = new $manName();\n $value = $man->findOneById($value);\n }\n \n $method = \"set\".ucfirst($fieldArray[0]);\n if(method_exists($this, $method)){\n $this->$method($value);\n }\n\n }\n }", "public function hydrate(array $data)\n {\n foreach ($data as $key => $value) {\n $method = 'set'.ucfirst($key);\n\n if (method_exists($this, $method)) {\n $this->$method($value);\n }\n }\n }", "public function import()\n {\n // Reorder importers\n usort($this->entityImporterMappings, function ($a, $b) {\n return $a[ORDER] <=> $b[ORDER];\n });\n\n // Import each entity type in turn\n foreach ($this->entityImporterMappings as $entityImporterMapping) {\n $files = $this->directoryReader->getFileNameMappings($entityImporterMapping[self::DIRECTORY]);\n foreach ($files as $filename => $slug) {\n $fileContents = file_get_contents($filename);\n $entityData = json_decode($fileContents, true);\n $entityImporterMapping[self::IMPORTER]->importEntity($slug, $entityData);\n }\n }\n }", "public function hydrate(array $data)\n {\n foreach ($data as $key => $value) {\n $method = 'set' . str_replace(\"_\", \"\", ucwords($key, \"_\"));\n if (method_exists($this, $method)) {\n $this->$method($value);\n }\n }\n }", "public function populate($data = array())\n {\n $this->id = $data['id'];\n $this->nome = $data['nome'];\n $date = new \\DateTime(\"now America/Sao_Paulo\");\n $this->data_cadastro = $date;\n $this->data_alteracao = $data['data_alteracao'];\n \n }", "protected function setupTestEntities() {\n // Create 4 entities with name1 and 3 entities with name2.\n $entity_1 = [\n 'name' => 'name1',\n ];\n\n $this->storage->create($entity_1)->save();\n $this->storage->create($entity_1)->save();\n $this->storage->create($entity_1)->save();\n $this->storage->create($entity_1)->save();\n\n $entity_2 = [\n 'name' => 'name2',\n ];\n $this->storage->create($entity_2)->save();\n $this->storage->create($entity_2)->save();\n $this->storage->create($entity_2)->save();\n }", "public function setValues($values)\n {\n foreach ($this->entities as $entity) \n {\n $entity->setValues($values);\n }\n }", "public final function __fromArray($data)\n {\n foreach ($data as $k => $v)\n {\n if ($k!=self::CLASS_FIELD_KEY)\n {\n //codice pronto da usare per la trasformazione degli oggetti in cascata.\n /* \n //associazione tramite chiave esterna\n if (ActiveRecord::isValidArrayDO($v))\n {\n $this->{$k} = ActiveRecord::fromArray($v);\n }\n else\n if (is_array($v)) //associazione tramite tabella esterna\n {\n $result = array();\n foreach ($v as $nes_key => $nes_value)\n {\n $result[] = ActiveRecord::fromArray($nes_value);\n }\n $this->{$k} = $result;\n }\n else*/\n $this->{$k} = $v;\n }\n }\n }", "protected function importData()\n\t{\n\t\tinclude_once \"Services/ADN/AD/classes/class.adnPersonalData.php\";\n\t\t$data = adnPersonalData::getData($this->filter, $this->mode);\n\t\t$this->setData($data);\n\t\t//$this->setMaxCount(sizeof($users));\n\t}", "protected function _populateMetas()\n {\n $nodes = $this->_catalog->getModel('nodes');\n $metas = $this->_catalog->getModel('metas');\n $collection = $nodes->fetchAll();\n foreach ($collection as $node) {\n $meta = $metas->fetchNew();\n $meta->node_id = $node->id;\n $meta->save();\n }\n }", "function fillQuestion($data)\r\n {\r\n\tfor( $i=0; $i<$data['count']; $i++ ){\r\n\t\t$data[$i]['Question'] = $this->findAll($conditions='id='.$data[$i]['SurveyQuestion']['question_id'], $fields=\"prompt, type\");\r\n\t\t$data[$i]['Question'] = $data[$i]['Question'][0]['Question'];\r\n\t\t$data[$i]['Question']['number'] = $data[$i]['SurveyQuestion']['number'];\r\n\t\t$data[$i]['Question']['id'] = $data[$i]['SurveyQuestion']['question_id'];\r\n\t\t$data[$i]['Question']['sq_id'] = $data[$i]['SurveyQuestion']['id'];\r\n\t\tunset($data[$i]['SurveyQuestion']);\r\n\t}\r\n\r\n\treturn $data;\r\n }", "public function populate($data = array())\n {\n $this->id = $data['id'];\n $this->img = $data['img'];\n $this->comment = $data['comment'];\n $this->date = $data['date'];\n $this->idStatus = $data['idStatus'];\n $this->idUser = $data['idUser'];\n }", "private function _initEntitySet($entities) {\n foreach ($entities as $key => $entity) {\n if (!strpos(get_class($entity), $this->_className)) {\n $badClass = get_class($entity);\n $message = \"All entities stored in a StackLayer must be of \"\n . \"the same class. $this->_className was being used \"\n . \"when $badClass was encountered.\";\n throw new BadClassConfigurationException($message);\n }\n if (!isset($entity->id)) {\n $message = \"StackLayer expects to find \\$entity->id. This \"\n . \"property was missing on array element $key. Did you \"\n\t\t\t\t\t\t. \"forget to name a layer when doing loadStack?\";\n throw new BadClassConfigurationException($message);\n }\n $this->_data[$entity->id] = $entity;\n }\n }", "protected function _processValues($entity, array $options = [])\n {\n $obData = Connect::newArangoDocument();\n foreach ($entity as $key => $value) {\n $obData->set($key, $value);\n }\n return $obData;\n }", "public function build_data() {\n $this->total_collection = (int)count($this->feeds);\n $redis_total_set = (int)$this->redis->hget($this->key_name, 'total:set'); \n \n $key = $this->redis->hgetall($this->key_name);\n $hosted_feeds = $this->group_and_build(); \n\n if(!$key || $redis_total_set !== $this->total_collection) {\n //echo \"Processing: Insert Data into Redis\";\n //insert data into redis\n $this->redis->hset($this->key_name, 'total:set', $this->total_collection);\n $page = 0;\n foreach($hosted_feeds as $feed_group => $feed_list) {\n $page_number = ++$page;\n $spring_data = Array($feed_group => $feed_list);\n $this->redis->hset($this->key_name, \"set:$page_number\", json_encode($spring_data));\n $spring_data = Null;\n }\n } \n \n }", "abstract protected function loadData(ObjectManager $em);", "public function setUp()\n {\n foreach ($this->data as $row) {\n $this->table->insert($row);\n }\n\n parent::setUp();\n\n }", "public function load_data( $data ) {\r\n foreach ( $data as $key => $value ) {\r\n $this->$key = $value;\r\n }\r\n }", "function loadData()\n\t{\n\t\tstatic $data;\n\t\t\n\t\tif(!$data)\n\t\t\t$data=self::getData();\n\n\t\tif(isset($data[$this->id]))\n\t\t\t$this->setValues((array)$data[$this->id]);\t\t\t\n\t}", "protected function processAddressEntity($data)\n {\n if (isset($data['addresses']) && is_array($data['addresses'])) {\n\n $properties = $this->getEntityPropertyNames();\n\n foreach ($data['addresses'] as $key => $addressDetails) {\n if (!in_array($key, $properties)) {\n continue;\n }\n\n $addressService = $this->getService('Address');\n\n // If we are updating an address\n if (isset($addressDetails['id']) && !empty($addressDetails['id'])) {\n $addressService->update($addressDetails['id'], $addressDetails);\n\n $data[$key] = $addressDetails['id'];\n } else {\n $data[$key] = $addressService->create($addressDetails);\n }\n }\n\n unset($data['addresses']);\n }\n\n return $data;\n }", "public function insertEntities(array $input): void;", "public static function updateEntityFromArray($entity, array $data)\n {\n foreach ($data as $field => $value) {\n $method = 'set' . self::formatStringToMethodName($field);\n if (method_exists($entity, $method)) {\n $entity->$method($value);\n }\n }\n\n return $entity;\n }", "protected function importData()\n\t{\n\t\tinclude_once \"Services/ADN/AD/classes/class.adnCharacter.php\";\n\t\t$characters = adnCharacter::getAllCharacters($this->wmo_id);\n\n\t\t$this->setData($characters);\n\t\t$this->setMaxCount(sizeof($characters));\n\t}", "protected function processData($data)\n {\n // reuse the existing collection to optimize for Doctrine\n if ($data instanceof Collection) {\n $currentData = $this->getData();\n\n if (!$currentData) {\n $currentData = $data;\n } else if (count($data) === 0) {\n $currentData->clear();\n } else {\n // merge $data into $currentData\n foreach ($currentData as $entity) {\n if (!$data->contains($entity)) {\n $currentData->removeElement($entity);\n } else {\n $data->removeElement($entity);\n }\n }\n\n foreach ($data as $entity) {\n $currentData->add($entity);\n }\n }\n\n return $currentData;\n }\n\n return $data;\n }", "public function loadData($data)\n {\n foreach ($data as $key => $value) {\n if (property_exists($this, $key)) {\n $this->{$key} = $value;\n }\n }\n }", "public function populate($data = array()) {\r\n $this->_id = $data['id'];\r\n $this->_artist = $data['artist'];\r\n $this->_title = $data['title'];\r\n }", "public function fill($data)\n {\n }", "public function run()\n {\n $alphabet = ['а', 'б', 'в', 'г', 'д'];\n\n for($i = 0; $i <= 11; $i++) {\n for($j = 0; $j < 4; $j++) {\n $class = new ClassEntity();\n $class->letter = $alphabet[$j];\n $class->grade = $i + 1;\n $class->save();\n }\n }\n }", "public function set_all_data($data)\n\t{\n\t\t$this->_data = $data;\n\t}", "public function populateCollection() {\n\t\tif(empty($this->rawData)) {\n\t\t\treturn;\n\t\t}\n\n\t\tforeach($this->rawData as $item) {\n\t\t\t$feedItem = new TwitterItemAdapter($item);\n\t\t\t$this->feed->addItem($feedItem);\n\t\t}\n\t}", "protected function installEntities()\n {\n $sm = \\Core::make('Concrete\\Core\\Database\\DatabaseStructureManager');\n $entities = array('Concrete\\Core\\Entity\\File\\File');\n\n // Now we fill the rest of the class names recursively from the entity directory, since it's\n // entirely new\n $entityPath = DIR_BASE_CORE . '/' . DIRNAME_CLASSES . '/Entity';\n $iterator = new \\RecursiveIteratorIterator(\n new \\RecursiveDirectoryIterator($entityPath, \\FilesystemIterator::SKIP_DOTS),\n \\RecursiveIteratorIterator::CHILD_FIRST\n );\n\n foreach ($iterator as $path) {\n if (!$path->isDir()) {\n $path = $path->__toString();\n if (substr(basename($path), 0, 1) != '.') {\n $path = str_replace(array($entityPath, '.php'), '', $path);\n $entities[] = 'Concrete\\Core\\Entity' . str_replace('/', '\\\\', $path);\n }\n }\n }\n\n $em = $this->connection->getEntityManager();\n $cmf = $em->getMetadataFactory();\n $metadatas = array();\n foreach ($cmf->getAllMetadata() as $meta) {\n if (in_array($meta->getName(), $entities)) {\n $metadatas[] = $meta;\n }\n }\n\n $sm->installDatabaseFor($metadatas);\n }", "protected function setValues($entity, array $data, array $properties = NULL) {\n $entityService = $this->get('os2display.entity_service');\n $entityService->setValues($entity, $data, $properties);\n }", "public function loadData($data)\n {\n foreach ($data as $key => $value) {\n if(property_exists($this, $key))\n {\n $this->{$key} = $value;\n }\n }\n }", "public function populate($data = array())\n {\n $this->id = $data['id'];\n $this->name = $data['name'];\n $this->dated_at = isset($data['dated_at']) ? new \\DateTime($data['dated_at']) : null;\n $this->year = $data['year'];\n $this->weekday = $data['weekday'];\n $this->type = $data['type'];\n $this->constant = (bool) $data['constant'];\n }", "public function exchangeArray(array $data = array())\n\t{\n\t\t// Objetos adicionadas a esta classe\n\t\tforeach ($this as $entity) {\n\t\t\tif ($entity instanceof AbstractEntity)\n\t\t\t{\n\t\t\t\t// Lista de resultados\n\t\t\t\tforeach ($data as $key => $value) {\n\t\t\t\t\n\t\t\t\t\t// Nome do setter correspondente a coluna\n\t\t\t\t\t$setter = $entity->setterName($key);\n\t\t\t\t\t// Nome do setter em caso de coluna tratada\n\t\t\t\t\t$entityClassName = $this->getSimpleClassName(get_class($entity));\n\t\t\t\t\t$treatAttrName = preg_replace(\"/^\".$entityClassName.\"_/\", \"\", $key);\n\t\t\t\t\t$newSetter = $entity->setterName($treatAttrName);\n\t\t\t\t\t// Se for um campo tratado nometabela_coluna ex.: department_status\n\t\t\t\t\t// PS.: Este nome eh baseado no nome da classe da entidade, ou seja, \n\t\t\t\t\t// para nomes compostos (ex.: department_discharge) deve ser usado o\n\t\t\t\t\t// nome da classe da entidade que ele pertence (departmentdischarge)\n\t\t\t\t\tif ($key !== $treatAttrName && method_exists($entity, $newSetter)) {\n\t\t\t\t\t\t$entity->$newSetter($value);\n\t\t\t\t\t\t\n\t\t\t\t\t\tunset($data[$key]);\n\t\t\t\t\t\t\n\t\t\t\t\t// Se for um campo comum da entidade.\n\t\t\t\t\t} else if (method_exists($entity, $setter)) {\n\t\t\t\t\t\t$entity->$setter($value);\n\t\t\t\t\t\t\n\t\t\t\t\t\tunset($data[$key]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Chegando aqui nao deve mais haver nenhum item em\n\t\t// $data, mas os que houverem guardamos em $this->notmatch\n\t\tforeach($data as $key => $value) {\n\t\t\tif (!isset($this->notmatch)) {\n\t\t\t\t$this->notmatch = new \\stdClass();\n\t\t\t}\n\t\t\t$this->notmatch->{$key} = $value;\n\t\t}\n\t}", "public function updateAndProcess($data){\n if(is_array($data)){\n foreach($data as $k => $v) {\n if ( $v == \"\") {\n $data[$k] = NULL;\n }\n }\n if(!is_null($data['gridref'])) {\n $data = $this->_processFindspot($data);\n }\n }\n if(array_key_exists('csrf', $data)){\n unset($data['csrf']);\n }\n if(array_key_exists('landownername', $data)){\n unset($data['landownername']);\n }\n if(array_key_exists('parishID', $data) && !is_null($data['parishID'])){\n $parishes = new OsParishes();\n $data['parish'] = $parishes->fetchRow($parishes->select()->where('osID = ?', $data['parishID']))->label;\n }\n if(array_key_exists('countyID', $data) && !is_null($data['countyID'])){\n $counties = new OsCounties();\n $data['county'] = $counties->fetchRow($counties->select()->where('osID = ?', $data['countyID']))->label;\n }\n\n if(array_key_exists('districtID', $data) && !is_null($data['districtID'])){\n $district = new OsDistricts();\n $data['district'] = $district->fetchRow($district->select()->where('osID = ?', $data['districtID']))->label;\n }\n return $data;\n }", "public function hydrate(\\SimpleXMLElement $data, EntityInterface $entity)\n {\n foreach($this->metadata->getProperties() as $property) {\n $extractor = $property->getExtractor();\n\n /* @var $extracted \\SimpleXMLElement */\n $extracted = $extractor($data); // Get SimpleXMLElement from response XML tree.\n\n if ($property->isOneToMany()) {\n $splObjectStorage = $entity->{$property->getGetter()}();\n $splObjectStorage->removeAll($splObjectStorage);\n\n $entityMetadata = $property->getTargetEntity();\n $hydrator = new EntityHydrator($entityMetadata);\n\n $className = $entityMetadata->getName();\n\n if (!$extracted) {\n throw new Exception\\RuntimeException(\"Something gone wrong,\n data could not be parsed \".$data->asXML());\n }\n\n foreach ($extracted as $xmlElement) {\n $entity->{$property->getHandler()}($hydrator->hydrate($xmlElement,\n new $className()));\n }\n continue;\n } else {\n if (empty($extracted)) continue;\n $entity->{$property->getHandler()}((string)$extracted);\n }\n }\n return $entity;\n }", "protected function processData($data)\n {\n $this->data = array_replace_recursive($this->data, $data);\n }", "protected function populateElements() {\n foreach ($this->data as $row) {\n $this->elements[] = new GbtContractResponse($row);\n }\n }", "public function fill($objects)\n {\n $counter = 0;\n foreach ($objects as $object)\n {\n if (is_integer($object->getID()))\n {\n if ($object->isIncrementalID())\n {\n $object->setID(++$counter);\n }\n \n $this->addObjectWithID($object, $object->getID());\n }\n else\n {\n $this->addObject($object);\n }\n }\n }", "private function processEntityFromCollection(array $sourceEntitiesData, array &$map, string $key, int $idx)\n {\n foreach ($sourceEntitiesData as $sourceEntityData) {\n $sourceEntityClass = $sourceEntityData['entity_class'];\n $sourceEntityId = $sourceEntityData['entity_id'];\n if (empty($sourceEntityData['change_set'])) {\n continue;\n }\n\n /** @var EntityManagerInterface $sourceEntityManager */\n $sourceEntityManager = $this->doctrine->getManagerForClass($sourceEntityClass);\n $sourceEntityMeta = $sourceEntityManager->getClassMetadata($sourceEntityClass);\n $sourceEntity = $sourceEntityManager->find($sourceEntityClass, $sourceEntityId);\n if (!$sourceEntity) {\n // the entity may be removed after update and since we are processing stuff in background\n // it is possible that the update is processed after the real remove was performed.\n continue;\n }\n\n foreach ($sourceEntityMeta->associationMappings as $sourceFieldName => $associationMapping) {\n if (!empty($sourceEntityData['change_set'][$sourceFieldName])) {\n continue;\n }\n\n $entityClass = $sourceEntityMeta->associationMappings[$sourceFieldName]['targetEntity'];\n\n $fieldName = $this->getTargetFieldName($sourceEntityMeta, $sourceFieldName);\n if (!$fieldName) {\n // the unidirectional relation\n continue;\n }\n\n $value = $sourceEntityMeta->getFieldValue($sourceEntity, $sourceFieldName);\n if (!$value) {\n // this the case where source entity does not belong to any collections\n continue;\n }\n\n $entityManager = $this->doctrine->getManagerForClass($entityClass);\n $entityIds = $this->getEntityIds($entityManager, $value);\n if (!$entityIds) {\n continue;\n }\n\n foreach ($entityIds as $entityId) {\n $change = $this->getCollectionChangeSetFromMap($map, $entityClass, $entityId, $fieldName);\n foreach (['inserted' => 1, 'changed' => 1, 'deleted' => 0] as $changeSetType => $changeSetIdx) {\n if ($changeSetType === $key) {\n continue;\n }\n\n if (isset($change[$changeSetIdx][$changeSetType][$sourceEntityClass.$sourceEntityId])) {\n $idx = $changeSetIdx;\n $key = $changeSetType;\n\n break;\n }\n }\n\n $change[$idx][$key][$sourceEntityClass.$sourceEntityId] = [\n 'entity_class' => $sourceEntityClass,\n 'entity_id' => $sourceEntityId,\n 'change_set' => $sourceEntityData['change_set'],\n ];\n\n $this->addChangeSetToMap($map, $entityClass, $entityId, $fieldName, $change);\n }\n }\n }\n }", "public function hydrate($dataSet)\r\n {\r\n $this->id = $dataSet['id'];\r\n $this->nomRole = $dataSet['nom_role'];\r\n $this->description = $dataSet['description'];\r\n }", "public function values($data){\n\t\tforeach($data as $key => $value){\n\t\t\tif(property_exists($this, $key)){\n\t\t\t\t$this->{$key} = $value;\n\t\t\t}\n\t\t}\n\t}", "public static function autoMapEntity(&$entityObject, $entityData) {\n\t\t\n\t\tself::initializeSession ();\n\t\t\n\t\tself::$logger->debug ( __METHOD__ . ' begin' );\n\t\t\n\t\tif (is_array ( $entityData ) && count ( $entityData ) > 0) {\n\t\t\t\n\t\t\tif (is_object ( $entityObject )) {\n\t\t\t\t\n\t\t\t\t$entityType = get_class ( $entityObject );\n\t\t\t\t\n\t\t\t\t$reflectionClass = new ReflectionClass ( $entityType );\n\t\t\t\t\n\t\t\t\t$entityProperties = $reflectionClass->getDefaultProperties ();\n\t\t\t\t\n\t\t\t\tif (is_array ( $entityProperties ) && count ( $entityProperties ) > 0) {\n\t\t\t\t\t\n\t\t\t\t\tforeach ( $entityProperties as $property => $propertyValue ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (isset ( $entityData [$property] ) && $entityData [$property] != '') {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$valueForSetter = ucfirst ( $property );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$reflectionMethod = new ReflectionMethod ( $entityType, \"set\" . $valueForSetter );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$invokeResult = $reflectionMethod->invoke ( $entityObject, $entityData [$property] );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tself::$logger->debug ( __METHOD__ . ' end' );\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} else {\n\t\t\t\t\tself::$logger->error ( \"The object passed doesn't have attributes\" );\n\t\t\t\t\tthrow new Exception ( \"The object passed doesn't have attributes\" );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tself::$logger->error ( \"Object expected\" );\n\t\t\t\tthrow new InvalidArgumentException ( \"Object expected\" );\n\t\t\t}\n\t\t} else {\n\t\t\tself::$logger->error ( \"The entity array must content data\" );\n\t\t\tthrow new Exception ( \"The entity array must content data\" );\n\t\t}\n\t\n\t}", "public function loadData(Array $data): void\n {\n foreach($data as $fieldName => $fData) {\n if (property_exists($this, $fieldName)) {\n $this->{$fieldName} = $fData;\n }\n }\n }", "abstract protected function _generateDataCollection();", "public function postFlush()\n {\n foreach ($this->parametersMap as $map) {\n $map['entity']->setParameters($map['parameters']);\n }\n\n // reset parameters map\n $this->parametersMap = [];\n }", "public function populate($data = array())\n\t{\n\t $this->id = $data['id'];\n\t $this->code = $data['code'];\n\t $this->name = $data['name'];\n\t}", "public function hydrate(array $data);" ]
[ "0.6971767", "0.6680029", "0.66602683", "0.66177315", "0.6547799", "0.6408321", "0.6385692", "0.6169057", "0.6084097", "0.6030228", "0.5998481", "0.5993636", "0.58495784", "0.58269155", "0.57274765", "0.56866175", "0.5633513", "0.56113017", "0.56023884", "0.5591265", "0.5588528", "0.557577", "0.5572328", "0.5568604", "0.55600554", "0.5530031", "0.5524045", "0.5517747", "0.5516883", "0.5506086", "0.55029327", "0.5494697", "0.549019", "0.54717904", "0.5469429", "0.5455436", "0.54537237", "0.54493374", "0.54183", "0.5406163", "0.53954804", "0.53850657", "0.5383567", "0.5375955", "0.5360278", "0.53533775", "0.53510624", "0.5349552", "0.53479624", "0.53477424", "0.5346012", "0.5345871", "0.53448087", "0.534371", "0.53414327", "0.5340825", "0.53404844", "0.53262156", "0.5324024", "0.53110224", "0.5305542", "0.5297368", "0.52914685", "0.52832246", "0.5282526", "0.5278804", "0.525984", "0.5258409", "0.5255956", "0.52375937", "0.52375287", "0.5229102", "0.5225003", "0.5221534", "0.52182776", "0.52180976", "0.52014667", "0.5196659", "0.51943034", "0.51928955", "0.51915485", "0.5189341", "0.5186669", "0.5182256", "0.51808745", "0.51764506", "0.51761246", "0.5169147", "0.5163284", "0.51597804", "0.51573", "0.5157143", "0.5155828", "0.5154908", "0.5146311", "0.51451355", "0.5139471", "0.51370054", "0.51368135", "0.5136107", "0.51345533" ]
0.0
-1
Persists the entities into the database.
public function onSaveProjectSaveEntities( SaveProjectEvent $event, $eventName, EventDispatcherInterface $eventDispatcher ) { $entities = $event->getEntities(); $pid = 0; foreach ($entities as $entity) { try { if ($pid && !($entity instanceof EditorProject)) { $entity->setPid($pid); } $this->entityManager->persist($entity); $this->entityManager->flush(); // we need to return project data if ($entity instanceof EditorProject) { $pid = $entity->getId(); $event->setReturnData([ 'id' => $entity->getId(), 'name' => $entity->getCaption(), ]); } } catch (ORMException $exception) { } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function save()\n {\n $entities = $this->entities;\n Database::getInstance()->doTransaction(\n function() use ($entities)\n {\n foreach ($entities as $entity)\n {\n if ($entity->getMarkedAsDeleted())\n {\n $entity->delete();\n } \n else if ($entity->getMarkedAsUpdated())\n {\n $entity->saveWithDetails();\n }\n }\n }\n );\n }", "public function store()\n {\n if( $this->isPersistent() )\n {\n $this->update();\n }\n else\n {\n $this->insert();\n }\n }", "public function persistAll() {}", "public function persist();", "public function persist() {}", "static protected function persist() {\n\t\t$objectManager = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance(\\TYPO3\\CMS\\Extbase\\Object\\ObjectManager::class);\n\t\t$persistanceManager = $objectManager->get(\\TYPO3\\CMS\\Extbase\\Persistence\\Generic\\PersistenceManager::class);\n\t\t$persistanceManager->persistAll();\n\t}", "protected function persistObjects() {}", "public function save()\n {\n $this->persist($this->state);\n }", "private function saveTracker(): void {\n try {\n $this->getEntityManager()->persist($this->engagement);\n $this->getEntityManager()->flush($this->engagement);\n } catch (OptimisticLockException $e) {\n } catch (ORMException $e) {\n } catch (ForeignKeyConstraintViolationException $e){\n }\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function save()\n {\n $this->checkForNecessaryProperties();\n\n $this->update($this->getCurrentId(), $this->data);\n }", "public function persist()\n {\n $uid = $this->getIdentifier() == 0 ? 'NEW' . rand(100000, 999999) : $this->getIdentifier();\n $data = [\n trim(static::$storageTableName) => [\n $uid => $this->getPersistableDataArray()\n ]\n ];\n // New records always must have a pid\n if ($this->getIdentifier() == 0) {\n $data[trim(static::$storageTableName)][$uid]['pid'] = 0;\n }\n /** @var \\TYPO3\\CMS\\Core\\DataHandling\\DataHandler $tce */\n $tce = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance(\\TYPO3\\CMS\\Core\\DataHandling\\DataHandler::class);\n $tce->start($data, []);\n $tce->process_datamap();\n }", "function persistAll() ;", "public function persist()\n {\n persistableCollection::getInstance($this->resourceName)->persistObject($this);\n $this->loaded = true;\n $this->persisted = true;\n }", "public function save(): void\n {\n $this->em->persist($this->model);\n $this->em->flush();\n }", "public function flush()\n {\n $this->getEntityManager()->flush();\n }", "public function save(Entity $entity): void\n {\n $this->db->save($entity);\n }", "public function flush()\n {\n $this->entityManager->flush();\n }", "public function persist()\n {\n\n $this->persistor->persist(\n $this->event,\n $this->relatedEntities,\n $this->eventRequest->getApplication(),\n $this->eventRequest->getAccount(),\n $this->eventRequest->getProduct(),\n $this->eventRequest->appendCustomer\n );\n\n }", "protected function saveEntity($entity)\n {\n $this->om->persist($entity);\n $this->om->flush($entity);\n }", "public function flush() {\r\n\t$this->em->flush();\r\n }", "public function persist($entity)\n {\n $visited = [];\n $this->doPersist($entity, $visited);\n }", "public function flush()\n {\n $this->unitOfWork->commit();\n }", "public function persist()\n {\n }", "public function commit(): void\n {\n $this->eventDispatcher->dispatchPreFlush();\n\n if (\n $this->objectsToPersist === [] &&\n $this->objectsToUpdate === [] &&\n $this->objectsToRemove === []\n ) {\n return; // Nothing to do.\n }\n\n $objects = array_merge(\n $this->objectsToPersist,\n $this->objectsToUpdate,\n $this->objectsToRemove,\n );\n $this->eventDispatcher->dispatchPreFlushLifecycleCallbacks($objects);\n\n $this->eventDispatcher->dispatchOnFlush();\n\n $this->persister->executePersists();\n $this->persister->executeUpdates();\n $this->persister->executeRemoves();\n\n $this->eventDispatcher->dispatchPostFlush();\n\n $this->objectsToPersist = [];\n $this->objectsToUpdate = [];\n $this->objectsToRemove = [];\n $this->objectChangeSets = new ChangeSets();\n }", "protected function persistAndFlush($entity)\n {\n $this->persist($entity);\n $this->flush();\n }", "public function persist()\n {\n //\n }", "public function save() \r\n\t{\r\n\t\t$this->saveNewProducts();\r\n\t\t$this->saveUpdateProducts();\r\n\t\t$this->saveRemoveProducts();\t\t\t\r\n\t\t$this->destroyCache(); \r\n\t}", "protected function saveState(): void\n {\n $em = $this->getEntityManager();\n $em->flush();\n }", "public function persist($oneOrManyEntities): void;", "public function persist(IEntity $entity): void\n\t{\n\t\t$this->beginTransaction();\n\t\t$data = $this->entityToArray($entity);\n\t\t$data = $this->getConventions()->convertEntityToStorage($data);\n\n\t\tif (!$entity->isPersisted()) {\n\t\t\t$this->processInsert($entity, $data);\n\n\t\t} else {\n\t\t\t$primary = [];\n\t\t\t$id = (array) $entity->getPersistedId();\n\t\t\tforeach ($entity->getMetadata()->getPrimaryKey() as $key) {\n\t\t\t\t$primary[$key] = array_shift($id);\n\t\t\t}\n\t\t\t$primary = $this->getConventions()->convertEntityToStorage($primary);\n\n\t\t\t$this->processUpdate($entity, $data, $primary);\n\t\t}\n\t}", "public function persist($entity)\n {\n }", "protected function persistAndFlush($entity)\n\t{\n\t\t$this->em->persist($entity);\n\t\t$this->em->flush();\n\t}", "public function save()\n {\n if ($this->id === null) {\n $this->insert();\n } else {\n $this->update();\n }\n }", "protected function save()\n\t{\n\t\t$this->saveItems();\n\t\t//$this->saveAssignments();\n\t\t//$this->saveRules();\n\t}", "function save() {\r\n foreach ($this->_data as $v)\r\n $v -> save();\r\n }", "public function saveEntity($entity)\n\t{\n\t\t$entityManager = $this->getDoctrine()->getManager();\n\t $entityManager->persist($entity);\n\t $entityManager->flush();\n\t}", "function persist() ;", "public function markAsPersisted(): void;", "protected function persist($entity)\n {\n if (!$this->em()->isOpen()) {\n $this->getDoctrine()->resetManager();\n }\n\n $this->em()->persist($entity);\n $this->em()->flush();\n\n }", "public function store()\n {\n $this->storeKeys();\n }", "public function save()\n {\n $DB = DB::singleton(dsn());\n\n if ( $this->update ) {\n $SQL = SQL::newUpdate('entry');\n foreach ( $this->columns as $column ) {\n $SQL->addUpdate('entry_' . $column, $this->{$column});\n }\n $SQL->addWhereOpr('entry_id', $this->id);\n $SQL->addWhereOpr('entry_blog_id', $this->blog_id);\n $DB->query($SQL->get(dsn()), 'exec');\n } else {\n $SQL = SQL::newInsert('entry');\n foreach ( $this->columns as $column ) {\n $SQL->addInsert('entry_' . $column, $this->{$column});\n }\n $DB->query($SQL->get(dsn()), 'exec');\n }\n\n EntryHelper::saveColumn($this->units, $this->id, $this->blog_id);\n Common::saveField('eid', $this->id, $this->fields);\n Common::saveFulltext('eid', $this->id, Common::loadEntryFulltext($this->id));\n }", "public function save()\n {\n if ($this->id) {\n $this->update();\n } else {\n $this->id = $this->insert();\n }\n }", "public function save()\n {\n\n // generate all column's sql query\n $column_names = '';\n $column_values = '';\n foreach ($this->columns as $field_name => $column_obj)\n {\n if ($column_obj->columnName === null) {\n $column_names .= $field_name.', ';\n } else {\n $column_names .= $column_obj->columnName.', ';\n }\n $column_values .= $column_obj->generateValueForSQL().', ';\n }\n $column_names = substr($column_names, 0, -1);\n $column_values = substr($column_values, 0, -1);\n $this_table_name = $this->table_name;\n $this_id = $this->id;\n\n if ($this->id === 0) {\n // This object is not saved yet.\n $query = 'INSERT INTO $this_table_name ($column_names) VALUES ($column_values);';\n // Execute query\n } else {\n // This object is on the DB.\n $query = 'INSERT INTO $this_table_name ($column_names) VALUES ($column_values) WHERE id=$this_id;';\n // Execute query\n }\n\n mysql_run_query($query);\n\n }", "public function save() {\n $db = Db::instance();\n // omit id and any timestamps\n $db_properties = array(\n 'author_id' => $this->author_id,\n 'clothingname' => $this->clothingname,\n 'clothingtype' => $this->clothingtype,\n 'tempmin' => $this->tempmin,\n 'tempmax' => $this->tempmax\n );\n $db->store($this, __CLASS__, self::DB_TABLE, $db_properties);\n }", "public function persistEntity($obj)\n\t{\n\t\t$this->db->persistEntity($obj);\n\t}", "public function save($entity);", "public function save($entity);", "public function save($entity);", "public function saveModel($entity){\n $this->entityManager->persist($entity);\n $this->entityManager->flush();\n }", "public function persist($data);", "public function persist() {\n $bd = BD::getConexion();\n $sqlInsertUsuario = \"insert into usuarios (nomUsuario, clave) values (:nomUsuario, :clave)\";\n $sthSqlInsertUsuario = $bd->prepare($sqlInsertUsuario);\n $result = $sthSqlInsertUsuario->execute([\":nomUsuario\" => $this->nomUsuario, \":clave\" => $this->clave]);\n $this->id = (int) $bd->lastInsertId();\n }", "public function save() {\n $db = Db::instance();\n // omit id and any timestamps\n $db_properties = array(\n 'username' => $this->username,\n 'password_hash' => $this->password_hash,\n 'email' => $this->email,\n 'first_name' => $this->first_name,\n 'last_name' => $this->last_name,\n 'user_type' => $this->user_type,\n 'bio' => $this->bio,\n 'creation_date' => $this->creation_date,\n 'gender' => $this->gender,\n 'color' => $this->color\n );\n $db->store($this, __CLASS__, self::DB_TABLE, $db_properties);\n }", "public function save() {\n return $this->entity->save();\n }", "public function persist() {\n $bd = BD::getConexion();\n $sql = \"insert into usuarios (nombre, clave) values (:nombre, :clave)\";\n $sthSql = $bd->prepare($sqlInsertUsuario);\n $result = $sthSql->execute([\":nombre\" => $this->nombre, \":clave\" => $this->clave]);\n $this->id = (int) $bd->lastInsertId();\n }", "public function persistObjects(array $entities, array $identifiers);", "public function postPersist($entity);", "public function testPersistSavesEntityToDatabase(): void\n {\n $entityFactoryManager = $this->getEntityFactoryManager([\n 'Tests\\EoneoPay\\Externals\\ORM\\Stubs\\Factories\\\\' => 'Tests\\EoneoPay\\Externals\\ORM\\Stubs'\n ]);\n\n $entity = $entityFactoryManager->create(EntityStub::class);\n self::assertNull($entity->getEntityId());\n\n $entity = $entityFactoryManager->persist(EntityStub::class);\n self::assertNotNull($entity->getEntityId());\n }", "public function flush()\n {\n $this->manager->flush();\n }", "public function saveToDb()\n\t{\n\t\t$this->addDocument();\n\t\tparent::saveToDb();\n\t}", "function save() {\n\n\t\t// calls generic ORM save (insert or update)\n\t\tparent::save();\n\n\t}", "public function persist($object);", "public function flush()\n {\n $this->entityManager->flush();\n /*\n try {\n }\n catch (UniqueConstraintViolationException $e) {\n //Skipping duplicates\n }\n */\n }", "public function save()\n \t{\n \t $this->getMapper()->save($this);\n \t}", "public function saveToDb() {\n parent::saveToDb();\n\n require_once 'models/Location.php';\n Location::saveToDb($this->preferredLocation);\n Location::saveToDb($this->currentLocation);\n\n require_once 'libs/DB.php';\n $conn = DB::connect();\n\n $seekerId = $this->id();\n\n // Update the seeker table\n $conn->exec(\"UPDATE seeker SET experience='$this->experience', pref_location_name='$this->preferredLocation', curr_location_name='$this->currentLocation' WHERE id='$seekerId'\");\n\n require_once 'models/Skill.php';\n foreach($this->skills as $skill) {\n Skill::saveToDb($skill);\n }\n\n // Delete old skills\n $conn->exec(\"DELETE FROM seeker_skill WHERE seeker_id='$seekerId'\");\n\n // Add new skills\n foreach($this->skills as $skill) {\n $conn->exec(\"INSERT INTO seeker_skill(seeker_id, skill_name) VALUES('$seekerId', '$skill')\");\n }\n }", "public function store()\r\n\t{\r\n\t\t$jsonData = $this->getAll();\r\n\r\n\t $data = array(\r\n\t\t\t'username'=> $this->user->username,\r\n\t\t\t'post'=> $this->post,\r\n\t\t\t'date'=> $this->date,\r\n\t );\r\n\r\n\t\tarray_unshift($jsonData, $data);\r\n\r\n\t\t$this->save($jsonData);\r\n\t}", "public function save($oneOrManyEntities): void;", "public function saveEntities($entities, $unlock = true)\n {\n //iterate over the results so the events are dispatched on each delete\n $batchSize = 20;\n foreach ($entities as $k => $entity) {\n $isNew = ($entity->getId()) ? false : true;\n\n //set some defaults\n $this->setTimestamps($entity, $isNew, $unlock);\n\n if ($dispatchEvent = $entity instanceof Sms) {\n $event = $this->dispatchEvent('pre_save', $entity, $isNew);\n }\n\n $this->getRepository()->saveEntity($entity, false);\n\n if ($dispatchEvent) {\n $this->dispatchEvent('post_save', $entity, $isNew, $event);\n }\n\n if ((($k + 1) % $batchSize) === 0) {\n $this->em->flush();\n }\n }\n $this->em->flush();\n }", "public function saveEntities($entities, $unlock = true)\n {\n //iterate over the results so the events are dispatched on each delete\n $batchSize = 20;\n foreach ($entities as $k => $entity) {\n $isNew = ($entity->getId()) ? false : true;\n\n //set some defaults\n $this->setTimestamps($entity, $isNew, $unlock);\n\n if ($dispatchEvent = $entity instanceof Sms) {\n $event = $this->dispatchEvent(\"pre_save\", $entity, $isNew);\n }\n\n $this->getRepository()->saveEntity($entity, false);\n\n if ($dispatchEvent) {\n $this->dispatchEvent(\"post_save\", $entity, $isNew, $event);\n }\n\n if ((($k + 1) % $batchSize) === 0) {\n $this->em->flush();\n }\n }\n $this->em->flush();\n }", "public function persist()\n {\n $this->eventManager->dispatchEvent(['persist_before'], [get_class($this)]);\n if (!empty($this->handlerInterface)) {\n $result = $this->handlerFactory->create($this->handlerInterface)->persist($this);\n if (!empty($result)) {\n foreach ($result as $key => $value) {\n $this->data[$key] = $value;\n }\n }\n }\n $this->eventManager->dispatchEvent(['persist_after'], [get_class($this)]);\n }", "protected function save(){\n $this->getTags();\n foreach ($this->posts as $post){\n $createdPost = Post::create(['habr_id' => $post['postId'],\n 'post' => $post['full'],\n 'unix_time' => $post['time']]);\n $this->attachPostTags($createdPost,$post['tags']);\n }\n }", "public function saveHokodoEntity(HokodoEntityInterface $hokodoEntity): void;", "public function save() {\n $db = Db::instance();\n // omit id and any timestamps\n $db_properties = array(\n 'event_type_id' => $this->event_type_id,\n 'user_1_id' => $this->user_1_id,\n 'user_2_id' => $this->user_2_id,\n 'user_1_name' => $this->user_1_name,\n 'user_2_name' => $this->user_2_name,\n 'product_1_name' => $this->product_1_name,\n 'product_2_name' => $this->product_2_name,\n 'data_1' => $this->data_1,\n 'data_2' => $this->data_2\n );\n $db->store($this, __CLASS__, self::DB_TABLE, $db_properties);\n }", "public function persist()\n {\n Channel::from(auth()->user())\n ->contribute($this->all());\n }", "public function save()\n {\n $this->_validateModifiable();\n\n if($this->isNew())\n {\n $this->_getDataSource()->create($this);\n }\n else\n {\n $this->_getDataSource()->update($this);\n }\n\n $this->_saveRelations();\n $this->_setNew(false);\n }", "public function save() {\n $db = Db::instance();\n // omit id \n $db_properties = array(\n 'firstName' => $this->firstName,\n 'lastName' => $this->lastName,\n 'description' => $this->description,\n 'user' => $this->user,\n 'password' => $this->password,\n 'image' => $this->image,\n 'gender' => $this->gender,\n 'topic_id' => $this->topic_id,\n 'topic_id1' => $this->topic_id1,\n 'role_id' => $this->role_id,\n );\n $db->store($this, __CLASS__, self::DB_TABLE, $db_properties);\n }", "protected function saveNew($entity)\n {\n $this->em->persist($entity);\n $this->update();\n }", "public function flushAllChanges()\r\n {\r\n $this->em->flush();\r\n }", "public function persistAndFlush($element)\n {\n $this->manager->getManager()->persist($element);\n $this->manager->getManager()->flush();\n }", "public function persist(Entity\\Base $entity)\n {\n $this->getEntityManager()->persist($entity);\n }", "public function persist($documents)\n {\n $this->unitOfWork->persist($documents);\n }", "public function save()\n\t{\n\t\t$this->copyAttributesToValues() ;\n\t\tif( $this->factory )\n\t\t{\n\t\t\tswitch( $this->todo )\n\t\t\t{\n\t\t\t\tcase 1: // Insert\n\t\t\t\t\tif( $this->factory->insertObjectIntoDB( $this ) ) $this->state = \"inserted\" ;\n\t\t\t\t\telse $this->state = \"dberror\" ;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 2: // update\n\t\t\t\t\tif( $this->factory->updateObjectIntoDB( $this ) ) $this->state = \"updated\" ;\n\t\t\t\t\telse $this->state = \"dberror\" ;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 3: // delete\n\t\t\t\t\tif( $this->factory->deleteObjectIntoDB( $this ) ) $this->state = \"deleted\" ;\n\t\t\t\t\telse $this->state = \"dberror\" ;\n\t\t\t\t\tbreak ;\n\t\t\t}\n\t\t}\n\t}", "public function save($object)\n {\n $this->entityManager->persist($object);\n $this->entityManager->flush();\n }", "public function persist()\n {\n $this->checkPersister();\n\n $this->persister->beginTransaction();\n foreach ($this as $entity) {\n if (!empty($entity)){\n $this->persister->persist($entity);\n }\n }\n\n $this->persister->commitTransaction();\n\n return $this;\n }", "public function save()\n {\n $postMapper = new Application_Model_PostsMapper();\n $postMapper->save($this);\n }", "public function flushDataStore()\n {\n $this->database->flushAll(); \n }", "public function flush()\n {\n $this->store()->flush();\n }", "public function persistir($entidade, $setarDataEHora = true) {\n try {\n if ($setarDataEHora) {\n $entidade->setDataEHoraDeCriacao();\n }\n $this->getEntityManager()->persist($entidade);\n $this->getEntityManager()->flush($entidade);\n } catch (Exception $exc) {\n echo $exc->getMessage();\n }\n }", "public function save_all() {\n\t\t$this->save_api();\n\t\t$this->save_field_map();\n\t\t$this->save_import();\n\t\t$this->save_requirement_set();\n\t}", "public function save()\n {\n // If deposit is new, will get assigned database ID.\n $this->dbID = $this->db->saveDeposit($this);\n }", "public function saveToDb()\n\t{\n\t\tparent::saveToDb();\n\t\t$this->insertAttachment();\n\t}", "public final function save() {\n }", "public function saveAll() {\n if (isset($this::$has)) {\n foreach ($this::$has as $key => $value) {\n if(isset($this->$key)) {\n foreach ($this->$key as $item) {\n $item->saveAll();\n }\n }\n }\n }\n $this->save();\n }", "public function persist($obj)\r\n {\r\n }", "public function save() {\n $db = self::getDbConnection();\n $table = static::getTable();\n $data = get_object_vars($this);\n if ($table == 'posts') {\n $data['name'] = Service::get('session')->userEmail;\n }\n\n if (isset($data['id'])) {\n $query = $db->prepare($this->getUpdateString($data, $table));\n } else {\n $query = $db->prepare($this->getInsertString($data, $table));\n }\n\n if (!$query->execute()) {\n throw new DatabaseException('Cant save object');\n }\n }", "public function update($entity)\n {\n $this->getObjectManager()->persist($entity);\n $this->getObjectManager()->flush();\n }", "abstract public function FlushToDatabase();", "public function persist(array $data)\n {\n }", "public function save()\n {\n $pdo = $this->getDbConnection();\n $valuesRow = $this->prepareValuesRow();\n\n $pdo->exec(\"REPLACE INTO {$this->dbTable} (`key`, `value`) VALUES {$valuesRow}\");\n }", "public final function save()\n {\n }", "public function save() {}" ]
[ "0.7667536", "0.71882254", "0.71665096", "0.70472205", "0.6962426", "0.6880654", "0.6850977", "0.6765697", "0.67552054", "0.67352366", "0.66884327", "0.667061", "0.6649584", "0.6636752", "0.6624606", "0.6620328", "0.6606439", "0.6604699", "0.6591183", "0.6541546", "0.6533928", "0.6504074", "0.64869845", "0.6469964", "0.6440541", "0.64343894", "0.64143443", "0.6400231", "0.6390689", "0.6384694", "0.63401145", "0.6337084", "0.63305503", "0.63144994", "0.6312282", "0.6309173", "0.62677824", "0.6257551", "0.62553734", "0.62546426", "0.62444836", "0.624194", "0.62380624", "0.62334234", "0.6228823", "0.6153815", "0.61433494", "0.61433494", "0.61433494", "0.6128072", "0.61166066", "0.61016935", "0.6076528", "0.607176", "0.605794", "0.602817", "0.602468", "0.60189825", "0.6003079", "0.59923434", "0.5970708", "0.5967855", "0.5966684", "0.5953169", "0.5949613", "0.59475535", "0.5930333", "0.5928364", "0.59276605", "0.5922623", "0.59181017", "0.59136784", "0.59107924", "0.59048146", "0.5897388", "0.5884225", "0.5880843", "0.5874952", "0.58704597", "0.58650255", "0.58549875", "0.5844222", "0.5844079", "0.5841339", "0.5834384", "0.5832225", "0.58292425", "0.5819051", "0.58144796", "0.5805075", "0.5800505", "0.5782902", "0.5769997", "0.5761244", "0.57604873", "0.574739", "0.5742396", "0.5729303", "0.57008064", "0.5696534", "0.567683" ]
0.0
-1
Define the model's default state.
public function definition() { return [ 'id' => Str::uuid(), 'category_id' => $this->faker->randomElement($this->categories), 'name' => $this->faker->unique()->word, 'description' => $this->faker->paragraph, 'image' => Str::remove('public/images/products/', $this->faker->image('public/images/products')), 'price' => $this->faker->randomFloat(2, 10, 9999.99), 'with_stock' => $this->faker->boolean ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDefaultState()\r\n\t{\r\n\t}", "static function get_default_state();", "public function getDefaultUserState();", "private function setDefaultStates(): void\n {\n foreach ($this->arr_attributes as $strParamName) {\n $this->states[$strParamName] = $this->params->get($strParamName, 0);\n }\n }", "abstract protected function getDefaultModel();", "public function applyDefaultValues()\n {\n $this->is_active = false;\n $this->is_closed = false;\n }", "protected function getDefaultModelObject() : void\n {\n return;\n }", "public function applyDefaultValues()\n {\n $this->active = false;\n }", "protected function makeDefault()\n {\n $this->options = [];\n $this->menuSource = MenuSource::STATIC_SOURCE;\n $this->action = new Action(ActionType::MENU(), 'Default menu name', 'Default menu text');\n }", "public function set()\n {\n\t\tif ($this->model->state())\n $this->model->set();\n }", "public function __default()\n\t{\n\n\t}", "protected function initial_set_default() {\n\t\tif ( isset( $this->field[ 'config' ][ 'default' ] ) ) {\n\t\t\t$this->default = $this->field[ 'config' ][ 'default' ];\n\t\t} else {\n\t\t\t$this->default = '';\n\t\t}\n\t}", "public function applyDefaultValues()\n\t{\n\t\t$this->type = 1;\n\t\t$this->total_index = 0;\n\t\t$this->is_published = true;\n\t\t$this->is_featured = false;\n\t\t$this->comments_count = 0;\n\t}", "public function setModelDefaults() \n {\n if (!empty($this->model->defaultFieldValues())) {\n \n foreach($this->model->defaultFieldValues() as $field => $defaultValue) {\n\n $this->model->$field = $defaultValue;\n }\n } \n }", "function getDefaultState(){\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->where(array('is_default'=>true));\r\n\t\t$recordSet = $this->db->get(TBL_MST_STATES);\r\n\t\t$data=$recordSet->result() ;\r\n\t\treturn $data[0]->id;\r\n\t}", "public function setValueDefault()\n {\n $this->isActive = true;\n $this->createdAt = new \\DateTime();\n }", "public function applyDefaultValues()\n {\n $this->deleted = false;\n $this->amount = 1;\n $this->amountevaluation = 0;\n $this->defaultstatus = 0;\n $this->defaultdirectiondate = 0;\n $this->defaultenddate = 0;\n $this->defaultpersoninevent = 0;\n $this->defaultpersonineditor = 0;\n $this->maxoccursinevent = 0;\n $this->showtime = false;\n $this->ispreferable = true;\n $this->isrequiredcoordination = false;\n $this->isrequiredtissue = false;\n $this->mnem = '';\n }", "public function getDefaultStateName() {\n return $this->values->get('DefaultStateName');\n }", "public function default() {\n \n $this->data = ModuleConfig::settings();\n // [Module_Data]\n }", "public static function bootStateMachine()\n {\n static::creating(function ($model) {\n $fieldState = $model->getFieldState();\n if (empty($model->$fieldState)) {\n $model->$fieldState = $model->getInitialState();\n }\n $model->beforeTransition($model->fromTransition, $model->toTransition);\n $model->setStateChangeAt();\n });\n static::created(function ($model) {\n $model->afterTransition($model->fromTransition, $model->toTransition);\n });\n static::saving(function ($model) {\n $model->beforeTransition($model->fromTransition, $model->toTransition);\n $model->setStateChangeAt();\n });\n static::saved(function ($model) {\n $model->afterTransition($model->fromTransition, $model->toTransition);\n });\n }", "function _setModelState()\r\n {\r\n $state = parent::_setModelState(); \r\n $app = JFactory::getApplication();\r\n $model = $this->getModel( $this->get('suffix') );\r\n $ns = $this->getNamespace();\r\n\r\n $state['filter_id_from'] = $app->getUserStateFromRequest($ns.'id_from', 'filter_id_from', '', '');\r\n $state['filter_id_to'] = $app->getUserStateFromRequest($ns.'id_to', 'filter_id_to', '', '');\r\n $state['filter_name'] = $app->getUserStateFromRequest($ns.'name', 'filter_name', '', '');\r\n $state['filter_enabled'] = $app->getUserStateFromRequest($ns.'enabled', 'filter_enabled', '', '');\r\n $state['filter_taxclass'] = $app->getUserStateFromRequest($ns.'taxclass', 'filter_taxclass', '', '');\r\n $state['filter_shippingtype'] = $app->getUserStateFromRequest($ns.'shippingtype', 'filter_shippingtype', '', '');\r\n \r\n foreach (@$state as $key=>$value)\r\n {\r\n $model->setState( $key, $value ); \r\n }\r\n return $state;\r\n }", "public function getInitialState(): StateContract\n {\n return $this->newState(['value' => 1]);\n }", "public function state();", "public function setUserDefaultStatus($userDefaultStatus);", "public function setStateModel($stateModel) {}", "public function getBaseState() {}", "public function init()\r\n {\r\n $this->_helper->db->setDefaultModelName('DefaultMetadataValue');\r\n }", "public function set_to_default()\n\t{\n\t\t// SimpleDB requires a value for every attribue...\n\t\t$this->_name = NULL;\n\t\t$this->_contextid = NULL;\n\t\t$this->_userid = NULL;\n $this->_deleted = 0;\n\t\t$this->_lastmodified = 0;\t\n\t}", "public function create_default() {\n if (!$this->model->has_default()) {\n $default_data = [\n 'id' => 1,\n 'name' => 'Beregu',\n 'desc' => 'team vs team',\n ];\n $this->model->create_default($default_data);\n\n $default_data = [\n 'id' => 2,\n 'name' => 'Individu',\n 'desc' => 'individu vs individu',\n ];\n $this->model->create_default($default_data);\n }\n }", "public function __construct(State $model)\n\t{\n\t\t$this->model = $model;\n\t}", "public function getStateModel() {}", "public function set_default_data() {\n\t\t$this->button_text_color = '#FFFFFF';\n\t\t$this->button_background_color = '#6699CC';\n\n\t\t$this->header_text_color = '#FFFFFF';\n\t\t$this->header_background_color = '#6699CC';\n\n\t\t$this->button_text = 'Do Not Sell My Data';\n\n\t\t$this->publish_status = 'Draft';\n\t\t$this->last_published = '';\n\n\t\t$this->ot_logo = '';\n\t\t$this->display_position = 'right';\n\t\t$this->floating_button\t= '';\n\t\t$this->isLinkEnabled \t= 'textlink';\n\t}", "public function applyDefaultValues()\n\t{\n\t\t$this->points = '0';\n\t\t$this->type = 0;\n\t\t$this->hidden = 0;\n\t\t$this->relationship_status = 0;\n\t\t$this->show_email = 1;\n\t\t$this->show_gender = 1;\n\t\t$this->show_hometown = 1;\n\t\t$this->show_home_phone = 1;\n\t\t$this->show_mobile_phone = 1;\n\t\t$this->show_birthdate = 1;\n\t\t$this->show_address = 1;\n\t\t$this->show_relationship_status = 1;\n\t\t$this->credit = 0;\n\t\t$this->login = 0;\n\t}", "public function initializeDefaults()\n {\n }", "public function applyDefaultValues()\n\t{\n\t\t$this->ativo = true;\n\t\t$this->tipo_acesso = 'M';\n\t\t$this->estado_civil = 'O';\n\t\t$this->nivel_acesso = '1';\n\t\t$this->usuario_validado = false;\n\t}", "public function setDefaultAttribute($value){\n $this->attributes['default'] = ($value === 'true' || $value ? true : false);\n}", "private function _set_default()\r\n\t{\r\n\t\tif($this->input->post('default'))\r\n\t\t{\r\n\t\t\t$this->db->update('showcases',array('default' => 0));\r\n\t\t\t$this->db->where('id', $this->input->post('default'));\r\n\t\t\t$this->db->update('showcases',array('default' => 1));\r\n\t\t\t\r\n\t\t\t$this->set_message('success', 'Vetrina predefinita aggiornata con successo!');\r\n\t\t\tredirect($this->list);\r\n\t\t}\r\n\t}", "public function applyDefaultValues()\n {\n $this->is_not = false;\n $this->rank = 0;\n }", "public function __default()\r\n \t{\r\n \t if( self::isArg( 'notifwindow') )\r\n \t {\r\n $this->view = \"common_notifwindow\";\r\n \t $this->viewArgs['table'] = self::getArg( \"table\", AT_posint, true );\r\n \t }\r\n \t else\r\n \t {\r\n $this->view = \"dummygame_dummygame\";\r\n self::trace( \"Complete reinitialization of board game\" );\r\n }\r\n \t}", "private function _load_default_model(){\n\n\t\t$default_model_name = strtolower(get_class($this)) . '_model';\n\n\t\tif(file_exists(APPPATH . 'models/' . $default_model_name . '.php')){\n\n\t\t\t$this->load->model($default_model_name, strtolower(get_class($this)));\n\t\t\t$this->_default_model = strtolower(get_class($this));\n\t\t}\n\n\t}", "public function model()\n {\n return State::class;\n }", "public function model()\n {\n return State::class;\n }", "public function getDefault();", "public function setDefaultValues()\n\t{\t\t\n\t\t\t \n\t}", "protected function initialiseModel()\n {\n parent::initialiseModel();\n\n $this->SelectedTab = 0;\n }", "final protected function _defaults(){\n if(! $this->_defaults) return;\n foreach($this->_defaults as $conf => $default_value){\n if(! self::inform($conf)) self::define($conf, $default_value);\n }\n }", "public function useDefaults()\n\t{\n\t\t$this->use_defaults = true;\n\t}", "public function set_behaviors_default_data() {\n\n\t\t$this->is_google_personalize_enabled = 'checked';\n\t\t$this->google_confirmation_title = 'Personalized advertisements';\n\t\t$this->google_confirmation_message = 'Turning this off will opt you out of personalized advertisements delivered from Google on this website.';\n\t\t$this->confirmbutton = 'Confirm';\n\t\t$this->is_email_enabled = 'checked';\n\t\t$this->email_address = '';\n\t\t$this->popup_main_title = 'Do Not Sell My Personal Information';\n\t\t$this->link_text = 'Privacy Policy';\n\t\t$this->link_url = '';\n\t\t$this->privacy_policy_message = 'Exercise your consumer rights by contacting us below';\n\t\t$this->is_phone_enabled = 'checked';\n\t\t$this->phone_number = '';\n\t\t$this->form_link_text = 'Exercise Your Rights';\n\t\t$this->form_link_url = '';\n\t\t$this->form_enable = 'checked';\n\t\t$this->publish_status = 'Draft';\n\t\t$this->last_published = '';\n\t\t$this->selectuseroption\t\t\t\t = 'All';\n\t\t$this->isIABEnabled \t\t\t\t = 'checked';\n\t\t$this->isLSPAenable \t\t\t\t = '';\n\t}", "public function makeDefault() {\n $this->update([\n 'color' => null,\n 'size' => null\n ]);\n }", "public function applyDefaultData()\n {\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n $config = $objectManager->get('\\Magento\\Framework\\App\\Config\\ScopeConfigInterface');\n\n $this->setsup_is_active(1);\n $this->setsup_locale($config->getValue('general/locale/code'));\n $this->setsup_currency($config->getValue('currency/options/base'));\n $this->setsup_country($config->getValue('general/country/default'));\n\n return $this;\n }", "protected function setDefaultValues()\n {\n parent::setDefaultValues();\n\t}", "public function setDefaultStateName($stateName) {\n $this->values->put('DefaultStateName', $stateName);\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function applyDefaultValues()\n {\n $this->jml_lantai = '1';\n $this->asal_data = '1';\n $this->last_sync = '1901-01-01 00:00:00';\n }", "function init() {\n $this->options['selected'] = isset($this->options['value']) ?\n true : @(bool)$this->options['default'];\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function init() {\n\t\t// use this method to initialize default values.\n\t}", "public function applyDefaultValues()\n\t{\n\t}", "public function applyDefaultValues()\n\t{\n\t}", "public function applyDefaultValues()\n\t{\n\t}", "protected function cliModelInit()\n {\n }", "function getDefaultValue() \n {\n return $this->getValueByFieldName( 'statevar_default' );\n }", "public function __default()\r\n {\r\n if( self::isArg( 'notifwindow') ) {\r\n $this->view = \"common_notifwindow\";\r\n $this->viewArgs['table'] = self::getArg( \"table\", AT_posint, true );\r\n } else {\r\n $this->view = \"thecrew_thecrew\";\r\n self::trace( \"Complete reinitialization of board game\" );\r\n }\r\n }", "public function toggleDefault()\n {\n $this->language->default = ! $this->language->default;\n }", "public static function set_default_values() {\n\t\t?>\n\t\tcase \"nu_phone\" :\n\t\t\tfield.label = \"Phone\";\n\t\t\tfield.isRequired = true;\n\t\t\tfield.description = \"Numbers only. e.g. 8885551212\";\n\t\t\tbreak;\n\t\t<?php\n\t}", "function post_model_init($from_cache = FALSE)\n {\n }", "public static function preModel(){\n\t\t\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "protected function get_default() {\n\t\treturn false;\n\t}", "protected function setDefaultTemplate(): void\n {\n $this->setDefaultData(function(Generator $faker) {\n return [\n 'password' => 'xx',\n 'username' => $faker->email,\n 'modified' => time(),\n // set the model's default values\n // For example:\n // 'name' => $faker->lastName\n ];\n });\n }", "function setDefault($value)\n {\n $this->_defValue = $value;\n }", "public function __default()\r\n {\r\n if (self::isArg('notifwindow')) {\r\n $this->view = \"common_notifwindow\";\r\n $this->viewArgs['table'] = self::getArg(\"table\", AT_posint, true);\r\n } else {\r\n $this->view = \"lettertycoon_lettertycoon\";\r\n self::trace(\"Complete reinitialization of board game\");\r\n }\r\n }", "protected function setDefaults()\n {\n return;\n }", "public function defaultData();", "public function getStatesModel()\n\t{\n\t\treturn $this->statesModel = new StatesModel();\n\t}", "public function getDefaultValue();", "public function getDefaultValue();", "public function applyDefaultValues()\n\t{\n\t\t$this->closed = 0;\n\t\t$this->lastfmid = 0;\n\t\t$this->hasphotos = 0;\n\t}", "public function applyDefaultValues()\n\t{\n\t\t$this->platform = 'pc';\n\t\t$this->experience_score = 0;\n\t\t$this->up_votes = 0;\n\t\t$this->down_votes = 0;\n\t\t$this->is_guest = 0;\n\t\t$this->is_admin = 0;\n\t\t$this->today_votes = 0;\n\t\t$this->email_on = 1;\n\t}", "private function getStateDefaultStatus($state)\n {\n\t\tif(\\Cart2Quote\\License\\Model\\License::getInstance()->isValid()) {\n\t\t\t$status = false;\n $stateNode = $this->_getState($state);\n if ($stateNode) {\n $status = $this->quoteStatusFactory->create()->loadDefaultByState($state);\n $status = $status->getStatus();\n }\n return $status;\n\t\t}\n\t}" ]
[ "0.77757794", "0.72255844", "0.6857964", "0.67950636", "0.67661", "0.6433752", "0.64074224", "0.63712305", "0.61876214", "0.61864567", "0.6159088", "0.61543477", "0.6153316", "0.61428887", "0.6116904", "0.61084956", "0.6106097", "0.60391295", "0.60389197", "0.6019848", "0.5986674", "0.59860927", "0.5976762", "0.59668744", "0.59477085", "0.5901205", "0.58822954", "0.5878731", "0.5871747", "0.5848243", "0.58415335", "0.58413815", "0.5833248", "0.5825086", "0.58250594", "0.5806455", "0.58058864", "0.58041453", "0.58029646", "0.57660234", "0.57429475", "0.57429475", "0.57427984", "0.57279396", "0.5711024", "0.5692638", "0.5673827", "0.566948", "0.5664214", "0.5660662", "0.56602883", "0.5649529", "0.56371003", "0.56371003", "0.56371003", "0.56371003", "0.56371003", "0.56371003", "0.56371003", "0.56371003", "0.56371003", "0.5635351", "0.5633597", "0.5625998", "0.5625998", "0.5625998", "0.5625998", "0.5625998", "0.56185526", "0.5617039", "0.5617039", "0.5617039", "0.559846", "0.5595863", "0.5588903", "0.5571013", "0.5570181", "0.55631495", "0.55542296", "0.5544705", "0.5544705", "0.5544705", "0.5544705", "0.5544705", "0.5544705", "0.5544705", "0.5544705", "0.5544705", "0.5544705", "0.55306304", "0.5529163", "0.55278975", "0.5527834", "0.55129236", "0.55105746", "0.5509279", "0.5508973", "0.5508973", "0.5507722", "0.55054384", "0.5486495" ]
0.0
-1
/ marker_waiting_name coords type marker_done
public function __construct($chat_id) { $this->chat_id = $chat_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function finish(Marker $mark)\n\t{\n\t\t$this->finish = $mark;\n\t}", "public function getMarker($name);", "function ping(){\n\t\t$.ajax({url:\"handleajax.php\", success:function(result)\n\t\t{\n\t\t\tstat=false;\n\t\t\tvar obj=$.parseJSON(result);\n\t\t\tvar len=obj.length;\n\t\t\tvar i=0;\n\t\t\twhile(i<len)\n\t\t\t{\n\t\t\t\tvar lat=obj[i].lat;\n\t\t\t\tvar lon=obj[i].lon;\n\t\t\t\tvar status=\"\";\n\t\t\t\tstatus=space_status(obj[i].is_occupied,obj[i].is_reserved);\n\t\t\t\tvar google_latlon= new google.maps.LatLng(lat,lon);\n\t\t\t\tvar nmarker = new google.maps.Marker(\n\t\t\t\t{\n\t\t\t\t\tposition: google_latlon,\n\t\t\t\t\ttitle: \"Here you live!\",\n\t\t\t\t\ticon: status\n\t\t\t\t});\n\t\t\t\tnewmarkers.push(nmarker);\n\t\t\t\ti++;\n\t\t\t}\n\t\t\t\n\t\t\t// For the first time oldmarkers is 0\n\t\t\t// This runs for the first time\n\t\t\tif(oldmarkers.length<=0)\n\t\t\t{\n\t\t\t\tfor(b=0;b<newmarkers.length;b++)\n\t\t\t\t{\n\t\t\t\t\tnewmarkers[b].setMap(map);\n\t\t\t\t\tif(newmarkers[b].icon==\"vacant.png\"){\n\t\t\t\t\tgoogle.maps.event.addListener(newmarkers[b],'click',function(){popup.open(map,this)});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\toldmarkers=newmarkers;\n\t\t\t\tnewmarkers=[];\n\t\t\t}\n\t\t\t// For rest of the loop oldmarkers will have some objects\n\t\t\t// This is when comparision needed\n\t\t\telse if(oldmarkers.length>0)\n\t\t\t{\n\t\t\tvar rm_ind=[];\n\t\t\tvar map_rm_ind=[];\n\t\t\t\tfor(q=0;q<oldmarkers.length;q++)\n\t\t\t\t{\n\t\t\t\t\tstat=false;\n\t\t\t\t\tfor(w=0;w<newmarkers.length;w++)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar chk=oldmarkers[q].getPosition().equals(newmarkers[w].getPosition());\n\t\t\t\t\t\tstat |=chk;\n\t\t\t\t\t\tif(chk)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\toldmarkers[q].setIcon(newmarkers[w].icon);\n\t\t\t\t\t\t\t// Save these indices in array to remove at end of the loop\n\t\t\t\t\t\t\trm_ind.push(w);\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\tif(stat==false | stat==0)\n\t\t\t\t\t{\n\t\t\t\t\t// Store the indices to remove them from map\n\t\t\t\t\tmap_rm_ind.push(q);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//remove obsolete markers from map\n\t\t\t\tfor(u=0;u<map_rm_ind.length;u++)\n\t\t\t\t{\n\t\t\t\t\toldmarkers[u].setMap(null);\n\t\t\t\t\toldmarkers[u]=null;\n\t\t\t\t\toldmarkers.splice(u,1);\n\t\t\t\t}\n\t\t\t\tmap_rm_ind=[];\n\t\t\t\t// remove existing markers from newmarkers\n\t\t\t\tfor(f=0;f<rm_ind.length;f++)\n\t\t\t\t{\n\t\t\t\t\tnewmarkers.splice(f,1);\n\t\t\t\t}\n\t\t\t\trm_ind=[];\n\t\t\t\tfor(r=0;r<newmarkers.length;r++)\n\t\t\t\t{\n\t\t\t\t\tnewmarkers[r].setMap(map);\n\t\t\t\t\tif(newmarkers[r].icon==\"vacant.png\"){\n\t\t\t\t\tgoogle.maps.event.addListener(newmarkers[r],'click',function(){popup.open(map,this)});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\toldmarkers=oldmarkers.concat(newmarkers);\n\t\t\t\tnewmarkers=[];\n\t\t\t}\n\t\t\t\t\n\t}\n\t});\n\t}", "function extract_from_markers($filename, $marker)\n {\n }", "public function getDetachedMarker($name);", "public function mark( $name ) {\n $this->marker[$name] = microtime( ) ;\n }", "public function moveMarker(): void\n {\n $ind = $this->getPlayerIndexMarker();\n $this->players[$ind]->marker = false;\n\n if (++$ind >= count($this->players)) {\n $ind = 0;\n }\n $this->players[$ind]->marker = true;\n }", "public static function mark($name)\n {\n self::$marker[$name] = microtime(true);\n }", "function complete();", "public function detachMarker($name);", "function addMarker($idMed,$address,$lat,$lng,$type)\r\n {\r\n $request = sprintf(\"INSERT INTO markers \" .\r\n \" (id,idMedecin, address, lat, lng, type,date_creat, date_modif ) \" .\r\n \" VALUES (NULL,'%d', '%s', '%s', '%s', '%s',NOW(),NOW());\",\r\n $idMed,\r\n mysql_real_escape_string($address),\r\n mysql_real_escape_string($lat),\r\n mysql_real_escape_string($lng),\r\n mysql_real_escape_string($type)\r\n );\r\n \t\t \r\n \t\t new logTracing($request);\r\n \t\r\n \t\r\n \t\treturn parent::ExecuteRqSelect($request);\r\n \t\r\n \t\r\n \t}", "function _position_to_marker ($lat, $lon) {\r\n\t\t$urladd = rawurlencode($address);\r\n\t\t$url = \"http://maps.google.com/maps/api/geocode/json?latlng={$lat},{$lon}&sensor=false\";\r\n\t\t$result = wp_remote_get($url);\r\n\t\t$json = json_decode($result['body']);\r\n\r\n\t\tif (!$json) return false;\r\n\t\t$result = $json->results[0];\r\n\r\n\t\treturn array(\r\n\t\t\t'title' => $result->formatted_address,\r\n\t\t\t'body' => '',\r\n\t\t\t'icon' => 'marker.png',\r\n\t\t\t'position' => array (\r\n\t\t\t\t$result->geometry->location->lat,\r\n\t\t\t\t$result->geometry->location->lng\r\n\t\t\t),\r\n\t\t);\r\n\t}", "public function complete();", "public function complete();", "protected function getTemplateMarkersCheck() {}", "public function markers($field, $markers, $params)\n\t{\n\t\tif(is_array($markers))\n\t\t{\n\t\t\t// pull off the last marker and check and see if the data is valid\n\t\t\t$last_marker = array_pop($markers);\n\n\t\t\treturn (!empty($last_marker['name']) && !empty($last_marker['text']));\n\t\t}\n\n\t\treturn (!empty($markers));\n\t}", "function finish(){\r\n\t}", "function _done()\n {\n $this->_getFillStyle();\n $this->_canvas->rectangle(\n \tarray(\n \t\t'x0' => $this->_fillLeft(),\n \t'y0' => $this->_fillTop(),\n \t'x1' => $this->_fillRight(),\n \t'y1' => $this->_fillBottom()\n )\n );\n\n $scaledWidth = $this->_mapSize['X']*$this->_scale;\n $scaledHeight = $this->_mapSize['Y']*$this->_scale;\n\n $this->_canvas->image(\n \tarray(\n \t'x' => $this->_plotLeft,\n \t'y' => $this->_plotTop,\n \t'filename' => $this->_imageMap,\n \t'width' => $scaledWidth,\n \t'height' => $scaledHeight\n )\n );\n\n return Image_Graph_Layout::_done();\n }", "public function agen_marker($isDetail = TRUE, $data='', $isSugesti = FALSE)\n {\n if($isSugesti){\n if ($data != 'semua') {\n $marker = array();\n $marker['position'] = $data->lattitude.', '.$data->longitude;\n $marker['infowindow_content'] = $data->id_agen.\"-\".$data->nama_agen.\"<br>\".$data->alamat_agen;\n $marker['draggable'] = FALSE;\n $marker['icon'] = base_url('asset/img/marker/Agen'.$this->urutanagen.'.png');\n $this->googlemaps->add_marker($marker);\n }else{\n $dataAgen = $this->GetCoorAllAgen();\n\n foreach ($dataAgen as $key => $value) {\n if ($value['lattitude'] != '' && $value['longitude'] != '') {\n \n $marker = array();\n $marker['position'] = $value['lattitude'].', '.$value['longitude'];\n $marker['infowindow_content'] = $value['nama_agen'].\"<br>\".$value['alamat_agen'];\n $marker['icon'] = base_url('asset/img/marker/Agen'.$this->urutanagen.'.png');\n $this->googlemaps->add_marker($marker);\n }\n }\n }\n }else{\n\n if ($isDetail) {\n if ($data->lattitude != '' && $data->longitude != '') {\n $position = $data->lattitude.', '.$data->longitude;\n }else{\n $position = '-7.979178376432889, 112.62477099895477';\n }\n $marker = array();\n $marker['position'] = $position;\n $marker['infowindow_content'] = $data->id_agen.\"-\".$data->nama_agen.\"<br>\".$data->alamat_agen;\n $marker['draggable'] = TRUE;\n $marker['animation'] = 'DROP';\n $marker['ondragend'] = 'updateDatabase(event.latLng.lat(), event.latLng.lng());';\n $marker['icon'] = base_url('asset/img/marker/Agen.png');\n $this->googlemaps->add_marker($marker);\n }\n }\n // foreach ($data as $key => $value) {\n // print_r($key);die;\n // $marker = array();\n // }\n }", "function playerFinish($finish) {\n\n\t\t// if no map info, or if server 'finish', bail out immediately\n\t\tif ($this->server->map->name == '' || $finish[0] == 0)\n\t\t\treturn;\n\n\t\t// if relay server or not in Play status, bail out immediately\n\t\tif ($this->server->isrelay || $this->currstatus != 4)\n\t\t\treturn;\n\n\t\t// check for valid player\n\t\tif ((!$player = $this->server->players->getPlayer($finish[1])) ||\n\t\t $player->login == '')\n\t\t\treturn;\n\n\t\t// build a record object with the current finish information\n\t\t$finish_item = new Record();\n\t\t$finish_item->player = $player;\n\t\t$finish_item->score = $finish[2];\n\t\t$finish_item->date = strftime('%Y-%m-%d %H:%M:%S');\n\t\t$finish_item->new = false;\n\t\t$finish_item->map = clone $this->server->map;\n\t\tunset($finish_item->map->gbx); // reduce memory usage\n\t\tunset($finish_item->map->mx);\n\n\t\t// throw prefix 'player finishes' event (checkpoints)\n\t\t$this->releaseEvent('onPlayerFinish1', $finish_item);\n\t\t// throw main 'player finishes' event\n\t\t$this->releaseEvent('onPlayerFinish', $finish_item);\n\t}", "protected function getDefaultMarkers() {}", "public function getMarker()\n {\n\t\treturn $this->_marker;\n\t}", "private function buildMarker() {\n $result = '';\n $i = 1;\n\n foreach($this->locations as $location) {\n $result .= '&markers=color:0x' . $this->randomHexColor() . '%7Clabel:' . $i . '%7C' . $location->latitude . ',' . $location->longitude;\n $i++;\n }\n\n return $result;\n }", "function getMarker() {\n\t\treturn $this->marker;\n\t}", "public function resetMarker()\n {\n $this->currentMarker = -1;\n }", "public function getLocationMarkerLabel()\n {\n return $this->MarkerLabel ?: $this->MarkerLabel;\n }", "function completeCallback()\r\n { }", "function xDisplayMarker($ar){\n $p = new XParam($ar, array('tplentry'=>'br', 'markertemplate'=>'xmodmap/displaymarker.xml'));;\n $layeroid = $p->get('layeroid');\n $oid = $p->get('oid');\n $template = $p->get('markertemplate');\n $tpl = $p->get('tplentry');\n $modmap = $this->xset->rdisplay($layeroid);\n if (!is_array($modmap)){\n XLogs::critical(get_class($this), get_class($this).\"::simpleLayerKML layer not found {$layeroid}\");\n die('Could not find layeroid '.$layeroid);\n }\n $mod = XModule::objectFactory($modmap['ormoid']->raw);\n if (!empty($modmap['orfilter']->raw)){\n $select = $mod->xset->select_query().' and '.$modmap['orfilter']->raw;\n } else {\n $select = $mod->xset->select_query();\n }\n if (!is_array($oid)){\n $select .= ' and '.$mod->table.'.KOID = \\''.$oid.'\\'';\n } else {\n foreach($oid as $foo=>&$aoid){\n\t$aoid = '\\''.$aoid.'\\'';\n }\n $select .= ' and '.$mod->table.'.KOID in (' . implode(\",\", $oid) . ')';\n }\n\n $br = $mod->browse(array('_options'=>array(),\n\t\t\t 'tplentry'=>TZR_RETURN_DATA,\n\t\t\t 'selectedfields'=>'all',\n\t\t\t 'first'=>0,\n\t\t\t 'select'=>$select,\n\t\t\t 'pagesize'=>9999));\n $places = array();\n $fname = $modmap['ofname']->raw;\n foreach($br['lines_oid'] as $i=>$lineoid){\n $coords = $br['lines_o'.$fname][$i]->raw;\n list($lat, $lng, $type, $acc, $upd) = explode(';', $coords);\n $aplace = $this->getPlace($i, $mod, $br, $modmap);\n if (!empty($lat) && !empty($lng)){\n\t$aplace['valid'] = true;\n } else {\n\t$aplace['valid'] = false;\n }\n $places[] = array('oid'=>$lineoid,\n\t\t\t'latlng'=>$lng.','.$lat,\n\t\t\t'name'=>$aplace['name'],\n\t\t\t'valid'=>$aplace['valid'],\n\t\t\t'description'=>$aplace['descr']);\n unset($aplace);\n }\n $ret = array('places'=>$places,\n\t\t 'browse'=>$br,\n\t\t 'modmap'=>$modmap);\n $xt = new XTemplate('file://'.TZR_SHARE_DIR.$template);\n if (file_exists(TZR_SHARE_DIR.$template)){\n $xt = new XTemplate('file://'.TZR_SHARE_DIR.$template);\n } else if (file_exists($GLOBALS['TEMPLATES_DIR'].$template)){\n $xt = new XTemplate('file://'.$GLOBALS['TEMPLATES_DIR'].$template);\n } else {\n echo('-');\n exit(0);\n }\n $labels=&$GLOBALS['XSHELL']->labels->get_labels(array('selectors'=>array('global'),'local'=>true));\n $xt->set_glob(array('labels'=>&$labels));\n $r3=array();\n // avoir vide ... die($tpl);\n $tpldata['br']=$ret;\n $content=$xt->parse($tpldata,$r3,NULL);\n header('Content-type: text/xml');\n header('Content-disposition: inline');\n echo($content);\n exit(0); \n }", "protected function getUserFieldMarkers() {}", "private function set_markerArray()\n {\n $markerArray = $this->pObj->objMarker->extend_marker();\n $this->markerArray = $markerArray;\n\n// // Add mode and view\n// $this->markerArray['###MODE###'] = $this->pObj->piVar_mode;\n// $this->markerArray['###VIEW###'] = $this->pObj->view;\n//\n// // Add cObj->data and piVars\n// $this->markerArray = $this->pObj->objMarker->extend_marker_wi_cObjData($this->markerArray);\n// $this->markerArray = $this->pObj->objMarker->extend_marker_wi_pivars($this->markerArray);\n }", "public function markAsDone() {\n\t\t$sql = \"UPDATE\twbb\".WBB_N.\"_thread\n\t\t\tSET\tisDone = 1\n\t\t\tWHERE\tthreadID = \".$this->threadID;\n\t\tWCF::getDB()->sendQuery($sql);\n\t}", "abstract public function isComplete();", "public function markCompeted() {\n $this->status = self::COMPLETED;\n }", "protected function placeMarker($suffix = '')\n {\n Log::info(\"test marker {$suffix}\");\n }", "public function mark($name)\n {\n $this->_marks[$name] = microtime(true);\n }", "public function isFinished();", "public function getLPCompleted();", "public function passingInvalidMarkersThrowsExceptionDataProvider() {}", "public function afficheMarker(){\r\n \r\n $request = $this->_bdd->query(\"SELECT gps.`id`, gps.id_bateau, gps.latitude, gps.longitude, bateau.nom FROM gps, bateau WHERE gps.id_bateau = bateau.id ORDER BY `gps`.`id` DESC\");\r\n while ($tab = $request->fetch()){ ?>\r\n <script> \r\n \"<?= $tab['nom'] ?>\":{\r\n \"lat\": <?= $tab['latitude'] ?>;\r\n \"lon\": <?= $tab['longitude'] ?>;\r\n };\r\n </script>\r\n <?php\r\n } \r\n}", "public static function setMarker($name)\n {\n if (self::$_sessionBenchmarkOn) {\n $markerTime = microtime(TRUE) - self::$_sessionBenchmarkMarker;\n\n $markerColor = FALSE;\n if (!empty(self::$_groupOn)) {\n $markerColor = self::$_backgroundColor;\n foreach (self::$_group as $marker => $info) {\n if (!isset(self::$_group[$marker]['time'])) {\n $groupMarkerTime = $markerTime;\n } else {\n $groupMarkerTime = self::$_group[$marker]['time'] + $markerTime;\n }\n self::$_group[$marker]['time'] = $groupMarkerTime;\n }\n }\n\n self::$_sessionBenchmarkMarker = microtime(TRUE);\n self::$_sessionBenchmarkMarkers[] = array(\n 'marker_name' => $name,\n 'marker_time' => $markerTime,\n 'marker_memory' => memory_get_usage(),\n 'marker_color' => $markerColor\n );\n }\n }", "public function getAllFinished(): array;", "public static function markEnd($label)\n\t{\n\t\tstatic::isEnabled(static::MARK) and static::$_marks[$label] = array(\n\t\t\t'time' => (microtime(true) - static::$_marks[$label]['time']),\n\t\t\t'name' => $label,\n\t\t\t'stopped' => true,\n\t\t);\n\t}", "public function LoadMarkerData($listing_type, $marker_id)\n\t{\n\t\tif( !$this->request->is('ajax') && !Configure::read('debug') > 0)\n\t\t\treturn;\n\t\t\n\t\t$this->layout = 'ajax';\n\t\t$listings = $this->Listing->GetMarkerData($listing_type, $marker_id, $this->_getUserId());\n\t\t$this->set('response', json_encode($listings));\n\t}", "public function done(){\n\t\t$this->done=true;\n\t}", "function bim_allocate_markers( $bim, $cm, $userid ) {\n global $CFG, $OUTPUT;\n\n // **** SET UP THE DATA\n // get all the groups for the course\n $groups = groups_get_all_groups( $cm->course );\n // get all the users who can mark/coordinator this activity\n $context = context_module::instance( $cm->id );\n $markers = get_users_by_capability( $context,\n array( 'mod/bim:marker', 'mod/bim:coordinator' ),\n 'u.id,u.firstname,u.lastname', 'u.lastname',\n '', '', '', '', false );\n\n // error if no markers\n if ( empty( $markers )) {\n echo $OUTPUT->heading( get_string( 'bim_allocate_marker_nomarkers_heading', 'bim'), 2 );\n print_string( 'bim_allocate_marker_nomarkers_description', 'bim' );\n return;\n }\n\n // now exclude all those nasty managers and other folk who aren't\n // actually teaching into the course\n $markers_ids = array_keys( $markers );\n $enrolled_ids = array();\n $enrolled_markers = array();\n foreach ( $markers_ids as $id ) {\n if ( is_enrolled( $context, $id, '', true )) {\n array_push( $enrolled_ids, $id );\n $enrolled_markers[$id] = $markers[$id];\n }\n }\n $markers_allocations = bim_get_all_markers_groups( $bim, $enrolled_ids );\n // Connect the groups for each marker into $markers->allocations\n // Markers_allocations will be empty initially\n if ( $markers_allocations ) {\n foreach ($markers_allocations as $allocation) {\n $enrolled_markers[$allocation->userid]->allocations[$allocation->groupid] =\n $allocation->groupid;\n }\n }\n\n // If there are no groups, display error and no form\n if ( empty( $groups )) {\n echo $OUTPUT->heading( get_string( 'bim_allocate_marker_nogroups_heading', 'bim'), 2 );\n print_string( 'bim_allocate_marker_nogroups_description', 'bim' );\n return;\n }\n\n // *** PROCESS AND DISPLAY\n // create the form\n $allocate_form = new marker_allocation_form( 'view.php',\n array( 'groups' => $groups, 'markers' => $enrolled_markers,\n 'id' => $cm->id ) );\n\n // process it\n if ( ! $allocate_form->is_submitted() ) {\n $event = \\mod_bim\\event\\markerAllocation_started::create(array(\n 'context' => context_module::instance($cm->id),\n 'objectid' => $cm->id\n ));\n $event->trigger();\n\n $heading = get_string('bim_allocate_marker_heading', 'bim' );\n echo $OUTPUT->heading( $heading, 2, 'left' );\n print_string('bim_allocate_marker_description', 'bim' );\n\n $toform = new StdClass;\n // for each marker set up $toform based on their current allocations\n foreach ($enrolled_markers as $marker) {\n // only proceed if there are groups currently allocated in the dbase\n if ( isset( $marker->allocations ) ) {\n $id = \"groups_\".$marker->id;\n $toform->$id = array_keys( $marker->allocations );\n $g = $toform->$id;\n }\n }\n $allocate_form->set_data( $toform );\n $allocate_form->display();\n } else if ( $fromform = $allocate_form->get_data() ) {\n process_markers_form( $markers, $fromform, $groups, $bim, $cm );\n\n $url=\"$CFG->wwwroot/mod/bim/view.php?id=$cm->id&tab=markers\";\n print_string( 'bim_continue', 'bim', $url );\n }\n}", "function humanize_point($location) {\n\tglobal $global_mysqli_link;\n\tglobal $protokd_point_start, $protokd_point_finish;\n\tglobal $message_start, $message_finish;\n\tglobal $gmaps_geocode_url, $gmaps_server_key, $maximum_http_response_size;\n\tglobal $cache_geocoding;\n\n\t//location = start, return message start\n\tif ($location == $protokd_point_start) {\n\t\treturn $message_start;\n\t} else if ($location == $protokd_point_finish) {\n\t//location = finish, return message start\n\t\treturn $message_finish;\n\t} else {//selain start atau finish\n\t\t//escape string location untuk dimasukkan ke query sql\n\t\t$location = mysqli_escape_string($global_mysqli_link, $location);\n\n\t\t//cek cache ada dengan key cache_geocoding,value location\n\t\t$cached_geocode = get_from_cache($cache_geocoding, $location);\n\t\t//kalo tidak null, return langsung\n\t\tif (!is_null($cached_geocode)) {\n\t\t\treturn $cached_geocode;\n\t\t} else {//jika null cachenya\n\n\t\t\t// query from google.\n\t\t\t$full_url = \"$gmaps_geocode_url?key=$gmaps_server_key&latlng=$location&sensor=false\";\n\t\t\t$result = file_get_contents($full_url, NULL, NULL, 0, $maximum_http_response_size + 1);\n\t\t\tif ($result == FALSE) {\n\t\t\t\tdie_nice(\"There's an error while reading the geocoding response from $full_url.\");\n\t\t\t}\n\t\t\t// TODO this checking doesn't seem to work.\n\t\t\tif (sizeof($result) > $maximum_http_response_size) {\n\t\t\t\tdie_nice(\"Data returned from $full_url is greater than the maximum.\");\n\t\t\t}\n\t\t\t$json_response = json_decode($result, true);\n\t\t\tif ($json_response == NULL) {\n\t\t\t\tdie_nice(\"Unable to retrieve JSON response from Google geocoding service.\");\n\t\t\t}\n\t\t\t//add sugestion place\n\t\t\tif ($json_response['status'] == 'OK') {\n\t\t\t\t$bestguess = $location;\n\t\t\t\tfor ($i = 0; $i < count($json_response['results']); $i++) {\n\t\t\t\t\tforeach ($json_response['results'][0]['address_components'] as $component) {\n\t\t\t\t\t\tif (in_array('transit_station', $component['types']) || in_array('route', $component['types'])) {\n\t\t\t\t\t\t\tput_to_cache($cache_geocoding, $location, $component['long_name']);\n\t\t\t\t\t\t\treturn $component['long_name'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$bestguess = $component['long_name'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlog_error(\"Warning: can't find street name, use best guess $bestguess for $location.\");\n\t\t\t\tput_to_cache($cache_geocoding, $location, $bestguess);\n\t\t\t\treturn $bestguess;\n\t\t\t} else if ($json_response['status'] == 'ZERO_RESULTS') {\n\t\t\t\t// If not found, return the coordinate.\n\t\t\t\tlog_error(\"Warning: can't find coordinate for $location.\");\n\t\t\t\treturn $location;\n\t\t\t} else {\n\t\t\t\tdie_nice(\"Problem while geocoding from Google reverse geocoding: \" . $result);\n\t\t\t}\n\t\t}\n\t}\n}", "abstract protected function renderComplete();", "public function getNextMarker()\n {\n $this->currentMarker++;\n if($this->currentMarker > count($this->markers)) return false;\n else return $this->getCurrentMarker();\n }", "function generateMarkerData($items)\n\t{\n\t\t$key = null;\n\n\t\tforeach ($items as $item)\n\t\t{\n\t\t\t// Filter by region\n\t\t\tif (JRequest::getVar('region') != '' && !in_array(JRequest::getVar('region'), explode(',', $item->categoryIDs)))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tforeach (json_decode($item->locations, true) as $type => $locales)\n\t\t\t{\n\t\t\t\t// Filter locations by type if belonging to the designated category\n\t\t\t\tif (($item->catid === $this->params->get('artistCategory')) && ($type != JRequest::getVar('location')))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tforeach ($locales as $name => $data)\n\t\t\t\t{\n\t\t\t\t\t$markers[$key]['alias'] = $item->alias;\n\t\t\t\t\t$markers[$key]['info'] = $item->introtext;\n\t\t\t\t\t$markers[$key]['lat'] = $data['lat'];\n\t\t\t\t\t$markers[$key]['lng'] = $data['lng'];\n\t\t\t\t\t$markers[$key]['loc'] = $name;\n\t\t\t\t\t$markers[$key]['title'] = $item->title;\n\t\t\t\t\t$markers[$key]['type'] = $type;\n\t\t\t\t\t$markers[$key]['category'] = $item->category;\n\n\t\t\t\t\tif (array_key_exists('itemImage', $item->universalFields))\n\t\t\t\t\t{\n\t\t\t\t\t\t$markers[$key]['image'] = $item->universalFields->itemImage;\n\t\t\t\t\t}\n\n\t\t\t\t\t$key++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $markers;\n\t}", "public function move_markers() {\r\n\t\t$db = Maps_Marker_Pro::get_instance('MMP\\DB');\r\n\r\n\t\tif (!isset($_POST['nonce']) || wp_verify_nonce($_POST['nonce'], 'mmp-tools-move-markers') === false) {\r\n\t\t\twp_send_json(array(\r\n\t\t\t\t'success' => false,\r\n\t\t\t\t'message' => esc_html__('Security check failed', 'mmp')\r\n\t\t\t));\r\n\t\t}\r\n\t\tif (!isset($_POST['source']) || !isset($_POST['target'])) {\r\n\t\t\twp_send_json(array(\r\n\t\t\t\t'success' => false,\r\n\t\t\t\t'message' => esc_html__('Source or target missing', 'mmp')\r\n\t\t\t));\r\n\t\t}\r\n\t\t$source = $db->get_map($_POST['source']);\r\n\t\t$target = $db->get_map($_POST['target']);\r\n\t\tif (!$source || !$target) {\r\n\t\t\twp_send_json(array(\r\n\t\t\t\t'success' => false,\r\n\t\t\t\t'message' => esc_html__('Source or target not found', 'mmp')\r\n\t\t\t));\r\n\t\t}\r\n\t\t$ids = array();\r\n\t\tforeach ($db->get_map_markers($source->id) as $marker) {\r\n\t\t\t$ids[] = $marker->id;\r\n\t\t}\r\n\t\t$db->unassign_all_markers($source->id);\r\n\t\t$db->assign_markers($target->id, $ids);\r\n\t\twp_send_json(array(\r\n\t\t\t'success' => true,\r\n\t\t\t'message' => esc_html__(\"Markers from map {$source->id} successfully moved to map {$target->id}\", 'mmp'),\r\n\t\t\t'maps' => $this->get_map_list()\r\n\t\t));\r\n\t}", "public static function markStart($label)\n\t{\n\t\tstatic::isEnabled(static::MARK) and static::$_marks[$label] = array(\n\t\t\t'time' => microtime(true),\n\t\t\t'name' => $label,\n\t\t\t'stopped' => false,\n\t\t);\n\t}", "protected function getTemplateMarkers() {}", "protected function getTemplateMarkers() {}", "public function clearFinished();", "public function start($name) {\n $this->marks[$name]['start'] = microtime();\n }", "public function getCurrentMarker()\n {\n if($this->currentMarker < 0 || $this->currentMarker > count($this->markers) - 1) return false;\n return $this->markers[$this->currentMarker];\n }", "private function addMarkers()\n {\n $users = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'fe_users', $this->getUserFilter());\n while (($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($users)))\n {\n\n\n $this->addMarker($row, $this->getGroupIcon($row['usergroup'],$row['uid']));\n //$marker = $this->map->addMarkerByAddress( $title, $description, $singleConf['minzoom'], $singleConf['maxzoom'], $iconId );\n }\n }", "function isCompleted(){\r\n\t\treturn $this->status==IFocusModel::COMPLETE;\r\n\t}", "public function setFinished($value)\t\r\n\t{\r\n\t\tif ( is_bool($value) )\r\n\t\t{\r\n\t\t\t$this->finished = $value;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tthrow new \\InvalidArgumentException(\"param 1 must be of type bool\");\r\n\t\t}\r\n\t}", "function mapArchiveFunc(){\n global $osfw;\n $returnObj = array();\n $mapid = $_POST['mapid'];\n $marker_size = $_POST['marker_size'];\n $query_args = $_POST['query_args'];\n\n $the_query = new WP_Query( $query_args );\n if ($the_query->have_posts()) {\n $i=0;\n while($the_query->have_posts()) {\n $the_query->the_post();\n $loop_gmap = get_post_meta( get_the_id(), 'acf_landmark_gmap', true );\n $loop_address = get_post_meta( get_the_id(), 'acf_landmark_address', true );\n // marker image\n $marker_id = get_post_meta( get_the_ID(), 'acf_landmark_gmap_marker', true );\n if( $marker_size==='img_marker_large' ) {\n $set_marker_size = 'img_marker_large';\n } else if( $marker_size==='img_marker_middle' ) {\n $set_marker_size = 'img_marker_middle';\n } else if( $marker_size==='img_marker_small' ) {\n $set_marker_size = 'img_marker_small';\n } else {\n $set_marker_size = 'full';\n }\n $temp_marker = $osfw->get_thumbnail( $marker_id, $set_marker_size, get_stylesheet_directory_uri() . '/images/common/noimage-100.jpg' );\n $marker = $temp_marker['src'];\n $returnObj['markerDataAjax'][$i]['id'] = $mapid . \"_\" . get_the_id();\n $returnObj['markerDataAjax'][$i]['name'] = get_the_title();\n $returnObj['markerDataAjax'][$i]['lat'] = floatval($loop_gmap['lat']);\n $returnObj['markerDataAjax'][$i]['lng'] = floatval($loop_gmap['lng']);\n $returnObj['markerDataAjax'][$i]['cat'] = $term_list;\n $returnObj['markerDataAjax'][$i]['cat_icon'] = $marker;\n $returnObj['markerDataAjax'][$i]['infoWindowContent'] = gmap_infowindow( get_the_id(), $mapid . \"_\" . get_the_id() );\n // $returnObj['tags'] .= get_tag_postlist( get_the_id(), 'landmark_cateogry', $loop_address );\n $i++;\n }\n }\n echo json_encode( $returnObj );\n die();\n}", "function insert_with_markers($filename, $marker, $insertion)\n {\n }", "protected function isWon($marker) {\n $markedBox = $this->_markers[$marker];\n foreach ($this->_winningCombination AS $box) {\n $lineBoxes = explode(\",\", $box); //separate the winning combination to 3\n if (in_array($lineBoxes[0], $markedBox) && in_array($lineBoxes[1], $markedBox) && in_array($lineBoxes[2], $markedBox)) {\n echo \"Player $marker won!\" . PHP_EOL;\n return TRUE;\n }\n }\n return FALSE;\n }", "private function update_positions(){\n // update the point positions\n $start_point = 0;\n $end_point = 0;\n $nr_points = count ($this->points);\n do{\n $continue = false;\n\n // find a stop point with specified position\n for ($i = $start_point; $i < $nr_points; $i++)\n {\n $end_point = $i ;\n if (! $this->points[$i]['auto_position'])\n {\n break;\n }\n }\n\n // update the positions for all the points between start point end endpoint\n //TODO:\n }while($continue);\n\n }", "public function mark_complete() {\n // Create record\n $this->timecompleted = time();\n\n // Save record\n if ($this->id) {\n $this->update();\n } else {\n $this->insert();\n }\n\n // Mark course completion record as started (if not already)\n $cc = array(\n 'course' => $this->course,\n 'userid' => $this->userid\n );\n $ccompletion = new completion_completion($cc);\n $ccompletion->mark_inprogress($this->timecompleted);\n }", "function runningPlay() {\n\t\t// request information about the new map\n\t\t// ... and callback to function newMap()\n\t}", "public function done();", "function Mark_Time($sMarker) {\t\t$timeNow=microtime();\n\t\t$nMarks=++$this->nTimeMarks;\n\t\n\t\tif (!strlen($sMarker)) {\n\t\t\t$sMarker = \"Mark not set\";\n\t\t}\n\t\n\t\t$this->aTimeMarks[$nMarks]=array(\n\t\t'Index' => ($this->nTimeMarks),\n\t\t'What' => $sMarker,\n\t\t'%Time' => 0,\n\t\t'%DB Time' => 0,\n\t\t'%DB Count' => 0,\n\t\t'Time' => $timeNow,\n\t\t'DB Time' => 0,\n\t\t'DB Count' => 0\n\t\t);\n\t\n\t\t$this->aOBMarks[$nMarks]=ob_get_level().'('.ob_get_length().')';\n\t\t$this->curTimeMark=$sMarker;\n\t\n\t\t// Add any desired notes to $aMarkNotes[$nMarks]... e.g.\n\t\t//global $eTimingStart;\n\t\t//$this->aMarkNotes[$nMarks] .= \"verify start: \".$eTimingStart.\"<br />\";\n\t}", "private function _getMarkers($filebase)\n {\n $markers = [\n 'centroid' => [\n 'colour' => $this->_image->getImageParams('centroid_col'),\n 'filename' => $filebase . '_centroid.png'\n ]\n ];\n\n if ($this->_image->getImageParams('resolution') <= $this->_qobject->getMajDiam()) {\n $markers['diameter'] = [\n 'colour' => $this->_image->getImageParams('centroid_col'),\n 'filename' => $filebase . '_diameter.png',\n 'linetype' => $this->_qobject->getFlagMajDiam() ? 'dashed' : 'solid'\n ];\n }\n\n// if ($this->_image->getImageParams('resolution') <= $this->_qobject->getMajDiam()) {\n// $markers['diameter'] = [\n// 'colour' => $this->_image->getImageParams('centroid_col'),\n// 'filename' => $filebase . '_diameter.png'\n// ];\n// }\n\n if ($this->_qobject->getCS_DRAJ2000() != null && $this->_qobject->getCS_DDECJ2000() != null) {\n $markers['CS_pos'] = [\n 'colour' => $this->_image->getImageParams('CS_pos_col'),\n 'filename' => $filebase . '_CS_pos.png'\n ];\n\n }\n\n $this->mylogger->logMessage(\"Set markers to:\" . json_encode($markers), $this, 'info');\n\n return $markers;\n\n }", "function get_buffer_polygone_for_point_wkt($lon,$lat,$d_metres){\n \n $points = array();\n for($i = 0; $i < 360; $i = $i + 10){\n $points[] = get_point_for_distance($lon,$lat,$d_metres / 1000,$i);\n }\n \n // print_r($points);\n \n $out = \"POLYGON((\";\n for($i = 0; $i < count($points); $i++){\n if($i > 0) $out .= ', ';\n $out .= implode(' ', $points[$i]);\n }\n $out .= ', ' . implode(' ', $points[0]); // ends with start point\n $out .= \"))\";\n \n return $out;\n \n}", "public function getMarkerFactory();", "public function getMarkerIndex()\n {\n return $this->currentMarker;\n }", "function goal($name, $progress, $goal){\n\treturn array(\n\t\t\"name\"=>$name,\n\t\t\"progress\"=>($progress*100).\"%\",\n\t\t\"goal\" => $goal\n\t);\n}", "public function finish()\n\t{\t\n\t\tfor($ix=0; $ix<$this->track_total; $ix++) {\n\t\t\t$this->track_ix = $ix;\n\t\t\t$this->loopEnd[$this->track_ix] = count($this->events[$this->track_ix]);\n\t\t}\n\t\t\n\t\t# Create loop of previously created data here\n\t\tfor($z=0;$z<$this->loop;$z++) {\n\t\t\tfor($ix=0; $ix<$this->track_total; $ix++) {\n\t\t\t\t$this->track_ix = $ix;\n\t\t\t\tfor($j=$this->loopStart[$this->track_ix];$j<$this->loopEnd[$this->track_ix];$j++) {\n\t\t\t\t\t$this->events[$this->track_ix][] = $this->events[$this->track_ix][$j];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function onFinish(\\swoole_server $server, $taskId, $taskObj)\n {\n }", "public function getFinished(): int;", "protected function _cleanMarkers($type)\n {\n switch ($type) {\n case'loop':\n $reg1 = '#{;(start|end);([\\\\w-])+;}#';\n $reg2 = FALSE;\n $reg3 = '{;start;';\n $reg4 = '{;end;';\n break;\n\n case'optional':\n $reg1 = '#{;op;([\\\\w-])+;}#';\n $reg2 = $this->_contentMarkers;\n $reg3 = '{;op;';\n $reg4 = '{;op_end;';\n break;\n\n default:\n return;\n break;\n }\n\n preg_match_all($reg1, $this->DISPLAY, $array);\n if (!empty($array) && !empty($array[0])) {\n foreach ($array[0] as $marker) {\n\n $start = strpos($this->DISPLAY, $marker);\n $endMarker = str_replace($reg3, $reg4, $marker);\n $end = strpos($this->DISPLAY, $endMarker);\n\n if (!$start || !$end) {\n continue;\n }\n\n $startContent = $start + mb_strlen($marker);\n $contentLength = $end - $startContent;\n $string = substr($this->DISPLAY, $startContent, $contentLength);\n $end += mb_strlen($endMarker);\n $len = $end - $start;\n $stringToRemove = substr($this->DISPLAY, $start, $len);\n\n if ($reg2) {\n $bool = preg_match($reg2, $string);\n if ($bool) {\n $this->DISPLAY = str_replace($stringToRemove, '', $this->DISPLAY);\n } else {\n $this->DISPLAY = str_replace($stringToRemove, $string, $this->DISPLAY);\n }\n } else {\n $this->DISPLAY = preg_replace($reg1, '', $this->DISPLAY);\n }\n }\n }\n }", "public function finishJob()\r\n {\r\n $this->done = true;\r\n }", "public function createMarker(array $params): string\n {\n $content = '';\n\n // if entry in db\n if (isset($params['row']['marker']) && !empty($params['row']['marker'])) {\n $marker = $params['row']['marker'];\n } else {\n // no entry - take \"marker\"\n $marker = 'marker';\n }\n\n // field just generated\n if (stristr((string)$params['row']['uid'], 'NEW')) {\n $content .= '<span style=\"background-color: #F4DA5C; padding: 5px 10px; display: block;\">';\n $content .= 'Please save before...';\n $content .= '</span>';\n // was saved before\n } else {\n $content .= '<span style=\"background-color: #ddd; padding: 5px 10px; display: block;\">';\n $content .= '{' . strtolower($marker) . '}';\n $content .= '</span>';\n $content .= '<input type=\"hidden\" name=\"data[' . Field::TABLE_NAME . '][' .\n $params['row']['uid'] . '][marker]\" value=\"' . strtolower($marker) . '\" />';\n }\n\n return $content;\n }", "private function _mark_as_done($handle, $type)\n\t{\n\t\tglobal $wp_scripts, $wp_styles;\n\n\t\t$media = 'script' == $type ? $wp_scripts : $wp_styles;\n\n\t\t$media->done[] = $handle;\n\t}", "public function run()\n {\n $L = 50;\n $position = [\"lat\" => -13.929307, \"lng\" => -78.074548,];\n $position2 = \\GeometryLibrary\\SphericalUtil::computeOffset($position, $L*3, 90);\n $position3 = \\GeometryLibrary\\SphericalUtil::computeOffset($position, $L*sqrt(3), 120);\n\n //for ($i=0; $i < 2000; $i++) {\n for ($i=0; $i < 2000; $i++) {\n $this->rawHexagon($position2, $L, 4000);\n $this->rawHexagon($position3, $L, 4000);\n echo(\"Step :\".$i.\"\\n\");\n $position = $position2;\n $position2 = \\GeometryLibrary\\SphericalUtil::computeOffset($position, $L*3, 90);\n $position3 = \\GeometryLibrary\\SphericalUtil::computeOffset($position, $L*sqrt(3), 120);\n }\n\n\n }", "public function countMarkers()\n {\n return count($this->containingMarkers);\n }", "public function qualifyAsFinished(): bool;", "private function doSimpleRequest($type)\n {\n $source = parent::doRequest();\n\n /* We make sure there is an XML answer and try to parse it */\n if ($source !== false) {\n parent::parseResponse($source);\n if (count($this->resp_errors_list) == 0) {\n $point = $this->xpath->query('/' . $type)->item(0);\n $point_detail = array(\n 'code' => $this->xpath->query('./code', $point)->item(0)->nodeValue,\n 'name' => $this->xpath->query('./name', $point)->item(0)->nodeValue,\n 'address' => $this->xpath->query('./address', $point)->item(0)->nodeValue,\n 'city' => $this->xpath->query('./city', $point)->item(0)->nodeValue,\n 'zipcode' => $this->xpath->query('./zipcode', $point)->item(0)->nodeValue,\n 'country' => $this->xpath->query('./country', $point)->item(0)->nodeValue,\n 'latitude' => $this->xpath->query('./latitude', $point)->item(0)->nodeValue,\n 'longitude' => $this->xpath->query('./longitude', $point)->item(0)->nodeValue,\n 'phone' => $this->xpath->query('./phone', $point)->item(0)->nodeValue,\n 'description' => $this->xpath->query('./description', $point)->item(0)->nodeValue);\n\n /* We get open and close informations */\n $schedule = array();\n foreach ($this->xpath->query('./schedule/day', $point) as $d => $day_node) {\n $childs = $this->xpath->query('*', $day_node);\n foreach ($childs as $child_node) {\n if ($child_node->nodeName != '#text') {\n $schedule[$d][$child_node->nodeName] = $child_node->nodeValue;\n }\n }\n }\n $point_detail['schedule'] = $schedule;\n\n /* We store the data in the right array (defined by $type) */\n if (!isset($this->points[$type])) {\n $this->points[$type] = array();\n }\n $this->points[$type][] = $point_detail;\n }\n }\n }", "public function progressFinish() {}", "function check_geolocation($nameofgeo){\n\t$url = \"https://maps.googleapis.com/maps/api/place/findplacefromtext/json?input=\".str_replace(\" \",\"%\",$nameofgeo).\"&inputtype=textquery&fields=photos,formatted_address,name&locationbias=circle:[email protected],-122.2226413&key=AIzaSyDQfsEll4lB-xdxkLXGZA7_a2rMCyVM4Ok\";\n\t$json = file_get_contents($url);\n\t$json_data = json_decode($json, true);\n\tif ($json_data[\"status\"]==\"ZERO_RESULTS\")\n\t\treturn(\"Numele introdus nu este o geolocatie!\");\n\telse{\n\t\t#print_r($json_data['candidates'][0]['name']);\n\t\t#echo \" este nume pentru-> \"; \n\t\t#echo \"<br><br>\";\n\t\treturn($json_data[\"status\"]);\n\t}\n}", "public function setMarkers($markers) \n {\n $this->_markers = $markers; \n }", "public function start()\n {\n $this->_marks = array();\n $this->mark('__start');\n }", "public function markAsFailed();", "function _address_to_marker ($address) {\r\n\t\t$urladd = rawurlencode($address);\r\n\t\t$url = \"http://maps.google.com/maps/api/geocode/json?address={$urladd}&sensor=false\";\r\n\t\t$result = wp_remote_get($url);\r\n\t\t$json = json_decode($result['body']);\r\n\r\n\t\tif (!$json) return false;\r\n\t\t$result = $json->results[0];\r\n\r\n\t\treturn array(\r\n\t\t\t'title' => $address,\r\n\t\t\t'body' => '',\r\n\t\t\t'icon' => 'marker.png',\r\n\t\t\t'position' => array (\r\n\t\t\t\t$result->geometry->location->lat,\r\n\t\t\t\t$result->geometry->location->lng\r\n\t\t\t),\r\n\t\t);\r\n\t}", "public function isCompleted();", "public static function invalidMarkerShapeType()\n {\n return new static(sprintf(\n 'The type of a marker shape can only be : %s.',\n implode(', ', array('circle', 'poly', 'rect'))\n ));\n }", "public function remove_markers() {\r\n\t\t$db = Maps_Marker_Pro::get_instance('MMP\\DB');\r\n\r\n\t\tif (!isset($_POST['nonce']) || wp_verify_nonce($_POST['nonce'], 'mmp-tools-remove-markers') === false) {\r\n\t\t\twp_send_json(array(\r\n\t\t\t\t'success' => false,\r\n\t\t\t\t'message' => esc_html__('Security check failed', 'mmp')\r\n\t\t\t));\r\n\t\t}\r\n\t\tif (!isset($_POST['map'])) {\r\n\t\t\twp_send_json(array(\r\n\t\t\t\t'success' => false,\r\n\t\t\t\t'message' => esc_html__('Map missing', 'mmp')\r\n\t\t\t));\r\n\t\t}\r\n\t\t$map = $db->get_map($_POST['map']);\r\n\t\tif (!$map) {\r\n\t\t\twp_send_json(array(\r\n\t\t\t\t'success' => false,\r\n\t\t\t\t'message' => esc_html__('Map not found', 'mmp')\r\n\t\t\t));\r\n\t\t}\r\n\t\t$db->unassign_all_markers($map->id);\r\n\t\twp_send_json(array(\r\n\t\t\t'success' => true,\r\n\t\t\t'message' => esc_html__(\"Markers successfully removed from map {$map->id}\", 'mmp'),\r\n\t\t\t'maps' => $this->get_map_list()\r\n\t\t));\r\n\t}", "public function markresolvedAction() {\r\n \r\n \t$log_id = $_POST['log_id'];print_r();\r\n \t$this->jobs->resolve($log_id);\r\n \t$data = array();\r\n \t$data['status'] = \"success\";\r\n \t$data['message'] = \"Alert resolved successfully.\";\r\n \techo json_encode($data);\r\n \tdie;\r\n }", "public function footer($maps = false, $location = null, $path = null)\r\n\t{\n\t\tglobal $_sql_counter;\n \t// timing info:\n\t\t$this->timer = microtime() - $this->timer;\r\n\t\t$running_time = _(\"Running time\").\": {$this->timer} \"._(\"seconds\");\r\n\t\t$queries = _(\"Queries\");\n \techo \"\n <div id='footer' style='clear:all;'>{$running_time}<br/>\n \t{$queries}: {$_sql_counter}\n </div>\";\n \n\t\t/* load javascript at the end... */\n\t\tif($maps)\n\t\t{\n\t\t\t?>\r\n\t<script src=\"http://maps.google.com/maps?file=api&amp;v=2.x&amp;[email protected]@\" type=\"text/javascript\"></script> \r\n\t<script src=\"js/fitnessMaps.js\" type=\"text/javascript\"></script>\r\n\t<script type=\"text/javascript\">\n\t<?php\t\n\t\tif($location && $location->get('location_name')\n\t\t\t&& $location->get('lat') && $location->get('lng'))\n\t\t{\n\t\t\t$localStr = addslashes($location->get('location_name'));\n\t\t\t\n\t\t\tif($location->get('lat') && $location->get('lng'))\n\t\t\t{\n\t\t \t\techo \"initialize('{$localStr}', {$location->get('lat')}, {$location->get('lng')});\\n\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo \"initialize();\\n\";\n\t\t\t\techo \"showAddress(document.getElementById('location_name').value);\\n\";\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo \"initialize();\\n\";\n\t\t}\n\t\tif($path)\n\t\t{\n\t\t\t// regex match all the points\n\t\t\t$regex = \"/\\-?[0-9]{0,3}\\.[0-9]*\\,\\-?[0-9]{0,3}\\.[0-9]*/\";\n \tpreg_match_all($regex, $path, $matches);\n\n\t // if there is some result... process it and return it\n\t if(isset($matches[0]))\n\t {\n\t \tforeach($matches[0] as $point)\n\t \t{\n\t\t\t\t\techo \"pathpoints.addPoint(new GLatLng($point));\\n\";\n\t\t\t\t}\n\t } \n\t\t}\n\t?>\r\n </script>\n <?php \n\t\t} // end if: maps\n ?>\r\n</body>\r\n</html> <?php\r\n\t}", "public static function invalidMarkerShapeCoordinates()\n {\n return new static('A marker shape must have coordinates.');\n }", "private function checkFinished( $status )\r\n\t{\r\n\t\t$final = \"\"; // response if found\r\n\r\n\t\tif ( strpos( $status,\"START\") !== false ) {\r\n\t\t} else if ( strpos( $status,\"FIND\") !== false ) {\r\n\t\t} else if ( strpos( $status,\"FORK\") !== false ) {\r\n\t\t} else if ( strpos( $status,\"FETCH\") !== false ) {\r\n\t\t} else if ( strpos( $status,\"DONE1\") !== false && $this->return_quick == false ) {\r\n\t\t} else if ( strpos( $status,\"DONE2\") !== false ) {\r\n\t\t} else if ( strpos( $status,\"DONE3\") !== false ) {\r\n\t\t} else {\r\n\t\t\t$final = \"Done\";\r\n\t\t}\r\n\r\n\t\tif ( $final == \"\" )\r\n\t\t{\r\n\t\t\treturn false;\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}", "public function addMarkerByCoords($lat,$lng,$html='',$category='',$icon='') \n {\n\t\t// Save the lat/lon to enable the automatic center/zoom\n\t\t$this->maxLng = (float) max((float)$lng, $this->maxLng);\n $this->minLng = (float) min((float)$lng, $this->minLng);\n $this->maxLat = (float) max((float)$lat, $this->maxLat);\n $this->minLat = (float) min((float)$lat, $this->minLat);\n $this->centerLng = (float) ($this->minLng + $this->maxLng) / 2;\n $this->centerLat = (float) ($this->minLat + $this->maxLat) / 2;\n\t\t\n $this->contentMarker .= \"\\t\\t\\t\".'createMarker('.$lat.','.$lng.',\"'.$html.'\",\"'.$category.'\",\"'.$icon.'\");'.\"\\n\";\n }", "function updateLocation($UserID, $LastPointX, $LastPointY,$LastUpdateTime){\n $conn = connectDB();\n $updateLocationSQL = \"UPDATE Task SET Task.LastPointX =\".$LastPointX.\", Task.LastPointY =\".$LastPointY.\", Task.LastUpdateTime = \".$LastUpdateTime.\" WHERE Task.UserID = \".$UserID.\" AND Task.Canceled = 'N';\";\n $conn->query($updateLocationSQL);\n $conn->close();\n}", "public function getMarkers() \n {\n return $this->_markers; \n }", "public function action() {\n $this->curPos ++;\n usleep(250000);\n// # advanced finish if you need it for some reason:\n// if($this->curPos>40) return 'We have finished right now!';\n return array('lastItem'=>$this->curPos, 'itemCount'=>$this->count);\n }", "private function renderMapMarkerPoints()\n {\n static $arrLabels = array();\n\n $mapMarkers = array();\n $lons = array();\n $lats = array();\n\n // Get category labels\n if ( empty( $arrLabels ) )\n {\n $arrLabels = $this->renderMapMarkerPointsCatLabels();\n }\n // Get category labels\n // #i0118, dwildt, 1-/+\n //$arrCategoriesFlipped = array_flip( $this->arrCategories[ 'labels' ] );\n $arrCategoriesFlipped = array_flip( ( array ) $this->arrCategories[ 'labels' ] );\n\n // LOOP row\n//$this->pObj->dev_var_dump( $this->pObj->rows );\n foreach ( $this->pObj->rows as $row )\n {\n // Get mapMarkers, lats and lons\n $arr_result = $this->renderMapMarkerPointsPoint( $row, $arrLabels, $arrCategoriesFlipped );\n//$this->pObj->dev_var_dump( $arr_result );\n $mapMarkers = array_merge( $mapMarkers, $arr_result[ 'data' ][ 'mapMarkers' ] );\n $lats = array_merge( $lats, $arr_result[ 'data' ][ 'lats' ] );\n $lons = array_merge( $lons, $arr_result[ 'data' ][ 'lons' ] );\n unset( $arr_result );\n // Get mapMarkers, lats and lons\n }\n // LOOP row\n // DRS\n switch ( true )\n {\n case( $mapMarkers == null ):\n case(!is_array( $mapMarkers ) ):\n case( ( is_array( $mapMarkers ) ) && ( count( $mapMarkers ) < 1 ) ):\n if ( $this->pObj->b_drs_error )\n {\n $prompt = 'JSON array is null.';\n t3lib_div :: devLog( '[ERROR/BROWSERMAPS] ' . $prompt, $this->pObj->extKey, 3 );\n $prompt = 'You will get an empty map!';\n t3lib_div :: devLog( '[WARN/BROWSERMAPS] ' . $prompt, $this->pObj->extKey, 2 );\n $prompt = 'Please check the TypoScript Constant Editor > Category [BROWSER - MAP].';\n t3lib_div :: devLog( '[HELP/BROWSERMAPS] ' . $prompt, $this->pObj->extKey, 1 );\n }\n break;\n default:\n if ( $this->pObj->b_drs_map )\n {\n $prompt = 'JSON array seem\\'s to be proper.';\n t3lib_div :: devLog( '[OK/BROWSERMAPS] ' . $prompt, $this->pObj->extKey, -1 );\n $prompt = 'If you have an unexpected effect in your map, please check the JSON array from below!';\n t3lib_div :: devLog( '[HELP/BROWSERMAPS] ' . $prompt, $this->pObj->extKey, 1 );\n }\n break;\n }\n // DRS\n // Return array\n $arr_return = array\n (\n 'data' => array\n (\n 'mapMarkers' => $mapMarkers,\n 'lats' => $lats,\n 'lons' => $lons\n )\n );\n // Return array\n // #65184, 150221, dwildt, +\n $this->marker = $mapMarkers;\n\n return $arr_return;\n }" ]
[ "0.54770035", "0.5369358", "0.5180367", "0.49869728", "0.49708894", "0.48854458", "0.48742786", "0.4855595", "0.48252717", "0.4760046", "0.47098115", "0.46871704", "0.46787065", "0.46787065", "0.46241656", "0.4606739", "0.4592279", "0.4569218", "0.45580566", "0.45569363", "0.45512947", "0.45365947", "0.45295346", "0.45289057", "0.4507342", "0.4480431", "0.44710827", "0.44682416", "0.44638306", "0.44531983", "0.4437297", "0.4426284", "0.4393073", "0.43800133", "0.43752635", "0.43693197", "0.43668675", "0.4361601", "0.43577158", "0.43413588", "0.43366587", "0.43365854", "0.43359324", "0.4319481", "0.4318003", "0.42989618", "0.42910644", "0.4284156", "0.42749733", "0.42697772", "0.4268279", "0.4265523", "0.4262125", "0.4261431", "0.42453432", "0.4244112", "0.42426395", "0.42333978", "0.42234117", "0.42215613", "0.42147994", "0.42132896", "0.42123473", "0.42023143", "0.41970736", "0.41967887", "0.41961083", "0.41760594", "0.4170647", "0.4166778", "0.4164113", "0.41635877", "0.4161368", "0.4155346", "0.41491213", "0.41480187", "0.41477278", "0.41405988", "0.41371587", "0.4132945", "0.41297346", "0.41283524", "0.41246945", "0.41190344", "0.41177228", "0.41117305", "0.4099278", "0.4094924", "0.40901738", "0.4090114", "0.4087887", "0.40849", "0.40848532", "0.40797257", "0.40728936", "0.4070087", "0.40591303", "0.40578088", "0.40567356", "0.40489504", "0.4048515" ]
0.0
-1
Generate Cart Summary Table
function cart_table($cols = 'full', $destination = '#', $showfooter = true) { $cart_table = ' <table class="table giftsum-table"> <thead> <tr> <th class="th-title-gift">Gift</th> <th class="th-title-frequency">Frequency</th> <th class="th-title-amount">Amount</th>'; if ($cols == 'full') { $cart_table .= '<th class="th-title-actions"></th>'; } $cart_table .= ' </tr> </thead> <tbody> '; $cart_table .= cart_row('http://placehold.it/90x70', 'Jean Deaux', '34343434', 'Monthly', 'Starts on: 7/8/2019', '$50.00', $cols); $cart_table .= cart_row('http://placehold.it/90x70', 'Jean Deaux', '34343434', 'Monthly', 'Starts on: 7/8/2019', '$50.00', $cols); $cart_table .= '</tbody>'; if ($cols == 'full') { $cart_table .= ' <tfoot class="mobile-footer-persist"> <tr> <td colspan="4" class="text-right"> <div class="checkout-cta pull-right"> <a href="/sign-in/" class="btn btn-primary btn-lg btn-block">Proceed to Checkout</a> </div> <span class="giftsum-line">Your Monthly Gift Total: <strong>$50.00</strong></span> <span class="giftsum-line">Your Single Gift Total: <strong>$100.00</strong></span> </td> </tr> </tfoot>'; } elseif ($cols == 3) { if ($showfooter) { $cart_table .= ' <tfoot class="mobile-footer-persist"> <tr> <td colspan="3" class="text-right"> <div class="checkout-cta pull-right"> <a href="/thank-you/" class="btn btn-primary btn-lg btn-block">Submit Your Gift</a> </div> <span class="giftsum-line">Your Monthly Gift Total: <strong>$50.00</strong></span> <span class="giftsum-line">Your Single Total: <strong>$100.00</strong></span> </td> </tr> </tfoot>'; } } elseif ($cols == 2) { if ($showfooter) { $cart_table .= ' <tfoot> <tr> <td colspan="2" class="text-right"> <span class="giftsum-line">Monthly Gift Total: <strong>$50.00</strong></span> <span class="giftsum-line">Single Total: <strong>$100.00</strong></span> </td> </tr> <tr> <td colspan="2"> <a href="/cart/" class="btn btn-subtle u-floatRight mt">Edit Cart</a> </td> </tr> </tfoot>'; } } $cart_table .= '</table>'; return $cart_table; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function show_cart(){\n \t$output = '';\n \t$no = 0;\n \tforeach ($this->cart->contents() as $items) {\n \t\t$no++;\n \t\t$output .='\n \t\t<tr>\n \t\t<td>'.$items['name'].'</td>\n \t\t<td>'.number_format($items['price']).'</td>\n \t\t<td>'.$items['qty'].'</td>\n \t\t<td>'.number_format($items['subtotal']).'</td>\n \t\t<td><button type=\"button\" id=\"'.$items['rowid'].'\" class=\"hapus_cart btn btn-danger btn-xs\">Batal</button></td>\n \t\t</tr>\n \t\t';\n \t}\n \t$output .= '\n \t<tr>\n \t<th colspan=\"3\">Total</th>\n \t<th colspan=\"2\">'.'Rp '.number_format($this->cart->total()).'</th>\n \t</tr>\n \t';\n \treturn $output;\n }", "public function summary() {\n\t\t$i = $this->count() === 1 ? 'item' : 'items';\n\t\treturn \"{$this->count()} $i in your cart.\";\n\t\t\n\t}", "function createPlayerSummary() {\n $records = $this->Players->all();\n\n //Prime the table class to display player info. Wasn't sure what equity was though...\n $this->load->library('table');\n $parms = array(\n 'table_open' => '<table class=\"table-right-game\">',\n 'cell_start' => '<td class=\"player\">',\n 'cell_alt_start' => '<td class=\"player\">'\n );\n\n $this->table->set_template($parms);\n $this->table->set_heading('Player', 'Peanuts', 'Equity');\n\n foreach ($records as $row) {\n $this->table->add_row($row->Player, $row->Peanuts);\n }\n\n //Generate the table\n $this->data['wtable'] = $this->table->generate();\n }", "public function price_table() {\n\t\tif ( $this->coming_soon ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$out[] = '<script>jQuery( document ).ready(function() {jQuery( \".edd-add-to-cart-label\" ).html( \"Choose\" );});</script>';\n\t\t$out[] = sprintf( '<!--Pricing Table Section--><section id=\"pricing\"><div class=\"container\">\n<div class=\"container\">%1s</div>', $this->purchase_cta());\n\t\t$i = 1;\n\t\tforeach( $this->pricing() as $price ) {\n\t\t\t$out[] = sprintf(\n\t\t\t\t'<div class=\"col-lg-4 col-md-4 col-sm-12 col-xs-12 pricing-box\">\n\t\t\t\t\t<div id=\"price-%0s\" class=\"bggray price\">\n\t\t\t\t\t\t<div class=\"package\">%1s</div>\n\t\t\t\t\t\t<div class=\"divider\"></div>\n\t\t\t\t\t\t<div class=\"amount\">$%2s</div>\n\t\t\t\t\t\t<div class=\"duration\">%3s</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"featcontent\">\n\t\t\t\t\t\t%4s\n\t\t\t\t\t</div>\n\t\t\t\t</div>',\n\t\t\t\t$i,\n\t\t\t\t$price[ 'level' ],\n\t\t\t\t$price[ 'amount' ],\n\t\t\t\t$price[ 'sites' ],\n\t\t\t\t$price[ 'link' ]\n\t\t\t);\n\t\t\t$i++;\n\n\t\t}\n\n\t\t$out[] = '</div></section>';\n\n\t\treturn implode( '', $out );\n\n\t}", "public function showSummary()\n {\n if ( isset($_GET['order'])) {\n $this->sortBy = $_GET['order'];\n }\n\n if ( ! isset($this->result['data'])) {\n die(\"Impropper coverage report. Please regenerate\");\n }\n\n $coveredArray = $this->result[\"data\"];\n //lets sort it.\n uasort($coveredArray, array($this,\"sortArray\"));\n\n //and flip if it perhaps?\n if (isset($_GET[\"flip\"]) && $_GET[\"flip\"] == \"true\") {\n $coveredArray = array_reverse($coveredArray, true);\n }\n\n $totals = $this->result[\"totals\"];\n\n echo '<tr><td>TOTAL</td><td>' , \n $totals['percentage'] , '%</td><td>' , \n $totals['lines'] , '</td><td>' , \n $totals['covered'] , '</td><td>', \n $totals['maybe'] , '</td><td>',\n $totals['notcovered'] , '</td><td></tr>';\n\n foreach($coveredArray as $class => $info) {\n\n echo '<tr><td>';\n if ( $info['type'] == \"covered\") {\n echo '<a href=\"' , $class , '.html\">', $class , '</a>';\n }else{\n echo $class;\n }\n echo '<td>' . $info['percentage'] . ' % </td><td>' . $info['total'] . '</td><td>' . $info['covered'] . '</td><td>' . $info['maybe'] . '</td><td>' . $info['notcovered']. '</td></tr>';\n }\n }", "public function getCartHTML() {\n\t\t$productLines = $this->cart->getProductLines();\n\t\t$sum = $this->cart->getSumSEK();\n\t\t$html = \"<ul>\";\n\n\t\t\n\n\t\tforeach ($productLines as $productLine) {\n\t\t\t$product = $productLine->getProduct();\n\t\t\t$name = $product->getName();\n\t\t\t$costSEK = $product->getCostSEK();\n\t\t\t$amount = $productLine->getAmount();\n\t\t\t$totalSEK = $productLine->getTotalSEK();\n\n\t\t\t\n\t\t\t$linkHTML = $this->productListView->getBuyProductLink($product, \"+\");\n\t\t\t$removeLink = $this->productListView->getRemoveProductLink($product, \"-\");\n\t\t\t$buttons = \"[$linkHTML][$removeLink]\";\n\t\t\t\n\t\t\t$html .= \"<li>$name $amount x $costSEK = $totalSEK SEK $buttons</li>\";\n\n\t\t}\n\t\t$html .= \"</ul>\";\n\t\t\n\n\t\tif (isset($_SESSION[self::$messageHolder])) {\n\t\t\tif ($_SESSION[self::$messageHolder] == self::$addProductSucceded) {\n\t\t\t\t$html .= \"Grattis till ditt köp, kommer göra dig gott!</br>\";\t\n\t\t\t} else {\n\t\t\t\t$html .= \"Du tog bort en produkt! </br>\";\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tunset($_SESSION[self::$messageHolder]);\n\t\t}\n\n\n\t\tif ($this->cart->containsItems()) {\n\t\t\t$checkout = $this->navigationView->getCheckoutLink();\n\t\t\t\n\t\t} else {\n\t\t\t$checkout = \"Inga produkter i varukorgen\";\n\t\t}\n\t\treturn \"<h2>Cart</h2> $html Summa : $sum kr $checkout\";\n\t}", "function displayCart($cart){\n\tif(count($cart) > 0)//Cart isn't empty\n\t{\t\n\t\t$totalPrice = 0;\n\t\tforeach ($cart as $item)\n\t\t{\n\t\t\t$totalPrice += $item['productQuantity']*$item['productPrice'];//quantity*price for each item in the cart to get total price\n\n\t\t\t/* Table to out data */\n\t\t\techo '<table class=\"table table-striped table-hover table-responsive\">';\n\t\t\techo\t'<tr style=\"border-bottom:none;\">';\n\t\t\techo\t\t'<td colspan=\"4\" class=\"col-sm-3 col-md-3 col-lg-3 align-left\">'.$item['productTitle'].'</td>';\n\t\t\techo\t'</tr>';\n\t\t\techo\t'<tr>';\n\t\t\techo\t\t'<td>x'.$item['productQuantity'].'</td>';\n\t\t\techo\t\t'<td>&euro;'.$item['productPrice'].'</td>';\n\t\t\t\n\t\t\techo \t\t'<td>';\n\t\t\techo\t\t\t'<form id=\"cart-action\" method=\"post\">';\n\t\t\techo \t\t'<input type=\"hidden\" name=\"vendorId\" value=\"'.$item['vendorId'].'\">';\n\t\t\techo\t\t\t\t'<input type=\"hidden\" name=\"productId\" value=\"'.$item['productId'].'\">';\n\t\t\techo \t'<input type=\"hidden\" name=\"action\" value=\"add\">';\n\t\t\techo \t'<input type=\"hidden\" name=\"productTitle\" value=\"'.base64_decode($item['productTitle']).'\">';\n\t\t\techo \t'<input type=\"hidden\" name=\"productPrice\" value=\"'.$item['productPrice'].'\">';\n\t\t\techo \t\t'<button type=\"submit\"><a><span class=\"glyphicon glyphicon-plus-sign\"></span></a></button>';\n\t\t\techo \t\t\t'</form>';\n\t\t\techo \t\t'</td>';\n\t\t\t\n\t\t\techo\t\t'<td>';\n\t\t\techo \t\t\t'<form id=\"cart-action\" method=\"POST\">';\n\t\t\techo \t\t\t\t'<input type=\"hidden\" name=\"action\" value=\"remove\">';\n\t\t\techo \t\t\t\t\"<input type='hidden' name='productId' value=\".$item['productId'].\">\";\n\t\t\techo \t\t\t\t'<button type=\"submit\"><a><span class=\"glyphicon glyphicon-remove-circle\"></span></a></button>';\n\t\t\techo \t\t\t'</form>';\n\t\t\techo\t\t'</td>';\n\t\t\techo\t'</tr>';\n\t\t\techo '</table>';\n\t\t}\n\t\t\techo '<div class=\"cart-total-price\">';\n\t\t\t\techo '<p><strong>Total: &nbsp;&nbsp; &euro;'.$totalPrice.'</strong></p>';\n\t\t\techo '</div>';\n\t\t\techo '<script type=\"text/javascript\">location.reload()</script>';//Temporary Page Reload for checkout order options to change\n\t\t}else{//Print not items selected\n\t\t\techo '<p>No Items Selected</p>';\n\t\t\t}\n}", "public function table()\n {\n return \"stocks\";\n }", "public function printCart()\n {\n if ( !(isEmpty() ) )\n {\n foreach( $this->cartItems as $item )\n {\n echo $item->getModelNumber();\n echo \"\\r\" ;\n }\n }\n else\n {\n echo \"Cart is empty in Cart.php\";\n }\n }", "public function showCart()\n\t{\n\t\t $session_name = \"c_product\";\n\n\t\t// if (!isset($_SESSION[\"$session_name\"]) || !in_array($p, $_SESSION[\"$session_name\"]))\n\t\t// {\n\t\t// \t$_SESSION[\"$session_name\"][] = $p;\t\t\n\t\t// }\n\t\t$total = 0;\n\t\tforeach ($_SESSION[\"$session_name\"] as $id)\n\t\t{\n\t\t\t$total += $this->showProductInCart($id);\n\t\t}\n\t\t$total = number_format($total);\n\t\t$totalprice = <<<DELIMITER\n\t\t\t<div class=\"row\">\n\t\t\t\t<div class=\"col-3\">\n\t\t\t\t\t<h4> TOTAL PRICE: </h4>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"col-6\" style=\"text-align:right\">\n\t\t\t\t\t<h3 style= \"color:red\">{$total}₫</h3>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<hr>\n\t\tDELIMITER;\n\t\techo $totalprice;\n\t}", "public function tablaProductos () \n\t\t{\t\t\n\t\t\t//Javascript !!!\n\t\t\taddJs('js/products_table.js');\n\t\t\thidden ('iter',0); \n\t\t\t\n\t\t\techo '<table id=\"tabla_productos\" bgColor=#333 cellspacing=1 cellpadding=2 width=700><tbody>';\n\t\t\techo '<tr>'.\n\t\t\t\t\t'<th>Cantidad</th><th>Producto</th><th>Precio<br>sin Iva</th>'.\n\t\t\t\t\t'<th>Precio<br>con Iva</th><th>Total Neto</th><th>Total</th><th></th></tr>';\n\n\t\t\techo '</tbody></table>';\n\n\t\t\techo '<table bgColor=#333 cellspacing=1 cellpadding=2 width=700>';\n\t\t\t$this->tablaSumatoria();\n\t\t\techo '</table>';\t\t\t\n\t\t}", "function display_cart()\n\t\t{\n\t\t\tglobal $connect;\n\t\t\tglobal $currency;\n\t\t\tif(isset($_SESSION['cart']))\n\t\t\t{\n\t\t\t\tif(isset($_POST['place-order-btn']))\n\t\t\t\t{\n\t\t\t\t\tinsert_order();\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\t$cart = $_SESSION['cart'];\n\t\t\t\t$html = '';\n\t\t\t\t$html.='\n\t\t\t\t<div class=\"cv-order-detail spacer-top-less spacer-bottom\">\n\t\t\t <div class=\"container\">\n\t\t\t <div class=\"cv-heading\">\n\t\t\t <h1>product details</h1>\n\t\t\t <p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>\n\t\t\t </div>\n\t\t\t <div class=\"row\">\n\t\t\t <div class=\"col-md-12\">\n\t\t\t <div class=\"cv-last-order\">\n\t\t\t <table>\n\t\t\t <thead>\n\t\t\t <tr>\n\t\t\t <th>Product name</th>\n\t\t\t <th>unit price</th>\n\t\t\t <th>Quantity</th>\n\t\t\t <th>Total</th>\n\t\t\t </tr>\n\t\t\t </thead>\n\t\t\t <tbody>\n\t\t\t\t';\n\n\t\t\t\tforeach ($cart as $key => $value) {\n\t\t\t\t\t// Fetch cart details\n\t\t\t\t\t$cart_table_qry = \"select * from product where product_id=$value[product_id] and status=1\";\n $cart_table_qry_result = mysqli_query($connect,$cart_table_qry); \n $cart_table_arr = mysqli_fetch_assoc($cart_table_qry_result); \n\n\n\t\t\t\t\t$html.='<tr>\n\t <td>'.$cart_table_arr['product_name'].'</td>\n\t <td>'.$currency.$cart_table_arr['product_price'].'</td>\n\t <td>'.$value['quantity'].'</td>\n\t <td>'.$currency.$value['quantity'] * $cart_table_arr['product_price'].'</td>\n\t </tr>';\n\t\t\t\t}\n\t\t\t\t\t$html.='<tr>\n <td colspan=\"2\" class=\"cv-d-none\"></td>\n <td><b>Grand Total</b></td>\n <td class=\"cv-price\">'.$currency.$_SESSION['grand_total'].'</td>\n </tr>\n\t\t\t\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t\t\t</table>\n \t\t\t</div>\n\t\t <div class=\"cv-cart-btn\">\n\t\t <form method=\"post\" action='.$_SERVER['PHP_SELF'].'>\n\t\t <input href=\"javascript:void(0)\" class=\"cv-btn place-order-btn\" type=\"submit\" value=\"place order\" name=\"place-order-btn\">\n\t\t </form>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t <p class=\"font-weight-bold\">Only COD(Cash on delivery) payment mehod is available.</p>\n\t\t </div>\n\t\t </div>';\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$html ='';\n\t\t\t}\n\t\t\techo $html;\n\t\t}", "function uc_op_products_customer_table($order) {\n $table = array(\n '#type' => 'tapir_table',\n '#attributes' => array('class' => array('order-pane-table')),\n );\n\n $table['#columns']['qty'] = array(\n 'cell' => array(\n 'data' => theme('uc_qty_label'),\n 'class' => array('qty'),\n ),\n 'weight' => 0,\n );\n $table['#columns']['product'] = array(\n 'cell' => array(\n 'data' => t('Product'),\n 'class' => array('product'),\n ),\n 'weight' => 1,\n );\n $table['#columns']['model'] = array(\n 'cell' => array(\n 'data' => t('SKU'),\n 'class' => array('sku'),\n ),\n 'weight' => 2,\n );\n if (user_access('administer products')) {\n $table['#columns']['cost'] = array(\n 'cell' => array(\n 'data' => t('Cost'),\n 'class' => array('cost'),\n ),\n 'weight' => 3,\n );\n }\n $table['#columns']['price'] = array(\n 'cell' => array(\n 'data' => t('Price'),\n 'class' => array('price'),\n ),\n 'weight' => 4,\n );\n $table['#columns']['total'] = array(\n 'cell' => array(\n 'data' => t('Total'),\n 'class' => array('total'),\n ),\n 'weight' => 5,\n );\n\n $table['#columns']['vat_rate'] = array(\n 'cell' => array(\n 'data' => t('VAT rate'),\n 'class' => array('vat-rate'),\n ),\n 'weight' => 6,\n );\n\n if (!empty($order->products)) {\n $build = uc_order_product_view_multiple($order->products);\n $table['#rows'] = $build['uc_order_product'];\n }\n else {\n $table['#rows'][]['product'] = array(\n '#markup' => t('This order contains no products.'),\n '#cell_attributes' => array('colspan' => 'full'),\n );\n }\n\n return $table;\n}", "function createTable($result) {\n $table = \"<table class='table table-bordered'>\";\n $row = $result->fetch_assoc();\n $table .= \"<tr>\";\n foreach(array_keys($row) as $field) {\n $table .= \"<th class='text-center'>$field</th>\";\n }\n $table .= \"</tr>\";\n while($row) {\n $table .= \"<tr>\";\n foreach($row as $key => $value) {\n $table .= \"<td class='text-center'>\";\n if(strcmp($key, \"Price\") == 0 or strcmp($key, \"Revenue\") == 0) {\n $table.=\"\\$\" . number_format($value, 2, \".\", \"\");\n }\n else {\n $table .= $value;\n }\n $table.=\"</td>\";\n }\n $table .= \"</tr>\";\n $row = $result->fetch_assoc();\n }\n $table .= \"</table>\";\n return $table;\n }", "private function generateOutputData()\n {\n $output = [];\n $products = Cart::content();\n // Loop over the products to add the unit price and total in the right format.\n foreach ($products as $product) {\n $unit_price = $product->price / 100;\n $product->unit_price = number_format($unit_price, 2);\n // TODO Fix this hack\n $product->quantity = $product->qty;\n $product->total_price = number_format($unit_price * $product->qty, 2);\n\n $product->available = $product->model->isQuantityAvailable((int) $product->quantity);\n }\n\n $output['products'] = $products;\n $output['disable_creation'] = $products->isEmpty() && $this->getCustomerId() === null;\n $output['company'] = Company::find(1);\n $output['customer'] = Customer::find($this->getCustomerId());\n\n $elements = ['subtotal', 'tax', 'total'];\n // Use PHP magic to dynamically get the elements from the array\n // calling their respective functions from Cart.\n foreach ($elements as $element) {\n $output[$element] = (float) Cart::$element(2, '.', '') / 100;\n $output[$element] = number_format($output[$element], 2);\n }\n\n return $output;\n }", "public function getItemSummary() {\n $return = '';\n\n foreach($this->Items() as $item) {\n $return .= \"{$item->Quantity} x {$item->Title};\\n\";\n }\n\n return $return;\n }", "function show_cart(){\n\t\t$output = '';\n\t\t$no = 0;\n\t\tforeach ($this->cart->contents() as $items) {\n\t\t\t$no++;\n\t\t\t$output .='\n\t\t\t\t<tr>\n\t\t\t\t\t<td>'.$items['name'].'</td>\n\t\t\t\t\t<td>'.number_format($items['price']).'</td>\n\t\t\t\t\t<td>'.$items['qty'].'</td>\n\t\t\t\t\t<td>'.number_format($items['subtotal']).'</td>\n\t\t\t\t\t<td><button type=\"button\" id=\"'.$items['rowid'].'\" class=\"hapus_cart btn btn-danger btn-xs\">Batal</button></td>\n\t\t\t\t</tr>\n\t\t\t';\n\t\t}\n\t\t$output .= '\n\t\t\t<tr>\n\t\t\t\t<th colspan=\"3\">Total</th>\n\t\t\t\t<th colspan=\"2\">'.'Rp '.number_format($this->cart->total()).'</th>\n\t\t\t</tr>\n\t\t';\n\t// \tforeach ($this->cart->contents() as $item) {\n\t// \t$output .='\n\t// \t\t<tr>\n\t// \t\t<form action=\"'.base_url('pemesanan').'\" method=\"post\" >\n\t// \t\t<td><input type=\"hidden\" name=\"id_menu\" value=\"'.$item['id'].'\"</td>\n\t// \t\t<td><input type=\"hidden\" name=\"total_harga\" value=\"'.$item['subtotal'].'\"</td>\n\t// \t\t<td><input type=\"hidden\" name=\"jml_beli\" value=\"'.$item['qty'].'\"</td>\n\t// \t\t<td><input type=\"submit\" class=\"btn\" value=\"Bayar\"></td>\n\t// \t\t</form>\n\t// \t\t</tr>\n\t// \t';\n\t// }\n\t\treturn $output;\n\t}", "public function purchase_table($purchase_no)\n {\n $details = $this->MPurchase_details->get_by_purchase_no($purchase_no);\n\n $msg = '\n <table id=\"data_table\" class=\"table table-bordered table-striped responsive\">\n <thead>\n <tr>\n <th class=\"left\">Item Code</th>\n <th class=\"left\">Item Name</th>\n <th class=\"center\">Quantity</th>\n <th class=\"center\">Unit Price</th>\n <th class=\"center\">Total Price</th>\n <th class=\"span3 center\">Action</th>\n </tr>\n </thead>';\n $msg .= '<tbody>';\n $qty = 0;\n $price = 0;\n if (count($details) > 0)\n {\n foreach ($details as $list)\n {\n $msg .= '\n <tr>\n <td>' . $list['item_code'] . '</td>\n <td>' . $list['item_name'] . '</td>\n <td class=\"center\">' . $list['quantity'] . '</td>\n <td class=\"right\">' . number_format($list['purchase_price'], 2) . '</td>\n <td class=\"right\">' . number_format($list['quantity'] * $list['purchase_price'], 2) . '</td>\n <td class=\"center\">\n <input type=\"hidden\" value=\"' . $list['id'] . '\" /><span class=\"btn btn-danger purchase_item_delete\"><i class=\"icon-trash icon-white\"></i>Delete</span>\n </td>\n </tr>';\n $qty += $list['quantity'];\n $price += $list['quantity'] * $list['purchase_price'];\n }\n }\n $msg .= '</tbody>\n <tfoot>\n <tr>\n <th class=\"left\" colspan=\"6\">Order Totals</th>\n </tr>\n <tr>\n <td colspan=\"2\">&nbsp</td>\n <td class=\"center\">' . $qty . '</td>\n <td></td>\n <td class=\"right\">' . number_format($price, 2) . '</td><td></td>\n </tr>\n <tr>\n <td colspan=\"4\" class=\"right\"> Total Paid Amount</td>\n <td class=\"right\"><input type=\"text\" name=\"paid_amount\" id=\"paid_amount\" value=\"'.$price.'\"></td>\n <td></td>\n </tr>\n </tfoot>\n </table>';\n\n return $msg;\n }", "public function buildTotalsRow()\n {\n $line = '';\n foreach ($this->Columns as $field => $Column) {\n if (in_array($field, $this->tableOptions['totals'])) {\n $line .= $this->Html->tag('td', $Column->sum(), array('class' => 'cell-number'));\n } else {\n $line .= $this->Html->tag('td', ' ');\n }\n }\n\n return $this->Html->tag('tr', $line, array('class' => 'totalsrow'));\n }", "public function index(CartsDatatable $cart)\n {\n return $cart->render('admin.carts.index',['title'=> trans('admin.carts')]);\n }", "public function actionViewCart()\n {\n $groupCart = [];\n\n $cart = Cart::find()->where('uid = :uid',[':uid' => Yii::$app->user->identity->id])->joinWith(['food','selection','nick'])->all();\n \n foreach($cart as $i=> $single)\n {\n $promotion = PromotionController::getPromotioinPrice($single->price,$single->fid,1);\n if(is_array($promotion))\n {\n\n $single->promotion_enable = 1;\n \n }\n if(!empty($single['selection']))\n {\n foreach($single['selection'] as $selection)\n {\n $data = foodSelection::find()->where('foodselection.ID = :id',[':id' => $selection->selectionid])->joinWith('selectedtpye')->one();\n $groupSelection[$data['selectedtpye']['cookieName']][] = $data['cookieName'];\n }\n \n $cart[$i]->groupselection = $groupSelection; \n }\n\n $groupSelection = [];\n }\n\n foreach($cart as $single)\n {\n $groupCart[$single['area']][] = $single;\n \n }\n\n return $this->render('cart',['groupCart' => $groupCart]);\n }", "public function index() {\n $prodData['cart_total'] = number_format($this->cart->getTotal(),2);\n $cart_layouts['md'] = '';\n $cart_layouts['sm'] = '';\n $cart_layouts['xs'] = '';\n\n $cart_count = $this->cart->countProducts();\n if($cart_count == 0)\n {\n $cart_layouts['cart_class'] = '';\n $prodData['cart_count'] = 'empty';\n }\n // elseif ($cart_count > 99) {\n // $prodData['cart_count'] = '99+';\n // }\n else {\n $prodData['cart_count'] = $cart_count. ' items';\n $cart_layouts['cart_class'] = 'full';\n }\n\n // $prodData['cart_count'] = 3;\n $cart_layouts['md'] = $this->load->view('ssan/cart_menu', $prodData);\n $cart_layouts['sm'] = $this->load->view('ssan/cart_menu_sm', $prodData);\n $cart_layouts['xs'] = $this->load->view('ssan/cart_menu_xs', $prodData);\n\n return $cart_layouts;\n }", "public function display()\n\t\t{\n\t\t\techo \"<table border=\\\"1\\\">\";\n\t\t\techo \"<tr><th>Artikel</th><th>Menge</th><th>Optionen</th></tr>\";\n\t\t\tforeach ($this->items as $art=>$qty)\n\t\t\t\techo \"<tr>\n\t\t\t\t\t\t<td>$art</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<form name='qtyForm' action='cart.php' method='get'>\n\t\t\t\t\t\t\t\t<input type='hidden' name='artChangeQty' value='$art'/>\n\t\t\t\t\t\t\t\t<input name='artQty' value='$qty'/>\n\t\t\t\t\t\t\t\t<input name='positive' type='submit' value='1' />\n\t\t\t\t\t\t\t\t<input name='negative' type='submit' value='-1' />\n\t\t\t\t\t\t\t\t<br/>\n\t\t\t\t\t\t\t\t<input type='submit' value='Ändern' />\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<form name='removeForm' action='cart.php' method='get'>\n\t\t\t\t\t\t\t\t<input type='hidden' name='artRemoveAll' value='$art'/>\n\t\t\t\t\t\t\t\t<input type='submit' value='Remove' />\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t </tr>\";\n\t\t\techo \"</table>\";\n\t\t}", "public function index()\n\t{\n# \\Cart::destroy();return;\n $contents = \\Cart::content()->paginate(5);\n// foreach ($contents as $row) {\n//// echo 'You have ' . $row->qty . ' items of ' . $row->product->name . ' with description: \"' . $row->product->description . '\" in your cart.';\n// }\n\n $total = number_format(\\Cart::total(), 2);\n $this->view('shopcart.index', compact('contents', 'total'));\n\n\t}", "function uc_op_products_view_table($order) {\n $table = array(\n '#type' => 'tapir_table',\n '#attributes' => array('class' => array('order-pane-table')),\n );\n\n $table['#columns']['qty'] = array(\n 'cell' => array(\n 'data' => theme('uc_qty_label'),\n 'class' => array('qty'),\n ),\n 'weight' => 3,\n );\n $table['#columns']['product'] = array(\n 'cell' => array(\n 'data' => t('Product'),\n 'class' => array('product'),\n ),\n 'weight' => 2,\n );\n $table['#columns']['model'] = array(\n 'cell' => array(\n 'data' => t('SKU'),\n 'class' => array('sku'),\n ),\n 'weight' => 1,\n );\n if (user_access('administer products')) {\n $table['#columns']['cost'] = array(\n 'cell' => array(\n 'data' => t('Cost'),\n 'class' => array('cost'),\n ),\n 'weight' => 4,\n );\n }\n $table['#columns']['price'] = array(\n 'cell' => array(\n 'data' => t('Price'),\n 'class' => array('price'),\n ),\n 'weight' => 4,\n );\n $table['#columns']['total'] = array(\n 'cell' => array(\n 'data' => t('Total'),\n 'class' => array('total'),\n ),\n 'weight' => 5\n );\n\n $table['#columns']['vat_rate'] = array(\n 'cell' => array(\n 'data' => t('VAT rate'),\n 'class' => array('vat-rate'),\n ),\n 'weight' => 6,\n );\n\n if (!empty($order->products)) {\n $build = uc_order_product_view_multiple($order->products);\n $table['#rows'] = $build['uc_order_product'];\n }\n else {\n $table['#rows'][]['product'] = array(\n '#markup' => t('This order contains no products.'),\n '#cell_attributes' => array('colspan' => 'full'),\n );\n }\n return $table;\n}", "public function getCart() {\n return new CartSummary($this->sessionCart->get());\n }", "public function okr_summary()\n\t{\n\t\tif ($this->session->userdata('status') !== 'admin_logged_in') {\n\t\t\tredirect('pages/Login');\n\t\t}\n\t\t$this->M_auditTrail->auditTrailRead('OKR Summary', $this->session->userdata['type']);\n\n\n\t\t$data = [\n\t\t\t'member_dsc' => $this->M_memberDsc->get_all_member(),\n\t\t\t'usecase' => $this->M_otherDataAssignments->get_usecase(),\n\t\t\t'member_selected' => '',\n\t\t\t'usecase_selected' => '',\n\t\t\t'judul' => 'OKR Summary - INSIGHT',\n\t\t\t'konten' => 'adm_views/home/monitoring_okr_summaryProduct',\n\t\t\t'admModal' => [],\n\t\t\t'footerGraph' => []\n\t\t];\n\n\t\t$this->load->view('adm_layout/master', $data);\n\t}", "protected function getCartSummaryRoute()\n {\n return 'sylius_cart_summary';\n }", "function PackContentsTable() {\n\treturn\n'\n<table width=\"100%\">\n<thead>\n<tr>\n<th>THIS PACK CONTAINS</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Artists\\' Intention and Learning Objectives</td>\n</tr>\n<tr>\n<td>Step-by-Step Creative Activity Plans</td>\n</tr>\n<tr>\n<td>Environment and Resource Lists</td>\n</tr>\n<tr>\n<td>Top Tips to support Additional Learning Needs</td>\n</tr>\n<tr>\n<td>Guidance for Reflection and Planning</td>\n</tr>\n<tr>\n<td>Activities Mapped against EYFS Areas of Learning</td>\n</tr>\n<tr>\n<td>Case Study of Activities in Practice</td>\n</tr>\n<tr>\n<td><strong>Each pack has between 16-24 pages, in full colour, and has an easy-to-clean matt laminate cover</strong></td>\n</tr>\n</tbody>\n</table>\n';\n\t\n}", "public static function cartItem($data, $sum){\n\t\t$html = \"<tr>\";\n\t\t$html .= \"<td>\".$data['name'].\"</td>\";\n\t\t$html .= \"<td>\".$data['quantity'].\"</td>\";\n\t\t$html .= \"<td>\".$data['price'].\"</td>\";\n\t\t$html .= \"<td><a href=# class='deleteCartEntry btn' data-pid=\".$data['id'].\">Remove</a></td>\";\n\t\t$html .= \"<td>\".$sum.\"</td>\";\n\t\t$html .= \"</tr>\";\n\t\treturn $html;\n\t}", "function printCart(){\n\t\tprint_r($this->articulos);\n\t}", "function drawCart(){\n\t\t//start form and table tags\n\t\techo '<form name=\"cart\" action=\"\" method=\"POST\">';\n\t\techo '<h1>Cart</h1>';\n\t\techo '<table>';\n\t\techo '<tr><th>Name</th><th>Price</th><th>Quantity</th><th>Total</th><th>Remove</th></tr>';\n \t\n\t\t//hold the cumulative total price\n\t\t$totalPrice = 0;\n\t\t\n\t\t//display each item in the cart in a new table row \n\t\tforeach($_SESSION['cart']->items as $cartItem){\t\n\t\t\t\n\t\t\t//generate the total price for this item, and add it to the total price\n\t\t\t$itemTotalPrice = $cartItem['price'] * $cartItem['quantity'];\n\t\t\t$totalPrice += $itemTotalPrice;\n\t\t\t\n\t\t\t//item information\n\t\t\techo '<tr>';\n\t\t\techo \t'<td>' . $cartItem['name'] . '</td>';\n\t\t\techo \t'<td>' . number_format($cartItem['price'],2) . '</td>';\n\t\t\techo \t'<td>' . $cartItem['quantity'] . '</td>';\n\t\t\techo \t'<td>' . number_format($itemTotalPrice,2) . '</td>';\n\t\t\techo \t'<td>' . '<button type=\"submit\" name=\"removeItem\" value=\"'.$cartItem['name'].'\" >Remove Item</button>' . '</td>';\n\t\t\techo '</tr>';\n\t\t\t\n\t\t}\n\t\t//draw overall Total\n\t\techo '<tr>';\n\t\techo \t'<th>Overall Total</th><td></td><td></td>';\n\t\techo \t'<td>' . number_format($totalPrice,2) . '</td>';\n\t\techo '</tr>';\n\t\t\n\t\t//close the table and form tags\n\t\techo '</table><br>';\n\t\techo '</form>';\n\t\t\n\t}", "public function showCart($registrationNo,$batchNo,$username) {\n\n\necho \"\n<style type='text/css'>\n.data {\nfont-size:13px;\n}\n\n#rowz:hover {\nbackground-color:yellow;\n}\n\n</style>\n\n\n\";\n\n$con = ($GLOBALS[\"___mysqli_ston\"] = mysqli_connect($this->myHost, $this->username, $this->password));\nif (!$con)\n {\n die('Could not connect: ' . ((is_object($GLOBALS[\"___mysqli_ston\"])) ? mysqli_error($GLOBALS[\"___mysqli_ston\"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false)));\n }\n\n((bool)mysqli_query( $con, \"USE \" . $this->database));\n\n$result = mysqli_query($GLOBALS[\"___mysqli_ston\"], \"SELECT pc.* FROM patientCharges pc where pc.registrationNo='$registrationNo' and pc.batchNo='$batchNo' order by pc.description asc \");\n\n$this->coconutTableStart();\n$this->coconutTableRowStart();\n$this->coconutTableHeader(\"\");\n$this->coconutTableHeader(\"Description\");\n$this->coconutTableHeader(\"Price\");\n$this->coconutTableHeader(\"QTY\");\n$this->coconutTableHeader(\"Discount\");\n$this->coconutTableHeader(\"Total\");\n$this->coconutTableRowStop();\nwhile($row=mysqli_fetch_array($result)) {\necho \"<tr id='rowz'>\";\n$this->showCart_discount += $row['discount'];\n$this->showCart_total += $row['total'];\necho \"<td><a href='http://\".$this->getMyUrl().\"/COCONUT/patientProfile/ECART/deleteCart.php?registrationNo=$registrationNo&batchNo=$batchNo&itemNo=$row[itemNo]&username=$username'><img src='http://\".$this->getMyUrl().\"/COCONUT/myImages/delete.jpeg'></a></td>\";\n$this->coconutTableData($row['description']);\n\nif($row['title'] == \"PROFESSIONAL FEE\") {\n$price = preg_split (\"/\\//\", $row['sellingPrice']); \n$this->coconutTableData(number_format($price[0],2));\n}else {\n$this->coconutTableData(number_format($row['sellingPrice'],2));\n}\n$this->coconutTableData($row['quantity']);\n$this->coconutTableData(number_format($row['discount'],2));\n$this->coconutTableData(number_format($row['total'],2));\necho \"</tr>\";\n}\necho \"<tr>\";\n$this->coconutTableData(\"\");\n$this->coconutTableData(\"<b>TOTAL</b>\");\n$this->coconutTableData(\"\");\n$this->coconutTableData(\"\");\n$this->coconutTableData(number_format($this->showCart_discount,2));\n$this->coconutTableData(number_format($this->showCart_total,2));\necho \"</tr>\";\n$this->coconutTableStop();\n\n}", "function listCart()\n{\n global $xoopsTpl, $uid;\n $cartForTemplate = $discountsDescription = array();\n $emptyCart = false;\n $shippingAmount = $commandAmount = $vatAmount = $commandAmountTTC = $discountsCount = $ecotaxeAmount = $discountAmount = $totalSavings = 0;\n $goOn = '';\n $reductions = new oledrion_reductions();\n $reductions->computeCart($cartForTemplate, $emptyCart, $shippingAmount, $commandAmount, $vatAmount, $goOn, $commandAmountTTC, $discountsDescription, $discountsCount, $ecotaxeAmount, $discountAmount, $totalSavings );\n $oledrion_Currency = & oledrion_Currency::getInstance();\n $xoopsTpl->assign('emptyCart', $emptyCart);\t\t\t\t\t\t\t\t\t\t\t// Caddy Vide ?\n $xoopsTpl->assign('caddieProducts', $cartForTemplate);\t\t\t\t\t\t\t\t// Produits dans le caddy\n $xoopsTpl->assign('shippingAmount', $oledrion_Currency->amountForDisplay($shippingAmount));\t\t// Montant des frais de port\n $xoopsTpl->assign('ecotaxeAmount', $oledrion_Currency->amountForDisplay($ecotaxeAmount));\t\t// Montant des frais de port\n $xoopsTpl->assign('commandAmount', $oledrion_Currency->amountForDisplay($commandAmount));\t\t// Montant HT de la commande\n $xoopsTpl->assign('discountAmount', $oledrion_Currency->amountForDisplay($discountAmount));\t\t// Total Discount\n $xoopsTpl->assign('totalSavings', $oledrion_Currency->amountForDisplay($totalSavings));\t\t// Total Savings\n $xoopsTpl->assign('vatAmount', $oledrion_Currency->amountForDisplay($vatAmount));\t\t\t\t// Montant de la TVA\n $xoopsTpl->assign('discountsCount', $discountsCount);\t\t\t\t\t\t\t\t// Nombre de réductions appliquées\n $xoopsTpl->assign('goOn', $goOn);\t\t\t\t\t\t\t\t\t\t\t\t\t// Adresse à utiliser pour continuer ses achats\n $xoopsTpl->assign('commandAmountTTC', $oledrion_Currency->amountForDisplay($commandAmountTTC, 'l'));\t// Montant TTC de la commande\n $xoopsTpl->assign('discountsDescription', $discountsDescription);\t\t\t\t\t// Liste des réductions accordées\n $showOrderButton = true;\n $showRegistredOnly = false;\n if (oledrion_utils::getModuleOption('restrict_orders', false) && $uid == 0) {\n $showRegistredOnly = true;\n $showOrderButton = false;\n }\n $xoopsTpl->assign('showRegistredOnly', $showRegistredOnly);\n $xoopsTpl->assign('showOrderButton', $showOrderButton);\n}", "public function Render() {\n\t$nQtyOrd = $this->Qty();\n\tif ($nQtyOrd > 0) {\n\t $htLineQty = $nQtyOrd;\n\n\t $mnyPrice = $this->Price();\t\t// item price\n\t $mnyPerItm = $this->SH_perItem();\t\t// per-item shipping\n\t $mnyPerPkg = $this->SH_perPackage();\t// per-pkg minimum shipping\n\t $mnyPriceQty = $mnyPrice * $nQtyOrd;\t// line total sale\n\t $mnyPerItmQty = $mnyPerItm * $nQtyOrd;\t// line total per-item shipping\n\t $mnyLineTotal = $mnyPriceQty + $mnyPerItmQty;\t// line total overall (does not include per-pkg minimum)\n\n\t $strCatNum\t\t= $this->CatNum();\n\t $strPrice\t\t= cCartLine_form::FormatMoney($mnyPrice);\n\t $strPerItm\t\t= cCartLine_form::FormatMoney($mnyPerItm);\n\t $strPriceQty\t= cCartLine_form::FormatMoney($mnyPriceQty);\n\t $strPerItmQty\t= cCartLine_form::FormatMoney($mnyPerItmQty);\n\t $strLineTotal\t= cCartLine_form::FormatMoney($mnyLineTotal);\n\t $strShipPkg\t\t= cCartLine_form::FormatMoney($mnyPerPkg);\n\n\t $htDesc = $this->Descrip();\n\n\t $htDelBtn = '';\n\t $sClass = __CLASS__;\n\t $out = <<<__END__\n<tr phpclass=\"$sClass\">\n<td>$htDelBtn$strCatNum</td>\n<td>$htDesc</td>\n<td class=cart-price align=right>$strPrice</td>\n<td class=shipping align=right>$strPerItm</td>\n<td class=qty align=right>$htLineQty</td>\n<td class=cart-price align=right>$strPriceQty</td>\n<td class=shipping align=right>$strPerItmQty</td>\n<td class=total align=right>$strLineTotal</td>\n<td class=shipping align=right>$strShipPkg</td>\n</tr>\n__END__;\n\t return $out;\n\t}\n }", "function displayData($result){\n\t\t//echo \"<link rel='stytesheet' type ='text/css' href='css/bootstrap.css'>\";\n\t\techo \"<div class='container'>\";\n\t\techo \"<table class='table'>\";\n\t\techo \"<tr><th>Item</th><th>Item description</th><th>Quantity available</th><th>Price</th>\";\n\t\techo \"<th>Quantity order</th></tr>\";\n\t\twhile($row = $result->fetch_assoc()){\n\t\t\t$id = $row['id'];\n\t\t\t$imgloc = $row['pic_location'];\n\t\t\t$desc = $row['description'];\n\t\t\t$qty = $row['quantities'];\n\t\t\t$price = $row['price'];\n\t\t\t$maxDisplay = 30;\n\t\t\t$moreThan30 = true;\n\t\t//\tget max items to display - limit this to 30 items max\n\t\t\tif($qty < $maxDisplay) {\n\t\t\t\t$maxDisplay = $qty;\n\t\t\t\t$moreThan30 = false;\n\t\t\t}\n\t\t\techo \"<tr>\";\n\t\t\techo \"<td><img src='\".$imgloc.\"' class='img-rounded' alt='' alt width='115' height='115'></td>\";\n\t\t\techo \"<td>\".$desc.\"</td>\";\n\t\t\tif($moreThan30) {\n\t\t\t\techo \"<td> 30+ available</td>\";\n\t\t\t} else {\n\t\t\t\techo \"<td>\".$qty.\" available</td>\";\n\t\t\t}\t\n\t\t\techo \"<td>$\".$price.\"</td>\";\n\t\t\techo \"<td>\";\n\t\t\techo \"<form><select name='qty\".$id.\"' id='qty\".$id.\"'>\";\n\t\t\tfor($i = 1; $i <= $maxDisplay;$i++) {\n\t\t\t\techo \"<option value='\".$i.\"'>\".$i.\"</option>\";\n\t\t\t}\n\t\t\techo \"</select></br>\";\n\t\t\techo \"<input type='submit' value='Add to cart' onclick='addToCart(\".$id.\")'></form>\";\n\t\t\techo \"</td>\";\n\t\t\techo \"</tr>\";\n\t\t}\n\t\techo \"</table>\";\n\t\techo \"</div>\";\n\t}", "public function getSummaryOfTotalsReport()\n\t{\n\t\treturn view('reports.summary-of-totals', [\n\t\t\t\t'from_date' => null,\n\t\t\t\t'to_date' => null,\n\t\t\t\t'total_properties' => null,\n\t\t\t\t'totals_per_seller_status' => null,\n\t\t\t\t'totals_per_property_status' => null,\n\t\t\t\t'totals_per_area' => null,\n\t\t\t\t'totals_per_greater_area' => null,\n\t\t\t\t'generated' => false\n\t\t]);\n\t}", "function displayCart()\n{\n if (isset($_SESSION['cart']))\n {\n //echo \"count = \" + count($_SESSION['cart']);\n \n if (count($_SESSION['cart']) == 0)\n {\n echo \"<h3>no items in cart</h3>\";\n return;\n }\n \n echo \"<table>\";\n echo \"<tr>\";\n echo \"<th class='cart cartImage'></th>\";\n echo \"<th class='cart'>Name</th>\";\n echo \"<th class='cart'>Base Price</th>\";\n echo \"<th class='cart'>Sale Price</th>\";\n echo \"<th class='cart'>Quantity</th>\";\n echo \"<th class='cart'></th>\";\n echo \"<th class='cart'></th>\";\n echo \"</tr>\";\n \n foreach ($_SESSION['cart'] as $item)\n {\n // grab the data from the array\n $id = $item['id'];\n $quantity = $item['quantity'];\n $name = $item['name'];\n $basePrice = $item['basePrice'];\n $salePrice = $item['salePrice'];\n $imageUrl = $item['imageUrl'];\n $desc = $item['desc'];\n \n // display the item as a table row\n echo \"<tr>\";\n echo \"<td class='cart cartImage'>\";\n echo empty($imageUrl) || $imageUrl == NULL ? \"&nbsp;\" : \"<img class='productImage' src='$imageUrl' width=100>\";\n echo \"</td>\";\n echo \"<td class='cart cartName'>$name</td>\";\n echo \"<td class='cart cartBasePrice'>\\$\" . number_format($basePrice,2) . \"</td>\";\n echo \"<td class='cart cartSalePrice'>\\$\" . number_format($salePrice,2) . \"</td>\";\n \n //name='update' class='form-control' placeHolder='$itemQuant'\n \n // form for quantity updates\n echo '<form method=\"post\">';\n echo \"<input type='hidden' name='itemId' value='$id'>\";\n echo \"<td class='cart'><input type='text' class='form-control' name='update' placeholder='$quantity' /></td>\";\n echo '<td class=\"cart\"><button class=\"btn btn-warning\">Update</button></td>';\n echo '</form>';\n \n // onclick='alert(\\\"id : \\\" $id \\\\n\\\"quantity : \\\" $quantity);'\n \n // handle the deletes\n echo \"<form method='post'>\";\n echo \"<input type='hidden' name='removeId' value='$id'>\";\n echo \"<td class='cart'><button class='btn btn-danger'>Remove</button></td>\";\n echo \"</form>\";\n \n echo \"</tr>\";\n }\n \n // build the totals display\n displayCartTotals();\n \n // show the checkout button\n echo \"<tr><td colspan=7 class='cartTotals'><br/>--------------------------</td></tr>\";\n echo \"<tr><td colspan=7 class='cartTotals'><a href='checkout.php' alt='Checkout'><button class='btn btn-danger'>Checkout</button></td></tr>\";\n \n echo \"</table>\";\n }\n}", "public function build_table()\n {\n if (count($this->properties) > 0)\n {\n foreach ($this->properties as $property => $values)\n {\n $contents = array();\n $contents[] = $property;\n \n if (! is_array($values))\n {\n $values = array($values);\n }\n \n if (count($values) > 0)\n {\n foreach ($values as $value)\n {\n $contents[] = $value;\n }\n }\n \n $this->addRow($contents);\n }\n \n $this->setColAttributes(0, array('class' => 'header'));\n }\n else\n {\n $contents = array();\n $contents[] = Translation::get('NoResults', null, Utilities::COMMON_LIBRARIES);\n $row = $this->addRow($contents);\n $this->setCellAttributes($row, 0, 'style=\"font-style: italic;text-align:center;\" colspan=2');\n }\n }", "protected function CartTable($id=NULL) {\n\treturn $this->GetConnection()->MakeTableWrapper($this->CartsClass(),$id);\n }", "public function list()\n {\n /* get products */\n $product = Product::all();\n $quantity_in_stock_total = 0;\n $price_per_item_total = 0;\n $total_value_number_total = 0;\n /* add total field and calculator */\n foreach ($product as $key => $value){\n $quantity_in_stock_total += $value->quantity_in_stock;\n $price_per_item_total += $value->price_per_item;\n $total_value_number_total += $value->quantity_in_stock * $value->price_per_item;\n $product[$key]['total_value_number'] = $value->quantity_in_stock * $value->price_per_item;\n }\n /* total of item */\n $total = array(\n 'quantity_in_stock_total' => $quantity_in_stock_total,\n 'price_per_item_total' => $price_per_item_total,\n 'total_value_number_total' => $total_value_number_total,\n );\n\n\n /* set table column */\n $label = array('id', 'product_name', 'quantity_in_stock', 'price_per_item', 'created_at', 'total_value_number');\n\n /*return data to view*/\n return view('products', array('data' => $product, 'label' => $label, 'total' => $total));\n }", "public function show(Request $request) {\n $id = $request->id;\n\n $data = ItemOrderDetail::where('order_id', $id)->get();\n\n $dataHtml = '';\n $dataHtml .= '<table class=\"table\">';\n $dataHtml .= '<thead class=\"thead-dark\">';\n $dataHtml .= '<tr>\n <th scope=\"col\">Item</th>\n <th scope=\"col\">Quantity</th>\n <th scope=\"col\">Price</th>\n <th scope=\"col\">Final Price</th>\n </tr></thead>';\n $dataHtml .= '<tbody\">';\n\n $totalPrice = 0;\n\n foreach($data as $val) {\n $dataHtml .= '<tr\">';\n $dataHtml .= '<td>'.$val->item_name.'</td>';\n $dataHtml .= '<td>'.$val->quantity.'</td>';\n $dataHtml .= '<td>'.show_price($val->price).'</td>';\n $dataHtml .= '<td>'.show_price($val->final_price).'</td>';\n $dataHtml .= '</tr>';\n\n $totalPrice += $val->final_price;\n }\n $dataHtml .= '</tbody>';\n\n $dataHtml .= '<thead class=\"thead-dark\"><tr>\n <th scope=\"col\" colspan=\"3\">Grand Total</th>\n <th scope=\"col\">'.show_price($totalPrice).'</th>\n </tr></thead>';\n\n $dataHtml .= '</table>';\n\n return $dataHtml;\n }", "public function getCartHtml()\n\t{\n\t\t$cart = $this->cart->contents();\n\t\t$cart['cnt_items'] = count($cart['products']);\n\t\t\n\t\t$user = $this->data['user'];\n\t\t\n\t\t$total = 0;\n\t\t\n\t\t$html = '';\n\t\tif ( ! count($cart['products'])){\n\t\t\t$html .= '\n\t\t\t<div class=\"row\">\n\t\t\t\t<div class=\"col-3\"></div>\n\t\t\t\t<div class=\"col-3 center\">\n\t\t\t\t\t<h2 class=\"center\">Ваша корзина пуста.</h2>\n\t\t\t\t\t<a class=\"btn btn-white\" href=\"/\">&larr; продолжить покупки</a>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"col-3\"></div>\n\t\t\t</div>';\n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t\t$html .= '\n\t\t\t<ul class=\"cart-list\" data-cart=\"items\">';\n\t\t\tforeach (array_reverse($cart['products']) as $k=>$i){\n\t\t\t\t$html .= '\n\t\t\t\t<li data-cart-item=\"\">\n\t\t\t\t\t<div class=\"ci-box\">\n\t\t\t\t\t\t<div class=\"pp-block-image\">\n\t\t\t\t\t\t\t<a href=\"'. htmlspecialchars($i['_url']) .'\">\n\t\t\t\t\t\t\t\t<img src=\"'.htmlspecialchars($i['image']) .'\" alt=\"'.htmlspecialchars($i['name']).'\">\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"pp-block-price\">\n\t\t\t\t\t\t\t<div class=\"gd gd-name\"><a class=\"c-pink\" href=\"'. htmlspecialchars($i['_url']) .'\">'. $i['name'] .'</a></div>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<div class=\"gd gd-manufacturer\">Производитель: '. (isset($i['manufacturer']) ? $i['manufacturer'] : '&mdash;') .'</div>';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ($i['prices']){\n\t\t\t\t\t\t\t$cnt_opt = isset($i['prices']['cnt_opt']) ? $i['prices']['cnt_opt'] : '';\n\t\t\t\t\t\t\t$cnt_roz = isset($i['prices']['cnt_roz']) ? $i['prices']['cnt_roz'] : '';\n\t\t\t\t\t\t\t$html .= '\n\t\t\t\t\t\t\t<div class=\"gd gd-size\">Размер: '. $i['prices']['name'] .' ('. $i['prices']['prefix'] .')</div>\n\t\t\t\t\t\t\t<div class=\"gd gd-packing\">Упаковка: '. ($i['options']['type'] ? 'опт - '.($cnt_opt) : 'розница - '.($cnt_roz)) .' шт.</div>';\t\t\n\t\t\t\t\t\t\tunset($cnt_opt);\n\t\t\t\t\t\t\tunset($cnt_roz);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$html .= '\n\t\t\t\t\t\t\t<div class=\"gd gd-price\">\n\t\t\t\t\t\t\t\tЦена:';\n\t\t\t\t\t\t\t\tif ($i['discount']*1){\n\t\t\t\t\t\t\t\t$html .= '\n\t\t\t\t\t\t\t\t<span class=\"gd-new-price\">'. number_format(($i['price']-($i['price']*$i['discount']/100)), 2, ',', \"'\") .' грн.</span>';\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$html .= '\n\t\t\t\t\t\t\t\t<span class=\"gd-new-price\">'. number_format($i['price'], 2, ',', \"'\") .' грн.</span>';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$html .= '\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<div class=\"gd gd-qty\">Количество: <b>&times;</b> '. $i['qty'] .'</div>\n\n\t\t\t\t\t\t\t<div class=\"gd gd-subtotal\">\n\t\t\t\t\t\t\t\tСумма: ';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t# скидка User\n\t\t\t\t\t\t\t\t$discount = isset($user->discount) ? $user->discount*1 : 0;\n\t\t\t\t\t\t\t\t# если нет цена + размер\n\t\t\t\t\t\t\t\tif ( ! $i['prices']){\n\t\t\t\t\t\t\t\t\t# если USER скидка больше чем скидка на товар\n\t\t\t\t\t\t\t\t\tif ($discount > $i['discount']*1){\n\t\t\t\t\t\t\t\t\t\t$summa = $i['qty'] * $i['price'];\n\t\t\t\t\t\t\t\t\t\t$html .= number_format($summa, 2, ',', \"'\").' грн.';\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t$summa = $i['qty'] * ($i['price'] - round($i['price'] * $i['discount']/ 100, 2));\n\t\t\t\t\t\t\t\t\t\t$html .= number_format($summa, 2, ',', \"'\").' грн.';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t# если USER скидка больше чем скидка на товар\n\t\t\t\t\t\t\t\t\tif ($discount > $i['discount']){\n\t\t\t\t\t\t\t\t\t\tif ($i['options']['type'] == 0){\n\t\t\t\t\t\t\t\t\t\t\t$roz = isset($i['prices']['roz']) ? $i['prices']['roz'] : 0;\n\t\t\t\t\t\t\t\t\t\t\t$summa = round($i['qty'] * $roz, 2);\n\t\t\t\t\t\t\t\t\t\t\t$html .= number_format($summa, 2, ',', \"'\").' грн.';\n\t\t\t\t\t\t\t\t\t\t\tunset($roz);\n\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t$opt = isset($i['prices']['opt']) ? $i['prices']['opt'] : 0;\n\t\t\t\t\t\t\t\t\t\t\t$summa = round($i['qty'] * $opt, 2);\n\t\t\t\t\t\t\t\t\t\t\t$html .= number_format($summa, 2, ',', \"'\").' грн.';\n\t\t\t\t\t\t\t\t\t\t\tunset($opt);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\tif ($i['options']['type'] == 0){\n\t\t\t\t\t\t\t\t\t\t\t$roz = isset($i['prices']['roz']) ? $i['prices']['roz'] : 0;\n\t\t\t\t\t\t\t\t\t\t\t$summa = $i['qty'] * ($roz - round($roz * $i['discount']/ 100, 2));\n\t\t\t\t\t\t\t\t\t\t\t$html .= number_format($summa, 2, ',', \"'\").' грн.';\n\t\t\t\t\t\t\t\t\t\t\tunset($roz);\n\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t$opt = isset($i['prices']['opt']) ? $i['prices']['opt'] : 0;\n\t\t\t\t\t\t\t\t\t\t\t$summa = $i['qty'] * ($opt - round($opt * $i['discount']/ 100, 2));\n\t\t\t\t\t\t\t\t\t\t\t$html .= number_format($summa, 2, ',', \"'\").' грн.';\n\t\t\t\t\t\t\t\t\t\t\tunset($opt);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$html .= '\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div class=\"gd-counted\">\n\t\t\t\t\t\t\t\t<div class=\"quant\">\n\t\t\t\t\t\t\t\t\t<button data-quantity-button=\"minus\" class=\"quant-button minus\"><span>−</span></button>\n\t\t\t\t\t\t\t\t\t<input class=\"quant-box\" type=\"text\" name=\"quantity['. $k .']\" value=\"'. $i['qty'] .'\" data-quantity=\"box\" autocomplete=\"off\">\n\t\t\t\t\t\t\t\t\t<button data-quantity-button=\"plus\" class=\"quant-button plus\"><span>+</span></button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<div class=\"gd-counted\" data-btn=\"update\" style=\"display:none;\">\n\t\t\t\t\t\t\t\t<button class=\"btn btn-pink\" type=\"submit\">Пересчитать</button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\t<a class=\"gd gd-delete uppercase\" data-cart-delete=\"'. $k .'\" href=\"/cart?del='. $k .'\">Удалить</a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</li>';\n\t\t\t\t\n\t\t\t\t$total += $summa; \n\t\t\t}\n\t\t\t\t$html .= '\n\t\t\t\t<li>\n\t\t\t\t\t<div class=\"gd-total\">\n\t\t\t\t\t\t<div class=\"gd-label\">\n\t\t\t\t\t\t\t<div class=\"gd-label-name\">Всего:</div>\n\t\t\t\t\t\t\t<div class=\"gd-label-box\" data-cart=\"subtotal\">'. number_format($total, 2, ',', \"'\") .' грн.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"gd-label\">\n\t\t\t\t\t\t\t<div class=\"gd-label-name\">Ваша скидка:</div>\n\t\t\t\t\t\t\t<div class=\"gd-label-box\" data-cart=\"discount\">'. $discount .' %</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"gd-label\">\n\t\t\t\t\t\t\t<div class=\"gd-label-name\">Итого:</div>\n\t\t\t\t\t\t\t<div class=\"gd-label-box\" data-cart=\"total\">';\n\t\t\t\t\t\t\tif ($discount){\n\t\t\t\t\t\t\t\t$total = 0;\n\t\t\t\t\t\t\t\tforeach ($cart['products'] as $k){\n\t\t\t\t\t\t\t\t\t# какая скидка больше\n\t\t\t\t\t\t\t\t\t$_discount = $discount > $k['discount']*1 ? $discount : $k['discount']*1;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t# если нет цена + размер\n\t\t\t\t\t\t\t\t\tif ( ! $k['prices']){ \n\t\t\t\t\t\t\t\t\t\t$total += $k['qty'] * ($k['price'] - round($k['price'] * $_discount/ 100, 2));\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\tif ($k['options']['type'] == 0){\n\t\t\t\t\t\t\t\t\t\t\t$roz = isset($k['prices']['roz']) ? $k['prices']['roz'] : 0;\n\t\t\t\t\t\t\t\t\t\t\t$total += round($k['qty'] * ($roz - $roz * $_discount / 100), 2);\n\t\t\t\t\t\t\t\t\t\t\tunset($roz);\n\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t$opt = isset($k['prices']['opt']) ? $k['prices']['opt'] : 0;\n\t\t\t\t\t\t\t\t\t\t\t$total += round($k['qty'] * ($opt - $opt * $_discount / 100), 2);\n\t\t\t\t\t\t\t\t\t\t\tunset($opt);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$html .= number_format($total, 2, ',', \"'\").' грн.';\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$html .= number_format($total, 2, ',', \"'\").' грн.';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$html .= '\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</li>\n\t\t\t</ul>';\t\n\t\t}\n\t\t\n\t\t# убираем пробелы (сжимаем)\n\t\t$cart['html'] = preg_replace('/\\s+/', ' ', $html);\n\t\t\n\t\t$cart['cart_total'] = number_format($total, 2, ',', \"'\");\n\t\t\n\t\t# Для корзины в подвале\n\t\t$bott = '';\n\t\tif ( ! count($cart['products'])){\n\t\t\t$bott .= '\n\t\t\t<div class=\"cbt-content\">\n\t\t\t\t<div class=\"cbt-empty\">Ваша корзина пуста</div>\n\t\t\t</div>';\n\t\t}else{\n\t\t\t$bott .= '\n\t\t\t<div class=\"cbt-content\">\n\t\t\t\t<div class=\"cbt-content-left\">\n\t\t\t\t\t<div class=\"owl-carousel\" data-cart-bt=\"owlCarusel\">';\n\t\t\t\t\tforeach (array_reverse($cart['products']) as $k=>$v){\n\t\t\t\t\t\t$bott .= '<div class=\"item\">\n\t\t\t\t\t\t\t<div class=\"cbt-item\">\n\t\t\t\t\t\t\t\t<div class=\"cbt-item-right\">\n\t\t\t\t\t\t\t\t\t<div class=\"gd gd-name\">\n\t\t\t\t\t\t\t\t\t\t<a href=\"'.htmlspecialchars($v['_url']).'\">'.$v['name'].'</a>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"gd gd-manufacturer\">Производитель: '.(isset($v['manufacturer']) ? $v['manufacturer'] : '&mdash;').'</div>';\n\t\t\t\t\t\t\t\t\tif ($v['prices']){\n\t\t\t\t\t\t\t\t\t$cnt_roz = isset($v['prices']['cnt_roz']) ? $v['prices']['cnt_roz'] : '';\n\t\t\t\t\t\t\t\t\t$cnt_opt = isset($v['prices']['cnt_opt']) ? $v['prices']['cnt_opt'] : '';\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$bott .= '\n\t\t\t\t\t\t\t\t\t<div class=\"gd gd-size\">Размер: '.$v['prices']['name'].' ('.$v['prices']['prefix'].')</div>\n\t\t\t\t\t\t\t\t\t<div class=\"gd gd-packing\">Упаковка: '. ($v['options']['type'] ? 'опт - '.($cnt_opt) : 'розница - '.($cnt_roz)) .' шт.</div>';\n\t\t\t\t\t\t\t\t\tunset($cnt_roz);\n\t\t\t\t\t\t\t\t\tunset($cnt_opt);\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$bott .= '\n\t\t\t\t\t\t\t\t\t<div class=\"gd gd-price\">Цена:';\n\t\t\t\t\t\t\t\t\tif ($v['discount']*1){\n\t\t\t\t\t\t\t\t\t\t$bott .= '\n\t\t\t\t\t\t\t\t\t\t<span class=\"gd-old-price\">'.number_format($v['price'], 2, ',', \"'\").' грн.</span>\n\t\t\t\t\t\t\t\t\t\t<span class=\"gd-new-price\">'.number_format(($v['price']-($v['price']*$v['discount']/100)), 2, ',', \"'\").' грн.</span>';\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t$bott .= '\n\t\t\t\t\t\t\t\t\t\t<span class=\"gd-new-price\">'.number_format($v['price'], 2, ',', \"'\").' грн.</span>';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$bott .= '\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"gd gd-qty\">Количество: <b>&times;</b> '.$v['qty'].'</div>\n\t\t\t\t\t\t\t\t\t<div class=\"gd gd-subtotal\">Сумма: '.number_format($v['subtotal'], 2, ',', \"'\").' грн.</div>\n\n\t\t\t\t\t\t\t\t\t<a class=\"gd gd-edit\" href=\"'. htmlspecialchars($v['_url']) . ($v['prices'] ? ('#size='.$v['options']['size'].';packing='.$v['options']['type']) : '').'\">Редактировать</a>\n\t\t\t\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\t\t\t<a class=\"gd gd-delete\" href=\"/cart?del='.$k.'>\" data-cart-delete=\"'.$k.'\">Удалить</a>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"cbt-item-left\">\n\t\t\t\t\t\t\t\t\t<img src=\"'.htmlspecialchars($v['image']).'\" alt=\"'.htmlspecialchars($v['name']).'\">\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}\n\t\t\t$bott .= '\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"cbt-content-right\">\n\t\t\t\t\t<a class=\"btn btn-pink\" href=\"/cart\">Оформить</a>\n\t\t\t\t</div>\n\t\t\t</div>';\n\t\t}\n\t\t# убираем пробелы (сжимаем)\n\t\t$cart['html_bottom'] = preg_replace('/\\s+/', ' ', $bott);\n\t\t\n\t\t\n\t\tunset($cart['products']);\n\t\t\n\t\treturn $cart;\n\t}", "public function create_cart()\n {\n // get products currently in cart\n\n $products = $this->get();\n\n $shipping = $this->get_shipping_cost();\n $data = '';\n $subtotal = 0;\n\n $data .= '<li class=\"header_row\"><div class=\"col1\">Product Name:</div>\n <div class=\"col2\">Quantity:</div><div class=\"col3\">Product Price:</div>\n <div class=col4>Total:</div></li>';\n\n if ($products != '') {\n //products to display\n\n $line = 1;\n foreach ($products as $product) {\n // create new item in cart\n $data .= '<li';\n if ($line % 2 == 0) {\n $data .= 'class=\"alt\"';\n }\n // displaying cart items(name, price,count)\n $data .= '><div class=\"col1\"><a href=\"' . SITE_PATH . 'product.php?id=' . $product['id'] . '\" >' . $product['name'] . '</a></div>';\n $data .= '<div class=\"col2\"><input name=\"product' . $product['id'] . '\" value=\"' . $_SESSION['cart'][$product['id']] . '\"></div>';\n $data .= '<div class=\"col3\">$' .number_format((float)($product['price']), 2, '.', '') . '</div>';\n $data .= '<div class=\"col4\">$' . $product['price'] * $_SESSION['cart'][$product['id']] . '</div></li>';\n\n // calculating subtotal\n $subtotal += $product['price'] * $_SESSION['cart'][$product['id']];\n\n $line++;\n }\n\n // add subtotal row\n $data .= '<li class=\"subtotal_row\"><div class=\"col1\">Subtotal</div>\n <div class=\"col2\">$' . number_format((float)($subtotal), 2, '.', '') . '</div></li>';\n\n // Tax row\n $data .= '<li class= \"taxes_row\"><div class=\"col1\">Tax (%' . (TAX * 100) . ' )</div>\n <div class=\"col2\">$' . number_format((float)(TAX * $subtotal), 2, '.', '') . '</div></li>';\n\n // Shipping row\n $data .= '<li class= \"shipping_row\"><div class=\"col1\">Total Shipping Cost</div>\n <div class=\"col2\">$' . number_format((float)($shipping), 2, '.', '') . '</div></li>';\n\n\n // add total row\n $data .= '<li class=\"total_row\"><div class=\"col1\">Total</div>\n <div class=\"col2\">$' . number_format((float)((TAX * $subtotal) + $subtotal) + $shipping, 2, '.', '') . '</div></li>';\n \n } else {\n // no products to display\n $data .= '<li><strong>No items in the Cart!</strong></li>';\n\n // add subtotal row\n $data .= '<li class=\"subtotal_row\"><div class=\"col1\">Subtotal</div>\n <div class=\"col2\">$0.00</div></li>';\n\n // Tax row\n $data .= '<li class= \"taxes_row\"><div class=\"col1\">Tax (%' . (TAX * 100) . ' )</div>\n <div class=\"col2\">$0.00</div></li>';\n\n // Shipping row\n $data .= '<li class= \"shipping_row\"><div class=\"col1\">Total Shipping Cost</div>\n <div class=\"col2\">$0.00</div></li>';\n\n // add total row\n $data .= '<li class=\"total_row\"><div class=\"col1\">Total</div>\n <div class=\"col2\">$0.00</div></li>';\n }\n\n\n return $data;\n }", "public function get_cart(){\n return $this->db->get_table($this->cart);\n }", "public function getCartHead()\n {\n $user_id = 0;\n if(Auth::check()){\n $user_id = Auth::id();\n }else{\n $user_id = (Cookie::has('user_id') ? Cookie::get('user_id') : Session::get('user_id'));\n }\n $getCart = Cart::where('user_id', $user_id)->orderBy('id', 'desc')->get();\n\n if(count($getCart)>0){\n echo view('frontend.carts.cart-head')->with(compact('getCart'));\n }else{\n echo '<h4 style=\"color:red;text-align: center;padding: 0px\">Your cart is empty.</h4>';\n }\n }", "static function generateTotalHTML($a_amount)\n\t{\n\t\techo \"<tr class='inTableRow'>\\n\";\n//\t\techo \"<th class='inTableColTaskID'>Task ID</th>\\n\";\n\t\techo \"<th class='inTableColTaskName'></th>\\n\";\n\t\techo \"<th></th>\\n\";\n\t\techo \"<th class='chTableColAmount inTableTotal'>Total:</th>\\n\";\n\t\techo \"<th class='inTotal'>$a_amount</th>\\n\";\n\t\techo \"</tr>\\n\";\n\t}", "function seat_summary_table($mpprops, $bmultiperson, $conscolumn, $brebelrates, $thispagesettings)\n\t{\n\t\tglobal $bdebug;\n\t\t$prettyrow = 0;\n\t print \"<table>\\n\";\n\t\tprint \"<tr class=\\\"headings\\\">\";\n\t\tif ($bmultiperson)\n\t\t\tprint \"<td>Name</td>\";\n if ($conscolumn)\n print \"<td>Constituency</td>\";\n\t print \"<td>From</td><td>To</td>\";\n\t print \"<td>Party</td>\";\n\t\tif ($brebelrates)\n\t\t{\n\t\t print \"<td>Rebellions (<a href=\\\"faq.php#clarify\\\">explain...</a>)</td><td>Attendance (<a href=\\\"faq.php#clarify\\\">explain...</a>)</td>\";\n\t\t\tif (!$bmultiperson)\n\t\t\t print \"<td>Teller</td>\";\n\t\t}\n\t\tprint \"</tr>\\n\";\n\n\t foreach ($mpprops as $mpprop)\n\t {\n // suppress all the MPs that are too early\n if ($mpprop['enteredhouse'] < '1997')\n continue; \n\n $prettyrow = pretty_row_start($prettyrow);\n\t\t\tif ($bmultiperson)\n\t\t\t{\n\t\t\t\tif ($thispagesettings)\n\t\t\t\t\tprint \"<td>\n \".$mpprop['name'].\"\n <a href=\\\"/mp.php?mpn=\".$mpprop['name'].\"&$thispagesettings\\\">(show only their votes)</a>\n </td>\\n\";\n\t\t\t\telse\n\t\t\t\t\tprint \"<td>\".$mpprop['name'].\"</td>\\n\";\n \t\t\t}\n\t\t\tif ($conscolumn) {\n if ($mpprop[\"house\"] == \"lords\") \n print \"<td class=\\\"lords\\\">House of Lords</td>\\n\";\n else\n print \"<td class=\\\"commons\\\">\".$mpprop['constituency'].\"</td>\\n\";\n }\n $enteredhouse = ($mpprop['enteredhouse'] == \"0000-00-00\" ? \"before 1999\" : pretty_date($mpprop['enteredhouse']));\n\t\t\tprint \"<td>\".$enteredhouse.\"</td>\\n\";\n\t $lefthouse = ($mpprop['lefthouse'] == \"9999-12-31\" ? \"still in office\" : pretty_date($mpprop['lefthouse']));\n\t\t\tprint \"<td>\".$lefthouse.\"</td>\\n\";\n\t print \"<td>\".pretty_party($mpprop['party']).\"</td>\\n\";\n\t\t\tif ($brebelrates)\n\t\t\t{\n if (whipless_party($mpprop[\"party\"]))\n print \"<td class=\\\"percent\\\">no whip</td>\\n\";\n else\n print \"<td class=\\\"percent\\\">\".percentise_votes($mpprop['rebellions'], $mpprop['votesattended']).\"</td>\\n\";\n\t\t\t\tprint \"<td class=\\\"percent\\\">\".percentise_votes($mpprop['votesattended'], $mpprop['votespossible']).\"</td>\\n\";\n\t\t\t\tif (!$bmultiperson)\n\t\t\t\t{\n\t\t\t $tells = $mpprop['tells'];\n\t\t\t\t\tif( $mpprop['house'] == 'scotland' )\n\t\t\t\t\t\tprint \"<td> n/a </td>\\n\";\n\t\t\t\t\telse\n\t\t\t\t\t\tprint \"<td> $tells \".($tells != 1 ? \"times\" : \"time\").\"</td>\\n\";\n\t\t\t\t}\n\t\t\t}\n\t print \"</tr>\\n\";\n\t }\n\t print \"</table>\";\n\t}", "public function sales_table($sales_no)\n {\n $settings = $this->MSettings->get_by_company_id($this->session->user_company);\n $tax_percent = $settings['tax_rate'];\n\n $details = $this->MSales_details->get_by_sales_no($sales_no);\n\n $msg = '\n <table id=\"sales_details_table\" class=\"table table-striped table-bordered\">\n <thead>\n <tr>\n <th class=\"left\">Item Code</th>\n <th class=\"left\">Item Name</th>\n <th class=\"center\">Quantity</th>\n <th class=\"center\">Sales Price</th>\n <th class=\"center\">Total Price</th>\n <th class=\"span3 center\">Action</th>\n </tr>\n </thead>\n <tbody>';\n $qty = 0;\n $price = 0;\n $tax_amount = 0;\n if (count($details) > 0)\n {\n foreach ($details as $list)\n {\n $msg .= '\n <tr>\n <td>' . $list['item_code'] . '</td>\n <td>' . $list['item_name'] . '</td>\n <td class=\"center\">' . $list['quantity'] . '</td>\n <td class=\"right\">' . number_format($list['sale_price'], 2) . '</td>\n <td class=\"right\">' . number_format($list['quantity'] * $list['sale_price'], 2) . '</td>\n <td class=\"center\">\n <input type=\"hidden\" value=\"' . $list['id'] . '\" /><span class=\"btn del btn-danger sales_item_delete\"><i class=\"icon-trash icon-white\"></i>Delete</span>\n </td>\n </tr>';\n $qty += $list['quantity'];\n $price += $list['quantity'] * $list['sale_price'];\n }\n }\n if ($price > 0)\n {\n $tax_amount = ($tax_percent * $price) / 100;\n $total_amount = $price + $tax_amount;\n }\n\n $msg .= '</tbody>\n <tfoot>\n <tr>\n <th class=\"left\" colspan=\"6\">Order Totals</th>\n </tr>\n <tr>\n <td colspan=\"2\">&nbsp;</td>\n <td class=\"center\">' . $qty . '</td>\n <td></td>\n <td class=\"right\">' . number_format($price, 2) . '</td>\n <td></td>\n </tr>\n <tr>\n <td colspan=\"4\" class=\"right\">Sales TAX</td>\n <td class=\"right\">' . number_format($tax_amount, 2) . '</td>\n <td></td>\n </tr>\n <!--<tr>\n <td colspan=\"4\" class=\"right\">Discount</td>\n <td class=\"right\"><input type=\"text\" name=\"discount\" id=\"discount\" value=\"\"></td>\n <td></td>\n </tr> -->\n <tr>\n <td colspan=\"4\" class=\"right\">Total Paid Amount</td>\n <td class=\"right\"><input type=\"text\" data-org-amount=\"' . $total_amount . '\" name=\"paid_amount\" id=\"paid_amount\" value=\"' . $total_amount . '\"></td>\n <td></td>\n </tr>\n </tfoot>\n </table>';\n\n return $msg;\n }", "public function getCart();", "public function carrito() {\n\n $cadena = '';\n $carrito = $this->cart->contents();\n\n\n foreach ($carrito as $row) {\n\n $cadena .= '<tr>';\n $cadena .= '<td class=\"cart_product\">';\n $cadena .= '<a href=\"\"><img src=\"' . base_url() . 'assets/images/cart/one.png\" alt=\"\"></a>';\n $cadena .= '</td>';\n $cadena .= '<td class=\"cart_description\">';\n $cadena .= '<h4>' . $row['name'] . '</h4>';\n $cadena .= '<p>Sku: ' . $row['id'] . '</p>';\n $cadena .= '</td>';\n $cadena .= '<td class=\"cart_price\">';\n $cadena .= '<p>$' . $this->recursos->Formato1($row['price']) . '</p>';\n $cadena .= '</td>';\n $cadena .= '<td class=\"cart_quantity\">';\n $cadena .= '<div class=\"cart_quantity_button\">';\n $cadena .= '<input type=\"hidden\" id=\"base\" value=\"' . base_url() . '\">';\n $cadena .= '<input type=\"hidden\" id=\"original' . $row['rowid'] . '\" value=\"' . $row['qty'] . '\">';\n $cadena .= '<input class=\"cart_quantity_input\" id=\"cant' . $row['rowid'] . '\" onkeypress=\"return ValidNum(event)\" type=\"text\" name=\"quantity\" value=\"' . $row['qty'] . '\" autocomplete=\"off\" size=\"5\">';\n $cadena .= '</div>';\n $cadena .= '</td>';\n $cadena .= '<td class=\"cart_total\">';\n $cadena .= '<p id=\"total\" class=\"cart_total_price\">$' . $this->recursos->Formato1($row['subtotal']) . '</p>';\n $cadena .= '</td>';\n $cadena .= '<td>';\n $cadena .= '<button id=\"actualiar\" onclick=\"return calculo(\\'' . $row['rowid'] . '\\');\" class=\"btn btn-success pull-left\" data-placement=\"top\" data-toggle=\"tooltip\" title=\"ACTUALIZAR CARRO\" ><i class=\"fa fa-refresh\"></i></button>';\n $cadena .= '</td>';\n $cadena .= '<td>';\n $cadena .= '<button onclick=\"return eliminar(\\'' . $row['rowid'] . '\\',0);\" class=\"btn btn-danger\" data-placement=\"right\" data-toggle=\"tooltip\" title=\"ELIMINAR DE CARRITO\" ><i class=\"fa fa-trash-o\"></i></button>';\n $cadena .= '</td>';\n $cadena .= '</tr>';\n }\n\n\n\n $data['detalle'] = $cadena;\n $data['total'] = $this->recursos->Formato1($this->cart->total());\n\n $this->Plantilla('cart', $data);\n }", "protected function generateSummaryTable(&$params)\n {\n \t$newFields = array($params[\"grouping_fields\"][0]);\n \t$newHeaders = array($params[\"headers\"][array_search($params[\"grouping_fields\"][0],$params[\"fields\"])]);\n \t$indices = array(array_search($params[\"grouping_fields\"][0],$params[\"fields\"]));\n \t$newParams = array(\"total\"=>array(false), \"type\"=>array(\"string\"));\n \tforeach($params[\"data_params\"]['total'] as $index => $value)\n \t{\n \t\tif($value === true)\n \t\t{\n \t\t\t$tempField = $params[\"fields\"][$index];\n \t\t $newFields[] = $tempField;\n \t\t $newHeaders[] = $params[\"headers\"][array_search($tempField,$params[\"fields\"])];\n \t\t $indices[] = array_search($tempField,$params[\"fields\"]);\n \t\t $newParams[\"total\"][] = true;\n \t\t $newParams[\"type\"][] = $params[\"data_params\"][\"type\"][$index];\n \t\t}\n \t}\n\n \t$filteredData = array();\n \t\n \tforeach($this->reportData as $data)\n \t{\n \t\t$row = array();\n \t\tforeach($indices as $index)\n \t\t{\n \t\t\t$row[] = $data[$index];\n \t\t}\n \t\t$filteredData[] = $row;\n \t}\n \t\n \t$summarizedData = array();\n \t$currentRow = $filteredData[0][0];\n \t\n \tfor($i = 0; $i < count($filteredData); $i++)\n \t{\n \t\t$row = array();\n \t\t$row[0] = $currentRow;\n \t\t$add = false;\n \t\twhile($filteredData[$i][0] == $currentRow)\n \t\t{\n \t\t\tfor($j = 1; $j < count($indices); $j++)\n \t\t\t{\n \t\t\t\t$add = true;\n \t\t\t\t$row[$j] += str_replace(\",\", \"\", $filteredData[$i][$j]);\n \t\t\t}\n \t\t\t$i++;\n \t\t}\n \t\tif($add) $summarizedData[] = $row;\n \t\t$currentRow = $filteredData[$i][0];\n $i--;\n \t}\n $table = new TableContent($newHeaders, $summarizedData, $newParams);\n $table->style[\"autoTotalsBox\"] = true;\n $params[\"report\"]->add($table);\n }", "public function view_cart()\n {\n $this->layout = 'cart';\n $cart = $this->Session->read('cart'); //doc session va gui session len tren view\n $payment = $this->Session->read('payment');\n $this->set(compact('cart','payment')); //gửi nhiều biến cùng 1 lúc lên view\n $this->set('title_for_layout', 'Giỏ hàng - ChickenRainShop');\n\n }", "public function action_catalog_products_cout()\n {\n echo '<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">';\n echo '<tr><td width=\"120px\">Catalog Name</td><td width=\"100px\">在架产品数量</td><td width=\"100px\">下架产品数量</td></tr>';\n $catalogs = DB::select('id')->from('products_category')->where('visibility', '=', 1)->where('on_menu', '=', 1)->execute('slave');\n foreach($catalogs as $cata)\n {\n $catalog = Catalog::instance($cata['id']);\n $posterity_ids = $catalog->posterity();\n $posterity_ids[] = $cata['id'];\n $posterity_sql = implode(',', $posterity_ids);\n\n $sql = 'SELECT count(distinct products.id) as num FROM products LEFT JOIN catalog_products ON catalog_products.product_id=products.id \n WHERE catalog_products.catalog_id IN (' . $posterity_sql . ') AND products.site_id =1 AND products.visibility = 1';\n\n $onsale_count = DB::query(Database::SELECT, $sql . ' AND status = 1')->execute('slave')->get('num');\n $offsale_count = DB::query(Database::SELECT, $sql . ' AND status = 0')->execute('slave')->get('num');\n\n echo '<tr><td>' . $catalog->get('name') . '</td><td>' . $onsale_count . '</td><td>' . $offsale_count . '</td></tr>';\n }\n echo '</table>';\n }", "public function SummaryLine_HTML_row() {\n\t$sCatNum = $this->CatNum();\n\t$htLink = $this->ShopLink($sCatNum);\n\t$sName = $this->NameString();\n\t$sStats = $this->RenderStatus_HTML_cells();\n\treturn \"\\n<tr><td>$htLink</td><td>&ldquo;$sName&rdquo;</td>$sStats</tr>\";\n }", "public function getCartInfo () {\n\n $data = array(\n 'itemsCount' => 0,\n 'total' => 0\n );\n\n $order = $this->getOrder();\n\n if ( !$order ) {\n return $data;\n }\n\n $data['itemsCount'] = count( $order->getItems() );\n $data['total'] = $order->getTotal();\n\n return $data;\n }", "public function ViewResultsAsTable($crud = false) {\n \n //get an array containing the keys from the first object of the result set (turned into an array)\n $keys = array_keys(get_object_vars($this->rs[0]));\n \n //set up the table\n $string = \"<table class='table table-striped'>\";\n \n //loop through the keys array to set up the column headings for the table\n foreach($keys as $head) {\n \n //insert the heading\n $string .= \"<td class='heading'>$head</td>\";\n }\n \n //if we are outputting the table for use in the crud interface\n if ($crud == true) {\n \n //add in the column headings for the update and delete columns\n $string .= \"<td class='heading'>Modify</td>\";\n $string .= \"<td class='heading'>Remove</td>\";\n }\n \n //loop through the result set array of objects\n foreach($this->rs as $row) {\n \n //save the object members into an array\n $vars = get_object_vars($row);\n \n //set up a row\n $string .= \"<tr>\";\n \n //loop through each object, as an array\n foreach ($vars as $item) {\n \n //output the cell value into the table\n $string .= \"<td>\" . $item . \"</td>\";\n }\n \n //if we are outputting this table for use in the crud interface\n if ($crud == true) {\n \n //add in the update and delete columns at the end of the row\n $string .= \"<td><a href='guitar_shop_crud.php/?action=Updating&cust=$vars[customerID]' class='btn btn-primary'>Update</a></td>\";\n $string .= \"<td><a href='guitar_shop_crud.php/?action=Deleting&cust=$vars[customerID]' class='btn btn-danger'>Delete</a></td>\";\n \n }\n \n //close the row\n $string .= \"</tr>\";\n }\n \n //close the table\n $string .= \"</table>\";\n \n //return the string containing the html table\n return $string;\n }", "public function print(): void\n {\n $values = $this->table->getValues();\n $size = $this->table->getSize();\n echo \"<table>\";\n foreach ($values as $index => $row) {\n if ($index === 1) {\n echo \"<tr><th>*</th>\";\n foreach ($row as $cell) {\n echo \"<th style='width:\" . (100 / ($size + 1)) . \"%'>\" . $cell . \"</th>\";\n }\n echo \"</tr>\";\n }\n echo \"<tr>\";\n echo \"<th style='width:\" . (100 / ($size + 1)) . \"%'>{$index}</th>\";\n foreach ($row as $cell) {\n echo \"<td style='width:\" . (100 / ($size + 1)) . \"%'>\" . $cell . \"</td>\";\n }\n echo \"</tr>\";\n }\n echo \"</table>\";\n }", "public function index()\n {\n return view('cart', [\n 'products' => Cart::content(),\n 'discount' => Cart::discount(),\n 'coupons' => Cart::coupons()->toArray(),\n 'total' => Cart::total(),\n 'total_with_discount' => Cart::totalWithDiscount(),\n ]);\n }", "public function itemsSummaryData()\n {\n $items = Item::all();\n $batches = Batch::all();\n $deficitItems = $items->filter(function ($item) {\n return $item->stock <= $item->reorder_level;\n });\n $deficitItemsCount = $deficitItems->count();\n $expiredItems = $batches->filter(function ($batch) {\n return $batch->expire_date <= now()->toDateString();\n });\n $expiredItemsCount = $expiredItems->count();\n return ResponseHelper::findSuccess('Items Summary Data', [\n 'deficitItems' => ItemSuppliersResource::collection($deficitItems),\n 'deficitItemsCount' => $deficitItemsCount,\n 'expiredItems' => BatchResource::collection($expiredItems),\n 'expiredItemsCount' => $expiredItemsCount\n ]);\n }", "public function purchase_return_table($purchase_return_no)\n {\n $details = $this->MPurchase_return_details->get_by_purchase_return_no($purchase_return_no);\n\n $msg = '\n <table id=\"data_table\" class=\"table table-bordered table-striped responsive\">\n <thead>\n <tr>\n <th class=\"left\">Item Code</th>\n <th class=\"left\">Item Name</th>\n <th class=\"center\">Quantity</th>\n <th class=\"center\">Unit Price</th>\n <th class=\"center\">Total Price</th>\n <th class=\"span3 center\">Action</th>\n </tr>\n </thead>';\n $msg .= '<tbody>';\n $qty = 0;\n $price = 0;\n if (count($details) > 0)\n {\n foreach ($details as $list)\n {\n $msg .= '\n <tr>\n <td>' . $list['item_code'] . '</td>\n <td>' . $list['item_name'] . '</td>\n <td class=\"center\">' . $list['quantity'] . '</td>\n <td class=\"right\">' . number_format($list['purchase_price'], 2) . '</td>\n <td class=\"right\">' . number_format($list['quantity'] * $list['purchase_price'], 2) . '</td>\n <td class=\"center\">\n <input type=\"hidden\" value=\"' . $list['id'] . '\" /><span class=\"btn btn-danger purchase_return_item_delete\"><i class=\"icon-trash icon-white\"></i>Delete</span>\n </td>\n </tr>';\n $qty += $list['quantity'];\n $price += $list['quantity'] * $list['purchase_price'];\n }\n }\n $msg .= '</tbody>\n <tfoot>\n <tr>\n <th class=\"left\" colspan=\"6\">Order Totals</th>\n </tr>\n <tr>\n <td colspan=\"2\">&nbsp</td>\n <td class=\"center\">' . $qty . '</td>\n <td></td>\n <td class=\"right\">' . number_format($price, 2) . '</td><td></td>\n </tr>\n <tr>\n <td colspan=\"4\" class=\"right\"> Total Paid Amount</td>\n <td class=\"right\"><input type=\"text\" name=\"paid_amount\" id=\"paid_amount\"></td>\n <td></td>\n </tr>\n </tfoot>\n </table>';\n\n return $msg;\n }", "public function profit_dollar_widget() {\n\t$this->load->model('widget_model');\n\t$widget_data = $this->widget_model->profit_dollar_widget();\n\n\t//send data array to build a formatted table\n\t$this->load->model('display_tabular_data');\n\t$widget_table = $this->display_tabular_data->build_table($widget_data, false, WIDGET_TABLE_CLASS);\n\n\techo $widget_table;\n }", "private function writeTable() {\n\t\trequire_once $GLOBALS[\"DIR_PRINT\"] . \"pdftable.php\";\n\t\t\n\t\t// create table with data and sum\n\t\t$table = new PDFTable($this->data);\n\t\t\n\t\t// set columns\n\t\t$table->setColumnWidth(1, 30);\n\t\t$table->setColumnWidth(2, 25);\n\t\t$table->setColumnWidth(3, 25);\n\t\t$table->setColumnWidth(5, 25);\n\t\t$table->setColumnWidth(6, 25);\n\t\t$table->setColumnWidth(7, 30);\n\t\t$table->setColumnWidth(13, 35);\n\t\t$table->setColumnWidth(14, 30);\n\t\t$table->setColumnWidth(15, 15);\n\t\t$table->setColumnWidth(16, 24);\n\t\t\n\t\t$table->changeColumnLabel(1, \"Nachname\");\n\t\t$table->changeColumnLabel(2, \"Vorname\");\n\t\t$table->changeColumnLabel(3, \"Privat\");\n\t\t$table->changeColumnLabel(5, \"Mobil\");\n\t\t$table->changeColumnLabel(6, \"Berufl.\");\n\t\t$table->changeColumnLabel(7, \"E-Mail\");\n\t\t$table->changeColumnLabel(13, \"Straße\");\n\t\t$table->changeColumnLabel(14, \"Ort\");\n\t\t$table->changeColumnLabel(15, \"PLZ\");\n\t\t$table->changeColumnLabel(16, \"Instrument\");\n\t\t\n\t\t$table->setColumnType(3, FieldType::CHAR);\n\t\t$table->setColumnType(5, FieldType::CHAR);\n\t\t$table->setColumnType(6, FieldType::CHAR);\n\t\t$table->setColumnType(15, FieldType::CHAR);\n\t\t\n\t\t$table->setCellBorder(\"T\");\n\t\t$table->setVerticalSpacing(1);\n\t\t\n\t\t// write the document\n\t\t$table->write($this->pdf);\n\t}", "public function formato_cartas() {\n\t\t\n\t\t$this->layout->title('Advanzer - Carta y Constancia Laboral');\n\t\t$this->layout->view('servicio/formato_carta');\n\t}", "public function toTabular() {\n\t\tsetlocale(LC_MONETARY, 'en_GB');\n\n\t\t$totalCount = 0; // Count get the total journey price\n\t\techo '<table width=\"50%\" cellpadding=\"5\" cellspacing=\"5\">';\n\t\t\techo '<tr><th align=\"left\">Station From</th><th align=\"left\">Station To</th><th align=\"left\">Prices</th></tr>';\n\n\t\t\tforeach ( $this->prices as $hop ) {\n\t\t\t\techo '<tr><td>'.$hop['station.from'].'</td>';\n\t\t\t\techo '<td>'.$hop['station.to'].'</td><td>';\n\n\t\t\t\t$prices = array();\n\t\t\t\tforeach ( $hop['station.prices'] as $price ) {\n\t\t\t\t\t$prices[] = $price->nodeValue;\n\t\t\t\t}\n\n\t\t\t\tasort($prices);\n\t\t\t\t$fmt = '<strong>Selected Price:</strong>&pound;%i ';\n\t\t\t\techo money_format($fmt, floatval(str_replace('£', '', $prices[0]))) . \"\\n\";\n\t\t\t\t$totalCount += str_replace('£', '', $prices[0]);\n\t\t\t\techo '</td></tr>';\n\n\t\t\t}\n\t\techo '</table>';\n\n\t\t$fmt = '<strong>Total Cost is </strong> &pound;%i ';\n\t\techo money_format($fmt, $totalCount) . \"\\n\";\n\n\t\techo ' for ' . $this->getPostField('numberOfAdults') . ' adult(s) ';\n\t\techo ' and ' . $this->getPostField('numberOfChildren') . ' child(s).';\n\t}", "function generateDataToHTML($customers, $orders, $results){\n echo '<div class=\"box\">'; \n echo '<div class=\"customer-container\">';\n echo '<table>';\n foreach($customers as $key=>$value){\n echo '<tr>';\n echo \"<td><b>\".$key.\"</b></td>\";\n echo \"<td>\".$value.\"</td>\";\n echo '</tr>';\n }\n echo '</table>';\n echo '</div>';\n\n echo '<div class=\"order-container\">';\n echo '<table>';\n foreach($orders as $key=>$value){\n if($key === \"items\"){\n foreach($orders->items as $item){\n foreach($item as $key=>$value){\n echo '<tr>';\n echo \"<td><b>\".$key.\"</b></td>\";\n echo \"<td>\".$value.\"</td>\";\n echo '</tr>';\n }\n }\n }\n else{\n echo '<tr>';\n echo \"<td><b>\".$key.\"</b></td>\";\n echo \"<td>\".$value.\"</td>\";\n echo '</tr>';\n }\n }\n echo '</table>';\n echo '</div>';\n\n echo '<div class=\"discount-container\">';\n echo '<table>';\n foreach($results as $key=>$value){\n echo '<tr>';\n echo \"<td><b>\".$key.\"</b></td>\";\n echo \"<td>\".$value.\"</td>\";\n echo '</tr>';\n }\n echo '</table>';\n echo '</div>';\n\n echo '</div>';\n }", "public function summary();", "public function renderTableBody() {\n //$models = array_values($this->dataProvider->getModels());\n //$keys = $this->dataProvider->getKeys();\n $rows = [];\n \n foreach ($this->dataProvider as $model) {\n if (is_callable($this->beforeRow)) {\n $row = call_user_func($this->beforeRow, $model, $this);\n if (!empty($row)) {\n $rows[] = $row;\n }\n }\n\n $rows[] = $this->renderTableRow($model);\n\n if ($this->afterRow !== null) {\n $row = call_user_func($this->afterRow, $model, $this);\n if (!empty($row)) {\n $rows[] = $row;\n }\n }\n }\n\n if (empty($rows)) {\n $colspan = count($this->columns);\n\n return \"<tbody>\\n<tr><td colspan=\\\"$colspan\\\">\" . $this->renderEmpty() . \"</td></tr>\\n</tbody>\";\n } else {\n return \"<tbody>\\n\" . implode(\"\\n\", $rows) . \"\\n</tbody>\";\n }\n }", "public function table()\n\t{\n\t\t$this->datatables->select('testcat.test_id AS test_id, testcat_id, gender, age, score, percentile, percentile.id AS id');\n\t\t$this->datatables->from('percentile');\n\t\t$this->datatables->join('testcat', 'testcat.id = percentile.testcat_id');\n\n\t\t$this->datatables->edit_column('test_id', '$1', 'test_get_link_by_id(test_id)');\n\t\t$this->datatables->edit_column('testcat_id', '$1', 'testcat_get_link_by_id(testcat_id)');\n\t\t$this->datatables->edit_column('gender', '$1', 'gender(gender)');\n\t\t$this->datatables->edit_column('id', '$1', 'percentile_actions(id)');\n\n\t\techo $this->datatables->generate();\n\t}", "function getTotalsForDisplay()\n {\n $amount = $this->getSource()->formatPriceTxt($this->getAmount());\n\n if ($this->getAmountPrefix()) {\n $amount = $this->getAmountPrefix() . $amount;\n }\n\n $title = __($this->getTitle());\n if ($this->getTitleSourceField()) {\n $label = $title . ' (' . $this->getTitleDescription() . '):';\n } else {\n $label = $title . ':';\n }\n\n $fontSize = $this->getFontSize() ? $this->getFontSize() : 7;\n $total = ['amount' => $amount, 'label' => $label, 'font_size' => $fontSize];\n return [$total];\n }", "public function subtotal();", "function showTransactionResult()\r\n{\r\n global $config;\r\n $items_subtotal = 0; //init\r\n $extras_subtotal = 0; //init\r\n \r\n /*\r\n echo '<pre>';\r\n var_dump($_POST);\r\n echo'</pre>';\r\n */\r\n \r\n //start ITEMS ordered table\r\n //date format May 13, 2018, 1:16 am\r\n $html = '\r\n\r\n <h2>\r\n <span>Order Details</span>\r\n </h2>\r\n\r\n <p style=\"margin-left:1rem; margin-top:0;\">Order Date: ' . date(\"F j, Y, g:i a\") . '</p>\r\n <div class=\"menuitem\">\r\n <h3 style=\"margin-top:0;\">Items Ordered:</h3>\r\n <table style=\"width:100%\">\r\n <tr>\r\n <th>Item Name</th>\r\n <th>Qty</th>\r\n <th>Price</th>\r\n <th>Item Total</th>\r\n </tr>\r\n ';\r\n \r\n //this foreach block generates the table rows of ITEMS ordered\r\n foreach ($_POST as $key => $value) \r\n {\r\n //check $key is an item or a topping\r\n if (substr($key,0,5) == 'item_') {\r\n \r\n //get qty, cast as int\r\n $quantity = (int)$value;\r\n \r\n //check if there is an order for this item\r\n if ($quantity > 0) {\r\n \r\n //seperate string with _ as the delimiter\r\n $key_array = explode('_',$key);\r\n \r\n //cast item number as an integer\r\n $key_id = (int)$key_array[1];\r\n \r\n //get price, cast as float\r\n $price = (float)$config->items[$key_id - 1]->Price;\r\n \r\n //get name\r\n $name = $config->items[$key_id - 1]->Name;\r\n \r\n //calculate total for this item\r\n $item_total = $quantity * $price;\r\n \r\n //add to over items subtotal\r\n $items_subtotal += $item_total;\r\n \r\n //money format\r\n $price_output = money_format('%.2n', $price);\r\n $item_total_output = money_format('%.2n', $item_total);\r\n \r\n $html .= '\r\n <tr>\r\n <td>' . $name . '</td>\r\n <td>' . $quantity . '</td>\r\n <td>' . $price_output . '</td>\r\n <td>' . $item_total_output . '</td>\r\n </tr>\r\n ';\r\n }\r\n }\r\n }\r\n \r\n //money format\r\n $items_subtotal_output = money_format('%.2n', $items_subtotal);\r\n \r\n //finish ITEMS table\r\n $html .= '\r\n <tr class=\"tabletotal\">\r\n <td colspan=3 class=\"tabletotaltitle\">Items Subtotal: </td>\r\n <td>' . $items_subtotal_output . '</td>\r\n </tr>\r\n </table>\r\n '; \r\n \r\n //start EXTRAS ordered table\r\n $extras_html = '\r\n <h3>Extras Ordered:</h3>\r\n <table style=\"width:100%\">\r\n <tr>\r\n <th>Extra</th>\r\n\r\n <th>Qty</th>\r\n\r\n <th>Price</th>\r\n </tr>\r\n ';\r\n \r\n //this foreach block generates the table rows of EXTRAS ordered\r\n foreach ($_POST as $key => $value) \r\n {\r\n if (substr($key,0,7) == 'extras_') {\r\n \r\n foreach ($value as $extra_key => $extra) {\r\n \r\n //seperate string with _ as the delimiter\r\n $key_array = explode('_',$key);\r\n \r\n //cast item number as an integer\r\n $key_id = (int)$key_array[1];\r\n \r\n $associated_item_key = 'item_' . $key_id;\r\n \r\n $quantity_of_extra = $_POST[$associated_item_key];\r\n \r\n $extra_subtotal = $quantity_of_extra * 0.25; //calculates subtotal of each particular extra\r\n \r\n $extras_subtotal += $extra_subtotal; //adds to overall subtotal of all extras\r\n \r\n $extra_subtotal_output = money_format('%.2n', $extra_subtotal);\r\n\r\n //add row to EXTRAS table\r\n $extras_html .= '\r\n <tr>\r\n <td>' . $extra . '</td>\r\n\r\n <td>' . $quantity_of_extra . '</td>\r\n <td>' . $extra_subtotal_output . '</td>\r\n\r\n </tr>\r\n ';\r\n }\r\n }\r\n }\r\n \r\n //money format\r\n $extras_subtotal_output = money_format('%.2n', $extras_subtotal);\r\n \r\n //finish EXTRAS table\r\n $extras_html .='\r\n <tr class=\"tabletotal\">\r\n\r\n <td colspan=\"2\" class=\"tabletotaltitle\">Extras Subtotal: </td>\r\n\r\n <td>' . $extras_subtotal_output . '</td>\r\n </tr>\r\n </table>\r\n </div>\r\n ';\r\n \r\n if ($extras_subtotal == 0) {\r\n $extras_html = '\r\n <h3>Extras Ordered:</h3>\r\n <p>No extras were ordered.</p>\r\n </div>\r\n ';\r\n }\r\n \r\n $html .= $extras_html;\r\n \r\n //calculate tax & totals\r\n $order_subtotal = $items_subtotal + $extras_subtotal;\r\n $tax = $order_subtotal * .101; //10.1%\r\n $grand_total = $order_subtotal + $tax;\r\n \r\n //money format\r\n $order_subtotal = money_format('%.2n', $order_subtotal);\r\n $tax = money_format('%.2n', $tax);\r\n $grand_total = money_format('%.2n', $grand_total);\r\n\r\n //display order summary\r\n $html .= '\r\n <div class=\"menuitem\">\r\n <h3 style=\"margin-top:0;\">Order Summary:</h3>\r\n <table style=\"width:100%\">\r\n <tr>\r\n <td>Item(s) Subtotal: </td>\r\n <td>' . $items_subtotal_output . '</td>\r\n </tr>\r\n <tr>\r\n <td>Extra(s) Subtotal: </td>\r\n <td>' . $extras_subtotal_output . '</td>\r\n </tr>\r\n <tr>\r\n <td>Order Subtotal: </td>\r\n <td>' . $order_subtotal . '</td>\r\n </tr>\r\n <tr>\r\n <td>Tax: </td>\r\n <td>' . $tax . '</td>\r\n </tr>\r\n <tr class=\"tabletotal\">\r\n <td>Grand Total: </td>\r\n <td>' . $grand_total . '</td>\r\n </tr>\r\n </table>\r\n </div>\r\n ';\r\n\r\n\r\n return $html;\r\n}", "function table_display($table)\n{\n $out = '';\n $out = '<style> td,th{border: solid 2px black;}</style>';\n if (count($table) == 0) {\n //table is empty\n return 'table is empty';\n }\n $out .= '<table>';\n\n //table header\n $col_names = array_keys($table[0]);\n $out .= '<tr>';\n foreach ($col_names as $col_name) {\n $out .= '<th>'.$col_name.'</th>';\n }\n $out .= '</tr>';\n //table data\n $out .= '</tr>';\n foreach ($table as $one_row) {\n $out .= '<tr>';\n foreach ($one_row as $key => $col_name) {\n if ($key == 'price' and gettype($key) != 'integer') {\n $out .= '<td> $'.$col_name.' </td>';\n } else {\n $out .= '<td>'.$col_name.' </td>';\n }\n }\n $out .= '</tr>';\n }\n $out .= '</table>';\n\n return $out;\n}", "public function showCart()\n {\n $carts=Cart::content();\n foreach ($carts as $cart) {\n $products = Products::findOrFail($cart->id);\n $quantityInStock = $products->quantityInStock - $cart->qty;\n DB::table('products')\n ->where('id','=', $cart->id)\n ->update(['quantityInStock' => $quantityInStock]);\n }\n $total=Cart::total();\n return view('users.pages.cart', compact('carts', 'total'));\n }", "function finalRow($quantity, $price) {\n ?>\n<tr>\n <th scope=\"row\">#</th>\n <td>&nbsp;</td>\n <td>&nbsp;</td>\n <td>Pizza's: <?= $quantity ?></td>\n <td>Prijs: &euro;<?= $price ?></td>\n</tr>\n<?php\n}", "function display_cart($cart, $change = true, $images = true)\n{\n\t// optionally allow change (true or false)\n\t// optionally allow include images (true or false)\n?>\n<table border='0' width='100%' cellspacing='0' >\n<form action='show_cart.php' method='post'>\n <tr bgcolor=\"#cccccc\">\n<?php\n\t// display title\n\tif ($images) {\n\t\techo '<th colspan=\"2\">Item</th>';\n\t} else {\n\t\techo '<th>Item</th>';\n\t}\n?>\n <th>Price</th>\n <th>Quantity</th>\n <th align='right'>Total</th>\n </tr>\n<?php\n\t// display items\n\tforeach ($cart as $isbn => $qty) {\n\t\t$book = get_book_details($isbn);\n\t\t$pic = \"images/book/$isbn.jpg\";\n\t\techo \"<tr>\";\n\t\tif ($images) {\n\t\t\techo \"<td align='left'>\";\n\t\t\tif (file_exists($pic)) {\n\t\t\t\t$size = GetImageSize($pic);\n\t\t\t\tif ($size[0]>0 && $size[1]>0)\n\t\t\t\t\techo '<img src=\"' . $pic . '\" '\n\t\t\t\t\t\t. 'style=\"border : 1px solid black\" '\n\t\t\t\t\t\t. 'width=\"' . $size[0]/3 . '\" '\n\t\t\t\t\t\t. 'height=\"' . $size[1]/3 . '\"/>';\n\t\t\t} else {\n\t\t\t\techo '&nbsp;';\n\t\t\t}\n\t\t\techo \"</td>\";\n\t\t}\n?>\n\t<td align='left'>\n\t <a href='show_book.php?isbn=<?php echo $isbn; ?>'/>\n\t <?php echo $book['title']; ?></a><br />\n\t by&nbsp;<?php echo $book['author'] ?>\n\t</td>\n\t<td align='center'>\n\t <strong>$</strong><?php echo number_format($book['price'], 2); ?>\n\t</td>\n\t<td align='center'>\n<?php\n\t// if num of items can be changed\n\t\tif ($change) {\n\t\t\techo \"<input type='text' name='\" . $isbn . \"' value='\" . $qty\n\t\t\t\t. \"' size='2'>\";\n\t\t} else {\n\t\t\techo $qty;\n\t\t}\n?>\n </td>\n\t<td align='right'>\n\t <strong>$</strong><?php echo number_format($book['price']*$qty, 2); ?>\n\t</td>\n<?php\n echo \"</tr>\";\n\t}\n\t// display total row\n?>\n\t<tr bgcolor='#cccccc' align='center'>\n\t<th colspan=\"\n<?php\n\t\tif ($images) {\n\t\t\techo 3;\n\t\t} else {\n\t\t\techo 2;\n\t\t}\n?>\"\n\t\t>&nbsp;</th>\n\t<th><?php echo $_SESSION['items']; ?></th>\n\t<th align='right'>$<?php echo number_format($_SESSION['total_price'], 2); ?></th>\n\t</tr>\n<?php\n\tif ($change) {\n\t\t$colspan = 2;\n\t\tif ($images)\n\t\t\t$colspan =3;\n?>\n\t<tr>\n\t <td colspan=\"<?php echo $colspan; ?>\">&nbsp;</td>\n\t <td align='center' colspan='2' >\n\t <input type='hidden' name='save' value='submit' />\n\t <input type='image' src='../images/save-changes.gif' value=\"submit\"\n\t\t\tborder='0' alt='Save Changes' />\n\t </td>\n\t</tr>\n<?php\n\t}\n?>\n</form>\n</table>\n<?php\n}", "function display_report()\n {\n $out = '<div>';\n $out .= '<table id=\"resultsTable\">';\n $out .= '<thead>';\n if(isset($this->header))\n {\n if(!$this->has_split_header())\n {\n $out .= '<tr>';\n foreach($this->header AS $head)\n {\n $out .= '<th>'.$head.'</th>';\n } \n $out .= '</tr>';\n }\n else\n {\n //foreach row\n foreach($this->header AS $row)\n {\n $out .= '<tr>';\n foreach($row AS $rowObj)\n {\n $columnCount = isset($rowObj->colCount) ? $rowObj->colCount : 1;\n $columnContent = $rowObj->content;\n $out .= '<th colspan=\"'.$columnCount.'\">'.$columnContent.'</th>';\n }\n $out .= '</tr>';\n }\n } \n }\n $out .= '</thead>';\n $out .= '<tbody>';\n if(isset($this->data))\n {\n foreach($this->data AS $row)\n {\n $out .= '<tr>';\n foreach($row AS $cell)\n {\n if(is_a($cell, 'stdClass'))\n {\n $out .= $this->build_cell($cell);\n }\n else\n {\n $out .= '<td>'.$cell.'</td>';\n }\n } \n $out .= '</tr>';\n }\n }\n //count the last row\n// $out .= '<tr>';\n// for($i=0;$i<count($row);$i++)\n// {\n// $out .= '<td class=\"emptyrow\"><div class=\"emptycell\">X</div></td>';\n// }\n// $out .= '</tr>';\n $out .= '</tbody>';\n $out .= '</table>';\n $out .= '</div>';\n \n return $out;\n }", "public function print_invoice_details_table() {\n\n // Language variables to be used in heredoc syntax\n $tableHeaderCategory = lang( 'report_th_category' );\n $tableHeaderDescription = lang( 'report_th_description' );\n $tableHeaderAmount = lang( 'report_th_amount' );\n\n // Get the invoice row details\n $invoiceRows = $this->mockinvoice_row_model->get_by( 'mockInvoiceId = ' . @$_POST['mockInvoiceId'] );\n\n $tableRows = '';\n\n foreach ( $invoiceRows as $row ) {\n\n // Add currency symbol Eg. '$' to the amount if we have one\n ( $row->amount != null ? $amount = lang( 'system_currency_symbol' ) . $row->amount : $amount = '' );\n // Replace new lines with HTML <br> tags\n $description = nl2br( $row->description );\n\n // Check if a row has some content and add it to the table if it does\n if ( ( $row->category != null ) or ( $row->description != null ) or ( $row->amount != null ) ) {\n $tableRows .= <<< HTML\n <tr id=\"invoice-details-row-{$row->mockInvoiceRowId}\">\n <td>{$row->category}</td>\n <td>{$description}</td>\n <td>{$amount}</td>\n </tr>\n\nHTML;\n }\n }\n\n // Output the HTML\n if ( $tableRows == '' ) {\n\n // Show that we have no details yet to display\n echo '<div class=\"alert alert-warning\">' . lang( 'report_minv_empty' ) . '</div>';\n } else {\n\n // Display the table with invoice details\n echo <<< HTML\n <table class=\"table table-striped table-bordered table-hover table-report\">\n <thead>\n <tr class=\"report-heading-row\">\n <th>{$tableHeaderCategory}</th>\n <th>{$tableHeaderDescription}</th>\n <th>{$tableHeaderAmount}</th>\n </tr>\n </thead>\n <tbody>\n\n{$tableRows}\n\n </tbody>\n </table>\n\nHTML;\n }\n }", "public function table()\n {\n $headers = ReceiveHeader::all();\n return view('transactions.receive-items.table', compact('headers'));\n }", "public function getCart(){\n $session_id = Session::get('session_id');\n $userCart = Cart::where('session_id', $session_id)->get();\n $totalPrice = 0;\n if($userCart->count() > 0){\n foreach($userCart as $key => $cart){\n // Kiểm tra nếu sản phẩm có status == 0 thì xóa khỏi giỏ hàng\n if($cart->products->status == 0){\n $cart->delete();\n unset($userCart[$key]);\n }\n // Kiểm tra nếu kho = 0\n if($cart->attributes->stock == 0){\n $cart->quantity = 0;\n $cart->save();\n }\n // Kiểm tra nếu kho < quantity\n if($cart->attributes->stock < $cart->quantity){\n $cart->quantity = $cart->attributes->stock;\n $cart->save();\n }\n $totalPrice += $cart->attributes->price*$cart->quantity;\n }\n $totalItems = $userCart->sum('quantity');\n \n }else{\n $totalItems = 0;\n }\n \n return view('frontend.cart_page')->withUserCart($userCart)->withTotalItems($totalItems)->withTotalPrice($totalPrice);\n }", "public function print_table_description()\n {\n }", "public function renderItems() {\n\n \t $caption = $this->renderCaption();\n \t $columnGroup = $this->renderColumnGroup();\n \t $tableHeader = $this->showHeader ? $this->renderTableHeader() : false;\n \t $tableBody = $this->renderTableBody();\n \t $tableFooter = $this->showFooter ? $this->renderTableFooter() : false;\n \t $content = array_filter([\n \t$caption,\n \t$columnGroup,\n \t$tableHeader,\n \t$tableFooter,\n \t$tableBody,\n \t ]);\n\n\t return self::html()->tag('table', array('options' => $this->tableOptions, 'content' => implode(\"\\n\", $content)), $this->tableOptions);\n }", "public function create_cart()\n\t{\n\t\t#get products currently in cart\n\t\t$products = $this->get();\n\t\t\n\t\t$data = '';\n\t\t$form = '';\n\t\t$total = 0;\n\n\t\tif ($products != '')\n\t\t{\n\t\t\t#products to display\n\t\t\t$line = 1;\n\t\t\t$shipping = 0;\n\n\t\t\tforeach($products as $product)\n\t\t\t{\n\t\t\t\t$item_shipping = $this->get_shipping_cost($product['price']) * $_SESSION['cart'][$product['id']];\n\t\t\t\t$shipping += $item_shipping;\n\t\t\t\t\n\t\t\t\t$data .= '<li><b class=\"tab-head\">Product Name:</b>' . \"<b class='tab-detail'>\" . $product['name'] . '</b></li>';\n\t\t\t\t$data .= '<li><b class=\"tab-head\">Quantity:</b><b class=\"tab-detail\"><input name=\"product' . $product['id'] . '\" value=\"' . $_SESSION['cart'][$product['id']] .'\"></b></li>';\n\t\t\t\t$data .= '<li><b class=\"tab-head\">Product Price:</b><b class=\"tab-detail\">&#163;' . $product['price'] . '</b></li><br>';\n\n\t\t\t\t//Create paypal form fields\n\t\t\t\t$form .= '<input type=\"hidden\" name=\"item_name_' . $line . '\" value=\"' . $product['name'] . '\">';\n\t\t\t\t$form .= '<input type=\"hidden\" name=\"amount_' . $line . '\" value=\"' . number_format($product['price'], 2) . '\">';\n\t\t\t\t$form .= '<input type=\"hidden\" name=\"quantity_' . $line . '\" value=\"' . $_SESSION['cart'][$product['id']] . '\">';\n\t\t\t\t$form .= '<input type=\"hidden\" name=\"shipping_' . $line . '\" value=\"' . $item_shipping . '\">';\n\n\t\t\t\t$total += $product['price'] * $_SESSION['cart'][$product['id']];\n\t\t\t\t$line++;\n\t\t\t}\n\t\t\t#add subtotal row\n\t\t\t$data .= '<li><b class=\"tab-head\">Subtotal:</b><b class=\"tab-detail\">&#163;' . $total . '</b></li>';\n\n\t\t\t#add shipping row\n\t\t\t$data .= '<li><b class=\"tab-head\">Shipping cost:</b><b class=\"tab-detail\">&#163;' . number_format($shipping, 2) . '</b></li>';\n\n\t\t\t#add tax row\n\t\t\tif (SHOP_TAX > 0)\n\t\t\t{\n\t\t\t\t$data .= '<li><b class=\"tab-head\">VAT: (' .(SHOP_TAX * 100) . '%):</b><b class=\"tab-detail\">&#163;' . number_format(SHOP_TAX * $total, 2) . '</b></li>';\n\t\t\t}\n\n\t\t\t#add total row\n\t\t\t$data .= '<br><li><b class=\"tab-head\">Total:</b><b class=\"tab-detail\">&#163;' . number_format((SHOP_TAX * $total) + $total + $shipping, 2) . '</li></b>';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t#no products to display\n\t\t\t$data .= '<li class=\"red\"><p class=\"text-warning\">There are no items are in your basket.</p></li>';\n\t\t\n\t\t\t#add subtotal row\n\t\t\t$data .= '<li><b class=\"tab-head\">Subtotal:</b><b class=\"tab-detail\">&#163;0.00</b></li>';\n\t\t\n\t\t\t#add shipping row\n\t\t\t$data .= '<li><b class=\"tab-head\">Shipping cost:</b><b class=\"tab-detail\">&#163;0.00</b></li>';\n\t\t\t\n\t\t\t#add tax row\n\t\t\tif (SHOP_TAX > 0)\n\t\t\t{\n\t\t\t\t$data .= '<li><b class=\"tab-head\">VAT: (' .(SHOP_TAX * 100) . '%):</b><b class=\"tab-detail\">&#163;0.00</b></li>';\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t#add total row\n\t\t\t$data .= '<br><li><b class=\"tab-head\">Total:</b><b class=\"tab-detail\">&#163;0.00</b></li>';\n\t\t}\n\t\t//set PayPal tax rate \n\t\t$form .= '<input type=\"hidden\" name=\"tax_cart\" value=\"' . number_format(SHOP_TAX * $total, 2).'\">';\n\t\treturn array($data, $form);\n\t}", "public function tblbasic($data, $tblsettings){\n if(count($data)===0){\n return \"\";\n }\n $table = '\n <div class=\"col-md-12\">\n <div class=\"panel\">\n <div class=\"panel-head\">\n <h5 class=\"panel-title\">'.$tblsettings[\"title\"].'</h5>\n </div>\n <div class=\"panel-body\"> \n <div class=\"container\">\n <div class=\"row bg-dark text-white tblheader\">';\n //craeting table column name\n foreach($data[0] as $key=>$value){ \n \n $table .='<div class=\"col\">'.$key.'</div>'; \n \n }\n $table .= '</div>';\n //craeting table data row\n \n foreach($data as $key=>$value){\n $table .= '<div class=\"row border tbldata\">';\n foreach($value as $k=>$v){\n $table .='<div class=\"col\">'.$v.'</div>';\n \n } \n $table .= '</div>'; \n }\n //creating sumary row from $tblsettings sumary key \n $table .= '<div class=\"row bg-dark text-white tblheader\">';\n foreach($data[0] as $key=>$value){ \n \n if(in_array($key, $tblsettings[\"sumary\"])){ \n $total = array_reduce($data, function($tot, $val) use ($key) { \n return $tot + $val[$key];\n }); \n $table .='<div class=\"col\">'.$total.'</div>'; \n }else{\n $table .='<div class=\"col\"></div>'; \n } \n } \n $table .= '</div>'; \n $table.='</div>\n </div>\n </div>\n </div>\n ';\n\n return $table;\n\n \n }", "public function index()\n\t{\n\t\t$items = \\Cart::getContent();\n\t\t$this->data['items'] = $items;\n\n\t\treturn $this->load_theme('carts.index', $this->data);\n\t}", "public function summaryColumns();", "public function getCartTotal()\n {\n }", "public function getDashboardPanelRecords() {\n\t\t$isql=\"select i.item_name as prod_name, i.quantity as prod_qty from inventory i limit 5\";\t\t\n\t\t$iresult=$this->runQuery('getAll',$isql);\n\t\t\n\t\t$sosql=\"SELECT p.item_name as inv_name,so.customer_name,date(so.sell_date) as sell_date FROM sales_order so, inventory p where p.id = so.product_id limit 5\";\t\t\n\t\t$soresult=$this->runQuery('getAll',$sosql);\n\t\t\n\t\t$drsql=\"select count(prod_qty) as qty, date(sell_date) as date from sales_order group by sell_date\";\t\t\n\t\t$drresult=$this->runQuery('getAll',$drsql);\n\t\t\n\t\techo '[{\"topFiveInvList\":'.json_encode($iresult).',\"topFiveSalesList\":'.json_encode($soresult).',\"dailySalesGraph\":'.json_encode($drresult).'}]';\n\t}", "function entable($all){\n \n $table = new Table();\n $table->setClass(\"table table-striped table-bordered\");\n $header = new Tr();\n \n $th = new Th(\"Orden\");\n $header->add($th);\n \n $th = new Th(\"Proveedor\");\n $header->add($th);\n \n $th = new Th(\"Total Pzas\");\n $header->add($th);\n \n $th = new Th(\"Recibidas\");\n $header->add($th);\n \n \n $th = new Th(\"Restantes\");\n $header->add($th);\n \n $th = new Th(\"Status\");\n $header->add($th);\n \n \n $th = new Th(\"Recibos\");\n $header->add($th);\n \n $th = new Th(\"Comprobante\");\n $header->add($th);\n \n $th = new Th(\"\");\n $header->add($th);\n \n $table->add($header);\n foreach ($all as $key=> $element){\n $tr = new Tr();\n \n $td = new Td($element->id);\n $tr->add($td);\n \n $td = new Td($element->getProvider());\n $tr->add($td);\n \n \n $pedidas = $element->getPiezas();\n $td = new Td($pedidas);\n $tr->add($td);\n \n $recibidas = $element->getReceived();\n $td = new Td($recibidas);\n $tr->add($td);\n \n \n $restantes = $pedidas - $recibidas;\n $td = new Td($restantes);\n $tr->add($td);\n if (empty($element->status))\n $element->status = \"Abierta\";\n $td = new Td($element->status);\n $tr->add($td);\n \n \n $recibos = $element->getRecibosTable();\n $td = new Td($recibos);\n $tr->add($td);\n \n \n \n \n $receipt = site_url2(\"orders/receipt/{$element->unique}\");\n $receive_anchor = new Anchor(\"Agregar Recibo\",\"$receipt\");\n if ($restantes==0){\n $receive_anchor = new Anchor(\"Agregar Recibo\",\"#\");\n $receive_anchor->setAttr(\"disabled\",\"disabled\");\n $receive_anchor->setAttr(\"onclick\",\"return false\");\n // mark order as closed\n \n \n }\n $receive_anchor->setClass(\"btn btn-default\");\n $td = new Td($receive_anchor);\n $td->setStyle(\"text-align:center\");\n $tr->add($td);\n \n \n \n \n $table->add($tr);\n \n }\n \n \n return $table;\n }", "public function contents(){\n // Reorganizo el carrito poniendo lo más nuevo primero\n $cart = array_reverse($this->cart_contents);\n\n // Elimino para que no creen un problema al mostrar la tabla del carrito\n unset($cart['total_items']);\n unset($cart['cart_total']);\n\n return $cart;\n }", "public function __itemTotals() {\n\n //$this->request->data['items'] = array_values($this->request->data['items']);\n\n $itemsCount = isset($this->request->data['items']) ? count($this->request->data['items']) : 0;\n\n// pr($this->request->data['Item']);\n// die('asdas');\n\n\n\n for ($i = 0; $i < $itemsCount; $i++) {\n\n\n\n\n\n\n\n $this->request->data['items'][$i]['total'] = $this->__lineItemTotal($this->request->data['items'][$i]['qty'], $this->request->data['items'][$i]['price'], $this->request->data['items'][$i]['rate']);\n\n\n\n // collect unit name from unit model\n\n $unit = $this->Papers->Items->Units->find()\n ->where(['id'=>$this->request->data['items'][$i]['unit_id']])\n ->select(['name'])\n ->first()\n ->toArray();\n\n $this->request->data['items'][$i]['name'] = $unit['name'];\n }\n }", "public function productosCarrito()\n {\n $total = 0;\n $tabla = \"\";\n $numeroArticulos=0;\n if (isset($_SESSION[\"carritoJDV\"])) {\n $numCarrito=(count($_SESSION[\"carritoJDV\"]));\n for ($i=0; $i<$numCarrito; $i++) {\n \t\t\t$numPiezas=$_SESSION[\"carritoJDV\"][$i][1];\n $numeroArticulos+=$numPiezas;\n }\n $tabla = '<h1 class=\"subTitulos\">Carrito de compras</h1>\n <p class=\"text-muted\">Actualmente tienes '.$numeroArticulos.' artículo(s) en tu carrito.</p>\n <div class=\"table-responsive\">\n <table class=\"table\">\n <thead>\n <tr>\n <th colspan=\"2\">Producto</th>\n <th>Cantidad</th>\n <th>Precio unitario</th>\n <th>Descuento</th>\n <th colspan=\"2\">Total</th>\n </tr>\n </thead>\n <tbody>';\n\n foreach ($_SESSION[\"carritoJDV\"] as $contenido) {\n $prod = $this->BD->ConsultaWhereSimple(\"producto\", \"activo=? AND ID=?\", array(1,$contenido[0]));\n $tabla .= '<tr>\n <td>\n <a href=\"detail.php?id=' . $prod[0][\"ID\"] . '\">\n <img src=\"' . $prod[0][\"img1_prod\"] . '\" alt=\"' . $prod[0][\"nombre_prod\"] . '\">\n </a>\n </td>\n\n <td>\n <a href=\"detail.php?id=' . $prod[0][\"ID\"] . '\">' . $prod[0][\"nombre_prod\"] . ' (' . $contenido[2] . ')</a>\n </td>\n \n <td><form method=\"POST\" action=\"procesos.php\" onchange=\"this.submit();\">\n <input type=\"hidden\" name=\"talla_prod_add\" value=\"' . $contenido[2] . '\">\n <input type=\"hidden\" name=\"id_prod_cart_add\" value=\"' . $prod[0][\"ID\"] . '\">\n <input type=\"number\" name=\"cantidad_prod_add\" value=\"' . $contenido[1] . '\" class=\"quanitySniper\">\n \n </form>\n \n </td>\n \n <td>$' . $prod[0][\"precio_prod\"] . '</td>\n ' . ($prod[0][\"preciodesc_prod\"] > 0 ? \"<td>$\" . ($prod[0][\"precio_prod\"] - $prod[0][\"preciodesc_prod\"]) . \"</td>\" : \"<td>$0</td>\") . ($prod[0][\"preciodesc_prod\"] > 0 ? \"<td>$\" . $prod[0][\"preciodesc_prod\"] * $contenido[1] . \"</td>\" : \"<td>$\" . $prod[0][\"precio_prod\"] * $contenido[1] . \"</td>\") . '\n \n <td><a href=\"procesos.php?deleteprod=' . $prod[0][\"ID\"] . '&talla=' . $contenido[2] . '\"><i class=\"far fa-trash-alt\"></i></a>\n </td>\n </tr>';\n //Problema complejo\n $x=$contenido[1];\n ($prod[0][\"preciodesc_prod\"] > 0 ? ($total = $total + $prod[0][\"preciodesc_prod\"] * $contenido[1]) : ($total = $total + $prod[0][\"precio_prod\"] * $contenido[1]));\n \n }\n \n /**\n * Aqui ya muestra el no. de articulos del carrito\n *var_dump(count($_SESSION[\"carritoJDV\"])); \n *Cuando se inicia sesion, si solo se pone el correo y se da enter, entra a procesos pero ya no avanza\n */\n \n\n $tabla .= '</tbody>\n <tfoot>\n <tr>\n <th colspan=\"5\">Total</th>\n <th colspan=\"2\">$' . $total . '</th>\n </tr>\n </tfoot>\n </table>\n\n </div>\n <!-- /.table-responsive -->\n\n <div class=\"box-footer\">\n <div class=\"pull-right\"><form method=\"post\" action=\"procesos.php\"><input type=\"hidden\" name=\"compra\" value=\"1\">\n <a href=\"basket.php\" class=\"btn btn-default\"><i class=\"fas fa-sync-alt\"></i> Actualizar cesta</a>\n \n <button type=\"submit\" class=\"btn btn-primary\">Proceder a la compra <i class=\"fa fa-chevron-right\"></i>\n </button>\n </form>\n </div>\n </div>';\n } else {\n return \"Aun no cuentas con productos en tu carrito de compras.\";\n }\n return $tabla;\n }", "public function renderItems()\n {\n $content = array_filter([\n $this->renderCaption(),\n $this->renderColumnGroup(),\n $this->showHeader ? $this->renderTableHeader() : false,\n $this->showFooter ? $this->renderTableFooter() : false,\n $this->renderTableBody(),\n ]);\n\n $table = Html::tag('table', implode(\"\\n\", $content), $this->tableOptions);\n if ($this->responsive)\n {\n $table = Html::tag('div', $table, ['class' => 'table-responsive']);\n }\n else\n {\n $table = Html::tag('div', $table, ['class' => 'table-scrollable']);\n }\n\n return $table;\n }", "function create_totals()\n{\n global $data_totals;\n\n $sumrejects = round($data_totals['rejects'] / $data_totals['hosts'],1);\n $sumdiscards = round($data_totals['discards'] / $data_totals['hosts'],1);\n $sumstales = round($data_totals['stales'] / $data_totals['hosts'],1);\n $sumgetfails = round($data_totals['getfails'] / $data_totals['hosts'],1);\n $sumremfails = round($data_totals['remfails'] / $data_totals['hosts'],1);\n\n $totals =\n \"<thead>\n \t<tr>\n \t<th scope='col' class='rounded-company'>\".$data_totals['hosts'].\" Hosts</th>\n <th scope='col' class='rounded-q1'></th>\n <th scope='col' class='rounded-q1'>\".$data_totals['devs'].\"/\".$data_totals['activedevs'].\"</th>\n <th scope='col' class='rounded-q1'>\".$data_totals['maxtemp'].\"</th>\n <th scope='col' class='rounded-q1'>\".$data_totals['desmhash'].\"</th>\n <th scope='col' class='rounded-q1'>\".$data_totals['utility'].\"</th>\n <th scope='col' class='rounded-q1'>\".$data_totals['fivesmhash'].\"</th>\n <th scope='col' class='rounded-q1'>\".$data_totals['avemhash'].\"</th>\n <th scope='col' class='rounded-q1'>\".$sumrejects.\" %</th>\n <th scope='col' class='rounded-q1'>\".$sumdiscards.\" %</th>\n <th scope='col' class='rounded-q1'>\".$sumstales.\" %</th>\n <th scope='col' class='rounded-q1'>\".$sumgetfails.\" %</th>\n <th scope='col' class='rounded-q1'>\".$sumremfails.\" %</th>\n </tr>\n </thead>\";\n return $totals;\n}", "function get_pending_manage_table( $giftcards, $controller )\n{\n\t$CI =& get_instance();\n\t\n\t$table='<table class=\"tablesorter\" id=\"sortable_table\">';\n\t\n\t$headers = array(\n\t'Receipt Code',\n\t'Date of Issue',\n\t'Customer Name',\n\t'Number of Test Done',\n\t'Number of Print Left',\n\t'&nbsp', \n\t);\n\t\n\t$table.='<thead><tr>';\n\tforeach($headers as $header)\n\t{\n\t\t$table.=\"<th>$header</th>\";\n\t}\n\t$table.='</tr></thead><tbody>';\n\t$table.=get_pending_manage_table_data_rows( $giftcards, $controller );\n\t$table.='</tbody></table>';\n\treturn $table;\n}", "public function getSummary();", "public function index()\n { $total =0;\n $carts=Auth::user()->Products;\n // dd($carts->first()->price);\n // dd($carts->first()->pivot->count);\n\n foreach ($carts as $item) {\n $total += $item->price * $item->pivot->count; \n }\n \n return view('checkout')->with('carts' , $carts )->with('total',$total);\n \n }", "private function _calculateTotalsOut()\n {\n $prodSql = new SqlStatement();\n $prodSql->select()\n ->distinct()\n ->from(array('p' => 'product'), array('p.*'));\n \n if ($this->subCategory) \n {\n $prodSql->innerJoin(array('p2c' => 'product_to_category'), 'p.product_id = p2c.product_id')\n ->innerJoin(array('cp' => 'category_path'), 'cp.category_id = p2c.category_id')\n ->where('cp.path_id = ?', array($this->subCategory));\n }\n elseif ($this->topCategory) \n {\n $prodSql->innerJoin(array('p2c' => 'product_to_category'), 'p.product_id = p2c.product_id')\n ->where('p2c.category_id = ?', array($this->topCategory));\n }\n \n $searchConditions = $this->_prepareSearchConditions();\n if (count($searchConditions)) {\n $prodSql->innerJoin(array('pd' => 'product_description'), 'pd.product_id = p.product_id')\n ->multipleWhere($searchConditions, 'OR');\n }\n \n if ($this->conditions->price) {\n $prodSql->leftJoin(array('pd2' => 'product_discount'), 'pd2.product_id = p.product_id', array('discount' => 'MIN(pd2.price)'))\n ->leftJoin(array('ps' => 'product_special'), 'ps.product_id = p.product_id', array('special' => 'MIN(ps.price)'))\n ->where(\"(pd2.product_id IS NULL OR (\n pd2.quantity = '1'\n AND (pd2.date_start = '0000-00-00' OR pd2.date_start < NOW())\n AND (pd2.date_end = '0000-00-00' OR pd2.date_end > NOW())\n AND pd2.customer_group_id = '{$this->customerGroupId}') )\")\n ->where(\"(ps.product_id IS NULL OR (\n (ps.date_end = '0000-00-00' OR ps.date_end > NOW())\n AND (ps.date_start = '0000-00-00' OR ps.date_start < NOW())\n AND ps.customer_group_id = '{$this->customerGroupId}' ) )\")\n ->group(array('p.product_id'));\n \n if ($this->config->get('config_tax')) {\n $prodSql->select(array('fixed_tax', 'percent_tax'))\n ->leftJoin(array('tr1' => $this->subquery->fixedTax), 'tr1.tax_class_id = p.tax_class_id')\n ->leftJoin(array('tr2' => $this->subquery->percentTax), 'tr2.tax_class_id = p.tax_class_id');\n } else {\n $prodSql->select(array('fixed_tax' => '0', 'percent_tax' => '0'));\n }\n if ($this->conditions->price->min) {\n $prodSql->having(\"{$this->subquery->actualPrice} >= ?\", array($this->conditions->price->min));\n }\n if ($this->conditions->price->max) {\n $prodSql->having(\"{$this->subquery->actualPrice} <= ?\", array($this->conditions->price->max));\n }\n }\n \n if ($this->conditions->rating) {\n $prodSql->innerJoin(array('r1' => 'review'), 'r1.product_id = p.product_id', array('total' => 'AVG(rating)'))\n ->where(\"r1.status = '1'\")\n ->having('ROUND(total) IN ('. implode(',', $this->conditions->rating[0]) . ')')\n ->group(array('p.product_id'));\n } \n\n if ($this->conditions->price || $this->conditions->rating) {\n $exclude = new SqlStatement();\n $exclude->select()->from(array('p' => self::RESULTS_TABLE));\n if ($this->conditions->price) {\n if ($this->conditions->price->min) {\n $exclude->where(\"{$this->subquery->actualPrice} >= ?\", array($this->conditions->price->min));\n }\n if ($this->conditions->price->max) {\n $exclude->where(\"{$this->subquery->actualPrice} <= ?\", array($this->conditions->price->max));\n }\n }\n\n if ($this->conditions->rating) {\n $exclude->where('ROUND(total) IN ('. implode(',', $this->conditions->rating[0]) . ')');\n }\n } else {\n $exclude = self::RESULTS_TABLE;\n }\n \n \n $inStock = (int)self::$IN_STOCK_STATUS;\n \n $sql = new SqlStatement();\n $sql->select(array(\n 'id' => \"af.group_id\", \n 'val' => \"IF (af.type = 'STOCK_STATUS' AND p.quantity > 0, {$inStock}, af.value)\", \n 'type' => 'af.type',\n ))\n ->from(array('af' => self::FILTERS_TABLE))\n ->innerJoin(array('p' => $prodSql), 'af.product_id = p.product_id')\n ->innerJoin(array('p2s' => 'product_to_store'), 'p.product_id = p2s.product_id')\n ->leftJoin(array('exclude' => $exclude), 'af.product_id = exclude.product_id')\n ->where('exclude.product_id IS NULL')\n ->where('p2s.store_id = ?', (int)$this->config->get('config_store_id'))\n ->where(\"p.status = '1'\")\n ->where('p.date_available <= NOW()')\n ->group(array('af.product_id', 'af.type', 'af.group_id', 'af.value'));\n \n if (count($this->aggregate)) {\n $con = array();\n foreach ($this->aggregate as $type => $group) {\n foreach ($group as $groupId => $values) {\n $a = strtolower(substr($type, 0, 1)) . $groupId;\n $sql->innerJoin(array($a => self::FILTERS_TABLE), 'p.product_id = ' . $a . '.product_id')\n ->where($a . '.type = ?', array($type))\n ->where($a . '.group_id = ?', array($groupId));\n // the following mess in conditions is caused by a need \n // of handling the correct stock status \"In stock\".\n if ($type !== 'STOCK_STATUS') {\n $where = \"$a.value IN (\" . implode(', ', $values) . \")\";\n } else {\n $where = array();\n foreach ($values as $val) {\n $where[] = \"($a.value = {$val}\" . ($val != $inStock ? ' AND p.quantity = 0' : ' OR p.quantity > 0') . \")\";\n }\n $where = \"(\" . implode(' OR ', $where) . \")\";\n }\n $sql->where(\"({$where} OR af.aggregate_filter_id = $a.aggregate_filter_id)\");\n }\n $con[] = \"(af.type = '$type' AND af.group_id IN (\" . implode(',', array_keys($group)) . \"))\";\n }\n $sql->multipleWhere($con);\n }\n \n \n if ( self::$HIDE_OUT_OF_STOCK ) {\n $sql->leftJoin(array('pov' => 'product_option_value'), 'af.product_id = pov.product_id AND af.value = pov.option_value_id AND af.type = \"OPTION\"')\n ->leftJoin(array('pov1' => 'product_option_value'), 'p.product_id = pov1.product_id');\n $vals = array();\n if (isset($this->aggregate['OPTION'])) {\n foreach ($this->aggregate['OPTION'] as $values) {\n $vals = array_merge($vals, $values);\n }\n }\n $or = array(\n '(pov1.quantity IS NULL AND p.quantity > 0)',\n 'pov.quantity > 0'\n );\n if (count($vals)) {\n $or[] = '(pov1.quantity > 0 AND pov1.option_value_id IN (' . implode(',', $vals) . '))';\n } else {\n $or[] = '(pov1.quantity > 0 AND af.type != \"OPTION\")';\n }\n $sql->where('(' . implode(' OR ', $or) . ')');\n }\n \n $groupSql = new SqlStatement();\n $groupSql->select(array('id', 'val', 'c' => 'COUNT(*)', 'type'))\n ->from(array('tt' => $sql))\n ->group(array('type', 'id', 'val'));\n \n $res = $this->db->query($groupSql);\n\n return $res->rows;\n }", "function summary() {\n return NULL;\n // return array(\n // 'summary' => 'This is a summary',\n // 'total' => 50.0,\n // );\n }", "function summary() {\n return NULL;\n // return array(\n // 'summary' => 'This is a summary',\n // 'total' => 50.0,\n // );\n }" ]
[ "0.67015857", "0.6544991", "0.62063175", "0.60995525", "0.609372", "0.60135394", "0.59425807", "0.59392315", "0.59330654", "0.5931735", "0.5922259", "0.59191567", "0.58822095", "0.5873483", "0.58702695", "0.5863164", "0.58624804", "0.58436126", "0.58267885", "0.58216727", "0.5821021", "0.5805629", "0.5786775", "0.5785965", "0.5780075", "0.5777867", "0.5763576", "0.57499474", "0.5739594", "0.5736075", "0.5735831", "0.5721255", "0.5712494", "0.57002044", "0.5696239", "0.569517", "0.56855077", "0.5682714", "0.5679334", "0.567061", "0.56669044", "0.5648431", "0.5645967", "0.5644508", "0.5632785", "0.56321716", "0.56304467", "0.5615806", "0.56014913", "0.56001794", "0.55984753", "0.5592754", "0.55895424", "0.55786383", "0.5570819", "0.5556756", "0.5549651", "0.5544808", "0.5537045", "0.5532702", "0.5531617", "0.55258113", "0.55157274", "0.5515677", "0.55124646", "0.5509125", "0.550548", "0.55000603", "0.5496426", "0.5486466", "0.5482527", "0.54766643", "0.54736274", "0.5470232", "0.5465778", "0.5447644", "0.54331315", "0.5429023", "0.5425891", "0.5423439", "0.54161954", "0.54100025", "0.54050916", "0.5404767", "0.54000276", "0.5399402", "0.5395918", "0.5390385", "0.5384398", "0.53831863", "0.5373529", "0.5371258", "0.5369712", "0.5366302", "0.5364112", "0.53585213", "0.5345497", "0.5343138", "0.53429997", "0.53429997" ]
0.64410543
2
Display a listing of the resource.
public function index() { $vendor = DB::table('zenrolle_suppliers')->get(); $opening_bla = 0; $closing_bla = 0; $opening_bla = 0; foreach ($vendor as $key => $value) { $vendor_det = DB::table('zenrolle__pur_history')->where('vendor_id',$value->id)->get(); $TotalDebit = 0; $TotalCredit = 0; $closing_balance = 0; foreach ($vendor_det as $key => $values) { $TotalDebit = $values->payment + $TotalDebit ; $TotalCredit = $values->payment + $TotalCredit; $closing_balance = $closing_balance+$values->payment; } $value->TotalDebit = $TotalDebit; $value->TotalCredit = $TotalCredit; $value->closing_balance = $closing_balance; } return view('Accounts.VendorLedger.index',compact('vendor')); }
{ "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() { // }
{ "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) { // }
{ "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) { $po_order = DB::table('zenrolle__pur_history')->where('vendor_id',$id)->Where('payment','!=','NULL')->get(); $vendor = DB::table('zenrolle_suppliers')->where('id',$id)->get(); $TotalDebit = 0; $Closing_bla = 0; $opening_bla = 0; $closing_balance = 0; foreach ($po_order as $key => $value) { $TotalDebit = $value->payment + $TotalDebit; $Closing_bla = $Closing_bla + $value->payment; $closing_balance = $closing_balance+$value->payment; $value->closing_balance = $closing_balance; $invoice_no = DB::table('zenrolle_purcahse')->select('invoice_no')->where('id',$value->po_id) ->get(); foreach ($invoice_no as $pkey => $pvalue) { $po_no = $pvalue->invoice_no; } $value->po_no = $po_no; } // $cust_no = DB::table('zenrolle_suppliers')->where('id',$id)->pluck('cust_no')->first(); return view('Accounts.VendorLedger.show',compact('po_order','TotalDebit','TotalCredit','Closing_bla','vendor','balance')); }
{ "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 }", "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 }", "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 $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 }", "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 }", "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 edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\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 showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show(Resena $resena)\n {\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 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 edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "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 display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\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\t{\n\t\tparent::display();\n\t}", "public function show()\n\t{\n\t\t\n\t}", "public function get_resource();", "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 }", "public function display() {\n echo $this->render();\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 show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n {\n //\n $this->_show($id);\n }", "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()\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 abstract function display();", "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 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}", "abstract public function resource($resource);", "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.8232636", "0.81890994", "0.68296117", "0.64987075", "0.649589", "0.64692974", "0.64633286", "0.63640857", "0.6307513", "0.6281809", "0.621944", "0.61926234", "0.61803305", "0.6173143", "0.61398774", "0.6119022", "0.61085826", "0.6106046", "0.60947937", "0.6078597", "0.6047151", "0.60409963", "0.6021287", "0.5989136", "0.5964405", "0.5962407", "0.59518087", "0.59309924", "0.5921466", "0.5908002", "0.5908002", "0.5908002", "0.59051657", "0.5894554", "0.5871459", "0.5870088", "0.586883", "0.5851384", "0.58168566", "0.58166975", "0.5815869", "0.58056176", "0.5799148", "0.5795126", "0.5791158", "0.57857597", "0.5783371", "0.5761351", "0.57592535", "0.57587147", "0.5746491", "0.57460666", "0.574066", "0.5739448", "0.5739448", "0.57295275", "0.57293373", "0.5729069", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57253987", "0.57214445", "0.57149816", "0.5712036", "0.5710076", "0.57073003", "0.5707059", "0.5705454", "0.5705454", "0.5700382", "0.56997055", "0.5693362", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868", "0.5687868" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { // }
{ "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) { // }
{ "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
Update conversion group for list table.
public static function update_conversion_data( $conversion_id, $data ) { global $wpdb; $return_data = false; if ( absint( $conversion_id ) > 0 && ! empty( $data ) ) { $id = $conversion_id; $updated = $wpdb->update( self::$table_conversion_data, $data, array( 'id' => $id, ) ); if ( false === $updated ) { // There is an error. } else { $return_data = true; } } return $return_data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateLocaleFields(&$group) {\n\t\t$this->updateDataObjectSettings('group_settings', $group, array(\n\t\t\t'group_id' => $group->getId()\n\t\t));\n\t}", "public function testUpdateRuleGroup()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testUpdateGroup()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "private function syncCatGroupsWithLayouts()\n\t{\n\t\t$cat_groups = array();\n\n\t\tforeach (explode('|', $this->cat_group) as $group_id)\n\t\t{\n\t\t\t$cat_groups['categories[cat_group_id_'.$group_id.']'] = TRUE;\n\t\t}\n\n\t\tforeach ($this->ChannelLayouts as $channel_layout)\n\t\t{\n\t\t\t$field_layout = $channel_layout->field_layout;\n\t\t\t$new_cat_tab = 0;\n\n\t\t\tforeach ($field_layout as $i => $section)\n\t\t\t{\n\t\t\t\tif ($section['id'] == 'categories' && $section['visible'])\n\t\t\t\t{\n\t\t\t\t\t$new_cat_tab = $i;\n\t\t\t\t}\n\n\t\t\t\tforeach ($section['fields'] as $j => $field_info)\n\t\t\t\t{\n\t\t\t\t\t// All category fields begin with \"categories\"\n\t\t\t\t\tif (strpos($field_info['field'], 'categories') === 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$field_name = $field_info['field'];\n\n\t\t\t\t\t\t// Is it already accounted for?\n\t\t\t\t\t\tif (in_array($field_name, array_keys($cat_groups)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tunset($cat_groups[$field_name]);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// If not, it was removed and needs to be deleted\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tunset($field_layout[$i]['fields'][$j]);\n\n\t\t\t\t\t\t\t// Re-index to ensure flat, zero-indexed array\n\t\t\t\t\t\t\t$field_layout[$i]['fields'] = array_values($field_layout[$i]['fields']);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add the new category groups\n\t\t\tforeach (array_keys($cat_groups) as $cat_group)\n\t\t\t{\n\t\t\t\t$field_info = array(\n\t\t\t\t\t'field' => $cat_group,\n\t\t\t\t\t'visible' => TRUE,\n\t\t\t\t\t'collapsed' => FALSE\n\t\t\t\t);\n\t\t\t\t$field_layout[$new_cat_tab]['fields'][] = $field_info;\n\t\t\t}\n\n\t\t\t$channel_layout->field_layout = $field_layout;\n\t\t\t$channel_layout->save();\n\t\t}\n\t}", "public function update() {\n\t\t$data = array(\n\t\t\t'tstamp' => $this['timeStamp'],\n\t\t\t'crdate' => $this['createDate'],\n\t\t\t'cruser_id' => $this['cruserUid'],\n\t\t\t'name' => $this['name'],\n\t\t);\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_UPDATEquery(\n\t\t\t'tx_passwordmgr_group',\n\t\t\t'uid=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this['uid'],'tx_passwordmgr_group'),\n\t\t\t$data\n\t\t);\n\t\t$this->checkAffectedRows('updateGroup', 1);\n\t\ttx_passwordmgr_helper::addLogEntry(1, 'updateGroup', 'Update group '.$data['name'].' uid '.$this['uid']);\n\t}", "public function testUpdateLanguageGroup() {\n foreach ($this->testCases['LanguageGroup'] as $key => $testCase) {\n $langGroup = new LanguageGroup();\n $langGroup->setGroupName($testCase['group_name']);\n\n $this->localizationDao = $this->getMock('LocalizationDao');\n $this->localizationDao->expects($this->once())\n ->method('updateLanguageGroup')\n ->will($this->returnValue(TRUE));\n\n $this->locaizationService->setLocalizationDao($this->localizationDao);\n\n $result = $this->locaizationService->updateLanguageGroup($langGroup);\n $this->assertTrue($result);\n }\n }", "private function _bindUPGroupList()\n\t{\n\t\t$result = array();\n\t\tforeach($this->_getUPGroups() as $key => $content){\n\t\t\t$result[] = array($key, $key);\n\t\t}\n\t\t$result[] = array(\"chg\", \"** Show All **\");\n\t\t$this->preferencesList->DataSource = $result;\n\t\t$this->preferencesList->DataBind();\n\t}", "public function update_field_group($field_group)\n {\n }", "public function updateDataFormats()\n {\n global $config, $rlListingTypes, $rlDb;\n\n if (!$config['cache']) {\n return false;\n }\n\n $this->removeFiles('cache_data_formats');\n\n $rlDb->setTable('data_formats');\n\n /* DO NOT SET ANOTHER FIELD FOR ORDER, ID ONLY */\n $data = $rlDb->fetch(array('ID', 'Parent_ID', 'Key`, CONCAT(\"data_formats+name+\", `Key`) AS `pName', 'Position', 'Default'), array('Status' => 'active', 'Plugin' => ''), \"ORDER BY `ID`, `Key`\");\n\n foreach ($data as $key => $value) {\n if (!$value['Key']) {\n continue;\n }\n\n if (!array_key_exists($data[$key]['Key'], $out) && empty($data[$key]['Parent_ID'])) {\n $out[$data[$key]['Key']] = array();\n $df_info[$data[$key]['ID']] = $data[$key]['Key'];\n } else {\n if (!$df_info[$data[$key]['Parent_ID']]) {\n continue;\n }\n\n $out[$df_info[$data[$key]['Parent_ID']]][] = $data[$key];\n }\n }\n\n unset($data, $df_info);\n $this->set('cache_data_formats', $out);\n }", "public function testUpdateSupplierGroup()\n {\n }", "private function updateCollectionRecord(){\r\n\t\r\n\t\t$collectionId = $this->collection['uid'];\r\n\t\t$imgUids = array();\r\n\t\t$fileNames = $this->collection['images'];\r\n\t\t$fileNames = explode(',', $fileNames);\r\n\t\t\r\n\t\tforeach($fileNames as $filename){\r\n\t\t\t$imgUids[] = $this->images[$filename]['uid'];\r\n\t\t}\r\n\t\t\r\n\t\t$updateRecord = array('image_records' => implode(',', $imgUids),\r\n\t\t\t\t\t\t\t'tstamp' => time());\r\n\t\t\r\n\t\t$this->db->exec_UPDATEquery('tx_gorillary_collections', \"uid='$collectionId'\", $updateRecord);\r\n\t}", "function convertGroupValues($array){\n\t\tforeach($array as $i => $value){\n\t\t\t$newvalue = convertValues($value);\n\t\t\t$array[$i] = $newvalue;\n\t\t}\n\t\t\n\t\treturn $array;\n\t}", "function Inscription_Group_Update($group,&$inscription)\n {\n if (!empty($inscription[ \"ID\" ]))\n {\n $inscription=\n $this->MyMod_Item_Update_CGI\n (\n $inscription,\n $this->MyMod_Data_Group_Datas_Get($group,TRUE),\n $prepost=\"\"\n );\n }\n \n return $inscription;\n }", "function update_group_memberships()\n {\n if (! is_null($this->group_id))\n {\n $group_users_arr = $this->viewer->get_group_users($this->group_id);\n $group_users = array();\n \n foreach ($group_users_arr as $user)\n {\n $group_users[$user->get_id()] = $user->get_id();\n }\n \n $values = $this->exportValue(Manager::PARAM_GROUP_USERS);\n \n foreach ($values as $type => $elements)\n {\n foreach ($elements as $id)\n {\n if ($type == self::PARAM_USER)\n {\n // type = user\n if (! in_array($id, $group_users))\n {\n if (! $this->viewer->user_is_enrolled_in_group($id))\n {\n $this->viewer->add_user_to_group($id, $this->group_id); // user can be enrolled in one\n // PA-group/publication\n }\n else\n {\n $user = \\Chamilo\\Core\\User\\Storage\\DataManager::retrieve_by_id(\n \\Chamilo\\Core\\User\\Storage\\DataClass\\User::class_name(), \n $id);\n $already_enrolled[] = $user->get_firstname() . ' ' . $user->get_lastname();\n }\n }\n else\n {\n unset($group_users[$id]);\n }\n }\n // type = group\n elseif ($type == self::PARAM_GROUP)\n {\n $context_group_users = $this->viewer->get_context_group_users($id);\n \n foreach ($context_group_users as $user)\n {\n if (! in_array($user->get_id(), $group_users))\n {\n if (! $this->viewer->user_is_enrolled_in_group($user->get_id()))\n {\n $this->viewer->add_user_to_group($user->get_id(), $this->group_id); // user can be\n // enrolled in\n // one\n // PA-group/publication\n }\n else\n {\n $already_enrolled[] = $user->get_firstname() . ' ' . $user->get_lastname();\n }\n }\n else\n {\n unset($group_users[$id]);\n }\n }\n }\n }\n }\n \n // remove remaining users\n foreach ($group_users as $user_id)\n {\n $this->viewer->remove_user_from_group($user_id, $this->group_id);\n }\n }\n \n if (count($already_enrolled) > 0)\n $this->enroll_errors = implode(',', $already_enrolled) . ' ' . Translation::get('AlreadyEnrolled');\n }", "function updateGroup($group)\n {\n return PEAR::raiseError(_(\"Unsupported\"));\n }", "function updateDBTable() \n { \n // make sure label is translated into UnicodeEntities\n $data = $this->getLabel();\n $newData = Unicode_utf8ToUnicodeEntities ($data);\n $this->setLabel( $newData );\n \n parent::updateDBTable();\n \n // Go Through and remove any existing xlation requests for this\n // label entry.\n $currentPageID = $this->getPageID();\n $currentKey = $this->getKey();\n $currentLanguageID = $this->getLanguageID();\n \n $xlationManager = new RowManager_XLationManager();\n \n // for each label with matching PageID & Key\n $labelManager = new RowManager_MultilingualLabelManager();\n $labelManager->setPageID( $currentPageID );\n $labelManager->setKey( $currentKey );\n $labelList = $labelManager->getListIterator();\n $labelList->setFirst();\n while( $label = $labelList->getNext() ) {\n \n // delete any xlation entry with current language_id & \n // matching label_id\n if ($xlationManager->loadByLabelAndLanguage( $label->getID(), $currentLanguageID ) ) {\n $xlationManager->deleteEntry();\n }\n \n } // next label \n }", "private function _update_currency_conversion_rate(){\n\t\t\t$query = \"SELECT `serial_num`, `\".$this->table_fields['currency_iso_code'].\"` as 'currency_iso_code' FROM `\" . $this->class_settings['database_name'] . \"`.`\".$this->table_name.\"` where `record_status`='1' AND `modification_date` < \".(date(\"U\") - (3600*24));\n\t\t\t$query_settings = array(\n\t\t\t\t'database' => $this->class_settings['database_name'] ,\n\t\t\t\t'connect' => $this->class_settings['database_connection'] ,\n\t\t\t\t'query' => $query,\n\t\t\t\t'query_type' => 'SELECT',\n\t\t\t\t'set_memcache' => 1,\n\t\t\t\t'tables' => array( $this->table_name ),\n\t\t\t);\n \n //get exchange rate\n $all_country_list = execute_sql_query($query_settings);\n\t\t\t$return = array();\n \n\t\t\tif( is_array( $all_country_list ) && ! empty( $all_country_list ) ){\n\t\t\t\t$query_settings['query_type'] = 'UPDATE';\n \n $first = true;\n foreach( $all_country_list as $val ){\n\t\t\t\t\tif( $val['currency_iso_code'] ){\n $json = file_get_contents('http://rate-exchange.appspot.com/currency?from=USD&to='.strtoupper($val['currency_iso_code']) );\n if($json)$cur = json_decode($json, true);\n if( isset( $cur['rate'] ) && $cur['rate'] ){\n $return[] = $cur;\n \n $query_settings['query'] = \"UPDATE `\" . $this->class_settings['database_name'] . \"`.`\".$this->table_name.\"` SET `\".$this->table_fields['conversion_rate'].\"`= '\".$cur['rate'].\"' WHERE `serial_num`='\".$val['serial_num'].\"' \";\n \n execute_sql_query($query_settings);\n \n if( $first ){\n $query_settings['tables'] = array();\n $query_settings['set_memcache'] = 0;\n $first = false;\n }\n }\n }\n\t\t\t\t}\n \n $this->class_settings[ 'do_not_check_cache' ] = 1;\n $this->_get_country_list();\n }\n \n return $return;\n }", "function updateObject(&$group) {\n\t\t$returner = $this->update(\n\t\t\t'UPDATE groups\n\t\t\t\tSET\tseq = ?,\n\t\t\t\t\tassoc_type = ?,\n\t\t\t\t\tassoc_id = ?,\n\t\t\t\t\tabout_displayed = ?,\n\t\t\t\t\tcontext = ?,\n\t\t\t\t\tpublish_email = ?\n\t\t\t\tWHERE\tgroup_id = ?',\n\t\t\tarray(\n\t\t\t\t(float) $group->getSequence(),\n\t\t\t\t(int) $group->getAssocType(),\n\t\t\t\t(int) $group->getAssocId(),\n\t\t\t\t(int) $group->getAboutDisplayed(),\n\t\t\t\t(int) $group->getContext(),\n\t\t\t\t(int) $group->getPublishEmail(),\n\t\t\t\t(int) $group->getId()\n\t\t\t)\n\t\t);\n\t\t$this->updateLocaleFields($group);\n\t\treturn $returner;\n\t}", "protected function update(){\n\t\t$this->aggregations = array();\n\t\t\n\t\t// also update any groups\n\t\tforeach($this->getGroups() as $group){\n\t\t\t$group->update();\n\t\t}\n\t}", "public static function _prepareSortable() {\n $data = [];\n $sortableGroupField = static::getSortableGroupField();\n $sortableField = static::getSortableField();\n foreach(static::all() as $row) {\n $keyParts = [];\n foreach ($sortableGroupField as $sgf) {\n $keyParts[] = $row->{$sortableGroupField};\n }\n $key = implode('_',$keyParts);\n if ($sortableGroupField) {\n $data[$key][] = $row;\n } else {\n $data[0][$row];\n }\n }\n\n foreach ($data as $group => $groupData ) {\n $i = 0;\n foreach ($groupData as $row) {\n $row->{$sortableField} = ++$i;\n $row->save();\n echo sprintf(\"row %d was orderer<br>\\n\",$row->id);\n }\n }\n }", "public function Group($field,$group){\n $this->_groups[$field] = array_merge($group,array(\"currentGroup\" => \"?\", \"currentMsg\" => \"\"));\n }", "public function SaveGroupCategory() {\n\t\t\ttry {\n\t\t\t\t// Update any fields for controls that have been created\n\t\t\t\tif ($this->lstGroup) $this->objGroupCategory->GroupId = $this->lstGroup->SelectedValue;\n\t\t\t\tif ($this->calDateRefreshed) $this->objGroupCategory->DateRefreshed = $this->calDateRefreshed->DateTime;\n\t\t\t\tif ($this->txtProcessTimeMs) $this->objGroupCategory->ProcessTimeMs = $this->txtProcessTimeMs->Text;\n\n\t\t\t\t// Update any UniqueReverseReferences (if any) for controls that have been created for it\n\n\t\t\t\t// Save the GroupCategory object\n\t\t\t\t$this->objGroupCategory->Save();\n\n\t\t\t\t// Finally, update any ManyToManyReferences (if any)\n\t\t\t} catch (QCallerException $objExc) {\n\t\t\t\t$objExc->IncrementOffset();\n\t\t\t\tthrow $objExc;\n\t\t\t}\n\t\t}", "public function updateGroup() {\n if(!$this->request->is('restful')) {\n try {\n $this->CoGroupMember->updateGroupMemberships($this->request->data['CoGroupMember']['co_group_id'],\n $this->request->data['CoGroupMember']['rows'],\n $this->Session->read('Auth.User.co_person_id'));\n \n $this->Flash->set(_txt('rs.saved'), array('key' => 'success'));\n }\n catch(Exception $e) {\n $this->Flash->set($e->getMessage(), array('key' => 'error'));\n }\n \n // Issue redirect\n \n $this->redirect(array('controller' => 'co_groups',\n 'action' => 'edit',\n $this->request->data['CoGroupMember']['co_group_id'],\n 'co' => $this->cur_co['Co']['id']));\n }\n }", "function set_cur_group($group) {\n\t\tlgi_mysql_query(\"UPDATE %t(usergroups) SET `dfl`=(`name`='%%') WHERE `usercertid`=(SELECT `id` FROM %t(usercerts) WHERE `user`='%%')\", $group, $this->userid);\n\t\t$_SESSION['dfl_group'] = $group;\n\t}", "function acf_update_field_group($field_group)\n{\n}", "function acf_update_field_group( $field_group ) {\n\treturn acf_update_internal_post_type( $field_group, 'acf-field-group' );\n}", "public function updateExtList() {}", "protected function _upgradeContactLists()\n {\n $criteria = array('__type' => 'Group');\n $sources = array_keys($GLOBALS['cfgSources']);\n\n foreach ($sources as $sourcekey) {\n try {\n $driver = $GLOBALS['injector']->getInstance('Turba_Factory_Driver')->create($sourcekey);\n $lists = $driver->search($criteria);\n } catch (Turba_Exception $e) {\n return;\n }\n\n for ($j = 0, $cnt = count($lists); $j < $cnt; ++$j) {\n $list = $lists->next();\n $attributes = $list->getAttributes();\n $members = @unserialize($attributes['__members']);\n if (is_array($members) && !empty($members[0])) {\n $c = count($members);\n for ($i = 0; $i < $c; ++$i) {\n if (substr_count($members[$i], ':') == 2) {\n preg_match('/^([a-zA-Z0-9]+:[a-zA-Z0-9]+)(:[a-zA-Z0-9]+)$/', $members[$i], $matches);\n $source = $matches[1];\n $contact_key = substr($matches[2], 1);\n } elseif (substr_count($members[$i], ':') == 1) {\n list($source, $contact_key) = explode(':', $members[$i]);\n } else {\n break;\n }\n $source = $this->_updateShareName($source);\n $members[$i] = $source . ':' . $contact_key;\n }\n $list->setValue('__members', serialize($members));\n $list->store();\n }\n }\n }\n }", "function fantacalcio_admin_groups_list() {\n $out = \"\";\n \n $out .= l(\"Aggiungi girone\", \"admin/fantacalcio/groups/add\", array(\n \"attributes\" => array(\"class\" => \"btn btn-info\"))) . \"<br/><br/>\";\n \n $groups = Group::all();\n $competitions = Competition::all();\n if ($groups) {\n $header = array(\n t(\"Girone\"), \n t(\"Attivo\"), \n t(\"Calendario\"), \n t(\"Classfica\"), \n t(\"Formazioni\"), \n t(\"Newsletter\"));\n foreach ($groups as $g_id => $group) {\n $rows[] = array(\n l($competitions[$group->competition_id]->name . \" - \" . $group->name, \"admin/fantacalcio/groups/\" . $g_id), \n fantacalcio_check_value($group->active), \n \n // \"<img src='\" .base_path() . drupal_get_path(\"module\", \"fantacalcio\") . \"/images/\" . get_image_check($group->active) . \"'>\",\n $group->matches_order, \n $group->standings_order, \n $group->lineups_order, \n $group->newsletters_order);\n }\n $out .= theme(\"table\", (array(\n \"header\" => $header, \n \"rows\" => $rows, \n \"attributes\" => array(\"class\" => array(\"table\", \"table-responsive\")), \n \"empty\" => t(\"Nessun gruppo\"))));\n }\n \n return $out;\n}", "function update() {\n\t\n\t \t$sql = \"UPDATE evs_database.evs_group \n\t \t\t\tSET\tgru_id=?, gru_name=?, gru_head_dept=? \n\t \t\t\tWHERE gru_id=?\";\n\t\t\n\t\t$this->db->query($sql, array($this->gru_id_new, $this->gru_name, $this->gru_head_dept, $this->gru_id_old));\n\t\t \n\t }", "public function SetGroup($group,$value){\n if($this->_groups[$group][\"currentGroup\"]!=$value){\n if($this->_groups[$group][\"currentGroup\"]!=\"?\"){\n if(isset($this->_groups[$group][\"afterGroup\"])){\n $this->Ln(4);\n $function = array($this->_groups[$group][\"afterGroup\"][\"class\"],$this->_groups[$group][\"afterGroup\"][\"callback\"]);\n $params = array($this,$value);\n call_user_func_array($function,$params);\n }\n $this->Sum();\n }\n if(isset($this->_groups[$group][\"beforeGroup\"])){\n if(($this->GetY() + 22) > ($this->h - 10)){ //22 Altura de una cabecera de grupo\n $this->_changePage = false;\n $this->AddPage();\n }\n $this->Ln(6);\n $this->SetTextColor(100);\n $this->SetFont('Arial','B',11);\n $function = array($this->_groups[$group][\"beforeGroup\"][\"class\"],$this->_groups[$group][\"beforeGroup\"][\"callback\"]);\n $params = array($this,$value);\n $this->_groups[$group][\"currentMsg\"] = call_user_func_array($function,$params);\n $this->Ln(4);\n }\n $this->_groups[$group][\"currentGroup\"] = $value;\n $this->pages[$this->PageNo()] = str_replace(\"{grp_$group}\",$this->_groups[$group][\"currentMsg\"],$this->pages[$this->PageNo()]);\n $this->__Header();\n $this->_changePage = false;\n $this->SumRe();\n }else{\n $this->_changePage = true;\n }\n }", "private function updateWithCurrrencyConversion($carrierGroupDetail, $currencyConversionRate)\n {\n if (is_array($carrierGroupDetail) && isset($carrierGroupDetail[0])) {\n // Merged rates return a numeric array of assoc arrays. If there is a 0 key we know this is the case\n foreach ($carrierGroupDetail as $k => $detail) {\n $carrierGroupDetail[$k]['cost'] *= $currencyConversionRate;\n $carrierGroupDetail[$k]['price'] *= $currencyConversionRate;\n }\n } else {\n $carrierGroupDetail['cost'] *= $currencyConversionRate;\n $carrierGroupDetail['price'] *= $currencyConversionRate;\n }\n return $carrierGroupDetail;\n }", "function update() {\n\t\t$sql = \"UPDATE umgroup \n\t\t\t\tSET\tGpNameT=?, GpNameE=?, GpDesc=?, GpStID=? \n\t\t\t\tWHERE GpID=?\";\t\n\t\t\n\t\t \n\t\t$this->ums->query($sql, array($this->GpNameT, $this->GpNameE, $this->GpDesc, $this->GpStID, $this->GpID));\n\n\t}", "protected function postImport(){\n foreach(MigrateDestinationFieldGroup::getFieldGroupModes() as $mode){\n $group = field_group_load_field_group('group_misc', 'taxonomy_term', $this->vocabulary->machine_name, $mode);\n if($group){\n $group->children = array_merge($group->children, $this->destination->getFieldsCreated());\n field_group_group_save($group);\n }\n }\n }", "public function refreshGroups()\n {\n $this->sortedAttributeGroups = AttributeGroup::whereAttributableType($this->typeClass)\n ->orderBy('position')->get();\n\n $this->showGroupCreate = false;\n }", "private function modifyGroupInput($cells){\n\n foreach($cells as $cell){\n if(is_numeric(strpos($cell, '[group]'))){\n $searchModel = new PasswordSearch();\n $acc_groups = Password::find()\n ->select(['id', 'group'])\n ->where(['is not', 'group', null])\n ->asArray()->all();\n\n // Filter unique group items from all account credentials.\n $acc_groups = self::getUniqueArrItems($acc_groups, 'group');\n\n // Groups for which the user has access.\n $allowed_acc_groups = array();\n\n if (is_object(\\Yii::$app->user->identity) &&\n intval(\\Yii::$app->user->identity->is_admin) !== 1){\n foreach ($acc_groups as $a_group) {\n // Iterate all groups and check if user is allowed.\n if (PasswordController::checkAccessByAccId($a_group['id'])){\n $allowed_acc_groups[] = $a_group;\n }\n }\n } else {\n // Admin can access everything.\n $allowed_acc_groups = $acc_groups;\n }\n\n $arr_dropdown = ArrayHelper::map($allowed_acc_groups, 'group', 'group');\n $cell = Html::activeDropDownList($searchModel, 'group', $arr_dropdown,\n ['class'=>'form-control','prompt' => 'Select Group']);\n $cell = $this->render('@app/modules/yiipass/views/elements/dropdown', array('group_input' => $cell));\n }\n\n // Remove \"lastaccess\" input. Working sorting is enough here. Input for date works not good.\n if(is_numeric(strpos($cell, '[lastaccess]'))){\n $cell = '';\n }\n\n $new_cells[] = $cell;\n }\n return $new_cells;\n }", "public function remapListedDBRecords() {}", "public function update_custom_slideshow_group_boat_list_rank(){\r\n\t global $db, $cm;\r\n\t parse_str($_POST['data'], $recOrder);\r\n\t $i = 1;\r\n\t foreach ($recOrder['item'] as $value) {\r\n\t\t $value_ar = explode(\"!#!\", $value);\r\n\t\t $boat_id = round($value_ar[0]);\r\n\t\t $slideshow_id = round($value_ar[1]);\r\n\t\t \r\n\t\t $sql = \"update tbl_boat_slideshow_assign set rank = '\". $i .\"' where boat_id = '\". $boat_id .\"' and slideshow_id = '\". $slideshow_id .\"'\";\r\n\t\t $db->mysqlquery($sql); \r\n\t\t $i++;\t\r\n\t }\r\n\t}", "function updateGroup() {\n\t\t$groupId = Request::getUserVar('groupId') === null? null : (int) Request::getUserVar('groupId');\n\t\tif ($groupId === null) {\n\t\t\t$this->validate();\n\t\t\t$group = null;\n\t\t} else {\n\t\t\t$this->validate($groupId);\n\t\t\t$group =& $this->group;\n\t\t}\n\t\t$this->setupTemplate($group);\n\n\t\timport('classes.manager.form.GroupForm');\n\n\t\t$groupForm = new GroupForm($group);\n\t\t$groupForm->readInputData();\n\n\t\tif ($groupForm->validate()) {\n\t\t\t$groupForm->execute();\n\t\t\tRequest::redirect(null, null, 'groups');\n\t\t} else {\n\n\t\t\t$templateMgr =& TemplateManager::getManager();\n\t\t\t$templateMgr->append('pageHierarchy', array(Request::url(null, 'manager', 'groups'), 'manager.groups'));\n\n\t\t\t$templateMgr->assign('pageTitle',\n\t\t\t\t$group?\n\t\t\t\t\t'manager.groups.editTitle':\n\t\t\t\t\t'manager.groups.createTitle'\n\t\t\t);\n\n\t\t\t$groupForm->display();\n\t\t}\n\t}", "public function SaveGroupAssessmentList() {\n\t\t\ttry {\n\t\t\t\t// Update any fields for controls that have been created\n\t\t\t\tif ($this->txtTotalKeys) $this->objGroupAssessmentList->TotalKeys = $this->txtTotalKeys->Text;\n\t\t\t\tif ($this->txtKeysLeft) $this->objGroupAssessmentList->KeysLeft = $this->txtKeysLeft->Text;\n\t\t\t\tif ($this->lstResource) $this->objGroupAssessmentList->ResourceId = $this->lstResource->SelectedValue;\n\t\t\t\tif ($this->txtKeyCode) $this->objGroupAssessmentList->KeyCode = $this->txtKeyCode->Text;\n\t\t\t\tif ($this->txtDescription) $this->objGroupAssessmentList->Description = $this->txtDescription->Text;\n\t\t\t\tif ($this->calDateModified) $this->objGroupAssessmentList->DateModified = $this->calDateModified->DateTime;\n\n\t\t\t\t// Update any UniqueReverseReferences (if any) for controls that have been created for it\n\n\t\t\t\t// Save the GroupAssessmentList object\n\t\t\t\t$this->objGroupAssessmentList->Save();\n\n\t\t\t\t// Finally, update any ManyToManyReferences (if any)\n\t\t\t\t$this->lstUsersAsAssessmentManager_Update();\n\t\t\t} catch (QCallerException $objExc) {\n\t\t\t\t$objExc->IncrementOffset();\n\t\t\t\tthrow $objExc;\n\t\t\t}\n\t\t}", "function updateProjectGroups() {\n $projects_table = TABLE_PREFIX . 'projects';\n $project_groups_table = TABLE_PREFIX . 'project_groups';\n $categories_table = TABLE_PREFIX . 'categories';\n $config_options_table = TABLE_PREFIX . 'config_options';\n\n try {\n $templates_group_id = DB::executeFirstCell(\"SELECT value FROM $config_options_table WHERE name = ?\", 'project_templates_group');\n $templates_group_id = $templates_group_id ? (integer) unserialize($templates_group_id) : 0;\n\n $templates_category_id = 0;\n\n DB::execute(\"ALTER TABLE $projects_table ADD category_id int(10) unsigned null default null AFTER group_id\");\n\n $rows = DB::execute(\"SELECT id, name FROM $project_groups_table\");\n if($rows) {\n list($admin_user_id, $admin_display_name, $admin_email_address) = $this->getFirstAdministrator();\n\n foreach($rows as $row) {\n DB::execute(\"INSERT INTO $categories_table (type, name, created_on, created_by_id, created_by_name, created_by_email) VALUES (?, ?, UTC_TIMESTAMP(), ?, ?, ?)\", 'ProjectCategory', $row['name'], $admin_user_id, $admin_display_name, $admin_email_address);\n\n $category_id = DB::lastInsertId();\n\n DB::execute(\"UPDATE $projects_table SET category_id = ? WHERE group_id = ?\", $category_id, $row['id']);\n\n if($row['id'] == $templates_group_id) {\n $templates_category_id = $category_id;\n } // if\n } // foreach\n } // if\n\n DB::execute(\"UPDATE $config_options_table SET name = ?, value = ? WHERE name = ?\", 'project_templates_category', serialize($templates_category_id), 'project_templates_group');\n DB::execute(\"ALTER TABLE $projects_table DROP group_id\");\n DB::execute(\"ALTER TABLE $projects_table ADD INDEX (company_id)\");\n DB::execute(\"DROP TABLE $project_groups_table\");\n } catch(Exception $e) {\n return $e->getMessage();\n } // try\n\n return true;\n }", "public function changeGroup(){\n $idTClass = htmlspecialchars($_POST['idTClass']);\n $response = array(\n 'code' => 1,\n 'msg' => \"\",\n 'group' => NULL\n );\n if ($idTClass == \"\"){\n $response['code'] = 0;\n $response['msg'] = \"Molimo upisite broj grupe koju birate!\";\n }\n else{\n $this->modelUser->changeGroup($this->curUser, $idTClass);\n $response['group'] = $this->modelUser->getTheoryGroupForUser($this->curUser);\n }\n header(\"Content-Type: application/json\");\n echo json_encode($response);\n }", "protected function afterInit() {\r\n\t\tparent::afterInit();\r\n\r\n\t\tif (!$this->cfg->uniqValue)\r\n\t\t\t$this->cfg->name.= '[]';\r\n\r\n\t\t$dbList = $this->cfg->dbList;\r\n\t\tif (is_array($dbList) && $dbList['table']) {\r\n\t\t\t$list = $this->cfg->list;\r\n\t\t\tif (!$list)\r\n\t\t\t\t$list = array();\r\n\r\n\t\t\t$group = $this->cfg->group;\r\n\t\t\tif (!$group)\r\n\t\t\t\t$group = array();\r\n\r\n\t\t\t$db = db::getInstance();\r\n\r\n\t\t\t$values = $db->select(array_merge($dbList, array('result'=>PDO::FETCH_ASSOC)));\r\n\r\n\t\t\t$tmp = null;\r\n\t\t\tforeach($values as $v) {\r\n\t\t\t\t$key = array_shift($v);\r\n\t\t\t\tif ($dbList['nbFieldGr'] > 0) {\r\n\t\t\t\t\t$arr = utils::cutArray($v, $dbList['nbFieldGr']);\r\n\t\t\t\t\t$tmp2 = implode($dbList['sepGr'], $arr[0]);\r\n\t\t\t\t\tif ($tmp != $tmp2) {\r\n\t\t\t\t\t\t$group[$key] = $tmp2;\r\n\t\t\t\t\t\t$tmp = $tmp2;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$v = $arr[1];\r\n\t\t\t\t}\r\n\t\t\t\tif (empty($v))\r\n\t\t\t\t\t$v = array($key);\r\n\t\t\t\t$list[$key] = implode($dbList['sep'], $v);\r\n\t\t\t}\r\n \r\n\t\t\t$this->cfg->group = utils::htmlOut($group);\r\n\t\t\t$this->cfg->list = utils::htmlOut($list);\r\n\t\t} else if ($this->cfg->needOut)\r\n\t\t\t$this->cfg->list = utils::htmlOut($this->cfg->list, true);\r\n\r\n\t\tif (is_array($this->cfg->list))\r\n\t\t\t$this->addRule('in', array_keys($this->cfg->list));\r\n\t}", "function process_type(&$list)\n{\n\tforeach ($list as $index => $row) {\n\t\tif ($row['climb_type'] == 'Lead')\n\t\t\t$list[$index]['climb_type'] = 'L';\n\t\telse\n\t\t\t$list[$index]['climb_type'] = '';\n\t}\n}", "public function UpdateGroup()\n {\n $queryUpdateGroup = \"UPDATE groups SET\n group_name=:group_name,\n description=:description,\n department_id=:department_id\n WHERE id=:group_id\";\n\n $updateGroup = $this->sqlDataBase->prepare($queryUpdateGroup);\n $updateGroup->execute(array(\":group_name\"=>$this->groupName,\":description\"=>$this->description,\":department_id\"=>$this->departmentId,\":group_id\"=>$this->groupId));\n }", "private function parseGroups()\n\t{\n\t\t/**\n\t\t * Grupos\n\t\t */\n\t\t$groups = $this->habbo->groups;\n\n\t\t/**\n\t\t * Convertirlos a Entity\n\t\t */\n\t\tforeach( $groups as $group )\n\t\t\t$this->addGroup( new Group( $group ) );\n\t}", "public function switchGroup($group);", "public function createOrUpdateList(ModelGroup $group)\n {\n return ControllerList::getInstance()->createOrUpdateByGroup($group);\n }", "public function updateGroupInfo(UpdateGroupRequest $request, CategoryRepository $categoryRepo, GroupAdminRepository $groupAdminRep)\n {\n $user = $request->user();\n\n// $admin_list = Admin::select('user_id')->get()->toArray();\n// $admin_list = array_pluck($admin_list, 'user_id');\n $admin_list = [];\n $data = $request->all();\n $group = Group::find($data['group_id']);\n if (\n $group->owner != $user->id \n and !in_array($user->id, $admin_list)\n && !$groupAdminRep->checkGroupAdmin($data['group_id'], $user->id, 2)\n ) {\n return $this->_transformer->noPermission();\n }\n\n // $new_name = preg_replace('/[^\\w\\d]/', '', $request->name);\n\n if($group->title != $request->title){\n\n if(in_array($request->title, Constants::reserved_names)){\n return $this->_transformer->fail(40019, 'Invalid group name.');\n }\n\n $new_name_occupy = Group::where(\"title\", $request->title)->first();\n if(!empty($new_name_occupy)){\n return $this->_transformer->fail(512, 'Group name is taken.');\n }\n }\n\n try {\n\n DB::beginTransaction();\n\n $group_updated = tap($group)->update($request->only('title', 'description', 'cover', 'logo','no_recommend'));\n\n if (isset($data['categories'])) {\n $old_category_tree = $categoryRepo->getCategoryTree($group->id);\n $old_categories = [];\n\n foreach ($old_category_tree as $old_category){\n $old_categories[$old_category->category_id] = $old_category->name;\n }\n\n $id_delete = array_keys($old_categories);\n\n $new_categories = json_decode($data['categories'], true);\n\n if(count($new_categories) > 20 ){\n if(count($old_categories) < count($new_categories) ){\n throw new Exception('no more than 20 Categories');\n }\n }\n\n $name_ary = [];\n foreach ($new_categories as $category){\n if(in_array($category['name'],$name_ary)){\n throw new \\Exception('The same categories name is not allowed');\n }\n $name_ary[] = $category['name'];\n }\n\n foreach ($new_categories as $category) {\n\n // update a category\n if (!empty($category['id'])) {\n $delete_index = array_search($category['id'], $id_delete);\n // this statement shall always be true, keep it here to be prudent\n if ($delete_index !== false) {\n // this category not to be deleted\n unset($id_delete[$delete_index]);\n\n if ($category['name'] !== $old_categories[$category['id']]) {\n $categoryRepo->updateCategory($group->id, $category['id'], $category['name']);\n }\n }\n } else {\n $categoryRepo->addCategory($group->id, trim($category['name']));\n }\n }\n\n // delete some category\n if (count($id_delete)){\n foreach ($id_delete as $id){\n $categoryRepo->deleteCategory($group->id, $id);\n }\n }\n }\n\n\n if(isset($request->super_no_recommend)){\n\n// $admin_list = Admin::select('user_id')->get()->toArray();\n// $admin_list = array_pluck($admin_list, 'user_id');\n $admin_list = [];\n if(!in_array($user->id, $admin_list)){\n return $this->_transformer->noPermission();\n }\n\n $group_updated = tap($group_updated)->update(['super_no_recommend' => $request->super_no_recommend ? 1 : 0]);\n }\n\n DB::commit();\n\n return $this->_transformer->success(['group' => $group_updated, 'categories' => $categoryRepo->getCategoryTree($group->id)]);\n } catch (\\Exception $e) {\n DB::rollBack();\n return $this->_transformer->fail(512, $e->getMessage());\n }\n }", "public function enroleToGroup($group_id_array){\n global $USER; \n checkCapabilities('user:enroleToGroup', $USER->role_id);\n $groups = new Group();\n \n foreach ($group_id_array as $group_id) {\n $groups->id = $group_id; \n $groups->load();\n $db = DB::prepare('SELECT count(id) FROM groups_enrolments WHERE group_id = ? AND user_id = ?');\n $db->execute(array($group_id, $this->id));\n if($db->fetchColumn() > 0) {\n $db = DB::prepare('UPDATE groups_enrolments SET status = 1 WHERE group_id = ? AND user_id = ?');//Status 1 == enroled\n if ($db->execute(array($group_id, $this->id))){\n $_SESSION['PAGE']->message[] = array('message' => 'Nutzereinschreibung (<strong>'.$this->username.'</strong>) in <strong>'.$groups->group.'</strong> aktualisiert.', 'icon' => 'fa-user text-success');\n }\n } else { \n $db = DB::prepare('INSERT INTO groups_enrolments (status,group_id,user_id,creator_id) VALUES (1,?,?,?)'); //Status 1 == enroled\n if ($db->execute(array($group_id, $this->id, $USER->id))){\n \n $_SESSION['PAGE']->message[] = array('message' => '<strong>'.$this->username.'</strong> in <strong>'.$groups->group.'</strong> eingeschrieben.', 'icon' => 'fa-user text-success');\n }\n } \n }\n }", "public function changeGroup($files, $group, $recursive = false);", "function GroupsChange($section){\n\tglobal $smarty, $dbconn, $config, $page, $lang;\n\n\t$err = \"\";\n\t$settings[\"site_unit_costunit\"] = GetSiteSettings('site_unit_costunit');\n\n\t$par = (isset($_GET[\"par\"]) && !empty($_GET[\"par\"])) ? $_GET[\"par\"] : \"\";\n\tif($par == \"delete\") {\n\t\t$id = intval($_REQUEST[\"id\"]);\n\t\t$dbconn->Execute(\"update \".GROUP_PERIOD_TABLE.\" set status='0' where id='\".$id.\"'\");\n\t} else {\n\t\t$group = intval($_POST[\"group\"]);\n\t\t$count = intval($_POST[\"count\"]);\n\t\t$period = strval($_POST[\"period\"]);\n\t\t$cost = $_POST[\"cost\"];\n\t\tif ($group && $period && $cost && is_numeric($cost) && $count) {\n\t\t\t$cost = floatval($_POST[\"cost\"]);\n\t\t\t$rs = $dbconn->Execute(\"SELECT count(*) from \".GROUP_PERIOD_TABLE.\" where id_group='\".$group.\"' and period='\".$period.\"' and amount='\".$count.\"' and status='1'\");\n\t\t\tif($rs->fields[0] == 0) {\n\t\t\t\t$dbconn->Execute(\"insert into \".GROUP_PERIOD_TABLE.\" (id_group, cost, period, amount, status) values ('\".$group.\"', '\".$cost.\"', '\".$period.\"', '\".$count.\"', '1')\");\n\t\t\t} else {\n\t\t\t\t$err = \"period_exist\";\n\t\t\t}\n\t\t} else {\n\t\t\t$err = \"wrong_fields\";\n\t\t}\n\t}\n\tGroupListBilling($section, $err);\n}", "function set_userGroup($data, $oldId){\n $data_user = array();\n $data_group = array();\n $data_user['id'] = $data['id'];\n $data_user['username'] = $data['username'];\n $data_user['password'] = $data['password'];\n $data_user['email'] = $data['email'];\n\n $group = $data['group'];\n $data['group'] = selectRecord(TAB_GROUPS, \"role = '$group'\")['id'];\n $data_group['userId'] = $data['id'];\n $data_group['groupId'] = $data['group'];\n\n updateRecord(TAB_USR_ROLE, $data_group, \"userId = $oldId\");\n updateRecord(TAB_USERS, $data_user, \"id = $oldId\");\n $data_info = array();\n if($data['group'] == 1){\n $data_info = array();\n $data_info['employment'] = \"-\";\n $data_info['img_address'] = \"upload/user/user-default.png\";\n $data_info['user'] = $data['id'];\n insertRecord(TAB_PERSONALINFO, $data_info);\n }\n}", "public function change()\r\n {\r\n $table = $this->table('financialv2');\r\n $table->addColumn('output_template', 'string', ['after'=>'csvbody'])\r\n ->addColumn('graph1', 'string', ['after'=>'output_template'])\r\n ->addColumn('graph2', 'string', ['after'=>'graph1'])\r\n ->addColumn('graph1_data', 'text', ['after'=>'graph2','limit'=>MysqlAdapter::TEXT_LONG,'null'=>true])\r\n ->addColumn('graph2_data', 'text', ['after'=>'graph1_data','limit'=>MysqlAdapter::TEXT_LONG,'null'=>true])\r\n ->addColumn('table1', 'string', ['after'=>'graph2'])\r\n ->addColumn('table2', 'string', ['after'=>'table1'])\r\n ->update();\r\n }", "function update_amounts_used($update_list)\n {\n $dbHandler = new DatabaseHandler();\n foreach ($update_list as $item) {\n $dbHandler->update_amount_used($item->get_id());\n }\n }", "function groups_collections_update($item, $selected_groups, $existing_groups, $relationship) {\n\t$add_groups = array_diff($selected_groups , $existing_groups);\n\t$rem_groups = array_diff($existing_groups, $selected_groups);\n\t\n\t$add_groups = array_unique($add_groups);\n\t$add_groups = array_values($add_groups);\n\t$rem_groups = array_unique($rem_groups);\n\t$rem_groups = array_values($rem_groups);\n\t$guid_two = $item->getguid();\n\t\n\tforeach($add_groups as $group){\n\t\t$guid_one = $group;\n\t\tif(!check_entity_relationship($guid_one, $relationship, $guid_two)){\n\t\t\tadd_entity_relationship($guid_one, $relationship, $guid_two);\n\t\t}\t\t\n\t}\n\tforeach($rem_groups as $group){\n\t\t$guid_one = $group;\n\t\tremove_entity_relationship($guid_one, $relationship, $guid_two);\n\t}\n}", "function mGROUP(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$GROUP;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:166:3: ( 'group' ) \n // Tokenizer11.g:167:3: 'group' \n {\n $this->matchString(\"group\"); \n\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }", "public function updateGroup($group_id, array $old_group, array $new_group){\n $this->_errors = array();\n $STH = $this->getHandler();\n $user_id = $this->getUserID();\n \n if ($old_group['members'] != NULL){\n $to_delete = array_diff($old_group['members'], $new_group['members']);\n $to_insert = array_diff($new_group['members'], $old_group['members']);\n } elseif ($old_group['members'] == NULL){\n $to_insert = $new_group['members'];\n $to_delete = NULL;\n } \n \n \n foreach ((array)$to_delete as $index => $to_delete_id){\n $values = array('song_id', '=', ':song_id');\n $where = array(':song_id' => $to_delete_id);\n $STH->delete('groups_lookup', $values, $where);\n }\n \n $name = $new_group['name'];\n $desc = $new_group['desc'];\n $type = $new_group['type'];\n \n $tables = array('groups' => array('group_id', 'group_name', 'group_desc', 'type', 'user_id'),\n 'groups_lookup' => array('group_id', 'song_id', 'user_id')); //List of tables to insert (make sure lookup table is first)\n $groupData = array(':group_id' => $group_id, ':group_name' => $name, ':group_desc' => $desc, ':type' => $type, ':user_id' => $user_id); //IDs and group ids and stuff\n $data['groups'] = $groupData;\n \n foreach ($to_insert as $index => $id){\n $data['groups_lookup'][] = array(':group_id' => $group_id, ':song_id' => $id, ':user_id' => $user_id);\n }\n \n $STH->insert($tables, $data, 'groups', 'group_id', TRUE);\n $STH->getErrors();\n }", "public function update(): void\n {\n $content = $this->getOriginalContent();\n\n $parsed = $this->parseContent($content);\n\n $this->storeList($parsed);\n }", "private function changelog_format_permission_change () {\n\t\t# get old and compare\n\t\t$this->object_new['permissions_change'] = json_decode(str_replace(\"\\\\\", \"\", $this->object_new['permissions_change']), true);\t\t//Remove /\n\n\t\t# Get all groups:\n\t\t$groups = (array) $this->Tools->fetch_all_objects(\"userGroups\", \"g_id\");\n\t\t// rekey\n\t\t$out = array();\n\t\t$log = array();\n\n\t\tforeach($groups as $k=>$g) {\n\t\t\t// save\n\t\t\t$out[$g->g_id]['g_name'] = $g->g_name;\n\t\t}\n\t\t$groups = $out;\n\n\t\t# reformat\n\t\tif($this->object_new['permissions_change']!=\"null\") {\n\t\t\t$new_permissions = json_decode($this->object_new['permissions_change']);\n\t\t\tforeach($new_permissions as $group_id=>$p) {\n\t\t\t\t$log['Permissions'] .= \"<br>\". $groups[$group_id]['g_name'] .\" : \".$this->Subnets->parse_permissions($p);\n\t\t\t}\n\t\t}\n\t\t//result\n\t\treturn $log;\n\t}", "function updateGroupCabang($data, $krid) {\r\n $this->db->trans_begin();\r\n $this->db->where('group_krid', $krid);\r\n $this->db->delete('ms_group_cabang');\r\n foreach ($data as $det) {\r\n if ($det['check'] == 1) {\r\n $array = array(\r\n 'group_krid' => $det['group_krid'],\r\n 'group_cbid' => $det['group_cbid'],\r\n );\r\n $this->db->INSERT('ms_group_cabang', $array);\r\n }\r\n }\r\n if ($this->db->trans_status() === FALSE) {\r\n $this->db->trans_rollback();\r\n return false;\r\n } else {\r\n $this->db->trans_commit();\r\n return true;\r\n }\r\n }", "function fillGroups() \n\t{\n\t\t$this->groups[] = array(-1,\"<\".\"Admin\".\">\");\n\t\t$this->groupFullChecked[] = true;\n\t\t\n\t\t$trs = db_query(\"select , from `uggroups` order by \",$this->conn);\n\t\twhile($tdata = db_fetch_numarray($trs))\n\t\t{\n\t\t\t$this->groups[] = array($tdata[0],$tdata[1]);\n\t\t\t$this->groupFullChecked[] = true;\n\t\t}\n\t}", "protected function setGroup() {\r\n //var_dump($this->sql);\r\n if( $this->sqlGroupBy ) {\r\n var_dump($this->sql);\r\n $this->sql .= ' GROUP BY ' . $this->sqlGroupBy;\r\n }\r\n //var_dump($this->sql);\r\n }", "function setGroupsToCategory($categoryId) {\r\n\t\trequire_once(\"AffiliateGroupCategoryPeer.php\"); \t\r\n\t\tforeach ($this->getGroups() as $group) {\r\n\t\t\t$groupCategory = new AffiliateGroupCategory();\r\n\t\t\t$groupCategory->setGroupId($group->getGroupId());\r\n\t\t\t$groupCategory->setCategoryId($categoryId);\r\n\t\t\t$groupCategory->save();\r\n\t\t}\r\n\t\treturn;\r\n\t}", "function updateCategoriesList ( $lang_list, $lang_set ) {\n $cats_to_create = array();\n $all_cats = get_all_category_ids(); // get all id's of categories\n\n if (!in_array('ru', $lang_list)) // we need russian as source, later source language will be optional\n $lang_list[] = 'ru';\n\n foreach ( $lang_list as $lang ) {\n $cat = get_term_by( 'name', $lang, 'category', ARRAY_A );\n if ( !$cat ) {\n $cats_to_create[] = $lang;\n }\n }\n\n foreach ( $cats_to_create as $lang ) {\n wp_insert_category(array( 'cat_name' => $lang, 'category_description' => $lang_set[$lang], 'category_nicename' => $lang, 'taxonomy' => 'category' ) );\n }\n\n foreach ( $all_cats as $cat_id ) {\n $cat = get_term_by( 'id', $cat_id, 'category', ARRAY_A );\n if ( !in_array($cat['name'], $lang_list) && $cat['name'] != 'ru' )\n wp_delete_category($cat_id);\n }\n}", "public function getManipulatedData(GridField $gridField, SS_List $dataList)\n {\n $this->stockFormats($gridField);\n $state = $this->getFormatState($gridField);\n $lastState = (string)$state->last;\n $currentState = (string)$state->current;\n\n if(!$currentState && $lastState) {\n $currentState = $lastState;\n }\n\n foreach($gridField->Config->getComponents() as $component) {\n if($component instanceof Format) {\n $this->formats[$component->getFormatState()]->unformat($gridField);\n }\n }\n\n foreach($this->formats as $format) {\n if(is_array($format) && isset($format['unformat'])) {\n call_user_func($format['unformat'], $gridField);\n }\n }\n\n if($currentState && isset($this->formats[$currentState])) {\n $gridField->removeExtraClass('ss-gridfield_' . $this->unformatted['state']);\n\n if(is_array($this->formats[$currentState]) && isset($this->formats[$currentState]['format'])) {\n call_user_func($this->formats[$currentState]['format'], $gridField, ($currentState ?: $this->unformatted['state']));\n }\n else if(is_callable($this->formats[$currentState])) {\n call_user_func($this->formats[$currentState], $gridField, ($currentState ?: $this->unformatted['state']));\n }\n else {\n $this->formats[$currentState]->format($gridField);\n }\n }\n else {\n $gridField->addExtraClass('ss-gridfield_' . $this->unformatted['state']);\n }\n\n if($this->formatCallback) {\n call_user_func($this->formatCallback, $gridField, ($currentState ?: $this->unformatted['state']));\n }\n\n $state->last = $currentState;\n\n return $dataList;\n }", "function groupControl() {\n $arrFunctions = array(\n 'row_up' => '$intKey-1',\n 'row_down' => '$intKey+1',\n 'row_turndown' => 'intGroups',\n 'row_turnup' => '1',\n 'row_remove' => '[$intGroups]',\n 'rule_remove' => \"[$intKey]['rule'][$grplength-1]\",\n );\n foreach($this->arrTableParameters['grps'] as $intGroup => $arrGroup) {\n foreach ($arrGroup['rule'] as $intRule => $arrRule) {\n $arrRule['field'] = stripslashes($arrRule['field']);\n if ($arrRule['field'] == $this->extKey.'_new') {\n if ($intRule==0) {\n unset($this->arrTableParameters['grps'][$intGroup]);\n } else {\n unset($this->arrTableParameters['grps'][$intGroup]['rule'][$intRule]);\n }\n }\n }\n }\n $intGroups = count($this->arrTableParameters['grps']);\n foreach ($arrFunctions as $strKey => $strValue) {\n if (is_array($this->arrTableParameters[$strKey])) {\n $intKey = key($this->arrTableParameters[$strKey]);\n if (is_array($this->arrTableParameters['rule_remove'])) {\n \t$intRule = key($this->arrTableParameters['rule_remove'][$intKey]);\n }\n if ($strKey!='row_turndown') {\n $arrTemp = $this->arrTableParameters['grps'][$intKey];\n } else {\n $arrTemp = $this->arrTableParameters['grps'][1];\n }\n if ($strKey=='row_up') {\n $this->arrTableParameters['grps'][$intKey] = $this->arrTableParameters['grps'][$intKey-1];\n } elseif ($strKey=='row_down') {\n $this->arrTableParameters['grps'][$intKey] = $this->arrTableParameters['grps'][$intKey+1];\n } elseif ($strKey=='row_turndown') {\n for ($intCounter=2;$intCounter<=$intGroups;$intCounter++) {\n $this->arrTableParameters['grps'][$intCounter-1] = $this->arrTableParameters['grps'][$intCounter];\n }\n } elseif ($strKey=='row_turnup') {\n for ($intCounter=$intGroups;$intCounter>1;$intCounter--) {\n $this->arrTableParameters['grps'][$intCounter] = $this->arrTableParameters['grps'][$intCounter-1];\n }\n } elseif ($strKey=='row_remove') {\n for ($intCounter=$intKey;$intCounter<=$intGroups;$intCounter++) {\n $this->arrTableParameters['grps'][$intCounter] = $this->arrTableParameters['grps'][$intCounter+1];\n }\n } elseif ($strKey=='rule_remove') {\n if (count($this->arrTableParameters['grps'][$intKey]['rule'])>1) {\n for ($intCounter=$intRule;$intCounter<count($this->arrTableParameters['grps'][$intKey]['rule']);$intCounter++) {\n $this->arrTableParameters['grps'][$intKey]['rule'][$intCounter] = $this->arrTableParameters['grps'][$intKey]['rule'][$intCounter+1];\n }\n }\n }\n if (in_array($strKey,array('row_up','row_down','row_turndown','row_turnup'))) {\n eval(\"\\$this->arrTableParameters['grps'][\".$strValue.\"] = \\$arrTemp;\");\n } elseif ($strKey=='row_remove') {\n unset($this->arrTableParameters['grps'][$intGroups]);\n } else {\n \tunset($this->arrTableParameters['grps'][$intKey]['rule'][count($this->arrTableParameters['grps'][$intKey]['rule'])-1]);\n }\n }\n }\n }", "private function buildFinalGroups($group, $path, &$list) {\n\t\tif (count($group[\"sub_groups\"]) == 0) {\n\t\t\t$group[\"path\"] = $path;\n\t\t\tarray_push($list, $group);\n\t\t\treturn;\n\t\t}\n\t\tif ($path <> \"\") $path .= \"/\";\n\t\t$path .= $group[\"name\"];\n\t\tforeach ($group[\"sub_groups\"] as $sg)\n\t\t\t$this->buildFinalGroups($sg, $path, $list);\n\t}", "public function testLanguageGroupList() {\n $this->localizationDao = $this->getMock('LocalizationDao');\n $this->localizationDao->expects($this->once())\n ->method('getDataList')\n ->will($this->returnValue(Doctrine_Collection));\n\n $this->locaizationService->setLocalizationDao($this->localizationDao);\n\n $result = $this->locaizationService->getLanguageGroupList();\n $this->assertTrue(true);\n }", "public function refreshGroupSettings()\n {\n $group = $this->currentUser->getGroup();\n if ($group instanceof \\Gems\\User\\Group) {\n $group->applyGroupToModel($this, false);\n }\n }", "function AfterAdd(&$values, &$keys, $inline, &$pageObject)\n{\n\n\t\t$data = array();\n$data[\"member_id\"] = $values[member_id];\n$data[\"group_id\"] = $values[group_id];\n$rs = DB::Select(\"group_member\", $data );\nwhile( $record = $rs->fetchAssoc() )\n{\n $group_member_id = $record[\"group_member_id\"];\n}\n\n\n$data = array();\n$keyvalues = array();\n$data[\"group_member_id\"] = $group_member_id;\n$data[\"valid\"] = 0;\n$keyvalues[\"group_member_checkin_id\"] = $values[group_member_checkin_id];\nDB::Update(\"group_member_checkin\", $data , $keyvalues);\n\n\n$data = array();\n\t$data[\"group_id\"] = $values[group_id];\n\t$rs = DB::Select(\"group\", $data );\n\n\twhile( $record = $rs->fetchAssoc() )\n\t{\n\t\t$group = $record[\"group_name\"];\n\t}\n\n$msg = \"Transaksi Check In anda di \" . $group . \" dengan id \" . $values[group_member_checkin_id] . \n\t\t\t\t\" sukses, ada mendapatkan kamar dengan id \" . $values[id_room] . \". Anda dapat melakukan Check In pada \" . \n\t\t\t\t$values[checkin_date] . \". Terimakasih.\";\n\n$rs = DB::Query(\"select chat_id from personal_channel\nwhere member_id = '$values[member_id]' AND channel_id = 1\");\n$dataChannelTele=$rs->fetchAssoc();\nif($dataChannelTele)\n{\n\t$data = array();\n\t$data[\"chat_id\"] = $dataChannelTele[\"chat_id\"];\n\t$data[\"out_msg\"] = $msg;\n\t$data[\"type\"] = \"msg\";\n\t$data[\"flag\"] = 1;\n\t$data[\"tgl\"] = NOW();\n\tDB::Insert(\"outbox_telegram\", $data );\n}\nelse\n{\n\t// if dont exist do something else\n}\n\n$rs = DB::Query(\"select chat_id from personal_channel\nwhere member_id = '$values[member_id]' AND channel_id = 2\");\n$dataChannelTele=$rs->fetchAssoc();\nif($dataChannelTele)\n{\n\t$data = array();\n\t$data[\"chat_id\"] = $dataChannelTele[\"chat_id\"];\n\t$data[\"out_msg\"] = $msg;\n\t$data[\"type\"] = \"msg\";\n\t$data[\"flag\"] = 1;\n\t$data[\"tgl\"] = NOW();\n\tDB::Insert(\"outbox_mail_aws\", $data );\n}\nelse\n{\n\t// if dont exist do something else\n}\n\n// Place event code here.\n// Use \"Add Action\" button to add code snippets.\n;\t\t\n}", "function myPear_update21(){\n\n // Clean up\n $q=myPear_db()->qquery(\"SELECT * FROM zzz_units WHERE u_rank = 'RO'\",1);\n while($r=myPear_db()->next_record($q)) b_debug::print_r($r,'record');\n \n myPear_db()->qquery(\"DELETE FROM zzz_units WHERE u_rank = 'RO'\",1);\n myPear_db()->qquery(\"SELECT * FROM zzz_list_members WHERE lm_key='' AND lm_value=''\",1); \n myPear_db()->qquery(\"DELETE FROM zzz_list_members WHERE lm_key='' AND lm_value=''\",1); \n $q = myPear_db()->qquery(\"SELECT l_id FROM zzz_lists WHERE l_member_title='department'\",1);\n while($r = myPear_db()->next_record($q)){\n myPear_db()->qquery(\"DELETE FROM zzz_lists WHERE l_id=$r[l_id]\",1);\n myPear_db()->qquery(\"DELETE FROM zzz_list_members WHERE lm_lid=$r[l_id]\",1);\n }\n myPear_db()->qquery(\"UPDATE zzz_organizations SET org_name='SU/Fysikum' WHERE org_name='Stockholm U/Fysikum'\",1);\n\n\n // NO. Write module name to the database for the bLists\n foreach(array('zzz_units'=> 'u',\n\t\t'zzz_lists'=> 'l',\n\t\t) as $t=>$prefix){\n\n if (myPear_db()->columnExists(\"${prefix}_module\",$t)){\n myPear_db()->query(\"ALTER TABLE `$t` DROP `${prefix}_module`\");\n myPear_db()->reset_cache();\n }\n }\n \n // Upgrade Organozation\n if (!myPear_db()->columnExists('org_roles','zzz_organizations')){\n myPear_db()->qquery(\"ALTER TABLE `zzz_organizations` ADD `org_roles` VARCHAR(240) NOT NULL AFTER `org_theme`\",1); \n myPear_db()->reset_cache();\n }\n\n // Keep u_name\n $type = myPear_db()->getColumnType('zzz_units','u_rank');\n if (strToLower($type) != 'int'){\n myPear_db()->qquery(\"ALTER TABLE `zzz_units` CHANGE `u_rank` `u_rank` INT NOT NULL\"); \n }\n\n myPear_db()->qquery(\"UPDATE zzz_lists SET l_class = 'bList_eaEmpRecords' WHERE l_class = 'bList_ea'\",1);\n foreach(array('zzz_units'=>array(//'u_name',\n\t\t\t\t //'u_member_title',\n\t\t\t\t ),\n\t\t'zzz_lists'=>array('l_rank',\n\t\t\t\t //'l_name',\n\t\t\t\t //'l_member_title',\n\t\t\t\t )) as $t=>$ff){\n foreach($ff as $f)\n if (myPear_db()->columnExists($f,$t)) myPear_db()->query(\"ALTER TABLE `$t` DROP `$f`\");\n }\n myPear_db()->reset_cache();\n}", "private function normalize()\n {\n $field_id = isset($this->columns[0]) ? $this->columns[0] : 'id';\n\n $field_text = isset($this->columns[1]) ? $this->columns[1] : $field_id;\n\n $groups = [];\n\n $has_empty_groups = false;\n\n foreach ($this->data as $key => $datum) {\n $has_empty_groups = !is_numeric($key);\n }\n\n foreach ($this->data as $key => $datum) {\n if (is_array($datum) && isset($datum['id']) && isset($datum['text'])) {\n $this->push($datum);\n\n continue;\n }\n\n if (is_numeric($key)) {\n if (is_string($datum)) {\n $datum = [$datum];\n }\n\n $id = multi_dot_call($datum, $field_id);\n $id = $id === null ? (string) multi_dot_call($datum, '0') : (string) $id;\n\n $text = multi_dot_call($datum, $field_text);\n if (is_array($text)) {\n $lang = App::getLocale();\n $text = $text[$lang] ?? implode($this->separator, $text);\n }\n $text = $text === null ? (string) multi_dot_call($datum, '0') : (string) $text;\n\n if ($id && $text) {\n $text = $id . \") \" . $text;\n }\n\n foreach (array_slice($this->columns, 2) as $part) {\n $t = multi_dot_call($datum, $part);\n if ($t) {\n $text .= $this->separator.$t;\n }\n }\n\n $item = ['id' => $id, 'text' => $text];\n\n if ($id == $this->value) {\n $item['selected'] = true;\n }\n\n if (!$has_empty_groups) {\n $this->push($item);\n } else {\n $groups['Other'][] = $item;\n }\n } else {\n $groups[ucfirst($key)] = $datum;\n }\n }\n\n foreach ($groups as $group_name => $group) {\n $this->push([\n 'text' => $group_name,\n 'children' => collect($group)->map(function ($datum) use ($field_id, $field_text) {\n if (is_string($datum)) {\n $datum = [$field_id => $datum, $field_text => $datum];\n }\n\n $id = (string) multi_dot_call($datum, $field_id);\n\n $text = (string) multi_dot_call($datum, $field_text);\n\n foreach (array_slice($this->columns, 2) as $part) {\n $t = multi_dot_call($datum, $part);\n\n if ($t) {\n $text .= ' '.$t;\n }\n }\n\n $item = ['id' => $id, 'text' => $text];\n\n if ($id == $this->value) {\n $item['selected'] = true;\n }\n\n return $item;\n })->toArray()\n ]);\n }\n }", "protected function changeContainerType($mapping = array())\n {\n $defaults = array(\n 'CType' => \"gridelements_pi1\",\n 'tx_gridelements_backend_layout' => 1,\n );\n $where = \"CType = 'multicolumn'\";\n\n if (empty($mapping)) {\n $this->execUpdate($where, $defaults);\n } else {\n $meVars = $this->getMultiColumnElementsGroupedByConfigurationType();\n $groupedEltIds = $meVars['groupedTtContentIds'];\n $keys = array_keys($mapping);\n $i = 0;\n foreach ($groupedEltIds as $idGroup) {\n $layout = $defaults['tx_gridelements_backend_layout'];\n\t\t\t\tif ((in_array($i, $keys) && !empty($mapping[$i]))) {\n $layout = (string) $mapping[$i];\n\t\t\t\t}\n $fieldValues = array(\n 'CType' => \"gridelements_pi1\",\n 'tx_gridelements_backend_layout' => $layout,\n );\n $andWhere = $where . \" AND uid IN ('\"\n . implode('\\', \\'', $idGroup) . \"')\";\n $this->execUpdate($andWhere, $fieldValues);\n ++$i;\n }\n }\n $this->results['changeContainerType'] = true;\n }", "function transform_grouping_header_label($grouping_current, $grouping, $datum, $export_format) {\n global $SESSION, $CURMAN;\n\n if ($grouping->field == 'curriculum.id') {\n /**\n * Curriculum grouping - display the curriculum name or a default\n * if none\n */\n\n //get the curriculum id from the current grouping info\n $curriculumid = $grouping_current['curriculum.id'];\n\n if (empty($curriculumid)) {\n //default label\n return array(\n $this->add_grouping_header($grouping->label,\n get_string('non_curriculum_courses',\n 'rlreport_course_completion_by_cluster'),\n $export_format));\n } else {\n //actually have a curriculum, so display it\n $curriculum_name = get_field('crlm_curriculum', 'name', 'id', $curriculumid);\n\n $completed_description = '';\n if ($datum->completed) {\n //flag the curriculum as complete and show the completion date\n $a = $this->format_date($datum->curriculumcompletetime);\n $completed_description = get_string('completed_yes', 'rlreport_course_completion_by_cluster', $a);\n } else {\n //flag the curriculum as incomplete\n $completed_description = get_string('completed_no', 'rlreport_course_completion_by_cluster');\n }\n\n return array(\n $this->add_grouping_header($grouping->label,\n $curriculum_name.' '.$completed_description,\n $export_format));\n }\n } else if ($grouping->field == 'cluster.id') {\n /**\n * Cluster grouping - display the hierarchy of clusters\n */\n\n //get the current (new) cluster id\n $clusterid = $grouping_current[$grouping->field];\n $cluster = new cluster($clusterid);\n\n $result = array();\n\n //build the hierarchy bottom-up based on the supplied cluster\n $current_cluster_hierarchy = array();\n\n while ($cluster->id != 0) {\n $current_cluster_hierarchy[] = $cluster->id;\n $result[] = $this->add_grouping_header($grouping->label,\n $cluster->name,\n $export_format);\n $cluster = new cluster($cluster->parent);\n }\n\n //really need it top-down for comparison\n $current_cluster_hierarchy = array_reverse($current_cluster_hierarchy);\n\n //find the first position where the old and new hieararchies differ\n $final_pos = -1;\n for ($i = 0; $i < count($this->last_cluster_hierarchy) && $i < count($current_cluster_hierarchy); $i++) {\n if ($this->last_cluster_hierarchy[$i] != $current_cluster_hierarchy[$i]) {\n $final_pos = $i;\n break;\n }\n }\n\n //default to next level down\n if ($final_pos == -1) {\n $final_pos = max(count($this->last_cluster_hierarchy), count($current_cluster_hierarchy)) - 1;\n }\n\n //store for next iteration\n $this->last_cluster_hierarchy = $current_cluster_hierarchy;\n\n $result = array_reverse($result);\n\n /**\n * Get the listing of cluster leaders\n */\n $preferences = php_report_filtering_get_user_preferences('course_completion_by_cluster');\n if (isset($preferences['php_report_course_completion_by_cluster/clusterrole'])) {\n\n //context to check for role assignments\n $cluster_context_level = context_level_base::get_custom_context_level('cluster', 'block_curr_admin');\n\n //query to retrieve users directly assigned the configured role in the current cluster\n $sql = \"SELECT u.*\n FROM\n {$CURMAN->db->prefix_table('user')} u\n JOIN {$CURMAN->db->prefix_table('role_assignments')} ra\n ON u.id = ra.userid\n AND ra.roleid = {$preferences['php_report_course_completion_by_cluster/clusterrole']}\n JOIN {$CURMAN->db->prefix_table('context')} ctxt\n ON ra.contextid = ctxt.id\n AND ctxt.instanceid = {$datum->cluster}\n AND ctxt.contextlevel = {$cluster_context_level}\";\n\n $display = '';\n\n //append all the names together if there are multiple\n if ($recordset = get_recordset_sql($sql)) {\n while ($record = rs_fetch_next_record($recordset)) {\n if ($display == '') {\n $display = fullname($record);\n } else {\n $display .= ', '.fullname($record);\n }\n }\n }\n\n if ($display == '') {\n //no names found\n $display = get_string('na', 'rlreport_course_completion_by_cluster');\n }\n\n //add a header entry\n $cluster_leader_label = get_string('cluster_leaders', 'rlreport_course_completion_by_cluster').' ';\n $result[] = $this->add_grouping_header($cluster_leader_label, $display, $export_format);\n }\n\n //return the labels in top-down order\n return $result;\n } else {\n return array(\n $this->add_grouping_header($grouping->label,\n $grouping_current[$grouping->field],\n $export_format));\n }\n }", "public function Refresh($blnReload = false) {\n\t\t\tif ($blnReload)\n\t\t\t\t$this->objGroupCategory->Reload();\n\n\t\t\tif ($this->lstGroup) {\n\t\t\t\t\t$this->lstGroup->RemoveAllItems();\n\t\t\t\tif (!$this->blnEditMode)\n\t\t\t\t\t$this->lstGroup->AddItem(QApplication::Translate('- Select One -'), null);\n\t\t\t\t$objGroupArray = Group::LoadAll();\n\t\t\t\tif ($objGroupArray) foreach ($objGroupArray as $objGroup) {\n\t\t\t\t\t$objListItem = new QListItem($objGroup->__toString(), $objGroup->Id);\n\t\t\t\t\tif (($this->objGroupCategory->Group) && ($this->objGroupCategory->Group->Id == $objGroup->Id))\n\t\t\t\t\t\t$objListItem->Selected = true;\n\t\t\t\t\t$this->lstGroup->AddItem($objListItem);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->lblGroupId) $this->lblGroupId->Text = ($this->objGroupCategory->Group) ? $this->objGroupCategory->Group->__toString() : null;\n\n\t\t\tif ($this->calDateRefreshed) $this->calDateRefreshed->DateTime = $this->objGroupCategory->DateRefreshed;\n\t\t\tif ($this->lblDateRefreshed) $this->lblDateRefreshed->Text = sprintf($this->objGroupCategory->DateRefreshed) ? $this->objGroupCategory->__toString($this->strDateRefreshedDateTimeFormat) : null;\n\n\t\t\tif ($this->txtProcessTimeMs) $this->txtProcessTimeMs->Text = $this->objGroupCategory->ProcessTimeMs;\n\t\t\tif ($this->lblProcessTimeMs) $this->lblProcessTimeMs->Text = $this->objGroupCategory->ProcessTimeMs;\n\n\t\t}", "public function set_import_group ($vendor_id, $new_import_group_id)\n\t{\n\t\t// Change working import group\n\t\t$this->db->set('import_group_id', $new_import_group_id);\n\t\t\n\t\t// Set the last_update timestamp\n\t\t$this->db->set('last_update', time());\n\t\t\n\t\t// Conditions\n\t\t$this->db->where('id', $vendor_id);\n\t\t\n\t\t// Perform an update\n\t\t$this->db->update('vendors');\n\t}", "public function refreshListTable()\n {\n $this->listWidget->prepareVars();\n\n $data = [\n 'componentOptions' => $this->options,\n 'listWidget' => $this->listWidget\n ];\n\n $assets = $this->listWidget->getAssetPaths();\n\n $this->listWidget->alias = $this->alias;\n\n $this->defaultSuffix = 'pc-table';\n\n return [ 'X_OCTOBER_ASSETS' => $assets, '#'.$this->getDivId() => $this->makePartial('list_table', $data)];\n }", "function acf_upgrade_500_field_groups()\n{\n}", "public function flush_group($group)\n {\n }", "public function setGroups(?int $value): void {\n $this->getBackingStore()->set('groups', $value);\n }", "public function updateSource() {\n if (!empty($this->imported)) {\n $data = $this->source->data;\n if (empty($data)) {\n $data = array();\n }\n foreach ($this->imported as $key) {\n $data[] = $key;\n }\n $this->source->data = $data;\n $this->source->last_updated = date('Y-m-d H:i:s', strtotime('now'));\n $this->source->save();\n $this->imported = array();\n }\n }", "public function createList(Request $request) {\n try {\n $rows = $request->data;\n foreach($rows as $item) {\n $is_main_group = ($item['is_main_group'] == 'TAK');\n\n if (!$is_main_group)\n continue;\n\n $assortment_group_count = AssortmentGroup::where('name', '=', $item['name'])->count();\n\n if ($assortment_group_count == 0) {\n $assortment_group = new AssortmentGroup();\n $assortment_group->name = $item['name'];\n $assortment_group->is_main_group = $is_main_group;\n $assortment_group->main_group = 0;\n $assortment_group->code = $item['code'];\n $assortment_group->description = $item['description'];\n $assortment_group->service_demand = $this->fixNumberType($item['service_demand']);\n $assortment_group->refill_cycle_time = $this->fixNumberType($item['refill_cycle_time']);\n $assortment_group->cycle_time_deviations = $this->fixNumberType($item['cycle_time_deviations']);\n $assortment_group->inventory_cost_factor = $this->fixNumberType($item['inventory_cost_factor']);\n $assortment_group->save();\n } else {\n AssortmentGroup::where('name', '=', $item['name'])->update([\n 'is_main_group' => $is_main_group,\n 'main_group' => 0,\n 'code' => $item['code'],\n 'description' => $item['description'],\n 'service_demand' => $this->fixNumberType($item['service_demand']),\n 'refill_cycle_time' => $this->fixNumberType($item['refill_cycle_time']),\n 'cycle_time_deviations' => $this->fixNumberType($item['cycle_time_deviations']),\n 'inventory_cost_factor' => $this->fixNumberType($item['inventory_cost_factor'])\n ]);\n }\n }\n\n foreach($rows as $item) {\n $is_main_group = ($item['is_main_group'] == 'TAK');\n\n if ($is_main_group)\n continue;\n\n $main_group_id = AssortmentGroup::where('name', '=', $item['main_group_name'])->first()->id;\n $assortment_group_count = AssortmentGroup::where('name', '=', $item['name'])->count();\n\n if ($assortment_group_count == 0) {\n $assortment_group = new AssortmentGroup();\n $assortment_group->name = $item['name'];\n $assortment_group->is_main_group = $is_main_group;\n $assortment_group->main_group = $main_group_id;\n $assortment_group->code = $item['code'];\n $assortment_group->description = $item['description'];\n $assortment_group->service_demand = $this->fixNumberType($item['service_demand']);\n $assortment_group->refill_cycle_time = $this->fixNumberType($item['refill_cycle_time']);\n $assortment_group->cycle_time_deviations = $this->fixNumberType($item['cycle_time_deviations']);\n $assortment_group->inventory_cost_factor = $this->fixNumberType($item['inventory_cost_factor']);\n $assortment_group->save();\n } else {\n AssortmentGroup::where('name', '=', $item['name'])->update([\n 'is_main_group' => $is_main_group,\n 'main_group' => $main_group_id,\n 'code' => $item['code'],\n 'description' => $item['description'],\n 'service_demand' => $this->fixNumberType($item['service_demand']),\n 'refill_cycle_time' => $this->fixNumberType($item['refill_cycle_time']),\n 'cycle_time_deviations' => $this->fixNumberType($item['cycle_time_deviations']),\n 'inventory_cost_factor' => $this->fixNumberType($item['inventory_cost_factor'])\n ]);\n }\n }\n\n return response()->json([\n 'code' => SUCCESS_CODE,\n 'message' => IMPORT_SUCCESS,\n ]);\n } catch (Exception $e) {\n return response()->json([\n 'code' => SERVER_ERROR_CODE,\n 'message' => SERVER_ERROR_MESSAGE\n ]);\n }\n }", "public function setGroups(?array $value): void {\n $this->getBackingStore()->set('groups', $value);\n }", "protected function getGroupList() {}", "protected function getGroupList() {}", "public function changeUserGroup()\n {\n $userId = $this->request->variable('user_id',0);\n $groupId = $this->request->variable('group_id',9999);\n\n if($userId === 0 || $groupId === 9999)\n {\n $this->sendResponse([\n 'status' => 'failed',\n 'message' => 'Invalid data supplied',\n 'error' => ['User ID was not supplied']\n ]);\n }\n\n /**\n * Group IDs\n * 5 - ADMIN\n * 4 - GLOBAL MOD\n * 2 - REGISTERED\n */\n $arrGroups = group_memberships(false, [$userId]);\n\n $arrCurrentGroupIds = [];\n\n // Get the user's current groups\n foreach($arrGroups as $group)\n {\n $arrCurrentGroupIds[$group['group_id']] = $group['group_id'];\n }\n\n // If the new group is 'registered user' we need to remove the user from\n // any admin or moderator groups they were previously in\n if($groupId < 4)\n {\n // User was an admin - remove them from the admin group\n if(in_array(5,$arrCurrentGroupIds))\n {\n group_user_del(5,[$userId]);\n }\n\n // User was a global mod - remove them from the global mod group\n if(in_array(4,$arrCurrentGroupIds))\n {\n group_user_del(4,[$userId]);\n }\n }\n\n // If the user is being made an admin, make sure they are a global mod too\n if($groupId == 5 AND !in_array(4,$arrCurrentGroupIds))\n {\n group_user_add(4, [$userId],false, false, false);\n }\n\n // User could already have the group they need if they are\n // being downgraded. Check if they have the group and\n // if not, add them. If they were, then make it the default\n if(!in_array($groupId,$arrCurrentGroupIds))\n {\n group_user_add($groupId, [$userId],false, false, true);\n }\n else\n {\n group_set_user_default($groupId,[$userId]);\n }\n\n // Send success response\n $this->sendResponse([\n 'status' => 'success',\n 'message' => 'phpBB user\\'s group was updated',\n 'data' => [\n 'user_id' => $userId,\n 'group_id' => $groupId\n ]\n ]);\n }", "public function update() {\r\n\r\n // Does the Group object have an id?\r\n if ( is_null( $this->id ) ) trigger_error ( \"Group::update(): Attempt to update a Group object that does not have its ID property set.\", E_USER_ERROR );\r\n \r\n // Update the Group\r\n $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD ); \r\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\r\n $sql = \"UPDATE \" . DB_PREFIX . \"groups SET title = :title, dashboard = :dashboard, content = :content, themes = :themes, files = :files, settings = :settings, users = :users, status = :status WHERE id = :id\";\r\n \r\n $st = $conn->prepare ( $sql );\r\n $st->bindValue( \":title\", $this->title, PDO::PARAM_STR );\r\n $st->bindValue( \":dashboard\", $this->dashboard, PDO::PARAM_INT );\r\n $st->bindValue( \":content\", $this->content, PDO::PARAM_INT );\r\n $st->bindValue( \":themes\", $this->themes, PDO::PARAM_INT );\r\n $st->bindValue( \":files\", $this->files, PDO::PARAM_INT );\r\n $st->bindValue( \":settings\", $this->settings, PDO::PARAM_INT );\r\n $st->bindValue( \":users\", $this->users, PDO::PARAM_INT );\r\n $st->bindValue( \":status\", $this->status, PDO::PARAM_INT );\r\n $st->bindValue( \":id\", $this->id, PDO::PARAM_INT );\r\n $st->execute();\r\n \r\n $conn = null;\r\n \r\n }", "public function afterUpdate(&$lstNewRecords){\n }", "function olc_set_groups($categories_id,$shops) {\n\t$products_query=olc_db_query(\"SELECT products_id FROM \".TABLE_PRODUCTS_TO_CATEGORIES.\"\n\twhere categories_id='\".$categories_id.APOS);\n\twhile ($products=olc_db_fetch_array($products_query)) {\n\t\tolc_db_query(SQL_UPDATE.TABLE_PRODUCTS.\" SET group_ids='\".$shops.\"'\n\t\twhere products_id='\".$products['products_id'].APOS);\n\t}\n\t// set status of categorie\n\tolc_db_query(SQL_UPDATE . TABLE_CATEGORIES . \" set group_ids = '\".$shops.\"'\n\twhere categories_id = '\" . $categories_id . APOS);\n\t// look for deeper categories and go rekursiv\n\t$categories_query=olc_db_query(\"SELECT categories_id FROM \".TABLE_CATEGORIES.\"\n\twhere parent_id='\".$categories_id.APOS);\n\twhile ($categories=olc_db_fetch_array($categories_query)) {\n\t\tolc_set_groups($categories['categories_id'],$shops);\n\t}\n\n}", "public function testRenameGroup(){\n jAcl2DbUserGroup::updateGroup(self::$grpId3, 'newgroup3');\n self::$groups[2]['name']='newgroup3';\n $this->assertTableContainsRecords('jacl2_group', self::$groups);\n }", "public function testSaveLanguageGroupMethod() {\n foreach ($this->testCases['LanguageGroup'] as $key => $testCase) {\n $langGroup = new LanguageGroup ();\n $langGroup->setGroupName($testCase['group_name']);\n\n $this->localizationDao = $this->getMock('LocalizationDao');\n $this->localizationDao->expects($this->once())\n ->method('addLanguageGroup')\n ->will($this->returnValue($langGroup));\n\n $this->locaizationService->setLocalizationDao($this->localizationDao);\n\n $result = $this->locaizationService->saveLanguageGroup($langGroup);\n $this->assertTrue($result instanceof LanguageGroup);\n $this->assertEquals($langGroup, $result);\n }\n }", "abstract protected function _buildGroupBy( $group );", "public function add_list_to_table($list){\n\t\t$query = \"SELECT $this->column_name FROM \" . $this->table;\n\t\t$list = commas_to_array($list);\n\t\t$just_added = array();\n\t\tif($old_list = Database::get_results_as_numerical_array($query, $this->column_name)){\n\t\t\t//var_dump($old_list); echo \"<br>\";\n\t\t\t\n\t\t\tforeach($list as $list_item){\n\t\t\t\t\n\t\t\t\tif(!in_array($list_item, $old_list) &&\n\t\t\t\t !in_array($list_item, $just_added)){\n\t\t\t\t\t$this->add_to_table($list_item);\n\t\t\t\t\t$just_added[] = $list_item;\n\t\t\t\t}\n\t\t\t}\n\t\t}else{ //if there is nothing in the organizations table\n\t\t\tforeach($list as $list_item){\n\t\t\t\tif(!in_array($list_item, $just_added)){\n\t\t\t\t\t$this->add_to_table($list_item);\n\t\t\t\t\t$just_added[] = $list_item;\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t}", "function Inscription_Handle_Collaborations_Group($group)\n {\n if (empty($group)) { $group=\"Collaborations\"; }\n \n if (empty($this->ItemDataSGroups[ $group ]))\n {\n $this->ItemDataSGroups[ $group ]=\n $this->ReadPHPArray(\"System/Inscriptions/SGroups.\".$group.\".php\");\n }\n\n return $group;\n }", "function update_assigned_data() {\r\n global $wpdb;\r\n $data = '';\r\n if( isset($_POST['datatype']) && !empty($_POST['datatype']) && isset($_POST['current_page']) && !empty($_POST['current_page']) ) {\r\n $current_page = $_POST['current_page'];\r\n $datatype = $_POST['datatype'];\r\n switch( $current_page ) {\r\n case 'wpclients_groups':\r\n if( isset($_POST['id']) && !empty($_POST['id']) && isset($_POST['data']) ) {\r\n $id = $_POST['id'];\r\n $wpdb->query( $wpdb->prepare( \"DELETE FROM {$wpdb->prefix}wpc_client_group_clients WHERE group_id = %d\", $id ) );\r\n if( 'all' == $_POST['data'] ) {\r\n $not_approved_clients = get_users( array( 'role' => 'wpc_client', 'meta_key' => 'to_approve', 'fields' => 'ID', ) );\r\n //all clients\r\n $args = array(\r\n 'role' => 'wpc_client',\r\n 'exclude' => $not_approved_clients,\r\n 'fields' => array( 'ID' ),\r\n );\r\n\r\n $clients = get_users( $args );\r\n\r\n foreach ( $clients as $client ) {\r\n //$data .= '#'.$client->ID.\",\";\r\n $wpdb->query( $wpdb->prepare( \"INSERT INTO {$wpdb->prefix}wpc_client_group_clients SET group_id = %d, client_id = '%d'\", $id, $client->ID ) );\r\n }\r\n } else {\r\n if(!empty($_POST['data'])) {\r\n $data = explode(',', $_POST['data']);\r\n } else {\r\n $data = array();\r\n }\r\n foreach ( $data as $data_item ) {\r\n $wpdb->query( $wpdb->prepare( \"INSERT INTO {$wpdb->prefix}wpc_client_group_clients SET group_id = %d, client_id = '%d'\", $id, $data_item ) );\r\n }\r\n }\r\n }\r\n break;\r\n }\r\n } else {\r\n echo json_encode(array('status' => false, 'message' => 'Wrong update data.'));\r\n }\r\n exit;\r\n }", "function generate_formats_list(){\n\t\t$todo = array();\n\t\t$used = array();\n//var_dump($this->todo_groups);\n\t\t//calculating formats\n\t\tforeach ($this->todo_groups as $group_name => $value) {\n\t\t\t$group_process_name = 'pa_' . $group_name . '_format';\n\t\t\t$pa_class_name = '\\gcalc\\pa\\\\' . 'pa_' . $group_name . '_format'; //format process class name\t\t\t\n\t\t\t\n\t\t\tif ( class_exists( $pa_class_name ) ) {\n\t\t\t\t$new_todo =\n\t\t\t\t\t\tnew $pa_class_name( $this->bvars, $this->product_id, $this, array( $group_name, $group_process_name ) );\t\t\t\n\t\t\t} else {\n\t\t\t\t$pa_class_name = '\\gcalc\\pa\\\\pa_format'; //format process class name\n\t\t\t\tif ( class_exists( $pa_class_name ) ) {\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$new_todo =\n\t\t\t\t\t\tnew $pa_class_name( $this->bvars, $this->product_id, $this, array( $group_name, $group_process_name ) );\t\t\t\t\n\t\t\t\t\t} \n\t\t\t}\n\t\t\t$todo[ $group_process_name ] = $new_todo;\n\t\t\tif ( !$new_todo->ok() ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$done_process_total = $new_todo->do__();\n\n\t\tif ( $done_process_total instanceof \\gcalc\\error ) {\n\t\t\t$this->get_errors()->add( $done_process_total );\n\t\t\treturn false;\n\t\t}\n\n\t\t\tarray_push( $this->done, $done_process_total );\n\t\t\tarray_push( $used, $group_process_name );\n\t\t\t\n\t\t}\n\n\t\t$this->todo->set_plist( $todo );\t\t\t\t\n\t\treturn $todo;\n\t}", "public function format()\n {\n $result = array();\n\n foreach ($this->groups as $group) {\n $result[] = array(\n 'id' => $group->getInternalId(),\n 'external_id' => $group->getExternalId(),\n 'value' => $group->getName(),\n 'label' => $group->getName(),\n );\n }\n\n return $result;\n }", "public function update(Group $root);", "public function updateColumnForFormatAction()\n\t{\n\t\t$searchColumns = new Model_Table_SearchColumns();\n\t\t$columnId = $searchColumns->getColumnIdFromTypeAndValue(\n\t\t\t\t$this->_request->getParam('type_id'),\n\t\t\t\t$this->_request->getParam('columnValue')\n\t\t);\n\t\t$searchFormatColumns = new Model_Table_SearchFormatColumns();\n\t\t$searchFormatColumns->updateColumnForFormat(\n\t\t\t\t$this->_request->getParam('format_id'),\n\t\t\t\t$columnId,\n\t\t\t\tsubstr($this->getRequest()->getParam('column'), -1, 1)\n\t\t);\n\t\techo Zend_Json::encode(array('success' => 1));\n\t\texit;\n\t}", "public function change()\n {\n $this->insert('permission_group',[\n 'permission_group_id'=>17,\n 'group'=>'Video Library',\n 'sort_order'=>'17'\n ]);\n\n\n $this->insert('permission',[\n [\n 'permission_id'=>137,\n 'permission'=>'view_videos',\n 'path'=>'video/index',\n 'permission_group_id'=>17\n ],\n [\n 'permission_id'=>138,\n 'permission'=>'add_video',\n 'path'=>'video/add',\n 'permission_group_id'=>17\n ],\n [\n 'permission_id'=>139,\n 'permission'=>'edit_video',\n 'path'=>'video/edit',\n 'permission_group_id'=>17\n ],\n [\n 'permission_id'=>140,\n 'permission'=>'delete_video',\n 'path'=>'video/delete',\n 'permission_group_id'=>17\n ],\n [\n 'permission_id'=>141,\n 'permission'=>'play_video',\n 'path'=>'video/play',\n 'permission_group_id'=>17\n ],\n [\n 'permission_id'=>142,\n 'permission'=>'view_video_space',\n 'path'=>'video/disk',\n 'permission_group_id'=>17\n ]\n\n\n ]) ;\n\n $rowset = $this->query(\"SELECT * FROM permission where permission_id > 136\");\n foreach($rowset as $row){\n\n $rowset2 = $this->query(\"SELECT * FROM role where role_id < 4\");\n foreach($rowset2 as $row2){\n $this->insert('role_permission',[\n [\n 'role_id'=>$row2['role_id'],\n 'permission_id'=>$row['permission_id']\n ]\n ]);\n }\n\n }\n }" ]
[ "0.5567111", "0.5210176", "0.50419265", "0.50071144", "0.49283427", "0.49266818", "0.49187356", "0.48852304", "0.48681566", "0.48593745", "0.4774165", "0.46699855", "0.46640554", "0.46598205", "0.4658053", "0.46376052", "0.4626412", "0.45963508", "0.4594862", "0.45842382", "0.4571541", "0.45674095", "0.45643857", "0.45627576", "0.4554827", "0.45435712", "0.45392892", "0.4539181", "0.45306167", "0.45172295", "0.45090085", "0.45058724", "0.4499344", "0.4464203", "0.4461648", "0.4438872", "0.4432011", "0.44207773", "0.44188142", "0.4402967", "0.44018665", "0.4389843", "0.4373137", "0.43730617", "0.43649793", "0.4361983", "0.4359014", "0.4349701", "0.43396804", "0.4326842", "0.43248045", "0.43202087", "0.43191817", "0.43048546", "0.4263217", "0.42627364", "0.42582804", "0.42549762", "0.42435387", "0.4235742", "0.42259845", "0.42151347", "0.42131066", "0.42129675", "0.42087945", "0.42082238", "0.4198216", "0.41933072", "0.41823426", "0.41817772", "0.41782612", "0.41772136", "0.41690066", "0.41622418", "0.41613185", "0.412134", "0.4120754", "0.41187117", "0.41165408", "0.41107175", "0.410918", "0.41087806", "0.4108651", "0.4107082", "0.41068387", "0.41068387", "0.41066915", "0.4106148", "0.41047612", "0.41025606", "0.40989798", "0.40983894", "0.40980092", "0.4097102", "0.40949863", "0.4094041", "0.4093514", "0.40934825", "0.40918875", "0.40913656", "0.40898287" ]
0.0
-1
Delete conversion group for list table.
public static function delete_conversion( $conversion_id ) { global $wpdb; $return_data = false; if ( isset( $conversion_id ) && ! empty( $conversion_id ) ) { $id = $conversion_id; $deleted = $wpdb->delete( self::$table_conversion_data, array( 'id' => $id, ) ); if ( false === $deleted ) { // There is an error. } else { $return_data = true; } } return $return_data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function delete() {\n\t\t$sql = \"DELETE FROM umgroup\n\t\t\t\tWHERE GpID=?\";\n\t\t\n\t\t \n\t\t$this->ums->query($sql, array($this->GpID));\n\n\t}", "public function deleteTemplateGroup()\n\t{\n\t\tforeach( \\IPS\\cms\\Templates::$databaseDefaults as $field => $template )\n\t\t{\n\t\t\t\\IPS\\Db::i()->update( 'cms_databases', array( 'database_template_' . $field => $template ), array( 'database_template_' . $field . ' =?', \\IPS\\Request::i()->group ) );\n\t\t}\n\t\n\t\t\\IPS\\Db::i()->delete( 'cms_templates', array( 'template_location=? and template_group=?', 'database', \\IPS\\Request::i()->group ) );\n\t\t\n\t\tunset( \\IPS\\Data\\Store::i()->cms_databases );\n\t\t\n\t\t\\IPS\\Output::i()->redirect( \\IPS\\Http\\Url::internal( 'app=cms&module=pages&controller=templates' . ( isset( \\IPS\\Request::i()->t_location ) ? '&t_location=' . \\IPS\\Request::i()->t_location : '' ) ), 'deleted' );\n\t}", "public function delete() {\n\t\t// Delete passwords and all ssl data of this group\n\t\t$passwordList = $this->getPasswordList();\n\t\t$passwordList->deleteListItems();\n\n\t\t// Delete members from group\n\t\t$memberList = $this->getMemberList();\n\t\t$memberList->deleteListItems();\n\n\t\t// Delete group\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_DELETEquery(\n\t\t\t'tx_passwordmgr_group',\n\t\t\t'uid='.$GLOBALS['TYPO3_DB']->fullQuoteStr($this['uid'], 'tx_passwordmgr_group')\n\t\t);\n\t\t$this->checkAffectedRows('deleteGroup', 1);\n\t\ttx_passwordmgr_helper::addLogEntry(1, 'deleteGroup', 'Removed group '.$this['uid']);\n\t}", "public function delete(){\n\t\t$db = new Database();\n\t\t$sql = \"DELETE FROM reportKinds WHERE id=?\";\n\t\t$sql = $db->prepareQuery($sql, $this->id);\n\t\t$db->query($sql);\n\t}", "function _deleteGroup()\n\t{\n\t\t// Get the informations\n\t\t$group = kform::getInput('group');\n\t\tlist($drawId, $groupname) = explode(';', $group);\n\n\t\t// Delete the draws\n\t\t$oGroup = new objgroup();\n\t\t$oGroup->deleteGroup($drawId, $groupname);\n\t\t$page = new utPage('none');\n\t\t$page->close(true, 'draws', DRAW_DISPLAY , $drawId);\n\t\texit();\n\t}", "public function DeleteGroupAssessmentList() {\n\t\t\t$this->objGroupAssessmentList->UnassociateAllUsersAsAssessmentManager();\n\t\t\t$this->objGroupAssessmentList->Delete();\n\t\t}", "public function phrase_delete_group()\n {\n $group_id = ee()->input->get('phrase_group_id', TRUE);\n $groups = array('' => '- Select -');\n\n foreach (ee()->publisher_phrase->get_groups() as $id => $group)\n {\n if ($group_id != $id)\n {\n $groups[$id] = $group->group_label;\n }\n }\n\n $vars = array(\n 'group_name' => ee()->publisher_phrase->get_group($group_id)->group_label,\n 'groups' => $groups,\n 'hidden' => array('group_id' => $group_id),\n 'delete_url' => ee()->publisher_helper_cp->mod_link('phrase_delete_group_execute', array(), TRUE),\n );\n\n return ee()->load->view('phrase/delete_group', $vars, TRUE);\n }", "public function deleteConnectionWithGroup(){\n $respondent = $this->id;\n $table = 'tbl_link_users_group_respondents';\n $sql = 'DELETE FROM '.$table.' WHERE respondents_id=:respondent';\n $command = Yii::app()->db->createCommand($sql);\n $command->bindParam(\":respondent\", $respondent);\n $command->execute();\n }", "public function testDeleteRuleGroups()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function deletegroupAction()\n {\n \t$this->_helper->viewRenderer->setNoRender();\n \t\n \t$group = GroupNamespace::getCurrentGroup();\n \tif (isset($group))\n \t{\n \t\tGroupDAO::getGroupDAO()->deleteGroup($group);\n \t}\n \tGroupNamespace::clearCurrentGroup();\n \t$this->_helper->redirector('index', 'user');\n }", "public function delete_field_group($field_group)\n {\n }", "private function deleteFromGroup(array $idlist) {\n $query = \"\n DELETE tags_group\n WHERE tag_id IN (#list#)\";\n $ok = $this->db->query($query, array('list' => $idlist));\n\n return $ok;\n }", "static function clearGroup( $table='mapGroup' ) {\n $sql = \"DROP TABLE IF EXISTS {$table}\";\n return $sql;\n }", "public function testDeleteGroup()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "function delGroupHandler() {\n global $inputs;\n\n $sql = \"delete from `group` where id = \" . $inputs['id'];\n execSql($sql);\n\n formatOutput(true, 'delete success');\n}", "public static function clearout($group_list, $self_id) {\n\t\t$arr = [];\n\t\tforeach ($group_list as $value) {\n\t\t\t$arr[] = $value['group_id'];\n\t\t}\n\t\t$sus = implode(',', $arr);\n\t\t$arr2 = \\app\\v1\\model\\GroupInfoModel::api_release($sus);\n\t\t$arr3 = [];\n\t\tforeach ($arr2 as $value) {\n\t\t\t$arr3[] = $value['group_id'];\n\t\t}\n\t\t$group_ids = implode(',', $arr3);\n\t\tdump($arr2);\n//\t\t\\think\\Db::startTrans();\n//\t\t\\app\\v1\\model\\GroupMemberModel::api_deletes($group_ids);\n//\t\t\\app\\v1\\model\\GroupFunctionOpenModel::api_deletes($group_ids);\n//\t\t\\app\\v1\\model\\GroupKickModel::api_deletes($group_ids);\n//\t\t\\app\\v1\\model\\GroupRecieveModel::api_deletes($group_ids);\n//\t\t\\app\\v1\\model\\GroupRequestModel::api_deletes($group_ids);\n//\t\t\\app\\v1\\model\\GroupSendModel::api_deletes($group_ids);\n//\t\t\\app\\v1\\model\\GroupSignModel::api_deletes($group_ids);\n//\t\t\\app\\v2\\model\\GroupTagModel::api_deletes($group_ids);\n//\t\t\\app\\v1\\model\\GroupBlackListModel::api_deletes($group_ids);\n//\t\t\\app\\v1\\model\\GroupAutoreplyModel::api_deletes($group_ids);\n//\t\t\\app\\v1\\model\\GroupBanModel::api_deletes($group_ids);\n//\t\t\\app\\v1\\model\\GroupBanPermenentModel::api_deletes($group_ids);\n//\t\t\\app\\v1\\model\\GroupInfoModel::api_deletes($group_ids);\n//\t\t\\think\\Db::commit();\n\t\techo 'groupclear';\n\t}", "public function deleteGroup() {\n $errors = $this->checkIsValidForDelete();\n if($errors === false){\n $sql = \"DELETE FROM `SM_GROUP` WHERE sm_idGroup ='$this->idGroup'\";\n if (!($resultado = $this->mysqli->query($sql))) {\n return 'Error in the query on the database';\n } else {\n return true;\n }\n }else{\n return $errors;\n }\n }", "function convertizer_remove() {\ndelete_option('convertizer_data');\n}", "function system_delete_group($paramv)\n{\n}", "function delete() {\n\t \t\n\t \t$sql = \"DELETE FROM evs_database.evs_group (gru_id, gru_name, gru_head_dept,gru_company_id)\n\t \tVALUES(?, ?, ?,?) \n\t\tWHERE gru_id = '$gru_id' \";\n\t\t\n\t \t$this->db->query($sql, array($this->gru_id, $this->gru_name, $this->gru_head_dept ,$this->gru_company_id));\n\t }", "private function deleteGroup()\n {\n try\n {\n $request = $_REQUEST;\n\n if( !isset($request['group_id']) || $request['group_id']==\"\" )\n throw_error_msg(\"group id not provided\");\n \n if( !is_numeric($request['group_id']) )\n throw_error_msg(\"invalid group id\");\n\n $id = (int)$request['group_id'];\n\n if(!userid())\n throw_error_msg(lang(\"you_not_logged_in\"));\n\n global $cbgroup;\n\n $cbgroup->delete_group($id);\n\n if( error() )\n {\n throw_error_msg(error('single')); \n }\n\n if( msg() )\n {\n $data = array('code' => \"200\", 'status' => \"success\", \"msg\" => 'group deleted successfully', \"data\" => array());\n $this->response($this->json($data));\n } \n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage());\n }\n }", "function timeconditions_timegroups_del_group($timegroup) {\n\tglobal $db;\n\n\t$sql = \"delete from timegroups_details where timegroupid = $timegroup\";\n\t$db->query($sql);\n\t$sql = \"delete from timegroups_groups where id = $timegroup\";\n\t$db->query($sql);\n\tneedreload();\n}", "function delete_list($group_ids)\n {\n $this->db->where_in('group_id', $group_ids);\n $success = $this->db->update('groups', array('deleted' => 1));\n return $success;\n }", "public function delete(){\n\t\treturn $this->api->deleteGroup($this->getID());\n\t}", "function acf_delete_json_field_group($key)\n{\n}", "public function DeleteGroupCategory() {\n\t\t\t$this->objGroupCategory->Delete();\n\t\t}", "function delete_group() {\n $this->acl->validate_update();\n\n $where = array(\n 'user_id' => $this->input->post('user_id'),\n 'group_id' => $this->input->post('group_id')\n );\n list($flag, $msg) = $this->m_general->delete('users_group', $where);\n\n return JSONRES($flag, $msg);\n }", "public function delete($group = '', $link = '', $format ='html'){\n echo 'delete menu group or link';\n }", "public function testRemoveGroup(){\n self::$grpId4 = jAcl2DbUserGroup::createGroup('group4');\n $records2 = self::$groups;\n $records2[] = array('id_aclgrp'=>self::$grpId4,\n 'name'=>'group4',\n 'grouptype'=>0,\n 'ownerlogin'=>null);\n $this->assertTableContainsRecords('jacl2_group', $records2);\n\n // destruction d'un groupe (ici qui n'a pas de user)\n jAcl2DbUserGroup::removeGroup(self::$grpId4);\n $this->assertTableContainsRecords('jacl2_group', self::$groups);\n\n }", "function PKG_deletePackagesList($listName)\n{\n\tPKG_savePackagesList($listName,\"\",true);\n}", "public function remove($group)\n {\n }", "public function deleteAnswersConnectionWithGroupQuestions(){\n //Yii::app()->db->createCommand('DELETE FROM `tbl_link_group_questions_answers` WHERE `group_questions_id`=:group')->bindParam(\":group\",$this->id)->execute();\n Yii::app()->db->createCommand()->delete('tbl_link_group_questions_answers', 'answers_id=:id', array(':id'=>$this->id));\n }", "public function delete() {\r\n\t\tif (isset($_POST['id'])) {\r\n\t\t\t$id = (int)$_POST['id'];\r\n\t\t\tif ($id == 1) {\r\n\t\t\t\t$response['success'] = false;\r\n\t\t\t\t$response['msg'] = Yii::t(\"app\",'Cannot delete Group ID = 1');\r\n\t\t\t} else {\r\n\t\t\t\t$sql = sprintf('DELETE FROM %s WHERE %s = %s', MENUGROUP_TABLE, MENUGROUP_ID, $id);\r\n\t\t\t\t$delete = $this->db->Execute($sql);\r\n\t\t\t\tif ($delete) {\r\n\t\t\t\t\t$sql = sprintf('DELETE FROM %s WHERE %s IN (%s)', MENU_TABLE, MENU_GROUP, $id);\r\n\t\t\t\t\t$this->db->Execute($sql);\r\n\t\t\t\t\t$response['success'] = true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$response['success'] = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\theader('Content-type: application/json');\r\n\t\t\techo json_encode($response);\r\n\t\t}\r\n\t}", "public function mass_remove_group()\n {\n $ids = json_decode($this->input->post('ids'), true); //convert json into array\n foreach ($ids as $id) {\n $resultat = $this->m_feuille_controle->remove_group($id);\n }\n }", "private function actionListDelete() {\n $put_vars = $this->actionListPutConvert();\n $this->loadModel($put_vars['id'])->delete();\n }", "public static function deleteGroup() {\n $result = array();\n $deleted = lC_Product_variants_Admin::delete($_GET['pvid']);\n if ($deleted) {\n $result['rpcStatus'] = RPC_STATUS_SUCCESS;\n }\n\n echo json_encode($result);\n }", "public function deleteGroupQuestionsConnectionWithAnswer(){\n //Yii::app()->db->createCommand('DELETE FROM `tbl_link_group_questions_answers` WHERE `group_questions_id`=:group')->bindParam(\":group\",$this->id)->execute();\n Yii::app()->db->createCommand()->delete('tbl_templates_link_group_questions_answers', 'group_questions_id=:id', array(':id'=>$this->id));\n }", "public function DeleteListaCurso() {\n\t\t\t$this->objListaCurso->Delete();\n\t\t}", "function delMemberGroupHandle() {\n global $inputs;\n\n $sql = \"DELETE FROM `member_group` WHERE id = \" . $inputs['id'];\n execSql($sql);\n\n formatOutput(true, 'delete success');\n}", "function acf_delete_field_group($id = 0)\n{\n}", "public function mass_unremove_group()\n {\n $ids = json_decode($this->input->post('ids'), true); //convert json into array\n foreach ($ids as $id) {\n $resultat = $this->m_feuille_controle->unremove_group($id);\n }\n }", "function delete_groups($field = null, $match = null)\n\t{\n\t\treturn get_instance()->kbcore->groups->delete_by($field, $match);\n\t}", "public function delete_group($id){\n $this->db->where('group_id', $id);\n $this->db->delete('member_group');\n }", "function delete_group_by($field, $match = null)\n\t{\n\t\treturn get_instance()->kbcore->groups->delete_by($field, $match);\n\t}", "function supp_list($list){\n $lid = get_id($list);\n //supp\n if ($lid!=-1){\n //supprimer element de la liste\n\t$SQL = \"DELETE FROM element_list WHERE list='$lid'\";\n \tglobal $db;\n \t$res = $db->prepare($SQL);\n \t$res->execute();\n //supprimer list\n \t$SQL = \"DELETE FROM list_list WHERE list='$list'\";\n \tglobal $db;\n \t$res = $db->prepare($SQL);\n \t$res->execute(); }\n}", "public function delete()\n {\n // Delete the group\n $result = parent::delete();\n\n return $result;\n }", "public function groupDelete(Request $request){\n try{\n $id = Crypt::decryptString($request->group_id);\n } catch (DecryptException $e) {\n return 'DD-E0001';\n }\n\n $logs = New LogsGroupUpdate;\n $logs->action = 1;\n $logs->user_id = auth()->user()->id;\n $logs->group_id = $id;\n $logs->save();\n\n $group = Group::find($id);\n $group->status = Carbon::now();\n $group->update();\n \n return redirect()->route('welcome');\n }", "public function deleteGroup($dc)\n\t{\n\t\t$arrGroups = $this->getChildRecords($dc->id, 'tl_iso_groups');\n\t\t$arrGroups[] = $dc->id;\n\n\t\t$this->Database->query(\"UPDATE tl_iso_products SET gid=0 WHERE gid IN (\" . implode(',', $arrGroups) . \")\");\n\t}", "public function removefromgroupAction()\n {\n \t//Don't display a new view\n\t\t$this->_helper->viewRenderer->setNoRender();\n\t\t\n\t\t$itemid = $this->getRequest()->getParam('itemID');\n\t\t\n\t\t$group = GroupNamespace::getCurrentGroup();\n\t\tif (isset($itemid) && isset($group))\n\t\t{\n\t\t\t$item = $group->removeRecord($itemid);\n\t\t\t$item->setGroupID(NULL);\n\t\t\tItemDAO::getItemDAO()->saveItemIdentification($item, $item);\n\t\t}\n }", "static function clearFriend2Group( $table='mapFr2Gr' ) {\n $sql = \"DROP TABLE IF EXISTS {$table}\";\n return $sql;\n }", "protected function DeleteGroup($groupid, $deletegrouptoo=true) { \n if (!$groupid = $this->CorrectSymplyString($groupid)) { return false; }\n $list = $this->control->db->mPost(\n \"select iditem from {$this->control->tables_list['tplitemsl']} \".$this->GetWhereForPagesList($groupid)\n );\n require_once W_LIBPATH.'/sp.page.lib.php';\n require_once W_LIBPATH.'/files.lib.php';\n while ($row = $this->control->db->GetLineArray($list)) { \n w_sp_page_object::DeletePage($this->control, $row['iditem']);\n w_dw_files_object::RemoveAllObjectFiles(2, $row['iditem'], $this->control); \n } \n if ($deletegrouptoo) {\n $this->control->db->Delete($this->control->tables_list['glbsectlst'], \"iditem='$groupid'\", '1');\n $this->result['gcount'] = $this->GetGroupsCount();\n }\n return true; \n }", "function withdrawGroupHandler() {\n global $inputs;\n\n $sql = \"DELETE FROM `member_group` WHERE id = \" . $inputs['id'];\n execSql($sql);\n\n formatOutput(true, 'delete success');\n}", "function privDeleteByRule(&$p_result_list, &$p_options)\n {\n }", "public function deleteGroup($in)\n {\n $em = $this->doctrine->getEntityManager();\n $group = $em->getRepository('CmarMeetingBundle:Group')->findOneBy(array('key' => $in->{'key'}));\n $meeting = $em->getRepository('CmarMeetingBundle:Meeting')->findOneByStatesAndTitle(array(Meeting::STATE_NOW, Meeting::STATE_NEW, Meeting::STATE_LOCKED), $in->{'name'});\n\n\n if ($group == NULL) {\n $this->logger->info(\"Group does not exist\"); \n throw new \\LogicException(\"Group does not exist\");\n } else {\n //$this->mapGroup($group, $in);\n $id_group = $this->adoAdmin->principalFindByName($group->getName());\n $xml = $this->adoAdmin->principalDelete($id_group);\n \n if ($group->getType() != 'personal'){//Es necesario que el grupo enviado por D+ contenga el Tipo de grupo en la acción borrar\n $xml = $this->meetingService->stop($meeting);\n $em->remove($meeting);\n }\n $em->remove($group);\n\n try {\n $em->flush();\n } catch (\\Exception $e) {\n $this->logger->info(\"DDBB Exception\"); \n throw new \\LogicException(\"DDBB Exception\", -1);\n }\n }\n }", "function delete_userGroup($idList, $number){\n if($number == 1){\n if(is_admin($idList)){\n return 0;\n }else{\n deleteRecord(TAB_USR_ROLE, \"userId = $idList\");\n deleteRecord(TAB_USERS, \"id = $idList\");\n }\n }else{\n $flag = false;\n for($i = 0; $i < count($idList); $i++){\n $id = $idList[$i];\n if(is_admin($id)){\n $flag = true;\n break;\n }\n }\n if(!$flag){\n for($j = 0; $j < count($idList); $j++){\n $id = $idList[$j];\n deleteRecord(TAB_USR_ROLE, \"userId = $id\");\n deleteRecord(TAB_USERS, \"id = $id\");\n }\n }else{\n return 0;\n }\n }\n return 1;\n}", "public function groupDelete(Request $request)\n {\n\n if (!Gate::allows('products_manage')) {\n return abort(401);\n }\n\n $ids = $request->ids;\n foreach ($ids as $id) {\n\n $model = Card::findOrFail($id);\n\n if ($model->cardServices->count() > 0) {\n return response()->json([\n 'status' => false,\n 'message' => \"عفواً, لا يمكنك حذف النوع ($model->name) نظراً لوجود مراكز ملتحقة بهذا النوع\"\n ]);\n }\n\n $model->delete();\n }\n\n return response()->json([\n 'status' => true,\n 'data' => [\n 'id' => $request->id\n ]\n ]);\n }", "public function deleteComponentGroupAction(ComponentGroup $group)\n {\n execute(new RemoveComponentGroupCommand($group));\n\n return cachet_redirect('dashboard.components.groups')\n ->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.components.delete.success')));\n }", "function deleteTrackers(){\n\t\t$pgf = new ProjectGroupFactory($this->group);\n\t\t$pgs = $pgf->getProjectGroups();\n\t\tif($pgs){\n\t\t\tforeach($pgs as $pg){\n\t\t\t\t$pg->delete(true, true);\n\t\t\t}\n\t\t}\n\t}", "public function cleanup() : void\n {\n unset($this->groups);\n }", "public function delete(): void\n {\n $query_lang = 'DELETE FROM '. rex::getTablePrefix() .'d2u_linkbox_categories '\n .'WHERE category_id = '. $this->category_id;\n $result_lang = rex_sql::factory();\n $result_lang->setQuery($query_lang);\n }", "function delete(){\n // Renumber resolutions\n $resolutions = resolution::getResolutions($this->committeeId, $this->topicId);\n foreach($resolutions as $resolution){\n if($resolution->resolutionNum <= $this->resolutionNum)\n continue;\n $resolution->resolutionNum--;\n $resolution->saveInfo();\n }\n // Delete subclauses\n foreach($this->preambulatory as $clause){\n $clause->delete();\n }\n foreach($this->operative as $clause){\n $clause->delete();\n }\n // Delete resolution\n mysql_query(\"DELETE FROM resolution_list WHERE id='$this->resolutionId'\") or die(mysql_error());\n }", "function groups_delete_groupings_groups($courseid, $showfeedback=false) {\n global $CFG;\n\n $groupssql = \"SELECT id FROM {$CFG->prefix}groups g WHERE g.courseid = $courseid\";\n delete_records_select('groupings_groups', \"groupid IN ($groupssql)\");\n\n //trigger groups events\n events_trigger('groups_groupings_groups_removed', $courseid);\n\n if ($showfeedback) {\n notify(get_string('deleted').' groupings_groups');\n }\n\n return true;\n}", "public function delete() {\r\n\r\n // Does the Group object have an ID?\r\n if ( is_null( $this->id ) ) trigger_error ( \"Group::delete(): Attempt to delete a Group object that does not have it's ID property set.\", E_USER_ERROR );\r\n\r\n // Delete the Group\r\n $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD ); \r\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\r\n $st = $conn->prepare ( \"DELETE FROM \" . DB_PREFIX . \"groups WHERE id = :id LIMIT 1\" );\r\n \r\n $st->bindValue( \":id\", $this->id, PDO::PARAM_INT );\r\n $st->execute();\r\n \r\n $conn = null;\r\n }", "public function remove_list_from_table($list){\n\t\t$query = \"DELETE * FROM \" . $this->table . \" WHERE \" . $this->column_name . \"=\";\n\t\t$list = commas_to_array($list);\n\t\t$just_added = array();\n\t\tif($old_list = Database::get_results_as_numerical_array($query, $this->column_name)){\n\t\t\t//var_dump($old_list); echo \"<br>\";\n\t\t\t\n\t\t\tforeach($list as $list_item){\n\t\t\t\t\n\t\t\t\tif(!in_array($list_item, $old_list) &&\n\t\t\t\t !in_array($list_item, $just_added)){\n\t\t\t\t\t$this->add_to_table($list_item);\n\t\t\t\t\t$just_added[] = $list_item;\n\t\t\t\t}\n\t\t\t}\n\t\t}else{ //if there is nothing in the organizations table\n\t\t\tforeach($list as $list_item){\n\t\t\t\tif(!in_array($list_item, $just_added)){\n\t\t\t\t\t$this->add_to_table($list_item);\n\t\t\t\t\t$just_added[] = $list_item;\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t}", "public function admin_remove(){\n \n $this->set(\"title_for_layout\",\"Remove a Group\");\n \n // Load the group in question\n $group = $this->Group->find('first', array('conditions' => array('Group.id' => $this->params->id)));\n if($group){\n $this->set('group', $group);\n } else {\n $this->Session->setFlash('That group could not be found.', 'default', array('class' => 'alert alert-error'));\n $this->redirect(array('controller' => 'group', 'action' => 'index', 'admin' => true));\n }\n }", "public function deletePermissions() {\n\t\t// delete group permissions\n\t\t$sql = \"DELETE FROM\twcf\".WCF_N.\"_linklist_category_to_group\n\t\t\tWHERE\t\tcategoryID = \".$this->categoryID;\n\t\tWCF::getDB()->sendQuery($sql);\n\t}", "public function destroy(Conversion $conversion)\n {\n //\n }", "public function removeData($tableGroup = 'operational_tables')\n {\n $tableGroupText = (empty($tableGroup) ? 'ALL' : $tableGroup);\n echo $this->quiet ? '' : \"[x] CLEANING UP TABLES FOR TABLE GROUP \\\"{$tableGroupText}\\\"\" . PHP_EOL;\n $this->listAllTables($tableGroup);\n $existingTables = $this->executeQuery(\"SHOW TABLES;\");\n $existingTables = array_column($existingTables, 'Tables_in_'.$this->config['import_database']['database']);\n\n $this->executeQuery(\"/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\", [], false);\n\n foreach ($this->tables as $table) {\n if (in_array($table, $existingTables)) {\n echo $this->quiet ? '' : \"Cleaning up table {$table}\" . PHP_EOL;\n $this->executeQuery(\"TRUNCATE TABLE {$table};\", [], false);\n }\n }\n\n $this->executeQuery(\"/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\", [], false);\n\n echo $this->quiet ? '' : '[✓] CLEANUP FINISHED' . PHP_EOL . PHP_EOL;\n }", "public function deleteCategoryLangaugeAction(){\n $ebookers_obj = new Ep_Ebookers_Managelist();\n //to call a function to delete themes//\n $ebookers_obj->deleteCategoryLangauge($this->_request->getParams());\n //unset($_REQUEST);\n exit;\n }", "function admin_delete($id=null){\n\t $id = base64_decode($id);\n\t $this->UserGroup->id = $id;\n $this->UserGroup->delete($id);\n $this->Session->setFlash('User Group deleted sucessfully.','message/green');\n $this->redirect(array('action' => 'index'));\n }", "function delete() {\n\t\t$sql = \"DELETE FROM cost_detail\n\t\t\t\tWHERE cd_fr_id=?, cd_seq=?\";\n\t\t$this->ffm->query($sql, array($this->cd_fr_id, $this->cd_seq));\n\t}", "public function deleteGroup(Group $group)\n {\n $group->delete();\n return redirect(route(Constants::ROUTES_GROUPS_INDEX));\n }", "public function removeAction()\n {\n $modules = $this->module->fetchAll(\" groupmodule_id = \".$this->_getParam('id'));\n foreach($modules as $key=>$row)\n { \n $this->module->removemodule(APPLICATION_PATH.\"/modules/\".$row->module_name);\n }\n \n $current = $this->gmodule->find($this->_getParam('id'))->current();\n $current->delete(); \n \n $message = \"Data Deleted Successfully\";\n \n $this->_helper->flashMessenger->addMessage($message);\n die;\n }", "public function deleteMatch(){\n\t\t$this->getDbTable()->delete(\"\");\n\t}", "function acf_untrash_field_group($id = 0)\n{\n}", "public function unsetCollectionKey($group)\n\t{\n\t\tunset($this->group_keys_prefix[$group]);\n\t\tunset($this->group_keys[$group]);\n\t}", "public function deletegroupAction()\n\t{\n\t\t$model = $this->byId(null, 'UserGroup');\n\t\tif ($model != null) {\n\t\t\ttry {\n\t\t\t\t$this->groupService->deleteGroup($model);\n\t\t\t} catch (NonEmptyGroupException $neg) {\n\t\t\t\t$this->flash(\"Group is not empty and cannot be deleted\");\n\t\t\t}\n\t\t}\n\n\t\t$this->redirect('admin', 'grouplist');\n\t}", "public function actionDeletemembergroup() {\n $json = array();\n if (isset(\\Yii::$app->request->post()['id'])) {\n if (\\Yii::$app->request->post()['id'] == 0) {\n $json['success'] = 'no';\n $json['message'] = Yii::t('BbiiModule.bbii', 'The default member group cannot be removed.');\n } else {\n BbiiMembergroup::find(\\Yii::$app->request->post()['id'])->delete();\n $json['success'] = 'yes';\n }\n }\n echo json_encode($json);\n \\Yii::$app->end();\n }", "public function deleteCollectionTranslation(Collection $collection, string $locale): Collection;", "function delete_subscriber($idList, $number){\n if($number == 1){\n deleteRecord(TAB_SUBSCRIBERS, \"id = $idList\");\n }else{\n for($i = 0; $i < count($idList); $i++){\n $id = $idList[$i];\n deleteRecord(TAB_SUBSCRIBERS, \"id = $id\");\n }\n }\n}", "private function deleteNodes( ezcTreeNodeList $list )\n {\n $db = $this->dbh;\n $q = $db->createDeleteQuery();\n\n $nodeIdList = array();\n foreach ( array_keys( $list->nodes ) as $nodeId )\n {\n $nodeIdList[] = (string) $nodeId;\n }\n\n // DELETE FROM indexTable\n // WHERE id in ( $list );\n $q->deleteFrom( $db->quoteIdentifier( $this->indexTableName ) );\n $q->where( $q->expr->in( 'id', $nodeIdList ) );\n $s = $q->prepare();\n $s->execute();\n }", "public function deleteGroup()\n {\n // If the group has system attributes, we can't delete it.\n if ($this->groupProtected) {\n $this->notify(\n __('adminhub::notifications.attribute-groups.delete_protected')\n );\n\n return;\n }\n DB::transaction(function () {\n DB::table(config('getcandy.database.table_prefix').'attributables')\n ->whereIn(\n 'attribute_id',\n $this->attributeGroupToDelete->attributes()->pluck('id')->toArray()\n )->delete();\n $this->attributeGroupToDelete->attributes()->delete();\n $this->attributeGroupToDelete->delete();\n });\n $this->deleteGroupId = null;\n $this->refreshGroups();\n\n $this->notify(\n __('adminhub::notifications.attribute-groups.deleted')\n );\n }", "public function testRemoveUsedGroup(){\n // on ajoute d'abord un user dans un groupe\n jAcl2DbUserGroup::addUserToGroup('max', self::$grpId3);\n\n self::$usergroups=array(\n array('login'=>'laurent', 'id_aclgrp'=>self::$grpId5),\n array('login'=>'max', 'id_aclgrp'=>self::$grpId6),\n array('login'=>'max', 'id_aclgrp'=>self::$defaultGroupId),\n array('login'=>'max', 'id_aclgrp'=> self::$grpId3),\n );\n $this->assertTableContainsRecords('jacl2_user_group', self::$usergroups);\n\n // ok maintenant on supprime le groupe\n\n jAcl2DbUserGroup::removeGroup(self::$grpId3);\n self::$usergroups=array(\n array('login'=>'laurent', 'id_aclgrp'=>self::$grpId5),\n array('login'=>'max', 'id_aclgrp'=>self::$grpId6),\n array('login'=>'max', 'id_aclgrp'=>self::$defaultGroupId),\n );\n $this->assertTableContainsRecords('jacl2_user_group', self::$usergroups);\n unset(self::$groups[2]);\n $this->assertTableContainsRecords('jacl2_group', self::$groups);\n\n\n }", "public function destroy(Group $group) {\n //\n }", "function delete_campaign_list($id, $taxonomy) {\n if ($taxonomy === 'category') {\n require_once 'createsend-php-5.1.2/csrest_lists.php';\n $auth = array('api_key' => CM_API_KEY);\n $wrap = new CS_REST_Lists(get_term_meta($id, 'list_id', true), $auth);\n\n $result = $wrap->delete();\n }\n}", "public function deleteGroup($id){\n /// Compruebo que no pertenesca a NoGroup (id = 2)\n if($id!=2){\n #Actualizar Paginas a valor 0 = no pertenece a un grupo/\n $result_Domain= DB::table('w59_page')\n ->select('w59_page.id')\n ->join('w59_groudpage', 'w59_groudpage.id', '=', 'w59_page.IDgroudpage')\n ->where('w59_groudpage.IDgroup','=',$id)\n ->get(); \n if(count($result_Domain) > 0){\n foreach($result_Domain as $IDPage){\n DB::table('w59_page')\n ->where('id', $IDPage->id)\n ->update(['IDgroudpage' => '0']);\n }\n }\n\n ////verificar si el grupo es nivel 2.\n $get_Type= DB::table('w59_group')->select('type')->where('id','=',$id)->first();\n if($get_Type->type==2){\n $ArrayDomain= DB::table('w59_dominio')\n ->select('url')->get(); \n $hey = $ArrayDomain;\n }else{\n $ArrayDomain= DB::table('w59_dominio')\n ->select('url')->where('IDgroup', '=', $id)->get(); \n $hey = $ArrayDomain;\n }\n \n #Actualizar Dominio a NoGroup con ID 2 como Predeterminado.\n DB::table('w59_dominio')->where('IDgroup','=', $id)->update(['IDgroup' => '2']);\n #Eliminar Grupos de pagina\n DB::table('w59_groudpage')->where('IDgroup', '=', $id)->delete();\n #Borrar Grupos\n DB::table('w59_group')->where('id', '=', $id)->delete();\n\n foreach($hey as $po){\n $url =\"https://www.\".$po->url.\"/wp-json/kb/v2/worked/14/\";\n $this->curl_load($url);\n }\n return back()->withInput();\n \n }\n }", "public function delete() {\n $events = $this->getEventsCreatedHere(); # we will need to write this method\n foreach ($events as $record) {\n $record->delete();\n }\n\n # delete the calendar_has_event records\n $has_events = $this->getCalendarHasEvents();\n foreach ($has_events as $record) {\n $record->delete();\n }\n\n # delete the user_has_permission records\n $permissions = $this->getAllPermissions();\n foreach ($permissions as $record) {\n $record->delete();\n }\n\n # delete the subscriptions on the calendar\n $subscriptions = $this->getSubscriptions();\n foreach ($subscriptions as $record) {\n $record->delete();\n }\n\n # delete the subscription_has_calendar records (remove calendar from subscriptions that subscribe to it)\n $subscriptions = $this->getSubscriptionHasCalendarRecords();\n foreach ($subscriptions as $record) {\n $record->delete();\n }\n\n return parent::delete();\n }", "function acf_delete_field_group( $id = 0 ) {\n\treturn acf_delete_internal_post_type( $id, 'acf-field-group' );\n}", "function supp_element_list($supp, $list){\n $lid = get_id($list);\n //supprimer\n if ($lid!=-1){\n \t$SQL = \"DELETE FROM element_list WHERE element = '$supp' and list='$lid'\";\n \tglobal $db;\n \t$res = $db->prepare($SQL);\n \t$res->execute();\n }\n}", "public function actionRemove()\n {\n if (Yii::$app->getRequest()->Post('gid') && Yii::$app->getRequest()->Post('iid')) {\n $landingPageId = (int)Yii::$app->getRequest()->Post('gid');\n $groupingId = (int)Yii::$app->getRequest()->Post('iid');\n $model = LandingPageGrouping::find()->andWhere(['landing_page_id' => $landingPageId])->\n andWhere(['grouping_id' => $groupingId])->one();\n if ($model) {\n $model->delete();\n }\n\n $groupings = Grouping::find()->onlandingpage($landingPageId)->active()->\n orderBy(['Name' => 'ASC'])->asArray()->all();\n } else {\n $groupings = false;\n }\n \n \\Yii::$app->response->format = 'json';\n return $groupings;\n }", "public function delete(){\n $db = Database::getInstance() ;\n $db->query(\"DELETE FROM canciones WHERE idcancion=:idcan ;\",\n [\":idcan\"=>$this->idcancion]) ;\t\t\t\t \n }", "public function destroy(Group $group)\n {\n //\n }", "public function destroy(Group $group)\n {\n //\n }", "public function destroy(Group $group)\n {\n //\n }", "public function removeAllSubGroups() {}", "public function delete() {\n\t\t// Get list of passwords of this group\n\t\t$passwordList = t3lib_div::makeInstance('tx_passwordmgr_model_passwordList');\n\t\t$passwordList->init($this['groupUid']);\n\n\t\t// Delete sslData of member of passwords in this group\n\t\tforeach ( $passwordList as $password ) {\n\t\t\t$sslDataOfMember = t3lib_div::makeInstance('tx_passwordmgr_model_ssldata');\n\t\t\t$sslDataOfMember->init($password['uid'], $this['beUserUid']);\n\t\t\t$sslDataOfMember->delete();\n\t\t}\n\n\t\t// Delete membership\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_DELETEquery(\n\t\t\t'tx_passwordmgr_group_be_users_mm',\n\t\t\t'group_uid='.$GLOBALS['TYPO3_DB']->fullQuoteStr($this['groupUid'], 'tx_passwordmgr_group_be_users_mm') .\n\t\t\t\t' AND be_users_uid='.$GLOBALS['TYPO3_DB']->fullQuoteStr($this['beUserUid'], 'tx_passwordmgr_group_be_users_mm')\n\t\t);\n\t\t$this->checkAffectedRows('deleteGroupMember', 1);\n\t\ttx_passwordmgr_helper::addLogEntry(1, 'deleteGroupMember', 'Removed user '.$this['beUserUid'].' from group '.$groupUid);\n\t}", "function lp_delete_table(){\r\n\tglobal $wpdb;\r\n\t$charset_collation = $wpdb->get_charset_collate();\r\n\t$table_name = $wpdb->prefix.'like_post';\r\n\r\n $sql = \"DROP TABLE IF EXISTS $table_name;\";\r\n $wpdb->query($sql);\r\n\r\n delete_option('lp_showing_year');\r\n}", "function delete_group($id)\n\t{\n\t\treturn get_instance()->kbcore->groups->delete($id);\n\t}", "public function deleteList(Request $request)\n {\n $this->boardList->deleteList($request); \n\n return [\n 'success' => 'success', \n ];\n }", "function feed_group_delete($feed_group, DatabaseTransaction $transaction = NULL) {\r\n if (!$transaction) {\r\n $transaction = db_transaction();\r\n }\r\n\r\n try {\r\n if (isset($feed_group->fgid)) {\r\n db_delete('feed_user_group')\r\n ->condition('fgid', $feed_group->fgid)\r\n ->execute();\r\n \r\n db_delete('feed_group')\r\n ->condition('fgid', $feed_group->fgid)\r\n ->execute();\r\n }\r\n return TRUE;\r\n }\r\n catch (Exception $e) {\r\n $transaction->rollback();\r\n watchdog_exception('feed', $e);\r\n return FALSE;\r\n }\r\n}", "public function admin_delete(){\n \n // Load the group in question\n $group = $this->Group->find('first', array('conditions' => array('Group.id' => $this->params->id)));\n if($group){\n // Delete the group\n $delete_attempt = $this->Group->delete($this->params->id);\n if ($delete_attempt){\n $this->Session->setFlash('Group \\''.$group['Group']['name'].'\\' successfully deleted.', 'default', array('class' => 'alert alert-success'));\n CakeLog::write('admin', '[success] Group \\''.$group['Group']['name'].'\\' deleted.');\n $this->redirect(array('controller' => 'group', 'action' => 'index', 'admin' => true));\n } else {\n $this->Session->setFlash('There was an error deleting the \\''.$group['Group']['name'].'\\' group.', 'default', array('class' => 'alert alert-error'));\n CakeLog::write('admin', '[error] Group \\''.$group['Group']['name'].'\\' could not be deleted.');\n $this->redirect(array('controller' => 'group', 'action' => 'index', 'admin' => true));\n }\n } else {\n $this->Session->setFlash('That group could not be found.', 'default', array('class' => 'alert alert-error'));\n $this->redirect(array('controller' => 'group', 'action' => 'index', 'admin' => true));\n }\n }" ]
[ "0.589493", "0.58875066", "0.58782786", "0.58577996", "0.58539796", "0.58400244", "0.5830755", "0.58146906", "0.57856", "0.5746383", "0.5709993", "0.5584709", "0.5554169", "0.55437773", "0.55437493", "0.55216944", "0.551611", "0.54693556", "0.54619956", "0.5454796", "0.54124326", "0.5410663", "0.54074365", "0.53965384", "0.5375377", "0.5361634", "0.5349957", "0.53479546", "0.53420275", "0.53315437", "0.5325484", "0.5320403", "0.53198016", "0.53158927", "0.5308871", "0.5298968", "0.5256617", "0.5256026", "0.5238276", "0.52261364", "0.5222466", "0.5218091", "0.51873934", "0.51813763", "0.51736456", "0.5148746", "0.5141409", "0.51406354", "0.5138668", "0.5118869", "0.5111745", "0.51094574", "0.50950235", "0.5094955", "0.50729907", "0.50723326", "0.5071625", "0.50566214", "0.50547546", "0.5052256", "0.5051385", "0.50313914", "0.5031127", "0.50292295", "0.5020873", "0.5018298", "0.50123835", "0.5011504", "0.50086147", "0.50084716", "0.50023204", "0.4998939", "0.4998226", "0.4997726", "0.49948508", "0.49946266", "0.49887478", "0.49858955", "0.4975247", "0.49637237", "0.49537724", "0.49493736", "0.49491274", "0.49421355", "0.49393988", "0.49276218", "0.49212357", "0.49210605", "0.4912501", "0.49117437", "0.49008095", "0.48979434", "0.48979434", "0.48979434", "0.4890537", "0.48901877", "0.48862273", "0.48821026", "0.4881912", "0.48802987", "0.4877339" ]
0.0
-1
Get client IP address.
public static function get_client_ip() { return IBX_WPFomo_Helper::get_client_ip(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function get_client_ip()\r\n\t{\r\n\t\treturn $_SERVER['HTTP_CLIENT_IP'];\r\n\t}", "public function getIpClient() {\r\n if (!empty($_SERVER['HTTP_CLIENT_IP'])) {\r\n $ip = $_SERVER['HTTP_CLIENT_IP'];\r\n }\r\n elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\r\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\r\n }\r\n else {\r\n $ip = $_SERVER['REMOTE_ADDR'];\r\n }\r\n return $ip;\r\n }", "public function get_client_ip() {\n if (isset($_SERVER['HTTP_CLIENT_IP'])) {\n $ip = $_SERVER['HTTP_CLIENT_IP'];\n } elseif (isset($_SERVER['REMOTE_ADDR'])) {\n $ip = $_SERVER['REMOTE_ADDR'];\n } else {\n $ip = '0.0.0.0';\n }\n\n return $ip;\n }", "public function getClientIpAddress() {\n\t\treturn $this->container['client_ip_address'];\n\t}", "public function getIpAddress()\n {\n if (!empty($this->_server['HTTP_X_CLUSTER_CLIENT_IP'])) {\n $ip = $this->_server['HTTP_X_CLUSTER_CLIENT_IP'];\n // default\n } elseif (isset($this->_server['REMOTE_ADDR'])) {\n $ip = $this->_server['REMOTE_ADDR'];\n // dafuq?\n } else {\n $ip = \"127.0.0.1\";\n }\n Logger::debug('Client ip: ' . $ip);\n return $ip;\n }", "public static function getClientIp()\n {\n if (getenv('HTTP_CLIENT_IP')) {\n $ipAddress = getenv('HTTP_CLIENT_IP');\n } else if(getenv('HTTP_X_FORWARDED_FOR')) {\n $ipAddress = getenv('HTTP_X_FORWARDED_FOR');\n } else if(getenv('HTTP_X_FORWARDED')) {\n $ipAddress = getenv('HTTP_X_FORWARDED');\n } else if(getenv('HTTP_FORWARDED_FOR')) {\n $ipAddress = getenv('HTTP_FORWARDED_FOR');\n } else if(getenv('HTTP_FORWARDED')) {\n $ipAddress = getenv('HTTP_FORWARDED');\n } else if(getenv('REMOTE_ADDR')) {\n $ipAddress = getenv('REMOTE_ADDR');\n } else {\n $ipAddress = 'UNKNOWN';\n }\n\n if ($ipAddress === '::1') {\n $ipAddress = '192.168.0.1';\n }\n\n /*\n * On some server configurations, HTTP_X_FORWARDED_FOR or REMOTE_ADDR returns\n * multiple comma-separated IPs This brakes some email integration,\n * so we want to return only one IP.\n */\n if (strpos($ipAddress, ',') !== false) {\n $ipAddress = explode(',', $ipAddress);\n $ipAddress = $ipAddress[0];\n }\n\n return $ipAddress;\n }", "public function getClientIp()\n {\n $ip_address = '';\n\n if (getenv('HTTP_CLIENT_IP')) {\n $ip_address = getenv('HTTP_CLIENT_IP');\n } elseif (getenv('HTTP_X_FORWARDED_FOR')) {\n $ip_address = getenv('HTTP_X_FORWARDED_FOR');\n } elseif (getenv('HTTP_X_FORWARDED')) {\n $ip_address = getenv('HTTP_X_FORWARDED');\n } elseif (getenv('HTTP_FORWARDED_FOR')) {\n $ip_address = getenv('HTTP_FORWARDED_FOR');\n } elseif (getenv('HTTP_FORWARDED')) {\n $ip_address = getenv('HTTP_FORWARDED');\n } else {\n $ip_address = getenv('REMOTE_ADDR');\n }\n\n return $ip_address;\n }", "public static function getClientIP(): string {\n\n if (!empty($_SERVER['HTTP_CLIENT_IP'])) {\n $ip = $_SERVER['HTTP_CLIENT_IP'];\n } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n } else {\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n\n return $ip;\n\n }", "public function getClientIP()\n {\n if (isset($_SERVER['HTTP_CLIENT_IP'])) {\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n } else if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n } else if (isset($_SERVER['HTTP_X_FORWARDED'])) {\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n } else if (isset($_SERVER['HTTP_FORWARDED_FOR'])) {\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n } else if (isset($_SERVER['HTTP_FORWARDED'])) {\n $ipaddress = $_SERVER['HTTP_FORWARDED'];\n } else if (isset($_SERVER['REMOTE_ADDR'])) {\n $ipaddress = $_SERVER['REMOTE_ADDR'];\n } else {\n $ipaddress = 'UNKNOWN IP';\n }\n return $ipaddress;\n }", "public function clientIp()\n\t{\n\t\t$keys = array(\n\t\t\t'HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP',\n\t\t\t'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR'\n\t\t);\n\t\t$keys = array_values(array_intersect($keys, array_keys($_SERVER)));\n\t\tforeach ($keys as $key)\n\t\t{\n\t\t\tforeach (explode(',', $this->server($key)) as $ip)\n\t\t\t{\n\t\t\t\t$ip = trim($ip);\n\t\t\t\tif (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE) !== false)\n\t\t\t\t\treturn $ip;\n\t\t\t}\n\t\t}\n\n\t\tthrow new Exception\\RequestException(\"Can't get client ip.\");\n\t}", "public static function getClientIPAddress(){\n\t\treturn Customweb_Core_Http_ContextRequest::getClientIPAddress();\n\t}", "public function clientIp(){\n return $this->clientIp;\n }", "public function returnClientIP(){\n\n return self::$oCRNRSTN_ENV->oCRNRSTN_IPSECURITY_MGR->clientIpAddress();\n\n }", "public static function get_ip_address () : string\n {\n server ( \"HTTP_CLIENT_IP\" , ( $ip = \"\" ) && ( server ( \"HTTP_CLIENT_IP\" ) !== \"\" ) ? server ( \"HTTP_CLIENT_IP\" ) : server ( \"HTTP_CLIENT_IP\" ) );\n $ip = server ( \"HTTP_CLIENT_IP\" ) === \"\" ? server ( \"HTTP_CLIENT_IP\" ) : $ip;\n $ip = ( $ip === \"\" ) && ( server ( \"HTTP_X_FORWARDED_FOR\" ) === \"\" ) ? server ( \"HTTP_X_FORWARDED_FOR\" ) : $ip;\n return $ip === \"\" ? server ( \"REMOTE_ADDR\" ) : $ip;\n }", "public function getClientIp(): string {\n $s = $this->server();\n if (array_key_exists('HTTP_CLIENTIP', $s)) {\n if (!empty($s['HTTP_CLIENTIP'])) {\n return $s['HTTP_CLIENTIP'];\n }\n }\n if (array_key_exists('HTTP_X_FORWARDED_FOR', $s) && !empty($s['HTTP_X_FORWARDED_FOR'])) {\n $addresses = explode(',', $s['HTTP_X_FORWARDED_FOR']);\n while (count($addresses)) {\n $ip = @trim(array_shift($addresses));\n if ($ip === '') {\n continue;\n }\n if (!self::isLanIp($ip)) {\n return $ip;\n }\n }\n }\n return $s['REMOTE_ADDR'];\n }", "public function get_client_ip() {\n\t\t$ipaddress = '';\n\t\tif (getenv('HTTP_CLIENT_IP'))\n\t\t\t$ipaddress = getenv('HTTP_CLIENT_IP');\n\t\telse if(getenv('HTTP_X_FORWARDED_FOR'))\n\t\t\t$ipaddress = getenv('HTTP_X_FORWARDED_FOR');\n\t\telse if(getenv('HTTP_X_FORWARDED'))\n\t\t\t$ipaddress = getenv('HTTP_X_FORWARDED');\n\t\telse if(getenv('HTTP_FORWARDED_FOR'))\n\t\t\t$ipaddress = getenv('HTTP_FORWARDED_FOR');\n\t\telse if(getenv('HTTP_FORWARDED'))\n\t\t $ipaddress = getenv('HTTP_FORWARDED');\n\t\telse if(getenv('REMOTE_ADDR'))\n\t\t\t$ipaddress = getenv('REMOTE_ADDR');\n\t\telse\n\t\t\t$ipaddress = 'UNKNOWN';\n\t\treturn $ipaddress;\n\t}", "public static function getClientIP()\n {\n if (getenv('HTTP_CLIENT_IP')) {\n $ip_address = getenv('HTTP_CLIENT_IP');\n } elseif (getenv('HTTP_X_FORWARDED_FOR')) {\n $ip_address = getenv('HTTP_X_FORWARDED_FOR');\n } elseif (getenv('HTTP_X_FORWARDED')) {\n $ip_address = getenv('HTTP_X_FORWARDED');\n } elseif (getenv('HTTP_FORWARDED_FOR')) {\n $ip_address = getenv('HTTP_FORWARDED_FOR');\n } elseif (getenv('HTTP_FORWARDED')) {\n $ip_address = getenv('HTTP_FORWARDED');\n } elseif (getenv('REMOTE_ADDR')) {\n $ip_address = getenv('REMOTE_ADDR');\n } else {\n $ip_address = 'UNKNOWN';\n }\n\n return $ip_address;\n }", "protected function _getClientIpAddress() {\n\t\tif (!empty($_SERVER['HTTP_CLIENT_IP'])) {\n\t\t\t$ip = $_SERVER['HTTP_CLIENT_IP'];\n\t\t} elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n\t\t\t$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n\t\t} else {\n\t\t\t$ip = $_SERVER['REMOTE_ADDR'];\n\t\t}\n\t\treturn $ip;\n\t}", "public function getClientIpAddress(): string\n {\n $serverVariables = array(\n 'HTTP_X_FORWARDED_FOR',\n 'HTTP_X_FORWARDED',\n 'HTTP_X_CLUSTER_CLIENT_IP',\n 'HTTP_X_COMING_FROM',\n 'HTTP_FORWARDED_FOR',\n 'HTTP_FORWARDED',\n 'HTTP_COMING_FROM',\n 'HTTP_CLIENT_IP',\n 'HTTP_FROM',\n 'HTTP_VIA',\n 'REMOTE_ADDR'\n );\n $out = '';\n foreach ($serverVariables as $serverVariable) {\n $value = '';\n if (isset($_SERVER[$serverVariable])) {\n $value = $_SERVER[$serverVariable];\n } elseif (getenv($serverVariable)) {\n $value = getenv($serverVariable);\n }\n if (!empty($value)) {\n if (filter_var(trim($value), FILTER_VALIDATE_IP)) {\n $out = $value;\n break;\n }\n }\n }\n return $out;\n }", "function clientIp()\n {\n $ip_address = 'UNKNOWN';\n $header_arr = array('HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR');\n foreach ($header_arr as $header) {\n if (getenv($header))\n $ip_address = getenv($header);\n }\n return $ip_address;\n }", "function get_client_ip() {\r\n $ipaddress = '';\r\n if (getenv('HTTP_CLIENT_IP'))\r\n $ipaddress = getenv('HTTP_CLIENT_IP');\r\n else if(getenv('HTTP_X_FORWARDED_FOR'))\r\n $ipaddress = getenv('HTTP_X_FORWARDED_FOR');\r\n else if(getenv('HTTP_X_FORWARDED'))\r\n $ipaddress = getenv('HTTP_X_FORWARDED');\r\n else if(getenv('HTTP_FORWARDED_FOR'))\r\n $ipaddress = getenv('HTTP_FORWARDED_FOR');\r\n else if(getenv('HTTP_FORWARDED'))\r\n $ipaddress = getenv('HTTP_FORWARDED');\r\n else if(getenv('REMOTE_ADDR'))\r\n $ipaddress = getenv('REMOTE_ADDR');\r\n else\r\n $ipaddress = 'UNKNOWN';\r\n return $ipaddress;\r\n }", "function get_client_ip() {\n\t\t$ipaddress = null;\n\t\tif (getenv('HTTP_CLIENT_IP'))\n\t\t\t$ipaddress = getenv('HTTP_CLIENT_IP');\n\t\telse if(getenv('HTTP_X_FORWARDED_FOR'))\n\t\t\t$ipaddress = getenv('HTTP_X_FORWARDED_FOR');\n\t\telse if(getenv('HTTP_X_FORWARDED'))\n\t\t\t$ipaddress = getenv('HTTP_X_FORWARDED');\n\t\telse if(getenv('HTTP_FORWARDED_FOR'))\n\t\t\t$ipaddress = getenv('HTTP_FORWARDED_FOR');\n\t\telse if(getenv('HTTP_FORWARDED'))\n\t\t$ipaddress = getenv('HTTP_FORWARDED');\n\t\telse if(getenv('REMOTE_ADDR'))\n\t\t\t$ipaddress = getenv('REMOTE_ADDR');\n\t\telse\n\t\t\t$ipaddress = null;\n\t\treturn $ipaddress;\n\t}", "static function getClientIP() {\n if ($_SERVER['HTTP_CLIENT_IP'])\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n else if($_SERVER['HTTP_X_FORWARDED_FOR'])\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n else if($_SERVER['HTTP_X_FORWARDED'])\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n else if($_SERVER['HTTP_FORWARDED_FOR'])\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n else if($_SERVER['HTTP_FORWARDED'])\n $ipaddress = $_SERVER['HTTP_FORWARDED'];\n else if($_SERVER['REMOTE_ADDR'])\n $ipaddress = $_SERVER['REMOTE_ADDR'];\n else\n $ipaddress = 'UNKNOWN';\n\n return $ipaddress;\n }", "function get_client_ip() {\n $ipaddress = '';\n if (getenv('HTTP_CLIENT_IP'))\n $ipaddress = getenv('HTTP_CLIENT_IP');\n else if(getenv('HTTP_X_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_X_FORWARDED_FOR');\n else if(getenv('HTTP_X_FORWARDED'))\n $ipaddress = getenv('HTTP_X_FORWARDED');\n else if(getenv('HTTP_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_FORWARDED_FOR');\n else if(getenv('HTTP_FORWARDED'))\n $ipaddress = getenv('HTTP_FORWARDED');\n else if(getenv('REMOTE_ADDR'))\n $ipaddress = getenv('REMOTE_ADDR');\n else\n $ipaddress = 'UNKNOWN';\n return $ipaddress;\n }", "function get_client_ip() {\n $ipaddress = '';\n if (getenv('HTTP_CLIENT_IP'))\n $ipaddress = getenv('HTTP_CLIENT_IP');\n else if (getenv('HTTP_X_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_X_FORWARDED_FOR');\n else if (getenv('HTTP_X_FORWARDED'))\n $ipaddress = getenv('HTTP_X_FORWARDED');\n else if (getenv('HTTP_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_FORWARDED_FOR');\n else if (getenv('HTTP_FORWARDED'))\n $ipaddress = getenv('HTTP_FORWARDED');\n else if (getenv('REMOTE_ADDR'))\n $ipaddress = getenv('REMOTE_ADDR');\n else\n $ipaddress = 'UNKNOWN';\n $ipadsplit = explode(\",\", $ipaddress);\n if (count($ipadsplit) > 1) {\n $ipaddress = trim($ipadsplit[1]);\n }\n return $ipaddress;\n }", "protected function getClientIP(){\n if (!empty($_SERVER['HTTP_CLIENT_IP'])) \n {\n $ip_address = $_SERVER['HTTP_CLIENT_IP'];\n }\n //whether ip is from proxy\n elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) \n {\n $ip_address = $_SERVER['HTTP_X_FORWARDED_FOR'];\n }\n //whether ip is from remote address\n else\n {\n $ip_address = $_SERVER['REMOTE_ADDR'];\n }\n return $ip_address;\n }", "static public function getClientIp()\n {\n /*\n $headers = function_exists('apache_request_headers')\n ? apache_request_headers()\n : $_SERVER;\n \n return isset($headers['REMOTE_ADDR']) ? $headers['REMOTE_ADDR'] : '0.0.0.0';\n */\n \n if(getenv('HTTP_CLIENT_IP') && strcasecmp(getenv('HTTP_CLIENT_IP'), 'unknown')) {\n $ip = getenv('HTTP_CLIENT_IP');\n } elseif(getenv('HTTP_X_FORWARDED_FOR') && strcasecmp(getenv('HTTP_X_FORWARDED_FOR'), 'unknown')) {\n $ip = getenv('HTTP_X_FORWARDED_FOR');\n } elseif(getenv('REMOTE_ADDR') && strcasecmp(getenv('REMOTE_ADDR'), 'unknown')) {\n $ip = getenv('REMOTE_ADDR');\n } elseif(isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] && strcasecmp($_SERVER['REMOTE_ADDR'], 'unknown')) {\n $ip = $_SERVER['REMOTE_ADDR'];\n } else {\n return '0.0.0.0';\n }\n \n return preg_match ( '/[\\d\\.]{7,15}/', $ip, $matches ) ? $matches [0] : '0.0.0.0';\n }", "function get_ip_address_from_client() {\n $ipaddress = '';\n if (getenv('HTTP_CLIENT_IP'))\n $ipaddress = getenv('HTTP_CLIENT_IP');\n else if(getenv('HTTP_X_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_X_FORWARDED_FOR');\n else if(getenv('HTTP_X_FORWARDED'))\n $ipaddress = getenv('HTTP_X_FORWARDED');\n else if(getenv('HTTP_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_FORWARDED_FOR');\n else if(getenv('HTTP_FORWARDED'))\n $ipaddress = getenv('HTTP_FORWARDED');\n else if(getenv('REMOTE_ADDR'))\n $ipaddress = getenv('REMOTE_ADDR');\n else\n $ipaddress = 'UNKNOWN';\n \n return $ipaddress;\n}", "function get_client_ip() {\n\t $ipaddress = '';\n\t if (getenv('HTTP_CLIENT_IP'))\n\t $ipaddress = getenv('HTTP_CLIENT_IP');\n\t else if(getenv('HTTP_X_FORWARDED_FOR'))\n\t $ipaddress = getenv('HTTP_X_FORWARDED_FOR');\n\t else if(getenv('HTTP_X_FORWARDED'))\n\t $ipaddress = getenv('HTTP_X_FORWARDED');\n\t else if(getenv('HTTP_FORWARDED_FOR'))\n\t $ipaddress = getenv('HTTP_FORWARDED_FOR');\n\t else if(getenv('HTTP_FORWARDED'))\n\t $ipaddress = getenv('HTTP_FORWARDED');\n\t else if(getenv('REMOTE_ADDR'))\n\t $ipaddress = getenv('REMOTE_ADDR');\n\t else\n\t $ipaddress = 'UNKNOWN';\n\t return $ipaddress;\n\t}", "public function get_client_ip() \n\t{\n $ipaddress = '';\n if (getenv('HTTP_CLIENT_IP'))\n $ipaddress = getenv('HTTP_CLIENT_IP');\n else if(getenv('HTTP_X_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_X_FORWARDED_FOR');\n else if(getenv('HTTP_X_FORWARDED'))\n $ipaddress = getenv('HTTP_X_FORWARDED');\n else if(getenv('HTTP_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_FORWARDED_FOR');\n else if(getenv('HTTP_FORWARDED'))\n $ipaddress = getenv('HTTP_FORWARDED');\n else if(getenv('REMOTE_ADDR'))\n $ipaddress = getenv('REMOTE_ADDR');\n else\n $ipaddress = 'UNKNOWN';\n return $ipaddress;\n}", "public static function get_client_ip()\r\n {\r\n $ipaddress = '';\r\n if (getenv('HTTP_CLIENT_IP')) {\r\n $ipaddress = getenv('HTTP_CLIENT_IP');\r\n } elseif (getenv('HTTP_X_FORWARDED_FOR')) {\r\n $ipaddress = getenv('HTTP_X_FORWARDED_FOR');\r\n } elseif (getenv('HTTP_X_FORWARDED')) {\r\n $ipaddress = getenv('HTTP_X_FORWARDED');\r\n } elseif (getenv('HTTP_FORWARDED_FOR')) {\r\n $ipaddress = getenv('HTTP_FORWARDED_FOR');\r\n } elseif (getenv('HTTP_FORWARDED')) {\r\n $ipaddress = getenv('HTTP_FORWARDED');\r\n } elseif (getenv('REMOTE_ADDR')) {\r\n $ipaddress = getenv('REMOTE_ADDR');\r\n } else {\r\n $ipaddress = 'UNKNOWN';\r\n }\r\n $_SESSION[\"ip_cliente\"] = $ipaddress;\r\n }", "public function getClientIp()\n {\n if (!empty($_SERVER['HTTP_CLIENT_IP']) && $this->validIp($_SERVER['HTTP_CLIENT_IP'])) {\n return $_SERVER['HTTP_CLIENT_IP'];\n }\n\n if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n foreach (explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']) as $ip) {\n if ($this->validIp(trim($ip))) {\n return trim($ip);\n }\n }\n }\n\n if (!empty($_SERVER['HTTP_X_FORWARDED']) && $this->validIp($_SERVER['HTTP_X_FORWARDED'])) {\n return $_SERVER['HTTP_X_FORWARDED'];\n }\n\n if (!empty($_SERVER['HTTP_FORWARDED_FOR']) && $this->validIp($_SERVER['HTTP_FORWARDED_FOR'])) {\n return $_SERVER['HTTP_FORWARDED_FOR'];\n }\n\n if (!empty($_SERVER['HTTP_FORWARDED']) && $this->validIp($_SERVER['HTTP_FORWARDED'])) {\n return $_SERVER['HTTP_FORWARDED'];\n }\n\n return $_SERVER['REMOTE_ADDR'];\n }", "function get_client_ip() {\n\t\t$ipaddress = '';\n\t\tif (isset($_SERVER['HTTP_CLIENT_IP']))\n\t\t\t$ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n\t\telse if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))\n\t\t\t$ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n\t\telse if(isset($_SERVER['HTTP_X_FORWARDED']))\n\t\t\t$ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n\t\telse if(isset($_SERVER['HTTP_FORWARDED_FOR']))\n\t\t\t$ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n\t\telse if(isset($_SERVER['HTTP_FORWARDED']))\n\t\t\t$ipaddress = $_SERVER['HTTP_FORWARDED'];\n\t\telse if(isset($_SERVER['REMOTE_ADDR']))\n\t\t\t$ipaddress = $_SERVER['REMOTE_ADDR'];\n\t\telse\n\t\t\t$ipaddress = 'UNKNOWN';\n\t\treturn $ipaddress;\n\t}", "function getClientIP() {\n if (isset($_SERVER['HTTP_CLIENT_IP']))\n return $_SERVER['HTTP_CLIENT_IP'];\n else if (isset($_SERVER['HTTP_X_FORWARDED_FOR']))\n return $_SERVER['HTTP_X_FORWARDED_FOR'];\n return $_SERVER['REMOTE_ADDR'];\n }", "function atkGetClientIp()\n{\n\tstatic $s_ip = NULL;\n\n\tif ($s_ip === NULL)\n\t{\n\t\tif (getenv(\"HTTP_CLIENT_IP\"))\n\t\t$s_ip = getenv(\"HTTP_CLIENT_IP\");\n\t\telseif (getenv(\"HTTP_X_FORWARDED_FOR\"))\n\t\t{\n\t\t\t$ipArray = explode(\",\", getenv(\"HTTP_X_FORWARDED_FOR\"));\n\t\t\t$s_ip = $ipArray[0];\n\t\t}\n\t\telseif (getenv(\"REMOTE_ADDR\"))\n\t\t$s_ip = getenv(\"REMOTE_ADDR\");\n\t\telse $s_ip = 'x.x.x.x';\n\t}\n\n\treturn $s_ip;\n}", "public function ip_address()\n {\n return $this->server('REMOTE_ADDR');\n }", "public function getClientIpAddress()\n\t{\n\t\tif(getenv('HTTP_CLIENT_IP') && strcasecmp(getenv('HTTP_CLIENT_IP'), 'unknown'))\n\t\t{\n\t\t\t$onlineip = getenv('HTTP_CLIENT_IP');\n\t\t}\n\t\t\n\t\tif(getenv('HTTP_X_FORWARDED_FOR') && strcasecmp(getenv('HTTP_X_FORWARDED_FOR'), 'unknown'))\n\t\t{\n\t\t\t$onlineip = getenv('HTTP_X_FORWARDED_FOR');\n\t\t}\n\t\t\n\t\tif(getenv('REMOTE_ADDR') && strcasecmp(getenv('REMOTE_ADDR'), 'unknown'))\n\t\t{\n\t\t\t$onlineip = getenv('REMOTE_ADDR');\n\t\t}\n\t\t\n\t\tif(isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] && strcasecmp($_SERVER['REMOTE_ADDR'], 'unknown'))\n\t\t{\n\t\t\t$onlineip = $_SERVER['REMOTE_ADDR'];\n\t\t}\n\t\t\n\t\tpreg_match(\"/[\\d\\.]{7,15}/\", $onlineip, $onlineipmatches);\n\t\treturn $onlineipmatches[0] ? $onlineipmatches[0] : 'unknown';\n\t}", "public function ipAddress(){\n return $this->getServerVar('REMOTE_ADDR');\n }", "public static function getClientIP(): string\n {\n if(isset($_SERVER['HTTP_CF_CONNECTING_IP']))\n {\n return $_SERVER['HTTP_CF_CONNECTING_IP'];\n }\n\n if(isset($_SERVER['HTTP_CLIENT_IP']))\n {\n return $_SERVER['HTTP_CLIENT_IP'];\n }\n\n if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))\n {\n return $_SERVER['HTTP_X_FORWARDED_FOR'];\n }\n\n if(isset($_SERVER['HTTP_X_FORWARDED']))\n {\n return $_SERVER['HTTP_X_FORWARDED'];\n }\n\n if(isset($_SERVER['HTTP_FORWARDED_FOR']))\n {\n return $_SERVER['HTTP_FORWARDED_FOR'];\n }\n\n if(isset($_SERVER['HTTP_FORWARDED']))\n {\n return $_SERVER['HTTP_FORWARDED'];\n }\n\n if(isset($_SERVER['REMOTE_ADDR']))\n {\n return $_SERVER['REMOTE_ADDR'];\n }\n\n if(getenv('HTTP_CLIENT_IP') !== False)\n {\n return getenv('HTTP_CLIENT_IP');\n }\n\n if(getenv('HTTP_X_FORWARDED_FOR'))\n {\n return getenv('HTTP_X_FORWARDED_FOR');\n }\n\n if(getenv('HTTP_X_FORWARDED'))\n {\n return getenv('HTTP_X_FORWARDED');\n }\n\n if(getenv('HTTP_FORWARDED_FOR'))\n {\n return getenv('HTTP_FORWARDED_FOR');\n }\n\n if(getenv('HTTP_FORWARDED'))\n {\n return getenv('HTTP_FORWARDED');\n }\n\n if(getenv('REMOTE_ADDR'))\n {\n return getenv('REMOTE_ADDR');\n }\n\n return '127.0.0.1';\n }", "function get_client_ip() {\r\n\t\t$ipaddress = '';\r\n\t\tif (isset($_SERVER['HTTP_CLIENT_IP']))\r\n\t\t\t$ipaddress = $_SERVER['HTTP_CLIENT_IP'];\r\n\t\telse if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))\r\n\t\t\t$ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\r\n\t\telse if(isset($_SERVER['HTTP_X_FORWARDED']))\r\n\t\t\t$ipaddress = $_SERVER['HTTP_X_FORWARDED'];\r\n\t\telse if(isset($_SERVER['HTTP_FORWARDED_FOR']))\r\n\t\t\t$ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\r\n\t\telse if(isset($_SERVER['HTTP_FORWARDED']))\r\n\t\t\t$ipaddress = $_SERVER['HTTP_FORWARDED'];\r\n\t\telse if(isset($_SERVER['REMOTE_ADDR']))\r\n\t\t\t$ipaddress = $_SERVER['REMOTE_ADDR'];\r\n\t\telse\r\n\t\t\t$ipaddress = 'UNKNOWN';\r\n\t\treturn $ipaddress;\r\n\t}", "protected function getIpAddress() {\n\n\t\tif (getenv('HTTP_CLIENT_IP')) {\n\t\t\t$ip_address = getenv('HTTP_CLIENT_IP');\n\t\t} elseif (getenv('HTTP_X_FORWARDED_FOR')) {\n\t\t\t$ip_address = getenv('HTTP_X_FORWARDED_FOR');\n\t\t} elseif (getenv('HTTP_X_FORWARDED')) {\n\t\t\t$ip_address = getenv('HTTP_X_FORWARDED');\n\t\t} elseif (getenv('HTTP_FORWARDED_FOR')) {\n\t\t\t$ip_address = getenv('HTTP_FORWARDED_FOR');\n\t\t} elseif (getenv('HTTP_FORWARDED')) {\n\t\t\t$ip_address = getenv('HTTP_FORWARDED');\n\t\t} else {\n\t\t\t$ip_address = $_SERVER['REMOTE_ADDR'];\n\t\t}\n\n\t\treturn $ip_address;\n\t}", "public function GetIP() {\n\n $Srv= $this->GetRequestContext()->SERVER;\n $TrustedProxies= $this->GetOption('TrustedProxies');\n\n // if visitor coming from trusted proxie get forwarded IP address\n if (isset($Srv['HTTP_X_FORWARDED_FOR']) && isset($Srv['REMOTE_ADDR'])\n && in_array($Srv['REMOTE_ADDR'], $TrustedProxies)) {\n // format: \"X-Forwarded-For: client1, proxy1, proxy2\"\n $Clients= explode(',', $Srv['HTTP_X_FORWARDED_FOR']);\n return trim(reset($Clients));\n }\n // HTTP_CLIENT_IP also can be set by certain proxies\n if (isset($Srv['HTTP_CLIENT_IP']) && isset($Srv['REMOTE_ADDR'])\n && in_array($Srv['REMOTE_ADDR'], $TrustedProxies)) {\n $Clients= explode(',', $Srv['HTTP_CLIENT_IP']);\n return trim(reset($Clients));\n }\n // ok, back to good old REMOTE_ADDR field, all other server fields are not reliable\n if (isset($Srv['REMOTE_ADDR'])) {\n return $Srv['REMOTE_ADDR'];\n }\n // not found\n return null;\n }", "public function client_ip() {\n if (!empty($_SERVER['HTTP_CLIENT_IP']) && self::validate_ip($_SERVER['HTTP_CLIENT_IP'])) {\n return $_SERVER['HTTP_CLIENT_IP'];\n }\n\n // check for IPs passing through proxies\n if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n // check if multiple ips exist in var\n if (strpos($_SERVER['HTTP_X_FORWARDED_FOR'], ',') !== false) {\n $iplist = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);\n foreach ($iplist as $ip) {\n if (self::validate_ip($ip))\n return $ip;\n }\n } else {\n if (self::validate_ip($_SERVER['HTTP_X_FORWARDED_FOR']))\n return $_SERVER['HTTP_X_FORWARDED_FOR'];\n }\n }\n if (!empty($_SERVER['HTTP_X_FORWARDED']) && self::validate_ip($_SERVER['HTTP_X_FORWARDED']))\n return $_SERVER['HTTP_X_FORWARDED'];\n if (!empty($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']) && self::validate_ip($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']))\n return $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'];\n if (!empty($_SERVER['HTTP_FORWARDED_FOR']) && self::validate_ip($_SERVER['HTTP_FORWARDED_FOR']))\n return $_SERVER['HTTP_FORWARDED_FOR'];\n if (!empty($_SERVER['HTTP_FORWARDED']) && self::validate_ip($_SERVER['HTTP_FORWARDED']))\n return $_SERVER['HTTP_FORWARDED'];\n\n // return unreliable ip since all else failed\n return $_SERVER['REMOTE_ADDR'];\n }", "public static function get_unsafe_client_ip()\n {\n }", "function get_client_ip() {\n $ipaddress = '';\n if (getenv('HTTP_CLIENT_IP'))\n $ipaddress = getenv('HTTP_CLIENT_IP');\n else if(getenv('HTTP_X_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_X_FORWARDED_FOR');\n else if(getenv('HTTP_X_FORWARDED'))\n $ipaddress = getenv('HTTP_X_FORWARDED');\n else if(getenv('HTTP_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_FORWARDED_FOR');\n else if(getenv('HTTP_FORWARDED'))\n $ipaddress = getenv('HTTP_FORWARDED');\n else if(getenv('REMOTE_ADDR'))\n $ipaddress = getenv('REMOTE_ADDR');\n else\n $ipaddress = 'UNKNOWN';\n return $ipaddress;\n}", "public function getIp(): string\n {\n return $this->getServer(self::REMOTE_ADDR);\n }", "function get_client_ip() {\n $ipaddress = '';\n\t\t\n\t\tif (isset($_SERVER['REMOTE_ADDR']))\n $ipaddress = $_SERVER['REMOTE_ADDR'];\n /* else if (isset($_SERVER['HTTP_CLIENT_IP']))\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n else if (isset($_SERVER['HTTP_X_FORWARDED_FOR']))\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n else if (isset($_SERVER['HTTP_X_FORWARDED']))\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n else if (isset($_SERVER['HTTP_FORWARDED_FOR']))\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n else if (isset($_SERVER['HTTP_FORWARDED']))\n $ipaddress = $_SERVER['HTTP_FORWARDED'];*/\n else\n $ipaddress = 'UNKNOWN';\n\n //To avoid multiple ip. That is because of ip forwarding.\n if (strpos($ipaddress, ',') !== false) {\n $ips = explode(',', $ipaddress);\n $ipaddress = trim($ips[0]); // taking the first one\n }\n return $ipaddress;\n }", "private static function resolveClientIp(): string{\n\t\treturn $_SERVER['REMOTE_ADDR'];\n\t}", "public function get_ip_address() {\n if (!empty($_SERVER['HTTP_CLIENT_IP']) ) {\n return $_SERVER['HTTP_CLIENT_IP'];\n }\n\n // check for IPs passing through proxies\n if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n // check if multiple ips exist in var\n if (strpos($_SERVER['HTTP_X_FORWARDED_FOR'], ',') !== false) {\n $iplist = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);\n foreach ($iplist as $ip) {\n //if (validate_ip($ip))\n return $ip;\n }\n } else {\n //if (validate_ip($_SERVER['HTTP_X_FORWARDED_FOR']))\n return $_SERVER['HTTP_X_FORWARDED_FOR'];\n }\n }\n if (!empty($_SERVER['HTTP_X_FORWARDED']) )\n return $_SERVER['HTTP_X_FORWARDED'];\n if (!empty($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']) )\n return $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'];\n if (!empty($_SERVER['HTTP_FORWARDED_FOR']) )\n return $_SERVER['HTTP_FORWARDED_FOR'];\n if (!empty($_SERVER['HTTP_FORWARDED']) )\n return $_SERVER['HTTP_FORWARDED'];\n\n // return unreliable ip since all else failed\n return $_SERVER['REMOTE_ADDR'];\n }", "protected function ip_address()\n\t{\n\t\t//return $this->ip2int(ipaddress::get());\n\t\t//return $this->ip2int(server('REMOTE_ADDR'));\n\t\treturn server('REMOTE_ADDR');\n\t}", "function get_client_ip() {\n\t$ipaddress = $_SERVER['REMOTE_ADDR'];\n return $ipaddress;\n}", "private function getClientIP()\n {\n if ( isset($_SERVER[\"HTTP_CF_CONNECTING_IP\"]) )\n {\n $_SERVER['REMOTE_ADDR'] = $_SERVER[\"HTTP_CF_CONNECTING_IP\"];\n }\n\n foreach ( array ( 'HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR' ) as $key )\n {\n if ( array_key_exists($key, $_SERVER) )\n {\n foreach ( explode(',', $_SERVER[$key]) as $ip )\n {\n $ip = trim($ip);\n\n //if ( filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) !== false )\n if ( filter_var($ip, FILTER_VALIDATE_IP) !== false )\n {\n return $ip;\n }\n }\n }\n }\n\n return null;\n }", "public function getIPAddress()\n {\n if (!empty($_SERVER['HTTP_CLIENT_IP']) && filter_var($_SERVER['HTTP_CLIENT_IP'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {\n $ip = $_SERVER['HTTP_CLIENT_IP'];\n } elseif (stristr($_SERVER['HTTP_X_FORWARDED_FOR'], ',') !== false) {\n $ip = trim(explode(',', $_SERVER['HTTP_X_FORWARDED_FOR'])[0]);\n\n if (!filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR']) && filter_var($_SERVER['HTTP_X_FORWARDED_FOR'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n } elseif (!empty($_SERVER['HTTP_X_REAL_IP']) && filter_var($_SERVER['HTTP_X_REAL_IP'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {\n $ip = $_SERVER['HTTP_X_REAL_IP'];\n } else {\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n\n if (!filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n\n return preg_replace(\"([^0-9\\.])\", '', $ip);\n }", "public static function getIP() {\n if ($ip = getenv('HTTP_CLIENT_IP')) {}\n else if ($ip = getenv('HTTP_X_FORWARDED_FOR')) {}\n else if ($ip = getenv('HTTP_X_FORWARDED')) {}\n else if ($ip = getenv('HTTP_FORWARDED_FOR')) {}\n else if ($ip = getenv('HTTP_FORWARDED')) {}\n else if ($ip = getenv('HTTP_REMOTE_ADDR')) {}\n else {\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n\n return $ip;\n }", "function get_client_ip(){\n\tif (!empty($_SERVER['HTTP_CLIENT_IP'])) {\n\t\treturn $_SERVER['HTTP_CLIENT_IP'];\n\t}\n\tif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n\t\treturn $_SERVER['HTTP_X_FORWARDED_FOR'];\n\t}\n\treturn (@$_SERVER['REMOTE_ADDR'])?:'000.000.000.000'; \n}", "public static function get_ip()\n\t{\n\t\treturn $_SERVER['REMOTE_ADDR'];\n\t}", "public static function getIp()\n {\n if (isset($_SERVER[\"HTTP_CF_CONNECTING_IP\"])) {\n $_SERVER['REMOTE_ADDR'] = $_SERVER[\"HTTP_CF_CONNECTING_IP\"];\n $_SERVER['HTTP_CLIENT_IP'] = $_SERVER[\"HTTP_CF_CONNECTING_IP\"];\n }\n $client = @$_SERVER['HTTP_CLIENT_IP'];\n $forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];\n $remote = @$_SERVER['REMOTE_ADDR'];\n\n if (filter_var($client, FILTER_VALIDATE_IP)) {\n $ip = $client;\n } elseif (filter_var($forward, FILTER_VALIDATE_IP)) {\n $ip = $forward;\n } else {\n $ip = $remote;\n }\n\n return $ip;\n }", "protected function get_ip() {\n\t\t// Loop over server keys that could contain the client IP address,\n\t\t// and return the first valid one.\n\t\tforeach ( array( 'REMOTE_ADDR', 'HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR' ) as $key ) {\n\t\t\tif ( isset( $_SERVER[ $key ] ) and preg_match( '~^(?:\\d{1,3}+\\.){3}\\d{1,3}+$~D', $_SERVER[ $key ] ) ) {\n\t\t\t\treturn $_SERVER[ $key ];\n\t\t\t}\n\t\t}\n\t}", "static function getIP()\r\n {\r\n return self::getRemoteIP();\r\n }", "public function ip()\r\n {\r\n return $this->server->get('REMOTE_ADDR');\r\n }", "function getClientIP() {\r\n $ip = '';\r\n if (isset($_SERVER['REMOTE_ADDR'])) {\r\n $ip = $_SERVER['REMOTE_ADDR'];\r\n } else if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {\r\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\r\n } else if (isset($_SERVER['HTTP_X_FORWARDED'])) {\r\n $ip = $_SERVER['HTTP_X_FORWARDED'];\r\n } else if (isset($_SERVER['HTTP_FORWARDED_FOR'])) {\r\n $ip = $_SERVER['HTTP_FORWARDED_FOR'];\r\n } else if (isset($_SERVER['HTTP_FORWARDED'])) {\r\n $ip = $_SERVER['HTTP_FORWARDED'];\r\n } else if (isset($_SERVER['HTTP_CLIENT_IP'])) {\r\n $ip = $_SERVER['HTTP_CLIENT_IP'];\r\n } else {\r\n $ip = '0.0.0.0';\r\n }\r\n return ($ip);\r\n }", "public function getIpAddress()\n\t{\n\t\t$ip = null;\n\t if (!empty($_SERVER['HTTP_CLIENT_IP'])) //check ip from share internet\n\t\t{\n\t\t\t$ip = $_SERVER['HTTP_CLIENT_IP'];\n\t\t}\n\t\telseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) //to check ip is pass from proxy\n\t\t{\n\t\t\t$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$ip = $_SERVER['REMOTE_ADDR'];\n\t\t}\n\t return trim($ip);\n\t}", "public function get_client_ip2() {\n $ipaddress = '';\n if (isset($_SERVER['HTTP_CLIENT_IP']))\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n else if (isset($_SERVER['HTTP_X_FORWARDED_FOR']))\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n else if (isset($_SERVER['HTTP_X_FORWARDED']))\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n else if (isset($_SERVER['HTTP_FORWARDED_FOR']))\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n else if (isset($_SERVER['HTTP_FORWARDED']))\n $ipaddress = $_SERVER['HTTP_FORWARDED'];\n else if (isset($_SERVER['REMOTE_ADDR']))\n $ipaddress = $_SERVER['REMOTE_ADDR'];\n else\n $ipaddress = 'UNKNOWN';\n return $ipaddress;\n }", "public static function getIP()\n {\n $ip = '0.0.0.0';\n if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n } elseif (isset($_SERVER['HTTP_VIA'])) {\n $ip = $_SERVER['HTTP_VIA'];\n } elseif (isset($_SERVER['REMOTE_ADDR'])) {\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n return $ip;\n }", "function get_client_ip() {\n $ipaddress = '';\n if (getenv('HTTP_CLIENT_IP'))\n $ipaddress = getenv('HTTP_CLIENT_IP');\n else if(getenv('HTTP_X_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_X_FORWARDED_FOR');\n else if(getenv('HTTP_X_FORWARDED'))\n $ipaddress = getenv('HTTP_X_FORWARDED');\n else if(getenv('HTTP_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_FORWARDED_FOR');\n else if(getenv('HTTP_FORWARDED'))\n $ipaddress = getenv('HTTP_FORWARDED');\n else if(getenv('REMOTE_ADDR'))\n $ipaddress = getenv('REMOTE_ADDR');\n else\n $ipaddress = 'UNKNOWN';\n return $ipaddress;\n}", "function get_client_ip() {\n $ipaddress = '';\n if (getenv('HTTP_CLIENT_IP'))\n $ipaddress = getenv('HTTP_CLIENT_IP');\n else if(getenv('HTTP_X_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_X_FORWARDED_FOR');\n else if(getenv('HTTP_X_FORWARDED'))\n $ipaddress = getenv('HTTP_X_FORWARDED');\n else if(getenv('HTTP_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_FORWARDED_FOR');\n else if(getenv('HTTP_FORWARDED'))\n $ipaddress = getenv('HTTP_FORWARDED');\n else if(getenv('REMOTE_ADDR'))\n $ipaddress = getenv('REMOTE_ADDR');\n else\n $ipaddress = 'UNKNOWN';\n return $ipaddress;\n}", "function get_client_ip() {\n $ipaddress = '';\n if (getenv('HTTP_CLIENT_IP'))\n $ipaddress = getenv('HTTP_CLIENT_IP');\n else if(getenv('HTTP_X_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_X_FORWARDED_FOR');\n else if(getenv('HTTP_X_FORWARDED'))\n $ipaddress = getenv('HTTP_X_FORWARDED');\n else if(getenv('HTTP_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_FORWARDED_FOR');\n else if(getenv('HTTP_FORWARDED'))\n $ipaddress = getenv('HTTP_FORWARDED');\n else if(getenv('REMOTE_ADDR'))\n $ipaddress = getenv('REMOTE_ADDR');\n else\n $ipaddress = 'UNKNOWN';\n return $ipaddress;\n}", "function get_client_ip() {\n $ipaddress = '';\n if (getenv('HTTP_CLIENT_IP'))\n $ipaddress = getenv('HTTP_CLIENT_IP');\n else if(getenv('HTTP_X_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_X_FORWARDED_FOR');\n else if(getenv('HTTP_X_FORWARDED'))\n $ipaddress = getenv('HTTP_X_FORWARDED');\n else if(getenv('HTTP_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_FORWARDED_FOR');\n else if(getenv('HTTP_FORWARDED'))\n $ipaddress = getenv('HTTP_FORWARDED');\n else if(getenv('REMOTE_ADDR'))\n $ipaddress = getenv('REMOTE_ADDR');\n else\n $ipaddress = 'UNKNOWN';\n return $ipaddress;\n}", "function get_client_ip() {\n $ipaddress = '';\n if (getenv('HTTP_CLIENT_IP'))\n $ipaddress = getenv('HTTP_CLIENT_IP');\n else if(getenv('HTTP_X_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_X_FORWARDED_FOR');\n else if(getenv('HTTP_X_FORWARDED'))\n $ipaddress = getenv('HTTP_X_FORWARDED');\n else if(getenv('HTTP_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_FORWARDED_FOR');\n else if(getenv('HTTP_FORWARDED'))\n $ipaddress = getenv('HTTP_FORWARDED');\n else if(getenv('REMOTE_ADDR'))\n $ipaddress = getenv('REMOTE_ADDR');\n else\n $ipaddress = 'UNKNOWN';\n return $ipaddress;\n}", "function get_client_ip() {\n $ipaddress = '';\n if (getenv('HTTP_CLIENT_IP'))\n $ipaddress = getenv('HTTP_CLIENT_IP');\n else if(getenv('HTTP_X_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_X_FORWARDED_FOR');\n else if(getenv('HTTP_X_FORWARDED'))\n $ipaddress = getenv('HTTP_X_FORWARDED');\n else if(getenv('HTTP_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_FORWARDED_FOR');\n else if(getenv('HTTP_FORWARDED'))\n $ipaddress = getenv('HTTP_FORWARDED');\n else if(getenv('REMOTE_ADDR'))\n $ipaddress = getenv('REMOTE_ADDR');\n else\n $ipaddress = 'UNKNOWN';\n return $ipaddress;\n}", "function get_client_ip() {\n $ipaddress = '';\n if (getenv('HTTP_CLIENT_IP'))\n $ipaddress = getenv('HTTP_CLIENT_IP');\n else if(getenv('HTTP_X_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_X_FORWARDED_FOR');\n else if(getenv('HTTP_X_FORWARDED'))\n $ipaddress = getenv('HTTP_X_FORWARDED');\n else if(getenv('HTTP_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_FORWARDED_FOR');\n else if(getenv('HTTP_FORWARDED'))\n $ipaddress = getenv('HTTP_FORWARDED');\n else if(getenv('REMOTE_ADDR'))\n $ipaddress = getenv('REMOTE_ADDR');\n else\n $ipaddress = 'UNKNOWN';\n return $ipaddress;\n}", "function get_client_ip() {\n $ipaddress = '';\n if (getenv('HTTP_CLIENT_IP'))\n $ipaddress = getenv('HTTP_CLIENT_IP');\n else if(getenv('HTTP_X_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_X_FORWARDED_FOR');\n else if(getenv('HTTP_X_FORWARDED'))\n $ipaddress = getenv('HTTP_X_FORWARDED');\n else if(getenv('HTTP_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_FORWARDED_FOR');\n else if(getenv('HTTP_FORWARDED'))\n $ipaddress = getenv('HTTP_FORWARDED');\n else if(getenv('REMOTE_ADDR'))\n $ipaddress = getenv('REMOTE_ADDR');\n else\n $ipaddress = 'UNKNOWN';\n return $ipaddress;\n}", "public function getIpAddress() {\n return $this->ipAddress;\n }", "static public function getIp() {\n if (isset($_SERVER['REMOTE_ADDR'])) return $_SERVER['REMOTE_ADDR'];\n return '127.0.0.1';\n }", "public function getIp()\n {\n return $this->get(self::IP);\n }", "public function getIp()\n {\n return $this->get(self::IP);\n }", "function getClientIP() {\r\n if (isset ($_SERVER ['HTTP_X_FORWARDED_FOR'])){ $clientIP = $_SERVER ['HTTP_X_FORWARDED_FOR']; }\r\n elseif (isset ($_SERVER ['HTTP_X_REAL_IP'])){ $clientIP = $_SERVER ['HTTP_X_REAL_IP']; }\r\n else { $clientIP = $_SERVER ['REMOTE_ADDR']; }\r\n return $clientIP;\r\n}", "public function getIP(): string\n {\n return (string)$this->env['REMOTE_ADDR'];\n }", "public static function getIP()\n\t{\n\t\tif (isset($_SERVER['HTTP_CLIENT_IP']) && ! empty($_SERVER['HTTP_CLIENT_IP'])) \n\t\t{\n\t\t $ip = $_SERVER['HTTP_CLIENT_IP'];\n\t\t} \n\t\telse if (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && ! empty($_SERVER['HTTP_X_FORWARDED_FOR'])) \n\t\t{\n\t\t $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n\t\t} \n\t\telse \n\t\t{\n\t\t $ip = (isset($_SERVER['REMOTE_ADDR'])) ? $_SERVER['REMOTE_ADDR'] : '0.0.0.0';\n\t\t}\n\n\t\t$ip = filter_var($ip, FILTER_VALIDATE_IP);\n\t\treturn ($ip === false) ? '0.0.0.0' : $ip;\t\n\t}", "public static function get_ip()\n {\n $ip = \"\";\n if ($_SERVER) {\n if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n } elseif (isset($_SERVER['HTTP_CLIENT_IP'])) {\n $ip = $_SERVER['HTTP_CLIENT_IP'];\n } else {\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n } else {\n if (getenv('HTTP_X_FORWARDED_FOR')) {\n $ip = getenv('HTTP_X_FORWARDED_FOR');\n } elseif (getenv('HTTP_CLIENT_IP')) {\n $ip = getenv('HTTP_CLIENT_IP');\n } else {\n $ip = getenv('REMOTE_ADDR');\n }\n }\n return $ip;\n }", "final protected function ipAddress()\n {\n return $this->container->make('request')->ip();\n }", "private function getIP()\n {\n $ipAddress = '';\n\n if (getenv('HTTP_CLIENT_IP')) {\n $ipAddress = getenv('HTTP_CLIENT_IP');\n } elseif (getenv('HTTP_X_FORWARDED_FOR')) {\n $ipAddress = getenv('HTTP_X_FORWARDED_FOR');\n } elseif (getenv('HTTP_X_FORWARDED')) {\n $ipAddress = getenv('HTTP_X_FORWARDED');\n } elseif (getenv('HTTP_FORWARDED_FOR')) {\n $ipAddress = getenv('HTTP_FORWARDED_FOR');\n } elseif (getenv('HTTP_FORWARDED')) {\n $ipAddress = getenv('HTTP_FORWARDED');\n } elseif (getenv('REMOTE_ADDR')) {\n $ipAddress = getenv('REMOTE_ADDR');\n } else {\n $ipAddress = 'UNKNOWN';\n }\n\n return $ipAddress;\n }", "private function get_ip(){\n $ip = '';\n if (!empty($_SERVER['HTTP_CLIENT_IP'])) {\n $ip = $_SERVER['HTTP_CLIENT_IP'];\n } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n } else {\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n return $ip;\n }", "public static function ip()\n {\n $ip = 'UNKNOWN';\n\n if (getenv('HTTP_CLIENT_IP')) {\n $ip = getenv('HTTP_CLIENT_IP');\n } elseif (getenv('HTTP_CF_CONNECTING_IP')) {\n $ip = getenv('HTTP_CF_CONNECTING_IP');\n } elseif (getenv('HTTP_X_FORWARDED_FOR') && Grav::instance()['config']->get('system.http_x_forwarded.ip')) {\n $ips = array_map('trim', explode(',', getenv('HTTP_X_FORWARDED_FOR')));\n $ip = array_shift($ips);\n } elseif (getenv('HTTP_X_FORWARDED') && Grav::instance()['config']->get('system.http_x_forwarded.ip')) {\n $ip = getenv('HTTP_X_FORWARDED');\n } elseif (getenv('HTTP_FORWARDED_FOR')) {\n $ip = getenv('HTTP_FORWARDED_FOR');\n } elseif (getenv('HTTP_FORWARDED')) {\n $ip = getenv('HTTP_FORWARDED');\n } elseif (getenv('REMOTE_ADDR')) {\n $ip = getenv('REMOTE_ADDR');\n }\n\n return $ip;\n }", "function ns_get_client_ip() {\n $ipaddress = '';\n if (getenv('HTTP_CLIENT_IP'))\n $ipaddress = getenv('HTTP_CLIENT_IP');\n else if(getenv('HTTP_X_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_X_FORWARDED_FOR');\n else if(getenv('HTTP_X_FORWARDED'))\n $ipaddress = getenv('HTTP_X_FORWARDED');\n else if(getenv('HTTP_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_FORWARDED_FOR');\n else if(getenv('HTTP_FORWARDED'))\n $ipaddress = getenv('HTTP_FORWARDED');\n else if(getenv('REMOTE_ADDR'))\n $ipaddress = getenv('REMOTE_ADDR');\n else\n $ipaddress = 'UNKNOWN';\n return $ipaddress;\n}", "protected function ipAddress(): string\n {\n return $this->container->make('request')->ip();\n }", "public function getIpAddress();", "public static function get_ip_address() {\n // check for shared internet/ISP IP\n if (!empty($_SERVER['HTTP_CLIENT_IP']) && self::validate_ip($_SERVER['HTTP_CLIENT_IP'])) {\n return $_SERVER['HTTP_CLIENT_IP'];\n }\n\n // check for IPs passing through proxies\n if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n // check if multiple ips exist in var\n if (strpos($_SERVER['HTTP_X_FORWARDED_FOR'], ',') !== false) {\n $iplist = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);\n foreach ($iplist as $ip) {\n if (self::validate_ip($ip))\n return $ip;\n }\n } else {\n if (self::validate_ip($_SERVER['HTTP_X_FORWARDED_FOR']))\n return $_SERVER['HTTP_X_FORWARDED_FOR'];\n }\n }\n if (!empty($_SERVER['HTTP_X_FORWARDED']) && self::validate_ip($_SERVER['HTTP_X_FORWARDED']))\n return $_SERVER['HTTP_X_FORWARDED'];\n if (!empty($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']) && self::validate_ip($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']))\n return $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'];\n if (!empty($_SERVER['HTTP_FORWARDED_FOR']) && self::validate_ip($_SERVER['HTTP_FORWARDED_FOR']))\n return $_SERVER['HTTP_FORWARDED_FOR'];\n if (!empty($_SERVER['HTTP_FORWARDED']) && self::validate_ip($_SERVER['HTTP_FORWARDED']))\n return $_SERVER['HTTP_FORWARDED'];\n\n // return unreliable ip since all else failed\n return $_SERVER['REMOTE_ADDR'];\n }", "function client_ip(){\r\n\tif(function_exists('apache_request_headers')){\r\n\r\n\t\t$headers = apache_request_headers();\r\n\r\n\t} else {\r\n\r\n\t\t$headers = $_SERVER;\r\n\r\n\t}\r\n\r\n\t//Get the forwarded IP if it exists\r\n\tif (array_key_exists('X-Forwarded-For', $headers ) and\r\n\t\tfilter_var($headers['X-Forwarded-For'],\r\n\t\t\tFILTER_VALIDATE_IP,\r\n\t\t\tFILTER_FLAG_IPV4)){\r\n\r\n\t\t$the_ip = $headers['X-Forwarded-For'];\r\n\r\n\t} elseif(array_key_exists('HTTP_X_FORWARDED_FOR', $headers) and\r\n\t\tfilter_var($headers['HTTP_X_FORWARDED_FOR'],\r\n\t\t\tFILTER_VALIDATE_IP, FILTER_FLAG_IPV4 )){\r\n\r\n\t\t$the_ip = $headers['HTTP_X_FORWARDED_FOR'];\r\n\r\n\t} else {\r\n\t\t\r\n\t\t$the_ip = filter_var($_SERVER['REMOTE_ADDR'],\r\n\t\t\tFILTER_VALIDATE_IP, FILTER_FLAG_IPV4);\r\n\r\n\t}\r\n\r\n\treturn $the_ip;\r\n}", "public static function IP()\n {\n return isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '::1';\n }", "protected function get_ip_address() {\r\n\t\tif (!empty($_SERVER['HTTP_CLIENT_IP'])) { //check ip from share internet\r\n\t\t\t$ip=$_SERVER['HTTP_CLIENT_IP'];\r\n\t\t} elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { //to check ip is pass from proxy\r\n\t\t\t$ip=$_SERVER['HTTP_X_FORWARDED_FOR'];\r\n\t\t} else {\r\n\t\t\t$ip=$_SERVER['REMOTE_ADDR'];\r\n\t\t}\r\n\t\treturn $ip;\r\n\t}", "function dokan_get_client_ip() {\n $ipaddress = '';\n\n if ( getenv( 'HTTP_CLIENT_IP' ) )\n $ipaddress = getenv( 'HTTP_CLIENT_IP' );\n else if ( getenv( 'HTTP_X_FORWARDED_FOR' ) )\n $ipaddress = getenv( 'HTTP_X_FORWARDED_FOR' & quot );\n else if ( getenv( 'HTTP_X_FORWARDED' ) )\n $ipaddress = getenv( 'HTTP_X_FORWARDED' );\n else if ( getenv( 'HTTP_FORWARDED_FOR' ) )\n $ipaddress = getenv( 'HTTP_FORWARDED_FOR' );\n else if ( getenv( 'HTTP_X_CLUSTER_CLIENT_IP' ) )\n $ipaddress = getenv( 'HTTP_FORWARDED_FOR' );\n else if ( getenv( 'HTTP_FORWARDED' ) )\n $ipaddress = getenv( 'HTTP_FORWARDED' );\n else if ( getenv( 'REMOTE_ADDR' ) )\n $ipaddress = getenv( 'REMOTE_ADDR' );\n else\n $ipaddress = 'UNKNOWN';\n\n return $ipaddress;\n}", "function getClientIp() {\n foreach (array('HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR') as $key) {\n if (array_key_exists($key, $_SERVER) === true) {\n foreach (explode(',', $_SERVER[$key]) as $ip) {\n if (filter_var($ip, FILTER_VALIDATE_IP) !== false) {\n return $ip;\n }\n }\n }\n }\n }", "public function getIP(){\n $ip = '';\n foreach(['HTTP_CLIENT_IP','HTTP_X_FORWARDED_FOR','HTTP_X_FORWARDED','HTTP_FORWARDED_FOR','HTTP_FORWARDED','REMOTE_ADDR'] as $search){\n if(getenv($search)){\n $ip = getenv($search);\n break;\n }\n }\n\n return $this->installIP($ip);\n }", "public function getIpAddress()\n {\n return $this->getRequest()->ip;\n }", "public static function get_ip_address()\n {\n foreach (array(\n 'HTTP_CLIENT_IP',\n 'HTTP_X_FORWARDED_FOR',\n 'HTTP_X_FORWARDED',\n 'HTTP_X_CLUSTER_CLIENT_IP',\n 'HTTP_FORWARDED_FOR',\n 'HTTP_FORWARDED',\n 'REMOTE_ADDR') as $key) {\n if (array_key_exists($key, $_SERVER) === true) {\n foreach (explode(',', $_SERVER[$key]) as $ip) {\n if (filter_var($ip, FILTER_VALIDATE_IP) !== false) {\n return $ip;\n }\n }\n }\n }\n }", "function get_client_ip() {\n $ipaddress = '';\n if (isset($_SERVER['HTTP_CLIENT_IP']))\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n else if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n else if(isset($_SERVER['HTTP_X_FORWARDED']))\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n else if(isset($_SERVER['HTTP_FORWARDED_FOR']))\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n else if(isset($_SERVER['HTTP_FORWARDED']))\n $ipaddress = $_SERVER['HTTP_FORWARDED'];\n else if(isset($_SERVER['REMOTE_ADDR']))\n $ipaddress = $_SERVER['REMOTE_ADDR'];\n else\n $ipaddress = 'UNKNOWN';\n return $ipaddress;\n}", "function get_client_ip() {\n $ipaddress = '';\n if (isset($_SERVER['HTTP_CLIENT_IP']))\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n else if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n else if(isset($_SERVER['HTTP_X_FORWARDED']))\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n else if(isset($_SERVER['HTTP_FORWARDED_FOR']))\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n else if(isset($_SERVER['HTTP_FORWARDED']))\n $ipaddress = $_SERVER['HTTP_FORWARDED'];\n else if(isset($_SERVER['REMOTE_ADDR']))\n $ipaddress = $_SERVER['REMOTE_ADDR'];\n else\n $ipaddress = 'UNKNOWN';\n return $ipaddress;\n}", "function get_client_ip() {\n $ipaddress = '';\n if (isset($_SERVER['HTTP_CLIENT_IP']))\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n else if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n else if(isset($_SERVER['HTTP_X_FORWARDED']))\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n else if(isset($_SERVER['HTTP_FORWARDED_FOR']))\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n else if(isset($_SERVER['HTTP_FORWARDED']))\n $ipaddress = $_SERVER['HTTP_FORWARDED'];\n else if(isset($_SERVER['REMOTE_ADDR']))\n $ipaddress = $_SERVER['REMOTE_ADDR'];\n else\n $ipaddress = 'UNKNOWN';\n return $ipaddress;\n}", "function get_ip_address() {\n // check for shared internet/ISP IP\n if (!empty($_SERVER['HTTP_CLIENT_IP']) && $this->validate_ip($_SERVER['HTTP_CLIENT_IP'])) {\n return $_SERVER['HTTP_CLIENT_IP'];\n }\n\n // check for IPs passing through proxies\n if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n // check if multiple ips exist in var\n if (strpos($_SERVER['HTTP_X_FORWARDED_FOR'], ',') !== false) {\n $iplist = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);\n foreach ($iplist as $ip) {\n if ($this->validate_ip($ip))\n return $ip;\n }\n } else {\n if ($this->validate_ip($_SERVER['HTTP_X_FORWARDED_FOR']))\n return $_SERVER['HTTP_X_FORWARDED_FOR'];\n }\n }\n if (!empty($_SERVER['HTTP_X_FORWARDED']) && $this->validate_ip($_SERVER['HTTP_X_FORWARDED']))\n return $_SERVER['HTTP_X_FORWARDED'];\n if (!empty($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']) && $this->validate_ip($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']))\n return $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'];\n if (!empty($_SERVER['HTTP_FORWARDED_FOR']) && $this->validate_ip($_SERVER['HTTP_FORWARDED_FOR']))\n return $_SERVER['HTTP_FORWARDED_FOR'];\n if (!empty($_SERVER['HTTP_FORWARDED']) && $this->validate_ip($_SERVER['HTTP_FORWARDED']))\n return $_SERVER['HTTP_FORWARDED'];\n\n // return unreliable ip since all else failed\n return $_SERVER['REMOTE_ADDR'];\n }" ]
[ "0.8571236", "0.8493415", "0.8443998", "0.8423234", "0.8409408", "0.8349934", "0.83151245", "0.83077615", "0.82909614", "0.824256", "0.8226428", "0.8221257", "0.82134783", "0.82002693", "0.81766695", "0.8176429", "0.8175878", "0.81451994", "0.81253725", "0.81174713", "0.807512", "0.8050386", "0.80293554", "0.80273694", "0.8018509", "0.801827", "0.80097115", "0.80054855", "0.79945505", "0.7993024", "0.798382", "0.79746675", "0.7963313", "0.79537433", "0.7951888", "0.7947206", "0.7938031", "0.7936387", "0.79346883", "0.79257625", "0.79254353", "0.7922525", "0.79081005", "0.78779894", "0.7861432", "0.7856672", "0.7843271", "0.78363866", "0.783412", "0.78214973", "0.7806377", "0.7789554", "0.777347", "0.7768841", "0.7759488", "0.7758182", "0.77569526", "0.7744898", "0.7742072", "0.7733529", "0.77212113", "0.7718244", "0.7715998", "0.77027816", "0.7685989", "0.7685989", "0.7685989", "0.7685989", "0.7685989", "0.7685989", "0.7685989", "0.7685989", "0.76852787", "0.767715", "0.7670943", "0.7670943", "0.7667128", "0.76657027", "0.76646906", "0.76634324", "0.7654769", "0.76434934", "0.7638904", "0.7637973", "0.7634387", "0.76281565", "0.7627468", "0.76197696", "0.7608329", "0.76066947", "0.75946", "0.7593473", "0.75864315", "0.75803113", "0.7575809", "0.75747806", "0.7571964", "0.7571964", "0.7571964", "0.7558129" ]
0.8412161
4
Get client location from IP address.
public static function get_location_from_ip( $ip_address ) { return IBX_WPFomo_Helper::get_location_from_ip( $ip_address ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function getIpLocation($ip);", "public static function get_client_ip() {\n\t\t\treturn IBX_WPFomo_Helper::get_client_ip();\n\t\t}", "public static function get_client_ip()\r\n\t{\r\n\t\treturn $_SERVER['HTTP_CLIENT_IP'];\r\n\t}", "function get_client_ip() {\n $ipaddress = '';\n\t\t\n\t\tif (isset($_SERVER['REMOTE_ADDR']))\n $ipaddress = $_SERVER['REMOTE_ADDR'];\n /* else if (isset($_SERVER['HTTP_CLIENT_IP']))\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n else if (isset($_SERVER['HTTP_X_FORWARDED_FOR']))\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n else if (isset($_SERVER['HTTP_X_FORWARDED']))\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n else if (isset($_SERVER['HTTP_FORWARDED_FOR']))\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n else if (isset($_SERVER['HTTP_FORWARDED']))\n $ipaddress = $_SERVER['HTTP_FORWARDED'];*/\n else\n $ipaddress = 'UNKNOWN';\n\n //To avoid multiple ip. That is because of ip forwarding.\n if (strpos($ipaddress, ',') !== false) {\n $ips = explode(',', $ipaddress);\n $ipaddress = trim($ips[0]); // taking the first one\n }\n return $ipaddress;\n }", "public function getIpClient() {\r\n if (!empty($_SERVER['HTTP_CLIENT_IP'])) {\r\n $ip = $_SERVER['HTTP_CLIENT_IP'];\r\n }\r\n elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\r\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\r\n }\r\n else {\r\n $ip = $_SERVER['REMOTE_ADDR'];\r\n }\r\n return $ip;\r\n }", "public function getUserLocation() {\n if (!empty($_SERVER['HTTP_CLIENT_IP'])) {\n $ip_note = 'HTTP_CLIENT_IP='.$_SERVER['HTTP_CLIENT_IP'];\n $ip = $_SERVER['HTTP_CLIENT_IP'];\n } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n $ip_note = 'HTTP_X_FORWARDED_FOR='.$_SERVER['HTTP_X_FORWARDED_FOR'];\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n } else {\n $ip_note = 'REMOTE_ADDR='.$_SERVER['REMOTE_ADDR'];\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n $ip = '117.20.119.245';\n $loc = file_get_contents(\"http://ipinfo.io/\".$ip.\"/loc\");\n\n if($loc) {\n $array_loc = explode(',', $loc);\n return ['lat'=> ((isset($array_loc[0]))? $array_loc[0]:'') ,'lon'=> ((isset($array_loc[1]))? $array_loc[1]:'')];\n }\n\n return ['lat'=>'','lon'=>''];\n\n }", "function get_client_ip() {\n $ipaddress = '';\n if (getenv('HTTP_CLIENT_IP'))\n $ipaddress = getenv('HTTP_CLIENT_IP');\n else if (getenv('HTTP_X_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_X_FORWARDED_FOR');\n else if (getenv('HTTP_X_FORWARDED'))\n $ipaddress = getenv('HTTP_X_FORWARDED');\n else if (getenv('HTTP_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_FORWARDED_FOR');\n else if (getenv('HTTP_FORWARDED'))\n $ipaddress = getenv('HTTP_FORWARDED');\n else if (getenv('REMOTE_ADDR'))\n $ipaddress = getenv('REMOTE_ADDR');\n else\n $ipaddress = 'UNKNOWN';\n $ipadsplit = explode(\",\", $ipaddress);\n if (count($ipadsplit) > 1) {\n $ipaddress = trim($ipadsplit[1]);\n }\n return $ipaddress;\n }", "protected function getClientIP(){\n if (!empty($_SERVER['HTTP_CLIENT_IP'])) \n {\n $ip_address = $_SERVER['HTTP_CLIENT_IP'];\n }\n //whether ip is from proxy\n elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) \n {\n $ip_address = $_SERVER['HTTP_X_FORWARDED_FOR'];\n }\n //whether ip is from remote address\n else\n {\n $ip_address = $_SERVER['REMOTE_ADDR'];\n }\n return $ip_address;\n }", "function query_client_ip()\n{\n\tglobal $_SERVER;\n\t\n\tif(isset($_SERVER['HTTP_CLIENT_IP']))\n\t{\n\t\t$clientIP = $_SERVER['HTTP_CLIENT_IP'];\n\t}\n\telseif(isset($_SERVER['HTTP_X_FORWARDED_FOR']) AND preg_match_all('#\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}#s', $_SERVER['HTTP_X_FORWARDED_FOR'], $matches))\n\t{\n\t\t// check for internal ips by looking at the first octet\n\t\tforeach($matches[0] AS $ip)\n\t\t{\n\t\t\tif(!preg_match(\"#^(10|172\\.16|192\\.168)\\.#\", $ip))\n\t\t\t{\n\t\t\t\t$clientIP = $ip;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t}\n\telseif(isset($_SERVER['HTTP_FROM']))\n\t{\n\t\t$clientIP = $_SERVER['HTTP_FROM'];\n\t}\n\telse\n\t{\n\t\t$clientIP = $_SERVER['REMOTE_ADDR'];\n\t}\n\n\treturn $clientIP;\n}", "function get_client_ip() {\n\t\t$ipaddress = '';\n\t\tif (isset($_SERVER['HTTP_CLIENT_IP']))\n\t\t\t$ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n\t\telse if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))\n\t\t\t$ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n\t\telse if(isset($_SERVER['HTTP_X_FORWARDED']))\n\t\t\t$ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n\t\telse if(isset($_SERVER['HTTP_FORWARDED_FOR']))\n\t\t\t$ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n\t\telse if(isset($_SERVER['HTTP_FORWARDED']))\n\t\t\t$ipaddress = $_SERVER['HTTP_FORWARDED'];\n\t\telse if(isset($_SERVER['REMOTE_ADDR']))\n\t\t\t$ipaddress = $_SERVER['REMOTE_ADDR'];\n\t\telse\n\t\t\t$ipaddress = 'UNKNOWN';\n\t\treturn $ipaddress;\n\t}", "public function get_client_ip() {\n if (isset($_SERVER['HTTP_CLIENT_IP'])) {\n $ip = $_SERVER['HTTP_CLIENT_IP'];\n } elseif (isset($_SERVER['REMOTE_ADDR'])) {\n $ip = $_SERVER['REMOTE_ADDR'];\n } else {\n $ip = '0.0.0.0';\n }\n\n return $ip;\n }", "function get_client_ip() {\r\n\t\t$ipaddress = '';\r\n\t\tif (isset($_SERVER['HTTP_CLIENT_IP']))\r\n\t\t\t$ipaddress = $_SERVER['HTTP_CLIENT_IP'];\r\n\t\telse if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))\r\n\t\t\t$ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\r\n\t\telse if(isset($_SERVER['HTTP_X_FORWARDED']))\r\n\t\t\t$ipaddress = $_SERVER['HTTP_X_FORWARDED'];\r\n\t\telse if(isset($_SERVER['HTTP_FORWARDED_FOR']))\r\n\t\t\t$ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\r\n\t\telse if(isset($_SERVER['HTTP_FORWARDED']))\r\n\t\t\t$ipaddress = $_SERVER['HTTP_FORWARDED'];\r\n\t\telse if(isset($_SERVER['REMOTE_ADDR']))\r\n\t\t\t$ipaddress = $_SERVER['REMOTE_ADDR'];\r\n\t\telse\r\n\t\t\t$ipaddress = 'UNKNOWN';\r\n\t\treturn $ipaddress;\r\n\t}", "function get_ip_address_from_client() {\n $ipaddress = '';\n if (getenv('HTTP_CLIENT_IP'))\n $ipaddress = getenv('HTTP_CLIENT_IP');\n else if(getenv('HTTP_X_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_X_FORWARDED_FOR');\n else if(getenv('HTTP_X_FORWARDED'))\n $ipaddress = getenv('HTTP_X_FORWARDED');\n else if(getenv('HTTP_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_FORWARDED_FOR');\n else if(getenv('HTTP_FORWARDED'))\n $ipaddress = getenv('HTTP_FORWARDED');\n else if(getenv('REMOTE_ADDR'))\n $ipaddress = getenv('REMOTE_ADDR');\n else\n $ipaddress = 'UNKNOWN';\n \n return $ipaddress;\n}", "function get_client_ip() {\r\n $ipaddress = '';\r\n if (getenv('HTTP_CLIENT_IP'))\r\n $ipaddress = getenv('HTTP_CLIENT_IP');\r\n else if(getenv('HTTP_X_FORWARDED_FOR'))\r\n $ipaddress = getenv('HTTP_X_FORWARDED_FOR');\r\n else if(getenv('HTTP_X_FORWARDED'))\r\n $ipaddress = getenv('HTTP_X_FORWARDED');\r\n else if(getenv('HTTP_FORWARDED_FOR'))\r\n $ipaddress = getenv('HTTP_FORWARDED_FOR');\r\n else if(getenv('HTTP_FORWARDED'))\r\n $ipaddress = getenv('HTTP_FORWARDED');\r\n else if(getenv('REMOTE_ADDR'))\r\n $ipaddress = getenv('REMOTE_ADDR');\r\n else\r\n $ipaddress = 'UNKNOWN';\r\n return $ipaddress;\r\n }", "public function get_client_ip2() {\n $ipaddress = '';\n if (isset($_SERVER['HTTP_CLIENT_IP']))\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n else if (isset($_SERVER['HTTP_X_FORWARDED_FOR']))\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n else if (isset($_SERVER['HTTP_X_FORWARDED']))\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n else if (isset($_SERVER['HTTP_FORWARDED_FOR']))\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n else if (isset($_SERVER['HTTP_FORWARDED']))\n $ipaddress = $_SERVER['HTTP_FORWARDED'];\n else if (isset($_SERVER['REMOTE_ADDR']))\n $ipaddress = $_SERVER['REMOTE_ADDR'];\n else\n $ipaddress = 'UNKNOWN';\n return $ipaddress;\n }", "protected function get_ip() {\n\t\t// Loop over server keys that could contain the client IP address,\n\t\t// and return the first valid one.\n\t\tforeach ( array( 'REMOTE_ADDR', 'HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR' ) as $key ) {\n\t\t\tif ( isset( $_SERVER[ $key ] ) and preg_match( '~^(?:\\d{1,3}+\\.){3}\\d{1,3}+$~D', $_SERVER[ $key ] ) ) {\n\t\t\t\treturn $_SERVER[ $key ];\n\t\t\t}\n\t\t}\n\t}", "function get_client_ip() {\n $ipaddress = '';\n if (getenv('HTTP_CLIENT_IP'))\n $ipaddress = getenv('HTTP_CLIENT_IP');\n else if(getenv('HTTP_X_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_X_FORWARDED_FOR');\n else if(getenv('HTTP_X_FORWARDED'))\n $ipaddress = getenv('HTTP_X_FORWARDED');\n else if(getenv('HTTP_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_FORWARDED_FOR');\n else if(getenv('HTTP_FORWARDED'))\n $ipaddress = getenv('HTTP_FORWARDED');\n else if(getenv('REMOTE_ADDR'))\n $ipaddress = getenv('REMOTE_ADDR');\n else\n $ipaddress = 'UNKNOWN';\n return $ipaddress;\n }", "public function getClientIP()\n {\n if (isset($_SERVER['HTTP_CLIENT_IP'])) {\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n } else if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n } else if (isset($_SERVER['HTTP_X_FORWARDED'])) {\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n } else if (isset($_SERVER['HTTP_FORWARDED_FOR'])) {\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n } else if (isset($_SERVER['HTTP_FORWARDED'])) {\n $ipaddress = $_SERVER['HTTP_FORWARDED'];\n } else if (isset($_SERVER['REMOTE_ADDR'])) {\n $ipaddress = $_SERVER['REMOTE_ADDR'];\n } else {\n $ipaddress = 'UNKNOWN IP';\n }\n return $ipaddress;\n }", "public function get_client_ip() {\n\t\t$ipaddress = '';\n\t\tif (getenv('HTTP_CLIENT_IP'))\n\t\t\t$ipaddress = getenv('HTTP_CLIENT_IP');\n\t\telse if(getenv('HTTP_X_FORWARDED_FOR'))\n\t\t\t$ipaddress = getenv('HTTP_X_FORWARDED_FOR');\n\t\telse if(getenv('HTTP_X_FORWARDED'))\n\t\t\t$ipaddress = getenv('HTTP_X_FORWARDED');\n\t\telse if(getenv('HTTP_FORWARDED_FOR'))\n\t\t\t$ipaddress = getenv('HTTP_FORWARDED_FOR');\n\t\telse if(getenv('HTTP_FORWARDED'))\n\t\t $ipaddress = getenv('HTTP_FORWARDED');\n\t\telse if(getenv('REMOTE_ADDR'))\n\t\t\t$ipaddress = getenv('REMOTE_ADDR');\n\t\telse\n\t\t\t$ipaddress = 'UNKNOWN';\n\t\treturn $ipaddress;\n\t}", "private function getClientIP()\n {\n if ( isset($_SERVER[\"HTTP_CF_CONNECTING_IP\"]) )\n {\n $_SERVER['REMOTE_ADDR'] = $_SERVER[\"HTTP_CF_CONNECTING_IP\"];\n }\n\n foreach ( array ( 'HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR' ) as $key )\n {\n if ( array_key_exists($key, $_SERVER) )\n {\n foreach ( explode(',', $_SERVER[$key]) as $ip )\n {\n $ip = trim($ip);\n\n //if ( filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) !== false )\n if ( filter_var($ip, FILTER_VALIDATE_IP) !== false )\n {\n return $ip;\n }\n }\n }\n }\n\n return null;\n }", "public function _before_index(){\n// $ip = get_client_ip();\n// $res = $ip_class->getlocation('113.102.162.102');\n// print_r($res);\n \n \n }", "public function getClientIp(): string {\n $s = $this->server();\n if (array_key_exists('HTTP_CLIENTIP', $s)) {\n if (!empty($s['HTTP_CLIENTIP'])) {\n return $s['HTTP_CLIENTIP'];\n }\n }\n if (array_key_exists('HTTP_X_FORWARDED_FOR', $s) && !empty($s['HTTP_X_FORWARDED_FOR'])) {\n $addresses = explode(',', $s['HTTP_X_FORWARDED_FOR']);\n while (count($addresses)) {\n $ip = @trim(array_shift($addresses));\n if ($ip === '') {\n continue;\n }\n if (!self::isLanIp($ip)) {\n return $ip;\n }\n }\n }\n return $s['REMOTE_ADDR'];\n }", "function get_client_ip() {\n\t\t$ipaddress = null;\n\t\tif (getenv('HTTP_CLIENT_IP'))\n\t\t\t$ipaddress = getenv('HTTP_CLIENT_IP');\n\t\telse if(getenv('HTTP_X_FORWARDED_FOR'))\n\t\t\t$ipaddress = getenv('HTTP_X_FORWARDED_FOR');\n\t\telse if(getenv('HTTP_X_FORWARDED'))\n\t\t\t$ipaddress = getenv('HTTP_X_FORWARDED');\n\t\telse if(getenv('HTTP_FORWARDED_FOR'))\n\t\t\t$ipaddress = getenv('HTTP_FORWARDED_FOR');\n\t\telse if(getenv('HTTP_FORWARDED'))\n\t\t$ipaddress = getenv('HTTP_FORWARDED');\n\t\telse if(getenv('REMOTE_ADDR'))\n\t\t\t$ipaddress = getenv('REMOTE_ADDR');\n\t\telse\n\t\t\t$ipaddress = null;\n\t\treturn $ipaddress;\n\t}", "public function getClientIpAddress()\n\t{\n\t\tif(getenv('HTTP_CLIENT_IP') && strcasecmp(getenv('HTTP_CLIENT_IP'), 'unknown'))\n\t\t{\n\t\t\t$onlineip = getenv('HTTP_CLIENT_IP');\n\t\t}\n\t\t\n\t\tif(getenv('HTTP_X_FORWARDED_FOR') && strcasecmp(getenv('HTTP_X_FORWARDED_FOR'), 'unknown'))\n\t\t{\n\t\t\t$onlineip = getenv('HTTP_X_FORWARDED_FOR');\n\t\t}\n\t\t\n\t\tif(getenv('REMOTE_ADDR') && strcasecmp(getenv('REMOTE_ADDR'), 'unknown'))\n\t\t{\n\t\t\t$onlineip = getenv('REMOTE_ADDR');\n\t\t}\n\t\t\n\t\tif(isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] && strcasecmp($_SERVER['REMOTE_ADDR'], 'unknown'))\n\t\t{\n\t\t\t$onlineip = $_SERVER['REMOTE_ADDR'];\n\t\t}\n\t\t\n\t\tpreg_match(\"/[\\d\\.]{7,15}/\", $onlineip, $onlineipmatches);\n\t\treturn $onlineipmatches[0] ? $onlineipmatches[0] : 'unknown';\n\t}", "static function getClientIP() {\n if ($_SERVER['HTTP_CLIENT_IP'])\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n else if($_SERVER['HTTP_X_FORWARDED_FOR'])\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n else if($_SERVER['HTTP_X_FORWARDED'])\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n else if($_SERVER['HTTP_FORWARDED_FOR'])\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n else if($_SERVER['HTTP_FORWARDED'])\n $ipaddress = $_SERVER['HTTP_FORWARDED'];\n else if($_SERVER['REMOTE_ADDR'])\n $ipaddress = $_SERVER['REMOTE_ADDR'];\n else\n $ipaddress = 'UNKNOWN';\n\n return $ipaddress;\n }", "function get_client_ip() {\n\t $ipaddress = '';\n\t if (getenv('HTTP_CLIENT_IP'))\n\t $ipaddress = getenv('HTTP_CLIENT_IP');\n\t else if(getenv('HTTP_X_FORWARDED_FOR'))\n\t $ipaddress = getenv('HTTP_X_FORWARDED_FOR');\n\t else if(getenv('HTTP_X_FORWARDED'))\n\t $ipaddress = getenv('HTTP_X_FORWARDED');\n\t else if(getenv('HTTP_FORWARDED_FOR'))\n\t $ipaddress = getenv('HTTP_FORWARDED_FOR');\n\t else if(getenv('HTTP_FORWARDED'))\n\t $ipaddress = getenv('HTTP_FORWARDED');\n\t else if(getenv('REMOTE_ADDR'))\n\t $ipaddress = getenv('REMOTE_ADDR');\n\t else\n\t $ipaddress = 'UNKNOWN';\n\t return $ipaddress;\n\t}", "public function client_ip() {\n if (!empty($_SERVER['HTTP_CLIENT_IP']) && self::validate_ip($_SERVER['HTTP_CLIENT_IP'])) {\n return $_SERVER['HTTP_CLIENT_IP'];\n }\n\n // check for IPs passing through proxies\n if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n // check if multiple ips exist in var\n if (strpos($_SERVER['HTTP_X_FORWARDED_FOR'], ',') !== false) {\n $iplist = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);\n foreach ($iplist as $ip) {\n if (self::validate_ip($ip))\n return $ip;\n }\n } else {\n if (self::validate_ip($_SERVER['HTTP_X_FORWARDED_FOR']))\n return $_SERVER['HTTP_X_FORWARDED_FOR'];\n }\n }\n if (!empty($_SERVER['HTTP_X_FORWARDED']) && self::validate_ip($_SERVER['HTTP_X_FORWARDED']))\n return $_SERVER['HTTP_X_FORWARDED'];\n if (!empty($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']) && self::validate_ip($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']))\n return $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'];\n if (!empty($_SERVER['HTTP_FORWARDED_FOR']) && self::validate_ip($_SERVER['HTTP_FORWARDED_FOR']))\n return $_SERVER['HTTP_FORWARDED_FOR'];\n if (!empty($_SERVER['HTTP_FORWARDED']) && self::validate_ip($_SERVER['HTTP_FORWARDED']))\n return $_SERVER['HTTP_FORWARDED'];\n\n // return unreliable ip since all else failed\n return $_SERVER['REMOTE_ADDR'];\n }", "public static function getClientIP(): string {\n\n if (!empty($_SERVER['HTTP_CLIENT_IP'])) {\n $ip = $_SERVER['HTTP_CLIENT_IP'];\n } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n } else {\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n\n return $ip;\n\n }", "private function findIP()\n {\n if (!empty($_SERVER['HTTP_CLIENT_IP'])) {\n $ip_address = $_SERVER['HTTP_CLIENT_IP'];\n }\n //whether ip is from proxy\n elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n $ip_address = $_SERVER['HTTP_X_FORWARDED_FOR'];\n }\n //whether ip is from remote address\n else {\n $ip_address = $_SERVER['REMOTE_ADDR'];\n }\n return $ip_address;\n }", "public function get_client_ip() \n\t{\n $ipaddress = '';\n if (getenv('HTTP_CLIENT_IP'))\n $ipaddress = getenv('HTTP_CLIENT_IP');\n else if(getenv('HTTP_X_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_X_FORWARDED_FOR');\n else if(getenv('HTTP_X_FORWARDED'))\n $ipaddress = getenv('HTTP_X_FORWARDED');\n else if(getenv('HTTP_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_FORWARDED_FOR');\n else if(getenv('HTTP_FORWARDED'))\n $ipaddress = getenv('HTTP_FORWARDED');\n else if(getenv('REMOTE_ADDR'))\n $ipaddress = getenv('REMOTE_ADDR');\n else\n $ipaddress = 'UNKNOWN';\n return $ipaddress;\n}", "private static function resolveClientIp(): string{\n\t\treturn $_SERVER['REMOTE_ADDR'];\n\t}", "function clientIp()\n {\n $ip_address = 'UNKNOWN';\n $header_arr = array('HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR');\n foreach ($header_arr as $header) {\n if (getenv($header))\n $ip_address = getenv($header);\n }\n return $ip_address;\n }", "public static function get_client_ip()\r\n {\r\n $ipaddress = '';\r\n if (getenv('HTTP_CLIENT_IP')) {\r\n $ipaddress = getenv('HTTP_CLIENT_IP');\r\n } elseif (getenv('HTTP_X_FORWARDED_FOR')) {\r\n $ipaddress = getenv('HTTP_X_FORWARDED_FOR');\r\n } elseif (getenv('HTTP_X_FORWARDED')) {\r\n $ipaddress = getenv('HTTP_X_FORWARDED');\r\n } elseif (getenv('HTTP_FORWARDED_FOR')) {\r\n $ipaddress = getenv('HTTP_FORWARDED_FOR');\r\n } elseif (getenv('HTTP_FORWARDED')) {\r\n $ipaddress = getenv('HTTP_FORWARDED');\r\n } elseif (getenv('REMOTE_ADDR')) {\r\n $ipaddress = getenv('REMOTE_ADDR');\r\n } else {\r\n $ipaddress = 'UNKNOWN';\r\n }\r\n $_SESSION[\"ip_cliente\"] = $ipaddress;\r\n }", "public function GetIP() {\n\n $Srv= $this->GetRequestContext()->SERVER;\n $TrustedProxies= $this->GetOption('TrustedProxies');\n\n // if visitor coming from trusted proxie get forwarded IP address\n if (isset($Srv['HTTP_X_FORWARDED_FOR']) && isset($Srv['REMOTE_ADDR'])\n && in_array($Srv['REMOTE_ADDR'], $TrustedProxies)) {\n // format: \"X-Forwarded-For: client1, proxy1, proxy2\"\n $Clients= explode(',', $Srv['HTTP_X_FORWARDED_FOR']);\n return trim(reset($Clients));\n }\n // HTTP_CLIENT_IP also can be set by certain proxies\n if (isset($Srv['HTTP_CLIENT_IP']) && isset($Srv['REMOTE_ADDR'])\n && in_array($Srv['REMOTE_ADDR'], $TrustedProxies)) {\n $Clients= explode(',', $Srv['HTTP_CLIENT_IP']);\n return trim(reset($Clients));\n }\n // ok, back to good old REMOTE_ADDR field, all other server fields are not reliable\n if (isset($Srv['REMOTE_ADDR'])) {\n return $Srv['REMOTE_ADDR'];\n }\n // not found\n return null;\n }", "function get_client_ip() {\n $ipaddress = '';\n if (getenv('HTTP_CLIENT_IP'))\n $ipaddress = getenv('HTTP_CLIENT_IP');\n else if(getenv('HTTP_X_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_X_FORWARDED_FOR');\n else if(getenv('HTTP_X_FORWARDED'))\n $ipaddress = getenv('HTTP_X_FORWARDED');\n else if(getenv('HTTP_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_FORWARDED_FOR');\n else if(getenv('HTTP_FORWARDED'))\n $ipaddress = getenv('HTTP_FORWARDED');\n else if(getenv('REMOTE_ADDR'))\n $ipaddress = getenv('REMOTE_ADDR');\n else\n $ipaddress = 'UNKNOWN';\n return $ipaddress;\n}", "public static function getClientIP()\n {\n if (getenv('HTTP_CLIENT_IP')) {\n $ip_address = getenv('HTTP_CLIENT_IP');\n } elseif (getenv('HTTP_X_FORWARDED_FOR')) {\n $ip_address = getenv('HTTP_X_FORWARDED_FOR');\n } elseif (getenv('HTTP_X_FORWARDED')) {\n $ip_address = getenv('HTTP_X_FORWARDED');\n } elseif (getenv('HTTP_FORWARDED_FOR')) {\n $ip_address = getenv('HTTP_FORWARDED_FOR');\n } elseif (getenv('HTTP_FORWARDED')) {\n $ip_address = getenv('HTTP_FORWARDED');\n } elseif (getenv('REMOTE_ADDR')) {\n $ip_address = getenv('REMOTE_ADDR');\n } else {\n $ip_address = 'UNKNOWN';\n }\n\n return $ip_address;\n }", "function getClientIP() {\n if (isset($_SERVER['HTTP_CLIENT_IP']))\n return $_SERVER['HTTP_CLIENT_IP'];\n else if (isset($_SERVER['HTTP_X_FORWARDED_FOR']))\n return $_SERVER['HTTP_X_FORWARDED_FOR'];\n return $_SERVER['REMOTE_ADDR'];\n }", "function get_ip_address() {\n // check for shared internet/ISP IP\n if (!empty($_SERVER['HTTP_CLIENT_IP']) && $this->validate_ip($_SERVER['HTTP_CLIENT_IP'])) {\n return $_SERVER['HTTP_CLIENT_IP'];\n }\n\n // check for IPs passing through proxies\n if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n // check if multiple ips exist in var\n if (strpos($_SERVER['HTTP_X_FORWARDED_FOR'], ',') !== false) {\n $iplist = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);\n foreach ($iplist as $ip) {\n if ($this->validate_ip($ip))\n return $ip;\n }\n } else {\n if ($this->validate_ip($_SERVER['HTTP_X_FORWARDED_FOR']))\n return $_SERVER['HTTP_X_FORWARDED_FOR'];\n }\n }\n if (!empty($_SERVER['HTTP_X_FORWARDED']) && $this->validate_ip($_SERVER['HTTP_X_FORWARDED']))\n return $_SERVER['HTTP_X_FORWARDED'];\n if (!empty($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']) && $this->validate_ip($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']))\n return $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'];\n if (!empty($_SERVER['HTTP_FORWARDED_FOR']) && $this->validate_ip($_SERVER['HTTP_FORWARDED_FOR']))\n return $_SERVER['HTTP_FORWARDED_FOR'];\n if (!empty($_SERVER['HTTP_FORWARDED']) && $this->validate_ip($_SERVER['HTTP_FORWARDED']))\n return $_SERVER['HTTP_FORWARDED'];\n\n // return unreliable ip since all else failed\n return $_SERVER['REMOTE_ADDR'];\n }", "public function getIpAddress()\n {\n if (!empty($this->_server['HTTP_X_CLUSTER_CLIENT_IP'])) {\n $ip = $this->_server['HTTP_X_CLUSTER_CLIENT_IP'];\n // default\n } elseif (isset($this->_server['REMOTE_ADDR'])) {\n $ip = $this->_server['REMOTE_ADDR'];\n // dafuq?\n } else {\n $ip = \"127.0.0.1\";\n }\n Logger::debug('Client ip: ' . $ip);\n return $ip;\n }", "public static function getClientIp()\n {\n if (getenv('HTTP_CLIENT_IP')) {\n $ipAddress = getenv('HTTP_CLIENT_IP');\n } else if(getenv('HTTP_X_FORWARDED_FOR')) {\n $ipAddress = getenv('HTTP_X_FORWARDED_FOR');\n } else if(getenv('HTTP_X_FORWARDED')) {\n $ipAddress = getenv('HTTP_X_FORWARDED');\n } else if(getenv('HTTP_FORWARDED_FOR')) {\n $ipAddress = getenv('HTTP_FORWARDED_FOR');\n } else if(getenv('HTTP_FORWARDED')) {\n $ipAddress = getenv('HTTP_FORWARDED');\n } else if(getenv('REMOTE_ADDR')) {\n $ipAddress = getenv('REMOTE_ADDR');\n } else {\n $ipAddress = 'UNKNOWN';\n }\n\n if ($ipAddress === '::1') {\n $ipAddress = '192.168.0.1';\n }\n\n /*\n * On some server configurations, HTTP_X_FORWARDED_FOR or REMOTE_ADDR returns\n * multiple comma-separated IPs This brakes some email integration,\n * so we want to return only one IP.\n */\n if (strpos($ipAddress, ',') !== false) {\n $ipAddress = explode(',', $ipAddress);\n $ipAddress = $ipAddress[0];\n }\n\n return $ipAddress;\n }", "public function clientIp()\n\t{\n\t\t$keys = array(\n\t\t\t'HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP',\n\t\t\t'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR'\n\t\t);\n\t\t$keys = array_values(array_intersect($keys, array_keys($_SERVER)));\n\t\tforeach ($keys as $key)\n\t\t{\n\t\t\tforeach (explode(',', $this->server($key)) as $ip)\n\t\t\t{\n\t\t\t\t$ip = trim($ip);\n\t\t\t\tif (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE) !== false)\n\t\t\t\t\treturn $ip;\n\t\t\t}\n\t\t}\n\n\t\tthrow new Exception\\RequestException(\"Can't get client ip.\");\n\t}", "function getLocationInfoByIp() {\n\t\t$client = @$_SERVER['HTTP_CLIENT_IP'];\n\t\t$forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];\n\t\t$remote = @$_SERVER['REMOTE_ADDR'];\n\t\t$result = array('country'=>'', 'city'=>'');\n\t\tif(filter_var($client, FILTER_VALIDATE_IP)){\n\t\t\t$ip = $client;\n\t\t}elseif(filter_var($forward, FILTER_VALIDATE_IP)){\n\t\t\t$ip = $forward;\n\t\t}else{\n\t\t\t$ip = $remote;\n\t\t}\n\t\t$ip_data = @json_decode(file_get_contents(\"http://www.geoplugin.net/json.gp?ip=\".$ip));\n\t\tif($ip_data && $ip_data->geoplugin_countryName != null){\n\t\t\t$result['country'] = $ip_data->geoplugin_countryName;\n\t\t\t$result['city'] = $ip_data->geoplugin_city;\n\t\t\t$result['ip'] = $remote;\n\t\t}\n\t\treturn $result;\n }", "function getClientIp() {\n foreach (array('HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR') as $key) {\n if (array_key_exists($key, $_SERVER) === true) {\n foreach (explode(',', $_SERVER[$key]) as $ip) {\n if (filter_var($ip, FILTER_VALIDATE_IP) !== false) {\n return $ip;\n }\n }\n }\n }\n }", "public function locate($ip);", "protected function _getClientIpAddress() {\n\t\tif (!empty($_SERVER['HTTP_CLIENT_IP'])) {\n\t\t\t$ip = $_SERVER['HTTP_CLIENT_IP'];\n\t\t} elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n\t\t\t$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n\t\t} else {\n\t\t\t$ip = $_SERVER['REMOTE_ADDR'];\n\t\t}\n\t\treturn $ip;\n\t}", "public static function get_ip_address()\n {\n foreach (array(\n 'HTTP_CLIENT_IP',\n 'HTTP_X_FORWARDED_FOR',\n 'HTTP_X_FORWARDED',\n 'HTTP_X_CLUSTER_CLIENT_IP',\n 'HTTP_FORWARDED_FOR',\n 'HTTP_FORWARDED',\n 'REMOTE_ADDR') as $key) {\n if (array_key_exists($key, $_SERVER) === true) {\n foreach (explode(',', $_SERVER[$key]) as $ip) {\n if (filter_var($ip, FILTER_VALIDATE_IP) !== false) {\n return $ip;\n }\n }\n }\n }\n }", "function atkGetClientIp()\n{\n\tstatic $s_ip = NULL;\n\n\tif ($s_ip === NULL)\n\t{\n\t\tif (getenv(\"HTTP_CLIENT_IP\"))\n\t\t$s_ip = getenv(\"HTTP_CLIENT_IP\");\n\t\telseif (getenv(\"HTTP_X_FORWARDED_FOR\"))\n\t\t{\n\t\t\t$ipArray = explode(\",\", getenv(\"HTTP_X_FORWARDED_FOR\"));\n\t\t\t$s_ip = $ipArray[0];\n\t\t}\n\t\telseif (getenv(\"REMOTE_ADDR\"))\n\t\t$s_ip = getenv(\"REMOTE_ADDR\");\n\t\telse $s_ip = 'x.x.x.x';\n\t}\n\n\treturn $s_ip;\n}", "public static function get_ip_address () : string\n {\n server ( \"HTTP_CLIENT_IP\" , ( $ip = \"\" ) && ( server ( \"HTTP_CLIENT_IP\" ) !== \"\" ) ? server ( \"HTTP_CLIENT_IP\" ) : server ( \"HTTP_CLIENT_IP\" ) );\n $ip = server ( \"HTTP_CLIENT_IP\" ) === \"\" ? server ( \"HTTP_CLIENT_IP\" ) : $ip;\n $ip = ( $ip === \"\" ) && ( server ( \"HTTP_X_FORWARDED_FOR\" ) === \"\" ) ? server ( \"HTTP_X_FORWARDED_FOR\" ) : $ip;\n return $ip === \"\" ? server ( \"REMOTE_ADDR\" ) : $ip;\n }", "public function getClientIpAddress() {\n\t\treturn $this->container['client_ip_address'];\n\t}", "public static function getClientIPAddress(){\n\t\treturn Customweb_Core_Http_ContextRequest::getClientIPAddress();\n\t}", "function get_client_ip(){\n\tif (!empty($_SERVER['HTTP_CLIENT_IP'])) {\n\t\treturn $_SERVER['HTTP_CLIENT_IP'];\n\t}\n\tif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n\t\treturn $_SERVER['HTTP_X_FORWARDED_FOR'];\n\t}\n\treturn (@$_SERVER['REMOTE_ADDR'])?:'000.000.000.000'; \n}", "function get_client_ip() {\n $ipaddress = '';\n if (getenv('HTTP_CLIENT_IP'))\n $ipaddress = getenv('HTTP_CLIENT_IP');\n else if(getenv('HTTP_X_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_X_FORWARDED_FOR');\n else if(getenv('HTTP_X_FORWARDED'))\n $ipaddress = getenv('HTTP_X_FORWARDED');\n else if(getenv('HTTP_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_FORWARDED_FOR');\n else if(getenv('HTTP_FORWARDED'))\n $ipaddress = getenv('HTTP_FORWARDED');\n else if(getenv('REMOTE_ADDR'))\n $ipaddress = getenv('REMOTE_ADDR');\n else\n $ipaddress = 'UNKNOWN';\n return $ipaddress;\n}", "function get_client_ip() {\n $ipaddress = '';\n if (getenv('HTTP_CLIENT_IP'))\n $ipaddress = getenv('HTTP_CLIENT_IP');\n else if(getenv('HTTP_X_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_X_FORWARDED_FOR');\n else if(getenv('HTTP_X_FORWARDED'))\n $ipaddress = getenv('HTTP_X_FORWARDED');\n else if(getenv('HTTP_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_FORWARDED_FOR');\n else if(getenv('HTTP_FORWARDED'))\n $ipaddress = getenv('HTTP_FORWARDED');\n else if(getenv('REMOTE_ADDR'))\n $ipaddress = getenv('REMOTE_ADDR');\n else\n $ipaddress = 'UNKNOWN';\n return $ipaddress;\n}", "function get_client_ip() {\n $ipaddress = '';\n if (getenv('HTTP_CLIENT_IP'))\n $ipaddress = getenv('HTTP_CLIENT_IP');\n else if(getenv('HTTP_X_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_X_FORWARDED_FOR');\n else if(getenv('HTTP_X_FORWARDED'))\n $ipaddress = getenv('HTTP_X_FORWARDED');\n else if(getenv('HTTP_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_FORWARDED_FOR');\n else if(getenv('HTTP_FORWARDED'))\n $ipaddress = getenv('HTTP_FORWARDED');\n else if(getenv('REMOTE_ADDR'))\n $ipaddress = getenv('REMOTE_ADDR');\n else\n $ipaddress = 'UNKNOWN';\n return $ipaddress;\n}", "function get_client_ip() {\n $ipaddress = '';\n if (getenv('HTTP_CLIENT_IP'))\n $ipaddress = getenv('HTTP_CLIENT_IP');\n else if(getenv('HTTP_X_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_X_FORWARDED_FOR');\n else if(getenv('HTTP_X_FORWARDED'))\n $ipaddress = getenv('HTTP_X_FORWARDED');\n else if(getenv('HTTP_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_FORWARDED_FOR');\n else if(getenv('HTTP_FORWARDED'))\n $ipaddress = getenv('HTTP_FORWARDED');\n else if(getenv('REMOTE_ADDR'))\n $ipaddress = getenv('REMOTE_ADDR');\n else\n $ipaddress = 'UNKNOWN';\n return $ipaddress;\n}", "function get_client_ip() {\n $ipaddress = '';\n if (getenv('HTTP_CLIENT_IP'))\n $ipaddress = getenv('HTTP_CLIENT_IP');\n else if(getenv('HTTP_X_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_X_FORWARDED_FOR');\n else if(getenv('HTTP_X_FORWARDED'))\n $ipaddress = getenv('HTTP_X_FORWARDED');\n else if(getenv('HTTP_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_FORWARDED_FOR');\n else if(getenv('HTTP_FORWARDED'))\n $ipaddress = getenv('HTTP_FORWARDED');\n else if(getenv('REMOTE_ADDR'))\n $ipaddress = getenv('REMOTE_ADDR');\n else\n $ipaddress = 'UNKNOWN';\n return $ipaddress;\n}", "function get_client_ip() {\n $ipaddress = '';\n if (getenv('HTTP_CLIENT_IP'))\n $ipaddress = getenv('HTTP_CLIENT_IP');\n else if(getenv('HTTP_X_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_X_FORWARDED_FOR');\n else if(getenv('HTTP_X_FORWARDED'))\n $ipaddress = getenv('HTTP_X_FORWARDED');\n else if(getenv('HTTP_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_FORWARDED_FOR');\n else if(getenv('HTTP_FORWARDED'))\n $ipaddress = getenv('HTTP_FORWARDED');\n else if(getenv('REMOTE_ADDR'))\n $ipaddress = getenv('REMOTE_ADDR');\n else\n $ipaddress = 'UNKNOWN';\n return $ipaddress;\n}", "function get_client_ip() {\n $ipaddress = '';\n if (getenv('HTTP_CLIENT_IP'))\n $ipaddress = getenv('HTTP_CLIENT_IP');\n else if(getenv('HTTP_X_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_X_FORWARDED_FOR');\n else if(getenv('HTTP_X_FORWARDED'))\n $ipaddress = getenv('HTTP_X_FORWARDED');\n else if(getenv('HTTP_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_FORWARDED_FOR');\n else if(getenv('HTTP_FORWARDED'))\n $ipaddress = getenv('HTTP_FORWARDED');\n else if(getenv('REMOTE_ADDR'))\n $ipaddress = getenv('REMOTE_ADDR');\n else\n $ipaddress = 'UNKNOWN';\n return $ipaddress;\n}", "function get_client_ip() {\n $ipaddress = '';\n if (getenv('HTTP_CLIENT_IP'))\n $ipaddress = getenv('HTTP_CLIENT_IP');\n else if(getenv('HTTP_X_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_X_FORWARDED_FOR');\n else if(getenv('HTTP_X_FORWARDED'))\n $ipaddress = getenv('HTTP_X_FORWARDED');\n else if(getenv('HTTP_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_FORWARDED_FOR');\n else if(getenv('HTTP_FORWARDED'))\n $ipaddress = getenv('HTTP_FORWARDED');\n else if(getenv('REMOTE_ADDR'))\n $ipaddress = getenv('REMOTE_ADDR');\n else\n $ipaddress = 'UNKNOWN';\n return $ipaddress;\n}", "function dokan_get_client_ip() {\n $ipaddress = '';\n\n if ( getenv( 'HTTP_CLIENT_IP' ) )\n $ipaddress = getenv( 'HTTP_CLIENT_IP' );\n else if ( getenv( 'HTTP_X_FORWARDED_FOR' ) )\n $ipaddress = getenv( 'HTTP_X_FORWARDED_FOR' & quot );\n else if ( getenv( 'HTTP_X_FORWARDED' ) )\n $ipaddress = getenv( 'HTTP_X_FORWARDED' );\n else if ( getenv( 'HTTP_FORWARDED_FOR' ) )\n $ipaddress = getenv( 'HTTP_FORWARDED_FOR' );\n else if ( getenv( 'HTTP_X_CLUSTER_CLIENT_IP' ) )\n $ipaddress = getenv( 'HTTP_FORWARDED_FOR' );\n else if ( getenv( 'HTTP_FORWARDED' ) )\n $ipaddress = getenv( 'HTTP_FORWARDED' );\n else if ( getenv( 'REMOTE_ADDR' ) )\n $ipaddress = getenv( 'REMOTE_ADDR' );\n else\n $ipaddress = 'UNKNOWN';\n\n return $ipaddress;\n}", "public function returnClientIP(){\n\n return self::$oCRNRSTN_ENV->oCRNRSTN_IPSECURITY_MGR->clientIpAddress();\n\n }", "function get_client_ip() {\n $ipaddress = '';\n if (isset($_SERVER['HTTP_CLIENT_IP']))\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n else if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n else if(isset($_SERVER['HTTP_X_FORWARDED']))\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n else if(isset($_SERVER['HTTP_FORWARDED_FOR']))\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n else if(isset($_SERVER['HTTP_FORWARDED']))\n $ipaddress = $_SERVER['HTTP_FORWARDED'];\n else if(isset($_SERVER['REMOTE_ADDR']))\n $ipaddress = $_SERVER['REMOTE_ADDR'];\n else\n $ipaddress = 'UNKNOWN';\n return $ipaddress;\n}", "function get_client_ip() {\n $ipaddress = '';\n if (isset($_SERVER['HTTP_CLIENT_IP']))\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n else if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n else if(isset($_SERVER['HTTP_X_FORWARDED']))\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n else if(isset($_SERVER['HTTP_FORWARDED_FOR']))\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n else if(isset($_SERVER['HTTP_FORWARDED']))\n $ipaddress = $_SERVER['HTTP_FORWARDED'];\n else if(isset($_SERVER['REMOTE_ADDR']))\n $ipaddress = $_SERVER['REMOTE_ADDR'];\n else\n $ipaddress = 'UNKNOWN';\n return $ipaddress;\n}", "function get_client_ip() {\n $ipaddress = '';\n if (isset($_SERVER['HTTP_CLIENT_IP']))\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n else if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n else if(isset($_SERVER['HTTP_X_FORWARDED']))\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n else if(isset($_SERVER['HTTP_FORWARDED_FOR']))\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n else if(isset($_SERVER['HTTP_FORWARDED']))\n $ipaddress = $_SERVER['HTTP_FORWARDED'];\n else if(isset($_SERVER['REMOTE_ADDR']))\n $ipaddress = $_SERVER['REMOTE_ADDR'];\n else\n $ipaddress = 'UNKNOWN';\n return $ipaddress;\n}", "public static function get_ip_address() {\n // check for shared internet/ISP IP\n if (!empty($_SERVER['HTTP_CLIENT_IP']) && self::validate_ip($_SERVER['HTTP_CLIENT_IP'])) {\n return $_SERVER['HTTP_CLIENT_IP'];\n }\n\n // check for IPs passing through proxies\n if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n // check if multiple ips exist in var\n if (strpos($_SERVER['HTTP_X_FORWARDED_FOR'], ',') !== false) {\n $iplist = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);\n foreach ($iplist as $ip) {\n if (self::validate_ip($ip))\n return $ip;\n }\n } else {\n if (self::validate_ip($_SERVER['HTTP_X_FORWARDED_FOR']))\n return $_SERVER['HTTP_X_FORWARDED_FOR'];\n }\n }\n if (!empty($_SERVER['HTTP_X_FORWARDED']) && self::validate_ip($_SERVER['HTTP_X_FORWARDED']))\n return $_SERVER['HTTP_X_FORWARDED'];\n if (!empty($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']) && self::validate_ip($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']))\n return $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'];\n if (!empty($_SERVER['HTTP_FORWARDED_FOR']) && self::validate_ip($_SERVER['HTTP_FORWARDED_FOR']))\n return $_SERVER['HTTP_FORWARDED_FOR'];\n if (!empty($_SERVER['HTTP_FORWARDED']) && self::validate_ip($_SERVER['HTTP_FORWARDED']))\n return $_SERVER['HTTP_FORWARDED'];\n\n // return unreliable ip since all else failed\n return $_SERVER['REMOTE_ADDR'];\n }", "static public function getClientIp()\n {\n /*\n $headers = function_exists('apache_request_headers')\n ? apache_request_headers()\n : $_SERVER;\n \n return isset($headers['REMOTE_ADDR']) ? $headers['REMOTE_ADDR'] : '0.0.0.0';\n */\n \n if(getenv('HTTP_CLIENT_IP') && strcasecmp(getenv('HTTP_CLIENT_IP'), 'unknown')) {\n $ip = getenv('HTTP_CLIENT_IP');\n } elseif(getenv('HTTP_X_FORWARDED_FOR') && strcasecmp(getenv('HTTP_X_FORWARDED_FOR'), 'unknown')) {\n $ip = getenv('HTTP_X_FORWARDED_FOR');\n } elseif(getenv('REMOTE_ADDR') && strcasecmp(getenv('REMOTE_ADDR'), 'unknown')) {\n $ip = getenv('REMOTE_ADDR');\n } elseif(isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] && strcasecmp($_SERVER['REMOTE_ADDR'], 'unknown')) {\n $ip = $_SERVER['REMOTE_ADDR'];\n } else {\n return '0.0.0.0';\n }\n \n return preg_match ( '/[\\d\\.]{7,15}/', $ip, $matches ) ? $matches [0] : '0.0.0.0';\n }", "function GetUserIp() {\r\n $client = @$_SERVER['HTTP_CLIENT_IP'];\r\n $forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];\r\n $remote = $_SERVER['REMOTE_ADDR'];\r\n if(filter_var($client, FILTER_VALIDATE_IP)) { $ip = $client; }\r\n elseif(filter_var($forward, FILTER_VALIDATE_IP)) { $ip = $forward; } else { $ip = $remote; }\r\n return $ip;\r\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 getClientIp()\n {\n $ip_address = '';\n\n if (getenv('HTTP_CLIENT_IP')) {\n $ip_address = getenv('HTTP_CLIENT_IP');\n } elseif (getenv('HTTP_X_FORWARDED_FOR')) {\n $ip_address = getenv('HTTP_X_FORWARDED_FOR');\n } elseif (getenv('HTTP_X_FORWARDED')) {\n $ip_address = getenv('HTTP_X_FORWARDED');\n } elseif (getenv('HTTP_FORWARDED_FOR')) {\n $ip_address = getenv('HTTP_FORWARDED_FOR');\n } elseif (getenv('HTTP_FORWARDED')) {\n $ip_address = getenv('HTTP_FORWARDED');\n } else {\n $ip_address = getenv('REMOTE_ADDR');\n }\n\n return $ip_address;\n }", "function ns_get_client_ip() {\n $ipaddress = '';\n if (getenv('HTTP_CLIENT_IP'))\n $ipaddress = getenv('HTTP_CLIENT_IP');\n else if(getenv('HTTP_X_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_X_FORWARDED_FOR');\n else if(getenv('HTTP_X_FORWARDED'))\n $ipaddress = getenv('HTTP_X_FORWARDED');\n else if(getenv('HTTP_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_FORWARDED_FOR');\n else if(getenv('HTTP_FORWARDED'))\n $ipaddress = getenv('HTTP_FORWARDED');\n else if(getenv('REMOTE_ADDR'))\n $ipaddress = getenv('REMOTE_ADDR');\n else\n $ipaddress = 'UNKNOWN';\n return $ipaddress;\n}", "function getIpAddress()\n {\n foreach ([\n 'HTTP_CLIENT_IP',\n 'HTTP_X_FORWARDED_FOR',\n 'HTTP_X_FORWARDED',\n 'HTTP_X_CLUSTER_CLIENT_IP',\n 'HTTP_FORWARDED_FOR',\n 'HTTP_FORWARDED',\n 'REMOTE_ADDR'\n ] as $key) {\n if (array_key_exists($key, $_SERVER) === true) {\n foreach (explode(',', $_SERVER[$key]) as $ip) {\n $ip = trim($ip);\n if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE) !== false) {\n return $ip;\n }\n }\n }\n }\n }", "public function get_ip_address() {\n\t\t// check for shared internet/ISP IP\n\t\tif (!empty($_SERVER['HTTP_CLIENT_IP']) && $this->validate_ip($_SERVER['HTTP_CLIENT_IP'])) {\n\t\t\treturn $_SERVER['HTTP_CLIENT_IP'];\n\t\t}\n\n\t\t// check for IPs passing through proxies\n\t\tif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n\t\t\t// check if multiple ips exist in var\n\t\t\tif (strpos($_SERVER['HTTP_X_FORWARDED_FOR'], ',') !== false) {\n\t\t\t\t$iplist = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);\n\t\t\t\tforeach ($iplist as $ip) {\n\t\t\t\t\tif ($this->validate_ip($ip))\n\t\t\t\t\t\treturn $ip;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($this->validate_ip($_SERVER['HTTP_X_FORWARDED_FOR']))\n\t\t\t\t\treturn $_SERVER['HTTP_X_FORWARDED_FOR'];\n\t\t\t}\n\t\t}\n\t\tif (!empty($_SERVER['HTTP_X_FORWARDED']) && $this->validate_ip($_SERVER['HTTP_X_FORWARDED']))\n\t\t\treturn $_SERVER['HTTP_X_FORWARDED'];\n\t\tif (!empty($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']) && $this->validate_ip($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']))\n\t\t\treturn $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'];\n\t\tif (!empty($_SERVER['HTTP_FORWARDED_FOR']) && $this->validate_ip($_SERVER['HTTP_FORWARDED_FOR']))\n\t\t\treturn $_SERVER['HTTP_FORWARDED_FOR'];\n\t\tif (!empty($_SERVER['HTTP_FORWARDED']) && $this->validate_ip($_SERVER['HTTP_FORWARDED']))\n\t\t\treturn $_SERVER['HTTP_FORWARDED'];\n\n\t\t// return unreliable ip since all else failed\n\t\treturn $_SERVER['REMOTE_ADDR'];\n\t}", "public static function getClientIP(): string\n {\n if(isset($_SERVER['HTTP_CF_CONNECTING_IP']))\n {\n return $_SERVER['HTTP_CF_CONNECTING_IP'];\n }\n\n if(isset($_SERVER['HTTP_CLIENT_IP']))\n {\n return $_SERVER['HTTP_CLIENT_IP'];\n }\n\n if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))\n {\n return $_SERVER['HTTP_X_FORWARDED_FOR'];\n }\n\n if(isset($_SERVER['HTTP_X_FORWARDED']))\n {\n return $_SERVER['HTTP_X_FORWARDED'];\n }\n\n if(isset($_SERVER['HTTP_FORWARDED_FOR']))\n {\n return $_SERVER['HTTP_FORWARDED_FOR'];\n }\n\n if(isset($_SERVER['HTTP_FORWARDED']))\n {\n return $_SERVER['HTTP_FORWARDED'];\n }\n\n if(isset($_SERVER['REMOTE_ADDR']))\n {\n return $_SERVER['REMOTE_ADDR'];\n }\n\n if(getenv('HTTP_CLIENT_IP') !== False)\n {\n return getenv('HTTP_CLIENT_IP');\n }\n\n if(getenv('HTTP_X_FORWARDED_FOR'))\n {\n return getenv('HTTP_X_FORWARDED_FOR');\n }\n\n if(getenv('HTTP_X_FORWARDED'))\n {\n return getenv('HTTP_X_FORWARDED');\n }\n\n if(getenv('HTTP_FORWARDED_FOR'))\n {\n return getenv('HTTP_FORWARDED_FOR');\n }\n\n if(getenv('HTTP_FORWARDED'))\n {\n return getenv('HTTP_FORWARDED');\n }\n\n if(getenv('REMOTE_ADDR'))\n {\n return getenv('REMOTE_ADDR');\n }\n\n return '127.0.0.1';\n }", "function get_client_ip() {\n if (isset($_SERVER['HTTP_CLIENT_IP']))\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n else if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n else if(isset($_SERVER['HTTP_X_FORWARDED']))\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n else if(isset($_SERVER['HTTP_FORWARDED_FOR']))\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n else if(isset($_SERVER['HTTP_FORWARDED']))\n $ipaddress = $_SERVER['HTTP_FORWARDED'];\n else if(isset($_SERVER['REMOTE_ADDR']))\n $ipaddress = $_SERVER['REMOTE_ADDR'];\n else\n $ipaddress = 'UNKNOWN';\n return $ipaddress;\n}", "public function getClientIpAddress(): string\n {\n $serverVariables = array(\n 'HTTP_X_FORWARDED_FOR',\n 'HTTP_X_FORWARDED',\n 'HTTP_X_CLUSTER_CLIENT_IP',\n 'HTTP_X_COMING_FROM',\n 'HTTP_FORWARDED_FOR',\n 'HTTP_FORWARDED',\n 'HTTP_COMING_FROM',\n 'HTTP_CLIENT_IP',\n 'HTTP_FROM',\n 'HTTP_VIA',\n 'REMOTE_ADDR'\n );\n $out = '';\n foreach ($serverVariables as $serverVariable) {\n $value = '';\n if (isset($_SERVER[$serverVariable])) {\n $value = $_SERVER[$serverVariable];\n } elseif (getenv($serverVariable)) {\n $value = getenv($serverVariable);\n }\n if (!empty($value)) {\n if (filter_var(trim($value), FILTER_VALIDATE_IP)) {\n $out = $value;\n break;\n }\n }\n }\n return $out;\n }", "public function get_ip_address() {\n if (!empty($_SERVER['HTTP_CLIENT_IP']) ) {\n return $_SERVER['HTTP_CLIENT_IP'];\n }\n\n // check for IPs passing through proxies\n if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n // check if multiple ips exist in var\n if (strpos($_SERVER['HTTP_X_FORWARDED_FOR'], ',') !== false) {\n $iplist = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);\n foreach ($iplist as $ip) {\n //if (validate_ip($ip))\n return $ip;\n }\n } else {\n //if (validate_ip($_SERVER['HTTP_X_FORWARDED_FOR']))\n return $_SERVER['HTTP_X_FORWARDED_FOR'];\n }\n }\n if (!empty($_SERVER['HTTP_X_FORWARDED']) )\n return $_SERVER['HTTP_X_FORWARDED'];\n if (!empty($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']) )\n return $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'];\n if (!empty($_SERVER['HTTP_FORWARDED_FOR']) )\n return $_SERVER['HTTP_FORWARDED_FOR'];\n if (!empty($_SERVER['HTTP_FORWARDED']) )\n return $_SERVER['HTTP_FORWARDED'];\n\n // return unreliable ip since all else failed\n return $_SERVER['REMOTE_ADDR'];\n }", "function get_client_ip()\n{\n $ipaddress = '';\n if (isset($_SERVER['HTTP_CLIENT_IP'])) {\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n } elseif (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n } elseif (isset($_SERVER['HTTP_X_FORWARDED'])) {\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n } elseif (isset($_SERVER['HTTP_FORWARDED_FOR'])) {\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n } elseif (isset($_SERVER['HTTP_FORWARDED'])) {\n $ipaddress = $_SERVER['HTTP_FORWARDED'];\n } elseif (isset($_SERVER['REMOTE_ADDR'])) {\n $ipaddress = $_SERVER['REMOTE_ADDR'];\n } else {\n $ipaddress = 'UNKNOWN';\n }\n return $ipaddress;\n}", "public function getClientIp()\n {\n if (!empty($_SERVER['HTTP_CLIENT_IP']) && $this->validIp($_SERVER['HTTP_CLIENT_IP'])) {\n return $_SERVER['HTTP_CLIENT_IP'];\n }\n\n if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n foreach (explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']) as $ip) {\n if ($this->validIp(trim($ip))) {\n return trim($ip);\n }\n }\n }\n\n if (!empty($_SERVER['HTTP_X_FORWARDED']) && $this->validIp($_SERVER['HTTP_X_FORWARDED'])) {\n return $_SERVER['HTTP_X_FORWARDED'];\n }\n\n if (!empty($_SERVER['HTTP_FORWARDED_FOR']) && $this->validIp($_SERVER['HTTP_FORWARDED_FOR'])) {\n return $_SERVER['HTTP_FORWARDED_FOR'];\n }\n\n if (!empty($_SERVER['HTTP_FORWARDED']) && $this->validIp($_SERVER['HTTP_FORWARDED'])) {\n return $_SERVER['HTTP_FORWARDED'];\n }\n\n return $_SERVER['REMOTE_ADDR'];\n }", "function get_client_ip_server() {\n $ipaddress = '';\n if ($_SERVER['HTTP_CLIENT_IP'])\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n else if($_SERVER['HTTP_X_FORWARDED_FOR'])\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n else if($_SERVER['HTTP_X_FORWARDED'])\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n else if($_SERVER['HTTP_FORWARDED_FOR'])\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n else if($_SERVER['HTTP_FORWARDED'])\n $ipaddress = $_SERVER['HTTP_FORWARDED'];\n else if($_SERVER['REMOTE_ADDR'])\n $ipaddress = $_SERVER['REMOTE_ADDR'];\n else\n $ipaddress = 'UNKNOWN';\n \n return $ipaddress;\n}", "function get_client_ip_server() {\n $ipaddress = '';\n if ($_SERVER['HTTP_CLIENT_IP'])\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n else if($_SERVER['HTTP_X_FORWARDED_FOR'])\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n else if($_SERVER['HTTP_X_FORWARDED'])\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n else if($_SERVER['HTTP_FORWARDED_FOR'])\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n else if($_SERVER['HTTP_FORWARDED'])\n $ipaddress = $_SERVER['HTTP_FORWARDED'];\n else if($_SERVER['REMOTE_ADDR'])\n $ipaddress = $_SERVER['REMOTE_ADDR'];\n else\n $ipaddress = 'UNKNOWN';\n \n return $ipaddress;\n}", "function get_client_ip_server() {\n $ipaddress = '';\n if ($_SERVER['HTTP_CLIENT_IP'])\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n else if($_SERVER['HTTP_X_FORWARDED_FOR'])\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n else if($_SERVER['HTTP_X_FORWARDED'])\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n else if($_SERVER['HTTP_FORWARDED_FOR'])\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n else if($_SERVER['HTTP_FORWARDED'])\n $ipaddress = $_SERVER['HTTP_FORWARDED'];\n else if($_SERVER['REMOTE_ADDR'])\n $ipaddress = $_SERVER['REMOTE_ADDR'];\n else\n $ipaddress = 'UNKNOWN';\n \n return $ipaddress;\n}", "protected function get_ip_address() {\r\n\t\tif (!empty($_SERVER['HTTP_CLIENT_IP'])) { //check ip from share internet\r\n\t\t\t$ip=$_SERVER['HTTP_CLIENT_IP'];\r\n\t\t} elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { //to check ip is pass from proxy\r\n\t\t\t$ip=$_SERVER['HTTP_X_FORWARDED_FOR'];\r\n\t\t} else {\r\n\t\t\t$ip=$_SERVER['REMOTE_ADDR'];\r\n\t\t}\r\n\t\treturn $ip;\r\n\t}", "public function clientIp(){\n return $this->clientIp;\n }", "function get_client_ip($uri = '', $protocol = NULL)\n\t{\n\t\treturn get_instance()->config->site_url($uri, $protocol);\n\t}", "function get_client_ip() {\r\n $ipaddress = '';\r\n if (isset($_SERVER['HTTP_CLIENT_IP']))\r\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\r\n else if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))\r\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\r\n else if(isset($_SERVER['HTTP_X_FORWARDED']))\r\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\r\n else if(isset($_SERVER['HTTP_FORWARDED_FOR']))\r\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\r\n else if(isset($_SERVER['HTTP_FORWARDED']))\r\n $ipaddress = $_SERVER['HTTP_FORWARDED'];\r\n else if(isset($_SERVER['REMOTE_ADDR']))\r\n $ipaddress = $_SERVER['REMOTE_ADDR'];\r\n else\r\n $ipaddress = 'UNKNOWN';\r\n return $ipaddress;\r\n}", "public function getUserip()\n {\n // Find Client IP\n if (!empty($this->request->getServer('HTTP_CLIENT_IP'))) {\n $client = $this->request->getServer('HTTP_CLIENT_IP');\n }\n if (!empty($this->request->getServer('HTTP_X_FORWARDED_FOR'))) {\n $forward = $this->request->getServer('HTTP_X_FORWARDED_FOR');\n }\n if (!empty($this->request->getServer('REMOTE_ADDR'))) {\n $remote = $this->request->getServer('REMOTE_ADDR');\n }\n if (null !==$this->request->getServer(\"HTTP_CF_CONNECTING_IP\")) { //Find Cloud IP\n $remote=$this->request->getServer('REMOTE_ADDR');\n $client=$this->request->getServer('HTTP_CLIENT_IP');\n $remote = $this->request->getServer('HTTP_CF_CONNECTING_IP');\n $client = $this->request->getServer('HTTP_CF_CONNECTING_IP');\n }\n if (filter_var($client, FILTER_VALIDATE_IP)) {\n $ip = $client;\n } elseif (filter_var($forward, FILTER_VALIDATE_IP)) {\n $ip = $forward;\n } else {\n $ip = $remote;\n }\n return $ip;\n }", "function ip_address() /* Get IP Address */\n {\n return isset($_SERVER['HTTP_CLIENT_IP']) ? $_SERVER['HTTP_CLIENT_IP'] : isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];\n }", "public function get_ip_address() {\n // Check for shared internet/ISP IP\n if (!empty($_SERVER['HTTP_CLIENT_IP']) && $this->validate_ip($_SERVER['HTTP_CLIENT_IP']))\n return $_SERVER['HTTP_CLIENT_IP'];\n\n // Check for IPs passing through proxies\n if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n // Check if multiple IP addresses exist in var\n $iplist = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);\n foreach ($iplist as $ip) {\n if ($this->validate_ip($ip))\n return $ip;\n }\n }\n \n if (!empty($_SERVER['HTTP_X_FORWARDED']) && $this->validate_ip($_SERVER['HTTP_X_FORWARDED']))\n return $_SERVER['HTTP_X_FORWARDED'];\n if (!empty($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']) && $this->validate_ip($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']))\n return $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'];\n if (!empty($_SERVER['HTTP_FORWARDED_FOR']) && $this->validate_ip($_SERVER['HTTP_FORWARDED_FOR']))\n return $_SERVER['HTTP_FORWARDED_FOR'];\n if (!empty($_SERVER['HTTP_FORWARDED']) && $this->validate_ip($_SERVER['HTTP_FORWARDED']))\n return $_SERVER['HTTP_FORWARDED'];\n\n // Return unreliable IP address since all else failed\n return $_SERVER['REMOTE_ADDR'];\n }", "function getClientIP() {\r\n $ip = '';\r\n if (isset($_SERVER['REMOTE_ADDR'])) {\r\n $ip = $_SERVER['REMOTE_ADDR'];\r\n } else if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {\r\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\r\n } else if (isset($_SERVER['HTTP_X_FORWARDED'])) {\r\n $ip = $_SERVER['HTTP_X_FORWARDED'];\r\n } else if (isset($_SERVER['HTTP_FORWARDED_FOR'])) {\r\n $ip = $_SERVER['HTTP_FORWARDED_FOR'];\r\n } else if (isset($_SERVER['HTTP_FORWARDED'])) {\r\n $ip = $_SERVER['HTTP_FORWARDED'];\r\n } else if (isset($_SERVER['HTTP_CLIENT_IP'])) {\r\n $ip = $_SERVER['HTTP_CLIENT_IP'];\r\n } else {\r\n $ip = '0.0.0.0';\r\n }\r\n return ($ip);\r\n }", "public static function getIp()\n {\n if (isset($_SERVER[\"HTTP_CF_CONNECTING_IP\"])) {\n $_SERVER['REMOTE_ADDR'] = $_SERVER[\"HTTP_CF_CONNECTING_IP\"];\n $_SERVER['HTTP_CLIENT_IP'] = $_SERVER[\"HTTP_CF_CONNECTING_IP\"];\n }\n $client = @$_SERVER['HTTP_CLIENT_IP'];\n $forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];\n $remote = @$_SERVER['REMOTE_ADDR'];\n\n if (filter_var($client, FILTER_VALIDATE_IP)) {\n $ip = $client;\n } elseif (filter_var($forward, FILTER_VALIDATE_IP)) {\n $ip = $forward;\n } else {\n $ip = $remote;\n }\n\n return $ip;\n }", "public function ipAddress(){\n return $this->getServerVar('REMOTE_ADDR');\n }", "function get_client_ip() {\n\t$ipaddress = $_SERVER['REMOTE_ADDR'];\n return $ipaddress;\n}", "private function getIp()\n\t {\n\t \n\t if (isset($_SERVER['HTTP_X_FORWARDED_FOR']) &&( $_SERVER['HTTP_X_FORWARDED_FOR'] != '' ))\n\t {\n\t $client_ip =\n\t ( !empty($_SERVER['REMOTE_ADDR']) ) ?\n\t $_SERVER['REMOTE_ADDR']\n\t :\n\t ( ( !empty($_ENV['REMOTE_ADDR']) ) ?\n\t $_ENV['REMOTE_ADDR']\n\t :\n\t \"unknown\" );\n\t \n\t // los proxys van añadiendo al final de esta cabecera\n\t // las direcciones ip que van \"ocultando\". Para localizar la ip real\n\t // del usuario se comienza a mirar por el principio hasta encontrar\n\t // una dirección ip que no sea del rango privado. En caso de no\n\t // encontrarse ninguna se toma como valor el REMOTE_ADDR\n\t \n\t $entries = split('[, ]', $_SERVER['HTTP_X_FORWARDED_FOR']);\n\t \n\t reset($entries);\n\t while (list(, $entry) = each($entries))\n\t {\n\t $entry = trim($entry);\n\t if ( preg_match(\"/^([0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)/\", $entry, $ip_list) )\n\t {\n\t // http://www.faqs.org/rfcs/rfc1918.html\n\t $private_ip = array(\n\t '/^0\\./',\n\t '/^127\\.0\\.0\\.1/',\n\t '/^192\\.168\\..*/',\n\t '/^172\\.((1[6-9])|(2[0-9])|(3[0-1]))\\..*/',\n\t '/^10\\..*/');\n\t \n\t $found_ip = preg_replace($private_ip, $client_ip, $ip_list[1]);\n\t \n\t if ($client_ip != $found_ip)\n\t {\n\t $client_ip = $found_ip;\n\t break;\n\t }\n\t }\n\t }\n\t }\n\t else\n\t {\n\t $client_ip =\n\t ( !empty($_SERVER['REMOTE_ADDR']) ) ?\n\t $_SERVER['REMOTE_ADDR']\n\t :\n\t ( ( !empty($_ENV['REMOTE_ADDR']) ) ?\n\t $_ENV['REMOTE_ADDR']\n\t :\n\t \"unknown\" );\n\t }\n\t \n\t return $client_ip;\n\t \n\t}", "private function get_ip(){\n $ip = '';\n if (!empty($_SERVER['HTTP_CLIENT_IP'])) {\n $ip = $_SERVER['HTTP_CLIENT_IP'];\n } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n } else {\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n return $ip;\n }", "function get_ip() {\n\t\t$mainIp = '';\n\t\tif (getenv('HTTP_CLIENT_IP'))\n\t\t\t$mainIp = getenv('HTTP_CLIENT_IP');\n\t\telse if(getenv('HTTP_X_FORWARDED_FOR'))\n\t\t\t$mainIp = getenv('HTTP_X_FORWARDED_FOR');\n\t\telse if(getenv('HTTP_X_FORWARDED'))\n\t\t\t$mainIp = getenv('HTTP_X_FORWARDED');\n\t\telse if(getenv('HTTP_FORWARDED_FOR'))\n\t\t\t$mainIp = getenv('HTTP_FORWARDED_FOR');\n\t\telse if(getenv('HTTP_FORWARDED'))\n\t\t\t$mainIp = getenv('HTTP_FORWARDED');\n\t\telse if(getenv('REMOTE_ADDR'))\n\t\t\t$mainIp = getenv('REMOTE_ADDR');\n\t\telse\n\t\t\t$mainIp = 'UNKNOWN';\n\t\treturn $mainIp;\n\t}", "public function ip_address() {\n\n if (!empty($_SERVER['HTTP_CLIENT_IP'])) {\n //check ip from share internet\n $ip = $_SERVER['HTTP_CLIENT_IP'];\n } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n //to check ip is pass from proxy\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n } else {\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n return $ip;\n }", "function get_ip_address()\n{\n//\tif( isDev() )\n//\t\treturn \"66.135.205.14\";\t// US (ebay.com)\n//\t\treturn \"46.122.252.60\"; // ljubljana\n//\t\treturn \"190.172.82.24\"; // argentinia?\n//\t\treturn \"84.154.26.132\"; // probably invalid ip from munich\n//\t\treturn \"203.208.37.104\"; // google.cn\n//\t\treturn \"62.215.83.54\";\t// kuwait\n//\t\treturn \"41.250.146.224\";\t// Morocco (rtl!)\n//\t\treturn \"66.135.205.14\";\t// US (ebay.com)\n//\t\treturn \"121.243.179.122\";\t// india\n//\t\treturn \"109.253.21.90\";\t// invalid (user says UK)\n//\t\treturn \"82.53.187.74\";\t// IT\n//\t\treturn \"190.172.82.24\";\t// AR\n//\t\treturn \"99.230.167.125\";\t// CA\n//\t\treturn \"95.220.134.145\";\t// N/A\n//\t\treturn \"194.126.108.2\";\t// Tallinn/Estonia (Skype static IP)\n\n\tstatic $DETECTED_CLIENT_IP = 'undefined';\n\n\tif( $DETECTED_CLIENT_IP !== 'undefined' )\n\t\treturn $DETECTED_CLIENT_IP;\n\n\t$proxy_headers = array(\n\t\t'HTTP_VIA',\n\t\t'HTTP_X_FORWARDED_FOR',\n\t\t'HTTP_FORWARDED_FOR',\n\t\t'HTTP_X_FORWARDED',\n\t\t'HTTP_FORWARDED',\n\t\t'HTTP_CLIENT_IP',\n\t\t'HTTP_FORWARDED_FOR_IP',\n\t\t'VIA',\n\t\t'X_FORWARDED_FOR',\n\t\t'FORWARDED_FOR',\n\t\t'X_FORWARDED',\n\t\t'FORWARDED',\n\t\t'CLIENT_IP',\n\t\t'FORWARDED_FOR_IP',\n\t\t'HTTP_PROXY_CONNECTION',\n\t\t'REMOTE_ADDR' // REMOTE_ADDR must be last -> fallback\n\t);\n\n\tforeach( $proxy_headers as $ph )\n\t{\n\t\tif( !empty($_SERVER) && isset($_SERVER[$ph]) )\n\t\t{\n\t\t\t$DETECTED_CLIENT_IP = $_SERVER[$ph];\n\t\t\tbreak;\n\t\t}\n\t\telseif( !empty($_ENV) && isset($_ENV[$ph]) )\n\t\t{\n\t\t\t$DETECTED_CLIENT_IP = $_ENV[$ph];\n\t\t\tbreak;\n\t\t}\n\t\telseif( @getenv($ph) )\n\t\t{\n\t\t\t$DETECTED_CLIENT_IP = getenv($ph);\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif( !isset($DETECTED_CLIENT_IP) )\n\t\treturn false;\n\n\t$is_ip = preg_match('/^(\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})/',$DETECTED_CLIENT_IP,$regs);\n\tif( $is_ip && (count($regs) > 0) )\n\t\t$DETECTED_CLIENT_IP = $regs[1];\n\treturn $DETECTED_CLIENT_IP;\n}", "function getClientIP() {\r\n if (isset ($_SERVER ['HTTP_X_FORWARDED_FOR'])){ $clientIP = $_SERVER ['HTTP_X_FORWARDED_FOR']; }\r\n elseif (isset ($_SERVER ['HTTP_X_REAL_IP'])){ $clientIP = $_SERVER ['HTTP_X_REAL_IP']; }\r\n else { $clientIP = $_SERVER ['REMOTE_ADDR']; }\r\n return $clientIP;\r\n}", "function get_ip() {\n $ip = '127.0.0.1';\n $ipServerVars = array(\n 'REMOTE_ADDR',\n 'HTTP_CLIENT_IP',\n 'HTTP_X_FORWARDED_FOR',\n 'HTTP_X_FORWARDED',\n 'HTTP_FORWARDED_FOR',\n 'HTTP_FORWARDED'\n );\n $globals = & class_loader('GlobalVar', 'classes');\n foreach ($ipServerVars as $var) {\n if ($globals->server($var)) {\n $ip = $globals->server($var);\n break;\n }\n }\n // Strip any secondary IP etc from the IP address\n if (strpos($ip, ',') > 0) {\n $ip = substr($ip, 0, strpos($ip, ','));\n }\n return $ip;\n }", "public static function get_ip_address() {\n if(!empty($_SERVER['http-cf-connecting-ip'])){\n return $_SERVER['http-cf-connecting-ip'];\n }\n if (!empty($_SERVER['HTTP_CLIENT_IP']) && filter_var($_SERVER['HTTP_CLIENT_IP'], FILTER_VALIDATE_IP)) {\n return $_SERVER['HTTP_CLIENT_IP'];\n }\n if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n if (strpos($_SERVER['HTTP_X_FORWARDED_FOR'], ',') !== false) {\n $iplist = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);\n foreach ($iplist as $ip) {\n if (filter_var($ip, FILTER_VALIDATE_IP)) {\n return $ip;\n }\n }\n } else {\n if (filter_var($_SERVER['HTTP_X_FORWARDED_FOR'], FILTER_VALIDATE_IP)) {\n return $_SERVER['HTTP_X_FORWARDED_FOR'];\n }\n }\n }\n if (!empty($_SERVER['HTTP_X_FORWARDED']) && filter_var($_SERVER['HTTP_X_FORWARDED'], FILTER_VALIDATE_IP)) {\n return $_SERVER['HTTP_X_FORWARDED'];\n }\n if (!empty($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']) && filter_var($_SERVER['HTTP_X_CLUSTER_CLIENT_IP'], FILTER_VALIDATE_IP)) {\n return $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'];\n }\n if (!empty($_SERVER['HTTP_FORWARDED_FOR']) && filter_var($_SERVER['HTTP_FORWARDED_FOR'], FILTER_VALIDATE_IP)) {\n return $_SERVER['HTTP_FORWARDED_FOR'];\n }\n if (!empty($_SERVER['HTTP_FORWARDED']) && filter_var($_SERVER['HTTP_FORWARDED'], FILTER_VALIDATE_IP)) {\n return $_SERVER['HTTP_FORWARDED'];\n }\n return $_SERVER['REMOTE_ADDR'];\n }" ]
[ "0.74736196", "0.7206504", "0.7156554", "0.7141598", "0.7113342", "0.7109655", "0.71082044", "0.7076533", "0.706735", "0.7040557", "0.7021562", "0.70210785", "0.7013181", "0.70105505", "0.70071965", "0.7004109", "0.6992635", "0.6990695", "0.69897944", "0.69889617", "0.6969811", "0.6964606", "0.6962648", "0.6950541", "0.6942441", "0.69404924", "0.6930776", "0.6912413", "0.6907362", "0.6895951", "0.68870515", "0.6879903", "0.6876648", "0.68646216", "0.685562", "0.6840484", "0.6836966", "0.6829411", "0.6829219", "0.68226653", "0.6805269", "0.68016845", "0.6799979", "0.67964935", "0.67917764", "0.6783479", "0.6781292", "0.6779483", "0.67793775", "0.67756754", "0.6765411", "0.67411757", "0.67411757", "0.67411757", "0.67411757", "0.67411757", "0.67411757", "0.67411757", "0.67411757", "0.6732638", "0.6715393", "0.6713542", "0.6713542", "0.6713542", "0.6713035", "0.67061615", "0.6699875", "0.6699613", "0.6698403", "0.6696751", "0.6695665", "0.66933525", "0.66932726", "0.66894746", "0.6669524", "0.6668573", "0.6667862", "0.66618526", "0.6655288", "0.6655288", "0.6655288", "0.66519356", "0.66455233", "0.663954", "0.6630692", "0.6623874", "0.66164434", "0.66131014", "0.6607764", "0.66077065", "0.6596898", "0.659631", "0.6590751", "0.65852666", "0.65822357", "0.65762466", "0.65742075", "0.6571026", "0.6567824", "0.6565694" ]
0.69266325
27
Return an array of required properties
public function getRequiredProperties() { return array( 'VPSProtocol', 'TxType', 'Vendor', 'VendorTxCode', 'Currency', 'NotificationURL', ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRequiredProperties();", "protected function required(): array\n {\n return $this->required;\n }", "protected function required(): array\n {\n return [\n 'id',\n 'email',\n 'role',\n 'scopes',\n 'status',\n 'createdDate',\n 'updatedDate',\n ];\n }", "protected function required(): array\n {\n return [\n 'id',\n 'userId',\n 'transactionId',\n 'countryCode',\n 'city',\n 'address',\n 'status',\n ];\n }", "public function getProperties(): array;", "public function getProperties(): array;", "public function getRequiredFields() {\n return $this->source->getRequiredFields($this->filter);\n }", "public function getRequiredFields()\n {\n return $this->requiredFields;\n }", "public function getProperties() : array;", "public function getRequiredFields()\n {\n return $this->_aRequiredFields;\n }", "public function getRequiredExtraFields(): array\n {\n return [];\n }", "public static function getRequiredFields()\n\t{\n\t\t$requiredFields = [\n\t\t\t'report' => 'string',\n\t\t\t'date' => 'date',\n\t\t\t'user_name' => 'string',\n\t\t\t'note' => 'int',\n\t\t\t'console_idConsole' => 'int',\n\t\t];\n\n\t\treturn $requiredFields;\n\t}", "public function getFrontEndRequiredFields();", "public static function getRequiredFields()\n\t{\n\t\t$requiredFields = [\n\t\t\t'url' => 'string',\n\t\t\t'name' => 'string',\n\t\t\t'price' => 'float',\n\t\t\t'devise' => 'string',\n\t\t\t'edition_idEdition' => 'int',\n\t\t];\n\n\t\treturn $requiredFields;\n\t}", "private function getRequiredFields()\n\t{\n\t\treturn $this->endpointRequiredFields;\n\t}", "public function getFillableProperties(): array;", "public static function getRequiredFields()\n\t{\n\t\t$requiredFields = [\n\t\t\t'content' => 'string',\n\t\t\t'console_names' => 'string',\n\t\t\t'game_idGame' => 'int',\n\t\t];\n\n\t\treturn $requiredFields;\n\t}", "public function getProperties();", "public function getProperties();", "public function getProperties();", "public function getProperties();", "protected function getRequiredArray()\n {\n return [\"description\", \"meta_description\", \"meta_keyword\", \"meta_title\", \"name\", \"short_description\"];\n }", "public function getProperties(): array {\n\t\treturn array_keys($this->properties);\n\t}", "public static function getRequirements() {\n return array();\n }", "public function getRequiredFields(){\n if(empty($this->tableFields)){\n $this->getTableInfo();\n }\n return $this->requiredFields;\n }", "public function getRequiredParameters();", "public function getRequiredParameters();", "protected function getPropertiesValidators()\n {\n return [];\n }", "public function properties() {\n return array_keys($this->propertyDefs());\n }", "public function get_props() : array\n {\n return $this->additional['props'] ?? [];\n }", "public function properties() : array\n {\n return array_keys($this->_properties);\n }", "public function getProperties() {}", "public function getProperties() {}", "public function getProperties() {}", "public function getProperties() {}", "public function getProperties(): array\n {\n return array_keys(get_object_vars($this));\n }", "abstract public function getProperties();", "private function validate_required_fields()\n\t{\n\t\t$errors = array();\n\t\t\n\t\tforeach (array_keys($this->_required_fields) as $field)\n\t\t{\n\t\t\t$value = $this->get_field_value($field);\n\t\t\t\n\t\t\tif (!validate::required($value))\n\t\t\t{\n\t\t\t\t$errors[$field] = 'Required';\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $errors;\n\t}", "public function getRequiredAttributes()\n {\n return [\n $this->attributePrefix.'chunk' => $this->getType(),\n $this->attributePrefix.'slot-name' => $this->slotname,\n $this->attributePrefix.'slot-template' => $this->template,\n $this->attributePrefix.'page' => $this->page->getId(),\n $this->attributePrefix.'chunk-id' => $this->getId(),\n $this->attributePrefix.'has-content' => $this->hasContent(),\n ];\n }", "public static function getProperties()\n {\n return [\n 'Description' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'Note' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'Code' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'Billable' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'Quantity' => [false, self::PROPERTY_TYPE_FLOAT, null, false, false],\n 'UnitCost' => [false, self::PROPERTY_TYPE_FLOAT, null, false, false],\n 'UnitPrice' => [false, self::PROPERTY_TYPE_FLOAT, null, false, false],\n 'Amount' => [false, self::PROPERTY_TYPE_FLOAT, null, false, false],\n 'AmountTax' => [false, self::PROPERTY_TYPE_FLOAT, null, false, false],\n 'AmountIncludingTax' => [false, self::PROPERTY_TYPE_FLOAT, null, false, false],\n ];\n }", "abstract protected function getProperties();", "protected function get_properties()\n\t{\n\t\t$schema = $this->module->model->extended_schema;\n\t\t$fields = $schema['fields'];\n\t\t$request = $this->request;\n\t\t$properties = array_intersect_key($request->params, $fields);\n\n\t\tforeach ($fields as $identifier => $definition)\n\t\t{\n\t\t\t$type = $definition['type'];\n\n\t\t\tif ($type == 'boolean')\n\t\t\t{\n\t\t\t\tif (!empty($definition['null']) && ($request[$identifier] === null || $request[$identifier] === ''))\n\t\t\t\t{\n\t\t\t\t\t$properties[$identifier] = null;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (empty($properties[$identifier]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$properties[$identifier] = false;\n\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t$properties[$identifier] = filter_var($properties[$identifier], FILTER_VALIDATE_BOOLEAN);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ($type == 'varchar')\n\t\t\t{\n\t\t\t\tif (empty($properties[$identifier]) || !is_string($properties[$identifier]))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$properties[$identifier] = trim($properties[$identifier]);\n\t\t\t}\n\t\t}\n\n\t\treturn $properties;\n\t}", "public function provideHavingRequiredFields() {\n return [\n [array(\n 'label' => 'I am a label',\n 'coordinates' => '39.7392° N, 104.9903° W',\n 'depth' => 11,\n 'temperature' => 98.6,\n 'date' => 1325533342,\n 'reporter' => 'DataValidationServiceTest.php'\n )],\n ];\n }", "public function getRequiredVisitFields()\n {\n return array();\n }", "public function rules()\n {\n $required = [];\n \n foreach ($this->survey->questions AS $question) {\n if ($question->is_required && $question->is_active) {\n $required['question-' . $question->id] = 'required';\n }\n }\n \n return $required;\n }", "public function getProperties(): array\n {\n $properties = $this->properties;\n\n $typeRequiredProperties = $this->type->getRequiredProperties();\n\n if ($typeRequiredProperties) {\n $properties = array_intersect_key(\n $properties,\n array_flip(array_merge($this->requiredProperties, $typeRequiredProperties))\n );\n }\n\n // Append the control information prefix to the metadata keys\n $requestedODataVersion = (string) $this->type->getVersion();\n\n $result = [];\n\n foreach ($properties as $key => $value) {\n if (version_compare('4.0', $requestedODataVersion, '=')) {\n $result[$this->prefix.'@odata.'.$key] = $value;\n } else {\n $result[$this->prefix.'@'.$key] = $value;\n }\n }\n\n return $result;\n }", "public static function getProperties()\n {\n return [\n 'Type' => [false, self::PROPERTY_TYPE_ENUM, null, false, false],\n 'Name' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'ABN' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'BSB' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'AccountNumber' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'AccountName' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'ElectronicServiceAddress' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'SuperFundID' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'EmployerNumber' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'SPIN' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n ];\n }", "public static function getProperties()\n {\n return [\n 'id' => [true, self::PROPERTY_TYPE_STRING, null, false, false],\n 'endDate' => [false, self::PROPERTY_TYPE_DATE, null, false, false],\n 'startDate' => [true, self::PROPERTY_TYPE_DATE, null, false, false],\n 'status' => [true, self::PROPERTY_TYPE_ENUM, null, false, false],\n 'price' => [true, self::PROPERTY_TYPE_OBJECT, '\\\\Price', false, false],\n 'product' => [true, self::PROPERTY_TYPE_OBJECT, '\\\\Product', false, false],\n ];\n }", "public function getProperties() {\n if (is_array($this->_props)) {\n return $this->_props;\n } else {\n return array();\n }\n }", "public function getPropertiesList() : array;", "public function getProperties() {\n return array_keys($this->_properties);\n }", "public function getMandatoryFields()\n {\n if ($this->_mandatoryFields === null) {\n $this->_mandatoryFields = [];\n $mandatoryFields = $this->_config->get('dataprocessing/mandatory/fields');\n\n if (is_array($mandatoryFields)) {\n foreach ($mandatoryFields as $fieldName => $empty) {\n $this->_mandatoryFields[] = $fieldName;\n }\n }\n }\n\n return $this->_mandatoryFields;\n }", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['effects'] === null) {\n $invalidProperties[] = \"'effects' can't be null\";\n }\n if ($this->container['createdCoupons'] === null) {\n $invalidProperties[] = \"'createdCoupons' can't be null\";\n }\n if ($this->container['createdReferrals'] === null) {\n $invalidProperties[] = \"'createdReferrals' can't be null\";\n }\n return $invalidProperties;\n }", "abstract protected function get_properties();", "public function populatableProperties() : array;", "abstract protected function getMandatoryModelsFields();", "public function getProperties(): array\n {\n return $this->properties;\n }", "function entity_type_required_properties($entity_type) {\n $controller = entity_toolbox_controller($entity_type);\n $helper = $controller->getPropsHelper();\n\n return $helper->requiredPropertiesGet();\n}", "protected function properties(){\n\n // Here we are making an array, we are looping through the table to see if the fields in the table exist, if so. It is being stored into array \n $properties = array();\n foreach (static::$table_users_field as $users_field) {\n if(property_exists($this,$users_field)){\n $properties[$users_field] = $this->$users_field;\n }\n }\n\n return $properties;\n }", "public static function getProperties() : array {\r\n return self::$properties;\r\n }", "protected static function getRequirements() {\r\n\t\treturn array('`id`' => array ('type' => 'int', 'boundary' => '>0'));\r\n\t}", "function get_registration_required_fields() {\n\t\t$requiredFields = new RequiredFields(\n\t\t\t'FirstName',\n\t\t\t'Surname',\n\t\t\t'Email'\n\t\t);\n\t\t//TODO: don't add ticket field when multiple attendees allowed\n\t\t//if(!$event->MultipleBooking)\n\t\t\t$requiredFields->addRequiredField('Ticket');\n\t\t// Allow decorators to add extra required fields\n\t\t//$this->extend('updateRegistrationRequiredFields', $requiredFields);\n\t\treturn $requiredFields;\n\t}", "public function required()\n {\n return [\n 'name', // string\n 'tag', // Tag\n ];\n }", "public function getRequiredOptions();", "public function getRequiredFields($filter) {\n $requirements = [];\n if (array_key_exists('base', $this->requirements)) {\n $requirements = array_merge($requirements, $this->requirements['base']);\n }\n if (array_key_exists($filter, $this->requirements)) {\n $requirements = array_merge($requirements, $this->requirements[$filter]);\n }\n return array_unique($requirements);\n }", "public function getProperties()\n {\n return array_keys($this->toArray());\n }", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n if ($this->container['invoice_number'] === null) {\n $invalidProperties[] = \"'invoice_number' can't be null\";\n }\n if ($this->container['invoice_date'] === null) {\n $invalidProperties[] = \"'invoice_date' can't be null\";\n }\n if ($this->container['remit_to_party'] === null) {\n $invalidProperties[] = \"'remit_to_party' can't be null\";\n }\n if ($this->container['ship_from_party'] === null) {\n $invalidProperties[] = \"'ship_from_party' can't be null\";\n }\n if ($this->container['invoice_total'] === null) {\n $invalidProperties[] = \"'invoice_total' can't be null\";\n }\n if ($this->container['items'] === null) {\n $invalidProperties[] = \"'items' can't be null\";\n }\n return $invalidProperties;\n }", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n if ($this->container['purchase_order_number'] === null) {\n $invalidProperties[] = \"'purchase_order_number' can't be null\";\n }\n if ($this->container['vendor_order_number'] === null) {\n $invalidProperties[] = \"'vendor_order_number' can't be null\";\n }\n if ($this->container['acknowledgement_date'] === null) {\n $invalidProperties[] = \"'acknowledgement_date' can't be null\";\n }\n if ($this->container['acknowledgement_status'] === null) {\n $invalidProperties[] = \"'acknowledgement_status' can't be null\";\n }\n if ($this->container['selling_party'] === null) {\n $invalidProperties[] = \"'selling_party' can't be null\";\n }\n if ($this->container['ship_from_party'] === null) {\n $invalidProperties[] = \"'ship_from_party' can't be null\";\n }\n if ($this->container['item_acknowledgements'] === null) {\n $invalidProperties[] = \"'item_acknowledgements' can't be null\";\n }\n return $invalidProperties;\n }", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['is_empty'] === null) {\n $invalidProperties[] = \"'is_empty' can't be null\";\n }\n if ($this->container['use_autocomplete'] === null) {\n $invalidProperties[] = \"'use_autocomplete' can't be null\";\n }\n return $invalidProperties;\n }", "public static function getRequiredValues():array {\n\n # Set result\n $result = self::REQUIRED_VALUES;\n\n # Return result\n return $result;\n\n }", "public function getRequiredAttributes()\n {\n return $this->requiredAttributes;\n }", "public function listInvalidProperties()\n {\n $invalid_properties = [];\n if (!empty($this->validateApplicationId())) {\n $invalid_properties[] = $this->validateApplicationId();\n }\n if (!empty($this->validateIsDefault())) {\n $invalid_properties[] = $this->validateIsDefault();\n }\n if (!empty($this->validateRole())) {\n $invalid_properties[] = $this->validateRole();\n }\n if (!empty($this->validateType())) {\n $invalid_properties[] = $this->validateType();\n }\n if (!empty($this->validateIssues())) {\n $invalid_properties[] = $this->validateIssues();\n }\n return $invalid_properties;\n }", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['attribute_type'] === null) {\n $invalidProperties[] = \"'attribute_type' can't be null\";\n }\n if ($this->container['numeric_value'] === null) {\n $invalidProperties[] = \"'numeric_value' can't be null\";\n }\n if ($this->container['date_value'] === null) {\n $invalidProperties[] = \"'date_value' can't be null\";\n }\n if ($this->container['flag_value'] === null) {\n $invalidProperties[] = \"'flag_value' can't be null\";\n }\n if ($this->container['is_error_value'] === null) {\n $invalidProperties[] = \"'is_error_value' can't be null\";\n }\n return $invalidProperties;\n }", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['is_vgl'] === null) {\n $invalidProperties[] = \"'is_vgl' can't be null\";\n }\n if ($this->container['active'] === null) {\n $invalidProperties[] = \"'active' can't be null\";\n }\n if ($this->container['id'] === null) {\n $invalidProperties[] = \"'id' can't be null\";\n }\n if ($this->container['name'] === null) {\n $invalidProperties[] = \"'name' can't be null\";\n }\n if ($this->container['is_pkw'] === null) {\n $invalidProperties[] = \"'is_pkw' can't be null\";\n }\n if ($this->container['is_nkw'] === null) {\n $invalidProperties[] = \"'is_nkw' can't be null\";\n }\n return $invalidProperties;\n }", "public function listInvalidProperties() {\n\n $invalidProperties = [];\n\n /*\n * Any needed validation goes here. If a property requires no validation\n * (e.g. it's OK for it to be empty) then it may be omitted.\n */\n\n return $invalidProperties;\n }", "public function getProperties(): array\n {\n return $this->getParam('properties');\n }", "public function listInvalidProperties(): array\n {\n $invalidProperties = parent::listInvalidProperties();\n\n if ($this->container['ClientId'] === null) {\n $invalidProperties[] = \"'ClientId' can't be null\";\n }\n if ($this->container['Points'] === null) {\n $invalidProperties[] = \"'Points' can't be null\";\n }\n if (($this->container['Points'] < 1)) {\n $invalidProperties[] = \"invalid value for 'Points', must be bigger than or equal to 1.\";\n }\n\n if ($this->container['Action'] === null) {\n $invalidProperties[] = \"'Action' can't be null\";\n }\n return $invalidProperties;\n }", "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n if ($this->container['amount'] === null) {\n $invalid_properties[] = \"'amount' can't be null\";\n }\n if ($this->container['unit_relation'] === null) {\n $invalid_properties[] = \"'unit_relation' can't be null\";\n }\n return $invalid_properties;\n }", "public function getProperties(): PropertyCollection;", "public function _getProperties() {}", "public function minimum_requirements() {\n\t\treturn array(\n\t\t\tarray( $this, 'check_minimum_requirements' ),\n\t\t);\n\t}", "public function getEventRequiredParameters()\r\n {\r\n return array();\r\n }", "abstract public function getRequirements();", "public static function getRequiredValues():array {\n\n # Declare result\n $result = [];\n\n # Return result\n return $result;\n\n }", "public function getMandatory();", "private function getProperties($className)\n {\n $classInfos = $this->getClassInfos($className);\n\n return $classInfos->{'hydra:supportedProperty'} ?? [];\n }", "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n if ($this->container['rule_id'] === null) {\n $invalid_properties[] = \"'rule_id' can't be null\";\n }\n if ($this->container['rule_name'] === null) {\n $invalid_properties[] = \"'rule_name' can't be null\";\n }\n if ($this->container['status'] === null) {\n $invalid_properties[] = \"'status' can't be null\";\n }\n if ($this->container['execution_source'] === null) {\n $invalid_properties[] = \"'execution_source' can't be null\";\n }\n return $invalid_properties;\n }", "public function properties() {\n return CMap::mergeArray(parent::properties(), array(\n 'userID' => array('type' => 'integer'),\n 'userName' => array('type' => 'string'),\n 'firstName' => array('type' => 'string'),\n 'lastName' => array('type' => 'string'),\n 'emailAddress' => array('type' => 'string'),\n 'phoneNumber' => array('type' => 'string'),\n 'fk_status_userName' => array('type' => 'string'),\n 'group' => array('type' => 'string')\n ));\n }", "public static function getProperties()\n {\n return [\n 'NumberOfUnits' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'PayPeriodEndDate' => [false, self::PROPERTY_TYPE_DATE, '\\\\DateTimeInterface', false, false],\n 'PayPeriodStartDate' => [false, self::PROPERTY_TYPE_DATE, '\\\\DateTimeInterface', false, false],\n 'LeavePeriodStatus' => [false, self::PROPERTY_TYPE_ENUM, null, false, false],\n ];\n }", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['warehouse_id'] === null) {\n $invalidProperties[] = \"'warehouse_id' can't be null\";\n }\n if ($this->container['fulfillment_plan_id'] === null) {\n $invalidProperties[] = \"'fulfillment_plan_id' can't be null\";\n }\n if ($this->container['pick_scan_scheme_id'] === null) {\n $invalidProperties[] = \"'pick_scan_scheme_id' can't be null\";\n }\n if ($this->container['status'] === null) {\n $invalidProperties[] = \"'status' can't be null\";\n }\n if ($this->container['create_packing_slip'] === null) {\n $invalidProperties[] = \"'create_packing_slip' can't be null\";\n }\n if ($this->container['create_order_invoice'] === null) {\n $invalidProperties[] = \"'create_order_invoice' can't be null\";\n }\n if ($this->container['send_to_external_shipping_system'] === null) {\n $invalidProperties[] = \"'send_to_external_shipping_system' can't be null\";\n }\n return $invalidProperties;\n }", "public function getProperties(): array\n {\n $field = $this->field;\n\n $properties = [];\n\n $properties[] = 'type=\"text\"';\n\n //ID\n if ($field->getId() !== '') {\n $properties[] = \"id='{$field->getId()}'\";\n }\n\n // Name\n $properties[] = \"name='{$field->getName()}'\";\n\n // Class\n if ($field->getClass() !== '') {\n $properties[] = \"class='{$field->getClass()}'\";\n }\n\n // Placeholder\n if ($field->getPlaceholder() !== '') {\n $properties[] = \"placeholder='{$field->getPlaceholder()}'\";\n }\n\n // Value\n if ($field->getValue() !== '') {\n $properties[] = \"value='{$field->getValue()}'\";\n }\n\n // Required\n if ($field->isRequired() === true) {\n $properties[] = 'required';\n }\n\n // Disabled\n if ($field->isDisabled() === true) {\n $properties[] = 'disabled';\n }\n\n return $properties;\n }", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['urgency_price'] === null) {\n $invalidProperties[] = \"'urgency_price' can't be null\";\n }\n if ($this->container['agreement_price_type'] === null) {\n $invalidProperties[] = \"'agreement_price_type' can't be null\";\n }\n if ($this->container['sales_price'] === null) {\n $invalidProperties[] = \"'sales_price' can't be null\";\n }\n if ($this->container['normal_price'] === null) {\n $invalidProperties[] = \"'normal_price' can't be null\";\n }\n if ($this->container['delivery_promise_price'] === null) {\n $invalidProperties[] = \"'delivery_promise_price' can't be null\";\n }\n if ($this->container['product_price'] === null) {\n $invalidProperties[] = \"'product_price' can't be null\";\n }\n return $invalidProperties;\n }", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['query_type'] === null) {\n $invalidProperties[] = \"'query_type' can't be null\";\n }\n if ($this->container['start_date'] === null) {\n $invalidProperties[] = \"'start_date' can't be null\";\n }\n if ($this->container['end_date'] === null) {\n $invalidProperties[] = \"'end_date' can't be null\";\n }\n if ($this->container['export_type'] === null) {\n $invalidProperties[] = \"'export_type' can't be null\";\n }\n return $invalidProperties;\n }", "public function getNonNullProperties()\n {\n $properties = get_object_vars($this);\n\n return array_filter($properties, function ($property) {\n return !is_null($property);\n });\n }", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['class_name'] === null) {\n $invalidProperties[] = \"'class_name' can't be null\";\n }\n return $invalidProperties;\n }", "public function listInvalidProperties()\n {\n $invalid_properties = [];\n if (!empty($this->validateTenantId())) {\n $invalid_properties[] = $this->validateTenantId();\n }\n if (!empty($this->validateExpiresIn())) {\n $invalid_properties[] = $this->validateExpiresIn();\n }\n if (!empty($this->validateScopes())) {\n $invalid_properties[] = $this->validateScopes();\n }\n return $invalid_properties;\n }", "public function getExposedProperties(): array;", "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n if ($this->container['phase'] === null) {\n $invalid_properties[] = \"'phase' can't be null\";\n }\n return $invalid_properties;\n }", "abstract protected function properties();", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['start'] === null) {\n $invalidProperties[] = \"'start' can't be null\";\n }\n if ($this->container['end'] === null) {\n $invalidProperties[] = \"'end' can't be null\";\n }\n if ($this->container['days'] === null) {\n $invalidProperties[] = \"'days' can't be null\";\n }\n return $invalidProperties;\n }" ]
[ "0.8835818", "0.7736289", "0.73310137", "0.7303255", "0.7276516", "0.7276516", "0.7213681", "0.71796113", "0.71503264", "0.7142943", "0.7136425", "0.71146566", "0.7035806", "0.7009279", "0.69762456", "0.69655895", "0.69222385", "0.68581134", "0.68581134", "0.68581134", "0.68581134", "0.6846815", "0.683802", "0.6831243", "0.682175", "0.6816827", "0.6816827", "0.6811233", "0.6804721", "0.68018246", "0.67895246", "0.6767927", "0.67675465", "0.67675465", "0.67675465", "0.67653275", "0.6760783", "0.6760612", "0.6726907", "0.67034036", "0.67033273", "0.6700727", "0.6676135", "0.66697556", "0.6650357", "0.66488767", "0.66466063", "0.66330594", "0.6630677", "0.66301423", "0.65699065", "0.65693384", "0.6562069", "0.6559276", "0.65570027", "0.65486157", "0.6543581", "0.6534966", "0.65334904", "0.6532408", "0.65292126", "0.6491746", "0.64894325", "0.64889866", "0.64837265", "0.64821213", "0.6482101", "0.64798576", "0.6473487", "0.6472975", "0.6469565", "0.6461788", "0.6432829", "0.6426865", "0.6424412", "0.64225125", "0.6413735", "0.64121044", "0.64080894", "0.64002925", "0.6395198", "0.6393578", "0.6390177", "0.63855153", "0.6385366", "0.6377829", "0.6374372", "0.6367932", "0.6350201", "0.6349996", "0.6345316", "0.63449943", "0.63443935", "0.6343778", "0.6338321", "0.6331592", "0.63236964", "0.6319227", "0.6317523", "0.6317158" ]
0.75386834
2
Returns an associative array of properties Keys are in the correct Sagepay naming format Any values which could contain accented characters are converted from UTF8 to ISO88591 Empty keys are removed
public function toArray() { return array_filter(array( 'VPSProtocol' => $this->vpsProtocol, 'TxType' => $this->txType, 'Vendor' => $this->vendor, 'VendorTxCode' => $this->vendorTxCode, 'Currency' => $this->currency, 'NotificationURL' => $this->notificationUrl, 'Profile' => $this->profile )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function clean_properties(){\n global $database;\n\n $clean_properties = array();\n\n foreach ($this->properties() as $key => $value) {\n\n // the value is being escaped in cases of sql injections and etc.it is also being paired with the key \n $clean_properties[$key] = $database->escape_string($value);\n }\n\n return $clean_properties;\n }", "protected function clean_properties(){\n\t\tglobal $database;\n\t\t$clean_properties = array();\n\t\tforeach($this->properties() as $key => $value){\n\t\t\t$clean_properties[$key]=$database->escape_string($value);\t\n\t\t}\n\t\treturn $clean_properties;\t\n\t}", "public function clean_properties(){\n global $database;\n $clean_properties = array();\n foreach ($this->properties() as $key =>$value){\n $clean_properties[$key] =$database->escape_string($value);\n }\n \n return $clean_properties ; \n }", "protected function cleanProperties()\n {\n global $database;\n\n $clean_properties = array();\n\n foreach ($this->properties() as $key => $value) {\n $clean_properties[$key] = $database->escapeString($value);\n }\n\n return $clean_properties;\n }", "protected function cleanProperties()\n {\n global $database;\n\n $clean_properties = array();\n\n foreach ($this->properties() as $key => $value) {\n $clean_properties[$key] = $database->escapeString($value);\n }\n\n return $clean_properties;\n }", "public function toArray(): array\n {\n $array = [];\n $str = new Str();\n\n foreach (\\get_object_vars($this) as $property => $value) {\n $array[$str->snake($property)] = $value;\n }\n\n return $array;\n }", "public function getPropertyNames() {\n // {PropertyName(property-name, property-type),}\n $nameSet = array();\n foreach ($this->tree->getPropertyNames() as $name) {\n $nameSet[] = new Mobi_Mtld_DA_PropertyName(\n substr($name, 1),\n self::getPropertyTypeAsByte($name[0])\n );\n }\n return $nameSet;\n }", "public function toArray()\n\t {\n\t $claseArray = get_object_vars($this);\n\t foreach ($this->fields as $key => $value) {\n\t $this->fields[$key] = $claseArray[lcfirst($value)];\n\t}\n\treturn $this->fields;\n\t }", "public function toArray()\n\t {\n\t $claseArray = get_object_vars($this);\n\t foreach ($this->fields as $key => $value) {\n\t $this->fields[$key] = $claseArray[lcfirst($value)];\n\t}\n\treturn $this->fields;\n\t }", "protected function processProperties($data)\n {\n\n // Will hold the properties we are sending back\n $properties = [];\n\n // All of these are split on space\n $items = explode(' ', $data);\n\n // Iterate over the items\n foreach ($items as $item) {\n // Explode and make sure we always have 2 items in the array\n list($key, $value) = array_pad(explode('=', $item, 2), 2, '');\n\n // Convert spaces and other character changes\n $properties[$key] = utf8_encode(str_replace(\n [\n '\\\\s', // Translate spaces\n ],\n [\n ' ',\n ],\n $value\n ));\n }\n\n return $properties;\n }", "abstract protected function getToStringProperties();", "public function toArray() {\n $output = array();\n foreach($this->_magicProperties as $key => $value) {\n if (in_array($key,$this->translation)) {\n $output[array_search($key,$this->translation)] = $value;\n }else{\n $output[$key] = $value;\n }\n }\n return $this->_postarray($output);\n }", "public function niceNames(){\n $niceNames = array(\n 'specifications_title' => __('Specifications Title'),\n 'specifications_name_english' => __('Specifications Name (English)'),\n 'specifications_name_arabic' => __('Specifications Name (Arabic)'),\n 'specifications_description_english' => __('Specifications Description (English)'),\n 'specifications_description_arabic' => __('Specifications Description (Arabic)'),\n );\n return $niceNames;\n }", "public function providerNormalizeHeaderName()\n {\n return [\n [\"content-type\", false, \"Content-Type\"],\n [\"content_type\", false, \"Content-Type\"],\n [\"CONTENT-TYPE\", false, \"Content-Type\"],\n [\"CONTENT_TYPE\", false, \"Content-Type\"],\n [\"content type\", false, \"Content-Type\"],\n [\"cOnTent-TyPe\", false, \"Content-Type\"],\n [\"Content-Type\", false, \"Content-Type\"],\n [\" Content-Type \", false, \"Content-Type\"],\n [\"Content-Type:\", false, \"Content-Type\"],\n [\"Content-Type: \", false, \"Content-Type\"],\n [\"Content-Type : \", false, \"Content-Type\"],\n [\"Content-MD5\", false, \"Content-MD5\"],\n [\"xss-protection\", false, \"XSS-Protection\"],\n [\"x-forwarded-for\", false, \"X-Forwarded-For\"],\n [\"x-forwarded-for\", true, \"Forwarded-For\"],\n [\"x-att-deviceid\", false, \"X-ATT-DeviceId\"],\n [\"x-att-deviceid\", true, \"ATT-DeviceId\"],\n [\"att-deviceid\", false, \"ATT-DeviceId\"],\n \n [\n [\"content-type\", \"xss-protection\"],\n false,\n [\"Content-Type\", \"XSS-Protection\"]\n ],\n [\n [\"content-type\", \"x-ua-compatible\"],\n false,\n [\"Content-Type\", \"X-UA-Compatible\"]\n ],\n [\n [\"CONTENT_TYPE\", \"x-ua-compatible\"],\n true,\n [\"Content-Type\", \"UA-Compatible\"]\n ]\n ];\n }", "private function canonicalizeHeaders() {\r\n\t\t$canonicalized_headers = [];\r\n\t\tforeach ($this->headers as $key => $value) {\r\n\t\t\t$canonicalized_headers[strtolower($key)] = preg_replace('/\\s+/', ' ', trim($value));\r\n\t\t}\r\n\r\n\t\tksort($canonicalized_headers);\r\n\r\n\t\t$serialized_header = '';\r\n\t\tforeach ($canonicalized_headers as $key => $value) {\r\n\t\t\t$serialized_header .= $key . ':' . $value . \"\\t\";\r\n\t\t}\r\n\t\t$this->verbose('headers', $this->headers);\r\n\t\t$this->verbose('canonicalized_headers', $canonicalized_headers);\r\n\t\t$this->verbose('serialized_header', str_replace(\"\\t\", \"\\\\t\", $serialized_header));\r\n\r\n\t\treturn $serialized_header;\r\n\t}", "public function toSoapEncoding() {\n\t\treturn array(\n\t\t\t'email' => $this->email,\n\t\t\t'id' => $this->id,\n\t\t\t'name' => utf8_encode($this->name),\n\t\t\t'owner_id' => $this->owner_id\n\t\t);\n\t}", "public static function readMetaProperties($msg)\n {\n $properties = array();\n\n foreach ($msg as $_prop) {\n if (!empty($_prop)) {\n list($name, $value) = explode(':', $_prop);\n $name = strtolower(str_replace('-', '_', trim($name)));\n\n $properties[$name] = trim($value);\n }\n }\n\n return $properties;\n }", "public function toArray($keyCase = self::KEY_NATURAL)\n {\n if (count($p = $this->getReflectedProperties())) {\n $properties = array();\n foreach ($p as $propertyName) {\n if ($this->$propertyName instanceof Zood_Entity_Null) {\n continue;\n }\n $properties[$propertyName] = $this->$propertyName;\n }\n } else {\n return array();\n }\n\n $filters = array();\n\n switch ($keyCase) {\n case self::KEY_LOWER :\n $properties = array_change_key_case($properties, CASE_LOWER);\n if (count($filters) > 0) {\n $filters = array_change_key_case($filters, CASE_LOWER);\n return array_diff_key($properties, $filters);\n } else {\n return $properties;\n }\n break;\n\n case self::KEY_UPPER :\n $properties = array_change_key_case($properties, CASE_UPPER);\n if (count($filters) > 0) {\n $filters = array_change_key_case($filters, CASE_UPPER);\n return array_diff_key($properties, $filters);\n } else {\n return $properties;\n }\n break;\n\n case self::KEY_NATURAL :\n if (count($filters) > 0) {\n return array_diff_key($properties, $filters);\n } else {\n return $properties;\n }\n break;\n\n default : // KEY_AUTO\n if (count($filters) > 0) {\n $filters = array_change_key_case($filters, CASE_LOWER);\n while (list($key, ) = each($properties)) {\n if (array_key_exists(strtolower($key), $filters)) {\n unset($properties[$key]);\n }\n }\n }\n return $properties;\n break;\n }\n }", "public static function getPropertyMap()\n {\n if (self::$property_map !== null) {\n return self::$property_map;\n }\n\n /** @var array<string, array<string, string>> */\n $property_map = require_once(__DIR__ . '/../PropertyMap.php');\n\n self::$property_map = [];\n\n foreach ($property_map as $key => $value) {\n $cased_key = strtolower($key);\n self::$property_map[$cased_key] = $value;\n }\n\n return self::$property_map;\n }", "function getLocaleFieldNames() {\n\t\treturn array(\n\t\t\t'title', 'cleanTitle', 'abstract', 'coverPageAltText', 'showCoverPage', 'hideCoverPageToc', 'hideCoverPageAbstract', 'originalFileName', 'fileName', 'width', 'height',\n\t\t\t'discipline', 'subjectClass', 'subject', 'coverageGeo', 'coverageChron', 'coverageSample', 'type', 'sponsor');\n\t}", "public function toArray() {\n $vars = get_object_vars ( $this );\n $array = array ();\n foreach ( $vars as $key => $value ) {\n $array [ltrim ( $key, '_' )] = $value;\n }\n return $array;\n }", "protected function names()\n {\n $names = [];\n\n foreach ($this->data as $key => $value) {\n if (is_int($key)) {\n $names[$value] = str_replace(['-', '_'], ' ', ucfirst(trim($value)));\n } else {\n $names[$key] = $value;\n }\n }\n\n return $names;\n }", "protected function fixPersonalDictionaryCharacterSet() {}", "protected function properties()\n {\n return [\n 'mount_point' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__DRIVE_DRIVELETTER',\n C__PROPERTY__INFO__DESCRIPTION => 'Driveletter'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__driveletter'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_LETTER'\n ]\n ]\n ),\n 'title' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__TITLE',\n C__PROPERTY__INFO__DESCRIPTION => 'Title'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__title'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_TITLE'\n ]\n ]\n ),\n 'system_drive' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__DRIVE__SYSTEM_DRIVE',\n C__PROPERTY__INFO__DESCRIPTION => 'System drive'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__system_drive'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__DRIVE__SYSTEM_DRIVE',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => serialize(get_smarty_arr_YES_NO()),\n 'p_bDbFieldNN' => 1\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__LIST => false\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'get_yes_or_no'\n ]\n ]\n ]\n ),\n 'filesystem' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog_plus(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'isys_filesystem_type',\n C__PROPERTY__INFO__DESCRIPTION => 'Filesystem'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__isys_filesystem_type__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_filesystem_type',\n 'isys_filesystem_type__id',\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_FILESYSTEM',\n C__PROPERTY__UI__PARAMS => [\n 'p_strTable' => 'isys_filesystem_type'\n ]\n ]\n ]\n ),\n 'capacity' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::float(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB_CATG__MEMORY_CAPACITY',\n C__PROPERTY__INFO__DESCRIPTION => 'Capacity'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__capacity'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_CAPACITY',\n C__PROPERTY__UI__PARAMS => [\n 'p_strClass' => 'input-dual-large'\n ]\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'convert',\n ['memory']\n ],\n C__PROPERTY__FORMAT__UNIT => 'unit',\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__LIST => false\n ]\n ]\n ),\n 'unit' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CATG__MEMORY_UNIT',\n C__PROPERTY__INFO__DESCRIPTION => 'Unit'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__isys_memory_unit__id',\n C__PROPERTY__DATA__FIELD_ALIAS => 'capacity_unit',\n C__PROPERTY__DATA__TABLE_ALIAS => 'c_unit',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_memory_unit',\n 'isys_memory_unit__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_UNIT',\n C__PROPERTY__UI__PARAMS => [\n 'p_strTable' => 'isys_memory_unit',\n 'p_strClass' => 'input-dual-small',\n 'p_bInfoIconSpacer' => 0\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__LIST => false\n ]\n ]\n ),\n 'serial' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__SERIAL',\n C__PROPERTY__INFO__DESCRIPTION => 'Serial number'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__serial'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_SERIAL'\n ]\n ]\n ),\n 'assigned_raid' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CATD_DRIVE_TYPE__RAID_GROUP',\n C__PROPERTY__INFO__DESCRIPTION => 'Software RAID group'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__id__raid_pool',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_raid_list',\n 'isys_catg_raid_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_RAIDGROUP',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => new isys_callback(\n [\n 'isys_cmdb_dao_category_g_drive',\n 'callback_property_assigned_raid'\n ]\n )\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__REPORT => true,\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__LIST => false\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'get_reference_value'\n ]\n ]\n ]\n ),\n 'drive_type' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::int(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__TYPE',\n C__PROPERTY__INFO__DESCRIPTION => 'Typ'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__isys_catd_drive_type__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catd_drive_type',\n 'isys_catd_drive_type__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_TYPE'\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__VIRTUAL => true\n ]\n ]\n ),\n 'device' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CATD__DRIVE_DEVICE',\n C__PROPERTY__INFO__DESCRIPTION => 'On device'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__isys_catg_stor_list__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_stor_list',\n 'isys_catg_stor_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_DEVICE',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => new isys_callback(\n [\n 'isys_cmdb_dao_category_g_drive',\n 'callback_property_devices'\n ]\n )\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false,\n C__PROPERTY__PROVIDES__VIRTUAL => true\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'get_reference_value'\n ]\n ]\n ]\n ),\n 'raid' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CATD__DRIVE_DEVICE',\n C__PROPERTY__INFO__DESCRIPTION => 'On device Raid-Array'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__isys_catg_raid_list__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_raid_list',\n 'isys_catg_raid_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_DEVICE',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => new isys_callback(\n [\n 'isys_cmdb_dao_category_g_drive',\n 'callback_property_devices'\n ]\n )\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false,\n C__PROPERTY__PROVIDES__VIRTUAL => true\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'get_reference_value'\n ]\n ]\n ]\n ),\n 'ldev' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CATD__DRIVE_DEVICE',\n C__PROPERTY__INFO__DESCRIPTION => 'On device Logical devices (Client)'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__isys_catg_ldevclient_list__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_ldevclient_list',\n 'isys_catg_ldevclient_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATD__DRIVE_DEVICE',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => new isys_callback(\n [\n 'isys_cmdb_dao_category_g_drive',\n 'callback_property_devices'\n ]\n )\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false,\n C__PROPERTY__PROVIDES__VIRTUAL => true\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'get_reference_value'\n ]\n ]\n ]\n ),\n 'category_const' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__OBJTYPE__CONST',\n C__PROPERTY__INFO__DESCRIPTION => 'Constant'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__const'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__DRIVE__CATEGORY_CONST'\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false,\n C__PROPERTY__PROVIDES__VIRTUAL => true\n ]\n ]\n ),\n 'free_space' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::float(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__DRIVE__FREE_SPACE',\n C__PROPERTY__INFO__DESCRIPTION => 'Free space'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__free_space'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__DRIVE__FREE_SPACE',\n C__PROPERTY__UI__PARAMS => [\n 'p_strClass' => 'input-dual-large'\n ]\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'convert',\n ['memory']\n ],\n C__PROPERTY__FORMAT__UNIT => 'free_space_unit',\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__LIST => false\n ]\n ]\n ),\n 'free_space_unit' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CATG__MEMORY_UNIT',\n C__PROPERTY__INFO__DESCRIPTION => 'Unit'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__free_space__isys_memory_unit__id',\n C__PROPERTY__DATA__FIELD_ALIAS => 'free_space_unit',\n C__PROPERTY__DATA__TABLE_ALIAS => 'fs_unit',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_memory_unit',\n 'isys_memory_unit__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__DRIVE__FREE_SPACE_UNIT',\n C__PROPERTY__UI__PARAMS => [\n 'p_strTable' => 'isys_memory_unit',\n 'p_strClass' => 'input-dual-small',\n 'p_bInfoIconSpacer' => 0\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__LIST => false\n ]\n ]\n ),\n 'used_space' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::float(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__DRIVE__USED_SPACE',\n C__PROPERTY__INFO__DESCRIPTION => 'Free space'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__used_space'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__DRIVE__USED_SPACE',\n C__PROPERTY__UI__PARAMS => [\n 'p_strClass' => 'input-dual-large'\n ]\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'convert',\n ['memory']\n ],\n C__PROPERTY__FORMAT__UNIT => 'used_space_unit',\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__LIST => false\n ]\n ]\n ),\n 'used_space_unit' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CATG__MEMORY_UNIT',\n C__PROPERTY__INFO__DESCRIPTION => 'Unit'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__used_space__isys_memory_unit__id',\n C__PROPERTY__DATA__FIELD_ALIAS => 'used_space_unit',\n C__PROPERTY__DATA__TABLE_ALIAS => 'us_unit',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_memory_unit',\n 'isys_memory_unit__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__DRIVE__USED_SPACE_UNIT',\n C__PROPERTY__UI__PARAMS => [\n 'p_strTable' => 'isys_memory_unit',\n 'p_strClass' => 'input-dual-small',\n 'p_bInfoIconSpacer' => 0\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__LIST => false\n ]\n ]\n ),\n 'description' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::commentary(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__LOGBOOK__DESCRIPTION',\n C__PROPERTY__INFO__DESCRIPTION => 'Description'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_drive_list__description'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CAT__COMMENTARY_' . C__CMDB__CATEGORY__TYPE_GLOBAL . C__CATG__DRIVE\n ]\n ]\n )\n ];\n }", "public function getValidNameAttributes(): array\n {\n return [\n 'Starts with _' => [\n 'attribute_name_0001.xsd', '_foo', \n ], \n 'Starts with letter' => [\n 'attribute_name_0002.xsd', 'f', \n ], \n 'Contains letter' => [\n 'attribute_name_0003.xsd', 'foo', \n ], \n 'Contains digit' => [\n 'attribute_name_0004.xsd', 'f00', \n ], \n 'Contains .' => [\n 'attribute_name_0005.xsd', 'f.bar', \n ], \n 'Contains -' => [\n 'attribute_name_0006.xsd', 'f-bar', \n ], \n 'Contains _' => [\n 'attribute_name_0007.xsd', 'f_bar', \n ], \n 'Surrounded by whitespaces' => [\n 'attribute_name_0008.xsd', 'foo_bar', \n ], \n ];\n }", "function getLocaleFieldNames() {\n\t\treturn array('subscriptionAdditionalInformation', 'delayedOpenAccessPolicy', 'authorSelfArchivePolicy');\n\t}", "function prepare_array() {\n\n\t\t$obj['name'] = $this->name->value;\n\t\t$obj['url'] = $this->url->value;\n\t\t$obj['image'] = $this->image->value;\n\t\t$obj['description'] = $this->description->value;\n\t\t/*\n\t\tforeach($this as $key => $value) {\n\n\t\t\t$obj[$key] = $value;\n\n\t\t}\n\t*/\n\t\treturn $obj;\n\t}", "protected function SimpleObjectParams()\n\t{\n\t\treturn array('camelCase'=>true);\n\t}", "public function format() {\n\n /* * Add the mandatary props* */\n if (!is_null($this->name)) {\n $result[self::NAME_KEY] = $this->name;\n }\n\n /* * Add the optional props if any* */\n if (!is_null($this->optionalProperties)) {\n $result = array_merge($result, $this->optionalProperties);\n }\n\n\n return $result;\n }", "public static function convertKeysToSnakeCase($arrays)\n {\n $new = array();\n foreach ($arrays as $key => $value) {\n $new[self::convertToSnakeCase($key)] = $value;\n }\n return $new;\n }", "public static function _getPropertyNames(): array\n {\n return [\n 'name',\n ];\n }", "public static function getNormalizedBudgetWithSnakeCaseAttributes()\n {\n return [\n 'budget_id' => -1,\n 'name' => 'Interplanetary Cruise #57a058e71f2b9'\n ];\n }", "public static function getPropertyTitles(): array\n {\n return [\n 'date' => 'Refers to the trading day',\n 'volume' => 'Refers to single counted shares matched from executions on IEX',\n 'routedVolume' => 'Refers to single counted shares matched from executions on IEX',\n 'marketShare' => 'Refers to IEX’s percentage of total US Equity market volume',\n 'litVolume' => 'Refers to the number of lit shares traded on IEX (single-counted)',\n ];\n }", "private function cleanupFieldNames($data)\r\n\t{\r\n\t\tforeach ($data as $key => $value)\r\n\t\t{\r\n\t\t\t// Translate field name to lower case\r\n\t\t\t$newKey = $this->makeLowerCaseName($key);\r\n\t\t\tif ($newKey != $key)\r\n\t\t\t{\r\n\t\t\t\t$data[$newKey] = $value;\r\n\t\t\t\tunset($data[$key]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $data;\r\n\t}", "public function getProperties(): array\n {\n $properties = $this->properties;\n\n $typeRequiredProperties = $this->type->getRequiredProperties();\n\n if ($typeRequiredProperties) {\n $properties = array_intersect_key(\n $properties,\n array_flip(array_merge($this->requiredProperties, $typeRequiredProperties))\n );\n }\n\n // Append the control information prefix to the metadata keys\n $requestedODataVersion = (string) $this->type->getVersion();\n\n $result = [];\n\n foreach ($properties as $key => $value) {\n if (version_compare('4.0', $requestedODataVersion, '=')) {\n $result[$this->prefix.'@odata.'.$key] = $value;\n } else {\n $result[$this->prefix.'@'.$key] = $value;\n }\n }\n\n return $result;\n }", "private function _dkim_canonicalize_headers_relaxed($sHeaders){\n\t\t\n\t\t$aHeaders = array();\n\t\t\n\t\t// a header value which is spread over several lines must be 1-lined\n\t\t$sHeaders = preg_replace(\"/\\n\\s+/\", \" \", $sHeaders);\n\t\t\n\t\t$lines = explode(\"\\r\\n\", $sHeaders);\n\t\t\n\t\tforeach($lines as $key => $line){\n\t\t\t\n\t\t\t// delete multiple WSP\n\t\t\t$line = preg_replace(\"/\\s+/\", ' ', $line);\n\t\t\t\n\t\t\tif(!empty($line)){\n\t\t\t\n\t\t\t\t// header type to lowercase and delete WSP which are not part of the header value\n\t\t\t\t$line = explode(':', $line, 2);\n\t\t\t\t\n\t\t\t\t$header_type = trim(strtolower($line[0]));\n\t\t\t\t$header_value = trim($line[1]);\n\t\t\t\t\n\t\t\t\tif(in_array($header_type, $this -> options['signed_headers']) or $header_type == 'dkim-signature'){\n\t\t\t\t\t\n\t\t\t\t\t$aHeaders[$header_type] = $header_type.':'.$header_value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $aHeaders;\n\t}", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if (!is_null($this->container['company_name']) && (strlen($this->container['company_name']) > 254)) {\n $invalidProperties[] = \"invalid value for 'company_name', the character length must be smaller than or equal to 254.\";\n }\n\n if (!is_null($this->container['company_name']) && (strlen($this->container['company_name']) < 0)) {\n $invalidProperties[] = \"invalid value for 'company_name', the character length must be bigger than or equal to 0.\";\n }\n\n if ($this->container['firstname'] === null) {\n $invalidProperties[] = \"'firstname' can't be null\";\n }\n if ((strlen($this->container['firstname']) > 255)) {\n $invalidProperties[] = \"invalid value for 'firstname', the character length must be smaller than or equal to 255.\";\n }\n\n if ((strlen($this->container['firstname']) < 0)) {\n $invalidProperties[] = \"invalid value for 'firstname', the character length must be bigger than or equal to 0.\";\n }\n\n if ($this->container['lastname'] === null) {\n $invalidProperties[] = \"'lastname' can't be null\";\n }\n if ((strlen($this->container['lastname']) > 255)) {\n $invalidProperties[] = \"invalid value for 'lastname', the character length must be smaller than or equal to 255.\";\n }\n\n if ((strlen($this->container['lastname']) < 0)) {\n $invalidProperties[] = \"invalid value for 'lastname', the character length must be bigger than or equal to 0.\";\n }\n\n if ($this->container['street'] === null) {\n $invalidProperties[] = \"'street' can't be null\";\n }\n if ((strlen($this->container['street']) > 254)) {\n $invalidProperties[] = \"invalid value for 'street', the character length must be smaller than or equal to 254.\";\n }\n\n if ((strlen($this->container['street']) < 3)) {\n $invalidProperties[] = \"invalid value for 'street', the character length must be bigger than or equal to 3.\";\n }\n\n if ($this->container['post_code'] === null) {\n $invalidProperties[] = \"'post_code' can't be null\";\n }\n if ((strlen($this->container['post_code']) > 40)) {\n $invalidProperties[] = \"invalid value for 'post_code', the character length must be smaller than or equal to 40.\";\n }\n\n if ((strlen($this->container['post_code']) < 2)) {\n $invalidProperties[] = \"invalid value for 'post_code', the character length must be bigger than or equal to 2.\";\n }\n\n if ($this->container['city'] === null) {\n $invalidProperties[] = \"'city' can't be null\";\n }\n if ((strlen($this->container['city']) > 99)) {\n $invalidProperties[] = \"invalid value for 'city', the character length must be smaller than or equal to 99.\";\n }\n\n if ((strlen($this->container['city']) < 2)) {\n $invalidProperties[] = \"invalid value for 'city', the character length must be bigger than or equal to 2.\";\n }\n\n if ($this->container['country_code'] === null) {\n $invalidProperties[] = \"'country_code' can't be null\";\n }\n if ((strlen($this->container['country_code']) > 2)) {\n $invalidProperties[] = \"invalid value for 'country_code', the character length must be smaller than or equal to 2.\";\n }\n\n if ((strlen($this->container['country_code']) < 0)) {\n $invalidProperties[] = \"invalid value for 'country_code', the character length must be bigger than or equal to 0.\";\n }\n\n if (!is_null($this->container['telephone']) && (strlen($this->container['telephone']) > 99)) {\n $invalidProperties[] = \"invalid value for 'telephone', the character length must be smaller than or equal to 99.\";\n }\n\n if (!is_null($this->container['telephone']) && (strlen($this->container['telephone']) < 0)) {\n $invalidProperties[] = \"invalid value for 'telephone', the character length must be bigger than or equal to 0.\";\n }\n\n return $invalidProperties;\n }", "public static function _getPropertyNames(): array\n {\n return [\n ];\n }", "public function sanitizeProperties( $props )\n\t{\n\t\treturn $props;\n\t}", "public static function getPropertyKeys()\n {\n return array('id', 'title', 'pic');\n }", "protected function sanitizeData($data)\n {\n $ret = [];\n\n foreach($data as $key => $value) {\n if($key[0] === '_') {\n continue;\n }\n\n $ret[$key] = $value;\n }\n \n return $ret;\n }", "protected function convertAttributes($formdata) {\n\t\t$attributes = array();\n\t\t\n\t\tforeach ($formdata as $key => $val) {\n\t\t\t$attributes[] = array('key' => str_replace(\" \",\"_\",strtolower($key)), 'value' => $val);\n\t\t}\n\t\t\n\t\treturn $attributes;\n\t}", "private function processPropertyNamesBucket($data) {\n $reader = new Mobi_Mtld_DA_Carrier_ByteReader($data);\n $numItems = $reader->getShort();\n $propertyNames = array();\n $propertyStringNames = array();\n\n for ($i=0; $i<$numItems; $i++) {\n $valueDataType = $reader->getByte();\n $name = $reader->getStringAscii($reader->getByte());\n $propertyNames[$i] = new Mobi_Mtld_DA_PropertyName($name, $valueDataType);\n $propertyStringNames[$i] = $name;\n }\n\n $this->propertyNames = $propertyNames;\n $this->propertyStringNames = $propertyStringNames;\n }", "public function getPropertyNames();", "protected function normalizeKeys(array $arr)\n {\n return array_change_key_case($arr, CASE_UPPER);\n }", "private function _propertyNameConverter($a_sProperty)\n {\n return ucfirst(preg_replace(\"/(_)(\\w)/e\", \"strtoupper('\\\\2')\", $a_sProperty));\n }", "public function getAesName();", "public static function get_custom_fields() {\n\n\t\t$custom_fields = [];\n\t\t$fields = self::get_meta_keys_alt();\n\n\t\tforeach ( $fields as $field ) {\n\t\t\t$custom_fields[$field] = ucfirst( str_replace( '_', ' ', $field ) );\n\t\t}\n\n\t\treturn $custom_fields;\n\n\t}", "protected function clean_proporties(){\n\t\tglobal $database;\n\n\n\t\t$clean_proporties= array();\n\n\t\tforeach ($this->proporties() as $key => $value) {\n\t\t\t$clean_proporties[$key]=$database->escape_string($value);\n\t\t}\n\n\t\treturn $clean_proporties;\n\t}", "public function toArray() \n\t{\n\t\t$properties = array_merge(parent::toArray(), $this->properties);\n\t\tforeach ($properties as $name => $rawValue) {\n\t\t\t$value = $this->get($name, $rawValue);\n\t\t\t\n\t\t\tif ($value instanceof \\Bliss\\Component || $value instanceof \\Bliss\\Collection) {\n\t\t\t\t$properties[$name] = $value->toArray();\n\t\t\t} else {\n\t\t\t\t$properties[$name] = $value;\n\t\t\t}\n\t\t}\n\t\treturn $properties;\n\t}", "protected function property_map() { return array(); }", "public function getPropertyNamesAsStrings() {\n return $this->propertyStringNames;\n }", "public static function getAxProperties()\n {\n return array(\n \"firstname\"=> 'http://axschema.org/namePerson/first',\n \"lastname\" => 'http://axschema.org/namePerson/last',\n \"email\" => 'http://axschema.org/contact/email',\n \"language\" => 'http://axschema.org/pref/language',\n \"timezone\" => 'http://axschema.org/pref/timezone',\n \"country\" => 'http://axschema.org/contact/country/home',\n \"postcode\" => 'http://axschema.org/contact/postalCode/home',\n \"dob\" => 'http://axschema.org/birthDate',\n \"gender\" => 'http://axschema.org/person/gender',\n );\n }", "public function getToArrayValues()\r\n\t\t{\r\n\t\t\t$obj = \t$this->getObject();\r\n\t\t\t$arrayValues = array();\r\n\t\t\tforeach ($obj as $key => $value) {\r\n\t\t\t\t$arrayValues[\":\".strtoupper($key)] = $value;\r\n\t\t\t}\r\n\t\t\treturn $arrayValues;\r\n\t\t}", "private function toOSKeys($filterNames) {\r\n $arr = array();\r\n foreach ($filterNames as $key => $value) {\r\n if (isset($this->defaultModel->searchFilters[$key])) {\r\n $arr[$this->defaultModel->searchFilters[$key]['osKey']] = $value;\r\n }\r\n \r\n }\r\n return $arr;\r\n }", "function wc_upload_sanitize_accents($filename) {\n\n\t\treturn remove_accents($filename);\n\t}", "function changeDataKeysId2Name($data){\n\t\t/*\n\t\t$res = array();\n\t\tforeach ($this->OnlyById as $aid=>$attribute) {\n\t\t\tif(!isset($data[$aid])) continue;\n\t\t\t$res[$attribute['name']] = $data[$aid];\n\t\t}\n\t\treturn $res;\n\t\t*/\n\t\t\n\t\t$res = array();\n\t\tforeach ($data as $aid=>$val){\n\t\t\tif(isset($this->OnlyById[$aid])){\n\t\t\t\t$res[$this->OnlyById[$aid]->fieldName] = $val;\n\t\t\t} else {\n\t\t\t\t$res[$aid] = $val;\n\t\t\t}\n\t\t}\n\t\treturn $res;\n\t}", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if (!is_null($this->container['hs_code']) && (mb_strlen($this->container['hs_code']) > 25)) {\n $invalidProperties[] = \"invalid value for 'hs_code', the character length must be smaller than or equal to 25.\";\n }\n\n if (!is_null($this->container['hs_code']) && (mb_strlen($this->container['hs_code']) < 0)) {\n $invalidProperties[] = \"invalid value for 'hs_code', the character length must be bigger than or equal to 0.\";\n }\n\n if ($this->container['id'] === null) {\n $invalidProperties[] = \"'id' can't be null\";\n }\n if ($this->container['description'] === null) {\n $invalidProperties[] = \"'description' can't be null\";\n }\n return $invalidProperties;\n }", "public function attributesToArray()\n {\n return Helper::toCamelCase($this->attributes());\n }", "protected function properties()\n {\n return [\n 'title' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__LOGBOOK__TITLE',\n C__PROPERTY__INFO__DESCRIPTION => 'Title'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__title'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__TITLE'\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__IMPORT => false,\n C__PROPERTY__PROVIDES__EXPORT => false,\n C__PROPERTY__PROVIDES__REPORT => false\n ]\n ]\n ),\n 'type' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET__TYPE',\n C__PROPERTY__INFO__DESCRIPTION => 'Type'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__isys_net_type__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_net_type',\n 'isys_net_type__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__TYPE',\n C__PROPERTY__UI__PARAMS => [\n 'p_bDisabled' => '1',\n 'p_strTable' => 'isys_net_type',\n 'p_bDbFieldNN' => '1'\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false\n ]\n ]\n ),\n 'address' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET',\n C__PROPERTY__INFO__DESCRIPTION => 'Net'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__address'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__NET_V4',\n C__PROPERTY__UI__PARAMS => [\n 'p_bReadonly' => '',\n 'p_strClass' => 'input input-mini'\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__LIST => false\n ]\n ]\n ),\n 'netmask' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET__MASK',\n C__PROPERTY__INFO__DESCRIPTION => 'Netmask'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__mask'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__MASK_V4',\n C__PROPERTY__UI__PARAMS => [\n 'p_strClass' => 'input input-mini',\n 'p_bReadonly' => ''\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__LIST => false\n ]\n ]\n ),\n 'gateway' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET__DEF_GW',\n C__PROPERTY__INFO__DESCRIPTION => 'Default Gateway'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__isys_catg_ip_list__id'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__DEF_GW_V4',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => new isys_callback(\n [\n 'isys_cmdb_dao_category_s_net',\n 'callback_property_gateway'\n ]\n )\n ]\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'get_gateway'\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false\n ]\n ]\n ),\n 'range_from' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET__ADDRESS_FROM',\n C__PROPERTY__INFO__DESCRIPTION => 'DHCP from'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__address_range_from'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__ADDRESS_RANGE_FROM'\n ]\n ]\n ),\n 'range_to' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET__ADDRESS_TO',\n C__PROPERTY__INFO__DESCRIPTION => 'DHCP to'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__address_range_to'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__ADDRESS_RANGE_TO'\n ]\n ]\n ),\n 'dns_server' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::object_browser(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET__DNS_SERVER',\n C__PROPERTY__INFO__DESCRIPTION => 'DNS server'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_cats_net_list_2_isys_catg_ip_list',\n 'isys_cats_net_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__DNS_SERVER'\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'get_net_dns_server'\n ]\n ]\n ]\n ),\n 'dns_domain' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::multiselect(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET__DNS_DOMAIN',\n C__PROPERTY__INFO__DESCRIPTION => 'Domain / DNS namespace'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__id',\n C__PROPERTY__DATA__TABLE_ALIAS => 'dns_domain',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_cats_net_list_2_isys_net_dns_domain',\n 'isys_cats_net_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__DNS_DOMAIN',\n C__PROPERTY__UI__PARAMS => [\n 'p_strTable' => 'isys_net_dns_domain',\n 'placeholder' => _L('LC__CMDB__CATS__NET__DNS_DOMAIN'),\n 'emptyMessage' => _L('LC__CMDB__CATS__NET__NO_DNS_DOMAINS_FOUND'),\n 'p_onComplete' => \"idoit.callbackManager.triggerCallback('cmdb-cats-net-dns_domain-update', selected);\",\n 'multiselect' => true\n //'p_arData' => new isys_callback(array('isys_cmdb_dao_category_s_net', 'callback_property_dns_domain'))\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__VALIDATION => false,\n C__PROPERTY__PROVIDES__REPORT => false\n ],\n C__PROPERTY__CHECK => [\n C__PROPERTY__CHECK__MANDATORY => false,\n C__PROPERTY__CHECK__VALIDATION => false\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'dialog_multiselect'\n ]\n ]\n ]\n ),\n 'cidr_suffix' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::int(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET__CIDR_SUFFIX',\n C__PROPERTY__INFO__DESCRIPTION => 'CIDR-Suffix'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__cidr_suffix'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__CIDR',\n C__PROPERTY__UI__PARAMS => [\n 'p_bReadonly' => '',\n 'p_strClass' => 'input input-mini'\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false\n ]\n ]\n ),\n 'reverse_dns' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CATS__NET__REVERSE_DNS',\n C__PROPERTY__INFO__DESCRIPTION => 'Reverse dns'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__reverse_dns'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__REVERSE_DNS'\n ]\n ]\n ),\n 'layer2_assignments' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::object_browser(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET__LAYER2_NET',\n C__PROPERTY__INFO__DESCRIPTION => 'Layer-2-net assignments'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_obj__id'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__LAYER2',\n C__PROPERTY__UI__PARAMS => [\n isys_popup_browser_object_ng::C__TITLE => 'LC__BROWSER__TITLE__NET',\n isys_popup_browser_object_ng::C__MULTISELECTION => true,\n isys_popup_browser_object_ng::C__CAT_FILTER => 'C__CATS__LAYER2_NET'\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__LIST => false\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'layer_2_assignments'\n ]\n ]\n ]\n ),\n 'address_v6' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::virtual(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATS__NET',\n C__PROPERTY__INFO__DESCRIPTION => 'Net v6'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATS__NET__NET_V6'\n ]\n ]\n ),\n 'description' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::commentary(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__LOGBOOK__DESCRIPTION',\n C__PROPERTY__INFO__DESCRIPTION => 'Description'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_cats_net_list__description'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CAT__COMMENTARY_' . C__CMDB__CATEGORY__TYPE_SPECIFIC . C__CATS__NET\n ]\n ]\n )\n ];\n }", "public function toArray()\n {\n return array(\n 'UAH' => Mage::helper('wayforpay_payment')->__('Украинская Гривна'),\n 'RUB' => Mage::helper('wayforpay_payment')->__('Росийский рубль'),\n 'USD' => Mage::helper('wayforpay_payment')->__('Доллар США'),\n 'EUR' => Mage::helper('wayforpay_payment')->__('Евро'),\n );\n }", "private function getDictionary()\n {\n $dict = $this->loadDictionary();\n\n $dict = str_replace(\"\\r\\n\", \"\\n\", $dict);\n $dict = strtoupper($dict);\n $dict = explode(\"\\n\", $dict);\n\n return $dict;\n }", "public static function fatalCharsMap() {\n $convert_table = [\n '°' => '&deg;',\n '¡' => '&iexcl;',\n '&#xa1;' => '&iexcl;',\n '¿' => '&iquest;',\n '&#xbf;' => '&iquest;',\n 'á' => '&agrave;',\n 'Á' => '&Aacute;',\n '&#xc4;' => '&Aacute;',\n '&#xe1;' => '&aacute;',\n 'é' => '&eacute;',\n 'É' => '&Eacute;',\n '&#xc9;' => '&Eacute;',\n '&#xe9;' => '&eacute;',\n 'Í' => '&Iacute;',\n 'í' => '&iacute;',\n '&#xcd;' => '&Iacute;',\n '&#xed;' => '&iacute;',\n 'ó' => '&oacute;',\n '&#xF3;' => '&oacute;',\n '&#xf3;' => '&oacute;',\n '&#xd3;' => '&Oacute;',\n 'Ó' => '&Oacute;',\n 'ú' => '&uacute;',\n '&#xfa;' => '&uacute;',\n 'Ú' => '&Uacute;',\n '&#xda;' => '&Uacute;',\n 'ü' => '&uuml;',\n '&#xfc;' => '&uuml;',\n 'Ü' => '&Uuml;',\n '&#xdc;' => '&Uuml;',\n 'ñ' => '&ntilde;',\n '&#xf1;' => '&ntilde;',\n 'Ñ' => '&Ntilde;',\n '&#xd1;' => '&Ntilde;',\n '&#xF1;' => '&ntilde;',\n '\\BB' => '&raquo;',\n '\\A0' => '&nbsp;',\n '\\92' => \"'\",\n '</br>' => '<br/>',\n ];\n\n return $convert_table;\n }", "public static function getProperties()\n {\n return [\n 'Type' => [false, self::PROPERTY_TYPE_ENUM, null, false, false],\n 'Name' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'ABN' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'BSB' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'AccountNumber' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'AccountName' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'ElectronicServiceAddress' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'SuperFundID' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'EmployerNumber' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'SPIN' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n ];\n }", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['name'] === null) {\n $invalidProperties[] = \"'name' can't be null\";\n }\n if ($this->container['key'] === null) {\n $invalidProperties[] = \"'key' can't be null\";\n }\n if ($this->container['variations'] === null) {\n $invalidProperties[] = \"'variations' can't be null\";\n }\n return $invalidProperties;\n }", "public function getNamesDictionary($create = false) {}", "function getLocaleFieldNames() {\n\t\treturn array('name', 'description', \"applicationForm\", \"survey\");\n\t}", "public function convertArrayKeysToUtf88($array1) {\n $convertedArray1 = array();\n $convertedArray = array();\n foreach($array1 as $array) {\n foreach($array as $key => $value) {\n if(!mb_check_encoding($value, 'UTF-8')) \n {$value = utf8_encode($value); }\n\n $convertedArray[$key] = $value;\n\n }\n $convertedArray1[] = $convertedArray;\n}\n return $convertedArray1;\n }", "function getLocaleFieldNames() {\n\t\treturn array();\n\n\t}", "function getLocaleFieldNames() {\n\t\treturn array('title');\n\t}", "function getLocaleFieldNames() {\n\t\treturn array('title');\n\t}", "private function _getMultilangualFields()\n {\n $aRet = array();\n\n $aData = oxDb::getInstance()->getTableDescription($this->_sTableName);\n\n foreach ($aData as $key => $oADODBField) {\n $iLang = substr($oADODBField->name, strlen($oADODBField->name) - 1, 1);\n if (is_numeric($iLang) && substr($oADODBField->name, strlen($oADODBField->name) - 2, 1) == '_') {\n // multilangual field\n $sMainFld = str_replace('_' . $iLang, \"\", $oADODBField->name);\n $aRet[$iLang][$sMainFld] = $oADODBField->name . ' as ' . $sMainFld;\n }\n }\n\n return $aRet;\n }", "public function toArray(): array\n\t{\n\t\t$values = [];\n\n\t\tforeach ((array) $this as $key => $value) {\n\t\t\t// Private and protected properties have ugly array key prefixes which we remove\n\t\t\t$key = preg_replace('~^.+\\0~', '', $key);\n\t\t\t$values[$key] = $value;\n\t\t}\n\n\t\treturn $values;\n\t}", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if (!is_null($this->container['iban']) && !preg_match(\"/[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}/\", $this->container['iban'])) {\n $invalidProperties[] = \"invalid value for 'iban', must be conform to the pattern /[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}/.\";\n }\n\n if (!is_null($this->container['bban']) && !preg_match(\"/[a-zA-Z0-9]{1,30}/\", $this->container['bban'])) {\n $invalidProperties[] = \"invalid value for 'bban', must be conform to the pattern /[a-zA-Z0-9]{1,30}/.\";\n }\n\n if (!is_null($this->container['msisdn']) && (mb_strlen($this->container['msisdn']) > 35)) {\n $invalidProperties[] = \"invalid value for 'msisdn', the character length must be smaller than or equal to 35.\";\n }\n\n if ($this->container['currency'] === null) {\n $invalidProperties[] = \"'currency' can't be null\";\n }\n if (!preg_match(\"/[A-Z]{3}/\", $this->container['currency'])) {\n $invalidProperties[] = \"invalid value for 'currency', must be conform to the pattern /[A-Z]{3}/.\";\n }\n\n if (!is_null($this->container['name']) && (mb_strlen($this->container['name']) > 70)) {\n $invalidProperties[] = \"invalid value for 'name', the character length must be smaller than or equal to 70.\";\n }\n\n if (!is_null($this->container['display_name']) && (mb_strlen($this->container['display_name']) > 70)) {\n $invalidProperties[] = \"invalid value for 'display_name', the character length must be smaller than or equal to 70.\";\n }\n\n if (!is_null($this->container['product']) && (mb_strlen($this->container['product']) > 35)) {\n $invalidProperties[] = \"invalid value for 'product', the character length must be smaller than or equal to 35.\";\n }\n\n if (!is_null($this->container['bic']) && !preg_match(\"/[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}/\", $this->container['bic'])) {\n $invalidProperties[] = \"invalid value for 'bic', must be conform to the pattern /[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}/.\";\n }\n\n if (!is_null($this->container['linked_accounts']) && (mb_strlen($this->container['linked_accounts']) > 70)) {\n $invalidProperties[] = \"invalid value for 'linked_accounts', the character length must be smaller than or equal to 70.\";\n }\n\n $allowedValues = $this->getUsageAllowableValues();\n if (!is_null($this->container['usage']) && !in_array($this->container['usage'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'usage', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n if (!is_null($this->container['usage']) && (mb_strlen($this->container['usage']) > 4)) {\n $invalidProperties[] = \"invalid value for 'usage', the character length must be smaller than or equal to 4.\";\n }\n\n if (!is_null($this->container['details']) && (mb_strlen($this->container['details']) > 500)) {\n $invalidProperties[] = \"invalid value for 'details', the character length must be smaller than or equal to 500.\";\n }\n\n if (!is_null($this->container['owner_name']) && (mb_strlen($this->container['owner_name']) > 140)) {\n $invalidProperties[] = \"invalid value for 'owner_name', the character length must be smaller than or equal to 140.\";\n }\n\n return $invalidProperties;\n }", "function getProperties($pathFile){\n\t\t$data = array();\n\t\t$xml = \"\";\n\t\tif(file_exists($pathFile)){\n\t\t\tif(isset($pathFile)){\n\t\t\t\t$data = array();\n\t\t\t\t$xml = simplexml_load_file($pathFile);\n\t\t\t\tforeach($xml->entry as $nodo){\n\t\t\t\t\t$data[(string)$nodo->attributes()[\"key\"]] = (string)$nodo;\n\t\t\t\t}\n\t\t\t\t//error_log(\"properties encontradas: \".count($data).\"\\n\",0);\n\t\t\t}\n\t\t}else{\n\t\t\t//error_log(\"No existe archivo: \".$pathFile.\"\\n\",0);\n\t\t}\n\t\treturn $data;\n\t}", "static function get_default_property_names($extended_property_names = array())\n {\n return parent :: get_default_property_names(array(self :: PROPERTY_FIRST_NAME, self :: PROPERTY_LAST_NAME, self :: PROPERTY_EMAIL, self :: PROPERTY_AFFILIATION, self :: PROPERTY_PASSWORD, self :: PROPERTY_GROUP, self :: PROPERTY_STATUS));\n }", "public static function _getPropertyNames(): array\n {\n return [\n 'traveler',\n 'watcher',\n 'distance',\n ];\n }", "public static function get_default_property_names($extended_property_names = array())\n {\n return parent::get_default_property_names(\n array(\n self::PROPERTY_PUBLICATION_ID\n )\n );\n }", "public static function arrayKeysToSnake(array $data): array {\n\n foreach ($data as $key => $value) {\n if (!self::isInteger($key)) {\n\n $newKey = strtolower(preg_replace(\"/([a-z])([A-Z])/\", \"$1_$2\", $key));\n $data[$newKey] = $value;\n\n if ($key !== $newKey) {\n unset($data[$key]);\n }\n\n }\n }\n\n return $data;\n\n }", "function nice_names($groups){\n\n $group_array=array();\n for ($i=0; $i<$groups[\"count\"]; $i++) { //for each group\n if (isset($groups[$i])) { // Patched by SysCo/al\n $line=trim($groups[$i]);\n \n if (strlen($line)>0){ \n //more presumptions, they're all prefixed with CN= (but no more yet, patched by SysCo/al\n //so we ditch the first three characters and the group\n //name goes up to the first comma\n $bits=explode(\",\",$line);\n if (1== count($bits)) {\n $group_array[]=$bits[0]; // Patched by SysCo/al\n } else {\n $prefix_len=strpos($bits[0], \"=\"); // Patched by SysCo/al to allow also various length (not only 3)\n if (FALSE === $prefix_len) {\n $group_array[]=$bits[0];\n } else {\n $group_array[]=substr($bits[0],$prefix_len+1); // Patched by SysCo/al\n }\n }\n }\n }\n }\n return ($group_array);\t\n }", "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n if (!is_null($this->container['bookingReferenceNumber']) && (strlen($this->container['bookingReferenceNumber']) > 15)) {\n $invalid_properties[] = \"invalid value for 'bookingReferenceNumber', the character length must be smaller than or equal to 15.\";\n }\n\n if (!is_null($this->container['carrierName']) && (strlen($this->container['carrierName']) > 15)) {\n $invalid_properties[] = \"invalid value for 'carrierName', the character length must be smaller than or equal to 15.\";\n }\n\n if (!is_null($this->container['ticketNumber']) && (strlen($this->container['ticketNumber']) > 15)) {\n $invalid_properties[] = \"invalid value for 'ticketNumber', the character length must be smaller than or equal to 15.\";\n }\n\n if (!is_null($this->container['checkDigit']) && (strlen($this->container['checkDigit']) > 1)) {\n $invalid_properties[] = \"invalid value for 'checkDigit', the character length must be smaller than or equal to 1.\";\n }\n\n if (!is_null($this->container['extendedPaymentCode']) && (strlen($this->container['extendedPaymentCode']) > 3)) {\n $invalid_properties[] = \"invalid value for 'extendedPaymentCode', the character length must be smaller than or equal to 3.\";\n }\n\n if (!is_null($this->container['passengerName']) && (strlen($this->container['passengerName']) > 42)) {\n $invalid_properties[] = \"invalid value for 'passengerName', the character length must be smaller than or equal to 42.\";\n }\n\n if (!is_null($this->container['customerCode']) && (strlen($this->container['customerCode']) > 40)) {\n $invalid_properties[] = \"invalid value for 'customerCode', the character length must be smaller than or equal to 40.\";\n }\n\n if (!is_null($this->container['documentType']) && (strlen($this->container['documentType']) > 1)) {\n $invalid_properties[] = \"invalid value for 'documentType', the character length must be smaller than or equal to 1.\";\n }\n\n if (!is_null($this->container['documentNumber']) && (strlen($this->container['documentNumber']) > 14)) {\n $invalid_properties[] = \"invalid value for 'documentNumber', the character length must be smaller than or equal to 14.\";\n }\n\n if (!is_null($this->container['invoiceNumber']) && (strlen($this->container['invoiceNumber']) > 25)) {\n $invalid_properties[] = \"invalid value for 'invoiceNumber', the character length must be smaller than or equal to 25.\";\n }\n\n if (!is_null($this->container['additionalCharges']) && (strlen($this->container['additionalCharges']) > 20)) {\n $invalid_properties[] = \"invalid value for 'additionalCharges', the character length must be smaller than or equal to 20.\";\n }\n\n if (!is_null($this->container['totalFeeAmount']) && (strlen($this->container['totalFeeAmount']) > 12)) {\n $invalid_properties[] = \"invalid value for 'totalFeeAmount', the character length must be smaller than or equal to 12.\";\n }\n\n if (!is_null($this->container['clearingSequence']) && (strlen($this->container['clearingSequence']) > 2)) {\n $invalid_properties[] = \"invalid value for 'clearingSequence', the character length must be smaller than or equal to 2.\";\n }\n\n if (!is_null($this->container['clearingCount']) && (strlen($this->container['clearingCount']) > 2)) {\n $invalid_properties[] = \"invalid value for 'clearingCount', the character length must be smaller than or equal to 2.\";\n }\n\n if (!is_null($this->container['totalClearingAmount']) && (strlen($this->container['totalClearingAmount']) > 20)) {\n $invalid_properties[] = \"invalid value for 'totalClearingAmount', the character length must be smaller than or equal to 20.\";\n }\n\n if (!is_null($this->container['reservationSystemCode']) && (strlen($this->container['reservationSystemCode']) > 4)) {\n $invalid_properties[] = \"invalid value for 'reservationSystemCode', the character length must be smaller than or equal to 4.\";\n }\n\n if (!is_null($this->container['processIdentifier']) && (strlen($this->container['processIdentifier']) > 3)) {\n $invalid_properties[] = \"invalid value for 'processIdentifier', the character length must be smaller than or equal to 3.\";\n }\n\n if (!is_null($this->container['ticketIssueDate']) && (strlen($this->container['ticketIssueDate']) > 8)) {\n $invalid_properties[] = \"invalid value for 'ticketIssueDate', the character length must be smaller than or equal to 8.\";\n }\n\n if (!is_null($this->container['originalTicketNumber']) && (strlen($this->container['originalTicketNumber']) > 14)) {\n $invalid_properties[] = \"invalid value for 'originalTicketNumber', the character length must be smaller than or equal to 14.\";\n }\n\n if (!is_null($this->container['purchaseType']) && (strlen($this->container['purchaseType']) > 3)) {\n $invalid_properties[] = \"invalid value for 'purchaseType', the character length must be smaller than or equal to 3.\";\n }\n\n if (!is_null($this->container['creditReasonIndicator']) && (strlen($this->container['creditReasonIndicator']) > 1)) {\n $invalid_properties[] = \"invalid value for 'creditReasonIndicator', the character length must be smaller than or equal to 1.\";\n }\n\n if (!is_null($this->container['ticketChangeIndicator']) && (strlen($this->container['ticketChangeIndicator']) > 1)) {\n $invalid_properties[] = \"invalid value for 'ticketChangeIndicator', the character length must be smaller than or equal to 1.\";\n }\n\n if (!is_null($this->container['planNumber']) && (strlen($this->container['planNumber']) > 1)) {\n $invalid_properties[] = \"invalid value for 'planNumber', the character length must be smaller than or equal to 1.\";\n }\n\n if (!is_null($this->container['arrivalDate']) && (strlen($this->container['arrivalDate']) > 8)) {\n $invalid_properties[] = \"invalid value for 'arrivalDate', the character length must be smaller than or equal to 8.\";\n }\n\n if (!is_null($this->container['restrictedTicketDesciption']) && (strlen($this->container['restrictedTicketDesciption']) > 20)) {\n $invalid_properties[] = \"invalid value for 'restrictedTicketDesciption', the character length must be smaller than or equal to 20.\";\n }\n\n if (!is_null($this->container['exchangeTicketAmount']) && (strlen($this->container['exchangeTicketAmount']) > 12)) {\n $invalid_properties[] = \"invalid value for 'exchangeTicketAmount', the character length must be smaller than or equal to 12.\";\n }\n\n if (!is_null($this->container['exchangeTicketFeeAmount']) && (strlen($this->container['exchangeTicketFeeAmount']) > 12)) {\n $invalid_properties[] = \"invalid value for 'exchangeTicketFeeAmount', the character length must be smaller than or equal to 12.\";\n }\n\n if (!is_null($this->container['reservationType']) && (strlen($this->container['reservationType']) > 32)) {\n $invalid_properties[] = \"invalid value for 'reservationType', the character length must be smaller than or equal to 32.\";\n }\n\n if (!is_null($this->container['boardingFeeAmount']) && (strlen($this->container['boardingFeeAmount']) > 12)) {\n $invalid_properties[] = \"invalid value for 'boardingFeeAmount', the character length must be smaller than or equal to 12.\";\n }\n\n return $invalid_properties;\n }", "public function listInvalidProperties()\n {\n $invalid_properties = [];\n if ($this->container['name'] === null) {\n $invalid_properties[] = \"'name' can't be null\";\n }\n if ((strlen($this->container['name']) > 50)) {\n $invalid_properties[] = \"invalid value for 'name', the character length must be smaller than or equal to 50.\";\n }\n\n if ($this->container['type'] === null) {\n $invalid_properties[] = \"'type' can't be null\";\n }\n if ($this->container['sub_type'] === null) {\n $invalid_properties[] = \"'sub_type' can't be null\";\n }\n if ($this->container['start_date'] === null) {\n $invalid_properties[] = \"'start_date' can't be null\";\n }\n return $invalid_properties;\n }", "public function toArray($request)\n {\n return [\n 'Fullnames' => mb_strimwidth($this->Fullnames,0,5,'...'); // transform the data to 5 characters long\n\n ];\n }", "private static function normaliseKeys($keyVals) {\n $headers = array();\n\n foreach ($keyVals as $k => $v) {\n $k = str_replace('_', '-', strtolower($k));\n if (substr($k, 0, 5) === 'http-') {\n $k = substr($k, 5);\n }\n $headers[trim($k)] = $v;\n }\n\n return $headers;\n }", "static function formatPostsMetaData($obj){\n $newObj;\n\n foreach ($obj as $key => $value) {\n if(substr($key,0,1)!= '_'){\n $newObj[$key] = $value[0];\n }\n }\n return $newObj;\n }", "function jsonSerialize()\n {\n $json = array();\n\n foreach ($this as $key => $value) {\n $key = str_replace('_', '', $key);\n $json[$key] = $value;\n }\n\n return $json;\n }", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if (!is_null($this->container['first_name']) && (mb_strlen($this->container['first_name']) > 100)) {\n $invalidProperties[] = \"invalid value for 'first_name', the character length must be smaller than or equal to 100.\";\n }\n\n if (!is_null($this->container['last_name']) && (mb_strlen($this->container['last_name']) > 100)) {\n $invalidProperties[] = \"invalid value for 'last_name', the character length must be smaller than or equal to 100.\";\n }\n\n if (!is_null($this->container['display_name']) && (mb_strlen($this->container['display_name']) > 255)) {\n $invalidProperties[] = \"invalid value for 'display_name', the character length must be smaller than or equal to 255.\";\n }\n\n if (!is_null($this->container['company_name']) && (mb_strlen($this->container['company_name']) > 255)) {\n $invalidProperties[] = \"invalid value for 'company_name', the character length must be smaller than or equal to 255.\";\n }\n\n if ($this->container['phone'] === null) {\n $invalidProperties[] = \"'phone' can't be null\";\n }\n if ((mb_strlen($this->container['phone']) > 20)) {\n $invalidProperties[] = \"invalid value for 'phone', the character length must be smaller than or equal to 20.\";\n }\n\n if ($this->container['email'] === null) {\n $invalidProperties[] = \"'email' can't be null\";\n }\n if ((mb_strlen($this->container['email']) > 100)) {\n $invalidProperties[] = \"invalid value for 'email', the character length must be smaller than or equal to 100.\";\n }\n\n if (!is_null($this->container['website']) && (mb_strlen($this->container['website']) > 100)) {\n $invalidProperties[] = \"invalid value for 'website', the character length must be smaller than or equal to 100.\";\n }\n\n return $invalidProperties;\n }", "private function addPrefixProperties($props, $prefix) {\n\t\t$conProps = array();\n\t\tforeach ($props as $k => $v) {\n\t\t\t$conProps[$prefix . ucfirst($k)] = $v;\n\t\t}\n\t\treturn $conProps;\n\t}", "public function toArray()\n {\n $return = array();\n foreach ( $this as $property => $value ) {\n if ( '__' == substr( $property, 0, 2 ) || '' === $value || is_null( $value ) || ( is_array( $value ) && empty( $value ) ) ) {\n continue;\n }\n $return[ $property ] = $value;\n }\n\n return $return;\n }", "protected function properties(){\n\t\t$properties = array();\n\t\tforeach(static::$db_table_fields as $db_field){\n\t\t\tif(property_exists($this,$db_field)){\n\t\t\t$properties[$db_field]= $this->$db_field;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $properties;\t\n\t}", "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n if ($this->container['enableSso'] === null) {\r\n $invalidProperties[] = \"'enableSso' can't be null\";\r\n }\r\n if (!is_null($this->container['domain']) && (mb_strlen($this->container['domain']) > 255)) {\r\n $invalidProperties[] = \"invalid value for 'domain', the character length must be smaller than or equal to 255.\";\r\n }\r\n if (!is_null($this->container['domain']) && (mb_strlen($this->container['domain']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'domain', the character length must be bigger than or equal to 0.\";\r\n }\r\n if (!is_null($this->container['authorizeUrl']) && (mb_strlen($this->container['authorizeUrl']) > 255)) {\r\n $invalidProperties[] = \"invalid value for 'authorizeUrl', the character length must be smaller than or equal to 255.\";\r\n }\r\n if (!is_null($this->container['authorizeUrl']) && (mb_strlen($this->container['authorizeUrl']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'authorizeUrl', the character length must be bigger than or equal to 0.\";\r\n }\r\n if (!is_null($this->container['authorizeUrl']) && !preg_match(\"/^$|^[0-9a-zA-Z-_.:@&=$\\/?#%]+$/\", $this->container['authorizeUrl'])) {\r\n $invalidProperties[] = \"invalid value for 'authorizeUrl', must be conform to the pattern /^$|^[0-9a-zA-Z-_.:@&=$\\/?#%]+$/.\";\r\n }\r\n if (!is_null($this->container['getTokenUrl']) && (mb_strlen($this->container['getTokenUrl']) > 255)) {\r\n $invalidProperties[] = \"invalid value for 'getTokenUrl', the character length must be smaller than or equal to 255.\";\r\n }\r\n if (!is_null($this->container['getTokenUrl']) && (mb_strlen($this->container['getTokenUrl']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'getTokenUrl', the character length must be bigger than or equal to 0.\";\r\n }\r\n if (!is_null($this->container['getTokenUrl']) && !preg_match(\"/^$|^[0-9a-zA-Z-_.:@&=$\\/?#%]+$/\", $this->container['getTokenUrl'])) {\r\n $invalidProperties[] = \"invalid value for 'getTokenUrl', must be conform to the pattern /^$|^[0-9a-zA-Z-_.:@&=$\\/?#%]+$/.\";\r\n }\r\n if (!is_null($this->container['clientId']) && (mb_strlen($this->container['clientId']) > 255)) {\r\n $invalidProperties[] = \"invalid value for 'clientId', the character length must be smaller than or equal to 255.\";\r\n }\r\n if (!is_null($this->container['clientId']) && (mb_strlen($this->container['clientId']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'clientId', the character length must be bigger than or equal to 0.\";\r\n }\r\n if (!is_null($this->container['clientSecret']) && (mb_strlen($this->container['clientSecret']) > 255)) {\r\n $invalidProperties[] = \"invalid value for 'clientSecret', the character length must be smaller than or equal to 255.\";\r\n }\r\n if (!is_null($this->container['clientSecret']) && (mb_strlen($this->container['clientSecret']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'clientSecret', the character length must be bigger than or equal to 0.\";\r\n }\r\n if (!is_null($this->container['scope']) && (mb_strlen($this->container['scope']) > 255)) {\r\n $invalidProperties[] = \"invalid value for 'scope', the character length must be smaller than or equal to 255.\";\r\n }\r\n if (!is_null($this->container['scope']) && (mb_strlen($this->container['scope']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'scope', the character length must be bigger than or equal to 0.\";\r\n }\r\n if (!is_null($this->container['accFieldName']) && (mb_strlen($this->container['accFieldName']) > 255)) {\r\n $invalidProperties[] = \"invalid value for 'accFieldName', the character length must be smaller than or equal to 255.\";\r\n }\r\n if (!is_null($this->container['accFieldName']) && (mb_strlen($this->container['accFieldName']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'accFieldName', the character length must be bigger than or equal to 0.\";\r\n }\r\n if (!is_null($this->container['getUserInfoUrl']) && (mb_strlen($this->container['getUserInfoUrl']) > 255)) {\r\n $invalidProperties[] = \"invalid value for 'getUserInfoUrl', the character length must be smaller than or equal to 255.\";\r\n }\r\n if (!is_null($this->container['getUserInfoUrl']) && (mb_strlen($this->container['getUserInfoUrl']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'getUserInfoUrl', the character length must be bigger than or equal to 0.\";\r\n }\r\n if (!is_null($this->container['getUserInfoUrl']) && !preg_match(\"/^$|^[0-9a-zA-Z-_.:@&=$\\/?#%]+$/\", $this->container['getUserInfoUrl'])) {\r\n $invalidProperties[] = \"invalid value for 'getUserInfoUrl', must be conform to the pattern /^$|^[0-9a-zA-Z-_.:@&=$\\/?#%]+$/.\";\r\n }\r\n if (!is_null($this->container['oauth2ServerType']) && ($this->container['oauth2ServerType'] > 255)) {\r\n $invalidProperties[] = \"invalid value for 'oauth2ServerType', must be smaller than or equal to 255.\";\r\n }\r\n if (!is_null($this->container['oauth2ServerType']) && ($this->container['oauth2ServerType'] < 0)) {\r\n $invalidProperties[] = \"invalid value for 'oauth2ServerType', must be bigger than or equal to 0.\";\r\n }\r\n if (!is_null($this->container['pcSchemaUrl']) && (mb_strlen($this->container['pcSchemaUrl']) > 255)) {\r\n $invalidProperties[] = \"invalid value for 'pcSchemaUrl', the character length must be smaller than or equal to 255.\";\r\n }\r\n if (!is_null($this->container['pcSchemaUrl']) && (mb_strlen($this->container['pcSchemaUrl']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'pcSchemaUrl', the character length must be bigger than or equal to 0.\";\r\n }\r\n if (!is_null($this->container['pcSchemaUrl']) && !preg_match(\"/^$|^[0-9a-zA-Z-_.{}:@&=$\\/?#%]+$/\", $this->container['pcSchemaUrl'])) {\r\n $invalidProperties[] = \"invalid value for 'pcSchemaUrl', must be conform to the pattern /^$|^[0-9a-zA-Z-_.{}:@&=$\\/?#%]+$/.\";\r\n }\r\n if (!is_null($this->container['androidSchemaUrl']) && (mb_strlen($this->container['androidSchemaUrl']) > 255)) {\r\n $invalidProperties[] = \"invalid value for 'androidSchemaUrl', the character length must be smaller than or equal to 255.\";\r\n }\r\n if (!is_null($this->container['androidSchemaUrl']) && (mb_strlen($this->container['androidSchemaUrl']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'androidSchemaUrl', the character length must be bigger than or equal to 0.\";\r\n }\r\n if (!is_null($this->container['androidSchemaUrl']) && !preg_match(\"/^$|^[0-9a-zA-Z-_.{}:@&=$\\/?#%]+$/\", $this->container['androidSchemaUrl'])) {\r\n $invalidProperties[] = \"invalid value for 'androidSchemaUrl', must be conform to the pattern /^$|^[0-9a-zA-Z-_.{}:@&=$\\/?#%]+$/.\";\r\n }\r\n if (!is_null($this->container['iosSchemaUrl']) && (mb_strlen($this->container['iosSchemaUrl']) > 255)) {\r\n $invalidProperties[] = \"invalid value for 'iosSchemaUrl', the character length must be smaller than or equal to 255.\";\r\n }\r\n if (!is_null($this->container['iosSchemaUrl']) && (mb_strlen($this->container['iosSchemaUrl']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'iosSchemaUrl', the character length must be bigger than or equal to 0.\";\r\n }\r\n if (!is_null($this->container['iosSchemaUrl']) && !preg_match(\"/^$|^[0-9a-zA-Z-_.{}:@&=$\\/?#%]+$/\", $this->container['iosSchemaUrl'])) {\r\n $invalidProperties[] = \"invalid value for 'iosSchemaUrl', must be conform to the pattern /^$|^[0-9a-zA-Z-_.{}:@&=$\\/?#%]+$/.\";\r\n }\r\n if (!is_null($this->container['thirdName']) && (mb_strlen($this->container['thirdName']) > 255)) {\r\n $invalidProperties[] = \"invalid value for 'thirdName', the character length must be smaller than or equal to 255.\";\r\n }\r\n if (!is_null($this->container['thirdName']) && (mb_strlen($this->container['thirdName']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'thirdName', the character length must be bigger than or equal to 0.\";\r\n }\r\n if (!is_null($this->container['thirdEmail']) && (mb_strlen($this->container['thirdEmail']) > 255)) {\r\n $invalidProperties[] = \"invalid value for 'thirdEmail', the character length must be smaller than or equal to 255.\";\r\n }\r\n if (!is_null($this->container['thirdEmail']) && (mb_strlen($this->container['thirdEmail']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'thirdEmail', the character length must be bigger than or equal to 0.\";\r\n }\r\n if (!is_null($this->container['thirdMobile']) && (mb_strlen($this->container['thirdMobile']) > 255)) {\r\n $invalidProperties[] = \"invalid value for 'thirdMobile', the character length must be smaller than or equal to 255.\";\r\n }\r\n if (!is_null($this->container['thirdMobile']) && (mb_strlen($this->container['thirdMobile']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'thirdMobile', the character length must be bigger than or equal to 0.\";\r\n }\r\n if (!is_null($this->container['thirdAccessToken']) && (mb_strlen($this->container['thirdAccessToken']) > 255)) {\r\n $invalidProperties[] = \"invalid value for 'thirdAccessToken', the character length must be smaller than or equal to 255.\";\r\n }\r\n if (!is_null($this->container['thirdAccessToken']) && (mb_strlen($this->container['thirdAccessToken']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'thirdAccessToken', the character length must be bigger than or equal to 0.\";\r\n }\r\n if (!is_null($this->container['thirdHeadImgUrl']) && (mb_strlen($this->container['thirdHeadImgUrl']) > 64)) {\r\n $invalidProperties[] = \"invalid value for 'thirdHeadImgUrl', the character length must be smaller than or equal to 64.\";\r\n }\r\n if (!is_null($this->container['thirdHeadImgUrl']) && (mb_strlen($this->container['thirdHeadImgUrl']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'thirdHeadImgUrl', the character length must be bigger than or equal to 0.\";\r\n }\r\n return $invalidProperties;\r\n }", "public function toArray()\n {\n return ['Lax' => __('Lax'), 'Strict' => __('Strict'), 'None' => __('Strict')];\n }", "private function latinNames()\n {\n\n return [\n\n 'Ageratum houstonianum',\n\n 'Tagetes erecta',\n\n 'Catharanthus roseus',\n\n 'Sutera cordata',\n\n 'Platycodon grandiflorus',\n\n 'Monarda didyma',\n\n 'Rudbeckia hirta',\n\n 'Rudbeckia fulgida var. sullivantii',\n\n 'Dicentra spectabilis',\n\n 'Geranium sanguineum',\n\n 'Festuca glauca',\n\n 'Salvia farinacea',\n\n 'Schizachyrium',\n\n 'Asclepias tuberosa',\n\n 'Caladium hortulanum',\n\n 'Canna generalis',\n\n 'Dianthus chinensis',\n\n 'Cuphea ignea',\n\n 'Coleus\tSolenostemon scutellaroides',\n\n 'Achillea millefolium',\n\n ];\n\n }", "public static function funkyCharsMap() {\n $convert_table = [\n '©' => 'c',\n '®' => 'r',\n 'À' => 'a',\n 'Ã' => 'a',\n 'Á' => 'a',\n 'Â' => 'a',\n 'Ä' => 'a',\n 'Å' => 'a',\n 'Æ' => 'ae',\n 'Ç' => 'c',\n 'È' => 'e',\n 'É' => 'e',\n 'Ë' => 'e',\n 'Ì' => 'i',\n 'Í' => 'i',\n 'Î' => 'i',\n 'Ï' => 'i',\n 'Ò' => 'o',\n 'Ó' => 'o',\n 'Ô' => 'o',\n 'Õ' => 'o',\n 'Ö' => 'o',\n 'Ø' => 'o',\n 'Ù' => 'u',\n 'Ú' => 'u',\n 'Û' => 'u',\n 'Ü' => 'u',\n 'Ý' => 'y',\n 'ß' => 'ss',\n 'à' => 'a',\n 'á' => 'a',\n 'â' => 'a',\n 'ä' => 'a',\n 'å' => 'a',\n 'æ' => 'ae',\n 'ç' => 'c',\n 'è' => 'e',\n 'é' => 'e',\n 'ê' => 'e',\n 'ë' => 'e',\n 'ì' => 'i',\n 'í' => 'i',\n 'î' => 'i',\n 'ï' => 'i',\n 'ò' => 'o',\n 'ó' => 'o',\n 'ô' => 'o',\n 'õ' => 'o',\n 'ö' => 'o',\n 'ø' => 'o',\n 'ù' => 'u',\n 'ú' => 'u',\n 'û' => 'u',\n 'ü' => 'u',\n 'ý' => 'y',\n 'þ' => 'p',\n 'ÿ' => 'y',\n 'Ā' => 'a',\n 'ā' => 'a',\n 'Ă' => 'a',\n 'ă' => 'a',\n 'Ą' => 'a',\n 'ą' => 'a',\n 'Ć' => 'c',\n 'ć' => 'c',\n 'Ĉ' => 'c',\n 'ĉ' => 'c',\n 'Ċ' => 'c',\n 'ċ' => 'c',\n 'Č' => 'c',\n 'č' => 'c',\n 'Ď' => 'd',\n 'ď' => 'd',\n 'Đ' => 'd',\n 'đ' => 'd',\n 'Ē' => 'e',\n 'ē' => 'e',\n 'Ĕ' => 'e',\n 'ĕ' => 'e',\n 'Ė' => 'e',\n 'ė' => 'e',\n 'Ę' => 'e',\n 'ę' => 'e',\n 'Ě' => 'e',\n 'ě' => 'e',\n 'Ĝ' => 'g',\n 'ĝ' => 'g',\n 'Ğ' => 'g',\n 'ğ' => 'g',\n 'Ġ' => 'g',\n 'ġ' => 'g',\n 'Ģ' => 'g',\n 'ģ' => 'g',\n 'Ĥ' => 'h',\n 'ĥ' => 'h',\n 'Ħ' => 'h',\n 'ħ' => 'h',\n 'Ĩ' => 'i',\n 'ĩ' => 'i',\n 'Ī' => 'i',\n 'ī' => 'i',\n 'Ĭ' => 'i',\n 'ĭ' => 'i',\n 'Į' => 'i',\n 'į' => 'i',\n 'İ' => 'i',\n 'ı' => 'i',\n 'IJ' => 'ij',\n 'ij' => 'ij',\n 'Ĵ' => 'j',\n 'ĵ' => 'j',\n 'Ķ' => 'k',\n 'ķ' => 'k',\n 'ĸ' => 'k',\n 'Ĺ' => 'l',\n 'ĺ' => 'l',\n 'Ļ' => 'l',\n 'ļ' => 'l',\n 'Ľ' => 'l',\n 'ľ' => 'l',\n 'Ŀ' => 'l',\n 'ŀ' => 'l',\n 'Ł' => 'l',\n 'ł' => 'l',\n 'Ń' => 'n',\n 'ń' => 'n',\n 'Ņ' => 'n',\n 'ņ' => 'n',\n 'Ň' => 'n',\n 'ň' => 'n',\n 'ʼn' => 'n',\n 'Ŋ' => 'n',\n 'ŋ' => 'n',\n 'ñ' => 'n',\n 'Ō' => 'o',\n 'ō' => 'o',\n 'Ŏ' => 'o',\n 'ŏ' => 'o',\n 'Ő' => 'o',\n 'ő' => 'o',\n 'Œ' => 'oe',\n 'œ' => 'oe',\n 'Ŕ' => 'r',\n 'ŕ' => 'r',\n 'Ŗ' => 'r',\n 'ŗ' => 'r',\n 'Ř' => 'r',\n 'ř' => 'r',\n 'Ś' => 's',\n 'ś' => 's',\n 'Ŝ' => 's',\n 'ŝ' => 's',\n 'Ş' => 's',\n 'ş' => 's',\n 'Š' => 's',\n 'š' => 's',\n 'Ţ' => 't',\n 'ţ' => 't',\n 'Ť' => 't',\n 'ť' => 't',\n 'Ŧ' => 't',\n 'ŧ' => 't',\n 'Ũ' => 'u',\n 'ũ' => 'u',\n 'Ū' => 'u',\n 'ū' => 'u',\n 'Ŭ' => 'u',\n 'ŭ' => 'u',\n 'Ů' => 'u',\n 'ů' => 'u',\n 'Ű' => 'u',\n 'ű' => 'u',\n 'Ų' => 'u',\n 'ų' => 'u',\n 'Ŵ' => 'w',\n 'ŵ' => 'w',\n 'Ŷ' => 'y',\n 'ŷ' => 'y',\n 'Ÿ' => 'y',\n 'Ź' => 'z',\n 'ź' => 'z',\n 'Ż' => 'z',\n 'ż' => 'z',\n 'Ž' => 'z',\n 'ž' => 'z',\n 'ſ' => 'z',\n 'Ə' => 'e',\n 'ƒ' => 'f',\n 'Ơ' => 'o',\n 'ơ' => 'o',\n 'Ư' => 'u',\n 'ư' => 'u',\n 'Ǎ' => 'a',\n 'ǎ' => 'a',\n 'Ǐ' => 'i',\n 'ǐ' => 'i',\n 'Ǒ' => 'o',\n 'ǒ' => 'o',\n 'Ǔ' => 'u',\n 'ǔ' => 'u',\n 'Ǖ' => 'u',\n 'ǖ' => 'u',\n 'Ǘ' => 'u',\n 'ǘ' => 'u',\n 'Ǚ' => 'u',\n 'ǚ' => 'u',\n 'Ǜ' => 'u',\n 'ǜ' => 'u',\n 'Ǻ' => 'a',\n 'ǻ' => 'a',\n 'Ǽ' => 'ae',\n 'ǽ' => 'ae',\n 'Ǿ' => 'o',\n 'ǿ' => 'o',\n 'ə' => 'e',\n 'Ё' => 'jo',\n 'Є' => 'e',\n 'І' => 'i',\n 'Ї' => 'i',\n 'А' => 'a',\n 'Б' => 'b',\n 'В' => 'v',\n 'Г' => 'g',\n 'Д' => 'd',\n 'Е' => 'e',\n 'Ж' => 'zh',\n 'З' => 'z',\n 'И' => 'i',\n 'Й' => 'j',\n 'К' => 'k',\n 'Л' => 'l',\n 'М' => 'm',\n 'Н' => 'n',\n 'О' => 'o',\n 'П' => 'p',\n 'Р' => 'r',\n 'С' => 's',\n 'Т' => 't',\n 'У' => 'u',\n 'Ф' => 'f',\n 'Х' => 'h',\n 'Ц' => 'c',\n 'Ч' => 'ch',\n 'Ш' => 'sh',\n 'Щ' => 'sch',\n 'Ъ' => '-',\n 'Ы' => 'y',\n 'Ь' => '-',\n 'Э' => 'je',\n 'Ю' => 'ju',\n 'Я' => 'ja',\n 'а' => 'a',\n 'б' => 'b',\n 'в' => 'v',\n 'г' => 'g',\n 'д' => 'd',\n 'е' => 'e',\n 'ж' => 'zh',\n 'з' => 'z',\n 'и' => 'i',\n 'й' => 'j',\n 'к' => 'k',\n 'л' => 'l',\n 'м' => 'm',\n 'н' => 'n',\n 'о' => 'o',\n 'п' => 'p',\n 'р' => 'r',\n 'с' => 's',\n 'т' => 't',\n 'у' => 'u',\n 'ф' => 'f',\n 'х' => 'h',\n 'ц' => 'c',\n 'ч' => 'ch',\n 'ш' => 'sh',\n 'щ' => 'sch',\n 'ъ' => '-',\n 'ы' => 'y',\n 'ь' => '-',\n 'э' => 'je',\n 'ю' => 'ju',\n 'я' => 'ja',\n 'ё' => 'jo',\n 'є' => 'e',\n 'і' => 'i',\n 'ї' => 'i',\n 'Ґ' => 'g',\n 'ґ' => 'g',\n 'א' => 'a',\n 'ב' => 'b',\n 'ג' => 'g',\n 'ד' => 'd',\n 'ה' => 'h',\n 'ו' => 'v',\n 'ז' => 'z',\n 'ח' => 'h',\n 'ט' => 't',\n 'י' => 'i',\n 'ך' => 'k',\n 'כ' => 'k',\n 'ל' => 'l',\n 'ם' => 'm',\n 'מ' => 'm',\n 'ן' => 'n',\n 'נ' => 'n',\n 'ס' => 's',\n 'ע' => 'e',\n 'ף' => 'p',\n 'פ' => 'p',\n 'ץ' => 'C',\n 'צ' => 'c',\n 'ק' => 'q',\n 'ר' => 'r',\n 'ש' => 'w',\n 'ת' => 't',\n '™' => 'tm',\n '°' => 'degree',\n '’' => '\\'',\n ];\n\n return $convert_table;\n }", "public function getCleanupCacheKeyData()\n {\n // 124 sign long string\n $s124 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ123456789abcdefghijklmnopqrstuvwxyz--ABCDEFGHIJKLMNOPQRSTUVWXYZ123456789abcdefghijklmnopqrstuvwxyz';\n\n return [\n [\n 'initialKey' => 'myaction._caching.',\n 'cleanedKey' => 'myaction_caching_',\n 'config' => [],\n ],\n [\n 'initialKey' => 'abcABC!\"§$%&/()=?+#*\\'-.,_:;',\n 'cleanedKey' => 'abcABC_%&_-_',\n 'config' => [],\n ],\n [\n 'initialKey' => $s124,\n 'cleanedKey' => substr($s124, 0, 50 - 33).'-'.md5($s124),\n 'config' => ['keylength' => 50],\n ],\n ];\n }", "public function _getCleanProperties() {}", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if (!is_null($this->container['zip_code']) && (mb_strlen($this->container['zip_code']) > 10)) {\n $invalidProperties[] = \"invalid value for 'zip_code', the character length must be smaller than or equal to 10.\";\n }\n\n if (!is_null($this->container['country_code']) && (mb_strlen($this->container['country_code']) > 3)) {\n $invalidProperties[] = \"invalid value for 'country_code', the character length must be smaller than or equal to 3.\";\n }\n\n if (!is_null($this->container['bio']) && (mb_strlen($this->container['bio']) > 4000)) {\n $invalidProperties[] = \"invalid value for 'bio', the character length must be smaller than or equal to 4000.\";\n }\n\n return $invalidProperties;\n }", "public function listInvalidProperties()\n {\n $invalid_properties = [];\n if ($this->container['name'] === null) {\n $invalid_properties[] = \"'name' can't be null\";\n }\n if ((strlen($this->container['name']) > 50)) {\n $invalid_properties[] = \"invalid value for 'name', the character length must be smaller than or equal to 50.\";\n }\n\n if ($this->container['location_id'] === null) {\n $invalid_properties[] = \"'location_id' can't be null\";\n }\n if ($this->container['business_unit_id'] === null) {\n $invalid_properties[] = \"'business_unit_id' can't be null\";\n }\n return $invalid_properties;\n }", "public function convertObjIntoAssArr(){\n\n $assArrOfObjPro = array();\n//taking value from array and checking if property is in class and than assign key and value to make array\n foreach(self::$db_table_fields as $db_table_field){\n if(property_exists($this,$db_table_field)){\n $assArrOfObjPro[$db_table_field] = $this->$db_table_field;\n }\n } return $assArrOfObjPro;\n }", "function getLocaleFieldNames() {\n\t\treturn array('title', 'description');\n\t}", "static function get_default_property_names($extended_property_names = array())\r\n {\r\n return array(self :: PROPERTY_COURSE, self :: PROPERTY_USER, self :: PROPERTY_STATUS);\r\n }" ]
[ "0.65443206", "0.6349035", "0.62003565", "0.60949284", "0.60949284", "0.5660701", "0.56556267", "0.5545687", "0.5545687", "0.5486726", "0.54776955", "0.54694986", "0.53971815", "0.5377428", "0.53323364", "0.53098935", "0.5300658", "0.52952003", "0.52595425", "0.5242723", "0.5230808", "0.5229798", "0.5208863", "0.51840425", "0.5182303", "0.5174187", "0.51616883", "0.5151724", "0.5137653", "0.51119745", "0.5102707", "0.51020324", "0.50924826", "0.50759643", "0.50751454", "0.50674504", "0.5053026", "0.5052231", "0.50520676", "0.5050459", "0.504884", "0.504205", "0.50314593", "0.5029975", "0.50230086", "0.5018073", "0.5006027", "0.49984023", "0.4997571", "0.4959213", "0.49528867", "0.4947344", "0.49396616", "0.49188137", "0.4915917", "0.4915912", "0.4896121", "0.4894592", "0.4893137", "0.4892518", "0.48893523", "0.48832166", "0.48814455", "0.48692933", "0.48630774", "0.4857335", "0.48535404", "0.48533553", "0.48477477", "0.48416784", "0.48416784", "0.4835309", "0.48332268", "0.48296526", "0.48245767", "0.482348", "0.4821815", "0.4817614", "0.48165664", "0.48039895", "0.48026824", "0.47975034", "0.47887838", "0.47842723", "0.4781911", "0.478044", "0.47786477", "0.4775385", "0.47746214", "0.47739136", "0.47732538", "0.47698933", "0.4765014", "0.47640535", "0.47637293", "0.47630182", "0.47571445", "0.47516218", "0.47430998", "0.4740861", "0.4740427" ]
0.0
-1
get the name of the event this class is subscribing to
abstract public function getEventName();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getEventName()\n\t{\n\t\treturn is_null($this->event_name) ? get_class($this) : $this->event_name;\n\t}", "public function getName()\n {\n return \"event\";\n }", "protected function getName()\n\t{\n\t\treturn 'event';\n\t}", "public function getCustomEventName();", "public function getEventName()\n {\n return $this->event->name;\n }", "public function getName()\n {\n return $this->eventName;\n }", "abstract protected function get_event_name();", "public function getName()\n\t{\n\t\treturn 'Event';\n\t}", "public function getEventName() :string {\n return get_class($this);\n }", "public function name()\n {\n return 'event';\n }", "public function getEventName()\n {\n return $this->eventName;\n }", "public function getEventName()\n {\n return $this->eventName;\n }", "public function name(): string\n {\n return 'event';\n }", "public function getEventName() {\n\t\treturn ($this->eventName);\n\t}", "public function getter_event_name()\n\t{\n\t\t$event = strtolower($this->qualified_name);\n\t\t\n\t\t$matches = [];\n\t\t\n\t\tif(preg_match(\"/numeric([0-9]{3})/\", $event, $matches))\n\t\t\t$event = $matches[1];\n\t\t\n\t\treturn $this->event_name = $event;\n\t}", "public function name()\n {\n return 'events';\n }", "public function getName()\n {\n return 'formEvent';\n }", "public function getEventName() : String;", "public static function get_event_string_name($suffix='') {\n $class = get_called_class();\n $class = substr($class, strlen(__NAMESPACE__) + 1);\n return 'event_'.$class.$suffix;\n }", "public function getSource()\r\n {\r\n return 'event';\r\n }", "public function getEventNameAttribute()\n {\n if (is_object($this->event)) {\n return $this->event->name;\n };\n\n return null;\n }", "public function getSource()\n {\n return 'event';\n }", "public function event()\n {\n return $this->event;\n }", "protected function getEventName($event)\n {\n $name = (new ReflectionClass($event))->getShortName();\n\n if (substr($name, -5) == 'Event') {\n\n $name = substr($name, 0, -5);\n }\n\n return $name;\n }", "public function getEventTitle()\n {\n return $this->category->getEventTitle();\n }", "public function makeEventName()\n {\n if (!$this->getName()) return '';\n $evt = strtolower('status.' . ObjectUtil::getBaseNamespace($this->getFkey()) . '.' . ObjectUtil::basename($this->getFkey()) . '.' . $this->getName());\n //$evt = strtolower('status.' . ObjectUtil::basename($this->getFkey()) . '.' . $this->getName());\n return $evt;\n }", "public function getter_event_callback()\n\t{\n\t\treturn $this->event_callback = \"on\".$this->qualified_name;\n\t}", "public function getEventTitle()\n {\n return $this->eventTitle;\n }", "public function getEventHandler($name)\n {\n return $this->alias . '::' . $name;\n }", "public function getEventClass() :string {\n $class = get_class($this);\n $classParts = explode(\"\\\\\", $class);\n\n return $classParts[count($classParts) - 1];\n }", "public function getEventNames(){\n return array($this->getEventName() => array($this,'handle'));\n }", "public function __toString(): string\n {\n return (string) $this->getEventName();\n }", "public static function get_name() {\n return get_string(self::get_event_string_name(), 'mod_reader');\n }", "function getType ()\n\t\t{\n\t\t\treturn \"Event\";\n\t\t}", "public function getName()\n {\n return \"event_form\";\n }", "public function getEventName()\n {\n return $this->translate->_('Lookup answers in previous survey with the same survey code in track.');\n }", "public function getSignalName()\n {\n return $this->signal_name;\n }", "public function getSignalName()\n {\n return $this->signal_name;\n }", "protected function getEventClass($className)\r\n {\r\n return $this->app->getNamespace() . \"Events\\\\{$className}\";\r\n }", "public function getAttributeName()\n {\n return 'EventType';\n }", "public function getEventClass()\n {\n return $this->eventClass;\n }", "public function getSignalName()\n {\n return $this->signalName;\n }", "public function getName()\n\t{\n\t\treturn Craft::t('Event Table');\n\t}", "public static function eventName(): string\n {\n }", "public function getEventType(): string;", "public function getEventType()\n {\n return $this->proxyBase->eventType;\n }", "public static function getEventNamespace(): string\n {\n return Components::detectClassComponent(static::class)->slug . ':' . static::class;\n }", "public function getSubEvent()\n {\n return $this->subEvent;\n }", "public function getEventSubscriberClass()\n {\n return get_class($this->wrapped);\n }", "public function getEvent()\n {\n return $this->event;\n }", "public function getEvent()\n {\n return $this->event;\n }", "public function getEvent()\n {\n return $this->event;\n }", "public function getEventNames()\n {\n return array_keys($this->events);\n }", "public function getName()\n\t{\n\t\treturn substr(__CLASS__, 7);\n\t}", "public function getName()\n\t{\n\t\treturn substr(__CLASS__, 7);\n\t}", "public function getEvent() {\n return $this->event;\n }", "protected function getEventName($eventId)\n {\n return $this->db->fetchColumn(\"SELECT `name` FROM `event` WHERE `id` = ?\", array($eventId));\n }", "public function getEventClass()\n {\n return __NAMESPACE__ . '\\TestAsset\\LongEvent';\n }", "protected function _getAssetName() {\n $k = $this->_tbl_key;\n return 'com_lajvit.event.'.(int) $this->$k;\n }", "public function getQualifiedEvent($event)\n\t{\n\t\treturn 'rocketeer.'.$this->getSlug().'.'.$event;\n\t}", "public function getQualifiedEvent($event)\n\t{\n\t\treturn 'rocketeer.'.$this->getSlug().'.'.$event;\n\t}", "public function getEventID() {\n return \"dataevent-\".$this->getID();\n }", "public function getEventName()\n {\n return $this->_('Copy track fields with the same trackfield code to answers');\n }", "public function getName()\n {\n return $this->__call(__FUNCTION__, func_get_args());\n }", "public function getEvent()\n {\n return $this->getData('event');\n }", "public function getEventType() {\n\t\treturn ($this->eventType);\n\t}", "function getName() {\n return $this->instance->getName();\n }", "function get_trigger_name() {\n\t\treturn Clean::string( $this->get_meta( 'trigger_name' ) );\n\t}", "public function getName() {\n if ( $this->reflectionSource instanceof ReflectionFunction ) {\n return $this->reflectionSource->getName();\n } else {\n return parent::getName();\n }\n }", "function getName()\n {\n return get_class($this);\n }", "public function get_module_title()\n {\n return \"LC__MODULE__EVENTS\";\n }", "public function getEventClassName(string $event)\n {\n // if the event is already a class name, use it\n if (class_exists($event)) {\n return $event;\n }\n\n if (isset(self::$eventsMap[$event])) {\n return self::$eventsMap[$event];\n }\n\n $listeners = $this->eventDispatcher->getListeners($event);\n if (empty($listeners)) {\n return null;\n }\n\n foreach ($listeners as $listener) {\n if (!\\is_array($listener) || 2 !== \\count($listener)) {\n continue;\n }\n\n $reflectionMethod = new \\ReflectionMethod($listener[0], $listener[1]);\n $args = $reflectionMethod->getParameters();\n if (!$args) {\n continue;\n }\n\n if (null !== $type = $args[0]->getType()) {\n $type = $type instanceof \\ReflectionNamedType ? $type->getName() : $type->__toString();\n\n if (LegacyEvent::class === $type && class_exists(Event::class)) {\n return Event::class;\n }\n\n // ignore an \"object\" type-hint\n if ('object' === $type) {\n continue;\n }\n\n return $type;\n }\n }\n\n return null;\n }", "public function getEventId() :string {\n $name = $this->getEventName();\n return md5($name);\n }", "function getName()\r\n\t{\r\n\t\treturn get_class($this);\r\n\t}", "public function getName(){\n\t\treturn get_class($this);\n\t}", "public function getEvent()\r\n {\r\n return $this->Event;\r\n }", "public function getExtensionName() {\n return $this->forwardCallToReflectionSource( __FUNCTION__ );\n }", "protected function extractEvent() : string\n {\n if (Str::includes(static::EVENT_DELIMITER, $this->middlewareNotation)) {\n return Str::firstStringBetween(\n $this->middlewareNotation,\n static::MIDDLEWARE_KEY_DELIMITER,\n static::EVENT_DELIMITER\n );\n }\n\n return Arr::last(\n explode(static::MIDDLEWARE_KEY_DELIMITER, $this->middlewareNotation)\n );\n }", "public static function getSubscribedEvents();", "public static function getSubscribedEvents();", "public function __get($name) {\n\t\tif ($name === 'event_name')\n\t\t\t$ret = $this->getEventName ();\n\t\telse\n\t\t\t$ret = $this->$name;\n\t\treturn $ret;\n\t}", "public function getName()\n {\n return Craft::t('Charge Subscriber');\n }", "public function getName() {\n return get_class($this);\n }", "public function getName() {\n return get_class($this);\n }", "public function getName() {\n\t\t\n\t\t// cut last part of class name\n\t\treturn substr( get_class( $this ), 0, -11 );\n\t\t\n\t}", "protected function getEventClass(): string\n {\n return UserContactsEvent::class;\n }", "public function eventNameForClass($class): string\n {\n $found = array_search($class, $this->eventClasses);\n if ( ! $found) {\n throw new \\InvalidArgumentException(\"Could not find an event name for the class {$class}.\");\n }\n return $found;\n }", "public function getName() {\r\n\t\treturn self::title;\r\n\t}", "public function getName()\n\t{\n\t\treturn str_replace('\\\\', '_', __CLASS__);\n\t}", "public function getName()\n {\n return __CLASS__;\n }", "public function getEventKey()\n {\n foreach ($this->events as $event) {\n \n return $event->getKey();\n }\n\n return null;\n }", "public function getEventType(): ?string\n {\n return $this->eventType;\n }", "public function getIdEvent(){\n\t\treturn $this->_idEvent;\n\t}", "public function getEvent()\n {\n return $this->getProperty(\"Event\",\n new Event($this->getContext(), new ResourcePath(\"Event\", $this->getResourcePath())));\n }", "function get_name () {\n return $this -> name;\n }", "static public function getName()\n {\n return 'log';\n }", "public function getName()\n\t{\n\t\treturn isset($this->_name) ? $this->_name : spl_object_hash($this);\n\t}", "public function __toString()\n {\n return 'Event ' . $this->createCompositeIdentifier() . ': ' . $this->getTitleFromDisplayPattern();\n }", "private function _get_event_type_name($event_type_id){\n switch ($event_type_id) {\n case Mage_Reports_Model_Event::EVENT_PRODUCT_VIEW:\n $event_name = \"VIEW\";\n break;\n\n case Mage_Reports_Model_Event::EVENT_PRODUCT_SEND:\n $event_name = \"SEND\";\n break;\n\n case Mage_Reports_Model_Event::EVENT_PRODUCT_COMPARE:\n $event_name = \"COMPARE\";\n break;\n\n case Mage_Reports_Model_Event::EVENT_PRODUCT_TO_CART:\n $event_name = \"CART\";\n break;\n\n case Mage_Reports_Model_Event::EVENT_PRODUCT_TO_WISHLIST:\n $event_name = \"LIKE\";\n break;\n\n case Mage_Reports_Model_Event::EVENT_WISHLIST_SHARE:\n $event_name = \"SHARE\";\n break;\n \n default:\n $event_name = \"NOT_DEFINED\";\n break;\n }\n return $event_name;\n }", "protected static function getActionName($event) {\n switch (strtolower($event)) {\n case 'created':\n case 'creating':\n return 'create';\n case 'updated':\n case 'updating':\n return 'update';\n case 'deleted':\n case 'deleting':\n return 'delete';\n case 'saved':\n case 'saving':\n return 'save';\n default:\n return 'unknown';\n }\n }" ]
[ "0.8079817", "0.8019447", "0.79874676", "0.7976003", "0.79487056", "0.7873412", "0.78153133", "0.7747132", "0.7702565", "0.7697265", "0.76173055", "0.76173055", "0.74943954", "0.74914193", "0.7378498", "0.7164775", "0.7137165", "0.7087442", "0.7076652", "0.7026024", "0.70128375", "0.6993688", "0.6846193", "0.6839676", "0.65248436", "0.6465872", "0.64632356", "0.6432735", "0.6424549", "0.6377769", "0.63759553", "0.6374064", "0.6334675", "0.63323236", "0.63285804", "0.6312177", "0.6244463", "0.6244463", "0.6203683", "0.62025553", "0.6184699", "0.61806744", "0.61656183", "0.6147577", "0.6127796", "0.6104497", "0.6093833", "0.6091387", "0.6089182", "0.6071284", "0.6071284", "0.6071284", "0.60541165", "0.6053579", "0.6053579", "0.6031454", "0.6024084", "0.5979988", "0.5970202", "0.5945512", "0.5945512", "0.59414643", "0.59311265", "0.59246397", "0.5921692", "0.59192836", "0.5898382", "0.58966625", "0.58952475", "0.5886344", "0.58859307", "0.58828354", "0.58826405", "0.5882297", "0.5876154", "0.5870557", "0.58537114", "0.58369553", "0.58362526", "0.58362526", "0.5830552", "0.5824778", "0.58178025", "0.58178025", "0.5789607", "0.578512", "0.57819915", "0.5777719", "0.57593274", "0.5757387", "0.5747577", "0.5746743", "0.5740409", "0.57331616", "0.573224", "0.5710693", "0.5704524", "0.569893", "0.56938416", "0.5693339" ]
0.69702524
22
return the format that is needed for Subscribe's register method
public function getEventNames(){ return array($this->getEventName() => array($this,'handle')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFormat() {}", "public function getFormat() {}", "public function getFormat() {}", "public function getFormat();", "public function getFormat();", "public function getFormat();", "public function getFormat();", "public function getFormat();", "public function getFormat();", "public function format() {\n return $this->format;\n }", "abstract public function getFormat();", "public function getFormat() { return $this->_format; }", "public static function getFormat(): string;", "public function getFormat(): array;", "public function getStandardJsonFormat(){\n return VoucherValidationLogTransformer::transform($this->prepareVoucherValidationLogGreedyData());\n }", "public function encode($format);", "public function getFormatter();", "abstract function format();", "public function getFormatter()\n {\n }", "public function getFormatter()\n {\n }", "public function getFormat()\n {\n return $this->_format;\n }", "public function getFormat()\n\t{\n\t\treturn $this->format; \n\n\t}", "public function supportedFormats();", "public function getToStringFormat()\n {\n return $this->_to_string_format;\n }", "public function getFormat()\n {\n return $this->format;\n }", "public function getFormat()\n {\n return $this->format;\n }", "public function getFormat()\n {\n return $this->format;\n }", "public function getFormat()\n {\n return $this->format;\n }", "public function getFormat()\n {\n return $this->format;\n }", "public function getFormat()\n {\n return $this->format;\n }", "public function getFormat()\n {\n return $this->format;\n }", "public function getFormat()\n {\n return $this->format;\n }", "public function getFormat()\n {\n return $this->format;\n }", "public function getFormat()\n {\n return $this->format;\n }", "public function getFormat() {\n return $this->format;\n }", "public function GetFormat () {\n\t\treturn $this->format;\n\t}", "protected function getFormat()\n {\n return $this->format;\n }", "public function getFormat()\n {\n\n return $this->format;\n }", "public function format(): string;", "public function getFormat() {\r\n\t\treturn $this->format;\r\n\t}", "public function getFormat() {\n\t\t\treturn $this->_format;\n\t\t}", "public function logMessageFormat()\n {\n return $this->logMessageFormat;\n }", "protected function getFormat()\n {\n return 'FORMAT: 1A';\n }", "public function format()\n {\n return json_decode($this->renderer->format(), false, JSON_FORCE_OBJECT);\n }", "public function getPublicationFormat() {\n $fields = array('format');\n $result = TingOpenformatMethods::parseFields($this->_getPublicationDetails(), $fields);\n return (is_array($result)) ? reset($result) : $result;\n }", "public function getFormats()\n {\n\t $format_field = $this->getValue('format');\n\t return wed_decodeJSON($format_field,true);\n }", "public function getEncoder($format);", "public function format($format);", "public function getDataFormat()\n {\n return $this->data_format;\n }", "public function getDataFormat()\n {\n return $this->data_format;\n }", "public function getFormat() {\n $result = TingOpenformatMethods::parseFields($this->_getDetails(), array('format'));\n return $result;\n }", "public function getMetricDataFormat() {}", "public function format() {\r\n\t\t$this->resource->format();\r\n\t}", "public function getHTTPFormat()\n {\n return $this->getMessage(self::FORMAT_HTTP);\n }", "public function format() {\n\n /* * Add the mandatary props* */\n if (!is_null($this->name)) {\n $result[self::NAME_KEY] = $this->name;\n }\n\n /* * Add the optional props if any* */\n if (!is_null($this->optionalProperties)) {\n $result = array_merge($result, $this->optionalProperties);\n }\n\n\n return $result;\n }", "public function getFormat(): int;", "public function getFormat()\n\t\t\t{\n\t\t\t\treturn $this->format;\n\t\t\t}", "function format()\r\n\t{\r\n\t\treturn call_user_func($this->callback);\r\n\t}", "public function serialize()\n {\n return [\n \"id\" => (string) $this->id,\n \"aggregateId\" => (string) $this->aggregateId,\n \"aggregateType\" => $this->aggregateType,\n \"event\" => static::class,\n \"payload\" => $this->payload,\n \"timestamp\" => new Carbon()\n ];\n }", "public function __toString()\n {\n return $this->format();\n }", "public function __toString()\n {\n return $this->format();\n }", "public function __toString()\n {\n return $this->format();\n }", "public function getFormatName();", "public function __toString(): string\n {\n return $this->convertToJWT()->toString();\n }", "public static function serialFormats()\n {\n return self::$serialFormats;\n }", "public static function formats()\n {\n return self::$formats;\n }", "public function __toString()\n {\n return $this->formatAsString();\n }", "public function format()\n {\n $registrationNumber = str_pad($this->registrationNumber, 4, '0', STR_PAD_LEFT);\n $accountNumber = str_pad($this->accountNumber, 10, '0', STR_PAD_LEFT);\n return $registrationNumber . $accountNumber;\n }", "public function provides()\n {\n return ['format'];\n }", "public function __toString() {\n $context = array();\n foreach ($this->properties as $key => $value) {\n if ($value instanceof \\DateTime) {\n $context[] = \"$key=\".$value->format('Y-m-d\\TH:i:s');\n } else { \n $context[] = \"$key=$value\";\n }\n }\n return '[ Fire.Business.Model.ExternalAccount: ' . implode(' ', $context) . ' ]';\n }", "public function __toString(): string {\n $context = [];\n foreach ($this->solution as $key => $value) {\n $context[] = \"$key=$value\";\n }\n return '[Twilio.Events.V1.SubscribedEventContext ' . \\implode(' ', $context) . ']';\n }", "public function getFormatter()\n {\n return parent::getFormatter();\n }", "abstract public function getFormat(): int;", "public function format()\n\t{\n\t\t// Get the event data\n\t\t$channel_data = & Swiftriver_Event::$data;\n\t\t\n\t\tif (isset($channel_data['channel']) AND $channel_data['channel'] == 'twitter')\n\t\t{\n\t\t\t$parameters = $channel_data['parameters']['value'];\n\t\t\t\n\t\t\tif (isset($parameters['user']))\n\t\t\t{\n\t\t\t\t$channel_data['display_name'] .= 'From: '.$parameters['user'];\n\t\t\t}\n\t\t\tif (isset($parameters['keyword']))\n\t\t\t{\n\t\t\t\t$channel_data['display_name'] .= ' Keywords: '.$parameters['keyword'];\n\t\t\t}\n\t\t\tif (isset($parameters['location']))\n\t\t\t{\n\t\t\t\t$channel_data['display_name'] .= ' Location: '.$parameters['location'];\n\t\t\t}\n\t\t}\n\t}", "public function getSupportedFormats()\n {\n return array('json', 'xml');\n }", "public function format($data);", "public function format($data);", "public function getArrayFormat()\n {\n return $this->getMessage(self::FORMAT_ARRAY);\n }", "public static function getFormats()\n {\n return self::$formats;\n }", "public function __toString() {\n\t\treturn (string) $this->convertToJWT( $this->privateKey );\n\t}", "public static function invalidServiceFormat()\n {\n return new static(sprintf('The service format can only be : %s.', implode(', ', array('json', 'xml'))));\n }", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public static function openAPIFormats();", "protected function getFormats(): array\n {\n return [self::FORMAT_JSON, self::FORMAT_XML];\n }", "public function createComponent() : string\n {\n return Formatter::format( $this );\n }", "public function format(): array\n {\n if ($this->groupEvent) {\n // Events are grouped only in API version 2.\n $this->version = 2;\n }\n\n $result = [\n 'Url' => $this->url,\n 'EventType' => $this->type,\n 'IsBackup' => $this->isBackup,\n 'Status' => $this->status,\n 'Version' => $this->version,\n ];\n\n if ($this->apiKeyId) {\n $result['APIKeyID'] = $this->apiKeyId;\n }\n\n return $result;\n }", "public function to_wire()\n {\n return json_encode($this->data);\n }", "public function getFormat(): string\n {\n if ($this->format === null) {\n $this->format = self::$default_format;\n }\n return $this->format;\n }", "public function format() { \n\n\t\t$this->f_start = inet_ntop($this->start); \n\t\t$this->f_end = inet_ntop($this->end); \n\n\t\t$this->f_user = $this->get_user_name(); \n\t\t$this->f_level = $this->get_level_name(); \n\t\t$this->f_type = $this->get_type_name(); \n\n\t}", "function format()\r\n\t{\r\n\t\treturn $this->text;\r\n\t}", "public static function swaggerFormats()\n {\n return self::$swaggerFormats + parent::swaggerFormats();\n }", "public static function swaggerFormats()\n {\n return self::$swaggerFormats + parent::swaggerFormats();\n }", "public static function swaggerFormats()\n {\n return self::$swaggerFormats + parent::swaggerFormats();\n }", "public static function swaggerFormats()\n {\n return self::$swaggerFormats + parent::swaggerFormats();\n }" ]
[ "0.64959294", "0.64959294", "0.64959294", "0.6193194", "0.6193194", "0.6193194", "0.6193194", "0.6193194", "0.6193194", "0.6076418", "0.60698557", "0.60277885", "0.6026277", "0.58237624", "0.5771181", "0.5769537", "0.5753059", "0.57388896", "0.57095337", "0.57095337", "0.567885", "0.5678232", "0.56567115", "0.5653992", "0.5623372", "0.5623372", "0.5623372", "0.5623372", "0.5623372", "0.5623372", "0.5623372", "0.5623372", "0.5623372", "0.5623372", "0.5603905", "0.55688363", "0.55641675", "0.5551172", "0.5548329", "0.553322", "0.5531994", "0.5520329", "0.5517818", "0.5503125", "0.5468184", "0.5467475", "0.5455911", "0.54501295", "0.5444423", "0.5444423", "0.54263735", "0.54199964", "0.5417309", "0.5416122", "0.5397673", "0.5395898", "0.53956425", "0.53543437", "0.53350186", "0.5303772", "0.5303772", "0.5303772", "0.5303498", "0.5294826", "0.5293773", "0.52894866", "0.52830607", "0.52746713", "0.52701664", "0.5264391", "0.52539545", "0.5251224", "0.5251115", "0.52487445", "0.5246035", "0.5235473", "0.5235473", "0.5229757", "0.52239007", "0.52158594", "0.5213947", "0.52086", "0.52086", "0.52086", "0.52086", "0.52086", "0.52086", "0.52067333", "0.52067333", "0.52016807", "0.52007616", "0.5185242", "0.51768357", "0.5165033", "0.5164603", "0.51517254", "0.51420647", "0.5130944", "0.5130944", "0.5130944", "0.5130944" ]
0.0
-1